diff --git a/dist/js/bpd-core.js b/dist/js/bpd-core.js index 060e943..25ca299 100644 --- a/dist/js/bpd-core.js +++ b/dist/js/bpd-core.js @@ -1 +1 @@ -!function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=9)}([function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=n(1),a=function(){function e(e,t){for(var n=0;n0?e.toLowerCase():null)},s=function(){function e(){i(this,e),this.fns=[],this.datas=[]}return a(e,[{key:"add",value:function(e,t){this.fns.push(e),this.datas.push(t)}},{key:"remove",value:function(e){var t=this.fns.indexOf(e);t>=0&&(this.fns.splice(t,1),this.datas.splice(t,1))}},{key:"invoke",value:function(e,t){var n=this,i=null;return this.fns.forEach(function(r,a){try{i=r(e,t,n.datas[a])}catch(e){console.error(e)}}),i}}]),e}(),l=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,e),this.handers=t}return a(e,[{key:"on",value:function(e,t,n){if(null==(e=o(e)))throw new Error("事件名无效");if(!Object(r.f)(n)){var i=n;n=t,t=i}if(!Object(r.f)(n))throw new Error("必须提供事件函数");var a=this.handers[e];null==a&&(a=new s,this.handers[e]=a),a.add(n,t)}},{key:"off",value:function(e,t){if(null!=(e=o(e))){var n=this.handers[e];null!=n&&(null==t?delete this.handers[e]:n.remove(t))}}},{key:"destroy",value:function(){this.handers={}}},{key:"trigger",value:function(e,t,n){if(null!=(e=o(e))){var i=this.handers[e];return null!=i?i.invoke(t,n):void 0}}}]),e}(),c=new l;t.a=c},function(e,t,n){"use strict";n.d(t,"g",function(){return r}),n.d(t,"f",function(){return a}),n.d(t,"d",function(){return o}),n.d(t,"c",function(){return s}),n.d(t,"h",function(){return l}),n.d(t,"k",function(){return c}),n.d(t,"i",function(){return u}),n.d(t,"e",function(){return p}),n.d(t,"a",function(){return h}),n.d(t,"b",function(){return f}),n.d(t,"j",function(){return d});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=document.createElement("span");n.innerHTML="",n.style.visibility="hidden",n.style.fontSize="500px",document.body.appendChild(n);var i=n.offsetWidth,r=n.offsetHeight;n.style.fontFamily=e;var a=setInterval(function(){n.offsetWidth===i&&n.offsetHeight===r||(clearInterval(a),document.body.removeChild(n),n=null,t())},50)},a=function(e){return"function"==typeof e},o=function(e,t){return"uppercase"===t?e.substring(0,1).toUpperCase()+e.substring(1):e.substring(0,1).toLowerCase()+e.substring(1)},s=function(e){return JSON.parse(JSON.stringify(e))},l=function(e,t){for(var n=[],i=e.concat(t),r=0;r1&&void 0!==arguments[1]?arguments[1]:1;if("object"===(void 0===t?"undefined":i(t))){var r={};for(var a in t)r[a]=t[a],"number"==typeof t[a]&&(r[a]=e(r[a],n));return r}return t*n},u=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if("object"===(void 0===t?"undefined":i(t))){var r={};for(var a in t)r[a]=t[a],"number"==typeof t[a]&&(r[a]=e(r[a],n));return r}return t/n},p=function(e){return e.indexOf(":")>=0?e.substr(e.indexOf(":")+1):""},h={font:function(e,t){var n=t.fontStyle,i=t.fontVariant,r=t.fontWeight,a=t.fontSize,o=t.fontFamily,s=t.content,l=t.fontColor,c=t.textAlign,u=t.textBaseline,p=t.x,h=t.y;c&&(e.textAlign=c),u&&(e.textBaseline=u),l&&(e.fillStyle=l),e.font=n+" "+i+" "+r+" "+a+" "+o,e.fillText(s,p,h)},move:function(e,t){e.moveTo(t.x,t.y)},line:function(e,t){e.lineTo(t.x,t.y)},curve:function(e,t){e.bezierCurveTo(t.x1,t.y1,t.x2,t.y2,t.x,t.y)},quadraticCurve:function(e,t){e.quadraticCurveTo(t.x1,t.y1,t.x,t.y)},close:function(e){e.closePath()}},f=function(e,t,n){var i="";return e.forEach(function(n,r){t.indexOf(n)<0&&(i+=n+(r!==e.length?",":""))}),-1===i.indexOf(n)},d=function(e){var t={};if("bpmn:Process"===e.$type)t.id=e.id,t.extensions=y(e.extensionElements.values||[]);else{var n=e.data,i=e.shape;t.bpmnName=i.bpmnName,t.groupName=i.groupName;for(var r in n)switch(r){case"$type":break;case"extensionElements":t.extensions=y(n[r].values||[]);break;default:t[r]=n[r]}}return t},y=function(e){for(var t=[],n=0;n0&&n-1 in e)}function r(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}function a(e,t,n){return re(t)?se.grep(e,function(e,i){return!!t.call(e,i,e)!==n}):t.nodeType?se.grep(e,function(e){return e===t!==n}):"string"!=typeof t?se.grep(e,function(e){return J.call(t,e)>-1!==n}):se.filter(t,e,n)}function o(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function s(e){var t={};return se.each(e.match(ve)||[],function(e,n){t[n]=!0}),t}function l(e){return e}function c(e){throw e}function u(e,t,n,i){var r;try{e&&re(r=e.promise)?r.call(e).done(t).fail(n):e&&re(r=e.then)?r.call(e,t,n):t.apply(void 0,[e].slice(i))}catch(e){n.apply(void 0,[e])}}function p(){V.removeEventListener("DOMContentLoaded",p),window.removeEventListener("load",p),se.ready()}function h(e,t){return t.toUpperCase()}function f(e){return e.replace(Ee,"ms-").replace(Se,h)}function d(){this.expando=se.expando+d.uid++}function y(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:Oe.test(e)?JSON.parse(e):e)}function m(e,t,n){var i;if(void 0===n&&1===e.nodeType)if(i="data-"+t.replace(Re,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(i))){try{n=y(n)}catch(e){}Ae.set(e,t,n)}else n=void 0;return n}function g(e,t,n,i){var r,a,o=20,s=i?function(){return i.cur()}:function(){return se.css(e,t,"")},l=s(),c=n&&n[3]||(se.cssNumber[t]?"":"px"),u=(se.cssNumber[t]||"px"!==c&&+l)&&Te.exec(se.css(e,t));if(u&&u[3]!==c){for(l/=2,c=c||u[3],u=+l||1;o--;)se.style(e,t,u+c),(1-a)*(1-(a=s()/l||.5))<=0&&(o=0),u/=a;u*=2,se.style(e,t,u+c),n=n||[]}return n&&(u=+u||+l||0,r=n[1]?u+(n[1]+1)*n[2]:+n[2],i&&(i.unit=c,i.start=u,i.end=r)),r}function v(e){var t,n=e.ownerDocument,i=e.nodeName,r=De[i];return r||(t=n.body.appendChild(n.createElement(i)),r=se.css(t,"display"),t.parentNode.removeChild(t),"none"===r&&(r="block"),De[i]=r,r)}function x(e,t){for(var n,i,r=[],a=0,o=e.length;a-1)a&&a.push(o);else if(u=se.contains(o.ownerDocument,o),s=b(h.appendChild(o),"script"),u&&w(s),i)for(p=0;o=s[p++];)Le.test(o.type||"")&&i.push(o);return h}function S(){return!0}function k(){return!1}function C(){try{return V.activeElement}catch(e){}}function A(e,t,n,r,a,o){var s,l;if("object"===(void 0===t?"undefined":i(t))){"string"!=typeof n&&(r=r||n,n=void 0);for(l in t)A(e,l,n,r,t[l],o);return e}if(null==r&&null==a?(a=n,r=n=void 0):null==a&&("string"==typeof n?(a=r,r=void 0):(a=r,r=n,n=void 0)),!1===a)a=k;else if(!a)return e;return 1===o&&(s=a,a=function(e){return se().off(e),s.apply(this,arguments)},a.guid=s.guid||(s.guid=se.guid++)),e.each(function(){se.event.add(this,t,a,r,n)})}function O(e,t){return r(e,"table")&&r(11!==t.nodeType?t:t.firstChild,"tr")?se(e).children("tbody")[0]||e:e}function R(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function P(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function T(e,t){var n,i,r,a,o,s,l,c;if(1===t.nodeType){if(Ce.hasData(e)&&(a=Ce.access(e),o=Ce.set(t,a),c=a.events)){delete o.handle,o.events={};for(r in c)for(n=0,i=c[r].length;n1&&"string"==typeof d&&!ie.checkClone&&Ve.test(d))return t.each(function(e){var a=t.eq(e);y&&(n[0]=d.call(this,e,a.html())),j(a,n,i,r)});if(h&&(a=E(n,t[0].ownerDocument,!1,t,r),o=a.firstChild,1===a.childNodes.length&&(a=o),o||r)){for(s=se.map(b(a,"script"),R),l=s.length;p=0&&(l+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-a-l-s-.5))),l}function F(e,t,n){var i=Ke(e),r=D(e,t,i),a="border-box"===se.css(e,"boxSizing",!1,i),o=a;if(Xe.test(r)){if(!n)return r;r="auto"}return o=o&&(ie.boxSizingReliable()||r===e.style[t]),("auto"===r||!parseFloat(r)&&"inline"===se.css(e,"display",!1,i))&&(r=e["offset"+t[0].toUpperCase()+t.slice(1)],o=!0),(r=parseFloat(r)||0)+_(e,t,n||(a?"border":"content"),o,i,r)+"px"}function q(e){return(e.match(ve)||[]).join(" ")}function z(e){return e.getAttribute&&e.getAttribute("class")||""}function W(e){return Array.isArray(e)?e:"string"==typeof e?e.match(ve)||[]:[]}function H(e,n,r,a){var o;if(Array.isArray(n))se.each(n,function(t,n){r||ut.test(e)?a(e,n):H(e+"["+("object"===(void 0===n?"undefined":i(n))&&null!=n?t:"")+"]",n,r,a)});else if(r||"object"!==t(n))a(e,n);else for(o in n)H(e+"["+o+"]",n[o],r,a)}var G=[],V=window.document,U=Object.getPrototypeOf,X=G.slice,K=G.concat,Y=G.push,J=G.indexOf,Q={},Z=Q.toString,ee=Q.hasOwnProperty,te=ee.toString,ne=te.call(Object),ie={},re=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},ae=function(e){return null!=e&&e===e.window},oe={type:!0,src:!0,noModule:!0},se=function e(t,n){return new e.fn.Init(t,n)},le=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;se.fn=se.prototype={slimJQ:"3.3.1",constructor:se,length:0,toArray:function(){return X.call(this)},get:function(e){return null==e?X.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=se.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return se.each(this,e)},map:function(e){return this.pushStack(se.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(X.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&nw.cacheLength&&delete e[t.shift()],e[n+" "]=i}var t=[];return e}function i(e){return e[$]=!0,e}function r(e){var t=M.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function a(e,t){for(var n=e.split("|"),i=n.length;i--;)w.attrHandle[n[i]]=t}function o(e,t){var n=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(i)return i;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&Ee(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function l(e){return i(function(t){return t=+t,i(function(n,i){for(var r,a=e([],n.length,t),o=a.length;o--;)n[r=a[o]]&&(n[r]=!(i[r]=n[r]))})})}function c(e){return e&&void 0!==e.getElementsByTagName&&e}function u(){}function p(e){for(var t=0,n=e.length,i="";t1?function(t,n,i){for(var r=e.length;r--;)if(!e[r](t,n,i))return!1;return!0}:e[0]}function d(e,n,i){for(var r=0,a=n.length;r-1&&(i[c]=!(o[c]=p))}}else x=y(x===o?x.splice(m,x.length):x),a?a(null,o,x,l):Y.apply(o,x)})}function g(e){for(var t,n,i,r=e.length,a=w.relative[e[0].type],o=a||w.relative[" "],s=a?1:0,l=h(function(e){return e===t},o,!0),c=h(function(e){return Q(t,e)>-1},o,!0),u=[function(e,n,i){var r=!a&&(i||n!==O)||((t=n).nodeType?l(e,n,i):c(e,n,i));return t=null,r}];s1&&f(u),s>1&&p(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(ae,"$1"),n,s0,a=e.length>0,o=function(i,o,s,l,c){var u,p,h,f=0,d="0",m=i&&[],g=[],v=O,x=i||a&&w.find.TAG("*",c),b=F+=null==v?1:Math.random()||.1,E=x.length;for(c&&(O=o===M||o||c);d!==E&&null!=(u=x[d]);d++){if(a&&u){for(p=0,o||u.ownerDocument===M||(T(u),s=!N);h=e[p++];)if(h(u,o||M,s)){l.push(u);break}c&&(F=b)}r&&((u=!h&&u)&&f--,i&&m.push(u))}if(f+=d,r&&d!==f){for(p=0;h=n[p++];)h(m,g,o,s);if(i){if(f>0)for(;d--;)m[d]||g[d]||(g[d]=X.call(l));g=y(g)}Y.apply(l,g),c&&!i&&g.length>0&&f+n.length>1&&t.uniqueSort(l)}return c&&(F=b,O=v),m};return r?i(o):o}var x,b,w,E,S,k,C,A,O,R,P,T,M,j,N,D,B,I,L,$="sizzle"+1*new Date,_=e.document,F=0,q=0,z=n(),W=n(),H=n(),G=function(e,t){return e===t&&(P=!0),0},V={}.hasOwnProperty,U=[],X=U.pop,K=U.push,Y=U.push,J=U.slice,Q=function(e,t){for(var n=0,i=e.length;n+~]|"+ee+")"+ee+"*"),le=new RegExp("="+ee+"*([^\\]'\"]*?)"+ee+"*\\]","g"),ce=new RegExp(ie),ue=new RegExp("^"+te+"$"),pe={ID:new RegExp("^#("+te+")"),CLASS:new RegExp("^\\.("+te+")"),TAG:new RegExp("^("+te+"|[*])"),ATTR:new RegExp("^"+ne),PSEUDO:new RegExp("^"+ie),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ee+"*(even|odd|(([+-]|)(\\d*)n|)"+ee+"*(?:([+-]|)"+ee+"*(\\d+)|))"+ee+"*\\)|)","i"),bool:new RegExp("^(?:"+Z+")$","i"),needsContext:new RegExp("^"+ee+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ee+"*((?:-\\d)?\\d*)"+ee+"*\\)|)(?=[^-]|$)","i")},he=/^(?:input|select|textarea|button)$/i,fe=/^h\d$/i,de=/^[^{]+\{\s*\[native \w/,ye=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,me=/[+~]/,ge=new RegExp("\\\\([\\da-f]{1,6}"+ee+"?|("+ee+")|.)","ig"),ve=function(e,t,n){var i="0x"+t-65536;return i!==i||n?t:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)},xe=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,be=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},we=function(){T()},Ee=h(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{Y.apply(U=J.call(_.childNodes),_.childNodes),U[_.childNodes.length].nodeType}catch(e){Y={apply:U.length?function(e,t){K.apply(e,J.call(t))}:function(e,t){for(var n=e.length,i=0;e[n++]=t[i++];);e.length=n-1}}}b=t.support={},S=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},T=t.setDocument=function(e){var t,n,i=e?e.ownerDocument||e:_;return i!==M&&9===i.nodeType&&i.documentElement?(M=i,j=M.documentElement,N=!S(M),_!==M&&(n=M.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",we,!1):n.attachEvent&&n.attachEvent("onunload",we)),b.attributes=r(function(e){return e.className="i",!e.getAttribute("className")}),b.getElementsByTagName=r(function(e){return e.appendChild(M.createComment("")),!e.getElementsByTagName("*").length}),b.getElementsByClassName=de.test(M.getElementsByClassName),b.getById=r(function(e){return j.appendChild(e).id=$,!M.getElementsByName||!M.getElementsByName($).length}),b.getById?(w.filter.ID=function(e){var t=e.replace(ge,ve);return function(e){return e.getAttribute("id")===t}},w.find.ID=function(e,t){if(void 0!==t.getElementById&&N){var n=t.getElementById(e);return n?[n]:[]}}):(w.filter.ID=function(e){var t=e.replace(ge,ve);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},w.find.ID=function(e,t){if(void 0!==t.getElementById&&N){var n,i,r,a=t.getElementById(e);if(a){if((n=a.getAttributeNode("id"))&&n.value===e)return[a];for(r=t.getElementsByName(e),i=0;a=r[i++];)if((n=a.getAttributeNode("id"))&&n.value===e)return[a]}return[]}}),w.find.TAG=b.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):b.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,i=[],r=0,a=t.getElementsByTagName(e);if("*"===e){for(;n=a[r++];)1===n.nodeType&&i.push(n);return i}return a},w.find.CLASS=b.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&N)return t.getElementsByClassName(e)},B=[],D=[],(b.qsa=de.test(M.querySelectorAll))&&(r(function(e){j.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&D.push("[*^$]="+ee+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||D.push("\\["+ee+"*(?:value|"+Z+")"),e.querySelectorAll("[id~="+$+"-]").length||D.push("~="),e.querySelectorAll(":checked").length||D.push(":checked"),e.querySelectorAll("a#"+$+"+*").length||D.push(".#.+[+~]")}),r(function(e){e.innerHTML="";var t=M.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&D.push("name"+ee+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&D.push(":enabled",":disabled"),j.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&D.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),D.push(",.*:")})),(b.matchesSelector=de.test(I=j.matches||j.webkitMatchesSelector||j.mozMatchesSelector||j.oMatchesSelector||j.msMatchesSelector))&&r(function(e){b.disconnectedMatch=I.call(e,"*"),I.call(e,"[s!='']:x"),B.push("!=",ie)}),D=D.length&&new RegExp(D.join("|")),B=B.length&&new RegExp(B.join("|")),t=de.test(j.compareDocumentPosition),L=t||de.test(j.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,i=t&&t.parentNode;return e===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):e.compareDocumentPosition&&16&e.compareDocumentPosition(i)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},G=t?function(e,t){if(e===t)return P=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!b.sortDetached&&t.compareDocumentPosition(e)===n?e===M||e.ownerDocument===_&&L(_,e)?-1:t===M||t.ownerDocument===_&&L(_,t)?1:R?Q(R,e)-Q(R,t):0:4&n?-1:1)}:function(e,t){if(e===t)return P=!0,0;var n,i=0,r=e.parentNode,a=t.parentNode,s=[e],l=[t];if(!r||!a)return e===M?-1:t===M?1:r?-1:a?1:R?Q(R,e)-Q(R,t):0;if(r===a)return o(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)l.unshift(n);for(;s[i]===l[i];)i++;return i?o(s[i],l[i]):s[i]===_?-1:l[i]===_?1:0},M):M},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==M&&T(e),n=n.replace(le,"='$1']"),b.matchesSelector&&N&&!H[n+" "]&&(!B||!B.test(n))&&(!D||!D.test(n)))try{var i=I.call(e,n);if(i||b.disconnectedMatch||e.document&&11!==e.document.nodeType)return i}catch(e){}return t(n,M,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==M&&T(e),L(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==M&&T(e);var n=w.attrHandle[t.toLowerCase()],i=n&&V.call(w.attrHandle,t.toLowerCase())?n(e,t,!N):void 0;return void 0!==i?i:b.attributes||!N?e.getAttribute(t):(i=e.getAttributeNode(t))&&i.specified?i.value:null},t.escape=function(e){return(e+"").replace(xe,be)},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],i=0,r=0;if(P=!b.detectDuplicates,R=!b.sortStable&&e.slice(0),e.sort(G),P){for(;t=e[r++];)t===e[r]&&(i=n.push(r));for(;i--;)e.splice(n[i],1)}return R=null,e},E=t.getText=function(e){var t,n="",i=0,r=e.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=E(e)}else if(3===r||4===r)return e.nodeValue}else for(;t=e[i++];)n+=E(t);return n},w=t.selectors={cacheLength:50,createPseudo:i,match:pe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(ge,ve),e[3]=(e[3]||e[4]||e[5]||"").replace(ge,ve),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return pe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&ce.test(n)&&(t=k(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(ge,ve).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=z[e+" "];return t||(t=new RegExp("(^|"+ee+")"+e+"("+ee+"|$)"))&&z(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,i){return function(r){var a=t.attr(r,e);return null==a?"!="===n:!n||(a+="","="===n?a===i:"!="===n?a!==i:"^="===n?i&&0===a.indexOf(i):"*="===n?i&&a.indexOf(i)>-1:"$="===n?i&&a.slice(-i.length)===i:"~="===n?(" "+a.replace(re," ")+" ").indexOf(i)>-1:"|="===n&&(a===i||a.slice(0,i.length+1)===i+"-"))}},CHILD:function(e,t,n,i,r){var a="nth"!==e.slice(0,3),o="last"!==e.slice(-4),s="of-type"===t;return 1===i&&0===r?function(e){return!!e.parentNode}:function(t,n,l){var c,u,p,h,f,d,y=a!==o?"nextSibling":"previousSibling",m=t.parentNode,g=s&&t.nodeName.toLowerCase(),v=!l&&!s,x=!1;if(m){if(a){for(;y;){for(h=t;h=h[y];)if(s?h.nodeName.toLowerCase()===g:1===h.nodeType)return!1;d=y="only"===e&&!d&&"nextSibling"}return!0}if(d=[o?m.firstChild:m.lastChild],o&&v){for(h=m,p=h[$]||(h[$]={}),u=p[h.uniqueID]||(p[h.uniqueID]={}),c=u[e]||[],f=c[0]===F&&c[1],x=f&&c[2],h=f&&m.childNodes[f];h=++f&&h&&h[y]||(x=f=0)||d.pop();)if(1===h.nodeType&&++x&&h===t){u[e]=[F,f,x];break}}else if(v&&(h=t,p=h[$]||(h[$]={}),u=p[h.uniqueID]||(p[h.uniqueID]={}),c=u[e]||[],f=c[0]===F&&c[1],x=f),!1===x)for(;(h=++f&&h&&h[y]||(x=f=0)||d.pop())&&((s?h.nodeName.toLowerCase()!==g:1!==h.nodeType)||!++x||(v&&(p=h[$]||(h[$]={}),u=p[h.uniqueID]||(p[h.uniqueID]={}),u[e]=[F,x]),h!==t)););return(x-=r)===i||x%i==0&&x/i>=0}}},PSEUDO:function(e,n){var r,a=w.pseudos[e]||w.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return a[$]?a(n):a.length>1?(r=[e,e,"",n],w.setFilters.hasOwnProperty(e.toLowerCase())?i(function(e,t){for(var i,r=a(e,n),o=r.length;o--;)i=Q(e,r[o]),e[i]=!(t[i]=r[o])}):function(e){return a(e,0,r)}):a}},pseudos:{not:i(function(e){var t=[],n=[],r=C(e.replace(ae,"$1"));return r[$]?i(function(e,t,n,i){for(var a,o=r(e,null,i,[]),s=e.length;s--;)(a=o[s])&&(e[s]=!(t[s]=a))}):function(e,i,a){return t[0]=e,r(t,null,a,n),t[0]=null,!n.pop()}}),has:i(function(e){return function(n){return t(e,n).length>0}}),contains:i(function(e){return e=e.replace(ge,ve),function(t){return(t.textContent||t.innerText||E(t)).indexOf(e)>-1}}),lang:i(function(e){return ue.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(ge,ve).toLowerCase(),function(t){var n;do{if(n=N?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===j},focus:function(e){return e===M.activeElement&&(!M.hasFocus||M.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:s(!1),disabled:s(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!w.pseudos.empty(e)},header:function(e){return fe.test(e.nodeName)},input:function(e){return he.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:l(function(){return[0]}),last:l(function(e,t){return[t-1]}),eq:l(function(e,t,n){return[n<0?n+t:n]}),even:l(function(e,t){for(var n=0;n=0;)e.push(i);return e}),gt:l(function(e,t,n){for(var i=n<0?n+t:n;++i2&&"ID"===(o=a[0]).type&&9===t.nodeType&&N&&w.relative[a[1].type]){if(!(t=(w.find.ID(o.matches[0].replace(ge,ve),t)||[])[0]))return n;u&&(t=t.parentNode),e=e.slice(a.shift().value.length)}for(r=pe.needsContext.test(e)?0:a.length;r--&&(o=a[r],!w.relative[s=o.type]);)if((l=w.find[s])&&(i=l(o.matches[0].replace(ge,ve),me.test(a[0].type)&&c(t.parentNode)||t))){if(a.splice(r,1),!(e=i.length&&p(a)))return Y.apply(n,i),n;break}}return(u||C(e,h))(i,t,!N,n,!t||me.test(e)&&c(t.parentNode)||t),n},b.sortStable=$.split("").sort(G).join("")===$,b.detectDuplicates=!!P,T(),b.sortDetached=r(function(e){return 1&e.compareDocumentPosition(M.createElement("fieldset"))}),r(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||a("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),b.attributes&&r(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||a("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),r(function(e){return null==e.getAttribute("disabled")})||a(Z,function(e,t,n){var i;if(!n)return!0===e[t]?t.toLowerCase():(i=e.getAttributeNode(t))&&i.specified?i.value:null}),t}(window);se.find=ce,se.expr=ce.selectors,se.expr[":"]=se.expr.pseudos,se.uniqueSort=se.unique=ce.uniqueSort,se.text=ce.getText,se.isXMLDoc=ce.isXML,se.contains=ce.contains,se.escapeSelector=ce.escape;var ue=function(e,t,n){for(var i=[],r=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(r&&se(e).is(n))break;i.push(e)}return i},pe=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},he=se.expr.match.needsContext,fe=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;se.filter=function(e,t,n){var i=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?se.find.matchesSelector(i,e)?[i]:[]:se.find.matches(e,se.grep(t,function(e){return 1===e.nodeType}))},se.fn.extend({find:function(e){var t,n,i=this.length,r=this;if("string"!=typeof e)return this.pushStack(se(e).filter(function(){for(t=0;t1?se.uniqueSort(n):n},filter:function(e){return this.pushStack(a(this,e||[],!1))},not:function(e){return this.pushStack(a(this,e||[],!0))},is:function(e){return!!a(this,"string"==typeof e&&he.test(e)?se(e):e||[],!1).length}});var de,ye=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(se.fn.Init=function(e,t,n){var i,r;if(!e)return this;if(n=n||de,"string"==typeof e){if(!(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:ye.exec(e))||!i[1]&&t)return!t||t.slimJQ?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof se?t[0]:t,se.merge(this,se.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:V,!0)),fe.test(i[1])&&se.isPlainObject(t))for(i in t)re(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return r=V.getElementById(i[2]),r&&(this[0]=r,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):re(e)?void 0!==n.ready?n.ready(e):e(se):se.makeArray(e,this)}).prototype=se.fn,de=se(V);var me=/^(?:parents|prev(?:Until|All))/,ge={children:!0,contents:!0,next:!0,prev:!0};se.fn.extend({has:function(e){var t=se(e,this),n=t.length;return this.filter(function(){for(var e=0;e-1:1===n.nodeType&&se.find.matchesSelector(n,e))){a.push(n);break}return this.pushStack(a.length>1?se.uniqueSort(a):a)},index:function(e){return e?"string"==typeof e?J.call(se(e),this[0]):J.call(this,e.slimJQ?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(se.uniqueSort(se.merge(this.get(),se(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),se.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return ue(e,"parentNode")},parentsUntil:function(e,t,n){return ue(e,"parentNode",n)},next:function(e){return o(e,"nextSibling")},prev:function(e){return o(e,"previousSibling")},nextAll:function(e){return ue(e,"nextSibling")},prevAll:function(e){return ue(e,"previousSibling")},nextUntil:function(e,t,n){return ue(e,"nextSibling",n)},prevUntil:function(e,t,n){return ue(e,"previousSibling",n)},siblings:function(e){return pe((e.parentNode||{}).firstChild,e)},children:function(e){return pe(e.firstChild)},contents:function(e){return r(e,"iframe")?e.contentDocument:(r(e,"template")&&(e=e.content||e),se.merge([],e.childNodes))}},function(e,t){se.fn[e]=function(n,i){var r=se.map(this,t,n);return"Until"!==e.slice(-5)&&(i=n),i&&"string"==typeof i&&(r=se.filter(i,r)),this.length>1&&(ge[e]||se.uniqueSort(r),me.test(e)&&r.reverse()),this.pushStack(r)}});var ve=/[^\x20\t\r\n\f]+/g;se.Callbacks=function(e){e="string"==typeof e?s(e):se.extend({},e);var n,i,r,a,o=[],l=[],c=-1,u=function(){for(a=a||e.once,r=n=!0;l.length;c=-1)for(i=l.shift();++c-1;)o.splice(n,1),n<=c&&c--}),this},has:function(e){return e?se.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return a=l=[],o=i="",this},disabled:function(){return!o},lock:function(){return a=l=[],i||n||(o=i=""),this},locked:function(){return!!a},fireWith:function(e,t){return a||(t=t||[],t=[e,t.slice?t.slice():t],l.push(t),n||u()),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!r}};return p},se.extend({Deferred:function(e){var t=[["notify","progress",se.Callbacks("memory"),se.Callbacks("memory"),2],["resolve","done",se.Callbacks("once memory"),se.Callbacks("once memory"),0,"resolved"],["reject","fail",se.Callbacks("once memory"),se.Callbacks("once memory"),1,"rejected"]],n="pending",r={state:function(){return n},always:function(){return a.done(arguments).fail(arguments),this},catch:function(e){return r.then(null,e)},pipe:function(){var e=arguments;return se.Deferred(function(n){se.each(t,function(t,i){var r=re(e[i[4]])&&e[i[4]];a[i[1]](function(){var e=r&&r.apply(this,arguments);e&&re(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[i[0]+"With"](this,r?[e]:arguments)})}),e=null}).promise()},then:function(e,n,r){function a(e,t,n,r){return function(){var s=this,u=arguments,p=function(){var p,h;if(!(e=o&&(n!==c&&(s=void 0,u=[i]),t.rejectWith(s,u))}};e?h():(se.Deferred.getStackHook&&(h.stackTrace=se.Deferred.getStackHook()),window.setTimeout(h))}}var o=0;return se.Deferred(function(i){t[0][3].add(a(0,i,re(r)?r:l,i.notifyWith)),t[1][3].add(a(0,i,re(e)?e:l)),t[2][3].add(a(0,i,re(n)?n:c))}).promise()},promise:function(e){return null!=e?se.extend(e,r):r}},a={};return se.each(t,function(e,i){var o=i[2],s=i[5];r[i[1]]=o.add,s&&o.add(function(){n=s},t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),o.add(i[3].fire),a[i[0]]=function(){return a[i[0]+"With"](this===a?void 0:this,arguments),this},a[i[0]+"With"]=o.fireWith}),r.promise(a),e&&e.call(a,a),a},when:function(e){var t=arguments.length,n=t,i=Array(n),r=X.call(arguments),a=se.Deferred(),o=function(e){return function(n){i[e]=this,r[e]=arguments.length>1?X.call(arguments):n,--t||a.resolveWith(i,r)}};if(t<=1&&(u(e,a.done(o(n)).resolve,a.reject,!t),"pending"===a.state()||re(r[n]&&r[n].then)))return a.then();for(;n--;)u(r[n],o(n),a.reject);return a.promise()}});var xe=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;se.Deferred.exceptionHook=function(e,t){window.console&&window.console.warn&&e&&xe.test(e.name)&&window.console.warn("SlimJQ.Deferred exception: "+e.message,e.stack,t)},se.readyException=function(e){window.setTimeout(function(){throw e})};var be=se.Deferred();se.fn.ready=function(e){return be.then(e).catch(function(e){se.readyException(e)}),this},se.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--se.readyWait:se.isReady)||(se.isReady=!0,!0!==e&&--se.readyWait>0||be.resolveWith(V,[se]))}}),se.ready.then=be.then,"complete"===V.readyState||"loading"!==V.readyState&&!V.documentElement.doScroll?window.setTimeout(se.ready):(V.addEventListener("DOMContentLoaded",p),window.addEventListener("load",p));var we=function e(n,i,r,a,o,s,l){var c=0,u=n.length,p=null==r;if("object"===t(r)){o=!0;for(c in r)e(n,i,c,r[c],!0,s,l)}else if(void 0!==a&&(o=!0,re(a)||(l=!0),p&&(l?(i.call(n,a),i=null):(p=i,i=function(e,t,n){return p.call(se(e),n)})),i))for(;c1,null,!0)},removeData:function(e){return this.each(function(){Ae.remove(this,e)})}}),se.extend({queue:function(e,t,n){var i;if(e)return t=(t||"fx")+"queue",i=Ce.get(e,t),n&&(!i||Array.isArray(n)?i=Ce.access(e,t,se.makeArray(n)):i.push(n)),i||[]},dequeue:function(e,t){t=t||"fx";var n=se.queue(e,t),i=n.length,r=n.shift(),a=se._queueHooks(e,t),o=function(){se.dequeue(e,t)};"inprogress"===r&&(r=n.shift(),i--),r&&("fx"===t&&n.unshift("inprogress"),delete a.stop,r.call(e,o,a)),!i&&a&&a.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Ce.get(e,n)||Ce.access(e,n,{empty:se.Callbacks("once memory").add(function(){Ce.remove(e,[t+"queue",n])})})}}),se.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length\x20\t\r\n\f]+)/i,Le=/^$|^module$|\/(?:java|ecma)script/i,$e={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};$e.optgroup=$e.option,$e.tbody=$e.tfoot=$e.colgroup=$e.caption=$e.thead,$e.th=$e.td;var _e=/<|&#?\w+;/;!function(){var e=V.createDocumentFragment(),t=e.appendChild(V.createElement("div")),n=V.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),ie.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="",ie.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var Fe=V.documentElement,qe=/^key/,ze=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,We=/^([^.]*)(?:\.(.+)|)/;se.event={global:{},add:function(e,t,n,i,r){var a,o,s,l,c,u,p,h,f,d,y,m=Ce.get(e);if(m)for(n.handler&&(a=n,n=a.handler,r=a.selector),r&&se.find.matchesSelector(Fe,r),n.guid||(n.guid=se.guid++),(l=m.events)||(l=m.events={}),(o=m.handle)||(o=m.handle=function(t){return void 0!==se&&se.event.triggered!==t.type?se.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(ve)||[""],c=t.length;c--;)s=We.exec(t[c])||[],f=y=s[1],d=(s[2]||"").split(".").sort(),f&&(p=se.event.special[f]||{},f=(r?p.delegateType:p.bindType)||f,p=se.event.special[f]||{},u=se.extend({type:f,origType:y,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&se.expr.match.needsContext.test(r),namespace:d.join(".")},a),(h=l[f])||(h=l[f]=[],h.delegateCount=0,p.setup&&!1!==p.setup.call(e,i,d,o)||e.addEventListener&&e.addEventListener(f,o)),p.add&&(p.add.call(e,u),u.handler.guid||(u.handler.guid=n.guid)),r?h.splice(h.delegateCount++,0,u):h.push(u),se.event.global[f]=!0)},remove:function(e,t,n,i,r){var a,o,s,l,c,u,p,h,f,d,y,m=Ce.hasData(e)&&Ce.get(e);if(m&&(l=m.events)){for(t=(t||"").match(ve)||[""],c=t.length;c--;)if(s=We.exec(t[c])||[],f=y=s[1],d=(s[2]||"").split(".").sort(),f){for(p=se.event.special[f]||{},f=(i?p.delegateType:p.bindType)||f,h=l[f]||[],s=s[2]&&new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"),o=a=h.length;a--;)u=h[a],!r&&y!==u.origType||n&&n.guid!==u.guid||s&&!s.test(u.namespace)||i&&i!==u.selector&&("**"!==i||!u.selector)||(h.splice(a,1),u.selector&&h.delegateCount--,p.remove&&p.remove.call(e,u));o&&!h.length&&(p.teardown&&!1!==p.teardown.call(e,d,m.handle)||se.removeEvent(e,f,m.handle),delete l[f])}else for(f in l)se.event.remove(e,f+t[c],n,i,!0);se.isEmptyObject(l)&&Ce.remove(e,"handle events")}},dispatch:function(e){var t,n,i,r,a,o,s=se.event.fix(e),l=new Array(arguments.length),c=(Ce.get(this,"events")||{})[s.type]||[],u=se.event.special[s.type]||{};for(l[0]=s,t=1;t=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==e.type||!0!==c.disabled)){for(a=[],o={},n=0;n-1:se.find(r,this,null,[c]).length),o[r]&&a.push(i);a.length&&s.push({elem:c,handlers:a})}return c=this,l\x20\t\r\n\f]*)[^>]*)\/>/gi,Ge=/\s*$/g;se.extend({htmlPrefilter:function(e){return e.replace(He,"<$1>")},clone:function(e,t,n){var i,r,a,o,s=e.cloneNode(!0),l=se.contains(e.ownerDocument,e);if(!(ie.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||se.isXMLDoc(e)))for(o=b(s),a=b(e),i=0,r=a.length;i0&&w(o,!l&&b(e,"script")),s},cleanData:function(e){for(var t,n,i,r=se.event.special,a=0;void 0!==(n=e[a]);a++)if(ke(n)){if(t=n[Ce.expando]){if(t.events)for(i in t.events)r[i]?se.event.remove(n,i):se.removeEvent(n,i,t.handle);n[Ce.expando]=void 0}n[Ae.expando]&&(n[Ae.expando]=void 0)}}}),se.fn.extend({detach:function(e){return N(this,e,!0)},remove:function(e){return N(this,e)},text:function(e){return we(this,function(e){return void 0===e?se.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return j(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){O(this,e).appendChild(e)}})},prepend:function(){return j(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=O(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return j(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return j(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(se.cleanData(b(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return se.clone(this,e,t)})},html:function(e){return we(this,function(e){var t=this[0]||{},n=0,i=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ge.test(e)&&!$e[(Ie.exec(e)||["",""])[1].toLowerCase()]){e=se.htmlPrefilter(e);try{for(;n1)}}),se.fn.delay=function(e,t){return e=se.fx?se.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var i=window.setTimeout(t,e);n.stop=function(){window.clearTimeout(i)}})},function(){var e=V.createElement("input"),t=V.createElement("select"),n=t.appendChild(V.createElement("option"));e.type="checkbox",ie.checkOn=""!==e.value,ie.optSelected=n.selected,e=V.createElement("input"),e.value="t",e.type="radio",ie.radioValue="t"===e.value}();var it,rt=se.expr.attrHandle;se.fn.extend({attr:function(e,t){return we(this,se.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){se.removeAttr(this,e)})}}),se.extend({attr:function(e,t,n){var i,r,a=e.nodeType;if(3!==a&&8!==a&&2!==a)return void 0===e.getAttribute?se.prop(e,t,n):(1===a&&se.isXMLDoc(e)||(r=se.attrHooks[t.toLowerCase()]||(se.expr.match.bool.test(t)?it:void 0)),void 0!==n?null===n?void se.removeAttr(e,t):r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:(e.setAttribute(t,n+""),n):r&&"get"in r&&null!==(i=r.get(e,t))?i:(i=se.find.attr(e,t),null==i?void 0:i))},attrHooks:{type:{set:function(e,t){if(!ie.radioValue&&"radio"===t&&r(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,i=0,r=t&&t.match(ve);if(r&&1===e.nodeType)for(;n=r[i++];)e.removeAttribute(n)}}),it={set:function(e,t,n){return!1===t?se.removeAttr(e,n):e.setAttribute(n,n),n}},se.each(se.expr.match.bool.source.match(/\w+/g),function(e,t){var n=rt[t]||se.find.attr;rt[t]=function(e,t,i){var r,a,o=t.toLowerCase();return i||(a=rt[o],rt[o]=r,r=null!=n(e,t,i)?o:null,rt[o]=a),r}});var at=/^(?:input|select|textarea|button)$/i,ot=/^(?:a|area)$/i;se.fn.extend({prop:function(e,t){return we(this,se.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[se.propFix[e]||e]})}}),se.extend({prop:function(e,t,n){var i,r,a=e.nodeType;if(3!==a&&8!==a&&2!==a)return 1===a&&se.isXMLDoc(e)||(t=se.propFix[t]||t,r=se.propHooks[t]),void 0!==n?r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:e[t]=n:r&&"get"in r&&null!==(i=r.get(e,t))?i:e[t]},propHooks:{tabIndex:{get:function(e){var t=se.find.attr(e,"tabindex");return t?parseInt(t,10):at.test(e.nodeName)||ot.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),ie.optSelected||(se.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),se.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){se.propFix[this.toLowerCase()]=this}),se.fn.extend({addClass:function(e){var t,n,i,r,a,o,s,l=0;if(re(e))return this.each(function(t){se(this).addClass(e.call(this,t,z(this)))});if(t=W(e),t.length)for(;n=this[l++];)if(r=z(n),i=1===n.nodeType&&" "+q(r)+" "){for(o=0;a=t[o++];)i.indexOf(" "+a+" ")<0&&(i+=a+" ");s=q(i),r!==s&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,i,r,a,o,s,l=0;if(re(e))return this.each(function(t){se(this).removeClass(e.call(this,t,z(this)))});if(!arguments.length)return this.attr("class","");if(t=W(e),t.length)for(;n=this[l++];)if(r=z(n),i=1===n.nodeType&&" "+q(r)+" "){for(o=0;a=t[o++];)for(;i.indexOf(" "+a+" ")>-1;)i=i.replace(" "+a+" "," ");s=q(i),r!==s&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=void 0===e?"undefined":i(e),r="string"===n||Array.isArray(e);return"boolean"==typeof t&&r?t?this.addClass(e):this.removeClass(e):re(e)?this.each(function(n){se(this).toggleClass(e.call(this,n,z(this),t),t)}):this.each(function(){var t,i,a,o;if(r)for(i=0,a=se(this),o=W(e);t=o[i++];)a.hasClass(t)?a.removeClass(t):a.addClass(t);else void 0!==e&&"boolean"!==n||(t=z(this),t&&Ce.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":Ce.get(this,"__className__")||""))})},hasClass:function(e){var t,n,i=0;for(t=" "+e+" ";n=this[i++];)if(1===n.nodeType&&(" "+q(z(n))+" ").indexOf(t)>-1)return!0;return!1}});var st=/\r/g;se.fn.extend({val:function(e){var t,n,i,r=this[0];return arguments.length?(i=re(e),this.each(function(n){var r;1===this.nodeType&&(r=i?e.call(this,n,se(this).val()):e,null==r?r="":"number"==typeof r?r+="":Array.isArray(r)&&(r=se.map(r,function(e){return null==e?"":e+""})),(t=se.valHooks[this.type]||se.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,r,"value")||(this.value=r))})):r?(t=se.valHooks[r.type]||se.valHooks[r.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(r,"value"))?n:(n=r.value,"string"==typeof n?n.replace(st,""):null==n?"":n):void 0}}),se.extend({valHooks:{option:{get:function(e){var t=se.find.attr(e,"value");return null!=t?t:q(se.text(e))}},select:{get:function(e){var t,n,i,a=e.options,o=e.selectedIndex,s="select-one"===e.type,l=s?null:[],c=s?o+1:a.length;for(i=o<0?c:s?o:0;i-1)&&(n=!0);return n||(e.selectedIndex=-1),a}}}}),se.each(["radio","checkbox"],function(){se.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=se.inArray(se(e).val(),t)>-1}},ie.checkOn||(se.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),ie.focusin="onfocusin"in window;var lt=/^(?:focusinfocus|focusoutblur)$/,ct=function(e){e.stopPropagation()};se.extend(se.event,{trigger:function(e,t,n,r){var a,o,s,l,c,u,p,h,f=[n||V],d=ee.call(e,"type")?e.type:e,y=ee.call(e,"namespace")?e.namespace.split("."):[];if(o=h=s=n=n||V,3!==n.nodeType&&8!==n.nodeType&&!lt.test(d+se.event.triggered)&&(d.indexOf(".")>-1&&(y=d.split("."),d=y.shift(),y.sort()),c=d.indexOf(":")<0&&"on"+d,e=e[se.expando]?e:new se.Event(d,"object"===(void 0===e?"undefined":i(e))&&e),e.isTrigger=r?2:3,e.namespace=y.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+y.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:se.makeArray(t,[e]),p=se.event.special[d]||{},r||!p.trigger||!1!==p.trigger.apply(n,t))){if(!r&&!p.noBubble&&!ae(n)){for(l=p.delegateType||d,lt.test(l+d)||(o=o.parentNode);o;o=o.parentNode)f.push(o),s=o;s===(n.ownerDocument||V)&&f.push(s.defaultView||s.parentWindow||window)}for(a=0;(o=f[a++])&&!e.isPropagationStopped();)h=o,e.type=a>1?l:p.bindType||d,u=(Ce.get(o,"events")||{})[e.type]&&Ce.get(o,"handle"),u&&u.apply(o,t),(u=c&&o[c])&&u.apply&&ke(o)&&(e.result=u.apply(o,t),!1===e.result&&e.preventDefault());return e.type=d,r||e.isDefaultPrevented()||p._default&&!1!==p._default.apply(f.pop(),t)||!ke(n)||c&&re(n[d])&&!ae(n)&&(s=n[c],s&&(n[c]=null),se.event.triggered=d,e.isPropagationStopped()&&h.addEventListener(d,ct),n[d](),e.isPropagationStopped()&&h.removeEventListener(d,ct),se.event.triggered=void 0,s&&(n[c]=s)),e.result}},simulate:function(e,t,n){var i=se.extend(new se.Event,n,{type:e,isSimulated:!0});se.event.trigger(i,null,t)}}),se.fn.extend({trigger:function(e,t){return this.each(function(){se.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return se.event.trigger(e,t,n,!0)}}),ie.focusin||se.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){se.event.simulate(t,e.target,se.event.fix(e))};se.event.special[t]={setup:function(){var i=this.ownerDocument||this,r=Ce.access(i,t);r||i.addEventListener(e,n,!0),Ce.access(i,t,(r||0)+1)},teardown:function(){var i=this.ownerDocument||this,r=Ce.access(i,t)-1;r?Ce.access(i,t,r):(i.removeEventListener(e,n,!0),Ce.remove(i,t))}}});var ut=/\[\]$/,pt=/\r?\n/g,ht=/^(?:submit|button|image|reset|file)$/i,ft=/^(?:input|select|textarea|keygen)/i;return se.param=function(e,t){var n,i=[],r=function(e,t){var n=re(t)?t():t;i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(e)||e.slimJQ&&!se.isPlainObject(e))se.each(e,function(){r(this.name,this.value)});else for(n in e)H(n,e[n],t,r);return i.join("&")},se.fn.extend({serialize:function(){return se.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=se.prop(this,"elements");return e?se.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!se(this).is(":disabled")&&ft.test(this.nodeName)&&!ht.test(e)&&(this.checked||!Be.test(e))}).map(function(e,t){var n=se(this).val();return null==n?null:Array.isArray(n)?se.map(n,function(e){return{name:t.name,value:e.replace(pt,"\r\n")}}):{name:t.name,value:n.replace(pt,"\r\n")}}).get()}}),se.fn.extend({wrapAll:function(e){var t;return this[0]&&(re(e)&&(e=e.call(this[0])),t=se(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return re(e)?this.each(function(t){se(this).wrapInner(e.call(this,t))}):this.each(function(){var t=se(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=re(e);return this.each(function(n){se(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){se(this).replaceWith(this.childNodes)}),this}}),se.expr.pseudos.hidden=function(e){return!se.expr.pseudos.visible(e)},se.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},ie.createHTMLDocument=function(){var e=V.implementation.createHTMLDocument("").body;return e.innerHTML="
",2===e.childNodes.length}(),se.parseHTML=function(e,t,n){if("string"!=typeof e)return[];"boolean"==typeof t&&(n=t,t=!1);var i,r,a;return t||(ie.createHTMLDocument?(t=V.implementation.createHTMLDocument(""),i=t.createElement("base"),i.href=V.location.href,t.head.appendChild(i)):t=V),r=fe.exec(e),a=!n&&[],r?[t.createElement(r[1])]:(r=E([e],t,a),a&&a.length&&se(a).remove(),se.merge([],r.childNodes))},se.offset={setOffset:function(e,t,n){var i,r,a,o,s,l,c,u=se.css(e,"position"),p=se(e),h={};"static"===u&&(e.style.position="relative"),s=p.offset(),a=se.css(e,"top"),l=se.css(e,"left"),c=("absolute"===u||"fixed"===u)&&(a+l).indexOf("auto")>-1,c?(i=p.position(),o=i.top,r=i.left):(o=parseFloat(a)||0,r=parseFloat(l)||0),re(t)&&(t=t.call(e,n,se.extend({},s))),null!=t.top&&(h.top=t.top-s.top+o),null!=t.left&&(h.left=t.left-s.left+r),"using"in t?t.using.call(e,h):p.css(h)}},se.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){se.offset.setOffset(this,e,t)});var t,n,i=this[0];return i?i.getClientRects().length?(t=i.getBoundingClientRect(),n=i.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,i=this[0],r={top:0,left:0};if("fixed"===se.css(i,"position"))t=i.getBoundingClientRect();else{for(t=this.offset(),n=i.ownerDocument,e=i.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===se.css(e,"position");)e=e.parentNode;e&&e!==i&&1===e.nodeType&&(r=se(e).offset(),r.top+=se.css(e,"borderTopWidth",!0),r.left+=se.css(e,"borderLeftWidth",!0))}return{top:t.top-r.top-se.css(i,"marginTop",!0),left:t.left-r.left-se.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===se.css(e,"position");)e=e.offsetParent;return e||Fe})}}),se.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;se.fn[e]=function(i){return we(this,function(e,i,r){var a;if(ae(e)?a=e:9===e.nodeType&&(a=e.defaultView),void 0===r)return a?a[t]:e[i];a?a.scrollTo(n?a.pageXOffset:r,n?r:a.pageYOffset):e[i]=r},e,i,arguments.length)}}),se.each(["top","left"],function(e,t){se.cssHooks[t]=B(ie.pixelPosition,function(e,n){if(n)return n=D(e,t),Xe.test(n)?se(e).position()[t]+"px":n})}),se.each({Height:"height",Width:"width"},function(e,t){se.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,i){se.fn[i]=function(r,a){var o=arguments.length&&(n||"boolean"!=typeof r),s=n||(!0===r||!0===a?"margin":"border");return we(this,function(t,n,r){var a;return ae(t)?0===i.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(a=t.documentElement,Math.max(t.body["scroll"+e],a["scroll"+e],t.body["offset"+e],a["offset"+e],a["client"+e])):void 0===r?se.css(t,n,s):se.style(t,n,r,s)},t,o?r:void 0,o)}})}),se.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){se.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),se.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),se.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,i){return this.on(t,e,n,i)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),se.proxy=function(e,t){var n,i,r;if("string"==typeof t&&(n=e[t],t=e,e=n),re(e))return i=X.call(arguments,2),r=function(){return e.apply(t||this,i.concat(X.call(arguments)))},r.guid=e.guid=e.guid||se.guid++,r},se.holdReady=function(e){e?se.readyWait++:se.ready(!0)},se.isArray=Array.isArray,se.parseJSON=JSON.parse,se.nodeName=r,se.isFunction=re,se.isWindow=ae,se.camelCase=f,se.type=t,se.now=Date.now,se.isNumeric=function(e){var t=se.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},se}()},function(e,t,n){"use strict";var i=n(0),r=n(1),a=function(e){var t=Math.PI;return e>=t/4&&e=t/4*3&&e=t/4*5&&ee.y?n=Math.PI-n:t.x=e.x&&t.yt.x2)&&(t.x2=r.x+r.width),(null==t.y2||r.y+r.height>t.y2)&&(t.y2=r.y+r.height)}return{x:t.x1,y:t.y1,width:t.x2-t.x1,height:t.y2-t.y1}},l=function(e,t,n){for(var i=Math.PI/18,r=[],a=0;a<36;a+=1){var o=i*a,s={x:e-Math.cos(o)*n,y:t-Math.sin(o)*n,angle:o};r.push(s)}return r},c=function(e){for(var t=R(e),n=0,i=1;i1&&void 0!==arguments[1]?arguments[1]:60,n=e.split(","),i=parseInt(n[0]),r=parseInt(n[1]),a=parseInt(n[2]),o=Math.round(i+(255-i)/255*t);o>255&&(o=255);var s=Math.round(r+(255-r)/255*t);s>255&&(s=255);var l=Math.round(a+(255-a)/255*t);return l>255&&(l=255),o+","+s+","+l},p=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:13,n=e.split(","),i=parseInt(n[0]),r=parseInt(n[1]),a=parseInt(n[2]),o=Math.round(i-i/255*t);o<0&&(o=0);var s=Math.round(r-r/255*t);s<0&&(s=0);var l=Math.round(a-a/255*t);return l<0&&(l=0),o+","+s+","+l},h=function(e){return p(e,26)},f=function(e){var t=i.a.trigger("element.get"),n=[];for(var r in t){var a=t[r],o=a.plane.bounds;o="SequenceFlow"===a.shape.bpmnName?P(a):L(a),q(o.x,o.y,e)&&q(o.x+o.width,o.y,e)&&q(o.x+o.width,o.y+o.height,e)&&q(o.x,o.y+o.height,e)&&n.push(a.data.id)}return n},d=function(e,t,n){var i=30,r=[],a=n.plane.bounds,o=a.x,s=a.width,l={};return t.x>=o-i&&t.x<=o+s+i?(t.x=o-i&&t.y<=o+s+i?(l.x=e.x+i,t.y=o-i&&t.x<=o+s+i?(t.x=o-i&&t.y<=o+s+i?(l.x=e.x+i,t.y=s.x&&l.x<=u){var h=s.x+s.width/2;t.xp?u+a:p+a,l.ye.x)c.x=e.x+r/2,o.push({x:c.x,y:e.y}),o.push({x:c.x,y:t.y});else{var u=s.y+s.height,p=l.y+l.height;if(c.x=e.x+a,p>=s.y&&l.y<=u){var h=s.y+s.height/2;t.yp?u+a:p+a,l.x+l.width>e.x&&(c.x=l.x+l.width+a)}else t.ye.x&&t.y>e.y)a.push({x:t.x,y:e.y});else if(t.x>e.x&&s.x>e.x)s.x-e.x<60?l.x=e.x+(s.x-e.x)/2:l.x=e.x+r,l.y=t.y-r,a.push({x:l.x,y:e.y}),a.push({x:l.x,y:l.y}),a.push({x:t.x,y:l.y});else if(t.x<=e.x&&t.y>o.y+o.height){var c=o.y+o.height;l.x=e.x+r,t.y-c<60?l.y=c+(t.y-c)/2:l.y=t.y-r,a.push({x:l.x,y:e.y}),a.push({x:l.x,y:l.y}),a.push({x:t.x,y:l.y})}else{var u=s.x+s.width;u>e.x?l.x=u+r:l.x=e.x+r,t.ye.y)a.push({x:t.x,y:e.y});else if(t.x=e.x&&t.y>o.y+o.height){var u=o.y+o.height;l.x=e.x-r,t.y-u<60?l.y=u+(t.y-u)/2:l.y=t.y-r,a.push({x:l.x,y:e.y}),a.push({x:l.x,y:l.y}),a.push({x:t.x,y:l.y})}else s.xe.x&&t.ye.x&&s.x>e.x)s.x-e.x<60?l.x=e.x+(s.x-e.x)/2:l.x=e.x+r,l.y=t.y+r,a.push({x:l.x,y:e.y}),a.push({x:l.x,y:l.y}),a.push({x:t.x,y:l.y});else if(t.x<=e.x&&t.ye.x?l.x=c+r:l.x=e.x+r,t.y>o.y+o.height?l.y=t.y+r:l.y=o.y+o.height+r,a.push({x:l.x,y:e.y}),a.push({x:l.x,y:l.y}),a.push({x:t.x,y:l.y})}return a},S=function(e,t,n,i){var r=30,a=[],o=n.plane.bounds,s=i.plane.bounds,l={},c=s.x+s.width;return t.x=e.x&&t.yo.y+o.height?l.y=t.y+r:l.y=o.y+o.height+r,a.push({x:l.x,y:e.y}),a.push({x:l.x,y:l.y}),a.push({x:t.x,y:l.y})),a},k=function(e,t,n,i){if(null!=n)return{x:e.x-i*Math.cos(e.angle),y:e.y-i*Math.sin(e.angle)};var r=Math.abs(e.y-t.y),a=Math.abs(e.x-t.x),o=Math.atan(r/a),s={};return e.x<=t.x?s.x=e.x+i*Math.cos(o):s.x=e.x-i*Math.cos(o),e.y<=t.y?s.y=e.y+i*Math.sin(o):s.y=e.y-i*Math.sin(o),s},C=function(e,t){var n=e.data,i=n.sourceRef,r=n.targetRef,o=t[i],s=t[r],l=e.plane.waypoint,c=l[0],u=l[l.length-1],p=[];if("broken"===e.linkerType){var h=Math.abs(u.x-c.x),f=Math.abs(u.y-c.y),C=Math.PI,A=30,O=!1,R=void 0,P=void 0,T=void 0,M=void 0,j=void 0;if(null!=i&&null!=r){var N=a(c.angle),D=a(u.angle);1===N&&1===D?(c.yu.y?(R=c,P=u,T=o,M=s,O=!1):(R=u,P=c,T=s,M=o,O=!0),p=m(R,P,T)):2===N&&2===D?(c.y>u.y?(R=c,P=u,T=o,M=s,O=!1):(R=u,P=c,T=s,M=o,O=!0),p=y(R,P,T)):4===N&&4===D?(c.x=C/4&&j=f)p.push({x:R.x,y:P.y});else{var I=f/2;p.push({x:R.x,y:R.y-I}),p.push({x:P.x,y:R.y-I})}else if(p.push({x:R.x,y:R.y-A}),h>=f)if(P.x>=B.x-A&&P.x<=B.x+B.width+A){var L=B.x+B.width/2;P.x=B.x-A&&P.x<=B.x+B.width+A){var $=B.x+B.width/2;P.x<$?(p.push({x:B.x-A,y:R.y-A}),p.push({x:B.x-A,y:P.y-A}),p.push({x:P.x,y:P.y-A})):(p.push({x:B.x+B.width+A,y:R.y-A}),p.push({x:B.x+B.width+A,y:P.y-A}),p.push({x:P.x,y:P.y-A}))}else p.push({x:P.x,y:R.y-A});else if(j>=C/4*3&&jR.x)h>=f?(p.push({x:R.x+h/2,y:R.y}),p.push({x:R.x+h/2,y:P.y})):p.push({x:P.x,y:R.y});else if(p.push({x:R.x+A,y:R.y}),h>=f)if(P.y>=B.y-A&&P.y<=B.y+B.height+A){var F=B.y+B.height/2;P.y=B.y-A&&P.y<=B.y+B.height+A){var q=B.y+B.height/2;P.y=C/4*5&&jR.y)h>=f?p.push({x:R.x,y:P.y}):(p.push({x:R.x,y:R.y+f/2}),p.push({x:P.x,y:R.y+f/2}));else if(p.push({x:R.x,y:R.y+A}),h>=f)if(P.x>=B.x-A&&P.x<=B.x+B.width+A){var z=B.x+B.width/2;P.x=B.x-A&&P.x<=B.x+B.width+A){var W=B.x+B.width/2;P.x=f?(p.push({x:R.x-h/2,y:R.y}),p.push({x:R.x-h/2,y:P.y})):p.push({x:P.x,y:R.y});else if(p.push({x:R.x-A,y:R.y}),h>=f)if(P.y>=B.y-A&&P.y<=B.y+B.height+A){var H=B.y+B.height/2;P.y=B.y-A&&P.y<=B.y+B.height+A){var G=B.y+B.height/2;P.y=f){var V=(u.x-c.x)/2;p.push({x:c.x+V,y:c.y}),p.push({x:c.x+V,y:u.y})}else{var U=(u.y-c.y)/2;p.push({x:c.x,y:c.y+U}),p.push({x:u.x,y:c.y+U})}}else if("curve"===e.linkerType){var X=_(c,u),K=.4*X;p.push(k(c,u,i,K)),p.push(k(u,c,r,K))}return p},A=function(e){var t={},n=e.plane.waypoint,i=n[0],r=n[n.length-1];if("normal"===e.linkerType)t.x=.5*i.x+.5*r.x,t.y=.5*i.y+.5*r.y;else if("curve"===e.linkerType)t.x=.125*i.x+.375*e.points[0].x+.375*e.points[1].x+.125*r.x,t.y=.125*i.y+.375*e.points[0].y+.375*e.points[1].y+.125*r.y;else{var a=[];a.push(i),a=a.concat(e.points),a.push(r);for(var o=0,s=1;sl){var d=(l-c)/f;t.x=(1-d)*p.x+d*h.x,t.y=(1-d)*p.y+d*h.y;break}c=f}}return t},O=function(e,t){var n=e.data,i=(n.sourceRef,n.targetRef,e.plane.waypoint),r=i[0],a=i[i.length-1],s=void 0,l=void 0;if("normal"===e.linkerType)s="source"===t?a:r;else if("broken"===e.linkerType)s="source"===t?e.points[0]:e.points[e.points.length-1];else{var c=_(r,a),u=void 0;u="source"===t?12/c:1-12/c,s={x:(1-u)*(1-u)*(1-u)*r.x+3*(1-u)*(1-u)*u*e.points[0].x+3*(1-u)*u*u*e.points[1].x+u*u*u*a.x,y:(1-u)*(1-u)*(1-u)*r.y+3*(1-u)*(1-u)*u*e.points[0].y+3*(1-u)*u*u*e.points[1].y+u*u*u*a.y}}return l="source"===t?r:a,o(s,l)},R=function(e){var t=e.plane,n=e.shape,i=[];if("curve"!==n.linkerType)i.push(t.waypoint[0]),i=i.concat(n.points);else for(var r=0;r<=1;){var a={x:(1-r)*(1-r)*(1-r)*n.points[0].x+3*(1-r)*(1-r)*r*n.points[1].x+3*(1-r)*r*r*n.points[2].x+r*r*r*n.points[n.points.length-1].x,y:(1-r)*(1-r)*(1-r)*n.points[0].y+3*(1-r)*(1-r)*r*n.points[1].y+3*(1-r)*r*r*n.points[2].y+r*r*r*n.points[n.points.length-1].y};i.push(a),r+=.05}return i.push(t.waypoint[t.waypoint.length-1]),i},P=function(e){for(var t=R(e),n=t[0].x,i=t[0].y,r=t[0].x,a=t[0].y,o=0;or&&(r=s.x),s.ya&&(a=s.y)}return{x:n,y:i,width:r-n,height:a-i}},T=function(e){for(var t=[],n=[],r=i.a.trigger("shape.select.getIds"),a=0;a0)for(var l=0;l=0)&&n.indexOf(c)<0&&(t.push(i.a.trigger("element.get",c)),n.push(c))}}}return t},M=function(){for(var e=i.a.trigger("shape.select.get"),t=[],n=0;nt.x2)&&(t.x2=s.x+s.width),(null==t.y2||s.y+s.height>t.y2)&&(t.y2=s.y+s.height)}return{x:t.x1,y:t.y1,width:t.x2-t.x1,height:t.y2-t.y1}},I=function(e,t,n){var i=_(e,t);if(0===i||0===n)return t;var r=Math.atan(Math.abs(t.x-e.x)/Math.abs(e.y-t.y));t.x>=e.x&&t.y>=e.y?r=Math.PI-r:t.x<=e.x&&t.y>=e.y?r=Math.PI+r:t.x<=e.x&&t.y<=e.y&&(r=2*Math.PI-r),r%=2*Math.PI;var a=(r+n)%(2*Math.PI);return{x:e.x+Math.sin(a)*i,y:e.y-Math.cos(a)*i}},L=function(e){var t=e.plane,n=e.shape;return D(t.bounds,n.shapeStyle.angle)},$=function(e,t,n,a){var o=[],s=i.a.trigger("element.get");for(var l in s){var c=s[l],u=c.data,p=c.plane,h=c.shape,f=n.find('.shape-box[data-id="'+u.id+'"]'),d=f.position(),y=e-d.left,m=t-d.top,g=void 0,v=void 0,x={x:d.left,y:d.top,width:f.width(),height:f.height()},b=f.find(".shape-canvas"),w=b[0].getContext("2d"),E=q(e,t,x);if("SequenceFlow"===h.bpmnName){if(!E)continue;if(a)continue;g=Object(r.k)(10),v={x:e-g,y:t-g,width:2*g,height:2*g};var S=(p.waypoint[0].x,p.waypoint[0].y,{x:p.waypoint[p.waypoint.length-1].x,y:p.waypoint[p.waypoint.length-1].y});if(q(Object(r.k)(S.x),Object(r.k)(S.y),v)){var k={type:"sequence_point",point:"target",element:c};o.push(k);continue}if(q(Object(r.k)(S.x),Object(r.k)(S.y),v)){var C={type:"sequence_point",point:"source",element:c};o.push(C);continue}var A=f.find(".text-box"),O=A.position(),R={x:O.left,y:O.top,width:A.width(),height:A.height()};if(q(y,m,R)){var P={type:"sequence_text",element:c};o.push(P);continue}g=Object(r.k)(7);var T=z({x:Object(r.i)(e),y:Object(r.i)(t)},c,g);if(T>-1){o.push({type:"sequence",element:c,pointIndex:T});continue}}else{if(E&&h.locked&&!a){w.isPointInPath(y,m)&&o.push({type:"shape",element:c});continue}if(g=Object(r.k)(7),E){v={x:e-g,y:t-g,width:2*g,height:2*g},x={x:p.bounds.x+p.bounds.width/2,y:p.bounds.y+p.bounds.height/2};for(var M=h.getAnchors(),N=null,D=0;D1&&a)$=o[0];else if(o.length>1){if("bounds"===o[0].type&&"sequence_point"!==o[0].type&&"sequence"!==o[0].type)return o[0];for(var _=[],F=[],W=[],H=0;H0&&F.length>0)for(var V=0;V0&&(F.sort(function(e,t){return i.a.trigger("shape.select.check",e.element.data.id)&&!i.a.trigger("shape.select.check",t.element.data.id)?-1:!i.a.trigger("shape.select.check",e.element.data.id)&&i.a.trigger("shape.select.check",t.element.data.id)?1:t.element.shape.shapeStyle.zindex-e.element.shape.shapeStyle.zindex}),$=F[0]),null==$&&_.length>0&&(_.sort(function(e,t){return i.a.trigger("shape.select.check",e.element.data.id)&&!i.a.trigger("shape.select.check",t.element.data.id)?-1:!i.a.trigger("shape.select.check",e.element.data.id)&&i.a.trigger("shape.select.check",t.element.data.id)?1:t.element.shape.shapeStyle.zindex-e.element.shape.shapeStyle.zindex}),$=_[0]),null==$&&($=o[0])}return $},_=function(e,t){var n=t.y-e.y,i=t.x-e.x;return Math.sqrt(Math.pow(n,2)+Math.pow(i,2))},F=function(e,t){e.setLineDash||(e.setLineDash=function(){}),e.setLineDash(t),e.mozDash=t,e.webkitLineDash=t},q=function(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height},z=function(e,t,n){for(var i=R(t),r={x:e.x-n,y:e.y},a={x:e.x+n,y:e.y},o={x:e.x,y:e.y-n},s={x:e.x,y:e.y+n},l=1;l=0&&o<=1&&s>=0&&s<=1&&(r=!0)}return r};t.a={getAngle:o,getAngleDir:a,getBounding:s,getConnectionLength:c,getConnectionMidpoint:A,getConnectionPoints:C,getEndpointAngle:O,getElementsBox:B,getElementIdsByRange:f,getConnectionBox:P,getLighterColor:u,getDarkerColor:p,getDarkestColor:h,getOutConnections:T,getPointAngle:j,getRelativePos:N,getRotated:I,getRotatedBox:D,getSelectedConnectionIds:M,getShapeByPosition:$,getShapeBox:L,measureDistance:_,setLineDash:F}},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=n(6),s=function(e){function t(){i(this,t);var e=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.children=[],e.parent="",e.resizeDir=["tl","tr","br","bl"],e.attribute={container:!1,visible:!0,rotatable:!1,linkable:!0,editable:!0,markerOffset:5},e.lineStyle={lineWidth:2,lineColor:"50,50,50",lineStyle:"solid"},e.fillStyle={type:"solid",color:"255,255,255"},e.lightStyle={},e.actions=null,e}return a(t,e),t}(o.a);t.a=s},function(e,t,n){"use strict";n.d(t,"a",function(){return a}),n.d(t,"b",function(){return o}),n.d(t,"c",function(){return s}),n.d(t,"e",function(){return l}),n.d(t,"f",function(){return c}),n.d(t,"d",function(){return u}),n.d(t,"i",function(){return h}),n.d(t,"h",function(){return f}),n.d(t,"g",function(){return d});var i={String:!0,Boolean:!0,Integer:!0,Real:!0,Element:!0},r={String:function(e){return e},Boolean:function(e){return"true"===e},Integer:function(e){return parseInt(e,10)},Real:function(e){return parseFloat(e,10)}},a={xsi:"http://www.w3.org/2001/XMLSchema-instance"},o="xsi:type",s=function(e,t){var n=r[e];return n?n(t):t},l=function(e){return!!i[e]},c=function(e){return!!r[e]},u=function(e){return e.xml&&"lowerCase"===e.xml.tagAlias},p=function(e){return e.xml&&e.xml.serialize},h=function(e){return p(e)===o},f=function(e){return"property"===p(e)},d=function(e,t){var n,i,r=e.split(/:/);if(1===r.length)n=e,i=t;else{if(2!==r.length)throw new Error("expected or , got "+e);n=r[1],i=r[0]}return e=(i?i+":":"")+n,{name:e,prefix:i,localName:n}}},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=function(){function e(e,t){for(var n=0;no&&(s={x:0,y:o/2},l={x:a,y:o/2},c=(h.angle+Math.PI/2)%(2*Math.PI)),0!==c){var u={x:a/2,y:o/2};s=i.a.getRotated(u,s,c),l=i.a.getRotated(u,l,c),s.x<0&&(s.x=0),s.x>a&&(s.x=a),s.y<0&&(s.y=0),s.y>o&&(s.y=o),l.x<0&&(l.x=0),l.x>a&&(l.x=a),l.y<0&&(l.y=0),l.y>o&&(l.y=o)}var p=e.createLinearGradient(s.x,s.y,l.x,l.y);return p.addColorStop(0,"rgb("+n.beginColor+")"),p.addColorStop(1,"rgb("+n.endColor+")"),p},createRadialGradient:function(e,t,n){var i=t.bpmnPlane.bounds,r=i.width,a=i.height,o=r");return new n(t)}},{key:"getType",value:function(e){var t=this.typeCache,n="string"==typeof e&&e.constructor===String?e:e.ns.name,i=t[n];return i||(e=this.registry.getEffectiveDescriptor(n),i=t[n]=this.factory.createType(e)),i}},{key:"createAny",value:function(e,t,n){var i=Object(l.g)(e),r={$type:e,$instanceOf:function(e){return e===this.$type}},o={name:e,isGeneric:!0,ns:{prefix:i.prefix,localName:i.localName,uri:t}};this.properties.defineDescriptor(r,o),this.properties.defineModel(r,this),this.properties.define(r,"$parent",{enumerable:!1,writable:!0});for(var s in n){var u=n[s];"object"===(void 0===u?"undefined":c(u))&&u.constructor===Object&&void 0!==u.value?r[u.name]=a.value:r[s]=u}return r}},{key:"getPackage",value:function(e){return this.registry.getPackage(e)}},{key:"getPackages",value:function(){return this.registry.getPackages()}},{key:"getElementDescriptor",value:function(e){return e.$descriptor}},{key:"hasType",value:function(e,t){return void 0===t&&(t=e,e=this),t in e.$model.getElementDescriptor(e).allTypesByName}},{key:"getPropertyDescriptor",value:function(e,t){return this.getElementDescriptor(e).propertiesByName[t]}},{key:"getTypeDescriptor",value:function(e){return this.registry.typeMap[e]}}]),e}();t.a=p},function(e,t,n){"use strict";function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t',extensions:{},filter:[],bpmns:["StartEvent","UserTask","ServiceTask","ReceiveTask","CallActivity","ExclusiveGateway","InclusiveGateway","ParallelGateway","ComplexGateway","EndEvent","TerminateEndEvent"]},C=!1,A=function(e){var t=Object(l.a)(e.container);if(!e.container||t.length<=0)throw new Error("Can not find container: "+e.container);var n=Object(l.a)('
');return n.css({width:e.width,height:e.height}),n.find(".bpd-layout").css({top:-e.pageStyle.height/2,left:-e.pageStyle.width/2}),t.append(n),n},O=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r(this,e),this.version="0.1.4",this.options=Object.assign({},k,t),this.$container=A(this.options),this.features={HotKey:new w.a,I18n:new E.a(this.options.local),BpmnXML:new p.a(this.options.extensions),Background:new h.a(this.$container,this.options,this.options.config.background),Hand:new x.a(this.$container,this.options.pageStyle)},this.options.readonly||(this.features.Anchor=new d.a(this.$container,this.options.config.anchor),this.features.Snapline=new g.a(this.$container,this.options.config.snapline),this.features.Direction=new f.a(this.$container,this.options.config.direction),this.features.Select=new y.a(this.$container,this.options.config.select),this.features.Tooltip=new v.a(this.$container,this.options.config.tooltip),this.features.Drag=new m.a(this.options,this.$container),this.features.GroupPanel=new b.a(this.$container,this.options)),this.draw=Object(s.a)(this.options,this.$container),Object(u.g)("bpmn",function(){C=!0}),this.init()}return S(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){};this.importBpmn(this.options.definition,e)}},{key:"createShape",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=Object(l.a)(e.target);if(!n.hasClass("readonly")&&!this.options.readonly){var i=n.attr("shapeName");if(!i||""===i)throw new Error("shapeName error");this.draw.createShape(i,t)}}},{key:"getAllElement",value:function(){var e=[],t=o.a.trigger("element.get");for(var n in t){var i=Object(u.j)(t[n]);e.push(i)}return e}},{key:"getRootElement",value:function(){var e=o.a.trigger("process.get");return e?Object(u.j)(e):null}},{key:"getFrontElementsByBpmn",value:function(e,t){return this.getFrontElements(o.a.trigger("element.get",e.id)).filter(function(e){return e.bpmnName===t})}},{key:"getFrontElement",value:function(e){if(!e)throw new Error("select element error");var t=null;return this.getFrontElements(o.a.trigger("element.get",e.id)).forEach(function(e){t||"SequenceFlow"===e.bpmnName||(t=e)}),t}},{key:"getFrontElements",value:function(e){if(!e)throw new Error("select element error");for(var t=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=[];return i?n:(t.forEach(function(e){if("SequenceFlow"===e.shape.bpmnName){if(e.data.sourceRef&&""!==e.sourceRef){var t=o.a.trigger("element.get",e.data.sourceRef)||[],i=!1;n.forEach(function(e){e.data.id===t.data.id&&(i=!0)}),i||(r.push(t),n.push(t))}}else{(o.a.trigger("connections.get",e.data.id)||[]).forEach(function(t){var i=o.a.trigger("element.get",t);if(i.data.targetRef===e.data.id){var a=!1;n.forEach(function(e){e.data.id===i.data.id&&(a=!0)}),a||(r.push(i),n.push(i))}})}}),r.length<=0?e(r,n,!0):e(r,n))}([e]),n=0;n2&&void 0!==arguments[2]?arguments[2]:function(){};t.extensions.forEach(function(e){e.$type=e.name,delete e.name});var r=o.a.trigger("element.get",e);if(r){var a=Object.assign({},t.original);for(var s in a)r.data[s]=a[s];var l=r.data.extensionElements,c=[];l.values||(l.values=[]),l.values.forEach(function(e){var n=!1;t.extensions.forEach(function(t){t.$type===e.$type&&(n=!0)}),n||c.push(e)}),l.values=[].concat(c,i(t.extensions)),"SequenceFlow"===r.shape.bpmnName||o.a.trigger("shape.render",{type:r.shape.bpmnName,element:r}),n()}}},{key:"updateProcessProperties",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};e.extensions.forEach(function(e){e.$type=e.name,delete e.name});var n=o.a.trigger("process.get");if(n){var r=Object.assign({},e.original);for(var a in r)n[a]=r[a];var s=[];n.extensionElements.values||(n.extensionElements.values=[]),n.extensionElements.values.forEach(function(t){var n=!1;e.extensions.forEach(function(e){e.$type===t.$type&&(n=!0)}),n||s.push(t)}),n.extensionElements.values=[].concat(s,i(e.extensions)),t()}}},{key:"updataLineStyle",value:function(e,t){this.draw.updataLineStyle(e,t)}},{key:"destroy",value:function(){this.$container.remove(),this.draw.cancel(),o.a.trigger("key.clear"),o.a.destroy()}},{key:"activateHand",value:function(){o.a.trigger("hand.activate"),this.draw.resetState()}},{key:"activateSelect",value:function(){o.a.trigger("hand.destroy"),o.a.trigger("shape.multiSelect",{state:this.draw.state}),this.draw.changeState("multiSelect")}},{key:"importBpmn",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=this,i=setInterval(function(){C&&(clearInterval(i),o.a.trigger("model.import",e,function(e,i){e?console.log(e):(n.draw.render(i),t())}))},1e3)}},{key:"exportBpmn",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){},t=this.draw.designer.createDefinition();o.a.trigger("model.export",t,function(t,n){t&&console.log(t,n),e(n)})}}]),e}();t.default=O,window.BPDCore=O},function(e,t){},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=n(0),s=n(12),l=n(13),c=n(14),u=n(26),p=n(3),h=n(1),f=(n(2),function(){function e(e,t){for(var n=0;n0&&a.forEach(function(t,n){if(t.id===e.id+"_di"){var i=Object(h.c)(e);e.extensionElements&&(i.extensionElements.values=e.extensionElements.values||[]);"SequenceFlow"!==Object(h.e)(e.$type)?(i.incoming=e.incoming?e.incoming.id:"",i.outgoing=e.outgoing?e.outgoing.id:""):(i.sourceRef=e.sourceRef?e.sourceRef.id:"",i.targetRef=e.targetRef?e.targetRef.id:""),r[e.id]={data:i,plane:Object(h.c)(t)}}})})}):this.designer.setProcessModel(),this.renderPage();var a=0;for(var o in r){var s=r[o],l=Object(h.e)(s.data.$type);"SequenceFlow"!==l&&(this.renderShape({type:l,element:s}),this.designer.addData(s,!1)),a++}for(var c in r){var u=r[c];"SequenceFlow"===Object(h.e)(u.data.$type)&&(this.renderConnection({element:u}),this.designer.addData(u,!1))}0===a&&this.designer.build();var f=this.$container,d=this.options,y=d.pageStyle,m=y.width,g=y.height,v=f.find(".bpd-layout"),x=v.offset(),b={x:Object(h.i)(0),y:Object(h.i)(0),width:Object(h.i)(m),height:Object(h.i)(g)},w=p.a.getElementIdsByRange(b),E=p.a.getElementsBox(w),S=x.top;E.y<-g/2?S=E.y:E.y>0&&(S=0);var k=x.left;E.x<-m/2?k=E.x:E.x>0&&(k=0),v.offset({top:S,left:k})}},{key:"renderPage",value:function(){var e=this.options.pageStyle,t=e.width,n=e.height,i=e.backgroundColor,r=p.a.getDarkerColor(i);p.a.getDarkestColor(i);this.$container.find(".bpd-designer").css({"background-color":"rgb("+r+")"}),this.$container.find(".bpd-layout").css({width:t,height:n})}},{key:"renderShape",value:function(e){var t=e.type,n=e.element;this.drawShape.render(t,n)}},{key:"renderShapePath",value:function(e){var t=e.shape2D,n=e.element,i=e.render;this.drawShape.renderShapePath(t,n,i)}},{key:"renderConnection",value:function(e){var t=e.element,n=e.rendered;this.drawConnection.render(t,n)}},{key:"moveConnection",value:function(e){var t=e.element,n=e.type,i=e.x,r=e.y;this.drawConnection.move(t,n,i,r)}},{key:"updataLineStyle",value:function(e,t){if(e){var n=o.a.trigger("element.get",e);"SequenceFlow"===n.shape.bpmnName||(n.shape.lightStyle={lineStyle:t},console.log(n),this.drawShape.renderShape(n))}else{var i=o.a.trigger("element.get");for(var r in i){var a=i[r];"SequenceFlow"===a.shape.bpmnName||(a.shape.lightStyle={},this.drawShape.renderShape(a))}}}},{key:"removeShape",value:function(e,t){var n=this;e||(e=o.a.trigger("shape.select.get")),void 0===t&&(t=!0),t&&(e=this.beforeRemove(e));var i=[],r=[],a=[];return 0!==e.length&&(e.forEach(function(e){"SequenceFlow"===e.shape.bpmnName?a.push(e.data.id):r.push(e.data.id)}),e.forEach(function(e){i.push(Object(h.c)(e));var t=e.data,s=e.shape;if(n.$container.find('.shape-box[data-id="'+t.id+'"]').remove(),delete n.designer.elements[t.id],"SequenceFlow"===s.bpmnName)t.sourceRef,t.targetRef;else{s.parent&&r.indexOf(s.parent);var l=n.designer.connections[t.id];if(l&&l.length>0)for(var c=0;c1&&void 0!==arguments[1]?arguments[1]:function(){},n=null;o.a.trigger("data.create",e,function(e){n=e,t(n)})}},{key:"beforeRemove",value:function(e){for(var t={},n=0;n1&&void 0!==arguments[1]?arguments[1]:function(){},i=null,l=null,c=this.$container.find(".bpd-layout"),u=c.find(".bpd-designer");c.on("mousemove.create",function(n){var o=a.a.getRelativePos(n.pageX,n.pageY,u),c=0,p=null;null==i?(i=r.a.trigger("element.create",{name:null,type:Object(s.d)(e,"uppercase"),prefix:"obj",pos:o}),p=i.plane.bounds,p.x=Object(s.i)(o.x)-p.width/2,p.y=Object(s.i)(o.y)-p.height/2,c=Object.keys(t.elements),r.a.trigger("shape.render",{type:e,element:i}),l=t.$container.find('.shape-box[data-id="'+i.data.id+'"]'),l.attr("class","shape-box-creating"),l.css({left:o.x-l.width()/2+"px",top:o.y-l.height()/2+"px","z-index":c.length})):(p=i.plane.bounds,p.x=Object(s.i)(o.x)-p.width/2,p.y=Object(s.i)(o.y)-p.height/2);r.a.trigger("shape.snapline.show",{size:p,ids:[]});l.css({left:Object(s.k)(p.x-10)+"px",top:Object(s.k)(p.y-10)+"px","z-index":c.length})});var p=!1;c.on("mouseup.create",function(){p=!0}),Object(o.a)(document).on("mouseup.create",function(){Object(o.a)(document).off("mouseup.create"),u.off("mousemove.creating"),r.a.trigger("shape.snapline.hide"),c.off("mouseup.create").off("mousemove.create"),null!=i&&(!1===p?l.remove():(l.attr("class","shape-box"),t.addData(i),n(i)))})}},{key:"addData",value:function(e,t){this.addDatas([e],t)}},{key:"addDatas",value:function(e,t){void 0===t&&(t=!0);for(var n=[],i=0;i1&&void 0!==arguments[1]?arguments[1]:function(){};if(e.length>0){var n=[];e=e.concat(n),t(e)}}},{key:"getElement",value:function(e){return e?this.elements[e]:this.elements}},{key:"getProcess",value:function(){var e=null;return this.definitions&&(e=this.definitions.rootElements[0],delete e.flowElements),e}},{key:"setShapeGroups",value:function(e,t){this.groups[e]||(this.groups[e]=[]),this.groups[e].indexOf(t)<0&&this.groups[e].push(t)}},{key:"getShapeConnections",value:function(e){return this.connections[e]}},{key:"setShapeConnections",value:function(e,t){this.connections[e]||(this.connections[e]=[]),this.connections[e].indexOf(t)<0&&this.connections[e].push(t)}},{key:"update",value:function(e){this.updateMulti([e])}},{key:"updateMulti",value:function(e){for(var t=[],n=[],i=0;i0&&(o=this.orders[this.orders.length-1].zindex),this.maxZIndex=o}},{key:"createAttrs",value:function(e,t,n){var i=this,r={data:{},plane:{}},a=e.id||"obj_"+this.options.ids.next();if(e)for(var o in e)switch(o){case"$type":case"flowElements":case"sourceRef":case"targetRef":case"incoming":case"outgoing":break;case"extensionElements":r.data.extensionElements=this.createExtensionModel(e[o].values||[]);break;default:r.data[o]=e[o]}if(t)for(var s in t)switch(s){case"$type":break;case"id":r.plane[s]=a+"_di";break;case"waypoint":"SequenceFlow"===n.bpmnName&&function(){var e=t[s][0],a=t[s][t[s].length-1],o=[];o.push(i.createModel({descriptor:"dc:Point",attrs:{x:e.x,y:e.y}})),n.points.forEach(function(e){o.push(i.createModel({descriptor:"dc:Point",attrs:{x:e.x,y:e.y}}))}),o.push(i.createModel({descriptor:"dc:Point",attrs:{x:a.x,y:a.y}})),r.plane[s]=o}();break;case"bounds":if("SequenceFlow"!==n.bpmnName){var l=t[s],c=l.height,u=l.width,p=l.x,h=l.y;r.plane[s]=this.createModel({descriptor:"dc:Bounds",attrs:{height:c,width:u,x:p,y:h}})}break;default:r.plane[s]=t[s]}return r}},{key:"createElement",value:function(e){var t=e.type,n=e.prefix,i=e.name,a=e.pos,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},l=n+"_"+this.options.ids.next(),c=Object(s.c)(this.createModel({descriptor:"bpmn:"+t,attrs:{name:i,id:l,extensionElements:this.createExtensionModel()}})),u={};"SequenceFlow"===t?u=Object(s.c)(this.createModel({descriptor:"bpmndi:BPMNEdge",attrs:{id:l+"_di",waypoint:[]}})):(u=Object(s.c)(this.createModel({descriptor:"bpmndi:BPMNShape",attrs:{bounds:this.createModel({descriptor:"dc:Bounds",attrs:{x:0,y:0}}),bpmnElement:l,id:l+"_di"}})),a&&(u.bounds.x=Object(s.i)(a.x)-u.bounds.width,u.bounds.y=Object(s.i)(a.y)-u.bounds.height));var p={data:c,plane:u};return p=r.a.trigger("shape.create",{type:t,element:p}),this.maxZIndex=p.shape.shapeStyle.zindex=this.maxZIndex+1,o(p),p}},{key:"createDefinition",value:function(){var e=this;return this.definitions.rootElements.forEach(function(t,n){var i={},r=[],a=[];for(var o in e.elements){var s=e.elements[o],l=s.data,c=s.plane,u=s.shape;if("SequenceFlow"!==u.bpmnName){var p=e.createAttrs(l,c,u);p.data.incoming=[],p.data.outgoing=[];var h=e.createModel({descriptor:l.$type,attrs:p.data});p.plane.bpmnElement=h;var f=e.createModel({descriptor:c.$type,attrs:p.plane});i[h.id]=h,r.push(h),a.push(f)}}for(var d in e.elements){var y=e.elements[d],m=y.data,g=y.plane,v=y.shape;if("SequenceFlow"===v.bpmnName){var x=e.createAttrs(m,g,v);x.data.sourceRef=i[m.sourceRef],x.data.targetRef=i[m.targetRef];var b=e.createModel({descriptor:m.$type,attrs:x.data});m.sourceRef&&i[m.sourceRef].outgoing.push(b),m.targetRef&&i[m.targetRef].incoming.push(b),x.plane.bpmnElement=b;var w=e.createModel({descriptor:g.$type,attrs:x.plane});r.push(b),a.push(w)}}e.definitions.diagrams[n].plane.planeElement=a,e.definitions.rootElements[n]=e.createModel({descriptor:t.$type,attrs:{id:t.id||e.options.ids.next(),extensionElements:e.createExtensionModel(t.extensionElements.values||[])}}),e.definitions.rootElements[n].flowElements=r}),this.definitions}},{key:"setProcessModel",value:function(){var e="process_"+this.options.ids.next(),t=[this.createModel({descriptor:"bpmn:Process",attrs:{id:e,flowElements:[],extensionElements:this.createExtensionModel([])}})],n=[this.createModel({descriptor:"bpmndi:BPMNDiagram",attrs:{id:e+"_di",plane:this.createModel({descriptor:"bpmndi:BPMNPlane",attrs:{id:e+"_pl",planeElement:[]}})}})];this.definitions.rootElements=t,this.definitions.diagrams=n}},{key:"createModel",value:function(e){var t=null;return r.a.trigger("model.create",e,function(e){t=e}),t}},{key:"createExtensionModel",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=[];return t.forEach(function(t){var i=t.$type||t.name,r=Object(s.c)(t);delete r.$type,delete r.name;var a=e.createModel({descriptor:i,attrs:r});a&&n.push(a)}),this.createModel({descriptor:"bpmn:ExtensionElements",attrs:{values:n}})}}]),e}(),u=function(e,t,n){return new c(e,t,n)};t.a=u},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=n(0),a=n(3),o=function(){function e(e,t){for(var n=0;n1&&p<=u.shape.points.length||null==u.data.sourceRef&&null==u.data.targetRef&&(o.css("cursor","move"),r.a.trigger("shape.drag",s))}else if("sequence_point"===c.type)o.css("cursor","move"),r.a.trigger("shape.hover",s),r.a.trigger("connection.drag",s);else if("sequence_text"===c.type)o.css("cursor","text"),r.a.trigger("shape.hover",s);else if("shape"===c.type?c.element.shape.locked?(o.css("cursor","default"),r.a.trigger("shape.hover",s)):(o.css("cursor","move"),r.a.trigger("shape.hover",s),r.a.trigger("shape.edit",s),r.a.trigger("shape.drag",s)):(o.css("cursor","crosshair"),r.a.trigger("shape.hover",s),r.a.trigger("anchor.hover",s)),c.element.shape.parent){var h=r.a.on("element.get",c.element.shape.parent);r.a.trigger("anchor.show",h)}else r.a.trigger("anchor.show",c.element);else o.css("cursor","default"),r.a.trigger("canvas.hover",s),r.a.trigger("shape.multiSelect",s),r.a.trigger("hand.activate")}}},{key:"changeState",value:function(e){this.state.state=e}},{key:"resetState",value:function(){this.state.state=null,this.$container.find(".bpd-designer").css("cursor","default")}}]),e}();t.a=s},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=n(2),a=n(15),o=n(1),s=n(7),l=n(3),c=function(){function e(e,t){for(var n=0;n").appendTo(this.$container.find(".bpd-designer")));var s=i.bounds,c=s.x,u=s.y,p=s.width,h=s.height,f=t.shapeStyle,d=f.angle,y=(f.zindex,l.a.getShapeBox(e)),m=y.width+20,g=y.height+20,v=a.find(".shape-canvas");v.attr({width:m,height:g}),a.css({left:Object(o.k)(y.x-10)+"px",top:Object(o.k)(y.y-10)+"px",width:m,height:g});var x=v[0].getContext("2d");x.clearRect(0,0,p+20,h+20),x.scale(this.options.scale,this.options.scale),x.translate(10,10),x.translate(c-y.x,u-y.y),x.translate(p/2,h/2),x.rotate(d),x.translate(-p/2,-h/2),x.globalAlpha=t.shapeStyle.alpha,x.lineJoin="round",this.renderShapePath(x,e),this.renderText(t,y)}},{key:"renderShapePath",value:function(e,t,n){var i=t.plane.bounds,r=i.width,a=i.height,s=void 0;s=n&&o.a.drawIcon?o.a.drawIcon(r,a):t.shape.actions,this.renderPath(e,t,s,n)}},{key:"renderPath",value:function(e,t,n,i){for(var r=t.data,a=(t.plane,t.shape),s=0;s").appendTo(u),p.on("focus",function(){Object(r.a)(this).blur()})),p.attr("readonly","readonly"),null==e.data.name||""===e.data.name.trim())return void p.css({height:"0px",width:"0px"}).hide();var h=e.fontStyle;p.css({"line-height":Math.round(1.25*h.size)+"px","font-size":h.size+"px","font-family":h.fontFamily,"font-weight":h.bold?"bold":"normal","font-style":h.italic?"italic":"normal","text-align":h.textAlign,color:"rgb("+h.color+")","text-decoration":h.underline?"underline":"none",opacity:e.shapeStyle.alpha}).show();var f=e.getTextBlock();if("horizontal"===e.fontStyle.orientation){var d={x:f.x+f.width/2,y:f.y+f.height/2};f.x=d.x-f.height/2,f.y=d.y-f.width/2,f.width=f.height,f.height=f.width}p.css({width:f.width}),p.height(0),p.val(e.data.name),p.scrollTop(99999);var y=p.scrollTop(),m=0;m="middle"===h.vAlign?f.y+f.height/2-y/2:"bottom"===e.fontStyle.vAlign?f.y+f.height-y:f.y;var g={x:f.x+f.width/2,y:m+y/2},v=e.shapeStyle.angle;0!==v&&(g=l.a.getRotated({x:s/2,y:c/2},g,v)),"horizontal"===h.orientation&&(v=(1.5*Math.PI+v)%(2*Math.PI));var x=Math.round(v/(2*Math.PI)*360),b="rotate("+x+"deg) scale("+this.options.scale+")",w=f.width,E=y;p.css({width:w,height:E,left:Object(o.k)(g.x+(i-t.x)+10)-w/2,top:Object(o.k)(g.y+(a-t.y)+10)-y/2,"-webkit-transform":b,"-ms-transform":b,"-o-transform":b,"-moz-transform":b,transform:b})}},{key:"fillShape",value:function(e,t,n){if(e.save(),"solid"===n.type)e.fillStyle="rgb("+n.color+")",e.fill();else if("gradient"===n.type){var i=void 0;i="linear"===n.gradientType?s.a.createLinearGradient(e,t,n):s.a.createRadialGradient(e,t,n),e.fillStyle=i,e.fill()}e.restore()}}]),e}();t.a=u},function(e,t,n){"use strict";n.d(t,"b",function(){return y});var i=n(16),r=n(17),a=n(18),o=n(19),s=n(20),l=n(21),c=n(22),u=n(23),p=n(24),h=n(25),f=n(0),d={StartEvent:["StartEvent"],Task:["UserTask","ServiceTask"],CallActivity:["CallActivity"],Gateway:["ExclusiveGateway","InclusiveGateway","ParallelGateway","ComplexGateway"],EndEvent:["EndEvent","TerminateEndEvent"]},y=function(){f.a.on("group.get",function(e){return e?d[e]:d})};t.a={EndEvent:i.a,StartEvent:r.a,UserTask:a.a,ServiceTask:o.a,TerminateEndEvent:s.a,ExclusiveGateway:l.a,InclusiveGateway:c.a,ParallelGateway:u.a,ComplexGateway:p.a,CallActivity:h.a}},function(e,t,n){"use strict";function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1&&void 0!==arguments[1]?arguments[1]:{};r(this,t);var i=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.style=n,e.plane&&e.plane.bounds&&(e.plane.bounds.width=e.plane.bounds.width||40,e.plane.bounds.height=e.plane.bounds.height||40),e.data.name||(e.data.name=l.a.trigger("i18n","bpmn.EndEvent")),i.data=e.data,i.plane=e.plane,i.bpmnName="EndEvent",i.groupName="EndEvent",i.actions=i.getPath(),i}return o(t,e),c(t,[{key:"getPath",value:function(){var e=this.plane.bounds,t=e.height,n=e.width,r=[];return[{lineStyle:{lineStyle:"solid",lineWidth:this.lineStyle.lineWidth+2},actions:[{action:"move",x:0,y:t/2},{action:"curve",x1:0,y1:-t/6,x2:n,y2:-t/6,x:n,y:t/2},{action:"curve",x1:n,y1:t+t/6,x2:0,y2:t+t/6,x:0,y:t/2},{action:"close"}]}].concat(i(this.style.content||r),[{fillStyle:{type:"none"},lineStyle:{lineWidth:0},actions:[{action:"move",x:0,y:t/2},{action:"curve",x1:0,y1:-t/6,x2:n,y2:-t/6,x:n,y:t/2},{action:"curve",x1:n,y1:t+t/6,x2:0,y2:t+t/6,x:0,y:t/2},{action:"close"}]}])}},{key:"getTextBlock",value:function(){var e=this.plane.bounds,t=e.height;return{x:e.width/2-60,y:t,width:120,height:30}}}]),t}(s.a);t.a=u},function(e,t,n){"use strict";function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1&&void 0!==arguments[1]?arguments[1]:{};r(this,t);var i=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.style=n,e.plane&&e.plane.bounds&&(e.plane.bounds.width=e.plane.bounds.width||40,e.plane.bounds.height=e.plane.bounds.height||40),e.data.name||(e.data.name=l.a.trigger("i18n","bpmn.StartEvent")),i.data=e.data,i.plane=e.plane,i.bpmnName="StartEvent",i.groupName="StartEvent",i.actions=i.getPath(),i}return o(t,e),c(t,[{key:"getPath",value:function(){var e=this.plane.bounds,t=e.height,n=e.width,r=[];return[{lineStyle:{lineStyle:"solid"},actions:[{action:"move",x:0,y:t/2},{action:"curve",x1:0,y1:-t/6,x2:n,y2:-t/6,x:n,y:t/2},{action:"curve",x1:n,y1:t+t/6,x2:0,y2:t+t/6,x:0,y:t/2},{action:"close"}]}].concat(i(this.style.content||r),[{fillStyle:{type:"none"},lineStyle:{lineWidth:0},actions:[{action:"move",x:0,y:t/2},{action:"curve",x1:0,y1:-t/6,x2:n,y2:-t/6,x:n,y:t/2},{action:"curve",x1:n,y1:t+t/6,x2:0,y2:t+t/6,x:0,y:t/2},{action:"close"}]}])}},{key:"getTextBlock",value:function(){var e=this.plane.bounds,t=e.height;return{x:e.width/2-60,y:t,width:120,height:30}}}]),t}(s.a);t.a=u},function(e,t,n){"use strict";function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1&&void 0!==arguments[1]?arguments[1]:{};r(this,t);var i=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.style=n,e.plane&&e.plane.bounds&&(e.plane.bounds.width=e.plane.bounds.width||110,e.plane.bounds.height=e.plane.bounds.height||55),e.data.name||(e.data.name=l.a.trigger("i18n","bpmn.UserTask")),i.data=e.data,i.plane=e.plane,i.bpmnName="UserTask",i.groupName="Task",i.actions=i.getPath(),i}return o(t,e),c(t,[{key:"getPath",value:function(){var e=this.plane.bounds,t=e.height,n=e.width,r=[{action:"move",x:0,y:4},{action:"quadraticCurve",x1:0,y1:0,x:4,y:0},{action:"line",x:n-4,y:0},{action:"quadraticCurve",x1:n,y1:0,x:n,y:4},{action:"line",x:n,y:t-4},{action:"quadraticCurve",x1:n,y1:t,x:n-4,y:t},{action:"line",x:4,y:t},{action:"quadraticCurve",x1:0,y1:t,x:0,y:t-4},{action:"close"}],a=[{actions:[{action:"font",fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",fontSize:"18px",fontFamily:"bpmn",content:"",x:4,y:16}]}];return[{lineStyle:{lineStyle:"solid"},actions:r}].concat(i(this.style.content||a),[{fillStyle:{type:"none"},lineStyle:{lineWidth:0},actions:r}])}},{key:"getTextBlock",value:function(){var e=this.plane.bounds,t=e.height;return{x:10,y:0,width:e.width-20,height:t}}}]),t}(s.a);t.a=u},function(e,t,n){"use strict";function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1&&void 0!==arguments[1]?arguments[1]:{};r(this,t);var i=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.style=n,e.plane&&e.plane.bounds&&(e.plane.bounds.width=e.plane.bounds.width||110,e.plane.bounds.height=e.plane.bounds.height||55),e.data.name||(e.data.name=l.a.trigger("i18n","bpmn.ServiceTask")),i.data=e.data,i.plane=e.plane,i.bpmnName="ServiceTask",i.groupName="Task",i.actions=i.getPath(),i}return o(t,e),c(t,[{key:"getPath",value:function(){var e=this.plane.bounds,t=e.height,n=e.width,r=[{actions:[{action:"font",fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",fontSize:"18px",fontFamily:"bpmn",content:"",x:4,y:16}]}];return[{lineStyle:{lineStyle:"solid"},actions:[{action:"move",x:0,y:4},{action:"quadraticCurve",x1:0,y1:0,x:4,y:0},{action:"line",x:n-4,y:0},{action:"quadraticCurve",x1:n,y1:0,x:n,y:4},{action:"line",x:n,y:t-4},{action:"quadraticCurve",x1:n,y1:t,x:n-4,y:t},{action:"line",x:4,y:t},{action:"quadraticCurve",x1:0,y1:t,x:0,y:t-4},{action:"close"}]}].concat(i(this.style.content||r),[{fillStyle:{type:"none"},lineStyle:{lineWidth:0},actions:[{action:"move",x:0,y:4},{action:"quadraticCurve",x1:0,y1:0,x:4,y:0},{action:"line",x:n-4,y:0},{action:"quadraticCurve",x1:n,y1:0,x:n,y:4},{action:"line",x:n,y:t-4},{action:"quadraticCurve",x1:n,y1:t,x:n-4,y:t},{action:"line",x:4,y:t},{action:"quadraticCurve",x1:0,y1:t,x:0,y:t-4},{action:"close"}]}])}},{key:"getTextBlock",value:function(){var e=this.plane.bounds,t=e.height;return{x:10,y:0,width:e.width-20,height:t}}}]),t}(s.a);t.a=u},function(e,t,n){"use strict";function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1&&void 0!==arguments[1]?arguments[1]:{};r(this,t);var i=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.style=n,e.plane&&e.plane.bounds&&(e.plane.bounds.width=e.plane.bounds.width||40,e.plane.bounds.height=e.plane.bounds.height||40),e.data.name||(e.data.name=l.a.trigger("i18n","bpmn.TerminateEndEvent")),i.data=e.data,i.plane=e.plane,i.bpmnName="TerminateEndEvent",i.groupName="EndEvent",i.actions=i.getPath(),i}return o(t,e),c(t,[{key:"getPath",value:function(){var e=this.plane.bounds,t=e.height,n=e.width,r=this.lineStyle.lineWidth,a=[{fillStyle:{type:"solid",color:"50,50,50"},lineStyle:{lineWidth:0,lineStyle:"solid"},actions:[{action:"move",x:.5*n-.25*n,y:.5*t},{action:"curve",x1:.5*n-.25*n,y1:.5*t-2*t/3*.5,x2:.5*n+.25*n,y2:.5*t-2*t/3*.5,x:.5*n+.25*n,y:.5*t},{action:"curve",x1:.5*n+.25*n,y1:.5*t+2*t/3*.5,x2:.5*n-.25*n,y2:.5*t+2*t/3*.5,x:.5*n-.25*n,y:.5*t},{action:"close"}]}];return[{lineStyle:{lineWidth:r+2,lineStyle:"solid"},actions:[{action:"move",x:0,y:t/2},{action:"curve",x1:0,y1:-t/6,x2:n,y2:-t/6,x:n,y:t/2},{action:"curve",x1:n,y1:t+t/6,x2:0,y2:t+t/6,x:0,y:t/2},{action:"close"}]}].concat(i(this.style.content||a),[{fillStyle:{type:"none"},lineStyle:{lineWidth:0},actions:[{action:"move",x:0,y:t/2},{action:"curve",x1:0,y1:-t/6,x2:n,y2:-t/6,x:n,y:t/2},{action:"curve",x1:n,y1:t+t/6,x2:0,y2:t+t/6,x:0,y:t/2},{action:"close"}]}])}},{key:"getTextBlock",value:function(){var e=this.plane.bounds,t=e.height;return{x:e.width/2-60,y:t,width:120,height:30}}}]),t}(s.a);t.a=u},function(e,t,n){"use strict";function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1&&void 0!==arguments[1]?arguments[1]:{};r(this,t);var i=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.style=n,e.plane&&e.plane.bounds&&(e.plane.bounds.width=e.plane.bounds.width||50,e.plane.bounds.height=e.plane.bounds.height||50),e.data.name||(e.data.name=""),i.data=e.data,i.plane=e.plane,i.bpmnName="ExclusiveGateway",i.groupName="Gateway",i.actions=i.getPath(),i}return o(t,e),l(t,[{key:"getPath",value:function(){var e=this.plane.bounds,t=e.height,n=e.width,r=[{fillStyle:{type:"solid",color:"0, 0, 0"},lineStyle:{lineWidth:0,lineStyle:"solid"},actions:[{action:"move",x:.5*n+.5*n*.4-.02*n,y:.5*t-.5*t*.4-.02*t},{action:"line",x:.5*n-.5*n*.4-.02*n,y:.5*t+.5*t*.4-.02*t},{action:"line",x:.5*n-.5*n*.4+.02*n,y:.5*t+.5*t*.4+.02*t},{action:"line",x:.5*n+.5*n*.4+.02*n,y:.5*t-.5*t*.4+.02*t},{action:"line",x:.5*n+.5*n*.4-.02*n,y:.5*t-.5*t*.4-.02*t},{action:"close"}]},{fillStyle:{type:"solid",color:"0, 0, 0"},lineStyle:{lineWidth:0,lineStyle:"solid"},actions:[{action:"move",x:.5*n,y:.5*t},{action:"move",x:.5*n-.5*n*.4+.02*n,y:.5*t-.5*t*.4-.02*t},{action:"line",x:.5*n+.5*n*.4+.02*n,y:.5*t+.5*t*.4-.02*t},{action:"line",x:.5*n+.5*n*.4-.02*n,y:.5*t+.5*t*.4+.02*t},{action:"line",x:.5*n-.5*n*.4-.02*n,y:.5*t-.5*t*.4+.02*t},{action:"close"}]}];return[{lineStyle:{lineStyle:"solid"},actions:[{action:"move",x:0,y:.5*t},{action:"line",x:.5*n,y:0},{action:"line",x:n,y:.5*t},{action:"line",x:.5*n,y:t},{action:"line",x:0,y:.5*t},{action:"close"}]}].concat(i(this.style.content||r),[{fillStyle:{type:"none"},lineStyle:{lineWidth:0},actions:[{action:"move",x:0,y:.5*t},{action:"line",x:.5*n,y:0},{action:"line",x:n,y:.5*t},{action:"line",x:.5*n,y:t},{action:"line",x:0,y:.5*t},{action:"close"}]}])}},{key:"getTextBlock",value:function(){var e=this.plane.bounds,t=e.height;return{x:e.width/2-60,y:t,width:120,height:30}}}]),t}(s.a);t.a=c},function(e,t,n){"use strict";function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1&&void 0!==arguments[1]?arguments[1]:{};r(this,t);var i=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.style=n,e.plane&&e.plane.bounds&&(e.plane.bounds.width=e.plane.bounds.width||50,e.plane.bounds.height=e.plane.bounds.height||50),e.data.name||(e.data.name=""),i.data=e.data,i.plane=e.plane,i.bpmnName="InclusiveGateway",i.groupName="Gateway",i.actions=i.getPath(),i}return o(t,e),l(t,[{key:"getPath",value:function(){var e=this.plane.bounds,t=e.height,n=e.width,r=[{lineStyle:{lineStyle:"solid",lineColor:"0, 0, 0"},actions:[{action:"move",x:.5*n-.25*n,y:.5*t},{action:"curve",x1:.5*n-.25*n,y1:.5*t-2*t/3*.5,x2:.5*n+.25*n,y2:.5*t-2*t/3*.5,x:.5*n+.25*n,y:.5*t},{action:"curve",x1:.5*n+.25*n,y1:.5*t+2*t/3*.5,x2:.5*n-.25*n,y2:.5*t+2*t/3*.5,x:.5*n-.25*n,y:.5*t},{action:"close"}]}];return[{lineStyle:{lineStyle:"solid"},actions:[{action:"move",x:0,y:.5*t},{action:"line",x:.5*n,y:0},{action:"line",x:n,y:.5*t},{action:"line",x:.5*n,y:t},{action:"line",x:0,y:.5*t},{action:"close"}]}].concat(i(this.style.content||r),[{fillStyle:{type:"none"},lineStyle:{lineWidth:0},actions:[{action:"move",x:0,y:.5*t},{action:"line",x:.5*n,y:0},{action:"line",x:n,y:.5*t},{action:"line",x:.5*n,y:t},{action:"line",x:0,y:.5*t},{action:"close"}]}])}},{key:"getTextBlock",value:function(){var e=this.plane.bounds,t=e.height;return{x:e.width/2-60,y:t,width:120,height:30}}}]),t}(s.a);t.a=c},function(e,t,n){"use strict";function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1&&void 0!==arguments[1]?arguments[1]:{};r(this,t);var i=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.style=n,e.plane&&e.plane.bounds&&(e.plane.bounds.width=e.plane.bounds.width||50,e.plane.bounds.height=e.plane.bounds.height||50),e.data.name||(e.data.name=""),i.data=e.data,i.plane=e.plane,i.bpmnName="ParallelGateway",i.groupName="Gateway",i.actions=i.getPath(),i}return o(t,e),l(t,[{key:"getPath",value:function(){var e=this.plane.bounds,t=e.height,n=e.width,r=[{fillStyle:{type:"solid",color:"0, 0, 0"},lineStyle:{lineWidth:0,lineStyle:"solid"},actions:[{action:"move",x:.5*n-.04*Math.min(n,t),y:.5*t-.5*t*.5},{action:"line",x:.5*n-.04*Math.min(n,t),y:.5*t+.5*t*.5},{action:"line",x:.5*n+.04*Math.min(n,t),y:.5*t+.5*t*.5},{action:"line",x:.5*n+.04*Math.min(n,t),y:.5*t-.5*t*.5},{action:"line",x:.5*n-.04*Math.min(n,t),y:.5*t-.5*t*.5},{action:"close"},{action:"move",x:.5*n-.5*n*.5,y:.5*t-.04*Math.min(n,t)},{action:"line",x:.5*n-.5*n*.5,y:.5*t+.04*Math.min(n,t)},{action:"line",x:.5*n+.5*n*.5,y:.5*t+.04*Math.min(n,t)},{action:"line",x:.5*n+.5*n*.5,y:.5*t-.04*Math.min(n,t)},{action:"line",x:.5*n-.5*n*.5,y:.5*t-.04*Math.min(n,t)},{action:"close"}]}];return[{lineStyle:{lineStyle:"solid"},actions:[{action:"move",x:0,y:.5*t},{action:"line",x:.5*n,y:0},{action:"line",x:n,y:.5*t},{action:"line",x:.5*n,y:t},{action:"line",x:0,y:.5*t},{action:"close"}]}].concat(i(this.style.content||r),[{fillStyle:{type:"none"},lineStyle:{lineWidth:0},actions:[{action:"move",x:0,y:.5*t},{action:"line",x:.5*n,y:0},{action:"line",x:n,y:.5*t},{action:"line",x:.5*n,y:t},{action:"line",x:0,y:.5*t},{action:"close"}]}])}},{key:"getTextBlock",value:function(){var e=this.plane.bounds,t=e.height;return{x:e.width/2-60,y:t,width:120,height:30}}}]),t}(s.a);t.a=c},function(e,t,n){"use strict";function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1&&void 0!==arguments[1]?arguments[1]:{};r(this,t);var i=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.style=n,e.plane&&e.plane.bounds&&(e.plane.bounds.width=e.plane.bounds.width||50,e.plane.bounds.height=e.plane.bounds.height||50),e.data.name||(e.data.name=""),i.data=e.data,i.plane=e.plane,i.bpmnName="ComplexGateway",i.groupName="Gateway",i.actions=i.getPath(),i}return o(t,e),l(t,[{key:"getPath",value:function(){var e=this.plane.bounds,t=e.height,n=e.width,r=[{fillStyle:{type:"solid",color:"0, 0, 0"},lineStyle:{lineWidth:0,lineStyle:"solid"},actions:[{action:"move",x:.5*n-.5*Math.min(n,t)*.3+.02*Math.min(n,t),y:.5*t-.5*Math.min(n,t)*.3-.02*Math.min(n,t)},{action:"line",x:.5*n+.5*Math.min(n,t)*.3+.02*Math.min(n,t),y:.5*t+.5*Math.min(n,t)*.3-.03*Math.min(n,t)},{action:"line",x:.5*n+.5*Math.min(n,t)*.3-.02*Math.min(n,t),y:.5*t+.5*Math.min(n,t)*.3+.02*Math.min(n,t)},{action:"line",x:.5*n-.5*Math.min(n,t)*.3-.02*Math.min(n,t),y:.5*t-.5*Math.min(n,t)*.3+.02*Math.min(n,t)},{action:"close"}]},{fillStyle:{type:"solid",color:"0, 0, 0"},lineStyle:{lineWidth:0,lineStyle:"solid"},actions:[{action:"move",x:.5*n+.5*Math.min(n,t)*.3-.02*Math.min(n,t),y:.5*t-.5*Math.min(n,t)*.3-.02*Math.min(n,t)},{action:"line",x:.5*n-.5*Math.min(n,t)*.3-.02*Math.min(n,t),y:.5*t+.5*Math.min(n,t)*.3-.02*Math.min(n,t)},{action:"line",x:.5*n-.5*Math.min(n,t)*.3+.02*Math.min(n,t),y:.5*t+.5*Math.min(n,t)*.3+.02*Math.min(n,t)},{action:"line",x:.5*n+.5*Math.min(n,t)*.3+.02*Math.min(n,t),y:.5*t-.5*Math.min(n,t)*.3+.02*Math.min(n,t)},{action:"line",x:.5*n+.5*Math.min(n,t)*.3-.02*Math.min(n,t),y:.5*t-.5*Math.min(n,t)*.3-.02*Math.min(n,t)},{action:"close"}]},{fillStyle:{type:"solid",color:"0, 0, 0"},lineStyle:{lineWidth:0,lineStyle:"solid"},actions:[{action:"move",x:.5*n-.027*Math.min(n,t),y:.5*t-.5*Math.min(n,t)*.4},{action:"line",x:.5*n-.027*Math.min(n,t),y:.5*t+.5*Math.min(n,t)*.4},{action:"line",x:.5*n+.027*Math.min(n,t),y:.5*t+.5*Math.min(n,t)*.4},{action:"line",x:.5*n+.027*Math.min(n,t),y:.5*t-.5*Math.min(n,t)*.4},{action:"line",x:.5*n-.027*Math.min(n,t),y:.5*t-.5*Math.min(n,t)*.4},{action:"close"}]},{fillStyle:{type:"solid",color:"0, 0, 0"},lineStyle:{lineWidth:0,lineStyle:"solid"},actions:[{action:"move",x:.5*n-.5*Math.min(n,t)*.4,y:.5*t-.027*Math.min(n,t)},{action:"line",x:.5*n-.5*Math.min(n,t)*.4,y:.5*t+.027*Math.min(n,t)},{action:"line",x:.5*n+.5*Math.min(n,t)*.4,y:.5*t+.027*Math.min(n,t)},{action:"line",x:.5*n+.5*Math.min(n,t)*.4,y:.5*t-.027*Math.min(n,t)},{action:"line",x:.5*n-.5*Math.min(n,t)*.4,y:.5*t-.027*Math.min(n,t)},{action:"close"}]}];return[{lineStyle:{lineStyle:"solid"},actions:[{action:"move",x:0,y:.5*t},{action:"line",x:.5*n,y:0},{action:"line",x:n,y:.5*t},{action:"line",x:.5*n,y:t},{action:"line",x:0,y:.5*t},{action:"close"}]}].concat(i(this.style.content||r),[{fillStyle:{type:"none"},lineStyle:{lineWidth:0},actions:[{action:"move",x:0,y:.5*t},{action:"line",x:.5*n,y:0},{action:"line",x:n,y:.5*t},{action:"line",x:.5*n,y:t},{action:"line",x:0,y:.5*t},{action:"close"}]}])}},{key:"getTextBlock",value:function(){var e=this.plane.bounds,t=e.height;return{x:e.width/2-60,y:t,width:120,height:30}}}]),t}(s.a);t.a=c},function(e,t,n){"use strict";function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1&&void 0!==arguments[1]?arguments[1]:{};r(this,t);var i=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.style=n,e.plane&&e.plane.bounds&&(e.plane.bounds.width=e.plane.bounds.width||110,e.plane.bounds.height=e.plane.bounds.height||55),e.data.name||(e.data.name=l.a.trigger("i18n","bpmn.CallActivity")),i.data=e.data,i.plane=e.plane,i.bpmnName="CallActivity",i.groupName="CallActivity",i.actions=i.getPath(),i}return o(t,e),c(t,[{key:"getPath",value:function(){var e=this.plane.bounds,t=e.height,n=e.width,r=this.lineStyle.lineWidth,a=[];return[{lineStyle:{lineWidth:r+2,lineStyle:"solid"},actions:[{action:"move",x:0,y:4},{action:"quadraticCurve",x1:0,y1:0,x:4,y:0},{action:"line",x:n-4,y:0},{action:"quadraticCurve",x1:n,y1:0,x:n,y:4},{action:"line",x:n,y:t-4},{action:"quadraticCurve",x1:n,y1:t,x:n-4,y:t},{action:"line",x:4,y:t},{action:"quadraticCurve",x1:0,y1:t,x:0,y:t-4},{action:"close"}]}].concat(i(this.style.content||a),[{fillStyle:{type:"none"},lineStyle:{lineWidth:0},actions:[{action:"move",x:0,y:4},{action:"quadraticCurve",x1:0,y1:0,x:4,y:0},{action:"line",x:n-4,y:0},{action:"quadraticCurve",x1:n,y1:0,x:n,y:4},{action:"line",x:n,y:t-4},{action:"quadraticCurve",x1:n,y1:t,x:n-4,y:t},{action:"line",x:4,y:t},{action:"quadraticCurve",x1:0,y1:t,x:0,y:t-4},{action:"close"}]}])}},{key:"getTextBlock",value:function(){var e=this.plane.bounds,t=e.height;return{x:10,y:0,width:e.width-20,height:t}}}]),t}(s.a);t.a=u},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=n(0),a=n(3),o=n(27),s=n(1),l=(n(7),n(2)),c=function(){function e(e,t){for(var n=0;n2&&n.points.length<=0&&(n.points=p.filter(function(e,t){return 0!==t&&t!==p.length-1})),t&&(n.points=a.a.getConnectionPoints(n,y)),"curve"!==n.linkerType&&"broken"!==n.linkerType||n.points&&0!==n.points.length||(n.points=a.a.getConnectionPoints(n,y)),null==h.angle&&(h.angle=a.a.getAngle(p[1],p[0])),null==f.angle&&(f.angle=a.a.getAngle(p[p.length-2],p[p.length-1]));var m=f.x,g=f.y,v=h.x,x=h.y;f.x>=h.x&&(m=h.x,v=f.x),f.y>=h.y&&(g=h.y,x=f.y),n.points.forEach(function(e,t){e.xv&&(v=e.x),e.yx&&(x=e.y)});var b={x:m,y:g,width:v-m,height:x-g},w=this.$container.find('.shape-box[data-id="'+i.id+'"]');0===w.length&&(w=Object(l.a)("
").appendTo(this.$container.find(".bpd-designer")));var E=w.find(".shape-canvas"),S=Object(s.k)(b.width+20),k=Object(s.k)(b.height+20);E.attr({width:S,height:k}),w.css({left:Object(s.k)(b.x-10)+"px",top:Object(s.k)(b.y-10)+"px",width:S,height:k});var C=E[0].getContext("2d"),A=this.options.bpmnStyle[n.bpmnName]||{},O=Object.assign({},n.lineStyle,A.lineStyle);C.scale(this.options.scale,this.options.scale),C.translate(10,10),C.lineWidth=O.lineWidth,C.strokeStyle="rgb("+O.lineColor+")",C.fillStyle="rgb("+O.lineColor+")",C.save(),"dashed"===O.lineStyle?a.a.setLineDash(C,[8*O.lineWidth,4*O.lineWidth]):"dot"===O.lineStyle?a.a.setLineDash(C,[O.lineWidth,2*O.lineWidth]):"dashdot"===O.lineStyle&&a.a.setLineDash(C,[8*O.lineWidth,3*O.lineWidth,O.lineWidth,3*O.lineWidth]);var R={x:h.x-b.x,y:h.y-b.y},P={x:f.x-b.x,y:f.y-b.y};if(C.beginPath(),C.moveTo(R.x,R.y),"curve"===n.linkerType){var T=n.points[0],M=n.points[1];C.bezierCurveTo(T.x-b.x,T.y-b.y,M.x-b.x,M.y-b.y,P.x,P.y)}else n.points.forEach(function(e,t){C.lineTo(e.x-b.x,e.y-b.y)}),C.lineTo(P.x,P.y);d.indexOf(i.id)>=0&&(C.shadowBlur=4,C.shadowColor="#ec5343"),C.stroke(),C.restore();var j=a.a.getEndpointAngle(n,"sourceRef");this.renderArrow(R,j,c,O.beginArrowStyle,n,h.angle,C);var N=a.a.getEndpointAngle(n,"targetRef");this.renderArrow(P,N,u,O.endArrowStyle,n,f.angle,C),C.restore(),this.renderConnectionText(n)}},{key:"renderArrow",value:function(e,t,n,i,a,o,s){if("solidArrow"===i){var l=Math.PI/10,c=12/Math.cos(l),u={x:e.x-c*Math.cos(t-l),y:e.y-c*Math.sin(t-l)},p={x:e.x-c*Math.sin(Math.PI/2-t-l),y:e.y-c*Math.cos(Math.PI/2-t-l)};s.beginPath(),s.moveTo(e.x,e.y),s.lineTo(u.x,u.y),s.lineTo(p.x,p.y),s.lineTo(e.x,e.y),s.closePath(),s.fill(),s.stroke()}if(n&&"solidCircle"!==i&&"dashedCircle"!==i){var h=r.a.trigger("element.get",n);if(h){s.save(),s.translate(e.x,e.y),s.rotate(o),s.translate(-e.x,-e.y);for(var f=e.x-h.shape.lineStyle.lineWidth/2,d=e.y-1.2*a.lineStyle.lineWidth,y=2*a.lineStyle.lineWidth,m=1.8*a.lineStyle.lineWidth,g=f;g<=f+y;){for(var v=d;v<=d+m;)s.clearRect(g,v,1.5,1.5),v+=1;g+=1}s.restore()}}}},{key:"renderConnectionText",value:function(e){var t=this.$container.find('.shape-box[data-id="'+e.data.id+'"]'),n=t.find(".text-box[data-shape="+e.data.id+"]");0===n.length&&(n=Object(l.a)("
").appendTo(t));var i=e.fontStyle,r="scale("+this.options.scale+")",o={"line-height":Math.round(1.25*i.size)+"px","font-size":i.size+"px","font-family":i.fontFamily,"font-weight":i.bold?"bold":"normal","font-style":i.italic?"italic":"normal","text-align":i.textAlign,color:"rgb("+i.color+")","text-decoration":i.underline?"underline":"none","-webkit-transform":r,"-ms-transform":r,"-o-transform":r,"-moz-transform":r,transform:r};if(n.css(o),null==e.data.name||""===e.data.name.trim())return void n.hide();n.show();var c=e.data.name;c.length>12&&(c=c.substr(0,12)+"..."),n.html(c),n.attr("title",e.data.name);var u=a.a.getConnectionMidpoint(e),p=t.position();n.css({left:Object(s.k)(u.x)-p.left-n.width()/2,top:Object(s.k)(u.y)-p.top-n.height()/2})}},{key:"move",value:function(e,t,n,i){var o=e.data,l=e.plane,c=(e.shape,l.waypoint[0]),u=l.waypoint[l.waypoint.length-1],p=a.a.getShapeByPosition(n,i,this.$container,!0),h=null,f=null;if(r.a.trigger("anchor.point.hide"),null!=p){var d=p.element;if(f=d.data.id,"bounds"===p.type)h=p.anchor,r.a.trigger("anchor.point.show",Object(s.k)(h));else if("shape"===p.type){var y=void 0,m=void 0;if("source"===t?(y={x:u.x,y:u.y},m=o.targetRef):(y={x:c.x,y:c.y},m=o.sourceRef),d.data.id===m)r.a.trigger("anchor.point.hide"),h={x:Object(s.i)(n),y:Object(s.i)(i),angle:null},f=null;else{for(var g=d.shape.getAnchors(),v=d.plane.bounds,x={x:v.x+v.width/2,y:v.y+v.height/2},b=-1,w=void 0,E=0;E=u.x-6&&h.x<=u.x+6&&(c.x=u.x),h.y>=u.y-6&&h.y<=u.y+6&&(c.y=u.y))):(o.targetRef=f,u.x=h.x,u.y=h.y,u.angle=h.angle,null==f&&(h.x>=c.x-6&&h.x<=c.x+6&&(u.x=c.x),h.y>=c.y-6&&h.y<=c.y+6&&(u.y=c.y))),this.renderConnection(e,!0)}}]),e}();t.a=u},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=n(6),s=function(e){function t(e){i(this,t);var n=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.data=e.data,n.plane=e.plane,n.bpmnName="SequenceFlow",n.groupName="SequenceFlow",n.linkerType="broken",n.points=[],n.lineStyle={lineWidth:2,lineColor:"50,50,50",lineStyle:"solid",beginArrowStyle:"none",endArrowStyle:"solidArrow"},n}return a(t,e),t}(o.a);t.a=s},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:128,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:16;if(e<=0)return"0";for(var n=Math.log(Math.pow(2,e))/Math.log(t),i=2;n===1/0;i*=2)n=Math.log(Math.pow(2,e/i))/Math.log(t)*i;for(var r=n-Math.floor(n),a="",o=0;o=Math.pow(2,e)?this.createId(e,t):a}},{key:"rack",value:function(e,t,n){var i=function(i){var a=0,o=void 0;do{if(a++>10){if(!n)throw new Error("too many ID collisions, use more bits");e+=n}o=this.createId(e,t)}while(Object.hasOwnProperty.call(r,o));return r[o]=i,o},r=i.hats={};return i.get=function(e){return i.hats[e]},i.set=function(e,t){return i.hats[e]=t,i},i.bits=e||128,i.base=t||16,i}},{key:"next",value:function(e){return this._seed(e||!0)}},{key:"nextPrefixed",value:function(e,t){var n=void 0;do{n=e+this.next(!0)}while(this.assigned(n));return this.claim(n,t),n}},{key:"claim",value:function(e,t){this._seed.set(e,t||!0)}},{key:"assigned",value:function(e){return this._seed.get(e)||!1}},{key:"unclaim",value:function(e){delete this._seed.hats[e]}},{key:"clear",value:function(){var e=this._seed.hats;for(var t in e)this.unclaim(t)}}]),e}();t.a=a},function(e,t,n){"use strict";var i=n(30),r=n(42),a=n.n(r),o=n(43),s=n.n(o),l=n(44),c=n.n(l),u=n(45),p=n.n(u),h={bpmn:a.a,bpmndi:s.a,dc:c.a,di:p.a};t.a=function(e,t){var n=Object.assign({},h,e);return new i.a(n,t)}},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=n(8),s=n(0),l=n(36),c=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:function(){})(this.create(e.descriptor,e.attrs))}},{key:"fromXML",value:function(e,t,n,i){"string"==typeof t&&t.constructor===String||(i=n,n=t,t="bpmn:Definitions"),"function"==typeof n&&n.constructor===Function&&(i=n,n={});var r=new l.a(Object.assign({model:this,lax:!0},n)),a=r.handler(t);r.fromXML(e,a,i)}},{key:"toXML",value:function(e,t,n){"function"==typeof t&&t.constructor===Function&&(n=t,t={});var i,r,a=new l.b(t);try{i=a.toXML(e)}catch(e){r=e}return n(r,i)}},{key:"test",value:function(e){console.log("test",e,this.a)}}]),t}(o.a);t.a=u},function(e,t,n){"use strict";function i(e,t){this.model=e,this.properties=t}t.a=i;var r=n(32);i.prototype.createType=function(e){function t(e){i.define(this,"$type",{value:o,enumerable:!0}),i.define(this,"$attrs",{value:{}}),i.define(this,"$parent",{writable:!0});for(var t in e)this.set(t,e[t])}var n=this.model,i=this.properties,a=Object.create(r.a.prototype);e.properties.forEach(function(e){e.isMany||void 0===e.default||(a[e.name]=e.default)}),i.defineModel(a,n),i.defineDescriptor(a,e);var o=e.ns.name;return t.prototype=a,t.hasType=a.$instanceOf=this.model.hasType,i.defineModel(t,n),i.defineDescriptor(t,e),t}},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=function(){function e(e,t){for(var n=0;n already defined")}t.a=i;var a=n(34),o=n(5);i.prototype.getPackage=function(e){return this.packageMap[e]},i.prototype.getPackages=function(){return this.packages},i.prototype.registerPackage=function(e){var t=this;e=Object.assign({},e);var n=this.packageMap;r(n,e,"prefix"),r(n,e,"uri"),e.types.forEach(function(n){t.registerType(n,e)}),n[e.uri]=n[e.prefix]=e,this.packages.push(e)},i.prototype.registerType=function(e,t){var n=this;e=Object.assign({},e,{superClass:(e.superClass||[]).slice(),extends:(e.extends||[]).slice(),properties:(e.properties||[]).slice(),meta:Object.assign(e.meta||{})});var i=Object(o.g)(e.name,t.prefix),r=i.name,a={};e.properties.forEach(function(e){var t=Object(o.g)(e.name,i.prefix),n=t.name;Object(o.e)(e.type)||(e.type=Object(o.g)(e.type,t.prefix).name),Object.assign(e,{ns:t,name:n}),a[n]=e}),Object.assign(e,{ns:i,name:r,propertiesByName:a}),e.extends.forEach(function(e){var t=n.typeMap[e];t.traits=t.traits||[],t.traits.push(r)}),this.definePackage(e,t),this.typeMap[r]=e},i.prototype.mapTypes=function(e,t,n){function i(e){return r(e,!0)}function r(n,i){var r=Object(o.g)(n,Object(o.e)(n)?"":e.prefix);s.mapTypes(r,t,i)}var a=Object(o.e)(e.name)?{name:e.name}:this.typeMap[e.name],s=this;if(!a)throw new Error("unknown type <"+e.name+">");a.superClass&&a.superClass.forEach(function(e){n?i(e):r(e)}),t(a,!n),a.traits&&a.traits.length>0&&a.traits.forEach(function(e){i(e)})},i.prototype.getEffectiveDescriptor=function(e){var t=Object(o.g)(e),n=new a.a(t);this.mapTypes(t,function(e,t){n.addTrait(e,t)});var i=n.build();return this.definePackage(i,i.allTypes[i.allTypes.length-1].$pkg),i},i.prototype.definePackage=function(e,t){this.properties.define(e,"$pkg",{value:t})}},function(e,t,n){"use strict";function i(e,t){var n={},i=Object(e);return t.forEach(function(t){t in i&&(n[t]=e[t])}),n}function r(e){this.ns=e,this.name=e.name,this.allTypes=[],this.allTypesByName={},this.properties=[],this.propertiesByName={}}t.a=r;var a=n(5);r.prototype.build=function(){return i(this,["ns","name","allTypes","allTypesByName","properties","propertiesByName","bodyProperty","idProperty"])},r.prototype.addProperty=function(e,t,n){"boolean"==typeof t&&(n=t,t=void 0),this.addNamedProperty(e,!1!==n);var i=this.properties;void 0!==t?i.splice(t,0,e):i.push(e)},r.prototype.replaceProperty=function(e,t,n){var i=e.ns,r=this.properties,a=this.propertiesByName,o=e.name!==t.name;if(e.isId){if(!t.isId)throw new Error("property <"+t.ns.name+"> must be id property to refine <"+e.ns.name+">");this.setIdProperty(t,!1)}if(e.isBody){if(!t.isBody)throw new Error("property <"+t.ns.name+"> must be body property to refine <"+e.ns.name+">");this.setBodyProperty(t,!1)}var s=r.indexOf(e);if(-1===s)throw new Error("property <"+i.name+"> not found in property list");r.splice(s,1),this.addProperty(t,n?void 0:s,o),a[i.name]=a[i.localName]=t},r.prototype.redefineProperty=function(e,t,n){var i=e.ns.prefix,r=t.split("#"),o=Object(a.g)(r[0],i),s=Object(a.g)(r[1],o.prefix).name,l=this.propertiesByName[s];if(!l)throw new Error("refined property <"+s+"> not found");this.replaceProperty(l,e,n),delete e.redefines},r.prototype.addNamedProperty=function(e,t){var n=e.ns,i=this.propertiesByName;t&&(this.assertNotDefined(e,n.name),this.assertNotDefined(e,n.localName)),i[n.name]=i[n.localName]=e},r.prototype.removeNamedProperty=function(e){var t=e.ns,n=this.propertiesByName;delete n[t.name],delete n[t.localName]},r.prototype.setBodyProperty=function(e,t){if(t&&this.bodyProperty)throw new Error("body property defined multiple times (<"+this.bodyProperty.ns.name+">, <"+e.ns.name+">)");this.bodyProperty=e},r.prototype.setIdProperty=function(e,t){if(t&&this.idProperty)throw new Error("id property defined multiple times (<"+this.idProperty.ns.name+">, <"+e.ns.name+">)");this.idProperty=e},r.prototype.assertNotDefined=function(e,t){var n=e.name,i=this.propertiesByName[n];if(i)throw new Error("property <"+n+"> already defined; override of <"+i.definedBy.ns.name+"#"+i.ns.name+"> by <"+e.definedBy.ns.name+"#"+e.ns.name+"> not allowed without redefines")},r.prototype.hasProperty=function(e){return this.propertiesByName[e]},r.prototype.addTrait=function(e,t){var n=this,i=this.allTypesByName,r=this.allTypes,a=e.name;a in i||(e.properties&&e.properties.forEach(function(i){i=Object.assign({},i,{name:i.ns.localName,inherited:t}),Object.defineProperty(i,"definedBy",{value:e});var r=i.replaces,a=i.redefines;r||a?n.redefineProperty(i,r||a,r):(i.isBody&&n.setBodyProperty(i),i.isId&&n.setIdProperty(i),n.addProperty(i))}),r.push(e),i[a]=e)}},function(e,t,n){"use strict";function i(e){this.model=e}function r(e){return void 0===e}function a(e,t,n){Object.defineProperty(e,t.name,{enumerable:!t.isReference,writable:!0,value:n,configurable:!0})}t.a=i,i.prototype.set=function(e,t,n){var i=this.model.getPropertyDescriptor(e,t),o=i&&i.name;r(n)?i?delete e[o]:delete e.$attrs[t]:i?o in e?e[o]=n:a(e,i,n):e.$attrs[t]=n},i.prototype.get=function(e,t){var n=this.model.getPropertyDescriptor(e,t);if(!n)return e.$attrs[t];var i=n.name;return!e[i]&&n.isMany&&a(e,n,[]),e[i]},i.prototype.define=function(e,t,n){Object.defineProperty(e,t,n)},i.prototype.defineDescriptor=function(e,t){this.define(e,"$descriptor",{value:t})},i.prototype.defineModel=function(e,t){this.define(e,"$model",{value:t})}},function(e,t,n){"use strict";var i=n(37);n.d(t,"a",function(){return i.a});var r=n(41);n.d(t,"b",function(){return r.a})},function(e,t,n){"use strict";function i(e,t){t="function"==typeof t&&t.constructor===Function?t:function(e){return e===t};var n;return e.forEach(function(e,i){if(t(e,i))return n=e,!1}),n}function r(e){return e.charAt(0).toUpperCase()+e.slice(1)}function a(e,t){return Object(A.d)(t)?e.prefix+":"+r(e.localName):e.name}function o(e,t){var n=e.name,i=e.localName,r=t.xml&&t.xml.typePrefix;return r&&0===i.indexOf(r)?e.prefix+":"+i.slice(r.length):n}function s(e,t){var n=Object(A.g)(e);return o(n,t.getPackage(n.prefix))}function l(e){return new Error(e)}function c(e){return e.$descriptor}function u(e){setTimeout(e,0)}function p(e){Object.assign(this,e),this.elementsById={},this.references=[],this.warnings=[],this.addReference=function(e){this.references.push(e)},this.addElement=function(e){if(!e)throw l("expected element");var t,n=this.elementsById,i=c(e),r=i.idProperty;if(r&&(t=e.get(r.name))){if(n[t])throw l("duplicate ID <"+t+">");n[t]=e}},this.addWarning=function(e){this.warnings.push(e)}}function h(){}function f(){}function d(){}function y(e,t){this.property=e,this.context=t}function m(e,t){this.element=t,this.propertyDesc=e}function g(){}function v(e,t,n){this.model=e,this.type=e.getType(t),this.context=n}function x(e,t,n){v.call(this,e,t,n)}function b(e,t,n){this.model=e,this.context=n}function w(e){e instanceof C.a&&(e={model:e}),Object.assign(this,{lax:!1},e)}t.a=w;var E=n(38),S=n.n(E),k=n(40),C=n(8),A=n(5),O=k.a.Parser;h.prototype.handleEnd=function(){},h.prototype.handleText=function(){},h.prototype.handleNode=function(){},f.prototype=Object.create(h.prototype),f.prototype.handleNode=function(){return this},d.prototype=Object.create(h.prototype),d.prototype.handleText=function(e){this.body=(this.body||"")+e},y.prototype=Object.create(d.prototype),y.prototype.handleNode=function(e){if(this.element)throw l("expected no sub nodes");return this.element=this.createReference(e),this},y.prototype.handleEnd=function(){this.element.id=this.body},y.prototype.createReference=function(e){return{property:this.property.ns.name,id:""}},m.prototype=Object.create(d.prototype),m.prototype.handleEnd=function(){var e=this.body||"",t=this.element,n=this.propertyDesc;e=Object(A.c)(n.type,e),n.isMany?t.get(n.name).push(e):t.set(n.name,e)},g.prototype=Object.create(d.prototype),g.prototype.handleNode=function(e){var t=this,n=this.element;return n?t=this.handleChild(e):(n=this.element=this.createElement(e),this.context.addElement(n)),t},v.prototype=Object.create(g.prototype),v.prototype.addReference=function(e){this.context.addReference(e)},v.prototype.handleText=function(e){if(!c(this.element).bodyProperty)throw l("unexpected body text <"+e+">");d.prototype.handleText.call(this,e)},v.prototype.handleEnd=function(){var e=this.body,t=this.element,n=c(t),i=n.bodyProperty;i&&void 0!==e&&(e=Object(A.c)(i.type,e),t.set(i.name,e))},v.prototype.createElement=function(e){var t,n=e.attributes,i=this.type,r=c(i),a=this.context,o=new i({}),s=this.model;return Object.keys(n).forEach(function(e){var i,l=n[e],c=r.propertiesByName[e];c&&c.isReference?c.isMany?(i=l.split(" "),i.forEach(function(e){a.addReference({element:o,property:c.ns.name,id:e})})):a.addReference({element:o,property:c.ns.name,id:l}):(c?l=Object(A.c)(c.type,l):"xmlns"!==e&&(t=Object(A.g)(e,r.ns.prefix),s.getPackage(t.prefix)&&a.addWarning({message:"unknown attribute <"+e+">",element:o,property:e,value:l})),o.set(e,l))}),o},v.prototype.getPropertyForNode=function(e){var t,n,r=e.name,o=Object(A.g)(r),u=this.type,p=this.model,h=c(u),f=o.name,d=h.propertiesByName[f];if(d)return Object(A.i)(d)&&(t=e.attributes[A.b])?(t=s(t,p),n=p.getType(t),Object.assign({},d,{effectiveType:c(n).name})):d;var y=p.getPackage(o.prefix);if(y){if(t=a(o,y),n=p.getType(t),d=i(h.properties,function(e){return!e.isVirtual&&!e.isReference&&!e.isAttribute&&n.hasType(e.type)}))return Object.assign({},d,{effectiveType:c(n).name})}else if(d=i(h.properties,function(e){return!e.isReference&&!e.isAttribute&&"Element"===e.type}))return d;throw l("unrecognized element <"+o.name+">")},v.prototype.toString=function(){return"ElementDescriptor["+c(this.type).name+"]"},v.prototype.valueHandler=function(e,t){return new m(e,t)},v.prototype.referenceHandler=function(e){return new y(e,this.context)},v.prototype.handler=function(e){return"Element"===e?new b(this.model,e,this.context):new v(this.model,e,this.context)},v.prototype.handleChild=function(e){var t,n,i,r;if(t=this.getPropertyForNode(e),i=this.element,n=t.effectiveType||t.type,Object(A.f)(n))return this.valueHandler(t,i);r=t.isReference?this.referenceHandler(t).handleNode(e):this.handler(n).handleNode(e);var a=r.element;return void 0!==a&&(t.isMany?i.get(t.name).push(a):i.set(t.name,a),t.isReference?(Object.assign(a,{element:i}),this.context.addReference(a)):a.$parent=i),r},x.prototype=Object.create(v.prototype),x.prototype.createElement=function(e){var t=e.name,n=Object(A.g)(t),i=this.model,r=this.type,o=i.getPackage(n.prefix),s=o&&a(n,o)||t;if(!r.hasType(s))throw l("unexpected element <"+e.originalName+">");return v.prototype.createElement.call(this,e)},b.prototype=Object.create(g.prototype),b.prototype.createElement=function(e){var t=e.name,n=Object(A.g)(t),i=n.prefix,r=e.ns[i+"$uri"],a=e.attributes;return this.model.createAny(t,r,a)},b.prototype.handleChild=function(e){var t,n=new b(this.model,"Element",this.context).handleNode(e),i=this.element,r=n.element;return void 0!==r&&(t=i.$children=i.$children||[],t.push(r),r.$parent=i),n},b.prototype.handleEnd=function(){this.body&&(this.element.$body=this.body)},w.prototype.fromXML=function(e,t,n){function i(e,t,n){var i=t(),r=i.line,a=i.column,o=i.data;"<"===o.charAt(0)&&-1!==o.indexOf(" ")&&(o=o.slice(0,o.indexOf(" "))+">");var s="unparsable content "+(o?o+" ":"")+"detected\n\tline: "+r+"\n\tcolumn: "+a+"\n\tnested error: "+e.message;if(n)return b.addWarning({message:s,error:e}),console.warn("could not parse node"),console.warn(e),!0;throw console.error("could not parse document"),console.error(e),l(s)}function r(e,t){return i(e,t,!0)}function a(){var e,t,n=b.elementsById,i=b.references;for(e=0;t=i[e];e++){var r=t.element,a=n[t.id],o=c(r).propertiesByName[t.property];if(a||b.addWarning({message:"unresolved reference <"+t.id+">",element:t.element,property:t.property,value:t.id}),o.isMany){var s=r.get(o.name),l=s.indexOf(t);-1===l&&(l=s.length),a?s[l]=a:s.splice(l,1)}else r.set(o.name,a)}}function o(){E.pop().handleEnd()}function s(e){if(k.test(e)){var t=C.exec(e),n=t&&t[1];n&&!A.test(n)&&b.addWarning({message:"unsupported document encoding <"+n+">, falling back to UTF-8"})}}function h(e,t){var n=E.peek();try{E.push(n.handleNode(e))}catch(e){i(e,t,x)&&E.push(new f)}}function d(e,t){try{E.peek().handleText(e)}catch(e){r(e,t)}}function y(e,t){(e=e.trim())&&d(e,t)}var m=t.rootHandler;t instanceof v?(m=t,t={}):"string"==typeof t?(m=this.handler(t),t={}):"string"==typeof m&&(m=this.handler(m));var g=this.model,x=this.lax,b=new p(Object.assign({},t,{rootHandler:m})),w=new O({proxy:!0}),E=new S.a;m.context=b,E.push(m);var k=/^<\?xml /i,C=/ encoding="([^"]+)"/i,A=/^utf-8$/i,R=g.getPackages().reduce(function(e,t){return e[t.uri]=t.prefix,e},{});w.ns(R).on("openTag",function(e,t,n,i){var r=e.attrs||{},a=Object.keys(r).reduce(function(e,n){var i=t(r[n]);return e[n]=i,e},{});h({name:e.name,originalName:e.originalName,attributes:a,ns:e.ns},i)}).on("question",s).on("closeTag",o).on("cdata",d).on("text",function(e,t,n){y(t(e),n)}).on("error",i).on("warn",r),u(function(){var t;try{w.parse(e),a()}catch(e){t=e}var i=m.element;t||i||(t=l("failed to parse document as <"+m.type.$descriptor.name+">")),n(t,t?void 0:i,b)})},w.prototype.handler=function(e){return new x(this.model,e)}},function(e,t,n){"use strict";(function(t){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(e,t){for(var n=0;n0&&(e=this.data.pop(),this.top--),e}},{key:"push",value:function(e){return this.data[++this.top]=e,this}},{key:"search",value:function(e){var t=this.data.indexOf(e);return-1===t?-1:this.data.length-t}}]),e}();e.exports=r}("undefined"!=typeof window&&window)}).call(t,n(39))},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";function i(e,t,n,i){return i?m.call(v,i)?v[i]:"&"+i+";":y(t?t:parseInt(n,16))}function r(e){return e.length>3&&-1!==e.indexOf("&")?e.replace(g,i):e}function a(e){return new Error(e)}function o(e){return"missing namespace for prefix <"+e+">"}function s(e){return{get:e,enumerable:!0}}function l(e){var t,n={};for(t in e)n[t]=e[t];return n}function c(e){return e+"$uri"}function u(e){var t,n,i={};for(t in e)n=e[t],i[n]=n,i[c(n)]=t;return i}function p(){return{line:0,column:0}}function h(e){throw e}function f(e){function t(e){e instanceof Error||(e=a(e)),N=e,P(e,T)}function n(e){S&&(e instanceof Error||(e=a(e)),S(e,T))}function i(e){function i(){if(null!==B)return B;var e,t,i,a,s,u,p,h,f,d,y,m=j&&L.xmlns,g=j&&M?[]:null,v=G,x=H,b=x.length,E={},S={};e:for(;v8)){for((d<65||d>122||d>90&&d<97)&&95!==d&&58!==d&&(n("illegal first char attribute name"),f=!0),y=v+1;y96&&d<123||d>64&&d<91||d>47&&d<59||46===d||45===d||95===d)){if(32===d||d<14&&d>8){n("missing attribute value"),v=y;continue e}if(61===d)break;n("illegal attribute name char"),f=!0}if(h=x.substring(v,y),"xmlns:xmlns"===h&&(n("illegal declaration of xmlns"),f=!0),34===(d=x.charCodeAt(y+1)))-1===(y=x.indexOf('"',v=y+2))&&-1!==(y=x.indexOf("'",v))&&(n("attribute value quote missmatch"),f=!0);else if(39===d)-1===(y=x.indexOf("'",v=y+2))&&-1!==(y=x.indexOf('"',v))&&(n("attribute value quote missmatch"),f=!0);else for(n("missing attribute value quotes"),f=!0,y+=1;y8);y++);for(-1===y&&(n("missing closing quotes"),y=b,f=!0),f||(u=x.substring(v,y)),v=y;y+18);y++)v===y&&(n("illegal character after attribute end"),f=!0);if(v=y+1,!f)if(h in S)n("attribute <"+h+"> already defined");else if(S[h]=!0,j)if(M){if(null!==(s="xmlns"===h?"xmlns":120===h.charCodeAt(0)&&"xmlns:"===h.substr(0,6)?h.substr(6):null)){if(e=r(u),t=c(s),!(p=O[e])){if("xmlns"===s||t in L&&L[t]!==e)do{p="ns"+_++}while(void 0!==L[p]);else p=s;O[e]=p}L[s]!==p&&(a||(L=l(L),a=!0),L[s]=p,"xmlns"===s&&(L[c(p)]=e,m=p),L[t]=e),E[h]=u;continue}g.push(h,u)}else d=h.indexOf(":"),-1!==d?(i=L[h.substring(0,d)])?(h=m===i?h.substr(d+1):i+h.substr(d),h===w&&(d=u.indexOf(":"),-1!==d?(i=u.substring(0,d),i=L[i]||i,u=i+u.substring(d)):u=m+":"+u),E[h]=u):n(o(h.substring(0,d))):E[h]=u;else E[h]=u}if(M)for(v=0,b=g.length;v=o&&(t=i.exec(e))&&!((s=t[0].length+t.index)>z);)r+=1,o=s;return-1===z?(a=s,n=e.substring(W)):0===W?(console.log(z-o),n=e.substring(W,z)):(a=z-o,n=-1===W?e.substring(z):e.substring(z,W+1)),{data:n,line:r,column:a}}var p,h,f,d,x,b,S,P,N,B,I=j?[]:null,L=j?u(O):null,$=[],_=0,F=!1,q=!1,z=0,W=0,H="",G=0;for(T=a,R&&(N=Object.create({},{name:s(function(){return S}),originalName:s(function(){return P}),attrs:s(i),ns:s(function(){return L})}));-1!==W;){if(-1===(z=60===e.charCodeAt(W)?W:e.indexOf("<",W)))return $.length?t("unexpected end of file"):0===W?t("missing start tag"):void(W",z+1)))return t("unclosed tag");if(B={},47===x){if(F=!1,q=!0,!$.length)return t("missing open tag");if(h=S=$.pop(),d=z+2+h.length,e.substring(z+2,d)!==h)return t("closing tag mismatch");for(;d8&&x<14))return t("close tag")}else{if(47===e.charCodeAt(W-1)?(h=S=e.substring(z+1,W-1),F=!0,q=!0):(h=S=e.substring(z+1,W),F=!0,q=!1),!(x>96&&x<123||x>64&&x<91||95===x||58===x))return t("illegal first char nodeName");for(d=1,f=h.length;d96&&x<123||x>64&&x<91||x>47&&x<59||45===x||95===x||46===x)){if(32===x||x<14&&x>8){S=h.substring(0,d),B=null;break}return t("invalid nodeName")}q||$.push(S)}if(j){if(p=L,F&&(q||I.push(p),null===B&&(M=-1!==h.indexOf("xmlns",d))&&(G=d,H=h,i(),M=!1)),P=S,-1!==(x=S.indexOf(":"))){if(!(b=L[S.substring(0,x)]))return t("missing namespace on <"+P+">");S=S.substr(x+1)}else b=L.xmlns;b&&(S=b+":"+S)}if(F&&(G=d,H=h,m&&(R?m(N,r,q,T):m(S,i,r,q,T),D)))return;if(q){if(g&&(g(R?N:S,r,F,T),D))return;j&&(L=F?p:I.pop())}W+=1}else{if(-1===(W=e.indexOf("?>",z)))return t("unclosed question");if(C&&(C(e.substring(z,W+2),T),D))return;W+=2}else{if(91===(x=e.charCodeAt(z+2))&&"CDATA["===e.substr(z+3,6)){if(-1===(W=e.indexOf("]]>",z)))return t("unclosed cdata");if(v&&(v(e.substring(z+9,W),T),D))return;W+=3;continue}if(45===x&&45===e.charCodeAt(z+3)){if(-1===(W=e.indexOf("--\x3e",z)))return t("unclosed comment");if(k&&(k(e.substring(z+4,W),r,T),D))return;W+=3;continue}if(-1===(W=e.indexOf(">",z+1)))return t("unclosed tag");if(A&&(A(e.substring(z,W+1),r,T),D))return;W+=1}}}if(!this)return new f(e);var y,m,g,v,S,k,C,A,O,R=e&&e.proxy,P=h,T=p,M=!1,j=!1,N=null,D=!1;this.on=function(e,t){if("function"!=typeof t)throw a("required args ");switch(e){case"openTag":m=t;break;case"text":y=t;break;case"closeTag":g=t;break;case"error":P=t;break;case"warn":S=t;break;case"cdata":v=t;break;case"attention":A=t;break;case"question":C=t;break;case"comment":k=t;break;default:throw a("unsupported event: "+e)}return this},this.ns=function(e){if(void 0===e&&(e={}),"object"!==(void 0===e?"undefined":d(e)))throw a("required args ");var t,n={};for(t in e)n[t]=e[t];return n[x]=b,j=!0,O=n,this},this.parse=function(e){if("string"!=typeof e)throw a("required args ");return N=null,i(e),T=p,D=!1,N},this.stop=function(){D=!0}}var d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y=String.fromCharCode,m=Object.prototype.hasOwnProperty,g=/&#(\d+);|&#x([0-9a-f]+);|&(\w+);/gi,v={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'};Object.keys(v).forEach(function(e){v[e.toUpperCase()]=v[e]});var x="http://www.w3.org/2001/XMLSchema-instance",b="xsi",w="xsi:type",E="non-whitespace outside of root node";t.a={Parser:f,decode:r}},function(e,t,n){"use strict";function i(e,t){var n=[];return e.forEach(function(e,i){t(e,i)&&n.push(e)}),n}function r(e){var t={},n={},i={},r=[],a=[];this.byUri=function(t){return n[t]||e&&e.byUri(t)},this.add=function(e,t){n[e.uri]=e,t?r.push(e):a.push(e),this.mapPrefix(e.prefix,e.uri)},this.uriByPrefix=function(e){return t[e||"xmlns"]},this.mapPrefix=function(e,n){t[e||"xmlns"]=n},this.logUsed=function(e){var t=e.uri;i[t]=this.byUri(t)},this.getUsed=function(e){function t(e){return i[e.uri]}return[].concat(r,a).filter(t)}}function a(e){return e.charAt(0).toLowerCase()+e.slice(1)}function o(e,t){return Object(A.d)(t)?a(e):e}function s(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function l(e){return"string"==typeof e&&e.constructor===String?e:(e.prefix?e.prefix+":":"")+e.localName}function c(e){return e.getUsed().map(function(e){return{name:"xmlns"+(e.prefix?":"+e.prefix:""),value:e.uri}})}function u(e,t){return t.isGeneric?Object.assign({localName:t.ns.localName},e):Object.assign({localName:o(t.ns.localName,t.$pkg)},e)}function p(e,t){return Object.assign({localName:t.ns.localName},e)}function h(e){return i(e.$descriptor.properties,function(t){var n=t.name;if(t.isVirtual)return!1;if(!e.hasOwnProperty(n))return!1;var i=e[n];return i!==t.default&&null!==i&&(!t.isMany||i.length)})}function f(e,t,n){return e="string"==typeof e&&e.constructor===String?e:""+e,e.replace(t,function(e){return"&"+n[e]+";"})}function d(e){return f(e,R,T)}function y(e){return f(e,P,M)}function m(e){return i(e,function(e){return e.isAttr})}function g(e){return i(e,function(e){return!e.isAttr})}function v(e){this.tagName=e}function x(){}function b(e){this.tagName=e}function w(e,t){this.body=[],this.attrs=[],this.parent=e,this.propertyDescriptor=t}function E(e,t){w.call(this,e,t)}function S(){this.value="",this.write=function(e){this.value+=e}}function k(e,t){var n=[""];this.append=function(t){return e.write(t),this},this.appendNewLine=function(){return t&&e.write("\n"),this},this.appendIndent=function(){return t&&e.write(n.join(" ")),this},this.indent=function(){return n.push(""),this},this.unindent=function(){return n.pop(),this}}function C(e){function t(t,n){var i=n||new S,r=new k(i,e.format);if(e.preamble&&r.append(O),(new w).build(t).serializeTo(r),!n)return i.value}return e=Object.assign({format:!1,preamble:!0},e||{}),{toXML:t}}t.a=C;var A=n(5),O='\n',R=/<|>|'|"|&|\n\r|\n/g,P=/<|>|&/g,T={"\n":"#10","\n\r":"#10",'"':"#34","'":"#39","<":"#60",">":"#62","&":"#38"},M={"<":"lt",">":"gt","&":"amp"};v.prototype.build=function(e){return this.element=e,this},v.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"+this.element.id+"").appendNewLine()},x.prototype.serializeValue=x.prototype.serializeTo=function(e){e.append(this.escape?y(this.value):this.value)},x.prototype.build=function(e,t){return this.value=t,"String"===e.type&&-1!==t.search(P)&&(this.escape=!0),this},s(b,x),b.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"),this.serializeValue(e),e.append("").appendNewLine()},w.prototype.build=function(e){this.element=e;var t,n,i=e.$descriptor,r=this.propertyDescriptor,a=i.isGeneric;return t=a?this.parseGeneric(e):this.parseNsAttributes(e),this.ns=r?this.nsPropertyTagName(r):this.nsTagName(i),this.tagName=this.addTagName(this.ns),a||(n=h(e),this.parseAttributes(m(n)),this.parseContainments(g(n))),this.parseGenericAttributes(e,t),this},w.prototype.nsTagName=function(e){return u(this.logNamespaceUsed(e.ns),e)},w.prototype.nsPropertyTagName=function(e){return p(this.logNamespaceUsed(e.ns),e)},w.prototype.isLocalNs=function(e){return e.uri===this.ns.uri},w.prototype.nsAttributeName=function(e){var t;if(t="string"==typeof e&&e.constructor===String?Object(A.g)(e):e.ns,e.inherited)return{localName:t.localName};var n=this.logNamespaceUsed(t);return this.getNamespaces().logUsed(n),this.isLocalNs(n)?{localName:t.localName}:Object.assign({localName:t.localName},n)},w.prototype.parseGeneric=function(e){var t=this,n=this.body,i=[];for(var r in e){"$body"===r?n.push((new x).build({type:"String"},e[r])):"$children"===r?val.forEach(function(e){n.push(new w(t).build(e))}):0!==r.indexOf("$")&&t.parseNsAttribute(e,r,e[r])&&i.push({name:r,value:e[r]})}return i},w.prototype.parseNsAttribute=function(e,t,n){var i,r=e.$model,a=Object(A.g)(t);if("xmlns"===a.prefix&&(i={prefix:a.localName,uri:n}),a.prefix||"xmlns"!==a.localName||(i={uri:n}),!i)return{name:t,value:n};if(r&&r.getPackage(n))this.logNamespace(i,!0,!0);else{var o=this.logNamespaceUsed(i,!0);this.getNamespaces().logUsed(o)}},w.prototype.parseNsAttributes=function(e,t){var n=this,i=e.$attrs,r=[];for(var a in i){var o=n.parseNsAttribute(e,a,i[a]);o&&r.push(o)}return r},w.prototype.parseGenericAttributes=function(e,t){var n=this;t.forEach(function(t){if(t.name!==A.b)try{n.addAttribute(n.nsAttributeName(t.name),t.value)}catch(n){console.warn("missing namespace information for ",t.name,"=",t.value,"on",e,n)}})},w.prototype.parseContainments=function(e){var t=this,n=this.body,i=this.element;e.forEach(function(e){var r=i.get(e.name),a=e.isReference;if(e.isMany||(r=[r]),e.isBody)n.push((new x).build(e,r[0]));else if(Object(A.f)(e.type))r.forEach(function(i){n.push(new b(t.addTagName(t.nsPropertyTagName(e))).build(e,i))});else if(a)r.forEach(function(i){n.push(new v(t.addTagName(t.nsPropertyTagName(e))).build(i))});else{var o=Object(A.i)(e),s=Object(A.h)(e);r.forEach(function(i){var r;r=o?new E(t,e):s?new w(t,e):new w(t),n.push(r.build(i))})}})},w.prototype.getNamespaces=function(e){var t,n=this.namespaces,i=this.parent;return n||(t=i&&i.getNamespaces(),e||!t?this.namespaces=n=new r(t):n=t),n},w.prototype.logNamespace=function(e,t,n){var i=this.getNamespaces(n),r=e.uri,a=e.prefix;return i.byUri(r)||i.add(e,t),i.mapPrefix(a,r),e},w.prototype.logNamespaceUsed=function(e,t){var n,i,r,a=this.element,o=a.$model,s=this.getNamespaces(t),l=e.prefix,c=e.uri;if(!l&&!c)return{localName:e.localName};if(r=A.a[l]||o&&(o.getPackage(l)||{}).uri,!(c=c||r||s.uriByPrefix(l)))throw new Error("no namespace uri given for prefix <"+l+">");if(!(e=s.byUri(c))){for(n=l,i=1;s.uriByPrefix(n);)n=l+"_"+i++;e=this.logNamespace({prefix:n,uri:c},r===c)}return l&&s.mapPrefix(l,c),e},w.prototype.parseAttributes=function(e){var t=this,n=this.element;e.forEach(function(e){var i=n.get(e.name);if(e.isReference)if(e.isMany){var r=[];forEach(i,function(e){r.push(e.id)}),i=r.join(" ")}else i=i.id;t.addAttribute(t.nsAttributeName(e),i)})},w.prototype.addTagName=function(e){var t=this.logNamespaceUsed(e);return this.getNamespaces().logUsed(t),l(e)},w.prototype.addAttribute=function(e,t){var n=this.attrs;"string"==typeof t&&t.constructor===String&&(t=d(t)),n.push({name:e,value:t})},w.prototype.serializeAttributes=function(e){var t=this.attrs,n=this.namespaces;n&&(t=c(n).concat(t)),t.forEach(function(t){e.append(" ").append(l(t.name)).append('="').append(t.value).append('"')})},w.prototype.serializeTo=function(e){var t=this.body[0],n=t&&t.constructor!==x;e.appendIndent().append("<"+this.tagName),this.serializeAttributes(e),e.append(t?">":" />"),t&&(n&&e.appendNewLine().indent(),this.body.forEach(function(t){t.serializeTo(e)}),n&&e.unindent().appendIndent(),e.append("")),e.appendNewLine()},s(E,w),E.prototype.parseNsAttributes=function(e){var t=w.prototype.parseNsAttributes.call(this,e),n=e.$descriptor;if(n.name===this.propertyDescriptor.type)return t;var i=this.typeNs=this.nsTagName(n);this.getNamespaces().logUsed(this.typeNs);var r=e.$model.getPackage(i.uri),a=r.xml&&r.xml.typePrefix||"";return this.addAttribute(this.nsAttributeName(A.b),(i.prefix?i.prefix+":":"")+a+n.ns.localName),t},E.prototype.isLocalNs=function(e){return e.uri===(this.typeNs||this.ns).uri}},function(e,t){e.exports={name:"BPMN20",uri:"http://www.omg.org/spec/BPMN/20100524/MODEL",associations:[],types:[{name:"Interface",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"operations",type:"Operation",isMany:!0},{name:"implementationRef",type:"String",isAttr:!0}]},{name:"Operation",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"inMessageRef",type:"Message",isReference:!0},{name:"outMessageRef",type:"Message",isReference:!0},{name:"errorRef",type:"Error",isMany:!0,isReference:!0},{name:"implementationRef",type:"String",isAttr:!0}]},{name:"EndPoint",superClass:["RootElement"]},{name:"Auditing",superClass:["BaseElement"]},{name:"GlobalTask",superClass:["CallableElement"],properties:[{name:"resources",type:"ResourceRole",isMany:!0}]},{name:"Monitoring",superClass:["BaseElement"]},{name:"Performer",superClass:["ResourceRole"]},{name:"Process",superClass:["FlowElementsContainer","CallableElement"],properties:[{name:"processType",type:"ProcessType",isAttr:!0},{name:"isClosed",isAttr:!0,type:"Boolean"},{name:"auditing",type:"Auditing"},{name:"monitoring",type:"Monitoring"},{name:"properties",type:"Property",isMany:!0},{name:"laneSets",type:"LaneSet",isMany:!0,replaces:"FlowElementsContainer#laneSets"},{name:"flowElements",type:"FlowElement",isMany:!0,replaces:"FlowElementsContainer#flowElements"},{name:"artifacts",type:"Artifact",isMany:!0},{name:"resources",type:"ResourceRole",isMany:!0},{name:"correlationSubscriptions",type:"CorrelationSubscription",isMany:!0},{name:"supports",type:"Process",isMany:!0,isReference:!0},{name:"definitionalCollaborationRef",type:"Collaboration",isAttr:!0,isReference:!0},{name:"isExecutable",isAttr:!0,type:"Boolean"}]},{name:"LaneSet",superClass:["BaseElement"],properties:[{name:"lanes",type:"Lane",isMany:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Lane",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"partitionElementRef",type:"BaseElement",isAttr:!0,isReference:!0},{name:"partitionElement",type:"BaseElement"},{name:"flowNodeRef",type:"FlowNode",isMany:!0,isReference:!0},{name:"childLaneSet",type:"LaneSet",xml:{serialize:"xsi:type"}}]},{name:"GlobalManualTask",superClass:["GlobalTask"]},{name:"ManualTask",superClass:["Task"]},{name:"UserTask",superClass:["Task"],properties:[{name:"renderings",type:"Rendering",isMany:!0},{name:"implementation",isAttr:!0,type:"String"}]},{name:"Rendering",superClass:["BaseElement"]},{name:"HumanPerformer",superClass:["Performer"]},{name:"PotentialOwner",superClass:["HumanPerformer"]},{name:"GlobalUserTask",superClass:["GlobalTask"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"renderings",type:"Rendering",isMany:!0}]},{name:"Gateway",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"gatewayDirection",type:"GatewayDirection",default:"Unspecified",isAttr:!0}]},{name:"EventBasedGateway",superClass:["Gateway"],properties:[{name:"instantiate",default:!1,isAttr:!0,type:"Boolean"},{name:"eventGatewayType",type:"EventBasedGatewayType",isAttr:!0,default:"Exclusive"}]},{name:"ComplexGateway",superClass:["Gateway"],properties:[{name:"activationCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"ExclusiveGateway",superClass:["Gateway"],properties:[{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"InclusiveGateway",superClass:["Gateway"],properties:[{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"ParallelGateway",superClass:["Gateway"]},{name:"RootElement",isAbstract:!0,superClass:["BaseElement"]},{name:"Relationship",superClass:["BaseElement"],properties:[{name:"type",isAttr:!0,type:"String"},{name:"direction",type:"RelationshipDirection",isAttr:!0},{name:"source",isMany:!0,isReference:!0,type:"Element"},{name:"target",isMany:!0,isReference:!0,type:"Element"}]},{name:"BaseElement",isAbstract:!0,properties:[{name:"id",isAttr:!0,type:"String",isId:!0},{name:"documentation",type:"Documentation",isMany:!0},{name:"extensionDefinitions",type:"ExtensionDefinition",isMany:!0,isReference:!0},{name:"extensionElements",type:"ExtensionElements"}]},{name:"Extension",properties:[{name:"mustUnderstand",default:!1,isAttr:!0,type:"Boolean"},{name:"definition",type:"ExtensionDefinition",isAttr:!0,isReference:!0}]},{name:"ExtensionDefinition",properties:[{name:"name",isAttr:!0,type:"String"},{name:"extensionAttributeDefinitions",type:"ExtensionAttributeDefinition",isMany:!0}]},{name:"ExtensionAttributeDefinition",properties:[{name:"name",isAttr:!0,type:"String"},{name:"type",isAttr:!0,type:"String"},{name:"isReference",default:!1,isAttr:!0,type:"Boolean"},{name:"extensionDefinition",type:"ExtensionDefinition",isAttr:!0,isReference:!0}]},{name:"ExtensionElements",properties:[{name:"valueRef",isAttr:!0,isReference:!0,type:"Element"},{name:"values",type:"Element",isMany:!0},{name:"extensionAttributeDefinition",type:"ExtensionAttributeDefinition",isAttr:!0,isReference:!0}]},{name:"Documentation",superClass:["BaseElement"],properties:[{name:"text",type:"String",isBody:!0},{name:"textFormat",default:"text/plain",isAttr:!0,type:"String"}]},{name:"Event",isAbstract:!0,superClass:["FlowNode","InteractionNode"],properties:[{name:"properties",type:"Property",isMany:!0}]},{name:"IntermediateCatchEvent",superClass:["CatchEvent"]},{name:"IntermediateThrowEvent",superClass:["ThrowEvent"]},{name:"EndEvent",superClass:["ThrowEvent"]},{name:"StartEvent",superClass:["CatchEvent"],properties:[{name:"isInterrupting",default:!0,isAttr:!0,type:"Boolean"}]},{name:"ThrowEvent",isAbstract:!0,superClass:["Event"],properties:[{name:"dataInputs",type:"DataInput",isMany:!0},{name:"dataInputAssociations",type:"DataInputAssociation",isMany:!0},{name:"inputSet",type:"InputSet"},{name:"eventDefinitions",type:"EventDefinition",isMany:!0},{name:"eventDefinitionRef",type:"EventDefinition",isMany:!0,isReference:!0}]},{name:"CatchEvent",isAbstract:!0,superClass:["Event"],properties:[{name:"parallelMultiple",isAttr:!0,type:"Boolean",default:!1},{name:"dataOutputs",type:"DataOutput",isMany:!0},{name:"dataOutputAssociations",type:"DataOutputAssociation",isMany:!0},{name:"outputSet",type:"OutputSet"},{name:"eventDefinitions",type:"EventDefinition",isMany:!0},{name:"eventDefinitionRef",type:"EventDefinition",isMany:!0,isReference:!0}]},{name:"BoundaryEvent",superClass:["CatchEvent"],properties:[{name:"cancelActivity",default:!0,isAttr:!0,type:"Boolean"},{name:"attachedToRef",type:"Activity",isAttr:!0,isReference:!0}]},{name:"EventDefinition",isAbstract:!0,superClass:["RootElement"]},{name:"CancelEventDefinition",superClass:["EventDefinition"]},{name:"ErrorEventDefinition",superClass:["EventDefinition"],properties:[{name:"errorRef",type:"Error",isAttr:!0,isReference:!0}]},{name:"TerminateEndEvent",superClass:["EventDefinition"]},{name:"EscalationEventDefinition",superClass:["EventDefinition"],properties:[{name:"escalationRef",type:"Escalation",isAttr:!0,isReference:!0}]},{name:"Escalation",properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"escalationCode",isAttr:!0,type:"String"}],superClass:["RootElement"]},{name:"CompensateEventDefinition",superClass:["EventDefinition"],properties:[{name:"waitForCompletion",isAttr:!0,type:"Boolean",default:!0},{name:"activityRef",type:"Activity",isAttr:!0,isReference:!0}]},{name:"TimerEventDefinition",superClass:["EventDefinition"],properties:[{name:"timeDate",type:"Expression",xml:{serialize:"xsi:type"}},{name:"timeCycle",type:"Expression",xml:{serialize:"xsi:type"}},{name:"timeDuration",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"LinkEventDefinition",superClass:["EventDefinition"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"target",type:"LinkEventDefinition",isAttr:!0,isReference:!0},{name:"source",type:"LinkEventDefinition",isMany:!0,isReference:!0}]},{name:"MessageEventDefinition",superClass:["EventDefinition"],properties:[{name:"messageRef",type:"Message",isAttr:!0,isReference:!0},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"ConditionalEventDefinition",superClass:["EventDefinition"],properties:[{name:"condition",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"SignalEventDefinition",superClass:["EventDefinition"],properties:[{name:"signalRef",type:"Signal",isAttr:!0,isReference:!0}]},{name:"Signal",superClass:["RootElement"],properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"ImplicitThrowEvent",superClass:["ThrowEvent"]},{name:"DataState",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"ItemAwareElement",superClass:["BaseElement"],properties:[{name:"itemSubjectRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"dataState",type:"DataState"}]},{name:"DataAssociation",superClass:["BaseElement"],properties:[{name:"assignment",type:"Assignment",isMany:!0},{name:"sourceRef",type:"ItemAwareElement",isMany:!0,isReference:!0},{name:"targetRef",type:"ItemAwareElement",isReference:!0},{name:"transformation",type:"FormalExpression",xml:{serialize:"property"}}]},{name:"DataInput",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"inputSetRef",type:"InputSet",isVirtual:!0,isMany:!0,isReference:!0},{name:"inputSetWithOptional",type:"InputSet",isVirtual:!0,isMany:!0,isReference:!0},{name:"inputSetWithWhileExecuting",type:"InputSet",isVirtual:!0,isMany:!0,isReference:!0}]},{name:"DataOutput",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"outputSetRef",type:"OutputSet",isVirtual:!0,isMany:!0,isReference:!0},{name:"outputSetWithOptional",type:"OutputSet",isVirtual:!0,isMany:!0,isReference:!0},{name:"outputSetWithWhileExecuting",type:"OutputSet",isVirtual:!0,isMany:!0,isReference:!0}]},{name:"InputSet",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"dataInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"optionalInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"whileExecutingInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"outputSetRefs",type:"OutputSet",isMany:!0,isReference:!0}]},{name:"OutputSet",superClass:["BaseElement"],properties:[{name:"dataOutputRefs",type:"DataOutput",isMany:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"inputSetRefs",type:"InputSet",isMany:!0,isReference:!0},{name:"optionalOutputRefs",type:"DataOutput",isMany:!0,isReference:!0},{name:"whileExecutingOutputRefs",type:"DataOutput",isMany:!0,isReference:!0}]},{name:"Property",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"DataInputAssociation",superClass:["DataAssociation"]},{name:"DataOutputAssociation",superClass:["DataAssociation"]},{name:"InputOutputSpecification",superClass:["BaseElement"],properties:[{name:"dataInputs",type:"DataInput",isMany:!0},{name:"dataOutputs",type:"DataOutput",isMany:!0},{name:"inputSets",type:"InputSet",isMany:!0},{name:"outputSets",type:"OutputSet",isMany:!0}]},{name:"DataObject",superClass:["FlowElement","ItemAwareElement"],properties:[{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"}]},{name:"InputOutputBinding",properties:[{name:"inputDataRef",type:"InputSet",isAttr:!0,isReference:!0},{name:"outputDataRef",type:"OutputSet",isAttr:!0,isReference:!0},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"Assignment",superClass:["BaseElement"],properties:[{name:"from",type:"Expression",xml:{serialize:"xsi:type"}},{name:"to",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"DataStore",superClass:["RootElement","ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"capacity",isAttr:!0,type:"Integer"},{name:"isUnlimited",default:!0,isAttr:!0,type:"Boolean"}]},{name:"DataStoreReference",superClass:["ItemAwareElement","FlowElement"],properties:[{name:"dataStoreRef",type:"DataStore",isAttr:!0,isReference:!0}]},{name:"DataObjectReference",superClass:["ItemAwareElement","FlowElement"],properties:[{name:"dataObjectRef",type:"DataObject",isAttr:!0,isReference:!0}]},{name:"ConversationLink",superClass:["BaseElement"],properties:[{name:"sourceRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"ConversationAssociation",superClass:["BaseElement"],properties:[{name:"innerConversationNodeRef",type:"ConversationNode",isAttr:!0,isReference:!0},{name:"outerConversationNodeRef",type:"ConversationNode",isAttr:!0,isReference:!0}]},{name:"CallConversation",superClass:["ConversationNode"],properties:[{name:"calledCollaborationRef",type:"Collaboration",isAttr:!0,isReference:!0},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0}]},{name:"Conversation",superClass:["ConversationNode"]},{name:"SubConversation",superClass:["ConversationNode"],properties:[{name:"conversationNodes",type:"ConversationNode",isMany:!0}]},{name:"ConversationNode",isAbstract:!0,superClass:["InteractionNode","BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRefs",type:"Participant",isMany:!0,isReference:!0},{name:"messageFlowRefs",type:"MessageFlow",isMany:!0,isReference:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0}]},{name:"GlobalConversation",superClass:["Collaboration"]},{name:"PartnerEntity",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0}]},{name:"PartnerRole",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0}]},{name:"CorrelationProperty",superClass:["RootElement"],properties:[{name:"correlationPropertyRetrievalExpression",type:"CorrelationPropertyRetrievalExpression",isMany:!0},{name:"name",isAttr:!0,type:"String"},{name:"type",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"Error",superClass:["RootElement"],properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"errorCode",isAttr:!0,type:"String"}]},{name:"CorrelationKey",superClass:["BaseElement"],properties:[{name:"correlationPropertyRef",type:"CorrelationProperty",isMany:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Expression",superClass:["BaseElement"],isAbstract:!1,properties:[{name:"body",type:"String",isBody:!0}]},{name:"FormalExpression",superClass:["Expression"],properties:[{name:"language",isAttr:!0,type:"String"},{name:"evaluatesToTypeRef",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"Message",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"itemRef",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"ItemDefinition",superClass:["RootElement"],properties:[{name:"itemKind",type:"ItemKind",isAttr:!0},{name:"structureRef",type:"String",isAttr:!0},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"import",type:"Import",isAttr:!0,isReference:!0}]},{name:"FlowElement",isAbstract:!0,superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"auditing",type:"Auditing"},{name:"monitoring",type:"Monitoring"},{name:"categoryValueRef",type:"CategoryValue",isMany:!0,isReference:!0}]},{name:"SequenceFlow",superClass:["FlowElement"],properties:[{name:"isImmediate",isAttr:!0,type:"Boolean"},{name:"conditionExpression",type:"Expression",xml:{serialize:"xsi:type"}},{name:"sourceRef",type:"FlowNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"FlowNode",isAttr:!0,isReference:!0}]},{name:"FlowElementsContainer",isAbstract:!0,superClass:["BaseElement"],properties:[{name:"laneSets",type:"LaneSet",isMany:!0},{name:"flowElements",type:"FlowElement",isMany:!0}]},{name:"CallableElement",isAbstract:!0,superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"ioSpecification",type:"InputOutputSpecification",xml:{serialize:"property"}},{name:"supportedInterfaceRef",type:"Interface",isMany:!0,isReference:!0},{name:"ioBinding",type:"InputOutputBinding",isMany:!0,xml:{serialize:"property"}}]},{name:"FlowNode",isAbstract:!0,superClass:["FlowElement"],properties:[{name:"incoming",type:"SequenceFlow",isMany:!0,isReference:!0},{name:"outgoing",type:"SequenceFlow",isMany:!0,isReference:!0},{name:"lanes",type:"Lane",isVirtual:!0,isMany:!0,isReference:!0}]},{name:"CorrelationPropertyRetrievalExpression",superClass:["BaseElement"],properties:[{name:"messagePath",type:"FormalExpression"},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"CorrelationPropertyBinding",superClass:["BaseElement"],properties:[{name:"dataPath",type:"FormalExpression"},{name:"correlationPropertyRef",type:"CorrelationProperty",isAttr:!0,isReference:!0}]},{name:"Resource",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"resourceParameters",type:"ResourceParameter",isMany:!0}]},{name:"ResourceParameter",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isRequired",isAttr:!0,type:"Boolean"},{name:"type",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"CorrelationSubscription",superClass:["BaseElement"],properties:[{name:"correlationKeyRef",type:"CorrelationKey",isAttr:!0,isReference:!0},{name:"correlationPropertyBinding",type:"CorrelationPropertyBinding",isMany:!0}]},{name:"MessageFlow",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"sourceRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"MessageFlowAssociation",superClass:["BaseElement"],properties:[{name:"innerMessageFlowRef",type:"MessageFlow",isAttr:!0,isReference:!0},{name:"outerMessageFlowRef",type:"MessageFlow",isAttr:!0,isReference:!0}]},{name:"InteractionNode",isAbstract:!0,properties:[{name:"incomingConversationLinks",type:"ConversationLink",isVirtual:!0,isMany:!0,isReference:!0},{name:"outgoingConversationLinks",type:"ConversationLink",isVirtual:!0,isMany:!0,isReference:!0}]},{name:"Participant",superClass:["InteractionNode","BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"interfaceRef",type:"Interface",isMany:!0,isReference:!0},{name:"participantMultiplicity",type:"ParticipantMultiplicity"},{name:"endPointRefs",type:"EndPoint",isMany:!0,isReference:!0},{name:"processRef",type:"Process",isAttr:!0,isReference:!0}]},{name:"ParticipantAssociation",superClass:["BaseElement"],properties:[{name:"innerParticipantRef",type:"Participant",isAttr:!0,isReference:!0},{name:"outerParticipantRef",type:"Participant",isAttr:!0,isReference:!0}]},{name:"ParticipantMultiplicity",properties:[{name:"minimum",default:0,isAttr:!0,type:"Integer"},{name:"maximum",default:1,isAttr:!0,type:"Integer"}],superClass:["BaseElement"]},{name:"Collaboration",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isClosed",isAttr:!0,type:"Boolean"},{name:"participants",type:"Participant",isMany:!0},{name:"messageFlows",type:"MessageFlow",isMany:!0},{name:"artifacts",type:"Artifact",isMany:!0},{name:"conversations",type:"ConversationNode",isMany:!0},{name:"conversationAssociations",type:"ConversationAssociation"},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0},{name:"messageFlowAssociations",type:"MessageFlowAssociation",isMany:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0},{name:"choreographyRef",type:"Choreography",isMany:!0,isReference:!0},{name:"conversationLinks",type:"ConversationLink",isMany:!0}]},{name:"ChoreographyActivity",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"participantRefs",type:"Participant",isMany:!0,isReference:!0},{name:"initiatingParticipantRef",type:"Participant",isAttr:!0,isReference:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0},{name:"loopType",type:"ChoreographyLoopType",default:"None",isAttr:!0}]},{name:"CallChoreography",superClass:["ChoreographyActivity"],properties:[{name:"calledChoreographyRef",type:"Choreography",isAttr:!0,isReference:!0},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0}]},{name:"SubChoreography",superClass:["ChoreographyActivity","FlowElementsContainer"],properties:[{name:"artifacts",type:"Artifact",isMany:!0}]},{name:"ChoreographyTask",superClass:["ChoreographyActivity"],properties:[{name:"messageFlowRef",type:"MessageFlow",isMany:!0,isReference:!0}]},{name:"Choreography",superClass:["FlowElementsContainer","Collaboration"]},{name:"GlobalChoreographyTask",superClass:["Choreography"],properties:[{name:"initiatingParticipantRef",type:"Participant",isAttr:!0,isReference:!0}]},{name:"TextAnnotation",superClass:["Artifact"],properties:[{name:"text",type:"String"},{name:"textFormat",default:"text/plain",isAttr:!0,type:"String"}]},{name:"Group",superClass:["Artifact"],properties:[{name:"categoryValueRef",type:"CategoryValue",isAttr:!0,isReference:!0}]},{name:"Association",superClass:["Artifact"],properties:[{name:"associationDirection",type:"AssociationDirection",isAttr:!0},{name:"sourceRef",type:"BaseElement",isAttr:!0,isReference:!0},{name:"targetRef",type:"BaseElement",isAttr:!0,isReference:!0}]},{name:"Category",superClass:["RootElement"],properties:[{name:"categoryValue",type:"CategoryValue",isMany:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Artifact",isAbstract:!0,superClass:["BaseElement"]},{name:"CategoryValue",superClass:["BaseElement"],properties:[{name:"categorizedFlowElements",type:"FlowElement",isVirtual:!0,isMany:!0,isReference:!0},{name:"value",isAttr:!0,type:"String"}]},{name:"Activity",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"isForCompensation",default:!1,isAttr:!0,type:"Boolean"},{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0},{name:"ioSpecification",type:"InputOutputSpecification",xml:{serialize:"property"}},{name:"boundaryEventRefs",type:"BoundaryEvent",isMany:!0,isReference:!0},{name:"properties",type:"Property",isMany:!0},{name:"dataInputAssociations",type:"DataInputAssociation",isMany:!0},{name:"dataOutputAssociations",type:"DataOutputAssociation",isMany:!0},{name:"startQuantity",default:1,isAttr:!0,type:"Integer"},{name:"resources",type:"ResourceRole",isMany:!0},{name:"completionQuantity",default:1,isAttr:!0,type:"Integer"},{name:"loopCharacteristics",type:"LoopCharacteristics"}]},{name:"ServiceTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"SubProcess",superClass:["Activity","FlowElementsContainer","InteractionNode"],properties:[{name:"triggeredByEvent",default:!1,isAttr:!0,type:"Boolean"},{name:"artifacts",type:"Artifact",isMany:!0}]},{name:"LoopCharacteristics",isAbstract:!0,superClass:["BaseElement"]},{name:"MultiInstanceLoopCharacteristics",superClass:["LoopCharacteristics"],properties:[{name:"isSequential",default:!1,isAttr:!0,type:"Boolean"},{name:"behavior",type:"MultiInstanceBehavior",default:"All",isAttr:!0},{name:"loopCardinality",type:"Expression",xml:{serialize:"xsi:type"}},{name:"loopDataInputRef",type:"ItemAwareElement",isReference:!0},{name:"loopDataOutputRef",type:"ItemAwareElement",isReference:!0},{name:"inputDataItem",type:"DataInput",xml:{serialize:"property"}},{name:"outputDataItem",type:"DataOutput",xml:{serialize:"property"}},{name:"complexBehaviorDefinition",type:"ComplexBehaviorDefinition",isMany:!0},{name:"completionCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"oneBehaviorEventRef",type:"EventDefinition",isAttr:!0,isReference:!0},{name:"noneBehaviorEventRef",type:"EventDefinition",isAttr:!0,isReference:!0}]},{name:"StandardLoopCharacteristics",superClass:["LoopCharacteristics"],properties:[{name:"testBefore",default:!1,isAttr:!0,type:"Boolean"},{name:"loopCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"loopMaximum",type:"Integer",isAttr:!0}]},{name:"CallActivity",superClass:["Activity"],properties:[{name:"calledElement",type:"String",isAttr:!0}]},{name:"Task",superClass:["Activity","InteractionNode"]},{name:"SendTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"ReceiveTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"instantiate",default:!1,isAttr:!0,type:"Boolean"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"ScriptTask",superClass:["Task"],properties:[{name:"scriptFormat",isAttr:!0,type:"String"},{name:"script",type:"String"}]},{name:"BusinessRuleTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"}]},{name:"AdHocSubProcess",superClass:["SubProcess"],properties:[{name:"completionCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"ordering",type:"AdHocOrdering",isAttr:!0},{name:"cancelRemainingInstances",default:!0,isAttr:!0,type:"Boolean"}]},{name:"Transaction",superClass:["SubProcess"],properties:[{name:"protocol",isAttr:!0,type:"String"},{name:"method",isAttr:!0,type:"String"}]},{name:"GlobalScriptTask",superClass:["GlobalTask"],properties:[{name:"scriptLanguage",isAttr:!0,type:"String"},{name:"script",isAttr:!0,type:"String"}]},{name:"GlobalBusinessRuleTask",superClass:["GlobalTask"],properties:[{name:"implementation",isAttr:!0,type:"String"}]},{name:"ComplexBehaviorDefinition",superClass:["BaseElement"],properties:[{name:"condition",type:"FormalExpression"},{name:"event",type:"ImplicitThrowEvent"}]},{name:"ResourceRole",superClass:["BaseElement"],properties:[{name:"resourceRef",type:"Resource",isReference:!0},{name:"resourceParameterBindings",type:"ResourceParameterBinding",isMany:!0},{name:"resourceAssignmentExpression",type:"ResourceAssignmentExpression"},{name:"name",isAttr:!0,type:"String"}]},{name:"ResourceParameterBinding",properties:[{name:"expression",type:"Expression",xml:{serialize:"xsi:type"}},{name:"parameterRef",type:"ResourceParameter",isAttr:!0,isReference:!0}],superClass:["BaseElement"]},{name:"ResourceAssignmentExpression",properties:[{name:"expression",type:"Expression",xml:{serialize:"xsi:type"}}],superClass:["BaseElement"]},{name:"Import",properties:[{name:"importType",isAttr:!0,type:"String"},{name:"location",isAttr:!0,type:"String"},{name:"namespace",isAttr:!0,type:"String"}]},{name:"Definitions",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"targetNamespace",isAttr:!0,type:"String"},{name:"expressionLanguage",default:"http://www.w3.org/1999/XPath",isAttr:!0,type:"String"},{name:"typeLanguage",default:"http://www.w3.org/2001/XMLSchema",isAttr:!0,type:"String"},{name:"imports",type:"Import",isMany:!0},{name:"extensions",type:"Extension",isMany:!0},{name:"rootElements",type:"RootElement",isMany:!0},{name:"diagrams",isMany:!0,type:"bpmndi:BPMNDiagram"},{name:"exporter",isAttr:!0,type:"String"},{name:"relationships",type:"Relationship",isMany:!0},{name:"exporterVersion",isAttr:!0,type:"String"}]}],enumerations:[{name:"ProcessType",literalValues:[{name:"None"},{name:"Public"},{name:"Private"}]},{name:"GatewayDirection",literalValues:[{name:"Unspecified"},{name:"Converging"},{name:"Diverging"},{name:"Mixed"}]},{name:"EventBasedGatewayType",literalValues:[{name:"Parallel"},{name:"Exclusive"}]},{name:"RelationshipDirection",literalValues:[{name:"None"},{name:"Forward"},{name:"Backward"},{name:"Both"}]},{name:"ItemKind",literalValues:[{name:"Physical"},{name:"Information"}]},{name:"ChoreographyLoopType",literalValues:[{name:"None"},{name:"Standard"},{name:"MultiInstanceSequential"},{name:"MultiInstanceParallel"}]},{name:"AssociationDirection",literalValues:[{name:"None"},{name:"One"},{name:"Both"}]},{name:"MultiInstanceBehavior",literalValues:[{name:"None"},{name:"One"},{name:"All"},{name:"Complex"}]},{name:"AdHocOrdering",literalValues:[{name:"Parallel"},{name:"Sequential"}]}],prefix:"bpmn",xml:{tagAlias:"lowerCase",typePrefix:"t"}}},function(e,t){e.exports={name:"BPMNDI",uri:"http://www.omg.org/spec/BPMN/20100524/DI",types:[{name:"BPMNDiagram",properties:[{name:"plane",type:"BPMNPlane",redefines:"di:Diagram#rootElement"},{name:"labelStyle",type:"BPMNLabelStyle",isMany:!0}],superClass:["di:Diagram"]},{name:"BPMNPlane",properties:[{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"}],superClass:["di:Plane"]},{name:"BPMNShape",properties:[{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"},{name:"isHorizontal",isAttr:!0,type:"Boolean"},{name:"isExpanded",isAttr:!0,type:"Boolean"},{name:"isMarkerVisible",isAttr:!0,type:"Boolean"},{name:"label",type:"BPMNLabel"},{name:"isMessageVisible",isAttr:!0,type:"Boolean"},{name:"participantBandKind",type:"ParticipantBandKind",isAttr:!0},{name:"choreographyActivityShape",type:"BPMNShape",isAttr:!0,isReference:!0}],superClass:["di:LabeledShape"]},{name:"BPMNEdge",properties:[{name:"label",type:"BPMNLabel"},{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"},{name:"sourceElement",isAttr:!0,isReference:!0,type:"di:DiagramElement",redefines:"di:Edge#source"},{name:"targetElement",isAttr:!0,isReference:!0,type:"di:DiagramElement",redefines:"di:Edge#target"},{name:"messageVisibleKind",type:"MessageVisibleKind",isAttr:!0,default:"initiating"}],superClass:["di:LabeledEdge"]},{name:"BPMNLabel",properties:[{name:"labelStyle",type:"BPMNLabelStyle",isAttr:!0,isReference:!0,redefines:"di:DiagramElement#style"}],superClass:["di:Label"]},{name:"BPMNLabelStyle",properties:[{name:"font",type:"dc:Font"}],superClass:["di:Style"]}],enumerations:[{name:"ParticipantBandKind",literalValues:[{name:"top_initiating"},{name:"middle_initiating"},{name:"bottom_initiating"},{name:"top_non_initiating"},{name:"middle_non_initiating"},{name:"bottom_non_initiating"}]},{name:"MessageVisibleKind",literalValues:[{name:"initiating"},{name:"non_initiating"}]}],associations:[],prefix:"bpmndi"}},function(e,t){e.exports={name:"DC",uri:"http://www.omg.org/spec/DD/20100524/DC",types:[{name:"Boolean"},{name:"Integer"},{name:"Real"},{name:"String"},{name:"Font",properties:[{name:"name",type:"String",isAttr:!0},{name:"size",type:"Real",isAttr:!0},{name:"isBold",type:"Boolean",isAttr:!0},{name:"isItalic",type:"Boolean",isAttr:!0},{name:"isUnderline",type:"Boolean",isAttr:!0},{name:"isStrikeThrough",type:"Boolean",isAttr:!0}]},{name:"Point",properties:[{name:"x",type:"Real",default:"0",isAttr:!0},{name:"y",type:"Real",default:"0",isAttr:!0}]},{name:"Bounds",properties:[{name:"x",type:"Real",default:"0",isAttr:!0},{name:"y",type:"Real",default:"0",isAttr:!0},{name:"width",type:"Real",isAttr:!0},{name:"height",type:"Real",isAttr:!0}]}],prefix:"dc",associations:[]}},function(e,t){e.exports={name:"DI",uri:"http://www.omg.org/spec/DD/20100524/DI",types:[{name:"DiagramElement",isAbstract:!0,properties:[{name:"id",type:"String",isAttr:!0,isId:!0},{name:"extension",type:"Extension"},{name:"owningDiagram",type:"Diagram",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"owningElement",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"modelElement",isReadOnly:!0,isVirtual:!0,isReference:!0,type:"Element"},{name:"style",type:"Style",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"ownedElement",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isMany:!0}]},{name:"Node",isAbstract:!0,superClass:["DiagramElement"]},{name:"Edge",isAbstract:!0,superClass:["DiagramElement"],properties:[{name:"source",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"target",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"waypoint",isUnique:!1,isMany:!0,type:"dc:Point",xml:{serialize:"xsi:type"}}]},{name:"Diagram",isAbstract:!0,properties:[{name:"id",type:"String",isAttr:!0,isId:!0},{name:"rootElement",type:"DiagramElement",isReadOnly:!0,isVirtual:!0},{name:"name",isAttr:!0,type:"String"},{name:"documentation",isAttr:!0,type:"String"},{name:"resolution",isAttr:!0,type:"Real"},{name:"ownedStyle",type:"Style",isReadOnly:!0,isVirtual:!0,isMany:!0}]},{name:"Shape",isAbstract:!0,superClass:["Node"],properties:[{name:"bounds",type:"dc:Bounds"}]},{name:"Plane",isAbstract:!0,superClass:["Node"],properties:[{name:"planeElement",type:"DiagramElement",subsettedProperty:"DiagramElement-ownedElement",isMany:!0}]},{name:"LabeledEdge",isAbstract:!0,superClass:["Edge"],properties:[{name:"ownedLabel",type:"Label",isReadOnly:!0,subsettedProperty:"DiagramElement-ownedElement",isVirtual:!0,isMany:!0}]},{name:"LabeledShape",isAbstract:!0,superClass:["Shape"],properties:[{name:"ownedLabel",type:"Label",isReadOnly:!0,subsettedProperty:"DiagramElement-ownedElement",isVirtual:!0,isMany:!0}]},{name:"Label",isAbstract:!0,superClass:["Node"],properties:[{name:"bounds",type:"dc:Bounds"}]},{name:"Style",isAbstract:!0,properties:[{name:"id",type:"String",isAttr:!0,isId:!0}]},{name:"Extension",properties:[{name:"values",type:"Element",isMany:!0}]}],associations:[],prefix:"di",xml:{tagAlias:"lowerCase"}}},function(e,t,n){"use strict";var i=n(47);t.a=i.a},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=(n(0),n(2)),a=n(3),o=n(1),s=function(){function e(e,t){for(var n=0;n').appendTo(p)),h.attr({width:i,height:s});var f=h[0].getContext("2d");f.clearRect(0,0,i,s);var d=i-0,y=s-0;f.fillStyle="rgb("+l+")",f.beginPath(),f.rect(0,0,d,y),f.fill();var m=Math.round(Object(o.k)(n.size));m<10&&(m=10),f.translate(0,0),f.lineWidth=1,f.save();for(var g=.5,v=0;g<=y;)f.restore(),f.strokeStyle=v%4==0?"rgb("+u+")":"rgb("+c+")",f.beginPath(),f.moveTo(0,g),f.lineTo(d,g),g+=m,v++,f.stroke();for(g=.5,v=0;g<=d;)f.restore(),f.strokeStyle=v%4==0?"rgb("+u+")":"rgb("+c+")",f.beginPath(),f.moveTo(g,0),f.lineTo(g,y),g+=m,v++,f.stroke()}}}]),e}();t.a=c},function(e,t,n){"use strict";var i=n(49);t.a=i.a},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=n(0),a=n(2),o=n(1),s=n(3),l=function(){function e(e,t){for(var n=0;n").appendTo(n),p=Object(o.k)(c.lineStyle.lineWidth+2);p<5&&(p=5);var h=p/2;r.half=h,r.dom=u,u.css({width:p,height:p,"-webkit-border-radius":h,"-moz-border-radius":h,"-ms-border-radius":h,"-o-border-radius":h,"border-radius":h,"z-index":Object(a.a)("#"+l.id).css("z-index")})}this.interval=setInterval(function(){for(var t=0;t=n.maxT&&(n.t=0,n.dom.show());var s=n.t;if("broken"===a.linkerType)for(var l=1;l=c.t&&s=1&&n.dom.hide()}},30)}},{key:"hideDirection",value:function(){this.interval&&clearInterval(this.interval),this.$container.find(".connection-direction").remove()}}]),e}();t.a=u},function(e,t,n){"use strict";var i=n(51);t.a=i.a},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=n(0),a=n(2),o=n(3),s=n(1),l=function(){function e(e,t){for(var n=0;n0)){f=Object(a.a)("
").appendTo(h),f.css({left:Object(s.k)(l.bounds.x),top:Object(s.k)(l.bounds.y),"z-index":u.length+1}),p.indexOf(i.id)>=0||f.addClass("shape-contour-hover");for(var d=t.size-2,y={"border-color":t.color,"border-radius":t.size/2,width:d,height:d},m=c.getAnchors(),g={x:l.bounds.width/2,y:l.bounds.height/2},v=0;v").appendTo(f),w=o.a.getRotated(g,x,c.shapeStyle.angle);y.left=Object(s.k)(w.x)-t.size/2,y.top=Object(s.k)(w.y)-t.size/2,b.css(y)}}}},{key:"moveAnchors",value:function(e){for(var t=e.elements,n=(e.pos,0);n20||Math.abs(t.y-d.y)>20?(r.a.trigger("element.add",f),null==f.data.targetRef&&null!=f.data.sourceRef&&r.a.trigger("group.connection.show",f)):l.find('.shape-box[data-id="'+f.data.id+'"]').remove(),Object(a.a)(document).off("mouseup.dropConnection")})}),Object(a.a)(document).on("mouseup.connection",function(){r.a.trigger("anchor.point.remove"),t.reset(),u.off("mousedown.connection"),u.off("mousemove.connection"),Object(a.a)(document).off("mouseup.connection")})})}},{key:"showAnchorPoint",value:function(e){var t=this.config,n=this.$container,i=r.a.trigger("orders.get"),o=n.find(".bpd-designer"),s=o.find(".anchor-point");if(0===s.length){s=Object(a.a)("").appendTo(o);var l=s[0].getContext("2d");l.translate(1,1),l.lineWidth=1,l.globalAlpha=.3,l.strokeStyle=t.color,l.fillStyle=t.color,l.beginPath(),l.moveTo(0,15),l.bezierCurveTo(0,-5,30,-5,30,15),l.bezierCurveTo(30,35,0,35,0,15),l.closePath(),l.fill(),l.stroke()}s.css({left:e.x-16,top:e.y-16,"z-index":i.length}).show()}},{key:"hideAnchorPoint",value:function(){this.$container.find(".anchor-point").remove()}},{key:"createConnection",value:function(e,t){var n=r.a.trigger("element.create",{name:"",type:"SequenceFlow",prefix:"obj"}),i=n.data,a=n.plane;return i.sourceRef=e.id,a.waypoint.length>1?a.waypoint[a.waypoint.length-1]={$type:"dc:Point",x:t.x,y:t.y,angle:null}:(a.waypoint[0]={$type:"dc:Point",x:e.x,y:e.y,angle:e.angle},a.waypoint[1]={$type:"dc:Point",x:t.x,y:t.y,angle:null}),r.a.trigger("connection.render",{element:n}),n}},{key:"destroy",value:function(){this.hideAnchors()}}]),e}();t.a=u},function(e,t,n){"use strict";var i=n(53);t.a=i.a},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=n(0),a=n(2),o=n(1),s=n(3),l=function(){function e(e,t){for(var n=0;n").appendTo(l));var t=s.a.getRelativePos(e.pageX,e.pageY,l),i={"z-index":c.length,left:t.x,top:t.y};t.x>r.x&&(i.left=r.x),t.y>r.y&&(i.top=r.y),i.width=Math.abs(t.x-r.x),i.height=Math.abs(t.y-r.y),n.css(i)}),Object(a.a)(document).off("mouseup.multiselect").on("mouseup.multiselect",function(e){if(null!=n){var r={x:Object(o.i)(n.position().left),y:Object(o.i)(n.position().top),width:Object(o.i)(n.width()),height:Object(o.i)(n.height())},l=s.a.getElementIdsByRange(r);if(e.ctrlKey){var c=u.getSelectedIds();Object(o.h)(l,c)}u.unselect(),u.selectShape({ids:l}),n.remove()}t.reset(),Object(a.a)(document).off("mouseup.multiselect"),i.off("mousemove.multiselect")})}i.off("mousedown.multiselect")})}},{key:"getSelectedIds",value:function(){return this.selectIds}},{key:"getSelected",value:function(){for(var e=[],t=0;t0&&!h&&this.renderSelectBox(p),this.config.onSelected&&(1===p.length?this.config.onSelected(Object(o.j)(this.getSelected()[0])):this.config.onSelected(null)),r.a.trigger("direction.show")}}},{key:"renderSelectBox",value:function(e){var t=this.$container,n=(t.find(".bpd-layout"),t.find(".bpd-designer")),i=r.a.trigger("orders.get"),l=n.find(".shape-select");0===l.length&&(l=Object(a.a)("
").appendTo(n)),l.show(),r.a.trigger("group.hide",l);var c=0,u={};if(1===e.length){var p=r.a.trigger("element.get",e[0]);u.angle=c=p.shape.shapeStyle.angle,u.zindex=p.shape.shapeStyle.zindex,u.height=p.plane.bounds.height,u.width=p.plane.bounds.width,u.x=p.plane.bounds.x,u.y=p.plane.bounds.y,p.shape.groupName&&"CallActivity"!==p.shape.groupName&&r.a.trigger("group.show",this.getSelected())}else u=s.a.getElementsBox(e);var h=s.a.getRotatedBox(u,c);this.renderControlBound(l,u,h,c),l.css({left:Object(o.k)(h.x),top:Object(o.k)(h.y),width:Object(o.k)(h.width),height:Object(o.k)(h.height),"z-index":i.length,display:"block"})}},{key:"renderControlBound",value:function(e,t,n,i){var r=this.config,a=Object(o.k)(n.width),s=Object(o.k)(n.height),l=a+20,c=s+20,u=e.find(".shape-bound");u.attr({width:l,height:c});var p=u[0].getContext("2d");p.lineJoin="round",p.lineWidth=1,p.strokeStyle=r.color,p.globalAlpha=.5,p.save(),p.clearRect(0,0,l,c),p.translate(l/2,c/2),p.rotate(i),p.translate(-l/2,-c/2),p.translate(9.5,9.5);var h={x:Object(o.k)(Math.round(t.x-n.x)),y:Object(o.k)(Math.round(t.y-n.y)),width:Math.floor(Object(o.k)(t.width)+1),heigth:Math.floor(Object(o.k)(t.height)+1)};p.strokeRect(h.x,h.y,h.width,h.heigth),p.restore()}},{key:"moveSelect",value:function(e){var t=e.elements,n=e.pos,i=s.a.getSelectedConnectionIds();if(1!==t.length||1!==i.length)if(i.length>0){var a=r.a.trigger("shape.select.getIds");this.renderSelectBox(a)}else{var o=this.$container.find(".shape-select");o.css({left:parseFloat(o.css("left"))+n.x,top:parseFloat(o.css("top"))+n.y})}}},{key:"unselect",value:function(){var e=this.selectIds;this.selectIds=[];for(var t=0;t=0}},{key:"destroy",value:function(){var e=this.$container.find(".bpd-layout");this.$container.find(".bpd-designer").off("mousedown.select"),e.off("mousedown.multiselect")}}]),e}();t.a=u},function(e,t,n){"use strict";var i=n(55);t.a=i.a},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=n(0),a=n(2),o=n(3),s=n(1),l=function(){function e(e,t){for(var n=0;n=0?(null!=p.sourceRef&&n.indexOf(p.sourceRef)>=0&&(h.waypoint[0].x+=l.x,h.waypoint[0].y+=l.y,d=!0),null!=p.targetRef&&n.indexOf(p.targetRef)>=0&&(h.waypoint[h.waypoint.length-1].x+=l.x,h.waypoint[h.waypoint.length-1].y+=l.y,y=!0)):((null==p.sourceRef||n.indexOf(p.sourceRef)>=0)&&(h.waypoint[0].x+=l.x,h.waypoint[0].y+=l.y,d=!0),(null==p.targetRef||n.indexOf(p.targetRef)>=0)&&(h.waypoint[h.waypoint.length-1].x+=l.x,h.waypoint[h.waypoint.length-1].y+=l.y,y=!0)),d&&y){for(var m=0;m=c.x-6&&p.x<=c.x+6&&(l.x=c.x),p.y>=c.y-6&&p.y<=c.y+6&&(l.y=c.y))):(e.data.targetRef=h,c.x=p.x,c.y=p.y,c.angle=p.angle,null==h&&(p.x>=l.x-6&&p.x<=l.x+6&&(c.x=l.x),p.y>=l.y-6&&p.y<=l.y+6&&(c.y=l.y))),r.a.trigger("connection.render",{element:e,rendered:!0})}},{key:"moveDom",value:function(e,t,n){var i=e.data,r=e.plane;e.shape;r.bounds.x+=t.x,r.bounds.y+=t.y;var a=this.$container.find('.shape-box[data-id="'+i.id+'"]');a.css({left:parseFloat(a.css("left"))+n.x,top:parseFloat(a.css("top"))+n.y})}},{key:"destroy",value:function(){this.$container.find(".bpd-designer").off("mousedown.drag").off("mousedown.dragconnection")}}]),e}();t.a=c},function(e,t,n){"use strict";var i=n(57);t.a=i.a},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=n(0),a=n(2),o=(n(3),n(1)),s=function(){function e(e,t){for(var n=0;n=0;v--){var x=l[v].id,b=r.a.trigger("element.get",x),w=(b.data,b.plane),E=b.shape;if(!("SequenceFlow"===E.bpmnName||t.indexOf(x)>=0||E.parent)){var S=w.bounds;if(null==g.h){var k=S.y,C=S.y+S.height/2,A=S.y+S.height;C>=m-2&&C<=m+2?(g.h={type:"middle",y:C},e.y=C-e.height/2):k>=p-2&&k<=p+2?(g.h={type:"top",y:k},e.y=k):A>=h-2&&A<=h+2?(g.h={type:"bottom",y:A},e.y=A-e.height):A>=p-2&&A<=p+2?(g.h={type:"top",y:A},e.y=A):k>=h-2&&k<=h+2&&(g.h={type:"bottom",y:k},e.y=k-e.height)}if(null==g.v){var O=S.x,R=S.x+S.width/2,P=S.x+S.width;R>=y-2&&R<=y+2?(g.v={type:"center",x:R},e.x=R-e.width/2):O>=f-2&&O<=f+2?(g.v={type:"left",x:O},e.x=O):P>=d-2&&P<=d+2?(g.v={type:"right",x:P},e.x=P-e.width):P>=f-2&&P<=f+2?(g.v={type:"left",x:P},e.x=P):O>=d-2&&O<=d+2&&(g.v={type:"right",x:O},e.x=O-e.width)}if(null!=g.h&&null!=g.v)break}}if(this.hideSnapLine(),null!=g.attach){var T=u.find(".snapline-attach");0===T.length&&(T=Object(a.a)("
").appendTo(u));var M=g.attach,j=M.lineStyle.lineWidth;T.css({width:Object(o.k)(M.props.w+j),height:Object(o.k)(M.props.h+j),left:Object(o.k)(M.props.x-j/2)-2,top:Object(o.k)(M.props.y-j/2)-2,"z-index":Object(a.a)("#"+M.id).css("z-index")}).show()}if(null!=g.h){var N=u.find(".snapline-attach-h");0===N.length&&(N=Object(a.a)("
").appendTo(u)),N.css({width:u.width(),left:0,top:Math.round(Object(o.k)(g.h.y)),"z-index":l.length+1}).show()}if(null!=g.v){var D=u.find(".snapline-attach-v");0===D.length&&(D=Object(a.a)("
").appendTo(u)),D.css({height:u.height(),top:0,left:Math.round(Object(o.k)(g.v.x)),"z-index":l.length+1}).show()}return g}},{key:"showSnapLine",value:function(e){var t=e.size,n=e.ids,i=e.render,r=e.element;this.renderSnapLine(t,n,i,r)}},{key:"hideSnapLine",value:function(){var e=this.$container,t=e.find(".bpd-designer");t.find(".snapline-attach-h").hide(),t.find(".snapline-attach-v").hide(),t.find(".snapline-attach").hide()}}]),e}();t.a=c},function(e,t,n){"use strict";var i=n(59);t.a=i.a},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=n(0),a=n(2),o=(n(3),n(1)),s=function(){function e(e,t){for(var n=0;n").appendTo(n)),e||(e="X: "+Math.round(Object(o.i)(s.left))+"  Y: "+Math.round(Object(o.i)(s.top))),c.html(e),c.css({top:s.top+i.height()+5,left:s.left+i.width()/2-c.outerWidth()/2,"z-index":l.length}).show()}},{key:"hideTooltip",value:function(){this.$container.find(".shape-tooltip").hide()}}]),e}();t.a=c},function(e,t,n){"use strict";var i=n(61);t.a=i.a},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=n(0),a=n(2),o=function(){function e(e,t){for(var n=0;n=0&&(r.x=t.originalEvent.targetTouches[0].clientX,r.y=t.originalEvent.targetTouches[0].clientY),e.moveHand(i,r)}),Object(a.a)(document).on("touchend.hand mouseup.hand",function(){e.flag=!1})}},{key:"moveHand",value:function(e,t){var n=this,i=this.pageStyle,r=this.$container,a=r.find(".bpd-layout");this.$container.on("touchmove.hand mousemove.hand",function(r){if(n.flag){var o=r.clientX-t.x,s=r.clientY-t.y;r.type.indexOf("touch")>=0&&(o=r.originalEvent.targetTouches[0].clientX-t.x,s=r.originalEvent.targetTouches[0].clientY-t.y);var l=e.top+s;l>0?l=0:l<-i.height&&(l=-i.height+window.innerHeight);var c=e.left+o;c>0?c=0:c<-i.width&&(c=-i.width+window.innerWidth),a.offset({top:l,left:c})}})}},{key:"destroyHand",value:function(){this.$container.off("mousedown.hand touchstart.hand mousemove.hand touchmove.hand"),Object(a.a)(document).off("mouseup.hand touchend.hand")}}]),e}();t.a=s},function(e,t,n){"use strict";var i=n(63);t.a=i.a},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=n(0),a=n(2),o=n(3),s=n(1),l=function(){function e(e,t){for(var n=0;n0){var h=l.find(".group-icon");h.length<=0&&(h=Object(a.a)("
").appendTo(l));for(var f=r.a.trigger("group.get",u.groupName)||[],d=[],y=0;y').appendTo(h);for(var y=r.a.trigger("group.get",e),m=0;m').appendTo(d);this.renderItem(x.children("canvas")[0],v)}}d.on("mousedown",function(e){e.stopPropagation()})}return d.css({left:t,top:n,"z-index":f.length+1}).show(),d.children(".group-item").off().on("click",function(){var e=Object(a.a)(this).attr("data-shape");i(e),d.hide(),Object(a.a)(document).off("mousedown.group-panel")}),Object(a.a)(document).on("mousedown.group-panel",function(){d.hide(),Object(a.a)(document).off("mousedown.group-panel")}),d}},{key:"hideGroup",value:function(e){(e||this.$container).find(".group-icon").hide()}},{key:"showConnectionGroup",value:function(e){var t=this.$container,n=(this.config,this.bpmns),i=this.filter,o=(e.data,e.plane),l=(e.shape,this),c=r.a.trigger("orders.get"),p=t.find(".bpd-designer");t.find(".connection-group-panel").hide();var h=t.find('.connection-group-panel[data-group="bpmn"]');if(0===h.length){h=Object(a.a)("
").appendTo(p);var f=r.a.trigger("group.get");for(var d in f){for(var y=[],m=0;m0){var g=f[d][0],v=r.a.trigger("shape.create",{type:g,element:Object(s.c)(u)});v.data.text=r.a.trigger("i18n","bpmn."+v.shape.bpmnName),this.renderConnectionItem(v,y,h)}}h.on("mousemove",function(e){e.stopPropagation()}).on("mousedown",function(e){e.stopPropagation()})}h.css({left:Object(s.k)(o.waypoint[o.waypoint.length-1].x),top:Object(s.k)(o.waypoint[o.waypoint.length-1].y),"z-index":c.length}).show(),h.find(".group-icon").off().on("mousedown",function(t){t.stopPropagation();var n=Object(a.a)(this).data("group"),i=Object(a.a)(this).parent().position(),r=h.position(),o=r.left+i.left+Object(a.a)(this).parent().outerWidth()-10,s=r.top+i.top+Object(a.a)(this).parent().outerHeight();l.groupPanel(n,o,s,function(t){l.renderShape(e,t),h.hide(),Object(a.a)(document).off("mousedown.dashboard")})}).on("click",function(e){e.stopPropagation()}),h.children(".group-item").off().on("click",function(){h.hide(),Object(a.a)(document).off("mousedown.dashboard"),l.renderShape(e,Object(a.a)(this).data("shape"))}),Object(a.a)(document).on("mousedown.dashboard",function(){h.hide(),Object(a.a)(document).off("mousedown.dashboard")})}},{key:"renderShape",value:function(e,t){var n=e.plane.waypoint,i=o.a.getEndpointAngle(e.shape,"targetRef"),a=o.a.getAngleDir(i),s=r.a.trigger("i18n","bpmn."+t),l=r.a.trigger("element.create",{name:s,type:t,prefix:"obj"}),c=l.shape.getAnchors(),u=void 0,p=null;switch(a){case 1:p=null;for(var h=0;hp)&&(p=y.x,u=y)}break;case 3:p=null;for(var m=0;mp)&&(p=g.y,u=g)}break;case 4:p=null;for(var v=0;v").appendTo(n);this.renderItem(s.children("canvas")[0],e),t.length>1&&s.append("
")}},{key:"renderItem",value:function(e,t){var n=this.config,i=(t.data,t.plane),a=t.shape,o=e.getContext("2d"),l={x:0,y:0,width:i.bounds.width,height:i.bounds.height};o.clearRect(0,0,n.width,n.height),(l.width>=n.width||l.height>=n.width)&&(i.bounds.width>=i.bounds.height?(l.width=n.width-2*a.lineStyle.lineWidth,l.height=parseInt(i.bounds.height/i.bounds.width*l.width),l.height<20&&(l.height=20)):(l.height=n.height-2*a.lineStyle.lineWidth,l.width=parseInt(i.bounds.width/i.bounds.height*l.height),l.width<20&&(l.width=20))),i.bounds=l;for(var c=Object(s.c)(a.getPath()),u={x:l.x+l.width/2,y:l.y+l.height/2},p=0;p0&&t.preventDefault()}),Object(a.a)(document).off("keydown.hotkey","input,textarea,select").on("keydown.hotkey","input,textarea,select",function(e){e.stopPropagation()})}},{key:"bindKey",value:function(e){var t=e.key,n=e.fun,i=t.split("+");if(1===i.length)if("Ctrl"===i[0]||"Alt"===i[0]||"Shift"===i[0])console.log("error: "+i[0]);else{var r=o.a[i[0]];this.funs[r]||(this.funs[r]=[]),this.funs[r].push(n)}else if(2===i.length)if("Ctrl"===i[0]||"Alt"===i[0]||"Shift"===i[0])if("Ctrl"!==i[1]&&"Alt"!==i[1]&&"Shift"!==i[1]){var a=this.funs[i[0]],s=o.a[i[1]];a[s]||(a[s]=[]),a[s].push(n)}else console.log("组合键2错误");else console.log("组合键1错误");else console.log("组合键数量错误")}},{key:"clearKey",value:function(){this.cancel(),this.funs={Ctrl:{},Alt:{},Shift:{}}}},{key:"cancel",value:function(){Object(a.a)(document).off("keydown.hotkey")}}]),e}();t.a=l},function(e,t,n){"use strict";t.a={0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,Esc:27,BackSpace:8,Tab:9,Spacebar:32,Shift:16,Enter:13,Control:17,Alt:18,Left:37,Up:38,Right:39,Down:40,Insert:45,Delete:46,End:35,Home:36,PageUp:33,PageDown:34}},function(e,t,n){"use strict";var i=n(68);t.a=i.a},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=n(0),a=n(69),o=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"zh_CN";i(this,e),this.local=t,this.init()}return o(e,[{key:"init",value:function(){r.a.on("i18n",this.t.bind(this)),r.a.on("i18n.change",this.change.bind(this))}},{key:"t",value:function(e){for(var t=e.split("."),n=a.a[this.local],i=0;i0&&void 0!==arguments[0]?arguments[0]:"zh_CN";this.local=e}}]),e}();t.a=s},function(e,t,n){"use strict";var i=n(70),r=n(71);t.a={zh_CN:i.a,zh_TW:r.a}},function(e,t,n){"use strict";t.a={bpmn:{StartEvent:"开始事件",MessageStartEvent:"消息开始事件",TimerStartEvent:"时间开始事件",SignalStartEvent:"信号开始事件",UserTask:"人工任务",ServiceTask:"系统任务",ScriptTask:"脚本任务",ManualTask:"手工任务",BusinessRuleTask:"业务规则任务",SendTask:"发送任务",ReceiveTask:"接收任务",ParallelGateway:"并行网关",InclusiveGateway:"包容网关",ExclusiveGateway:"排他网关",EventBasedGateway:"事件网关",ComplexGateway:"复杂网关",IntermediateCatchEvent:"捕获中间事件",TimerIntermediateCatchEvent:"捕获时间事件",MessageIntermediateCatchEvent:"捕获消息事件",SignalIntermediateCatchEvent:"捕获信号事件",IntermediateThrowingEvent:"抛出中间事件",MessageIntermediateThrowingEvent:"抛出消息事件",SignalIntermediateThrowingEvent:"抛出信号事件",CompensateIntermediateThrowingEvent:"抛出补偿事件",BoundaryEvent:"边界事件",CancelBoundaryEvent:"边界取消事件",CompensateBoundaryEvent:"边界补偿事件",ErrorBoundaryEvent:"边界错误事件",MessageBoundaryEvent:"边界消息事件",SignalBoundaryEvent:"边界信号事件",TimerBoundaryEvent:"边界时间事件",CallActivity:"调用子流程",SubProcess:"子流程",Transaction:"事务",TextAnnotation:"注释",HorizontalPool:"泳池",HorizontalLane:"泳道",VerticalPool:"泳池",VerticalLane:"泳道",EndEvent:"结束事件",TerminateEndEvent:"终止事件",MessageEndEvent:"消息结束事件",SignalEndEvent:"信号结束事件",ErrorEndEvent:"错误结束事件",CancelEndEvent:"结束取消事件",CompensateEndEvent:"结束补偿事件"}}},function(e,t,n){"use strict";t.a={bpmn:{StartEvent:"開始事件",MessageStartEvent:"消息開始事件",TimerStartEvent:"時間開始事件",SignalStartEvent:"信號開始事件",UserTask:"人工任務",ServiceTask:"系統任務",ScriptTask:"腳本任務",ManualTask:"手工任務",BusinessRuleTask:"業務規則任務",SendTask:"發送任務",ReceiveTask:"接收任務",ParallelGateway:"並行網關",InclusiveGateway:"包容網關",ExclusiveGateway:"排他網關",EventBasedGateway:"事件網關",ComplexGateway:"復雜網關",IntermediateCatchEvent:"捕獲中間事件",TimerIntermediateCatchEvent:"捕獲時間事件",MessageIntermediateCatchEvent:"捕獲消息事件",SignalIntermediateCatchEvent:"捕獲信號事件",IntermediateThrowingEvent:"拋出中間事件",MessageIntermediateThrowingEvent:"拋出消息事件",SignalIntermediateThrowingEvent:"拋出信號事件",CompensateIntermediateThrowingEvent:"拋出補償事件",BoundaryEvent:"邊界事件",CancelBoundaryEvent:"邊界取消事件",CompensateBoundaryEvent:"邊界補償事件",ErrorBoundaryEvent:"邊界錯誤事件",MessageBoundaryEvent:"邊界消息事件",SignalBoundaryEvent:"邊界信號事件",TimerBoundaryEvent:"邊界時間事件",CallActivity:"調用子流程",SubProcess:"子流程",Transaction:"事務",TextAnnotation:"註釋",HorizontalPool:"泳池",HorizontalLane:"泳道",VerticalPool:"泳池",VerticalLane:"泳道",EndEvent:"結束事件",TerminateEndEvent:"終止事件",MessageEndEvent:"消息結束事件",SignalEndEvent:"信號結束事件",ErrorEndEvent:"錯誤結束事件",CancelEndEvent:"結束取消事件",CompensateEndEvent:"結束補償事件"}}}]); \ No newline at end of file +!function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=9)}([function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=n(1),a=function(){function e(e,t){for(var n=0;n0?e.toLowerCase():null)},s=function(){function e(){i(this,e),this.fns=[],this.datas=[]}return a(e,[{key:"add",value:function(e,t){this.fns.push(e),this.datas.push(t)}},{key:"remove",value:function(e){var t=this.fns.indexOf(e);t>=0&&(this.fns.splice(t,1),this.datas.splice(t,1))}},{key:"invoke",value:function(e,t){var n=this,i=null;return this.fns.forEach(function(r,a){try{i=r(e,t,n.datas[a])}catch(e){console.error(e)}}),i}}]),e}(),l=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,e),this.handers=t}return a(e,[{key:"on",value:function(e,t,n){if(null==(e=o(e)))throw new Error("事件名无效");if(!Object(r.f)(n)){var i=n;n=t,t=i}if(!Object(r.f)(n))throw new Error("必须提供事件函数");var a=this.handers[e];null==a&&(a=new s,this.handers[e]=a),a.add(n,t)}},{key:"off",value:function(e,t){if(null!=(e=o(e))){var n=this.handers[e];null!=n&&(null==t?delete this.handers[e]:n.remove(t))}}},{key:"destroy",value:function(){this.handers={}}},{key:"trigger",value:function(e,t,n){if(null!=(e=o(e))){var i=this.handers[e];return null!=i?i.invoke(t,n):void 0}}}]),e}(),c=new l;t.a=c},function(e,t,n){"use strict";n.d(t,"g",function(){return r}),n.d(t,"f",function(){return a}),n.d(t,"d",function(){return o}),n.d(t,"c",function(){return s}),n.d(t,"h",function(){return l}),n.d(t,"k",function(){return c}),n.d(t,"i",function(){return u}),n.d(t,"e",function(){return p}),n.d(t,"a",function(){return h}),n.d(t,"b",function(){return f}),n.d(t,"j",function(){return d});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=document.createElement("span");n.innerHTML="",n.style.visibility="hidden",n.style.fontSize="500px",document.body.appendChild(n);var i=n.offsetWidth,r=n.offsetHeight;n.style.fontFamily=e;var a=setInterval(function(){n.offsetWidth===i&&n.offsetHeight===r||(clearInterval(a),document.body.removeChild(n),n=null,t())},50)},a=function(e){return"function"==typeof e},o=function(e,t){return"uppercase"===t?e.substring(0,1).toUpperCase()+e.substring(1):e.substring(0,1).toLowerCase()+e.substring(1)},s=function(e){return JSON.parse(JSON.stringify(e))},l=function(e,t){for(var n=[],i=e.concat(t),r=0;r1&&void 0!==arguments[1]?arguments[1]:1;if("object"===(void 0===t?"undefined":i(t))){var r={};for(var a in t)r[a]=t[a],"number"==typeof t[a]&&(r[a]=e(r[a],n));return r}return t*n},u=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if("object"===(void 0===t?"undefined":i(t))){var r={};for(var a in t)r[a]=t[a],"number"==typeof t[a]&&(r[a]=e(r[a],n));return r}return t/n},p=function(e){return e.indexOf(":")>=0?e.substr(e.indexOf(":")+1):""},h={font:function(e,t){var n=t.fontStyle,i=t.fontVariant,r=t.fontWeight,a=t.fontSize,o=t.fontFamily,s=t.content,l=t.fontColor,c=t.textAlign,u=t.textBaseline,p=t.x,h=t.y;c&&(e.textAlign=c),u&&(e.textBaseline=u),l&&(e.fillStyle=l),e.font=n+" "+i+" "+r+" "+a+" "+o,e.fillText(s,p,h)},move:function(e,t){e.moveTo(t.x,t.y)},line:function(e,t){e.lineTo(t.x,t.y)},curve:function(e,t){e.bezierCurveTo(t.x1,t.y1,t.x2,t.y2,t.x,t.y)},quadraticCurve:function(e,t){e.quadraticCurveTo(t.x1,t.y1,t.x,t.y)},close:function(e){e.closePath()}},f=function(e,t,n){var i="";return e.forEach(function(n,r){t.indexOf(n)<0&&(i+=n+(r!==e.length?",":""))}),-1===i.indexOf(n)},d=function(e){var t={};if("bpmn:Process"===e.$type)t.id=e.id,t.extensions=y(e.extensionElements.values||[]);else{var n=e.data,i=e.shape;t.bpmnName=i.bpmnName,t.groupName=i.groupName;for(var r in n)switch(r){case"$type":break;case"extensionElements":t.extensions=y(n[r].values||[]);break;default:t[r]=n[r]}}return t},y=function(e){for(var t=[],n=0;n0&&n-1 in e)}function r(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}function a(e,t,n){return re(t)?se.grep(e,function(e,i){return!!t.call(e,i,e)!==n}):t.nodeType?se.grep(e,function(e){return e===t!==n}):"string"!=typeof t?se.grep(e,function(e){return J.call(t,e)>-1!==n}):se.filter(t,e,n)}function o(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function s(e){var t={};return se.each(e.match(ve)||[],function(e,n){t[n]=!0}),t}function l(e){return e}function c(e){throw e}function u(e,t,n,i){var r;try{e&&re(r=e.promise)?r.call(e).done(t).fail(n):e&&re(r=e.then)?r.call(e,t,n):t.apply(void 0,[e].slice(i))}catch(e){n.apply(void 0,[e])}}function p(){V.removeEventListener("DOMContentLoaded",p),window.removeEventListener("load",p),se.ready()}function h(e,t){return t.toUpperCase()}function f(e){return e.replace(Ee,"ms-").replace(Se,h)}function d(){this.expando=se.expando+d.uid++}function y(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:Oe.test(e)?JSON.parse(e):e)}function m(e,t,n){var i;if(void 0===n&&1===e.nodeType)if(i="data-"+t.replace(Re,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(i))){try{n=y(n)}catch(e){}Ae.set(e,t,n)}else n=void 0;return n}function g(e,t,n,i){var r,a,o=20,s=i?function(){return i.cur()}:function(){return se.css(e,t,"")},l=s(),c=n&&n[3]||(se.cssNumber[t]?"":"px"),u=(se.cssNumber[t]||"px"!==c&&+l)&&Te.exec(se.css(e,t));if(u&&u[3]!==c){for(l/=2,c=c||u[3],u=+l||1;o--;)se.style(e,t,u+c),(1-a)*(1-(a=s()/l||.5))<=0&&(o=0),u/=a;u*=2,se.style(e,t,u+c),n=n||[]}return n&&(u=+u||+l||0,r=n[1]?u+(n[1]+1)*n[2]:+n[2],i&&(i.unit=c,i.start=u,i.end=r)),r}function v(e){var t,n=e.ownerDocument,i=e.nodeName,r=De[i];return r||(t=n.body.appendChild(n.createElement(i)),r=se.css(t,"display"),t.parentNode.removeChild(t),"none"===r&&(r="block"),De[i]=r,r)}function x(e,t){for(var n,i,r=[],a=0,o=e.length;a-1)a&&a.push(o);else if(u=se.contains(o.ownerDocument,o),s=b(h.appendChild(o),"script"),u&&w(s),i)for(p=0;o=s[p++];)Le.test(o.type||"")&&i.push(o);return h}function S(){return!0}function k(){return!1}function C(){try{return V.activeElement}catch(e){}}function A(e,t,n,r,a,o){var s,l;if("object"===(void 0===t?"undefined":i(t))){"string"!=typeof n&&(r=r||n,n=void 0);for(l in t)A(e,l,n,r,t[l],o);return e}if(null==r&&null==a?(a=n,r=n=void 0):null==a&&("string"==typeof n?(a=r,r=void 0):(a=r,r=n,n=void 0)),!1===a)a=k;else if(!a)return e;return 1===o&&(s=a,a=function(e){return se().off(e),s.apply(this,arguments)},a.guid=s.guid||(s.guid=se.guid++)),e.each(function(){se.event.add(this,t,a,r,n)})}function O(e,t){return r(e,"table")&&r(11!==t.nodeType?t:t.firstChild,"tr")?se(e).children("tbody")[0]||e:e}function R(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function P(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function T(e,t){var n,i,r,a,o,s,l,c;if(1===t.nodeType){if(Ce.hasData(e)&&(a=Ce.access(e),o=Ce.set(t,a),c=a.events)){delete o.handle,o.events={};for(r in c)for(n=0,i=c[r].length;n1&&"string"==typeof d&&!ie.checkClone&&Ve.test(d))return t.each(function(e){var a=t.eq(e);y&&(n[0]=d.call(this,e,a.html())),j(a,n,i,r)});if(h&&(a=E(n,t[0].ownerDocument,!1,t,r),o=a.firstChild,1===a.childNodes.length&&(a=o),o||r)){for(s=se.map(b(a,"script"),R),l=s.length;p=0&&(l+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-a-l-s-.5))),l}function F(e,t,n){var i=Ke(e),r=D(e,t,i),a="border-box"===se.css(e,"boxSizing",!1,i),o=a;if(Xe.test(r)){if(!n)return r;r="auto"}return o=o&&(ie.boxSizingReliable()||r===e.style[t]),("auto"===r||!parseFloat(r)&&"inline"===se.css(e,"display",!1,i))&&(r=e["offset"+t[0].toUpperCase()+t.slice(1)],o=!0),(r=parseFloat(r)||0)+_(e,t,n||(a?"border":"content"),o,i,r)+"px"}function q(e){return(e.match(ve)||[]).join(" ")}function z(e){return e.getAttribute&&e.getAttribute("class")||""}function W(e){return Array.isArray(e)?e:"string"==typeof e?e.match(ve)||[]:[]}function H(e,n,r,a){var o;if(Array.isArray(n))se.each(n,function(t,n){r||ut.test(e)?a(e,n):H(e+"["+("object"===(void 0===n?"undefined":i(n))&&null!=n?t:"")+"]",n,r,a)});else if(r||"object"!==t(n))a(e,n);else for(o in n)H(e+"["+o+"]",n[o],r,a)}var G=[],V=window.document,U=Object.getPrototypeOf,X=G.slice,K=G.concat,Y=G.push,J=G.indexOf,Q={},Z=Q.toString,ee=Q.hasOwnProperty,te=ee.toString,ne=te.call(Object),ie={},re=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},ae=function(e){return null!=e&&e===e.window},oe={type:!0,src:!0,noModule:!0},se=function e(t,n){return new e.fn.Init(t,n)},le=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;se.fn=se.prototype={slimJQ:"3.3.1",constructor:se,length:0,toArray:function(){return X.call(this)},get:function(e){return null==e?X.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=se.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return se.each(this,e)},map:function(e){return this.pushStack(se.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(X.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&nw.cacheLength&&delete e[t.shift()],e[n+" "]=i}var t=[];return e}function i(e){return e[$]=!0,e}function r(e){var t=M.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function a(e,t){for(var n=e.split("|"),i=n.length;i--;)w.attrHandle[n[i]]=t}function o(e,t){var n=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(i)return i;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&Ee(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function l(e){return i(function(t){return t=+t,i(function(n,i){for(var r,a=e([],n.length,t),o=a.length;o--;)n[r=a[o]]&&(n[r]=!(i[r]=n[r]))})})}function c(e){return e&&void 0!==e.getElementsByTagName&&e}function u(){}function p(e){for(var t=0,n=e.length,i="";t1?function(t,n,i){for(var r=e.length;r--;)if(!e[r](t,n,i))return!1;return!0}:e[0]}function d(e,n,i){for(var r=0,a=n.length;r-1&&(i[c]=!(o[c]=p))}}else x=y(x===o?x.splice(m,x.length):x),a?a(null,o,x,l):Y.apply(o,x)})}function g(e){for(var t,n,i,r=e.length,a=w.relative[e[0].type],o=a||w.relative[" "],s=a?1:0,l=h(function(e){return e===t},o,!0),c=h(function(e){return Q(t,e)>-1},o,!0),u=[function(e,n,i){var r=!a&&(i||n!==O)||((t=n).nodeType?l(e,n,i):c(e,n,i));return t=null,r}];s1&&f(u),s>1&&p(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(ae,"$1"),n,s0,a=e.length>0,o=function(i,o,s,l,c){var u,p,h,f=0,d="0",m=i&&[],g=[],v=O,x=i||a&&w.find.TAG("*",c),b=F+=null==v?1:Math.random()||.1,E=x.length;for(c&&(O=o===M||o||c);d!==E&&null!=(u=x[d]);d++){if(a&&u){for(p=0,o||u.ownerDocument===M||(T(u),s=!N);h=e[p++];)if(h(u,o||M,s)){l.push(u);break}c&&(F=b)}r&&((u=!h&&u)&&f--,i&&m.push(u))}if(f+=d,r&&d!==f){for(p=0;h=n[p++];)h(m,g,o,s);if(i){if(f>0)for(;d--;)m[d]||g[d]||(g[d]=X.call(l));g=y(g)}Y.apply(l,g),c&&!i&&g.length>0&&f+n.length>1&&t.uniqueSort(l)}return c&&(F=b,O=v),m};return r?i(o):o}var x,b,w,E,S,k,C,A,O,R,P,T,M,j,N,D,B,I,L,$="sizzle"+1*new Date,_=e.document,F=0,q=0,z=n(),W=n(),H=n(),G=function(e,t){return e===t&&(P=!0),0},V={}.hasOwnProperty,U=[],X=U.pop,K=U.push,Y=U.push,J=U.slice,Q=function(e,t){for(var n=0,i=e.length;n+~]|"+ee+")"+ee+"*"),le=new RegExp("="+ee+"*([^\\]'\"]*?)"+ee+"*\\]","g"),ce=new RegExp(ie),ue=new RegExp("^"+te+"$"),pe={ID:new RegExp("^#("+te+")"),CLASS:new RegExp("^\\.("+te+")"),TAG:new RegExp("^("+te+"|[*])"),ATTR:new RegExp("^"+ne),PSEUDO:new RegExp("^"+ie),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ee+"*(even|odd|(([+-]|)(\\d*)n|)"+ee+"*(?:([+-]|)"+ee+"*(\\d+)|))"+ee+"*\\)|)","i"),bool:new RegExp("^(?:"+Z+")$","i"),needsContext:new RegExp("^"+ee+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ee+"*((?:-\\d)?\\d*)"+ee+"*\\)|)(?=[^-]|$)","i")},he=/^(?:input|select|textarea|button)$/i,fe=/^h\d$/i,de=/^[^{]+\{\s*\[native \w/,ye=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,me=/[+~]/,ge=new RegExp("\\\\([\\da-f]{1,6}"+ee+"?|("+ee+")|.)","ig"),ve=function(e,t,n){var i="0x"+t-65536;return i!==i||n?t:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)},xe=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,be=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},we=function(){T()},Ee=h(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{Y.apply(U=J.call(_.childNodes),_.childNodes),U[_.childNodes.length].nodeType}catch(e){Y={apply:U.length?function(e,t){K.apply(e,J.call(t))}:function(e,t){for(var n=e.length,i=0;e[n++]=t[i++];);e.length=n-1}}}b=t.support={},S=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},T=t.setDocument=function(e){var t,n,i=e?e.ownerDocument||e:_;return i!==M&&9===i.nodeType&&i.documentElement?(M=i,j=M.documentElement,N=!S(M),_!==M&&(n=M.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",we,!1):n.attachEvent&&n.attachEvent("onunload",we)),b.attributes=r(function(e){return e.className="i",!e.getAttribute("className")}),b.getElementsByTagName=r(function(e){return e.appendChild(M.createComment("")),!e.getElementsByTagName("*").length}),b.getElementsByClassName=de.test(M.getElementsByClassName),b.getById=r(function(e){return j.appendChild(e).id=$,!M.getElementsByName||!M.getElementsByName($).length}),b.getById?(w.filter.ID=function(e){var t=e.replace(ge,ve);return function(e){return e.getAttribute("id")===t}},w.find.ID=function(e,t){if(void 0!==t.getElementById&&N){var n=t.getElementById(e);return n?[n]:[]}}):(w.filter.ID=function(e){var t=e.replace(ge,ve);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},w.find.ID=function(e,t){if(void 0!==t.getElementById&&N){var n,i,r,a=t.getElementById(e);if(a){if((n=a.getAttributeNode("id"))&&n.value===e)return[a];for(r=t.getElementsByName(e),i=0;a=r[i++];)if((n=a.getAttributeNode("id"))&&n.value===e)return[a]}return[]}}),w.find.TAG=b.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):b.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,i=[],r=0,a=t.getElementsByTagName(e);if("*"===e){for(;n=a[r++];)1===n.nodeType&&i.push(n);return i}return a},w.find.CLASS=b.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&N)return t.getElementsByClassName(e)},B=[],D=[],(b.qsa=de.test(M.querySelectorAll))&&(r(function(e){j.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&D.push("[*^$]="+ee+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||D.push("\\["+ee+"*(?:value|"+Z+")"),e.querySelectorAll("[id~="+$+"-]").length||D.push("~="),e.querySelectorAll(":checked").length||D.push(":checked"),e.querySelectorAll("a#"+$+"+*").length||D.push(".#.+[+~]")}),r(function(e){e.innerHTML="";var t=M.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&D.push("name"+ee+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&D.push(":enabled",":disabled"),j.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&D.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),D.push(",.*:")})),(b.matchesSelector=de.test(I=j.matches||j.webkitMatchesSelector||j.mozMatchesSelector||j.oMatchesSelector||j.msMatchesSelector))&&r(function(e){b.disconnectedMatch=I.call(e,"*"),I.call(e,"[s!='']:x"),B.push("!=",ie)}),D=D.length&&new RegExp(D.join("|")),B=B.length&&new RegExp(B.join("|")),t=de.test(j.compareDocumentPosition),L=t||de.test(j.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,i=t&&t.parentNode;return e===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):e.compareDocumentPosition&&16&e.compareDocumentPosition(i)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},G=t?function(e,t){if(e===t)return P=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!b.sortDetached&&t.compareDocumentPosition(e)===n?e===M||e.ownerDocument===_&&L(_,e)?-1:t===M||t.ownerDocument===_&&L(_,t)?1:R?Q(R,e)-Q(R,t):0:4&n?-1:1)}:function(e,t){if(e===t)return P=!0,0;var n,i=0,r=e.parentNode,a=t.parentNode,s=[e],l=[t];if(!r||!a)return e===M?-1:t===M?1:r?-1:a?1:R?Q(R,e)-Q(R,t):0;if(r===a)return o(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)l.unshift(n);for(;s[i]===l[i];)i++;return i?o(s[i],l[i]):s[i]===_?-1:l[i]===_?1:0},M):M},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==M&&T(e),n=n.replace(le,"='$1']"),b.matchesSelector&&N&&!H[n+" "]&&(!B||!B.test(n))&&(!D||!D.test(n)))try{var i=I.call(e,n);if(i||b.disconnectedMatch||e.document&&11!==e.document.nodeType)return i}catch(e){}return t(n,M,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==M&&T(e),L(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==M&&T(e);var n=w.attrHandle[t.toLowerCase()],i=n&&V.call(w.attrHandle,t.toLowerCase())?n(e,t,!N):void 0;return void 0!==i?i:b.attributes||!N?e.getAttribute(t):(i=e.getAttributeNode(t))&&i.specified?i.value:null},t.escape=function(e){return(e+"").replace(xe,be)},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],i=0,r=0;if(P=!b.detectDuplicates,R=!b.sortStable&&e.slice(0),e.sort(G),P){for(;t=e[r++];)t===e[r]&&(i=n.push(r));for(;i--;)e.splice(n[i],1)}return R=null,e},E=t.getText=function(e){var t,n="",i=0,r=e.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=E(e)}else if(3===r||4===r)return e.nodeValue}else for(;t=e[i++];)n+=E(t);return n},w=t.selectors={cacheLength:50,createPseudo:i,match:pe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(ge,ve),e[3]=(e[3]||e[4]||e[5]||"").replace(ge,ve),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return pe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&ce.test(n)&&(t=k(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(ge,ve).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=z[e+" "];return t||(t=new RegExp("(^|"+ee+")"+e+"("+ee+"|$)"))&&z(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,i){return function(r){var a=t.attr(r,e);return null==a?"!="===n:!n||(a+="","="===n?a===i:"!="===n?a!==i:"^="===n?i&&0===a.indexOf(i):"*="===n?i&&a.indexOf(i)>-1:"$="===n?i&&a.slice(-i.length)===i:"~="===n?(" "+a.replace(re," ")+" ").indexOf(i)>-1:"|="===n&&(a===i||a.slice(0,i.length+1)===i+"-"))}},CHILD:function(e,t,n,i,r){var a="nth"!==e.slice(0,3),o="last"!==e.slice(-4),s="of-type"===t;return 1===i&&0===r?function(e){return!!e.parentNode}:function(t,n,l){var c,u,p,h,f,d,y=a!==o?"nextSibling":"previousSibling",m=t.parentNode,g=s&&t.nodeName.toLowerCase(),v=!l&&!s,x=!1;if(m){if(a){for(;y;){for(h=t;h=h[y];)if(s?h.nodeName.toLowerCase()===g:1===h.nodeType)return!1;d=y="only"===e&&!d&&"nextSibling"}return!0}if(d=[o?m.firstChild:m.lastChild],o&&v){for(h=m,p=h[$]||(h[$]={}),u=p[h.uniqueID]||(p[h.uniqueID]={}),c=u[e]||[],f=c[0]===F&&c[1],x=f&&c[2],h=f&&m.childNodes[f];h=++f&&h&&h[y]||(x=f=0)||d.pop();)if(1===h.nodeType&&++x&&h===t){u[e]=[F,f,x];break}}else if(v&&(h=t,p=h[$]||(h[$]={}),u=p[h.uniqueID]||(p[h.uniqueID]={}),c=u[e]||[],f=c[0]===F&&c[1],x=f),!1===x)for(;(h=++f&&h&&h[y]||(x=f=0)||d.pop())&&((s?h.nodeName.toLowerCase()!==g:1!==h.nodeType)||!++x||(v&&(p=h[$]||(h[$]={}),u=p[h.uniqueID]||(p[h.uniqueID]={}),u[e]=[F,x]),h!==t)););return(x-=r)===i||x%i==0&&x/i>=0}}},PSEUDO:function(e,n){var r,a=w.pseudos[e]||w.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return a[$]?a(n):a.length>1?(r=[e,e,"",n],w.setFilters.hasOwnProperty(e.toLowerCase())?i(function(e,t){for(var i,r=a(e,n),o=r.length;o--;)i=Q(e,r[o]),e[i]=!(t[i]=r[o])}):function(e){return a(e,0,r)}):a}},pseudos:{not:i(function(e){var t=[],n=[],r=C(e.replace(ae,"$1"));return r[$]?i(function(e,t,n,i){for(var a,o=r(e,null,i,[]),s=e.length;s--;)(a=o[s])&&(e[s]=!(t[s]=a))}):function(e,i,a){return t[0]=e,r(t,null,a,n),t[0]=null,!n.pop()}}),has:i(function(e){return function(n){return t(e,n).length>0}}),contains:i(function(e){return e=e.replace(ge,ve),function(t){return(t.textContent||t.innerText||E(t)).indexOf(e)>-1}}),lang:i(function(e){return ue.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(ge,ve).toLowerCase(),function(t){var n;do{if(n=N?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===j},focus:function(e){return e===M.activeElement&&(!M.hasFocus||M.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:s(!1),disabled:s(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!w.pseudos.empty(e)},header:function(e){return fe.test(e.nodeName)},input:function(e){return he.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:l(function(){return[0]}),last:l(function(e,t){return[t-1]}),eq:l(function(e,t,n){return[n<0?n+t:n]}),even:l(function(e,t){for(var n=0;n=0;)e.push(i);return e}),gt:l(function(e,t,n){for(var i=n<0?n+t:n;++i2&&"ID"===(o=a[0]).type&&9===t.nodeType&&N&&w.relative[a[1].type]){if(!(t=(w.find.ID(o.matches[0].replace(ge,ve),t)||[])[0]))return n;u&&(t=t.parentNode),e=e.slice(a.shift().value.length)}for(r=pe.needsContext.test(e)?0:a.length;r--&&(o=a[r],!w.relative[s=o.type]);)if((l=w.find[s])&&(i=l(o.matches[0].replace(ge,ve),me.test(a[0].type)&&c(t.parentNode)||t))){if(a.splice(r,1),!(e=i.length&&p(a)))return Y.apply(n,i),n;break}}return(u||C(e,h))(i,t,!N,n,!t||me.test(e)&&c(t.parentNode)||t),n},b.sortStable=$.split("").sort(G).join("")===$,b.detectDuplicates=!!P,T(),b.sortDetached=r(function(e){return 1&e.compareDocumentPosition(M.createElement("fieldset"))}),r(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||a("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),b.attributes&&r(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||a("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),r(function(e){return null==e.getAttribute("disabled")})||a(Z,function(e,t,n){var i;if(!n)return!0===e[t]?t.toLowerCase():(i=e.getAttributeNode(t))&&i.specified?i.value:null}),t}(window);se.find=ce,se.expr=ce.selectors,se.expr[":"]=se.expr.pseudos,se.uniqueSort=se.unique=ce.uniqueSort,se.text=ce.getText,se.isXMLDoc=ce.isXML,se.contains=ce.contains,se.escapeSelector=ce.escape;var ue=function(e,t,n){for(var i=[],r=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(r&&se(e).is(n))break;i.push(e)}return i},pe=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},he=se.expr.match.needsContext,fe=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;se.filter=function(e,t,n){var i=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?se.find.matchesSelector(i,e)?[i]:[]:se.find.matches(e,se.grep(t,function(e){return 1===e.nodeType}))},se.fn.extend({find:function(e){var t,n,i=this.length,r=this;if("string"!=typeof e)return this.pushStack(se(e).filter(function(){for(t=0;t1?se.uniqueSort(n):n},filter:function(e){return this.pushStack(a(this,e||[],!1))},not:function(e){return this.pushStack(a(this,e||[],!0))},is:function(e){return!!a(this,"string"==typeof e&&he.test(e)?se(e):e||[],!1).length}});var de,ye=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(se.fn.Init=function(e,t,n){var i,r;if(!e)return this;if(n=n||de,"string"==typeof e){if(!(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:ye.exec(e))||!i[1]&&t)return!t||t.slimJQ?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof se?t[0]:t,se.merge(this,se.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:V,!0)),fe.test(i[1])&&se.isPlainObject(t))for(i in t)re(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return r=V.getElementById(i[2]),r&&(this[0]=r,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):re(e)?void 0!==n.ready?n.ready(e):e(se):se.makeArray(e,this)}).prototype=se.fn,de=se(V);var me=/^(?:parents|prev(?:Until|All))/,ge={children:!0,contents:!0,next:!0,prev:!0};se.fn.extend({has:function(e){var t=se(e,this),n=t.length;return this.filter(function(){for(var e=0;e-1:1===n.nodeType&&se.find.matchesSelector(n,e))){a.push(n);break}return this.pushStack(a.length>1?se.uniqueSort(a):a)},index:function(e){return e?"string"==typeof e?J.call(se(e),this[0]):J.call(this,e.slimJQ?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(se.uniqueSort(se.merge(this.get(),se(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),se.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return ue(e,"parentNode")},parentsUntil:function(e,t,n){return ue(e,"parentNode",n)},next:function(e){return o(e,"nextSibling")},prev:function(e){return o(e,"previousSibling")},nextAll:function(e){return ue(e,"nextSibling")},prevAll:function(e){return ue(e,"previousSibling")},nextUntil:function(e,t,n){return ue(e,"nextSibling",n)},prevUntil:function(e,t,n){return ue(e,"previousSibling",n)},siblings:function(e){return pe((e.parentNode||{}).firstChild,e)},children:function(e){return pe(e.firstChild)},contents:function(e){return r(e,"iframe")?e.contentDocument:(r(e,"template")&&(e=e.content||e),se.merge([],e.childNodes))}},function(e,t){se.fn[e]=function(n,i){var r=se.map(this,t,n);return"Until"!==e.slice(-5)&&(i=n),i&&"string"==typeof i&&(r=se.filter(i,r)),this.length>1&&(ge[e]||se.uniqueSort(r),me.test(e)&&r.reverse()),this.pushStack(r)}});var ve=/[^\x20\t\r\n\f]+/g;se.Callbacks=function(e){e="string"==typeof e?s(e):se.extend({},e);var n,i,r,a,o=[],l=[],c=-1,u=function(){for(a=a||e.once,r=n=!0;l.length;c=-1)for(i=l.shift();++c-1;)o.splice(n,1),n<=c&&c--}),this},has:function(e){return e?se.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return a=l=[],o=i="",this},disabled:function(){return!o},lock:function(){return a=l=[],i||n||(o=i=""),this},locked:function(){return!!a},fireWith:function(e,t){return a||(t=t||[],t=[e,t.slice?t.slice():t],l.push(t),n||u()),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!r}};return p},se.extend({Deferred:function(e){var t=[["notify","progress",se.Callbacks("memory"),se.Callbacks("memory"),2],["resolve","done",se.Callbacks("once memory"),se.Callbacks("once memory"),0,"resolved"],["reject","fail",se.Callbacks("once memory"),se.Callbacks("once memory"),1,"rejected"]],n="pending",r={state:function(){return n},always:function(){return a.done(arguments).fail(arguments),this},catch:function(e){return r.then(null,e)},pipe:function(){var e=arguments;return se.Deferred(function(n){se.each(t,function(t,i){var r=re(e[i[4]])&&e[i[4]];a[i[1]](function(){var e=r&&r.apply(this,arguments);e&&re(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[i[0]+"With"](this,r?[e]:arguments)})}),e=null}).promise()},then:function(e,n,r){function a(e,t,n,r){return function(){var s=this,u=arguments,p=function(){var p,h;if(!(e=o&&(n!==c&&(s=void 0,u=[i]),t.rejectWith(s,u))}};e?h():(se.Deferred.getStackHook&&(h.stackTrace=se.Deferred.getStackHook()),window.setTimeout(h))}}var o=0;return se.Deferred(function(i){t[0][3].add(a(0,i,re(r)?r:l,i.notifyWith)),t[1][3].add(a(0,i,re(e)?e:l)),t[2][3].add(a(0,i,re(n)?n:c))}).promise()},promise:function(e){return null!=e?se.extend(e,r):r}},a={};return se.each(t,function(e,i){var o=i[2],s=i[5];r[i[1]]=o.add,s&&o.add(function(){n=s},t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),o.add(i[3].fire),a[i[0]]=function(){return a[i[0]+"With"](this===a?void 0:this,arguments),this},a[i[0]+"With"]=o.fireWith}),r.promise(a),e&&e.call(a,a),a},when:function(e){var t=arguments.length,n=t,i=Array(n),r=X.call(arguments),a=se.Deferred(),o=function(e){return function(n){i[e]=this,r[e]=arguments.length>1?X.call(arguments):n,--t||a.resolveWith(i,r)}};if(t<=1&&(u(e,a.done(o(n)).resolve,a.reject,!t),"pending"===a.state()||re(r[n]&&r[n].then)))return a.then();for(;n--;)u(r[n],o(n),a.reject);return a.promise()}});var xe=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;se.Deferred.exceptionHook=function(e,t){window.console&&window.console.warn&&e&&xe.test(e.name)&&window.console.warn("SlimJQ.Deferred exception: "+e.message,e.stack,t)},se.readyException=function(e){window.setTimeout(function(){throw e})};var be=se.Deferred();se.fn.ready=function(e){return be.then(e).catch(function(e){se.readyException(e)}),this},se.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--se.readyWait:se.isReady)||(se.isReady=!0,!0!==e&&--se.readyWait>0||be.resolveWith(V,[se]))}}),se.ready.then=be.then,"complete"===V.readyState||"loading"!==V.readyState&&!V.documentElement.doScroll?window.setTimeout(se.ready):(V.addEventListener("DOMContentLoaded",p),window.addEventListener("load",p));var we=function e(n,i,r,a,o,s,l){var c=0,u=n.length,p=null==r;if("object"===t(r)){o=!0;for(c in r)e(n,i,c,r[c],!0,s,l)}else if(void 0!==a&&(o=!0,re(a)||(l=!0),p&&(l?(i.call(n,a),i=null):(p=i,i=function(e,t,n){return p.call(se(e),n)})),i))for(;c1,null,!0)},removeData:function(e){return this.each(function(){Ae.remove(this,e)})}}),se.extend({queue:function(e,t,n){var i;if(e)return t=(t||"fx")+"queue",i=Ce.get(e,t),n&&(!i||Array.isArray(n)?i=Ce.access(e,t,se.makeArray(n)):i.push(n)),i||[]},dequeue:function(e,t){t=t||"fx";var n=se.queue(e,t),i=n.length,r=n.shift(),a=se._queueHooks(e,t),o=function(){se.dequeue(e,t)};"inprogress"===r&&(r=n.shift(),i--),r&&("fx"===t&&n.unshift("inprogress"),delete a.stop,r.call(e,o,a)),!i&&a&&a.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Ce.get(e,n)||Ce.access(e,n,{empty:se.Callbacks("once memory").add(function(){Ce.remove(e,[t+"queue",n])})})}}),se.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length\x20\t\r\n\f]+)/i,Le=/^$|^module$|\/(?:java|ecma)script/i,$e={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};$e.optgroup=$e.option,$e.tbody=$e.tfoot=$e.colgroup=$e.caption=$e.thead,$e.th=$e.td;var _e=/<|&#?\w+;/;!function(){var e=V.createDocumentFragment(),t=e.appendChild(V.createElement("div")),n=V.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),ie.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="",ie.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var Fe=V.documentElement,qe=/^key/,ze=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,We=/^([^.]*)(?:\.(.+)|)/;se.event={global:{},add:function(e,t,n,i,r){var a,o,s,l,c,u,p,h,f,d,y,m=Ce.get(e);if(m)for(n.handler&&(a=n,n=a.handler,r=a.selector),r&&se.find.matchesSelector(Fe,r),n.guid||(n.guid=se.guid++),(l=m.events)||(l=m.events={}),(o=m.handle)||(o=m.handle=function(t){return void 0!==se&&se.event.triggered!==t.type?se.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(ve)||[""],c=t.length;c--;)s=We.exec(t[c])||[],f=y=s[1],d=(s[2]||"").split(".").sort(),f&&(p=se.event.special[f]||{},f=(r?p.delegateType:p.bindType)||f,p=se.event.special[f]||{},u=se.extend({type:f,origType:y,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&se.expr.match.needsContext.test(r),namespace:d.join(".")},a),(h=l[f])||(h=l[f]=[],h.delegateCount=0,p.setup&&!1!==p.setup.call(e,i,d,o)||e.addEventListener&&e.addEventListener(f,o)),p.add&&(p.add.call(e,u),u.handler.guid||(u.handler.guid=n.guid)),r?h.splice(h.delegateCount++,0,u):h.push(u),se.event.global[f]=!0)},remove:function(e,t,n,i,r){var a,o,s,l,c,u,p,h,f,d,y,m=Ce.hasData(e)&&Ce.get(e);if(m&&(l=m.events)){for(t=(t||"").match(ve)||[""],c=t.length;c--;)if(s=We.exec(t[c])||[],f=y=s[1],d=(s[2]||"").split(".").sort(),f){for(p=se.event.special[f]||{},f=(i?p.delegateType:p.bindType)||f,h=l[f]||[],s=s[2]&&new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"),o=a=h.length;a--;)u=h[a],!r&&y!==u.origType||n&&n.guid!==u.guid||s&&!s.test(u.namespace)||i&&i!==u.selector&&("**"!==i||!u.selector)||(h.splice(a,1),u.selector&&h.delegateCount--,p.remove&&p.remove.call(e,u));o&&!h.length&&(p.teardown&&!1!==p.teardown.call(e,d,m.handle)||se.removeEvent(e,f,m.handle),delete l[f])}else for(f in l)se.event.remove(e,f+t[c],n,i,!0);se.isEmptyObject(l)&&Ce.remove(e,"handle events")}},dispatch:function(e){var t,n,i,r,a,o,s=se.event.fix(e),l=new Array(arguments.length),c=(Ce.get(this,"events")||{})[s.type]||[],u=se.event.special[s.type]||{};for(l[0]=s,t=1;t=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==e.type||!0!==c.disabled)){for(a=[],o={},n=0;n-1:se.find(r,this,null,[c]).length),o[r]&&a.push(i);a.length&&s.push({elem:c,handlers:a})}return c=this,l\x20\t\r\n\f]*)[^>]*)\/>/gi,Ge=/\s*$/g;se.extend({htmlPrefilter:function(e){return e.replace(He,"<$1>")},clone:function(e,t,n){var i,r,a,o,s=e.cloneNode(!0),l=se.contains(e.ownerDocument,e);if(!(ie.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||se.isXMLDoc(e)))for(o=b(s),a=b(e),i=0,r=a.length;i0&&w(o,!l&&b(e,"script")),s},cleanData:function(e){for(var t,n,i,r=se.event.special,a=0;void 0!==(n=e[a]);a++)if(ke(n)){if(t=n[Ce.expando]){if(t.events)for(i in t.events)r[i]?se.event.remove(n,i):se.removeEvent(n,i,t.handle);n[Ce.expando]=void 0}n[Ae.expando]&&(n[Ae.expando]=void 0)}}}),se.fn.extend({detach:function(e){return N(this,e,!0)},remove:function(e){return N(this,e)},text:function(e){return we(this,function(e){return void 0===e?se.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return j(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){O(this,e).appendChild(e)}})},prepend:function(){return j(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=O(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return j(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return j(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(se.cleanData(b(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return se.clone(this,e,t)})},html:function(e){return we(this,function(e){var t=this[0]||{},n=0,i=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ge.test(e)&&!$e[(Ie.exec(e)||["",""])[1].toLowerCase()]){e=se.htmlPrefilter(e);try{for(;n1)}}),se.fn.delay=function(e,t){return e=se.fx?se.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var i=window.setTimeout(t,e);n.stop=function(){window.clearTimeout(i)}})},function(){var e=V.createElement("input"),t=V.createElement("select"),n=t.appendChild(V.createElement("option"));e.type="checkbox",ie.checkOn=""!==e.value,ie.optSelected=n.selected,e=V.createElement("input"),e.value="t",e.type="radio",ie.radioValue="t"===e.value}();var it,rt=se.expr.attrHandle;se.fn.extend({attr:function(e,t){return we(this,se.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){se.removeAttr(this,e)})}}),se.extend({attr:function(e,t,n){var i,r,a=e.nodeType;if(3!==a&&8!==a&&2!==a)return void 0===e.getAttribute?se.prop(e,t,n):(1===a&&se.isXMLDoc(e)||(r=se.attrHooks[t.toLowerCase()]||(se.expr.match.bool.test(t)?it:void 0)),void 0!==n?null===n?void se.removeAttr(e,t):r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:(e.setAttribute(t,n+""),n):r&&"get"in r&&null!==(i=r.get(e,t))?i:(i=se.find.attr(e,t),null==i?void 0:i))},attrHooks:{type:{set:function(e,t){if(!ie.radioValue&&"radio"===t&&r(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,i=0,r=t&&t.match(ve);if(r&&1===e.nodeType)for(;n=r[i++];)e.removeAttribute(n)}}),it={set:function(e,t,n){return!1===t?se.removeAttr(e,n):e.setAttribute(n,n),n}},se.each(se.expr.match.bool.source.match(/\w+/g),function(e,t){var n=rt[t]||se.find.attr;rt[t]=function(e,t,i){var r,a,o=t.toLowerCase();return i||(a=rt[o],rt[o]=r,r=null!=n(e,t,i)?o:null,rt[o]=a),r}});var at=/^(?:input|select|textarea|button)$/i,ot=/^(?:a|area)$/i;se.fn.extend({prop:function(e,t){return we(this,se.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[se.propFix[e]||e]})}}),se.extend({prop:function(e,t,n){var i,r,a=e.nodeType;if(3!==a&&8!==a&&2!==a)return 1===a&&se.isXMLDoc(e)||(t=se.propFix[t]||t,r=se.propHooks[t]),void 0!==n?r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:e[t]=n:r&&"get"in r&&null!==(i=r.get(e,t))?i:e[t]},propHooks:{tabIndex:{get:function(e){var t=se.find.attr(e,"tabindex");return t?parseInt(t,10):at.test(e.nodeName)||ot.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),ie.optSelected||(se.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),se.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){se.propFix[this.toLowerCase()]=this}),se.fn.extend({addClass:function(e){var t,n,i,r,a,o,s,l=0;if(re(e))return this.each(function(t){se(this).addClass(e.call(this,t,z(this)))});if(t=W(e),t.length)for(;n=this[l++];)if(r=z(n),i=1===n.nodeType&&" "+q(r)+" "){for(o=0;a=t[o++];)i.indexOf(" "+a+" ")<0&&(i+=a+" ");s=q(i),r!==s&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,i,r,a,o,s,l=0;if(re(e))return this.each(function(t){se(this).removeClass(e.call(this,t,z(this)))});if(!arguments.length)return this.attr("class","");if(t=W(e),t.length)for(;n=this[l++];)if(r=z(n),i=1===n.nodeType&&" "+q(r)+" "){for(o=0;a=t[o++];)for(;i.indexOf(" "+a+" ")>-1;)i=i.replace(" "+a+" "," ");s=q(i),r!==s&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=void 0===e?"undefined":i(e),r="string"===n||Array.isArray(e);return"boolean"==typeof t&&r?t?this.addClass(e):this.removeClass(e):re(e)?this.each(function(n){se(this).toggleClass(e.call(this,n,z(this),t),t)}):this.each(function(){var t,i,a,o;if(r)for(i=0,a=se(this),o=W(e);t=o[i++];)a.hasClass(t)?a.removeClass(t):a.addClass(t);else void 0!==e&&"boolean"!==n||(t=z(this),t&&Ce.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":Ce.get(this,"__className__")||""))})},hasClass:function(e){var t,n,i=0;for(t=" "+e+" ";n=this[i++];)if(1===n.nodeType&&(" "+q(z(n))+" ").indexOf(t)>-1)return!0;return!1}});var st=/\r/g;se.fn.extend({val:function(e){var t,n,i,r=this[0];return arguments.length?(i=re(e),this.each(function(n){var r;1===this.nodeType&&(r=i?e.call(this,n,se(this).val()):e,null==r?r="":"number"==typeof r?r+="":Array.isArray(r)&&(r=se.map(r,function(e){return null==e?"":e+""})),(t=se.valHooks[this.type]||se.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,r,"value")||(this.value=r))})):r?(t=se.valHooks[r.type]||se.valHooks[r.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(r,"value"))?n:(n=r.value,"string"==typeof n?n.replace(st,""):null==n?"":n):void 0}}),se.extend({valHooks:{option:{get:function(e){var t=se.find.attr(e,"value");return null!=t?t:q(se.text(e))}},select:{get:function(e){var t,n,i,a=e.options,o=e.selectedIndex,s="select-one"===e.type,l=s?null:[],c=s?o+1:a.length;for(i=o<0?c:s?o:0;i-1)&&(n=!0);return n||(e.selectedIndex=-1),a}}}}),se.each(["radio","checkbox"],function(){se.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=se.inArray(se(e).val(),t)>-1}},ie.checkOn||(se.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),ie.focusin="onfocusin"in window;var lt=/^(?:focusinfocus|focusoutblur)$/,ct=function(e){e.stopPropagation()};se.extend(se.event,{trigger:function(e,t,n,r){var a,o,s,l,c,u,p,h,f=[n||V],d=ee.call(e,"type")?e.type:e,y=ee.call(e,"namespace")?e.namespace.split("."):[];if(o=h=s=n=n||V,3!==n.nodeType&&8!==n.nodeType&&!lt.test(d+se.event.triggered)&&(d.indexOf(".")>-1&&(y=d.split("."),d=y.shift(),y.sort()),c=d.indexOf(":")<0&&"on"+d,e=e[se.expando]?e:new se.Event(d,"object"===(void 0===e?"undefined":i(e))&&e),e.isTrigger=r?2:3,e.namespace=y.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+y.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:se.makeArray(t,[e]),p=se.event.special[d]||{},r||!p.trigger||!1!==p.trigger.apply(n,t))){if(!r&&!p.noBubble&&!ae(n)){for(l=p.delegateType||d,lt.test(l+d)||(o=o.parentNode);o;o=o.parentNode)f.push(o),s=o;s===(n.ownerDocument||V)&&f.push(s.defaultView||s.parentWindow||window)}for(a=0;(o=f[a++])&&!e.isPropagationStopped();)h=o,e.type=a>1?l:p.bindType||d,u=(Ce.get(o,"events")||{})[e.type]&&Ce.get(o,"handle"),u&&u.apply(o,t),(u=c&&o[c])&&u.apply&&ke(o)&&(e.result=u.apply(o,t),!1===e.result&&e.preventDefault());return e.type=d,r||e.isDefaultPrevented()||p._default&&!1!==p._default.apply(f.pop(),t)||!ke(n)||c&&re(n[d])&&!ae(n)&&(s=n[c],s&&(n[c]=null),se.event.triggered=d,e.isPropagationStopped()&&h.addEventListener(d,ct),n[d](),e.isPropagationStopped()&&h.removeEventListener(d,ct),se.event.triggered=void 0,s&&(n[c]=s)),e.result}},simulate:function(e,t,n){var i=se.extend(new se.Event,n,{type:e,isSimulated:!0});se.event.trigger(i,null,t)}}),se.fn.extend({trigger:function(e,t){return this.each(function(){se.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return se.event.trigger(e,t,n,!0)}}),ie.focusin||se.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){se.event.simulate(t,e.target,se.event.fix(e))};se.event.special[t]={setup:function(){var i=this.ownerDocument||this,r=Ce.access(i,t);r||i.addEventListener(e,n,!0),Ce.access(i,t,(r||0)+1)},teardown:function(){var i=this.ownerDocument||this,r=Ce.access(i,t)-1;r?Ce.access(i,t,r):(i.removeEventListener(e,n,!0),Ce.remove(i,t))}}});var ut=/\[\]$/,pt=/\r?\n/g,ht=/^(?:submit|button|image|reset|file)$/i,ft=/^(?:input|select|textarea|keygen)/i;return se.param=function(e,t){var n,i=[],r=function(e,t){var n=re(t)?t():t;i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(e)||e.slimJQ&&!se.isPlainObject(e))se.each(e,function(){r(this.name,this.value)});else for(n in e)H(n,e[n],t,r);return i.join("&")},se.fn.extend({serialize:function(){return se.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=se.prop(this,"elements");return e?se.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!se(this).is(":disabled")&&ft.test(this.nodeName)&&!ht.test(e)&&(this.checked||!Be.test(e))}).map(function(e,t){var n=se(this).val();return null==n?null:Array.isArray(n)?se.map(n,function(e){return{name:t.name,value:e.replace(pt,"\r\n")}}):{name:t.name,value:n.replace(pt,"\r\n")}}).get()}}),se.fn.extend({wrapAll:function(e){var t;return this[0]&&(re(e)&&(e=e.call(this[0])),t=se(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return re(e)?this.each(function(t){se(this).wrapInner(e.call(this,t))}):this.each(function(){var t=se(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=re(e);return this.each(function(n){se(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){se(this).replaceWith(this.childNodes)}),this}}),se.expr.pseudos.hidden=function(e){return!se.expr.pseudos.visible(e)},se.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},ie.createHTMLDocument=function(){var e=V.implementation.createHTMLDocument("").body;return e.innerHTML="
",2===e.childNodes.length}(),se.parseHTML=function(e,t,n){if("string"!=typeof e)return[];"boolean"==typeof t&&(n=t,t=!1);var i,r,a;return t||(ie.createHTMLDocument?(t=V.implementation.createHTMLDocument(""),i=t.createElement("base"),i.href=V.location.href,t.head.appendChild(i)):t=V),r=fe.exec(e),a=!n&&[],r?[t.createElement(r[1])]:(r=E([e],t,a),a&&a.length&&se(a).remove(),se.merge([],r.childNodes))},se.offset={setOffset:function(e,t,n){var i,r,a,o,s,l,c,u=se.css(e,"position"),p=se(e),h={};"static"===u&&(e.style.position="relative"),s=p.offset(),a=se.css(e,"top"),l=se.css(e,"left"),c=("absolute"===u||"fixed"===u)&&(a+l).indexOf("auto")>-1,c?(i=p.position(),o=i.top,r=i.left):(o=parseFloat(a)||0,r=parseFloat(l)||0),re(t)&&(t=t.call(e,n,se.extend({},s))),null!=t.top&&(h.top=t.top-s.top+o),null!=t.left&&(h.left=t.left-s.left+r),"using"in t?t.using.call(e,h):p.css(h)}},se.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){se.offset.setOffset(this,e,t)});var t,n,i=this[0];return i?i.getClientRects().length?(t=i.getBoundingClientRect(),n=i.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,i=this[0],r={top:0,left:0};if("fixed"===se.css(i,"position"))t=i.getBoundingClientRect();else{for(t=this.offset(),n=i.ownerDocument,e=i.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===se.css(e,"position");)e=e.parentNode;e&&e!==i&&1===e.nodeType&&(r=se(e).offset(),r.top+=se.css(e,"borderTopWidth",!0),r.left+=se.css(e,"borderLeftWidth",!0))}return{top:t.top-r.top-se.css(i,"marginTop",!0),left:t.left-r.left-se.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===se.css(e,"position");)e=e.offsetParent;return e||Fe})}}),se.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;se.fn[e]=function(i){return we(this,function(e,i,r){var a;if(ae(e)?a=e:9===e.nodeType&&(a=e.defaultView),void 0===r)return a?a[t]:e[i];a?a.scrollTo(n?a.pageXOffset:r,n?r:a.pageYOffset):e[i]=r},e,i,arguments.length)}}),se.each(["top","left"],function(e,t){se.cssHooks[t]=B(ie.pixelPosition,function(e,n){if(n)return n=D(e,t),Xe.test(n)?se(e).position()[t]+"px":n})}),se.each({Height:"height",Width:"width"},function(e,t){se.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,i){se.fn[i]=function(r,a){var o=arguments.length&&(n||"boolean"!=typeof r),s=n||(!0===r||!0===a?"margin":"border");return we(this,function(t,n,r){var a;return ae(t)?0===i.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(a=t.documentElement,Math.max(t.body["scroll"+e],a["scroll"+e],t.body["offset"+e],a["offset"+e],a["client"+e])):void 0===r?se.css(t,n,s):se.style(t,n,r,s)},t,o?r:void 0,o)}})}),se.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){se.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),se.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),se.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,i){return this.on(t,e,n,i)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),se.proxy=function(e,t){var n,i,r;if("string"==typeof t&&(n=e[t],t=e,e=n),re(e))return i=X.call(arguments,2),r=function(){return e.apply(t||this,i.concat(X.call(arguments)))},r.guid=e.guid=e.guid||se.guid++,r},se.holdReady=function(e){e?se.readyWait++:se.ready(!0)},se.isArray=Array.isArray,se.parseJSON=JSON.parse,se.nodeName=r,se.isFunction=re,se.isWindow=ae,se.camelCase=f,se.type=t,se.now=Date.now,se.isNumeric=function(e){var t=se.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},se}()},function(e,t,n){"use strict";var i=n(0),r=n(1),a=function(e){var t=Math.PI;return e>=t/4&&e=t/4*3&&e=t/4*5&&ee.y?n=Math.PI-n:t.x=e.x&&t.yt.x2)&&(t.x2=r.x+r.width),(null==t.y2||r.y+r.height>t.y2)&&(t.y2=r.y+r.height)}return{x:t.x1,y:t.y1,width:t.x2-t.x1,height:t.y2-t.y1}},l=function(e,t,n){for(var i=Math.PI/18,r=[],a=0;a<36;a+=1){var o=i*a,s={x:e-Math.cos(o)*n,y:t-Math.sin(o)*n,angle:o};r.push(s)}return r},c=function(e){for(var t=R(e),n=0,i=1;i1&&void 0!==arguments[1]?arguments[1]:60,n=e.split(","),i=parseInt(n[0]),r=parseInt(n[1]),a=parseInt(n[2]),o=Math.round(i+(255-i)/255*t);o>255&&(o=255);var s=Math.round(r+(255-r)/255*t);s>255&&(s=255);var l=Math.round(a+(255-a)/255*t);return l>255&&(l=255),o+","+s+","+l},p=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:13,n=e.split(","),i=parseInt(n[0]),r=parseInt(n[1]),a=parseInt(n[2]),o=Math.round(i-i/255*t);o<0&&(o=0);var s=Math.round(r-r/255*t);s<0&&(s=0);var l=Math.round(a-a/255*t);return l<0&&(l=0),o+","+s+","+l},h=function(e){return p(e,26)},f=function(e){var t=i.a.trigger("element.get"),n=[];for(var r in t){var a=t[r],o=a.plane.bounds;o="SequenceFlow"===a.shape.bpmnName?P(a):L(a),q(o.x,o.y,e)&&q(o.x+o.width,o.y,e)&&q(o.x+o.width,o.y+o.height,e)&&q(o.x,o.y+o.height,e)&&n.push(a.data.id)}return n},d=function(e,t,n){var i=30,r=[],a=n.plane.bounds,o=a.x,s=a.width,l={};return t.x>=o-i&&t.x<=o+s+i?(t.x=o-i&&t.y<=o+s+i?(l.x=e.x+i,t.y=o-i&&t.x<=o+s+i?(t.x=o-i&&t.y<=o+s+i?(l.x=e.x+i,t.y=s.x&&l.x<=u){var h=s.x+s.width/2;t.xp?u+a:p+a,l.ye.x)c.x=e.x+r/2,o.push({x:c.x,y:e.y}),o.push({x:c.x,y:t.y});else{var u=s.y+s.height,p=l.y+l.height;if(c.x=e.x+a,p>=s.y&&l.y<=u){var h=s.y+s.height/2;t.yp?u+a:p+a,l.x+l.width>e.x&&(c.x=l.x+l.width+a)}else t.ye.x&&t.y>e.y)a.push({x:t.x,y:e.y});else if(t.x>e.x&&s.x>e.x)s.x-e.x<60?l.x=e.x+(s.x-e.x)/2:l.x=e.x+r,l.y=t.y-r,a.push({x:l.x,y:e.y}),a.push({x:l.x,y:l.y}),a.push({x:t.x,y:l.y});else if(t.x<=e.x&&t.y>o.y+o.height){var c=o.y+o.height;l.x=e.x+r,t.y-c<60?l.y=c+(t.y-c)/2:l.y=t.y-r,a.push({x:l.x,y:e.y}),a.push({x:l.x,y:l.y}),a.push({x:t.x,y:l.y})}else{var u=s.x+s.width;u>e.x?l.x=u+r:l.x=e.x+r,t.ye.y)a.push({x:t.x,y:e.y});else if(t.x=e.x&&t.y>o.y+o.height){var u=o.y+o.height;l.x=e.x-r,t.y-u<60?l.y=u+(t.y-u)/2:l.y=t.y-r,a.push({x:l.x,y:e.y}),a.push({x:l.x,y:l.y}),a.push({x:t.x,y:l.y})}else s.xe.x&&t.ye.x&&s.x>e.x)s.x-e.x<60?l.x=e.x+(s.x-e.x)/2:l.x=e.x+r,l.y=t.y+r,a.push({x:l.x,y:e.y}),a.push({x:l.x,y:l.y}),a.push({x:t.x,y:l.y});else if(t.x<=e.x&&t.ye.x?l.x=c+r:l.x=e.x+r,t.y>o.y+o.height?l.y=t.y+r:l.y=o.y+o.height+r,a.push({x:l.x,y:e.y}),a.push({x:l.x,y:l.y}),a.push({x:t.x,y:l.y})}return a},S=function(e,t,n,i){var r=30,a=[],o=n.plane.bounds,s=i.plane.bounds,l={},c=s.x+s.width;return t.x=e.x&&t.yo.y+o.height?l.y=t.y+r:l.y=o.y+o.height+r,a.push({x:l.x,y:e.y}),a.push({x:l.x,y:l.y}),a.push({x:t.x,y:l.y})),a},k=function(e,t,n,i){if(null!=n)return{x:e.x-i*Math.cos(e.angle),y:e.y-i*Math.sin(e.angle)};var r=Math.abs(e.y-t.y),a=Math.abs(e.x-t.x),o=Math.atan(r/a),s={};return e.x<=t.x?s.x=e.x+i*Math.cos(o):s.x=e.x-i*Math.cos(o),e.y<=t.y?s.y=e.y+i*Math.sin(o):s.y=e.y-i*Math.sin(o),s},C=function(e,t){var n=e.data,i=n.sourceRef,r=n.targetRef,o=t[i],s=t[r],l=e.plane.waypoint,c=l[0],u=l[l.length-1],p=[];if("broken"===e.linkerType){var h=Math.abs(u.x-c.x),f=Math.abs(u.y-c.y),C=Math.PI,A=30,O=!1,R=void 0,P=void 0,T=void 0,M=void 0,j=void 0;if(null!=i&&null!=r){var N=a(c.angle),D=a(u.angle);1===N&&1===D?(c.yu.y?(R=c,P=u,T=o,M=s,O=!1):(R=u,P=c,T=s,M=o,O=!0),p=m(R,P,T)):2===N&&2===D?(c.y>u.y?(R=c,P=u,T=o,M=s,O=!1):(R=u,P=c,T=s,M=o,O=!0),p=y(R,P,T)):4===N&&4===D?(c.x=C/4&&j=f)p.push({x:R.x,y:P.y});else{var I=f/2;p.push({x:R.x,y:R.y-I}),p.push({x:P.x,y:R.y-I})}else if(p.push({x:R.x,y:R.y-A}),h>=f)if(P.x>=B.x-A&&P.x<=B.x+B.width+A){var L=B.x+B.width/2;P.x=B.x-A&&P.x<=B.x+B.width+A){var $=B.x+B.width/2;P.x<$?(p.push({x:B.x-A,y:R.y-A}),p.push({x:B.x-A,y:P.y-A}),p.push({x:P.x,y:P.y-A})):(p.push({x:B.x+B.width+A,y:R.y-A}),p.push({x:B.x+B.width+A,y:P.y-A}),p.push({x:P.x,y:P.y-A}))}else p.push({x:P.x,y:R.y-A});else if(j>=C/4*3&&jR.x)h>=f?(p.push({x:R.x+h/2,y:R.y}),p.push({x:R.x+h/2,y:P.y})):p.push({x:P.x,y:R.y});else if(p.push({x:R.x+A,y:R.y}),h>=f)if(P.y>=B.y-A&&P.y<=B.y+B.height+A){var F=B.y+B.height/2;P.y=B.y-A&&P.y<=B.y+B.height+A){var q=B.y+B.height/2;P.y=C/4*5&&jR.y)h>=f?p.push({x:R.x,y:P.y}):(p.push({x:R.x,y:R.y+f/2}),p.push({x:P.x,y:R.y+f/2}));else if(p.push({x:R.x,y:R.y+A}),h>=f)if(P.x>=B.x-A&&P.x<=B.x+B.width+A){var z=B.x+B.width/2;P.x=B.x-A&&P.x<=B.x+B.width+A){var W=B.x+B.width/2;P.x=f?(p.push({x:R.x-h/2,y:R.y}),p.push({x:R.x-h/2,y:P.y})):p.push({x:P.x,y:R.y});else if(p.push({x:R.x-A,y:R.y}),h>=f)if(P.y>=B.y-A&&P.y<=B.y+B.height+A){var H=B.y+B.height/2;P.y=B.y-A&&P.y<=B.y+B.height+A){var G=B.y+B.height/2;P.y=f){var V=(u.x-c.x)/2;p.push({x:c.x+V,y:c.y}),p.push({x:c.x+V,y:u.y})}else{var U=(u.y-c.y)/2;p.push({x:c.x,y:c.y+U}),p.push({x:u.x,y:c.y+U})}}else if("curve"===e.linkerType){var X=_(c,u),K=.4*X;p.push(k(c,u,i,K)),p.push(k(u,c,r,K))}return p},A=function(e){var t={},n=e.plane.waypoint,i=n[0],r=n[n.length-1];if("normal"===e.linkerType)t.x=.5*i.x+.5*r.x,t.y=.5*i.y+.5*r.y;else if("curve"===e.linkerType)t.x=.125*i.x+.375*e.points[0].x+.375*e.points[1].x+.125*r.x,t.y=.125*i.y+.375*e.points[0].y+.375*e.points[1].y+.125*r.y;else{var a=[];a.push(i),a=a.concat(e.points),a.push(r);for(var o=0,s=1;sl){var d=(l-c)/f;t.x=(1-d)*p.x+d*h.x,t.y=(1-d)*p.y+d*h.y;break}c=f}}return t},O=function(e,t){var n=e.data,i=(n.sourceRef,n.targetRef,e.plane.waypoint),r=i[0],a=i[i.length-1],s=void 0,l=void 0;if("normal"===e.linkerType)s="source"===t?a:r;else if("broken"===e.linkerType)s="source"===t?e.points[0]:e.points[e.points.length-1];else{var c=_(r,a),u=void 0;u="source"===t?12/c:1-12/c,s={x:(1-u)*(1-u)*(1-u)*r.x+3*(1-u)*(1-u)*u*e.points[0].x+3*(1-u)*u*u*e.points[1].x+u*u*u*a.x,y:(1-u)*(1-u)*(1-u)*r.y+3*(1-u)*(1-u)*u*e.points[0].y+3*(1-u)*u*u*e.points[1].y+u*u*u*a.y}}return l="source"===t?r:a,o(s,l)},R=function(e){var t=e.plane,n=e.shape,i=[];if("curve"!==n.linkerType)i.push(t.waypoint[0]),i=i.concat(n.points);else for(var r=0;r<=1;){var a={x:(1-r)*(1-r)*(1-r)*n.points[0].x+3*(1-r)*(1-r)*r*n.points[1].x+3*(1-r)*r*r*n.points[2].x+r*r*r*n.points[n.points.length-1].x,y:(1-r)*(1-r)*(1-r)*n.points[0].y+3*(1-r)*(1-r)*r*n.points[1].y+3*(1-r)*r*r*n.points[2].y+r*r*r*n.points[n.points.length-1].y};i.push(a),r+=.05}return i.push(t.waypoint[t.waypoint.length-1]),i},P=function(e){for(var t=R(e),n=t[0].x,i=t[0].y,r=t[0].x,a=t[0].y,o=0;or&&(r=s.x),s.ya&&(a=s.y)}return{x:n,y:i,width:r-n,height:a-i}},T=function(e){for(var t=[],n=[],r=i.a.trigger("shape.select.getIds"),a=0;a0)for(var l=0;l=0)&&n.indexOf(c)<0&&(t.push(i.a.trigger("element.get",c)),n.push(c))}}}return t},M=function(){for(var e=i.a.trigger("shape.select.get"),t=[],n=0;nt.x2)&&(t.x2=s.x+s.width),(null==t.y2||s.y+s.height>t.y2)&&(t.y2=s.y+s.height)}return{x:t.x1,y:t.y1,width:t.x2-t.x1,height:t.y2-t.y1}},I=function(e,t,n){var i=_(e,t);if(0===i||0===n)return t;var r=Math.atan(Math.abs(t.x-e.x)/Math.abs(e.y-t.y));t.x>=e.x&&t.y>=e.y?r=Math.PI-r:t.x<=e.x&&t.y>=e.y?r=Math.PI+r:t.x<=e.x&&t.y<=e.y&&(r=2*Math.PI-r),r%=2*Math.PI;var a=(r+n)%(2*Math.PI);return{x:e.x+Math.sin(a)*i,y:e.y-Math.cos(a)*i}},L=function(e){var t=e.plane,n=e.shape;return D(t.bounds,n.shapeStyle.angle)},$=function(e,t,n,a){var o=[],s=i.a.trigger("element.get");for(var l in s){var c=s[l],u=c.data,p=c.plane,h=c.shape,f=n.find('.shape-box[data-id="'+u.id+'"]'),d=f.position(),y=e-d.left,m=t-d.top,g=void 0,v=void 0,x={x:d.left,y:d.top,width:f.width(),height:f.height()},b=f.find(".shape-canvas"),w=b[0].getContext("2d"),E=q(e,t,x);if("SequenceFlow"===h.bpmnName){if(!E)continue;if(a)continue;g=Object(r.k)(10),v={x:e-g,y:t-g,width:2*g,height:2*g};var S=(p.waypoint[0].x,p.waypoint[0].y,{x:p.waypoint[p.waypoint.length-1].x,y:p.waypoint[p.waypoint.length-1].y});if(q(Object(r.k)(S.x),Object(r.k)(S.y),v)){var k={type:"sequence_point",point:"target",element:c};o.push(k);continue}if(q(Object(r.k)(S.x),Object(r.k)(S.y),v)){var C={type:"sequence_point",point:"source",element:c};o.push(C);continue}var A=f.find(".text-box"),O=A.position(),R={x:O.left,y:O.top,width:A.width(),height:A.height()};if(q(y,m,R)){var P={type:"sequence_text",element:c};o.push(P);continue}g=Object(r.k)(7);var T=z({x:Object(r.i)(e),y:Object(r.i)(t)},c,g);if(T>-1){o.push({type:"sequence",element:c,pointIndex:T});continue}}else{if(E&&h.locked&&!a){w.isPointInPath(y,m)&&o.push({type:"shape",element:c});continue}if(g=Object(r.k)(7),E){v={x:e-g,y:t-g,width:2*g,height:2*g},x={x:p.bounds.x+p.bounds.width/2,y:p.bounds.y+p.bounds.height/2};for(var M=h.getAnchors(),N=null,D=0;D1&&a)$=o[0];else if(o.length>1){if("bounds"===o[0].type&&"sequence_point"!==o[0].type&&"sequence"!==o[0].type)return o[0];for(var _=[],F=[],W=[],H=0;H0&&F.length>0)for(var V=0;V0&&(F.sort(function(e,t){return i.a.trigger("shape.select.check",e.element.data.id)&&!i.a.trigger("shape.select.check",t.element.data.id)?-1:!i.a.trigger("shape.select.check",e.element.data.id)&&i.a.trigger("shape.select.check",t.element.data.id)?1:t.element.shape.shapeStyle.zindex-e.element.shape.shapeStyle.zindex}),$=F[0]),null==$&&_.length>0&&(_.sort(function(e,t){return i.a.trigger("shape.select.check",e.element.data.id)&&!i.a.trigger("shape.select.check",t.element.data.id)?-1:!i.a.trigger("shape.select.check",e.element.data.id)&&i.a.trigger("shape.select.check",t.element.data.id)?1:t.element.shape.shapeStyle.zindex-e.element.shape.shapeStyle.zindex}),$=_[0]),null==$&&($=o[0])}return $},_=function(e,t){var n=t.y-e.y,i=t.x-e.x;return Math.sqrt(Math.pow(n,2)+Math.pow(i,2))},F=function(e,t){e.setLineDash||(e.setLineDash=function(){}),e.setLineDash(t),e.mozDash=t,e.webkitLineDash=t},q=function(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height},z=function(e,t,n){for(var i=R(t),r={x:e.x-n,y:e.y},a={x:e.x+n,y:e.y},o={x:e.x,y:e.y-n},s={x:e.x,y:e.y+n},l=1;l=0&&o<=1&&s>=0&&s<=1&&(r=!0)}return r};t.a={getAngle:o,getAngleDir:a,getBounding:s,getConnectionLength:c,getConnectionMidpoint:A,getConnectionPoints:C,getEndpointAngle:O,getElementsBox:B,getElementIdsByRange:f,getConnectionBox:P,getLighterColor:u,getDarkerColor:p,getDarkestColor:h,getOutConnections:T,getPointAngle:j,getRelativePos:N,getRotated:I,getRotatedBox:D,getSelectedConnectionIds:M,getShapeByPosition:$,getShapeBox:L,measureDistance:_,setLineDash:F}},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=n(6),s=function(e){function t(){i(this,t);var e=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.children=[],e.parent="",e.resizeDir=["tl","tr","br","bl"],e.attribute={container:!1,visible:!0,rotatable:!1,linkable:!0,editable:!0,markerOffset:5},e.lineStyle={lineWidth:2,lineColor:"50,50,50",lineStyle:"solid"},e.fillStyle={type:"solid",color:"255,255,255"},e.lightStyle={},e.actions=null,e}return a(t,e),t}(o.a);t.a=s},function(e,t,n){"use strict";n.d(t,"a",function(){return a}),n.d(t,"b",function(){return o}),n.d(t,"c",function(){return s}),n.d(t,"e",function(){return l}),n.d(t,"f",function(){return c}),n.d(t,"d",function(){return u}),n.d(t,"i",function(){return h}),n.d(t,"h",function(){return f}),n.d(t,"g",function(){return d});var i={String:!0,Boolean:!0,Integer:!0,Real:!0,Element:!0},r={String:function(e){return e},Boolean:function(e){return"true"===e},Integer:function(e){return parseInt(e,10)},Real:function(e){return parseFloat(e,10)}},a={xsi:"http://www.w3.org/2001/XMLSchema-instance"},o="xsi:type",s=function(e,t){var n=r[e];return n?n(t):t},l=function(e){return!!i[e]},c=function(e){return!!r[e]},u=function(e){return e.xml&&"lowerCase"===e.xml.tagAlias},p=function(e){return e.xml&&e.xml.serialize},h=function(e){return p(e)===o},f=function(e){return"property"===p(e)},d=function(e,t){var n,i,r=e.split(/:/);if(1===r.length)n=e,i=t;else{if(2!==r.length)throw new Error("expected or , got "+e);n=r[1],i=r[0]}return e=(i?i+":":"")+n,{name:e,prefix:i,localName:n}}},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=function(){function e(e,t){for(var n=0;no&&(s={x:0,y:o/2},l={x:a,y:o/2},c=(h.angle+Math.PI/2)%(2*Math.PI)),0!==c){var u={x:a/2,y:o/2};s=i.a.getRotated(u,s,c),l=i.a.getRotated(u,l,c),s.x<0&&(s.x=0),s.x>a&&(s.x=a),s.y<0&&(s.y=0),s.y>o&&(s.y=o),l.x<0&&(l.x=0),l.x>a&&(l.x=a),l.y<0&&(l.y=0),l.y>o&&(l.y=o)}var p=e.createLinearGradient(s.x,s.y,l.x,l.y);return p.addColorStop(0,"rgb("+n.beginColor+")"),p.addColorStop(1,"rgb("+n.endColor+")"),p},createRadialGradient:function(e,t,n){var i=t.bpmnPlane.bounds,r=i.width,a=i.height,o=r");return new n(t)}},{key:"getType",value:function(e){var t=this.typeCache,n="string"==typeof e&&e.constructor===String?e:e.ns.name,i=t[n];return i||(e=this.registry.getEffectiveDescriptor(n),i=t[n]=this.factory.createType(e)),i}},{key:"createAny",value:function(e,t,n){var i=Object(l.g)(e),r={$type:e,$instanceOf:function(e){return e===this.$type}},o={name:e,isGeneric:!0,ns:{prefix:i.prefix,localName:i.localName,uri:t}};this.properties.defineDescriptor(r,o),this.properties.defineModel(r,this),this.properties.define(r,"$parent",{enumerable:!1,writable:!0});for(var s in n){var u=n[s];"object"===(void 0===u?"undefined":c(u))&&u.constructor===Object&&void 0!==u.value?r[u.name]=a.value:r[s]=u}return r}},{key:"getPackage",value:function(e){return this.registry.getPackage(e)}},{key:"getPackages",value:function(){return this.registry.getPackages()}},{key:"getElementDescriptor",value:function(e){return e.$descriptor}},{key:"hasType",value:function(e,t){return void 0===t&&(t=e,e=this),t in e.$model.getElementDescriptor(e).allTypesByName}},{key:"getPropertyDescriptor",value:function(e,t){return this.getElementDescriptor(e).propertiesByName[t]}},{key:"getTypeDescriptor",value:function(e){return this.registry.typeMap[e]}}]),e}();t.a=p},function(e,t,n){"use strict";function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t',extensions:{},filter:[],bpmns:["StartEvent","UserTask","ServiceTask","ReceiveTask","CallActivity","ExclusiveGateway","InclusiveGateway","ParallelGateway","ComplexGateway","EndEvent","TerminateEndEvent"]},C=!1,A=function(e){var t=Object(l.a)(e.container);if(!e.container||t.length<=0)throw new Error("Can not find container: "+e.container);var n=Object(l.a)('
');return n.css({width:e.width,height:e.height}),n.find(".bpd-layout").css({top:-e.pageStyle.height/2,left:-e.pageStyle.width/2}),t.append(n),n},O=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r(this,e),this.version="0.1.4",this.options=Object.assign({},k,t),this.$container=A(this.options),this.features={HotKey:new w.a,I18n:new E.a(this.options.local),BpmnXML:new p.a(this.options.extensions),Background:new h.a(this.$container,this.options,this.options.config.background),Hand:new x.a(this.$container,this.options.pageStyle)},this.options.readonly||(this.features.Anchor=new d.a(this.$container,this.options.config.anchor),this.features.Snapline=new g.a(this.$container,this.options.config.snapline),this.features.Direction=new f.a(this.$container,this.options.config.direction),this.features.Select=new y.a(this.$container,this.options.config.select),this.features.Tooltip=new v.a(this.$container,this.options.config.tooltip),this.features.Drag=new m.a(this.options,this.$container),this.features.GroupPanel=new b.a(this.$container,this.options)),this.draw=Object(s.a)(this.options,this.$container),Object(u.g)("bpmn",function(){C=!0}),this.init()}return S(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){};this.importBpmn(this.options.definition,e)}},{key:"createShape",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=Object(l.a)(e.target);if(!n.hasClass("readonly")&&!this.options.readonly){var i=n.attr("shapeName");if(!i||""===i)throw new Error("shapeName error");this.draw.createShape(i,t)}}},{key:"getAllElement",value:function(){var e=[],t=o.a.trigger("element.get");for(var n in t){var i=Object(u.j)(t[n]);e.push(i)}return e}},{key:"getRootElement",value:function(){var e=o.a.trigger("process.get");return e?Object(u.j)(e):null}},{key:"getFrontElementsByBpmn",value:function(e,t){return this.getFrontElements(o.a.trigger("element.get",e.id)).filter(function(e){return e.bpmnName===t})}},{key:"getFrontElement",value:function(e){if(!e)throw new Error("select element error");var t=null;return this.getFrontElements(o.a.trigger("element.get",e.id)).forEach(function(e){t||"SequenceFlow"===e.bpmnName||(t=e)}),t}},{key:"getFrontElements",value:function(e){if(!e)throw new Error("select element error");for(var t=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=[];return i?n:(t.forEach(function(e){if("SequenceFlow"===e.shape.bpmnName){if(e.data.sourceRef&&""!==e.sourceRef){var t=o.a.trigger("element.get",e.data.sourceRef)||[],i=!1;n.forEach(function(e){e.data.id===t.data.id&&(i=!0)}),i||(r.push(t),n.push(t))}}else{(o.a.trigger("connections.get",e.data.id)||[]).forEach(function(t){var i=o.a.trigger("element.get",t);if(i.data.targetRef===e.data.id){var a=!1;n.forEach(function(e){e.data.id===i.data.id&&(a=!0)}),a||(r.push(i),n.push(i))}})}}),r.length<=0?e(r,n,!0):e(r,n))}([e]),n=0;n2&&void 0!==arguments[2]?arguments[2]:function(){};t.extensions.forEach(function(e){e.$type=e.name,delete e.name});var r=o.a.trigger("element.get",e);if(r){var a=Object.assign({},t.original);for(var s in a)r.data[s]=a[s];var l=r.data.extensionElements,c=[];l.values||(l.values=[]),l.values.forEach(function(e){var n=!1;t.extensions.forEach(function(t){t.$type===e.$type&&(n=!0)}),n||c.push(e)}),l.values=[].concat(c,i(t.extensions)),"SequenceFlow"===r.shape.bpmnName||o.a.trigger("shape.render",{type:r.shape.bpmnName,element:r}),n()}}},{key:"updateProcessProperties",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};e.extensions.forEach(function(e){e.$type=e.name,delete e.name});var n=o.a.trigger("process.get");if(n){var r=Object.assign({},e.original);for(var a in r)n[a]=r[a];var s=[];n.extensionElements.values||(n.extensionElements.values=[]),n.extensionElements.values.forEach(function(t){var n=!1;e.extensions.forEach(function(e){e.$type===t.$type&&(n=!0)}),n||s.push(t)}),n.extensionElements.values=[].concat(s,i(e.extensions)),t()}}},{key:"updataLineStyle",value:function(e,t){this.draw.updataLineStyle(e,t)}},{key:"destroy",value:function(){this.$container.remove(),this.draw.cancel(),o.a.trigger("key.clear"),o.a.destroy()}},{key:"activateHand",value:function(){o.a.trigger("hand.activate"),this.draw.resetState()}},{key:"activateSelect",value:function(){this.options.readonly||(o.a.trigger("hand.destroy"),o.a.trigger("shape.multiSelect",{state:this.draw.state}),this.draw.changeState("multiSelect"))}},{key:"importBpmn",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=this,i=setInterval(function(){C&&(clearInterval(i),o.a.trigger("model.import",e,function(e,i){e?console.log(e):(n.draw.render(i),t())}))},1e3)}},{key:"exportBpmn",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){},t=this.draw.designer.createDefinition();o.a.trigger("model.export",t,function(t,n){t&&console.log(t,n),e(n)})}}]),e}();t.default=O,window.BPDCore=O},function(e,t){},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=n(0),s=n(12),l=n(13),c=n(14),u=n(26),p=n(3),h=n(1),f=(n(2),function(){function e(e,t){for(var n=0;n0&&a.forEach(function(t,n){if(t.id===e.id+"_di"){var i=Object(h.c)(e);e.extensionElements&&(i.extensionElements.values=e.extensionElements.values||[]);"SequenceFlow"!==Object(h.e)(e.$type)?(i.incoming=e.incoming?e.incoming.id:"",i.outgoing=e.outgoing?e.outgoing.id:""):(i.sourceRef=e.sourceRef?e.sourceRef.id:"",i.targetRef=e.targetRef?e.targetRef.id:""),r[e.id]={data:i,plane:Object(h.c)(t)}}})})}):this.designer.setProcessModel(),this.renderPage();var a=0;for(var o in r){var s=r[o],l=Object(h.e)(s.data.$type);"SequenceFlow"!==l&&(this.renderShape({type:l,element:s}),this.designer.addData(s,!1)),a++}for(var c in r){var u=r[c];"SequenceFlow"===Object(h.e)(u.data.$type)&&(this.renderConnection({element:u}),this.designer.addData(u,!1))}0===a&&this.designer.build();var f=this.$container,d=this.options,y=d.pageStyle,m=y.width,g=y.height,v=f.find(".bpd-layout"),x=v.offset(),b={x:Object(h.i)(0),y:Object(h.i)(0),width:Object(h.i)(m),height:Object(h.i)(g)},w=p.a.getElementIdsByRange(b),E=p.a.getElementsBox(w),S=x.top;E.y<-g/2?S=E.y:E.y>0&&(S=0);var k=x.left;E.x<-m/2?k=E.x:E.x>0&&(k=0),v.css({top:S,left:k})}},{key:"renderPage",value:function(){var e=this.options.pageStyle,t=e.width,n=e.height,i=e.backgroundColor,r=p.a.getDarkerColor(i);p.a.getDarkestColor(i);this.$container.find(".bpd-designer").css({"background-color":"rgb("+r+")"}),this.$container.find(".bpd-layout").css({width:t,height:n})}},{key:"renderShape",value:function(e){var t=e.type,n=e.element;this.drawShape.render(t,n)}},{key:"renderShapePath",value:function(e){var t=e.shape2D,n=e.element,i=e.render;this.drawShape.renderShapePath(t,n,i)}},{key:"renderConnection",value:function(e){var t=e.element,n=e.rendered;this.drawConnection.render(t,n)}},{key:"moveConnection",value:function(e){var t=e.element,n=e.type,i=e.x,r=e.y;this.drawConnection.move(t,n,i,r)}},{key:"updataLineStyle",value:function(e,t){if(e){var n=o.a.trigger("element.get",e);"SequenceFlow"===n.shape.bpmnName||(n.shape.lightStyle={lineStyle:t},console.log(n),this.drawShape.renderShape(n))}else{var i=o.a.trigger("element.get");for(var r in i){var a=i[r];"SequenceFlow"===a.shape.bpmnName||(a.shape.lightStyle={},this.drawShape.renderShape(a))}}}},{key:"removeShape",value:function(e,t){var n=this;e||(e=o.a.trigger("shape.select.get")),void 0===t&&(t=!0),t&&(e=this.beforeRemove(e));var i=[],r=[],a=[];return 0!==e.length&&(e.forEach(function(e){"SequenceFlow"===e.shape.bpmnName?a.push(e.data.id):r.push(e.data.id)}),e.forEach(function(e){i.push(Object(h.c)(e));var t=e.data,s=e.shape;if(n.$container.find('.shape-box[data-id="'+t.id+'"]').remove(),delete n.designer.elements[t.id],"SequenceFlow"===s.bpmnName)t.sourceRef,t.targetRef;else{s.parent&&r.indexOf(s.parent);var l=n.designer.connections[t.id];if(l&&l.length>0)for(var c=0;c1&&void 0!==arguments[1]?arguments[1]:function(){},n=null;o.a.trigger("data.create",e,function(e){n=e,t(n)})}},{key:"beforeRemove",value:function(e){for(var t={},n=0;n1&&void 0!==arguments[1]?arguments[1]:function(){},i=null,l=null,c=this.$container.find(".bpd-layout"),u=c.find(".bpd-designer");c.on("mousemove.create",function(n){var o=a.a.getRelativePos(n.pageX,n.pageY,u),c=0,p=null;null==i?(i=r.a.trigger("element.create",{name:null,type:Object(s.d)(e,"uppercase"),prefix:"obj",pos:o}),p=i.plane.bounds,p.x=Object(s.i)(o.x)-p.width/2,p.y=Object(s.i)(o.y)-p.height/2,c=Object.keys(t.elements),r.a.trigger("shape.render",{type:e,element:i}),l=t.$container.find('.shape-box[data-id="'+i.data.id+'"]'),l.attr("class","shape-box-creating"),l.css({left:o.x-l.width()/2+"px",top:o.y-l.height()/2+"px","z-index":c.length})):(p=i.plane.bounds,p.x=Object(s.i)(o.x)-p.width/2,p.y=Object(s.i)(o.y)-p.height/2);r.a.trigger("shape.snapline.show",{size:p,ids:[]});l.css({left:Object(s.k)(p.x-10)+"px",top:Object(s.k)(p.y-10)+"px","z-index":c.length})});var p=!1;c.on("mouseup.create",function(){p=!0}),Object(o.a)(document).on("mouseup.create",function(){Object(o.a)(document).off("mouseup.create"),u.off("mousemove.creating"),r.a.trigger("shape.snapline.hide"),c.off("mouseup.create").off("mousemove.create"),null!=i&&(!1===p?l.remove():(l.attr("class","shape-box"),t.addData(i),n(i)))})}},{key:"addData",value:function(e,t){this.addDatas([e],t)}},{key:"addDatas",value:function(e,t){void 0===t&&(t=!0);for(var n=[],i=0;i1&&void 0!==arguments[1]?arguments[1]:function(){};if(e.length>0){var n=[];e=e.concat(n),t(e)}}},{key:"getElement",value:function(e){return e?this.elements[e]:this.elements}},{key:"getProcess",value:function(){var e=null;return this.definitions&&(e=this.definitions.rootElements[0],delete e.flowElements),e}},{key:"setShapeGroups",value:function(e,t){this.groups[e]||(this.groups[e]=[]),this.groups[e].indexOf(t)<0&&this.groups[e].push(t)}},{key:"getShapeConnections",value:function(e){return this.connections[e]}},{key:"setShapeConnections",value:function(e,t){this.connections[e]||(this.connections[e]=[]),this.connections[e].indexOf(t)<0&&this.connections[e].push(t)}},{key:"update",value:function(e){this.updateMulti([e])}},{key:"updateMulti",value:function(e){for(var t=[],n=[],i=0;i0&&(o=this.orders[this.orders.length-1].zindex),this.maxZIndex=o}},{key:"createAttrs",value:function(e,t,n){var i=this,r={data:{},plane:{}},a=e.id||"obj_"+this.options.ids.next();if(e)for(var o in e)switch(o){case"$type":case"flowElements":case"sourceRef":case"targetRef":case"incoming":case"outgoing":break;case"extensionElements":r.data.extensionElements=this.createExtensionModel(e[o].values||[]);break;default:r.data[o]=e[o]}if(t)for(var s in t)switch(s){case"$type":break;case"id":r.plane[s]=a+"_di";break;case"waypoint":"SequenceFlow"===n.bpmnName&&function(){var e=t[s][0],a=t[s][t[s].length-1],o=[];o.push(i.createModel({descriptor:"dc:Point",attrs:{x:e.x,y:e.y}})),n.points.forEach(function(e){o.push(i.createModel({descriptor:"dc:Point",attrs:{x:e.x,y:e.y}}))}),o.push(i.createModel({descriptor:"dc:Point",attrs:{x:a.x,y:a.y}})),r.plane[s]=o}();break;case"bounds":if("SequenceFlow"!==n.bpmnName){var l=t[s],c=l.height,u=l.width,p=l.x,h=l.y;r.plane[s]=this.createModel({descriptor:"dc:Bounds",attrs:{height:c,width:u,x:p,y:h}})}break;default:r.plane[s]=t[s]}return r}},{key:"createElement",value:function(e){var t=e.type,n=e.prefix,i=e.name,a=e.pos,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},l=n+"_"+this.options.ids.next(),c=Object(s.c)(this.createModel({descriptor:"bpmn:"+t,attrs:{name:i,id:l,extensionElements:this.createExtensionModel()}})),u={};"SequenceFlow"===t?u=Object(s.c)(this.createModel({descriptor:"bpmndi:BPMNEdge",attrs:{id:l+"_di",waypoint:[]}})):(u=Object(s.c)(this.createModel({descriptor:"bpmndi:BPMNShape",attrs:{bounds:this.createModel({descriptor:"dc:Bounds",attrs:{x:0,y:0}}),bpmnElement:l,id:l+"_di"}})),a&&(u.bounds.x=Object(s.i)(a.x)-u.bounds.width,u.bounds.y=Object(s.i)(a.y)-u.bounds.height));var p={data:c,plane:u};return p=r.a.trigger("shape.create",{type:t,element:p}),this.maxZIndex=p.shape.shapeStyle.zindex=this.maxZIndex+1,o(p),p}},{key:"createDefinition",value:function(){var e=this;return this.definitions.rootElements.forEach(function(t,n){var i={},r=[],a=[];for(var o in e.elements){var s=e.elements[o],l=s.data,c=s.plane,u=s.shape;if("SequenceFlow"!==u.bpmnName){var p=e.createAttrs(l,c,u);p.data.incoming=[],p.data.outgoing=[];var h=e.createModel({descriptor:l.$type,attrs:p.data});p.plane.bpmnElement=h;var f=e.createModel({descriptor:c.$type,attrs:p.plane});i[h.id]=h,r.push(h),a.push(f)}}for(var d in e.elements){var y=e.elements[d],m=y.data,g=y.plane,v=y.shape;if("SequenceFlow"===v.bpmnName){var x=e.createAttrs(m,g,v);x.data.sourceRef=i[m.sourceRef],x.data.targetRef=i[m.targetRef];var b=e.createModel({descriptor:m.$type,attrs:x.data});m.sourceRef&&i[m.sourceRef].outgoing.push(b),m.targetRef&&i[m.targetRef].incoming.push(b),x.plane.bpmnElement=b;var w=e.createModel({descriptor:g.$type,attrs:x.plane});r.push(b),a.push(w)}}e.definitions.diagrams[n].plane.planeElement=a,e.definitions.rootElements[n]=e.createModel({descriptor:t.$type,attrs:{id:t.id||e.options.ids.next(),extensionElements:e.createExtensionModel(t.extensionElements.values||[])}}),e.definitions.rootElements[n].flowElements=r}),this.definitions}},{key:"setProcessModel",value:function(){var e="process_"+this.options.ids.next(),t=[this.createModel({descriptor:"bpmn:Process",attrs:{id:e,flowElements:[],extensionElements:this.createExtensionModel([])}})],n=[this.createModel({descriptor:"bpmndi:BPMNDiagram",attrs:{id:e+"_di",plane:this.createModel({descriptor:"bpmndi:BPMNPlane",attrs:{id:e+"_pl",planeElement:[]}})}})];this.definitions.rootElements=t,this.definitions.diagrams=n}},{key:"createModel",value:function(e){var t=null;return r.a.trigger("model.create",e,function(e){t=e}),t}},{key:"createExtensionModel",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=[];return t.forEach(function(t){var i=t.$type||t.name,r=Object(s.c)(t);delete r.$type,delete r.name;var a=e.createModel({descriptor:i,attrs:r});a&&n.push(a)}),this.createModel({descriptor:"bpmn:ExtensionElements",attrs:{values:n}})}}]),e}(),u=function(e,t,n){return new c(e,t,n)};t.a=u},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=n(0),a=n(3),o=function(){function e(e,t){for(var n=0;n1&&p<=u.shape.points.length||null==u.data.sourceRef&&null==u.data.targetRef&&(o.css("cursor","move"),r.a.trigger("shape.drag",s))}else if("sequence_point"===c.type)o.css("cursor","move"),r.a.trigger("shape.hover",s),r.a.trigger("connection.drag",s);else if("sequence_text"===c.type)o.css("cursor","text"),r.a.trigger("shape.hover",s);else if("shape"===c.type?c.element.shape.locked?(o.css("cursor","default"),r.a.trigger("shape.hover",s)):(o.css("cursor","move"),r.a.trigger("shape.hover",s),r.a.trigger("shape.edit",s),r.a.trigger("shape.drag",s)):(o.css("cursor","crosshair"),r.a.trigger("shape.hover",s),r.a.trigger("anchor.hover",s)),c.element.shape.parent){var h=r.a.on("element.get",c.element.shape.parent);r.a.trigger("anchor.show",h)}else r.a.trigger("anchor.show",c.element)}}},{key:"changeState",value:function(e){this.state.state=e}},{key:"resetState",value:function(){this.state.state=null,this.$container.find(".bpd-designer").css("cursor","default")}}]),e}();t.a=s},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=n(2),a=n(15),o=n(1),s=n(7),l=n(3),c=function(){function e(e,t){for(var n=0;n").appendTo(this.$container.find(".bpd-designer")));var s=i.bounds,c=s.x,u=s.y,p=s.width,h=s.height,f=t.shapeStyle,d=f.angle,y=(f.zindex,l.a.getShapeBox(e)),m=y.width+20,g=y.height+20,v=a.find(".shape-canvas");v.attr({width:m,height:g}),a.css({left:Object(o.k)(y.x-10)+"px",top:Object(o.k)(y.y-10)+"px",width:m,height:g});var x=v[0].getContext("2d");x.clearRect(0,0,p+20,h+20),x.scale(this.options.scale,this.options.scale),x.translate(10,10),x.translate(c-y.x,u-y.y),x.translate(p/2,h/2),x.rotate(d),x.translate(-p/2,-h/2),x.globalAlpha=t.shapeStyle.alpha,x.lineJoin="round",this.renderShapePath(x,e),this.renderText(t,y)}},{key:"renderShapePath",value:function(e,t,n){var i=t.plane.bounds,r=i.width,a=i.height,s=void 0;s=n&&o.a.drawIcon?o.a.drawIcon(r,a):t.shape.actions,this.renderPath(e,t,s,n)}},{key:"renderPath",value:function(e,t,n,i){for(var r=t.data,a=(t.plane,t.shape),s=0;s").appendTo(u),p.on("focus",function(){Object(r.a)(this).blur()})),p.attr("readonly","readonly"),null==e.data.name||""===e.data.name.trim())return void p.css({height:"0px",width:"0px"}).hide();var h=e.fontStyle;p.css({"line-height":Math.round(1.25*h.size)+"px","font-size":h.size+"px","font-family":h.fontFamily,"font-weight":h.bold?"bold":"normal","font-style":h.italic?"italic":"normal","text-align":h.textAlign,color:"rgb("+h.color+")","text-decoration":h.underline?"underline":"none",opacity:e.shapeStyle.alpha}).show();var f=e.getTextBlock();if("horizontal"===e.fontStyle.orientation){var d={x:f.x+f.width/2,y:f.y+f.height/2};f.x=d.x-f.height/2,f.y=d.y-f.width/2,f.width=f.height,f.height=f.width}p.css({width:f.width}),p.height(0),p.val(e.data.name),p.scrollTop(99999);var y=p.scrollTop(),m=0;m="middle"===h.vAlign?f.y+f.height/2-y/2:"bottom"===e.fontStyle.vAlign?f.y+f.height-y:f.y;var g={x:f.x+f.width/2,y:m+y/2},v=e.shapeStyle.angle;0!==v&&(g=l.a.getRotated({x:s/2,y:c/2},g,v)),"horizontal"===h.orientation&&(v=(1.5*Math.PI+v)%(2*Math.PI));var x=Math.round(v/(2*Math.PI)*360),b="rotate("+x+"deg) scale("+this.options.scale+")",w=f.width,E=y;p.css({width:w,height:E,left:Object(o.k)(g.x+(i-t.x)+10)-w/2,top:Object(o.k)(g.y+(a-t.y)+10)-y/2,"-webkit-transform":b,"-ms-transform":b,"-o-transform":b,"-moz-transform":b,transform:b})}},{key:"fillShape",value:function(e,t,n){if(e.save(),"solid"===n.type)e.fillStyle="rgb("+n.color+")",e.fill();else if("gradient"===n.type){var i=void 0;i="linear"===n.gradientType?s.a.createLinearGradient(e,t,n):s.a.createRadialGradient(e,t,n),e.fillStyle=i,e.fill()}e.restore()}}]),e}();t.a=u},function(e,t,n){"use strict";n.d(t,"b",function(){return y});var i=n(16),r=n(17),a=n(18),o=n(19),s=n(20),l=n(21),c=n(22),u=n(23),p=n(24),h=n(25),f=n(0),d={StartEvent:["StartEvent"],Task:["UserTask","ServiceTask"],CallActivity:["CallActivity"],Gateway:["ExclusiveGateway","InclusiveGateway","ParallelGateway","ComplexGateway"],EndEvent:["EndEvent","TerminateEndEvent"]},y=function(){f.a.on("group.get",function(e){return e?d[e]:d})};t.a={EndEvent:i.a,StartEvent:r.a,UserTask:a.a,ServiceTask:o.a,TerminateEndEvent:s.a,ExclusiveGateway:l.a,InclusiveGateway:c.a,ParallelGateway:u.a,ComplexGateway:p.a,CallActivity:h.a}},function(e,t,n){"use strict";function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1&&void 0!==arguments[1]?arguments[1]:{};r(this,t);var i=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.style=n,e.plane&&e.plane.bounds&&(e.plane.bounds.width=e.plane.bounds.width||40,e.plane.bounds.height=e.plane.bounds.height||40),e.data.name||(e.data.name=l.a.trigger("i18n","bpmn.EndEvent")),i.data=e.data,i.plane=e.plane,i.bpmnName="EndEvent",i.groupName="EndEvent",i.actions=i.getPath(),i}return o(t,e),c(t,[{key:"getPath",value:function(){var e=this.plane.bounds,t=e.height,n=e.width,r=[];return[{lineStyle:{lineStyle:"solid",lineWidth:this.lineStyle.lineWidth+2},actions:[{action:"move",x:0,y:t/2},{action:"curve",x1:0,y1:-t/6,x2:n,y2:-t/6,x:n,y:t/2},{action:"curve",x1:n,y1:t+t/6,x2:0,y2:t+t/6,x:0,y:t/2},{action:"close"}]}].concat(i(this.style.content||r),[{fillStyle:{type:"none"},lineStyle:{lineWidth:0},actions:[{action:"move",x:0,y:t/2},{action:"curve",x1:0,y1:-t/6,x2:n,y2:-t/6,x:n,y:t/2},{action:"curve",x1:n,y1:t+t/6,x2:0,y2:t+t/6,x:0,y:t/2},{action:"close"}]}])}},{key:"getTextBlock",value:function(){var e=this.plane.bounds,t=e.height;return{x:e.width/2-60,y:t,width:120,height:30}}}]),t}(s.a);t.a=u},function(e,t,n){"use strict";function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1&&void 0!==arguments[1]?arguments[1]:{};r(this,t);var i=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.style=n,e.plane&&e.plane.bounds&&(e.plane.bounds.width=e.plane.bounds.width||40,e.plane.bounds.height=e.plane.bounds.height||40),e.data.name||(e.data.name=l.a.trigger("i18n","bpmn.StartEvent")),i.data=e.data,i.plane=e.plane,i.bpmnName="StartEvent",i.groupName="StartEvent",i.actions=i.getPath(),i}return o(t,e),c(t,[{key:"getPath",value:function(){var e=this.plane.bounds,t=e.height,n=e.width,r=[];return[{lineStyle:{lineStyle:"solid"},actions:[{action:"move",x:0,y:t/2},{action:"curve",x1:0,y1:-t/6,x2:n,y2:-t/6,x:n,y:t/2},{action:"curve",x1:n,y1:t+t/6,x2:0,y2:t+t/6,x:0,y:t/2},{action:"close"}]}].concat(i(this.style.content||r),[{fillStyle:{type:"none"},lineStyle:{lineWidth:0},actions:[{action:"move",x:0,y:t/2},{action:"curve",x1:0,y1:-t/6,x2:n,y2:-t/6,x:n,y:t/2},{action:"curve",x1:n,y1:t+t/6,x2:0,y2:t+t/6,x:0,y:t/2},{action:"close"}]}])}},{key:"getTextBlock",value:function(){var e=this.plane.bounds,t=e.height;return{x:e.width/2-60,y:t,width:120,height:30}}}]),t}(s.a);t.a=u},function(e,t,n){"use strict";function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1&&void 0!==arguments[1]?arguments[1]:{};r(this,t);var i=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.style=n,e.plane&&e.plane.bounds&&(e.plane.bounds.width=e.plane.bounds.width||110,e.plane.bounds.height=e.plane.bounds.height||55),e.data.name||(e.data.name=l.a.trigger("i18n","bpmn.UserTask")),i.data=e.data,i.plane=e.plane,i.bpmnName="UserTask",i.groupName="Task",i.actions=i.getPath(),i}return o(t,e),c(t,[{key:"getPath",value:function(){var e=this.plane.bounds,t=e.height,n=e.width,r=[{action:"move",x:0,y:4},{action:"quadraticCurve",x1:0,y1:0,x:4,y:0},{action:"line",x:n-4,y:0},{action:"quadraticCurve",x1:n,y1:0,x:n,y:4},{action:"line",x:n,y:t-4},{action:"quadraticCurve",x1:n,y1:t,x:n-4,y:t},{action:"line",x:4,y:t},{action:"quadraticCurve",x1:0,y1:t,x:0,y:t-4},{action:"close"}],a=[{actions:[{action:"font",fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",fontSize:"18px",fontFamily:"bpmn",content:"",x:4,y:16}]}];return[{lineStyle:{lineStyle:"solid"},actions:r}].concat(i(this.style.content||a),[{fillStyle:{type:"none"},lineStyle:{lineWidth:0},actions:r}])}},{key:"getTextBlock",value:function(){var e=this.plane.bounds,t=e.height;return{x:10,y:0,width:e.width-20,height:t}}}]),t}(s.a);t.a=u},function(e,t,n){"use strict";function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1&&void 0!==arguments[1]?arguments[1]:{};r(this,t);var i=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.style=n,e.plane&&e.plane.bounds&&(e.plane.bounds.width=e.plane.bounds.width||110,e.plane.bounds.height=e.plane.bounds.height||55),e.data.name||(e.data.name=l.a.trigger("i18n","bpmn.ServiceTask")),i.data=e.data,i.plane=e.plane,i.bpmnName="ServiceTask",i.groupName="Task",i.actions=i.getPath(),i}return o(t,e),c(t,[{key:"getPath",value:function(){var e=this.plane.bounds,t=e.height,n=e.width,r=[{actions:[{action:"font",fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",fontSize:"18px",fontFamily:"bpmn",content:"",x:4,y:16}]}];return[{lineStyle:{lineStyle:"solid"},actions:[{action:"move",x:0,y:4},{action:"quadraticCurve",x1:0,y1:0,x:4,y:0},{action:"line",x:n-4,y:0},{action:"quadraticCurve",x1:n,y1:0,x:n,y:4},{action:"line",x:n,y:t-4},{action:"quadraticCurve",x1:n,y1:t,x:n-4,y:t},{action:"line",x:4,y:t},{action:"quadraticCurve",x1:0,y1:t,x:0,y:t-4},{action:"close"}]}].concat(i(this.style.content||r),[{fillStyle:{type:"none"},lineStyle:{lineWidth:0},actions:[{action:"move",x:0,y:4},{action:"quadraticCurve",x1:0,y1:0,x:4,y:0},{action:"line",x:n-4,y:0},{action:"quadraticCurve",x1:n,y1:0,x:n,y:4},{action:"line",x:n,y:t-4},{action:"quadraticCurve",x1:n,y1:t,x:n-4,y:t},{action:"line",x:4,y:t},{action:"quadraticCurve",x1:0,y1:t,x:0,y:t-4},{action:"close"}]}])}},{key:"getTextBlock",value:function(){var e=this.plane.bounds,t=e.height;return{x:10,y:0,width:e.width-20,height:t}}}]),t}(s.a);t.a=u},function(e,t,n){"use strict";function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1&&void 0!==arguments[1]?arguments[1]:{};r(this,t);var i=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.style=n,e.plane&&e.plane.bounds&&(e.plane.bounds.width=e.plane.bounds.width||40,e.plane.bounds.height=e.plane.bounds.height||40),e.data.name||(e.data.name=l.a.trigger("i18n","bpmn.TerminateEndEvent")),i.data=e.data,i.plane=e.plane,i.bpmnName="TerminateEndEvent",i.groupName="EndEvent",i.actions=i.getPath(),i}return o(t,e),c(t,[{key:"getPath",value:function(){var e=this.plane.bounds,t=e.height,n=e.width,r=this.lineStyle.lineWidth,a=[{fillStyle:{type:"solid",color:"50,50,50"},lineStyle:{lineWidth:0,lineStyle:"solid"},actions:[{action:"move",x:.5*n-.25*n,y:.5*t},{action:"curve",x1:.5*n-.25*n,y1:.5*t-2*t/3*.5,x2:.5*n+.25*n,y2:.5*t-2*t/3*.5,x:.5*n+.25*n,y:.5*t},{action:"curve",x1:.5*n+.25*n,y1:.5*t+2*t/3*.5,x2:.5*n-.25*n,y2:.5*t+2*t/3*.5,x:.5*n-.25*n,y:.5*t},{action:"close"}]}];return[{lineStyle:{lineWidth:r+2,lineStyle:"solid"},actions:[{action:"move",x:0,y:t/2},{action:"curve",x1:0,y1:-t/6,x2:n,y2:-t/6,x:n,y:t/2},{action:"curve",x1:n,y1:t+t/6,x2:0,y2:t+t/6,x:0,y:t/2},{action:"close"}]}].concat(i(this.style.content||a),[{fillStyle:{type:"none"},lineStyle:{lineWidth:0},actions:[{action:"move",x:0,y:t/2},{action:"curve",x1:0,y1:-t/6,x2:n,y2:-t/6,x:n,y:t/2},{action:"curve",x1:n,y1:t+t/6,x2:0,y2:t+t/6,x:0,y:t/2},{action:"close"}]}])}},{key:"getTextBlock",value:function(){var e=this.plane.bounds,t=e.height;return{x:e.width/2-60,y:t,width:120,height:30}}}]),t}(s.a);t.a=u},function(e,t,n){"use strict";function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1&&void 0!==arguments[1]?arguments[1]:{};r(this,t);var i=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.style=n,e.plane&&e.plane.bounds&&(e.plane.bounds.width=e.plane.bounds.width||50,e.plane.bounds.height=e.plane.bounds.height||50),e.data.name||(e.data.name=""),i.data=e.data,i.plane=e.plane,i.bpmnName="ExclusiveGateway",i.groupName="Gateway",i.actions=i.getPath(),i}return o(t,e),l(t,[{key:"getPath",value:function(){var e=this.plane.bounds,t=e.height,n=e.width,r=[{fillStyle:{type:"solid",color:"0, 0, 0"},lineStyle:{lineWidth:0,lineStyle:"solid"},actions:[{action:"move",x:.5*n+.5*n*.4-.02*n,y:.5*t-.5*t*.4-.02*t},{action:"line",x:.5*n-.5*n*.4-.02*n,y:.5*t+.5*t*.4-.02*t},{action:"line",x:.5*n-.5*n*.4+.02*n,y:.5*t+.5*t*.4+.02*t},{action:"line",x:.5*n+.5*n*.4+.02*n,y:.5*t-.5*t*.4+.02*t},{action:"line",x:.5*n+.5*n*.4-.02*n,y:.5*t-.5*t*.4-.02*t},{action:"close"}]},{fillStyle:{type:"solid",color:"0, 0, 0"},lineStyle:{lineWidth:0,lineStyle:"solid"},actions:[{action:"move",x:.5*n,y:.5*t},{action:"move",x:.5*n-.5*n*.4+.02*n,y:.5*t-.5*t*.4-.02*t},{action:"line",x:.5*n+.5*n*.4+.02*n,y:.5*t+.5*t*.4-.02*t},{action:"line",x:.5*n+.5*n*.4-.02*n,y:.5*t+.5*t*.4+.02*t},{action:"line",x:.5*n-.5*n*.4-.02*n,y:.5*t-.5*t*.4+.02*t},{action:"close"}]}];return[{lineStyle:{lineStyle:"solid"},actions:[{action:"move",x:0,y:.5*t},{action:"line",x:.5*n,y:0},{action:"line",x:n,y:.5*t},{action:"line",x:.5*n,y:t},{action:"line",x:0,y:.5*t},{action:"close"}]}].concat(i(this.style.content||r),[{fillStyle:{type:"none"},lineStyle:{lineWidth:0},actions:[{action:"move",x:0,y:.5*t},{action:"line",x:.5*n,y:0},{action:"line",x:n,y:.5*t},{action:"line",x:.5*n,y:t},{action:"line",x:0,y:.5*t},{action:"close"}]}])}},{key:"getTextBlock",value:function(){var e=this.plane.bounds,t=e.height;return{x:e.width/2-60,y:t,width:120,height:30}}}]),t}(s.a);t.a=c},function(e,t,n){"use strict";function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1&&void 0!==arguments[1]?arguments[1]:{};r(this,t);var i=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.style=n,e.plane&&e.plane.bounds&&(e.plane.bounds.width=e.plane.bounds.width||50,e.plane.bounds.height=e.plane.bounds.height||50),e.data.name||(e.data.name=""),i.data=e.data,i.plane=e.plane,i.bpmnName="InclusiveGateway",i.groupName="Gateway",i.actions=i.getPath(),i}return o(t,e),l(t,[{key:"getPath",value:function(){var e=this.plane.bounds,t=e.height,n=e.width,r=[{lineStyle:{lineStyle:"solid",lineColor:"0, 0, 0"},actions:[{action:"move",x:.5*n-.25*n,y:.5*t},{action:"curve",x1:.5*n-.25*n,y1:.5*t-2*t/3*.5,x2:.5*n+.25*n,y2:.5*t-2*t/3*.5,x:.5*n+.25*n,y:.5*t},{action:"curve",x1:.5*n+.25*n,y1:.5*t+2*t/3*.5,x2:.5*n-.25*n,y2:.5*t+2*t/3*.5,x:.5*n-.25*n,y:.5*t},{action:"close"}]}];return[{lineStyle:{lineStyle:"solid"},actions:[{action:"move",x:0,y:.5*t},{action:"line",x:.5*n,y:0},{action:"line",x:n,y:.5*t},{action:"line",x:.5*n,y:t},{action:"line",x:0,y:.5*t},{action:"close"}]}].concat(i(this.style.content||r),[{fillStyle:{type:"none"},lineStyle:{lineWidth:0},actions:[{action:"move",x:0,y:.5*t},{action:"line",x:.5*n,y:0},{action:"line",x:n,y:.5*t},{action:"line",x:.5*n,y:t},{action:"line",x:0,y:.5*t},{action:"close"}]}])}},{key:"getTextBlock",value:function(){var e=this.plane.bounds,t=e.height;return{x:e.width/2-60,y:t,width:120,height:30}}}]),t}(s.a);t.a=c},function(e,t,n){"use strict";function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1&&void 0!==arguments[1]?arguments[1]:{};r(this,t);var i=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.style=n,e.plane&&e.plane.bounds&&(e.plane.bounds.width=e.plane.bounds.width||50,e.plane.bounds.height=e.plane.bounds.height||50),e.data.name||(e.data.name=""),i.data=e.data,i.plane=e.plane,i.bpmnName="ParallelGateway",i.groupName="Gateway",i.actions=i.getPath(),i}return o(t,e),l(t,[{key:"getPath",value:function(){var e=this.plane.bounds,t=e.height,n=e.width,r=[{fillStyle:{type:"solid",color:"0, 0, 0"},lineStyle:{lineWidth:0,lineStyle:"solid"},actions:[{action:"move",x:.5*n-.04*Math.min(n,t),y:.5*t-.5*t*.5},{action:"line",x:.5*n-.04*Math.min(n,t),y:.5*t+.5*t*.5},{action:"line",x:.5*n+.04*Math.min(n,t),y:.5*t+.5*t*.5},{action:"line",x:.5*n+.04*Math.min(n,t),y:.5*t-.5*t*.5},{action:"line",x:.5*n-.04*Math.min(n,t),y:.5*t-.5*t*.5},{action:"close"},{action:"move",x:.5*n-.5*n*.5,y:.5*t-.04*Math.min(n,t)},{action:"line",x:.5*n-.5*n*.5,y:.5*t+.04*Math.min(n,t)},{action:"line",x:.5*n+.5*n*.5,y:.5*t+.04*Math.min(n,t)},{action:"line",x:.5*n+.5*n*.5,y:.5*t-.04*Math.min(n,t)},{action:"line",x:.5*n-.5*n*.5,y:.5*t-.04*Math.min(n,t)},{action:"close"}]}];return[{lineStyle:{lineStyle:"solid"},actions:[{action:"move",x:0,y:.5*t},{action:"line",x:.5*n,y:0},{action:"line",x:n,y:.5*t},{action:"line",x:.5*n,y:t},{action:"line",x:0,y:.5*t},{action:"close"}]}].concat(i(this.style.content||r),[{fillStyle:{type:"none"},lineStyle:{lineWidth:0},actions:[{action:"move",x:0,y:.5*t},{action:"line",x:.5*n,y:0},{action:"line",x:n,y:.5*t},{action:"line",x:.5*n,y:t},{action:"line",x:0,y:.5*t},{action:"close"}]}])}},{key:"getTextBlock",value:function(){var e=this.plane.bounds,t=e.height;return{x:e.width/2-60,y:t,width:120,height:30}}}]),t}(s.a);t.a=c},function(e,t,n){"use strict";function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1&&void 0!==arguments[1]?arguments[1]:{};r(this,t);var i=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.style=n,e.plane&&e.plane.bounds&&(e.plane.bounds.width=e.plane.bounds.width||50,e.plane.bounds.height=e.plane.bounds.height||50),e.data.name||(e.data.name=""),i.data=e.data,i.plane=e.plane,i.bpmnName="ComplexGateway",i.groupName="Gateway",i.actions=i.getPath(),i}return o(t,e),l(t,[{key:"getPath",value:function(){var e=this.plane.bounds,t=e.height,n=e.width,r=[{fillStyle:{type:"solid",color:"0, 0, 0"},lineStyle:{lineWidth:0,lineStyle:"solid"},actions:[{action:"move",x:.5*n-.5*Math.min(n,t)*.3+.02*Math.min(n,t),y:.5*t-.5*Math.min(n,t)*.3-.02*Math.min(n,t)},{action:"line",x:.5*n+.5*Math.min(n,t)*.3+.02*Math.min(n,t),y:.5*t+.5*Math.min(n,t)*.3-.03*Math.min(n,t)},{action:"line",x:.5*n+.5*Math.min(n,t)*.3-.02*Math.min(n,t),y:.5*t+.5*Math.min(n,t)*.3+.02*Math.min(n,t)},{action:"line",x:.5*n-.5*Math.min(n,t)*.3-.02*Math.min(n,t),y:.5*t-.5*Math.min(n,t)*.3+.02*Math.min(n,t)},{action:"close"}]},{fillStyle:{type:"solid",color:"0, 0, 0"},lineStyle:{lineWidth:0,lineStyle:"solid"},actions:[{action:"move",x:.5*n+.5*Math.min(n,t)*.3-.02*Math.min(n,t),y:.5*t-.5*Math.min(n,t)*.3-.02*Math.min(n,t)},{action:"line",x:.5*n-.5*Math.min(n,t)*.3-.02*Math.min(n,t),y:.5*t+.5*Math.min(n,t)*.3-.02*Math.min(n,t)},{action:"line",x:.5*n-.5*Math.min(n,t)*.3+.02*Math.min(n,t),y:.5*t+.5*Math.min(n,t)*.3+.02*Math.min(n,t)},{action:"line",x:.5*n+.5*Math.min(n,t)*.3+.02*Math.min(n,t),y:.5*t-.5*Math.min(n,t)*.3+.02*Math.min(n,t)},{action:"line",x:.5*n+.5*Math.min(n,t)*.3-.02*Math.min(n,t),y:.5*t-.5*Math.min(n,t)*.3-.02*Math.min(n,t)},{action:"close"}]},{fillStyle:{type:"solid",color:"0, 0, 0"},lineStyle:{lineWidth:0,lineStyle:"solid"},actions:[{action:"move",x:.5*n-.027*Math.min(n,t),y:.5*t-.5*Math.min(n,t)*.4},{action:"line",x:.5*n-.027*Math.min(n,t),y:.5*t+.5*Math.min(n,t)*.4},{action:"line",x:.5*n+.027*Math.min(n,t),y:.5*t+.5*Math.min(n,t)*.4},{action:"line",x:.5*n+.027*Math.min(n,t),y:.5*t-.5*Math.min(n,t)*.4},{action:"line",x:.5*n-.027*Math.min(n,t),y:.5*t-.5*Math.min(n,t)*.4},{action:"close"}]},{fillStyle:{type:"solid",color:"0, 0, 0"},lineStyle:{lineWidth:0,lineStyle:"solid"},actions:[{action:"move",x:.5*n-.5*Math.min(n,t)*.4,y:.5*t-.027*Math.min(n,t)},{action:"line",x:.5*n-.5*Math.min(n,t)*.4,y:.5*t+.027*Math.min(n,t)},{action:"line",x:.5*n+.5*Math.min(n,t)*.4,y:.5*t+.027*Math.min(n,t)},{action:"line",x:.5*n+.5*Math.min(n,t)*.4,y:.5*t-.027*Math.min(n,t)},{action:"line",x:.5*n-.5*Math.min(n,t)*.4,y:.5*t-.027*Math.min(n,t)},{action:"close"}]}];return[{lineStyle:{lineStyle:"solid"},actions:[{action:"move",x:0,y:.5*t},{action:"line",x:.5*n,y:0},{action:"line",x:n,y:.5*t},{action:"line",x:.5*n,y:t},{action:"line",x:0,y:.5*t},{action:"close"}]}].concat(i(this.style.content||r),[{fillStyle:{type:"none"},lineStyle:{lineWidth:0},actions:[{action:"move",x:0,y:.5*t},{action:"line",x:.5*n,y:0},{action:"line",x:n,y:.5*t},{action:"line",x:.5*n,y:t},{action:"line",x:0,y:.5*t},{action:"close"}]}])}},{key:"getTextBlock",value:function(){var e=this.plane.bounds,t=e.height;return{x:e.width/2-60,y:t,width:120,height:30}}}]),t}(s.a);t.a=c},function(e,t,n){"use strict";function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1&&void 0!==arguments[1]?arguments[1]:{};r(this,t);var i=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.style=n,e.plane&&e.plane.bounds&&(e.plane.bounds.width=e.plane.bounds.width||110,e.plane.bounds.height=e.plane.bounds.height||55),e.data.name||(e.data.name=l.a.trigger("i18n","bpmn.CallActivity")),i.data=e.data,i.plane=e.plane,i.bpmnName="CallActivity",i.groupName="CallActivity",i.actions=i.getPath(),i}return o(t,e),c(t,[{key:"getPath",value:function(){var e=this.plane.bounds,t=e.height,n=e.width,r=this.lineStyle.lineWidth,a=[];return[{lineStyle:{lineWidth:r+2,lineStyle:"solid"},actions:[{action:"move",x:0,y:4},{action:"quadraticCurve",x1:0,y1:0,x:4,y:0},{action:"line",x:n-4,y:0},{action:"quadraticCurve",x1:n,y1:0,x:n,y:4},{action:"line",x:n,y:t-4},{action:"quadraticCurve",x1:n,y1:t,x:n-4,y:t},{action:"line",x:4,y:t},{action:"quadraticCurve",x1:0,y1:t,x:0,y:t-4},{action:"close"}]}].concat(i(this.style.content||a),[{fillStyle:{type:"none"},lineStyle:{lineWidth:0},actions:[{action:"move",x:0,y:4},{action:"quadraticCurve",x1:0,y1:0,x:4,y:0},{action:"line",x:n-4,y:0},{action:"quadraticCurve",x1:n,y1:0,x:n,y:4},{action:"line",x:n,y:t-4},{action:"quadraticCurve",x1:n,y1:t,x:n-4,y:t},{action:"line",x:4,y:t},{action:"quadraticCurve",x1:0,y1:t,x:0,y:t-4},{action:"close"}]}])}},{key:"getTextBlock",value:function(){var e=this.plane.bounds,t=e.height;return{x:10,y:0,width:e.width-20,height:t}}}]),t}(s.a);t.a=u},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=n(0),a=n(3),o=n(27),s=n(1),l=(n(7),n(2)),c=function(){function e(e,t){for(var n=0;n2&&n.points.length<=0&&(n.points=p.filter(function(e,t){return 0!==t&&t!==p.length-1})),t&&(n.points=a.a.getConnectionPoints(n,y)),"curve"!==n.linkerType&&"broken"!==n.linkerType||n.points&&0!==n.points.length||(n.points=a.a.getConnectionPoints(n,y)),null==h.angle&&(h.angle=a.a.getAngle(p[1],p[0])),null==f.angle&&(f.angle=a.a.getAngle(p[p.length-2],p[p.length-1]));var m=f.x,g=f.y,v=h.x,x=h.y;f.x>=h.x&&(m=h.x,v=f.x),f.y>=h.y&&(g=h.y,x=f.y),n.points.forEach(function(e,t){e.xv&&(v=e.x),e.yx&&(x=e.y)});var b={x:m,y:g,width:v-m,height:x-g},w=this.$container.find('.shape-box[data-id="'+i.id+'"]');0===w.length&&(w=Object(l.a)("
").appendTo(this.$container.find(".bpd-designer")));var E=w.find(".shape-canvas"),S=Object(s.k)(b.width+20),k=Object(s.k)(b.height+20);E.attr({width:S,height:k}),w.css({left:Object(s.k)(b.x-10)+"px",top:Object(s.k)(b.y-10)+"px",width:S,height:k});var C=E[0].getContext("2d"),A=this.options.bpmnStyle[n.bpmnName]||{},O=Object.assign({},n.lineStyle,A.lineStyle);C.scale(this.options.scale,this.options.scale),C.translate(10,10),C.lineWidth=O.lineWidth,C.strokeStyle="rgb("+O.lineColor+")",C.fillStyle="rgb("+O.lineColor+")",C.save(),"dashed"===O.lineStyle?a.a.setLineDash(C,[8*O.lineWidth,4*O.lineWidth]):"dot"===O.lineStyle?a.a.setLineDash(C,[O.lineWidth,2*O.lineWidth]):"dashdot"===O.lineStyle&&a.a.setLineDash(C,[8*O.lineWidth,3*O.lineWidth,O.lineWidth,3*O.lineWidth]);var R={x:h.x-b.x,y:h.y-b.y},P={x:f.x-b.x,y:f.y-b.y};if(C.beginPath(),C.moveTo(R.x,R.y),"curve"===n.linkerType){var T=n.points[0],M=n.points[1];C.bezierCurveTo(T.x-b.x,T.y-b.y,M.x-b.x,M.y-b.y,P.x,P.y)}else n.points.forEach(function(e,t){C.lineTo(e.x-b.x,e.y-b.y)}),C.lineTo(P.x,P.y);d.indexOf(i.id)>=0&&(C.shadowBlur=4,C.shadowColor="#ec5343"),C.stroke(),C.restore();var j=a.a.getEndpointAngle(n,"sourceRef");this.renderArrow(R,j,c,O.beginArrowStyle,n,h.angle,C);var N=a.a.getEndpointAngle(n,"targetRef");this.renderArrow(P,N,u,O.endArrowStyle,n,f.angle,C),C.restore(),this.renderConnectionText(n)}},{key:"renderArrow",value:function(e,t,n,i,a,o,s){if("solidArrow"===i){var l=Math.PI/10,c=12/Math.cos(l),u={x:e.x-c*Math.cos(t-l),y:e.y-c*Math.sin(t-l)},p={x:e.x-c*Math.sin(Math.PI/2-t-l),y:e.y-c*Math.cos(Math.PI/2-t-l)};s.beginPath(),s.moveTo(e.x,e.y),s.lineTo(u.x,u.y),s.lineTo(p.x,p.y),s.lineTo(e.x,e.y),s.closePath(),s.fill(),s.stroke()}if(n&&"solidCircle"!==i&&"dashedCircle"!==i){var h=r.a.trigger("element.get",n);if(h){s.save(),s.translate(e.x,e.y),s.rotate(o),s.translate(-e.x,-e.y);for(var f=e.x-h.shape.lineStyle.lineWidth/2,d=e.y-1.2*a.lineStyle.lineWidth,y=2*a.lineStyle.lineWidth,m=1.8*a.lineStyle.lineWidth,g=f;g<=f+y;){for(var v=d;v<=d+m;)s.clearRect(g,v,1.5,1.5),v+=1;g+=1}s.restore()}}}},{key:"renderConnectionText",value:function(e){var t=this.$container.find('.shape-box[data-id="'+e.data.id+'"]'),n=t.find(".text-box[data-shape="+e.data.id+"]");0===n.length&&(n=Object(l.a)("
").appendTo(t));var i=e.fontStyle,r="scale("+this.options.scale+")",o={"line-height":Math.round(1.25*i.size)+"px","font-size":i.size+"px","font-family":i.fontFamily,"font-weight":i.bold?"bold":"normal","font-style":i.italic?"italic":"normal","text-align":i.textAlign,color:"rgb("+i.color+")","text-decoration":i.underline?"underline":"none","-webkit-transform":r,"-ms-transform":r,"-o-transform":r,"-moz-transform":r,transform:r};if(n.css(o),null==e.data.name||""===e.data.name.trim())return void n.hide();n.show();var c=e.data.name;c.length>12&&(c=c.substr(0,12)+"..."),n.html(c),n.attr("title",e.data.name);var u=a.a.getConnectionMidpoint(e),p=t.position();n.css({left:Object(s.k)(u.x)-p.left-n.width()/2,top:Object(s.k)(u.y)-p.top-n.height()/2})}},{key:"move",value:function(e,t,n,i){var o=e.data,l=e.plane,c=(e.shape,l.waypoint[0]),u=l.waypoint[l.waypoint.length-1],p=a.a.getShapeByPosition(n,i,this.$container,!0),h=null,f=null;if(r.a.trigger("anchor.point.hide"),null!=p){var d=p.element;if(f=d.data.id,"bounds"===p.type)h=p.anchor,r.a.trigger("anchor.point.show",Object(s.k)(h));else if("shape"===p.type){var y=void 0,m=void 0;if("source"===t?(y={x:u.x,y:u.y},m=o.targetRef):(y={x:c.x,y:c.y},m=o.sourceRef),d.data.id===m)r.a.trigger("anchor.point.hide"),h={x:Object(s.i)(n),y:Object(s.i)(i),angle:null},f=null;else{for(var g=d.shape.getAnchors(),v=d.plane.bounds,x={x:v.x+v.width/2,y:v.y+v.height/2},b=-1,w=void 0,E=0;E=u.x-6&&h.x<=u.x+6&&(c.x=u.x),h.y>=u.y-6&&h.y<=u.y+6&&(c.y=u.y))):(o.targetRef=f,u.x=h.x,u.y=h.y,u.angle=h.angle,null==f&&(h.x>=c.x-6&&h.x<=c.x+6&&(u.x=c.x),h.y>=c.y-6&&h.y<=c.y+6&&(u.y=c.y))),this.renderConnection(e,!0)}}]),e}();t.a=u},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=n(6),s=function(e){function t(e){i(this,t);var n=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.data=e.data,n.plane=e.plane,n.bpmnName="SequenceFlow",n.groupName="SequenceFlow",n.linkerType="broken",n.points=[],n.lineStyle={lineWidth:2,lineColor:"50,50,50",lineStyle:"solid",beginArrowStyle:"none",endArrowStyle:"solidArrow"},n}return a(t,e),t}(o.a);t.a=s},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:128,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:16;if(e<=0)return"0";for(var n=Math.log(Math.pow(2,e))/Math.log(t),i=2;n===1/0;i*=2)n=Math.log(Math.pow(2,e/i))/Math.log(t)*i;for(var r=n-Math.floor(n),a="",o=0;o=Math.pow(2,e)?this.createId(e,t):a}},{key:"rack",value:function(e,t,n){var i=function(i){var a=0,o=void 0;do{if(a++>10){if(!n)throw new Error("too many ID collisions, use more bits");e+=n}o=this.createId(e,t)}while(Object.hasOwnProperty.call(r,o));return r[o]=i,o},r=i.hats={};return i.get=function(e){return i.hats[e]},i.set=function(e,t){return i.hats[e]=t,i},i.bits=e||128,i.base=t||16,i}},{key:"next",value:function(e){return this._seed(e||!0)}},{key:"nextPrefixed",value:function(e,t){var n=void 0;do{n=e+this.next(!0)}while(this.assigned(n));return this.claim(n,t),n}},{key:"claim",value:function(e,t){this._seed.set(e,t||!0)}},{key:"assigned",value:function(e){return this._seed.get(e)||!1}},{key:"unclaim",value:function(e){delete this._seed.hats[e]}},{key:"clear",value:function(){var e=this._seed.hats;for(var t in e)this.unclaim(t)}}]),e}();t.a=a},function(e,t,n){"use strict";var i=n(30),r=n(42),a=n.n(r),o=n(43),s=n.n(o),l=n(44),c=n.n(l),u=n(45),p=n.n(u),h={bpmn:a.a,bpmndi:s.a,dc:c.a,di:p.a};t.a=function(e,t){var n=Object.assign({},h,e);return new i.a(n,t)}},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=n(8),s=n(0),l=n(36),c=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:function(){})(this.create(e.descriptor,e.attrs))}},{key:"fromXML",value:function(e,t,n,i){"string"==typeof t&&t.constructor===String||(i=n,n=t,t="bpmn:Definitions"),"function"==typeof n&&n.constructor===Function&&(i=n,n={});var r=new l.a(Object.assign({model:this,lax:!0},n)),a=r.handler(t);r.fromXML(e,a,i)}},{key:"toXML",value:function(e,t,n){"function"==typeof t&&t.constructor===Function&&(n=t,t={});var i,r,a=new l.b(t);try{i=a.toXML(e)}catch(e){r=e}return n(r,i)}},{key:"test",value:function(e){console.log("test",e,this.a)}}]),t}(o.a);t.a=u},function(e,t,n){"use strict";function i(e,t){this.model=e,this.properties=t}t.a=i;var r=n(32);i.prototype.createType=function(e){function t(e){i.define(this,"$type",{value:o,enumerable:!0}),i.define(this,"$attrs",{value:{}}),i.define(this,"$parent",{writable:!0});for(var t in e)this.set(t,e[t])}var n=this.model,i=this.properties,a=Object.create(r.a.prototype);e.properties.forEach(function(e){e.isMany||void 0===e.default||(a[e.name]=e.default)}),i.defineModel(a,n),i.defineDescriptor(a,e);var o=e.ns.name;return t.prototype=a,t.hasType=a.$instanceOf=this.model.hasType,i.defineModel(t,n),i.defineDescriptor(t,e),t}},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=function(){function e(e,t){for(var n=0;n already defined")}t.a=i;var a=n(34),o=n(5);i.prototype.getPackage=function(e){return this.packageMap[e]},i.prototype.getPackages=function(){return this.packages},i.prototype.registerPackage=function(e){var t=this;e=Object.assign({},e);var n=this.packageMap;r(n,e,"prefix"),r(n,e,"uri"),e.types.forEach(function(n){t.registerType(n,e)}),n[e.uri]=n[e.prefix]=e,this.packages.push(e)},i.prototype.registerType=function(e,t){var n=this;e=Object.assign({},e,{superClass:(e.superClass||[]).slice(),extends:(e.extends||[]).slice(),properties:(e.properties||[]).slice(),meta:Object.assign(e.meta||{})});var i=Object(o.g)(e.name,t.prefix),r=i.name,a={};e.properties.forEach(function(e){var t=Object(o.g)(e.name,i.prefix),n=t.name;Object(o.e)(e.type)||(e.type=Object(o.g)(e.type,t.prefix).name),Object.assign(e,{ns:t,name:n}),a[n]=e}),Object.assign(e,{ns:i,name:r,propertiesByName:a}),e.extends.forEach(function(e){var t=n.typeMap[e];t.traits=t.traits||[],t.traits.push(r)}),this.definePackage(e,t),this.typeMap[r]=e},i.prototype.mapTypes=function(e,t,n){function i(e){return r(e,!0)}function r(n,i){var r=Object(o.g)(n,Object(o.e)(n)?"":e.prefix);s.mapTypes(r,t,i)}var a=Object(o.e)(e.name)?{name:e.name}:this.typeMap[e.name],s=this;if(!a)throw new Error("unknown type <"+e.name+">");a.superClass&&a.superClass.forEach(function(e){n?i(e):r(e)}),t(a,!n),a.traits&&a.traits.length>0&&a.traits.forEach(function(e){i(e)})},i.prototype.getEffectiveDescriptor=function(e){var t=Object(o.g)(e),n=new a.a(t);this.mapTypes(t,function(e,t){n.addTrait(e,t)});var i=n.build();return this.definePackage(i,i.allTypes[i.allTypes.length-1].$pkg),i},i.prototype.definePackage=function(e,t){this.properties.define(e,"$pkg",{value:t})}},function(e,t,n){"use strict";function i(e,t){var n={},i=Object(e);return t.forEach(function(t){t in i&&(n[t]=e[t])}),n}function r(e){this.ns=e,this.name=e.name,this.allTypes=[],this.allTypesByName={},this.properties=[],this.propertiesByName={}}t.a=r;var a=n(5);r.prototype.build=function(){return i(this,["ns","name","allTypes","allTypesByName","properties","propertiesByName","bodyProperty","idProperty"])},r.prototype.addProperty=function(e,t,n){"boolean"==typeof t&&(n=t,t=void 0),this.addNamedProperty(e,!1!==n);var i=this.properties;void 0!==t?i.splice(t,0,e):i.push(e)},r.prototype.replaceProperty=function(e,t,n){var i=e.ns,r=this.properties,a=this.propertiesByName,o=e.name!==t.name;if(e.isId){if(!t.isId)throw new Error("property <"+t.ns.name+"> must be id property to refine <"+e.ns.name+">");this.setIdProperty(t,!1)}if(e.isBody){if(!t.isBody)throw new Error("property <"+t.ns.name+"> must be body property to refine <"+e.ns.name+">");this.setBodyProperty(t,!1)}var s=r.indexOf(e);if(-1===s)throw new Error("property <"+i.name+"> not found in property list");r.splice(s,1),this.addProperty(t,n?void 0:s,o),a[i.name]=a[i.localName]=t},r.prototype.redefineProperty=function(e,t,n){var i=e.ns.prefix,r=t.split("#"),o=Object(a.g)(r[0],i),s=Object(a.g)(r[1],o.prefix).name,l=this.propertiesByName[s];if(!l)throw new Error("refined property <"+s+"> not found");this.replaceProperty(l,e,n),delete e.redefines},r.prototype.addNamedProperty=function(e,t){var n=e.ns,i=this.propertiesByName;t&&(this.assertNotDefined(e,n.name),this.assertNotDefined(e,n.localName)),i[n.name]=i[n.localName]=e},r.prototype.removeNamedProperty=function(e){var t=e.ns,n=this.propertiesByName;delete n[t.name],delete n[t.localName]},r.prototype.setBodyProperty=function(e,t){if(t&&this.bodyProperty)throw new Error("body property defined multiple times (<"+this.bodyProperty.ns.name+">, <"+e.ns.name+">)");this.bodyProperty=e},r.prototype.setIdProperty=function(e,t){if(t&&this.idProperty)throw new Error("id property defined multiple times (<"+this.idProperty.ns.name+">, <"+e.ns.name+">)");this.idProperty=e},r.prototype.assertNotDefined=function(e,t){var n=e.name,i=this.propertiesByName[n];if(i)throw new Error("property <"+n+"> already defined; override of <"+i.definedBy.ns.name+"#"+i.ns.name+"> by <"+e.definedBy.ns.name+"#"+e.ns.name+"> not allowed without redefines")},r.prototype.hasProperty=function(e){return this.propertiesByName[e]},r.prototype.addTrait=function(e,t){var n=this,i=this.allTypesByName,r=this.allTypes,a=e.name;a in i||(e.properties&&e.properties.forEach(function(i){i=Object.assign({},i,{name:i.ns.localName,inherited:t}),Object.defineProperty(i,"definedBy",{value:e});var r=i.replaces,a=i.redefines;r||a?n.redefineProperty(i,r||a,r):(i.isBody&&n.setBodyProperty(i),i.isId&&n.setIdProperty(i),n.addProperty(i))}),r.push(e),i[a]=e)}},function(e,t,n){"use strict";function i(e){this.model=e}function r(e){return void 0===e}function a(e,t,n){Object.defineProperty(e,t.name,{enumerable:!t.isReference,writable:!0,value:n,configurable:!0})}t.a=i,i.prototype.set=function(e,t,n){var i=this.model.getPropertyDescriptor(e,t),o=i&&i.name;r(n)?i?delete e[o]:delete e.$attrs[t]:i?o in e?e[o]=n:a(e,i,n):e.$attrs[t]=n},i.prototype.get=function(e,t){var n=this.model.getPropertyDescriptor(e,t);if(!n)return e.$attrs[t];var i=n.name;return!e[i]&&n.isMany&&a(e,n,[]),e[i]},i.prototype.define=function(e,t,n){Object.defineProperty(e,t,n)},i.prototype.defineDescriptor=function(e,t){this.define(e,"$descriptor",{value:t})},i.prototype.defineModel=function(e,t){this.define(e,"$model",{value:t})}},function(e,t,n){"use strict";var i=n(37);n.d(t,"a",function(){return i.a});var r=n(41);n.d(t,"b",function(){return r.a})},function(e,t,n){"use strict";function i(e,t){t="function"==typeof t&&t.constructor===Function?t:function(e){return e===t};var n;return e.forEach(function(e,i){if(t(e,i))return n=e,!1}),n}function r(e){return e.charAt(0).toUpperCase()+e.slice(1)}function a(e,t){return Object(A.d)(t)?e.prefix+":"+r(e.localName):e.name}function o(e,t){var n=e.name,i=e.localName,r=t.xml&&t.xml.typePrefix;return r&&0===i.indexOf(r)?e.prefix+":"+i.slice(r.length):n}function s(e,t){var n=Object(A.g)(e);return o(n,t.getPackage(n.prefix))}function l(e){return new Error(e)}function c(e){return e.$descriptor}function u(e){setTimeout(e,0)}function p(e){Object.assign(this,e),this.elementsById={},this.references=[],this.warnings=[],this.addReference=function(e){this.references.push(e)},this.addElement=function(e){if(!e)throw l("expected element");var t,n=this.elementsById,i=c(e),r=i.idProperty;if(r&&(t=e.get(r.name))){if(n[t])throw l("duplicate ID <"+t+">");n[t]=e}},this.addWarning=function(e){this.warnings.push(e)}}function h(){}function f(){}function d(){}function y(e,t){this.property=e,this.context=t}function m(e,t){this.element=t,this.propertyDesc=e}function g(){}function v(e,t,n){this.model=e,this.type=e.getType(t),this.context=n}function x(e,t,n){v.call(this,e,t,n)}function b(e,t,n){this.model=e,this.context=n}function w(e){e instanceof C.a&&(e={model:e}),Object.assign(this,{lax:!1},e)}t.a=w;var E=n(38),S=n.n(E),k=n(40),C=n(8),A=n(5),O=k.a.Parser;h.prototype.handleEnd=function(){},h.prototype.handleText=function(){},h.prototype.handleNode=function(){},f.prototype=Object.create(h.prototype),f.prototype.handleNode=function(){return this},d.prototype=Object.create(h.prototype),d.prototype.handleText=function(e){this.body=(this.body||"")+e},y.prototype=Object.create(d.prototype),y.prototype.handleNode=function(e){if(this.element)throw l("expected no sub nodes");return this.element=this.createReference(e),this},y.prototype.handleEnd=function(){this.element.id=this.body},y.prototype.createReference=function(e){return{property:this.property.ns.name,id:""}},m.prototype=Object.create(d.prototype),m.prototype.handleEnd=function(){var e=this.body||"",t=this.element,n=this.propertyDesc;e=Object(A.c)(n.type,e),n.isMany?t.get(n.name).push(e):t.set(n.name,e)},g.prototype=Object.create(d.prototype),g.prototype.handleNode=function(e){var t=this,n=this.element;return n?t=this.handleChild(e):(n=this.element=this.createElement(e),this.context.addElement(n)),t},v.prototype=Object.create(g.prototype),v.prototype.addReference=function(e){this.context.addReference(e)},v.prototype.handleText=function(e){if(!c(this.element).bodyProperty)throw l("unexpected body text <"+e+">");d.prototype.handleText.call(this,e)},v.prototype.handleEnd=function(){var e=this.body,t=this.element,n=c(t),i=n.bodyProperty;i&&void 0!==e&&(e=Object(A.c)(i.type,e),t.set(i.name,e))},v.prototype.createElement=function(e){var t,n=e.attributes,i=this.type,r=c(i),a=this.context,o=new i({}),s=this.model;return Object.keys(n).forEach(function(e){var i,l=n[e],c=r.propertiesByName[e];c&&c.isReference?c.isMany?(i=l.split(" "),i.forEach(function(e){a.addReference({element:o,property:c.ns.name,id:e})})):a.addReference({element:o,property:c.ns.name,id:l}):(c?l=Object(A.c)(c.type,l):"xmlns"!==e&&(t=Object(A.g)(e,r.ns.prefix),s.getPackage(t.prefix)&&a.addWarning({message:"unknown attribute <"+e+">",element:o,property:e,value:l})),o.set(e,l))}),o},v.prototype.getPropertyForNode=function(e){var t,n,r=e.name,o=Object(A.g)(r),u=this.type,p=this.model,h=c(u),f=o.name,d=h.propertiesByName[f];if(d)return Object(A.i)(d)&&(t=e.attributes[A.b])?(t=s(t,p),n=p.getType(t),Object.assign({},d,{effectiveType:c(n).name})):d;var y=p.getPackage(o.prefix);if(y){if(t=a(o,y),n=p.getType(t),d=i(h.properties,function(e){return!e.isVirtual&&!e.isReference&&!e.isAttribute&&n.hasType(e.type)}))return Object.assign({},d,{effectiveType:c(n).name})}else if(d=i(h.properties,function(e){return!e.isReference&&!e.isAttribute&&"Element"===e.type}))return d;throw l("unrecognized element <"+o.name+">")},v.prototype.toString=function(){return"ElementDescriptor["+c(this.type).name+"]"},v.prototype.valueHandler=function(e,t){return new m(e,t)},v.prototype.referenceHandler=function(e){return new y(e,this.context)},v.prototype.handler=function(e){return"Element"===e?new b(this.model,e,this.context):new v(this.model,e,this.context)},v.prototype.handleChild=function(e){var t,n,i,r;if(t=this.getPropertyForNode(e),i=this.element,n=t.effectiveType||t.type,Object(A.f)(n))return this.valueHandler(t,i);r=t.isReference?this.referenceHandler(t).handleNode(e):this.handler(n).handleNode(e);var a=r.element;return void 0!==a&&(t.isMany?i.get(t.name).push(a):i.set(t.name,a),t.isReference?(Object.assign(a,{element:i}),this.context.addReference(a)):a.$parent=i),r},x.prototype=Object.create(v.prototype),x.prototype.createElement=function(e){var t=e.name,n=Object(A.g)(t),i=this.model,r=this.type,o=i.getPackage(n.prefix),s=o&&a(n,o)||t;if(!r.hasType(s))throw l("unexpected element <"+e.originalName+">");return v.prototype.createElement.call(this,e)},b.prototype=Object.create(g.prototype),b.prototype.createElement=function(e){var t=e.name,n=Object(A.g)(t),i=n.prefix,r=e.ns[i+"$uri"],a=e.attributes;return this.model.createAny(t,r,a)},b.prototype.handleChild=function(e){var t,n=new b(this.model,"Element",this.context).handleNode(e),i=this.element,r=n.element;return void 0!==r&&(t=i.$children=i.$children||[],t.push(r),r.$parent=i),n},b.prototype.handleEnd=function(){this.body&&(this.element.$body=this.body)},w.prototype.fromXML=function(e,t,n){function i(e,t,n){var i=t(),r=i.line,a=i.column,o=i.data;"<"===o.charAt(0)&&-1!==o.indexOf(" ")&&(o=o.slice(0,o.indexOf(" "))+">");var s="unparsable content "+(o?o+" ":"")+"detected\n\tline: "+r+"\n\tcolumn: "+a+"\n\tnested error: "+e.message;if(n)return b.addWarning({message:s,error:e}),console.warn("could not parse node"),console.warn(e),!0;throw console.error("could not parse document"),console.error(e),l(s)}function r(e,t){return i(e,t,!0)}function a(){var e,t,n=b.elementsById,i=b.references;for(e=0;t=i[e];e++){var r=t.element,a=n[t.id],o=c(r).propertiesByName[t.property];if(a||b.addWarning({message:"unresolved reference <"+t.id+">",element:t.element,property:t.property,value:t.id}),o.isMany){var s=r.get(o.name),l=s.indexOf(t);-1===l&&(l=s.length),a?s[l]=a:s.splice(l,1)}else r.set(o.name,a)}}function o(){E.pop().handleEnd()}function s(e){if(k.test(e)){var t=C.exec(e),n=t&&t[1];n&&!A.test(n)&&b.addWarning({message:"unsupported document encoding <"+n+">, falling back to UTF-8"})}}function h(e,t){var n=E.peek();try{E.push(n.handleNode(e))}catch(e){i(e,t,x)&&E.push(new f)}}function d(e,t){try{E.peek().handleText(e)}catch(e){r(e,t)}}function y(e,t){(e=e.trim())&&d(e,t)}var m=t.rootHandler;t instanceof v?(m=t,t={}):"string"==typeof t?(m=this.handler(t),t={}):"string"==typeof m&&(m=this.handler(m));var g=this.model,x=this.lax,b=new p(Object.assign({},t,{rootHandler:m})),w=new O({proxy:!0}),E=new S.a;m.context=b,E.push(m);var k=/^<\?xml /i,C=/ encoding="([^"]+)"/i,A=/^utf-8$/i,R=g.getPackages().reduce(function(e,t){return e[t.uri]=t.prefix,e},{});w.ns(R).on("openTag",function(e,t,n,i){var r=e.attrs||{},a=Object.keys(r).reduce(function(e,n){var i=t(r[n]);return e[n]=i,e},{});h({name:e.name,originalName:e.originalName,attributes:a,ns:e.ns},i)}).on("question",s).on("closeTag",o).on("cdata",d).on("text",function(e,t,n){y(t(e),n)}).on("error",i).on("warn",r),u(function(){var t;try{w.parse(e),a()}catch(e){t=e}var i=m.element;t||i||(t=l("failed to parse document as <"+m.type.$descriptor.name+">")),n(t,t?void 0:i,b)})},w.prototype.handler=function(e){return new x(this.model,e)}},function(e,t,n){"use strict";(function(t){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(e,t){for(var n=0;n0&&(e=this.data.pop(),this.top--),e}},{key:"push",value:function(e){return this.data[++this.top]=e,this}},{key:"search",value:function(e){var t=this.data.indexOf(e);return-1===t?-1:this.data.length-t}}]),e}();e.exports=r}("undefined"!=typeof window&&window)}).call(t,n(39))},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";function i(e,t,n,i){return i?m.call(v,i)?v[i]:"&"+i+";":y(t?t:parseInt(n,16))}function r(e){return e.length>3&&-1!==e.indexOf("&")?e.replace(g,i):e}function a(e){return new Error(e)}function o(e){return"missing namespace for prefix <"+e+">"}function s(e){return{get:e,enumerable:!0}}function l(e){var t,n={};for(t in e)n[t]=e[t];return n}function c(e){return e+"$uri"}function u(e){var t,n,i={};for(t in e)n=e[t],i[n]=n,i[c(n)]=t;return i}function p(){return{line:0,column:0}}function h(e){throw e}function f(e){function t(e){e instanceof Error||(e=a(e)),N=e,P(e,T)}function n(e){S&&(e instanceof Error||(e=a(e)),S(e,T))}function i(e){function i(){if(null!==B)return B;var e,t,i,a,s,u,p,h,f,d,y,m=j&&L.xmlns,g=j&&M?[]:null,v=G,x=H,b=x.length,E={},S={};e:for(;v8)){for((d<65||d>122||d>90&&d<97)&&95!==d&&58!==d&&(n("illegal first char attribute name"),f=!0),y=v+1;y96&&d<123||d>64&&d<91||d>47&&d<59||46===d||45===d||95===d)){if(32===d||d<14&&d>8){n("missing attribute value"),v=y;continue e}if(61===d)break;n("illegal attribute name char"),f=!0}if(h=x.substring(v,y),"xmlns:xmlns"===h&&(n("illegal declaration of xmlns"),f=!0),34===(d=x.charCodeAt(y+1)))-1===(y=x.indexOf('"',v=y+2))&&-1!==(y=x.indexOf("'",v))&&(n("attribute value quote missmatch"),f=!0);else if(39===d)-1===(y=x.indexOf("'",v=y+2))&&-1!==(y=x.indexOf('"',v))&&(n("attribute value quote missmatch"),f=!0);else for(n("missing attribute value quotes"),f=!0,y+=1;y8);y++);for(-1===y&&(n("missing closing quotes"),y=b,f=!0),f||(u=x.substring(v,y)),v=y;y+18);y++)v===y&&(n("illegal character after attribute end"),f=!0);if(v=y+1,!f)if(h in S)n("attribute <"+h+"> already defined");else if(S[h]=!0,j)if(M){if(null!==(s="xmlns"===h?"xmlns":120===h.charCodeAt(0)&&"xmlns:"===h.substr(0,6)?h.substr(6):null)){if(e=r(u),t=c(s),!(p=O[e])){if("xmlns"===s||t in L&&L[t]!==e)do{p="ns"+_++}while(void 0!==L[p]);else p=s;O[e]=p}L[s]!==p&&(a||(L=l(L),a=!0),L[s]=p,"xmlns"===s&&(L[c(p)]=e,m=p),L[t]=e),E[h]=u;continue}g.push(h,u)}else d=h.indexOf(":"),-1!==d?(i=L[h.substring(0,d)])?(h=m===i?h.substr(d+1):i+h.substr(d),h===w&&(d=u.indexOf(":"),-1!==d?(i=u.substring(0,d),i=L[i]||i,u=i+u.substring(d)):u=m+":"+u),E[h]=u):n(o(h.substring(0,d))):E[h]=u;else E[h]=u}if(M)for(v=0,b=g.length;v=o&&(t=i.exec(e))&&!((s=t[0].length+t.index)>z);)r+=1,o=s;return-1===z?(a=s,n=e.substring(W)):0===W?(console.log(z-o),n=e.substring(W,z)):(a=z-o,n=-1===W?e.substring(z):e.substring(z,W+1)),{data:n,line:r,column:a}}var p,h,f,d,x,b,S,P,N,B,I=j?[]:null,L=j?u(O):null,$=[],_=0,F=!1,q=!1,z=0,W=0,H="",G=0;for(T=a,R&&(N=Object.create({},{name:s(function(){return S}),originalName:s(function(){return P}),attrs:s(i),ns:s(function(){return L})}));-1!==W;){if(-1===(z=60===e.charCodeAt(W)?W:e.indexOf("<",W)))return $.length?t("unexpected end of file"):0===W?t("missing start tag"):void(W",z+1)))return t("unclosed tag");if(B={},47===x){if(F=!1,q=!0,!$.length)return t("missing open tag");if(h=S=$.pop(),d=z+2+h.length,e.substring(z+2,d)!==h)return t("closing tag mismatch");for(;d8&&x<14))return t("close tag")}else{if(47===e.charCodeAt(W-1)?(h=S=e.substring(z+1,W-1),F=!0,q=!0):(h=S=e.substring(z+1,W),F=!0,q=!1),!(x>96&&x<123||x>64&&x<91||95===x||58===x))return t("illegal first char nodeName");for(d=1,f=h.length;d96&&x<123||x>64&&x<91||x>47&&x<59||45===x||95===x||46===x)){if(32===x||x<14&&x>8){S=h.substring(0,d),B=null;break}return t("invalid nodeName")}q||$.push(S)}if(j){if(p=L,F&&(q||I.push(p),null===B&&(M=-1!==h.indexOf("xmlns",d))&&(G=d,H=h,i(),M=!1)),P=S,-1!==(x=S.indexOf(":"))){if(!(b=L[S.substring(0,x)]))return t("missing namespace on <"+P+">");S=S.substr(x+1)}else b=L.xmlns;b&&(S=b+":"+S)}if(F&&(G=d,H=h,m&&(R?m(N,r,q,T):m(S,i,r,q,T),D)))return;if(q){if(g&&(g(R?N:S,r,F,T),D))return;j&&(L=F?p:I.pop())}W+=1}else{if(-1===(W=e.indexOf("?>",z)))return t("unclosed question");if(C&&(C(e.substring(z,W+2),T),D))return;W+=2}else{if(91===(x=e.charCodeAt(z+2))&&"CDATA["===e.substr(z+3,6)){if(-1===(W=e.indexOf("]]>",z)))return t("unclosed cdata");if(v&&(v(e.substring(z+9,W),T),D))return;W+=3;continue}if(45===x&&45===e.charCodeAt(z+3)){if(-1===(W=e.indexOf("--\x3e",z)))return t("unclosed comment");if(k&&(k(e.substring(z+4,W),r,T),D))return;W+=3;continue}if(-1===(W=e.indexOf(">",z+1)))return t("unclosed tag");if(A&&(A(e.substring(z,W+1),r,T),D))return;W+=1}}}if(!this)return new f(e);var y,m,g,v,S,k,C,A,O,R=e&&e.proxy,P=h,T=p,M=!1,j=!1,N=null,D=!1;this.on=function(e,t){if("function"!=typeof t)throw a("required args ");switch(e){case"openTag":m=t;break;case"text":y=t;break;case"closeTag":g=t;break;case"error":P=t;break;case"warn":S=t;break;case"cdata":v=t;break;case"attention":A=t;break;case"question":C=t;break;case"comment":k=t;break;default:throw a("unsupported event: "+e)}return this},this.ns=function(e){if(void 0===e&&(e={}),"object"!==(void 0===e?"undefined":d(e)))throw a("required args ");var t,n={};for(t in e)n[t]=e[t];return n[x]=b,j=!0,O=n,this},this.parse=function(e){if("string"!=typeof e)throw a("required args ");return N=null,i(e),T=p,D=!1,N},this.stop=function(){D=!0}}var d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y=String.fromCharCode,m=Object.prototype.hasOwnProperty,g=/&#(\d+);|&#x([0-9a-f]+);|&(\w+);/gi,v={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'};Object.keys(v).forEach(function(e){v[e.toUpperCase()]=v[e]});var x="http://www.w3.org/2001/XMLSchema-instance",b="xsi",w="xsi:type",E="non-whitespace outside of root node";t.a={Parser:f,decode:r}},function(e,t,n){"use strict";function i(e,t){var n=[];return e.forEach(function(e,i){t(e,i)&&n.push(e)}),n}function r(e){var t={},n={},i={},r=[],a=[];this.byUri=function(t){return n[t]||e&&e.byUri(t)},this.add=function(e,t){n[e.uri]=e,t?r.push(e):a.push(e),this.mapPrefix(e.prefix,e.uri)},this.uriByPrefix=function(e){return t[e||"xmlns"]},this.mapPrefix=function(e,n){t[e||"xmlns"]=n},this.logUsed=function(e){var t=e.uri;i[t]=this.byUri(t)},this.getUsed=function(e){function t(e){return i[e.uri]}return[].concat(r,a).filter(t)}}function a(e){return e.charAt(0).toLowerCase()+e.slice(1)}function o(e,t){return Object(A.d)(t)?a(e):e}function s(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function l(e){return"string"==typeof e&&e.constructor===String?e:(e.prefix?e.prefix+":":"")+e.localName}function c(e){return e.getUsed().map(function(e){return{name:"xmlns"+(e.prefix?":"+e.prefix:""),value:e.uri}})}function u(e,t){return t.isGeneric?Object.assign({localName:t.ns.localName},e):Object.assign({localName:o(t.ns.localName,t.$pkg)},e)}function p(e,t){return Object.assign({localName:t.ns.localName},e)}function h(e){return i(e.$descriptor.properties,function(t){var n=t.name;if(t.isVirtual)return!1;if(!e.hasOwnProperty(n))return!1;var i=e[n];return i!==t.default&&null!==i&&(!t.isMany||i.length)})}function f(e,t,n){return e="string"==typeof e&&e.constructor===String?e:""+e,e.replace(t,function(e){return"&"+n[e]+";"})}function d(e){return f(e,R,T)}function y(e){return f(e,P,M)}function m(e){return i(e,function(e){return e.isAttr})}function g(e){return i(e,function(e){return!e.isAttr})}function v(e){this.tagName=e}function x(){}function b(e){this.tagName=e}function w(e,t){this.body=[],this.attrs=[],this.parent=e,this.propertyDescriptor=t}function E(e,t){w.call(this,e,t)}function S(){this.value="",this.write=function(e){this.value+=e}}function k(e,t){var n=[""];this.append=function(t){return e.write(t),this},this.appendNewLine=function(){return t&&e.write("\n"),this},this.appendIndent=function(){return t&&e.write(n.join(" ")),this},this.indent=function(){return n.push(""),this},this.unindent=function(){return n.pop(),this}}function C(e){function t(t,n){var i=n||new S,r=new k(i,e.format);if(e.preamble&&r.append(O),(new w).build(t).serializeTo(r),!n)return i.value}return e=Object.assign({format:!1,preamble:!0},e||{}),{toXML:t}}t.a=C;var A=n(5),O='\n',R=/<|>|'|"|&|\n\r|\n/g,P=/<|>|&/g,T={"\n":"#10","\n\r":"#10",'"':"#34","'":"#39","<":"#60",">":"#62","&":"#38"},M={"<":"lt",">":"gt","&":"amp"};v.prototype.build=function(e){return this.element=e,this},v.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"+this.element.id+"").appendNewLine()},x.prototype.serializeValue=x.prototype.serializeTo=function(e){e.append(this.escape?y(this.value):this.value)},x.prototype.build=function(e,t){return this.value=t,"String"===e.type&&-1!==t.search(P)&&(this.escape=!0),this},s(b,x),b.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"),this.serializeValue(e),e.append("").appendNewLine()},w.prototype.build=function(e){this.element=e;var t,n,i=e.$descriptor,r=this.propertyDescriptor,a=i.isGeneric;return t=a?this.parseGeneric(e):this.parseNsAttributes(e),this.ns=r?this.nsPropertyTagName(r):this.nsTagName(i),this.tagName=this.addTagName(this.ns),a||(n=h(e),this.parseAttributes(m(n)),this.parseContainments(g(n))),this.parseGenericAttributes(e,t),this},w.prototype.nsTagName=function(e){return u(this.logNamespaceUsed(e.ns),e)},w.prototype.nsPropertyTagName=function(e){return p(this.logNamespaceUsed(e.ns),e)},w.prototype.isLocalNs=function(e){return e.uri===this.ns.uri},w.prototype.nsAttributeName=function(e){var t;if(t="string"==typeof e&&e.constructor===String?Object(A.g)(e):e.ns,e.inherited)return{localName:t.localName};var n=this.logNamespaceUsed(t);return this.getNamespaces().logUsed(n),this.isLocalNs(n)?{localName:t.localName}:Object.assign({localName:t.localName},n)},w.prototype.parseGeneric=function(e){var t=this,n=this.body,i=[];for(var r in e){"$body"===r?n.push((new x).build({type:"String"},e[r])):"$children"===r?val.forEach(function(e){n.push(new w(t).build(e))}):0!==r.indexOf("$")&&t.parseNsAttribute(e,r,e[r])&&i.push({name:r,value:e[r]})}return i},w.prototype.parseNsAttribute=function(e,t,n){var i,r=e.$model,a=Object(A.g)(t);if("xmlns"===a.prefix&&(i={prefix:a.localName,uri:n}),a.prefix||"xmlns"!==a.localName||(i={uri:n}),!i)return{name:t,value:n};if(r&&r.getPackage(n))this.logNamespace(i,!0,!0);else{var o=this.logNamespaceUsed(i,!0);this.getNamespaces().logUsed(o)}},w.prototype.parseNsAttributes=function(e,t){var n=this,i=e.$attrs,r=[];for(var a in i){var o=n.parseNsAttribute(e,a,i[a]);o&&r.push(o)}return r},w.prototype.parseGenericAttributes=function(e,t){var n=this;t.forEach(function(t){if(t.name!==A.b)try{n.addAttribute(n.nsAttributeName(t.name),t.value)}catch(n){console.warn("missing namespace information for ",t.name,"=",t.value,"on",e,n)}})},w.prototype.parseContainments=function(e){var t=this,n=this.body,i=this.element;e.forEach(function(e){var r=i.get(e.name),a=e.isReference;if(e.isMany||(r=[r]),e.isBody)n.push((new x).build(e,r[0]));else if(Object(A.f)(e.type))r.forEach(function(i){n.push(new b(t.addTagName(t.nsPropertyTagName(e))).build(e,i))});else if(a)r.forEach(function(i){n.push(new v(t.addTagName(t.nsPropertyTagName(e))).build(i))});else{var o=Object(A.i)(e),s=Object(A.h)(e);r.forEach(function(i){var r;r=o?new E(t,e):s?new w(t,e):new w(t),n.push(r.build(i))})}})},w.prototype.getNamespaces=function(e){var t,n=this.namespaces,i=this.parent;return n||(t=i&&i.getNamespaces(),e||!t?this.namespaces=n=new r(t):n=t),n},w.prototype.logNamespace=function(e,t,n){var i=this.getNamespaces(n),r=e.uri,a=e.prefix;return i.byUri(r)||i.add(e,t),i.mapPrefix(a,r),e},w.prototype.logNamespaceUsed=function(e,t){var n,i,r,a=this.element,o=a.$model,s=this.getNamespaces(t),l=e.prefix,c=e.uri;if(!l&&!c)return{localName:e.localName};if(r=A.a[l]||o&&(o.getPackage(l)||{}).uri,!(c=c||r||s.uriByPrefix(l)))throw new Error("no namespace uri given for prefix <"+l+">");if(!(e=s.byUri(c))){for(n=l,i=1;s.uriByPrefix(n);)n=l+"_"+i++;e=this.logNamespace({prefix:n,uri:c},r===c)}return l&&s.mapPrefix(l,c),e},w.prototype.parseAttributes=function(e){var t=this,n=this.element;e.forEach(function(e){var i=n.get(e.name);if(e.isReference)if(e.isMany){var r=[];forEach(i,function(e){r.push(e.id)}),i=r.join(" ")}else i=i.id;t.addAttribute(t.nsAttributeName(e),i)})},w.prototype.addTagName=function(e){var t=this.logNamespaceUsed(e);return this.getNamespaces().logUsed(t),l(e)},w.prototype.addAttribute=function(e,t){var n=this.attrs;"string"==typeof t&&t.constructor===String&&(t=d(t)),n.push({name:e,value:t})},w.prototype.serializeAttributes=function(e){var t=this.attrs,n=this.namespaces;n&&(t=c(n).concat(t)),t.forEach(function(t){e.append(" ").append(l(t.name)).append('="').append(t.value).append('"')})},w.prototype.serializeTo=function(e){var t=this.body[0],n=t&&t.constructor!==x;e.appendIndent().append("<"+this.tagName),this.serializeAttributes(e),e.append(t?">":" />"),t&&(n&&e.appendNewLine().indent(),this.body.forEach(function(t){t.serializeTo(e)}),n&&e.unindent().appendIndent(),e.append("")),e.appendNewLine()},s(E,w),E.prototype.parseNsAttributes=function(e){var t=w.prototype.parseNsAttributes.call(this,e),n=e.$descriptor;if(n.name===this.propertyDescriptor.type)return t;var i=this.typeNs=this.nsTagName(n);this.getNamespaces().logUsed(this.typeNs);var r=e.$model.getPackage(i.uri),a=r.xml&&r.xml.typePrefix||"";return this.addAttribute(this.nsAttributeName(A.b),(i.prefix?i.prefix+":":"")+a+n.ns.localName),t},E.prototype.isLocalNs=function(e){return e.uri===(this.typeNs||this.ns).uri}},function(e,t){e.exports={name:"BPMN20",uri:"http://www.omg.org/spec/BPMN/20100524/MODEL",associations:[],types:[{name:"Interface",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"operations",type:"Operation",isMany:!0},{name:"implementationRef",type:"String",isAttr:!0}]},{name:"Operation",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"inMessageRef",type:"Message",isReference:!0},{name:"outMessageRef",type:"Message",isReference:!0},{name:"errorRef",type:"Error",isMany:!0,isReference:!0},{name:"implementationRef",type:"String",isAttr:!0}]},{name:"EndPoint",superClass:["RootElement"]},{name:"Auditing",superClass:["BaseElement"]},{name:"GlobalTask",superClass:["CallableElement"],properties:[{name:"resources",type:"ResourceRole",isMany:!0}]},{name:"Monitoring",superClass:["BaseElement"]},{name:"Performer",superClass:["ResourceRole"]},{name:"Process",superClass:["FlowElementsContainer","CallableElement"],properties:[{name:"processType",type:"ProcessType",isAttr:!0},{name:"isClosed",isAttr:!0,type:"Boolean"},{name:"auditing",type:"Auditing"},{name:"monitoring",type:"Monitoring"},{name:"properties",type:"Property",isMany:!0},{name:"laneSets",type:"LaneSet",isMany:!0,replaces:"FlowElementsContainer#laneSets"},{name:"flowElements",type:"FlowElement",isMany:!0,replaces:"FlowElementsContainer#flowElements"},{name:"artifacts",type:"Artifact",isMany:!0},{name:"resources",type:"ResourceRole",isMany:!0},{name:"correlationSubscriptions",type:"CorrelationSubscription",isMany:!0},{name:"supports",type:"Process",isMany:!0,isReference:!0},{name:"definitionalCollaborationRef",type:"Collaboration",isAttr:!0,isReference:!0},{name:"isExecutable",isAttr:!0,type:"Boolean"}]},{name:"LaneSet",superClass:["BaseElement"],properties:[{name:"lanes",type:"Lane",isMany:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Lane",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"partitionElementRef",type:"BaseElement",isAttr:!0,isReference:!0},{name:"partitionElement",type:"BaseElement"},{name:"flowNodeRef",type:"FlowNode",isMany:!0,isReference:!0},{name:"childLaneSet",type:"LaneSet",xml:{serialize:"xsi:type"}}]},{name:"GlobalManualTask",superClass:["GlobalTask"]},{name:"ManualTask",superClass:["Task"]},{name:"UserTask",superClass:["Task"],properties:[{name:"renderings",type:"Rendering",isMany:!0},{name:"implementation",isAttr:!0,type:"String"}]},{name:"Rendering",superClass:["BaseElement"]},{name:"HumanPerformer",superClass:["Performer"]},{name:"PotentialOwner",superClass:["HumanPerformer"]},{name:"GlobalUserTask",superClass:["GlobalTask"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"renderings",type:"Rendering",isMany:!0}]},{name:"Gateway",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"gatewayDirection",type:"GatewayDirection",default:"Unspecified",isAttr:!0}]},{name:"EventBasedGateway",superClass:["Gateway"],properties:[{name:"instantiate",default:!1,isAttr:!0,type:"Boolean"},{name:"eventGatewayType",type:"EventBasedGatewayType",isAttr:!0,default:"Exclusive"}]},{name:"ComplexGateway",superClass:["Gateway"],properties:[{name:"activationCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"ExclusiveGateway",superClass:["Gateway"],properties:[{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"InclusiveGateway",superClass:["Gateway"],properties:[{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"ParallelGateway",superClass:["Gateway"]},{name:"RootElement",isAbstract:!0,superClass:["BaseElement"]},{name:"Relationship",superClass:["BaseElement"],properties:[{name:"type",isAttr:!0,type:"String"},{name:"direction",type:"RelationshipDirection",isAttr:!0},{name:"source",isMany:!0,isReference:!0,type:"Element"},{name:"target",isMany:!0,isReference:!0,type:"Element"}]},{name:"BaseElement",isAbstract:!0,properties:[{name:"id",isAttr:!0,type:"String",isId:!0},{name:"documentation",type:"Documentation",isMany:!0},{name:"extensionDefinitions",type:"ExtensionDefinition",isMany:!0,isReference:!0},{name:"extensionElements",type:"ExtensionElements"}]},{name:"Extension",properties:[{name:"mustUnderstand",default:!1,isAttr:!0,type:"Boolean"},{name:"definition",type:"ExtensionDefinition",isAttr:!0,isReference:!0}]},{name:"ExtensionDefinition",properties:[{name:"name",isAttr:!0,type:"String"},{name:"extensionAttributeDefinitions",type:"ExtensionAttributeDefinition",isMany:!0}]},{name:"ExtensionAttributeDefinition",properties:[{name:"name",isAttr:!0,type:"String"},{name:"type",isAttr:!0,type:"String"},{name:"isReference",default:!1,isAttr:!0,type:"Boolean"},{name:"extensionDefinition",type:"ExtensionDefinition",isAttr:!0,isReference:!0}]},{name:"ExtensionElements",properties:[{name:"valueRef",isAttr:!0,isReference:!0,type:"Element"},{name:"values",type:"Element",isMany:!0},{name:"extensionAttributeDefinition",type:"ExtensionAttributeDefinition",isAttr:!0,isReference:!0}]},{name:"Documentation",superClass:["BaseElement"],properties:[{name:"text",type:"String",isBody:!0},{name:"textFormat",default:"text/plain",isAttr:!0,type:"String"}]},{name:"Event",isAbstract:!0,superClass:["FlowNode","InteractionNode"],properties:[{name:"properties",type:"Property",isMany:!0}]},{name:"IntermediateCatchEvent",superClass:["CatchEvent"]},{name:"IntermediateThrowEvent",superClass:["ThrowEvent"]},{name:"EndEvent",superClass:["ThrowEvent"]},{name:"StartEvent",superClass:["CatchEvent"],properties:[{name:"isInterrupting",default:!0,isAttr:!0,type:"Boolean"}]},{name:"ThrowEvent",isAbstract:!0,superClass:["Event"],properties:[{name:"dataInputs",type:"DataInput",isMany:!0},{name:"dataInputAssociations",type:"DataInputAssociation",isMany:!0},{name:"inputSet",type:"InputSet"},{name:"eventDefinitions",type:"EventDefinition",isMany:!0},{name:"eventDefinitionRef",type:"EventDefinition",isMany:!0,isReference:!0}]},{name:"CatchEvent",isAbstract:!0,superClass:["Event"],properties:[{name:"parallelMultiple",isAttr:!0,type:"Boolean",default:!1},{name:"dataOutputs",type:"DataOutput",isMany:!0},{name:"dataOutputAssociations",type:"DataOutputAssociation",isMany:!0},{name:"outputSet",type:"OutputSet"},{name:"eventDefinitions",type:"EventDefinition",isMany:!0},{name:"eventDefinitionRef",type:"EventDefinition",isMany:!0,isReference:!0}]},{name:"BoundaryEvent",superClass:["CatchEvent"],properties:[{name:"cancelActivity",default:!0,isAttr:!0,type:"Boolean"},{name:"attachedToRef",type:"Activity",isAttr:!0,isReference:!0}]},{name:"EventDefinition",isAbstract:!0,superClass:["RootElement"]},{name:"CancelEventDefinition",superClass:["EventDefinition"]},{name:"ErrorEventDefinition",superClass:["EventDefinition"],properties:[{name:"errorRef",type:"Error",isAttr:!0,isReference:!0}]},{name:"TerminateEndEvent",superClass:["EventDefinition"]},{name:"EscalationEventDefinition",superClass:["EventDefinition"],properties:[{name:"escalationRef",type:"Escalation",isAttr:!0,isReference:!0}]},{name:"Escalation",properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"escalationCode",isAttr:!0,type:"String"}],superClass:["RootElement"]},{name:"CompensateEventDefinition",superClass:["EventDefinition"],properties:[{name:"waitForCompletion",isAttr:!0,type:"Boolean",default:!0},{name:"activityRef",type:"Activity",isAttr:!0,isReference:!0}]},{name:"TimerEventDefinition",superClass:["EventDefinition"],properties:[{name:"timeDate",type:"Expression",xml:{serialize:"xsi:type"}},{name:"timeCycle",type:"Expression",xml:{serialize:"xsi:type"}},{name:"timeDuration",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"LinkEventDefinition",superClass:["EventDefinition"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"target",type:"LinkEventDefinition",isAttr:!0,isReference:!0},{name:"source",type:"LinkEventDefinition",isMany:!0,isReference:!0}]},{name:"MessageEventDefinition",superClass:["EventDefinition"],properties:[{name:"messageRef",type:"Message",isAttr:!0,isReference:!0},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"ConditionalEventDefinition",superClass:["EventDefinition"],properties:[{name:"condition",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"SignalEventDefinition",superClass:["EventDefinition"],properties:[{name:"signalRef",type:"Signal",isAttr:!0,isReference:!0}]},{name:"Signal",superClass:["RootElement"],properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"ImplicitThrowEvent",superClass:["ThrowEvent"]},{name:"DataState",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"ItemAwareElement",superClass:["BaseElement"],properties:[{name:"itemSubjectRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"dataState",type:"DataState"}]},{name:"DataAssociation",superClass:["BaseElement"],properties:[{name:"assignment",type:"Assignment",isMany:!0},{name:"sourceRef",type:"ItemAwareElement",isMany:!0,isReference:!0},{name:"targetRef",type:"ItemAwareElement",isReference:!0},{name:"transformation",type:"FormalExpression",xml:{serialize:"property"}}]},{name:"DataInput",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"inputSetRef",type:"InputSet",isVirtual:!0,isMany:!0,isReference:!0},{name:"inputSetWithOptional",type:"InputSet",isVirtual:!0,isMany:!0,isReference:!0},{name:"inputSetWithWhileExecuting",type:"InputSet",isVirtual:!0,isMany:!0,isReference:!0}]},{name:"DataOutput",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"outputSetRef",type:"OutputSet",isVirtual:!0,isMany:!0,isReference:!0},{name:"outputSetWithOptional",type:"OutputSet",isVirtual:!0,isMany:!0,isReference:!0},{name:"outputSetWithWhileExecuting",type:"OutputSet",isVirtual:!0,isMany:!0,isReference:!0}]},{name:"InputSet",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"dataInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"optionalInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"whileExecutingInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"outputSetRefs",type:"OutputSet",isMany:!0,isReference:!0}]},{name:"OutputSet",superClass:["BaseElement"],properties:[{name:"dataOutputRefs",type:"DataOutput",isMany:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"inputSetRefs",type:"InputSet",isMany:!0,isReference:!0},{name:"optionalOutputRefs",type:"DataOutput",isMany:!0,isReference:!0},{name:"whileExecutingOutputRefs",type:"DataOutput",isMany:!0,isReference:!0}]},{name:"Property",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"DataInputAssociation",superClass:["DataAssociation"]},{name:"DataOutputAssociation",superClass:["DataAssociation"]},{name:"InputOutputSpecification",superClass:["BaseElement"],properties:[{name:"dataInputs",type:"DataInput",isMany:!0},{name:"dataOutputs",type:"DataOutput",isMany:!0},{name:"inputSets",type:"InputSet",isMany:!0},{name:"outputSets",type:"OutputSet",isMany:!0}]},{name:"DataObject",superClass:["FlowElement","ItemAwareElement"],properties:[{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"}]},{name:"InputOutputBinding",properties:[{name:"inputDataRef",type:"InputSet",isAttr:!0,isReference:!0},{name:"outputDataRef",type:"OutputSet",isAttr:!0,isReference:!0},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"Assignment",superClass:["BaseElement"],properties:[{name:"from",type:"Expression",xml:{serialize:"xsi:type"}},{name:"to",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"DataStore",superClass:["RootElement","ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"capacity",isAttr:!0,type:"Integer"},{name:"isUnlimited",default:!0,isAttr:!0,type:"Boolean"}]},{name:"DataStoreReference",superClass:["ItemAwareElement","FlowElement"],properties:[{name:"dataStoreRef",type:"DataStore",isAttr:!0,isReference:!0}]},{name:"DataObjectReference",superClass:["ItemAwareElement","FlowElement"],properties:[{name:"dataObjectRef",type:"DataObject",isAttr:!0,isReference:!0}]},{name:"ConversationLink",superClass:["BaseElement"],properties:[{name:"sourceRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"ConversationAssociation",superClass:["BaseElement"],properties:[{name:"innerConversationNodeRef",type:"ConversationNode",isAttr:!0,isReference:!0},{name:"outerConversationNodeRef",type:"ConversationNode",isAttr:!0,isReference:!0}]},{name:"CallConversation",superClass:["ConversationNode"],properties:[{name:"calledCollaborationRef",type:"Collaboration",isAttr:!0,isReference:!0},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0}]},{name:"Conversation",superClass:["ConversationNode"]},{name:"SubConversation",superClass:["ConversationNode"],properties:[{name:"conversationNodes",type:"ConversationNode",isMany:!0}]},{name:"ConversationNode",isAbstract:!0,superClass:["InteractionNode","BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRefs",type:"Participant",isMany:!0,isReference:!0},{name:"messageFlowRefs",type:"MessageFlow",isMany:!0,isReference:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0}]},{name:"GlobalConversation",superClass:["Collaboration"]},{name:"PartnerEntity",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0}]},{name:"PartnerRole",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0}]},{name:"CorrelationProperty",superClass:["RootElement"],properties:[{name:"correlationPropertyRetrievalExpression",type:"CorrelationPropertyRetrievalExpression",isMany:!0},{name:"name",isAttr:!0,type:"String"},{name:"type",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"Error",superClass:["RootElement"],properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"errorCode",isAttr:!0,type:"String"}]},{name:"CorrelationKey",superClass:["BaseElement"],properties:[{name:"correlationPropertyRef",type:"CorrelationProperty",isMany:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Expression",superClass:["BaseElement"],isAbstract:!1,properties:[{name:"body",type:"String",isBody:!0}]},{name:"FormalExpression",superClass:["Expression"],properties:[{name:"language",isAttr:!0,type:"String"},{name:"evaluatesToTypeRef",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"Message",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"itemRef",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"ItemDefinition",superClass:["RootElement"],properties:[{name:"itemKind",type:"ItemKind",isAttr:!0},{name:"structureRef",type:"String",isAttr:!0},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"import",type:"Import",isAttr:!0,isReference:!0}]},{name:"FlowElement",isAbstract:!0,superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"auditing",type:"Auditing"},{name:"monitoring",type:"Monitoring"},{name:"categoryValueRef",type:"CategoryValue",isMany:!0,isReference:!0}]},{name:"SequenceFlow",superClass:["FlowElement"],properties:[{name:"isImmediate",isAttr:!0,type:"Boolean"},{name:"conditionExpression",type:"Expression",xml:{serialize:"xsi:type"}},{name:"sourceRef",type:"FlowNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"FlowNode",isAttr:!0,isReference:!0}]},{name:"FlowElementsContainer",isAbstract:!0,superClass:["BaseElement"],properties:[{name:"laneSets",type:"LaneSet",isMany:!0},{name:"flowElements",type:"FlowElement",isMany:!0}]},{name:"CallableElement",isAbstract:!0,superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"ioSpecification",type:"InputOutputSpecification",xml:{serialize:"property"}},{name:"supportedInterfaceRef",type:"Interface",isMany:!0,isReference:!0},{name:"ioBinding",type:"InputOutputBinding",isMany:!0,xml:{serialize:"property"}}]},{name:"FlowNode",isAbstract:!0,superClass:["FlowElement"],properties:[{name:"incoming",type:"SequenceFlow",isMany:!0,isReference:!0},{name:"outgoing",type:"SequenceFlow",isMany:!0,isReference:!0},{name:"lanes",type:"Lane",isVirtual:!0,isMany:!0,isReference:!0}]},{name:"CorrelationPropertyRetrievalExpression",superClass:["BaseElement"],properties:[{name:"messagePath",type:"FormalExpression"},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"CorrelationPropertyBinding",superClass:["BaseElement"],properties:[{name:"dataPath",type:"FormalExpression"},{name:"correlationPropertyRef",type:"CorrelationProperty",isAttr:!0,isReference:!0}]},{name:"Resource",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"resourceParameters",type:"ResourceParameter",isMany:!0}]},{name:"ResourceParameter",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isRequired",isAttr:!0,type:"Boolean"},{name:"type",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"CorrelationSubscription",superClass:["BaseElement"],properties:[{name:"correlationKeyRef",type:"CorrelationKey",isAttr:!0,isReference:!0},{name:"correlationPropertyBinding",type:"CorrelationPropertyBinding",isMany:!0}]},{name:"MessageFlow",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"sourceRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"MessageFlowAssociation",superClass:["BaseElement"],properties:[{name:"innerMessageFlowRef",type:"MessageFlow",isAttr:!0,isReference:!0},{name:"outerMessageFlowRef",type:"MessageFlow",isAttr:!0,isReference:!0}]},{name:"InteractionNode",isAbstract:!0,properties:[{name:"incomingConversationLinks",type:"ConversationLink",isVirtual:!0,isMany:!0,isReference:!0},{name:"outgoingConversationLinks",type:"ConversationLink",isVirtual:!0,isMany:!0,isReference:!0}]},{name:"Participant",superClass:["InteractionNode","BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"interfaceRef",type:"Interface",isMany:!0,isReference:!0},{name:"participantMultiplicity",type:"ParticipantMultiplicity"},{name:"endPointRefs",type:"EndPoint",isMany:!0,isReference:!0},{name:"processRef",type:"Process",isAttr:!0,isReference:!0}]},{name:"ParticipantAssociation",superClass:["BaseElement"],properties:[{name:"innerParticipantRef",type:"Participant",isAttr:!0,isReference:!0},{name:"outerParticipantRef",type:"Participant",isAttr:!0,isReference:!0}]},{name:"ParticipantMultiplicity",properties:[{name:"minimum",default:0,isAttr:!0,type:"Integer"},{name:"maximum",default:1,isAttr:!0,type:"Integer"}],superClass:["BaseElement"]},{name:"Collaboration",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isClosed",isAttr:!0,type:"Boolean"},{name:"participants",type:"Participant",isMany:!0},{name:"messageFlows",type:"MessageFlow",isMany:!0},{name:"artifacts",type:"Artifact",isMany:!0},{name:"conversations",type:"ConversationNode",isMany:!0},{name:"conversationAssociations",type:"ConversationAssociation"},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0},{name:"messageFlowAssociations",type:"MessageFlowAssociation",isMany:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0},{name:"choreographyRef",type:"Choreography",isMany:!0,isReference:!0},{name:"conversationLinks",type:"ConversationLink",isMany:!0}]},{name:"ChoreographyActivity",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"participantRefs",type:"Participant",isMany:!0,isReference:!0},{name:"initiatingParticipantRef",type:"Participant",isAttr:!0,isReference:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0},{name:"loopType",type:"ChoreographyLoopType",default:"None",isAttr:!0}]},{name:"CallChoreography",superClass:["ChoreographyActivity"],properties:[{name:"calledChoreographyRef",type:"Choreography",isAttr:!0,isReference:!0},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0}]},{name:"SubChoreography",superClass:["ChoreographyActivity","FlowElementsContainer"],properties:[{name:"artifacts",type:"Artifact",isMany:!0}]},{name:"ChoreographyTask",superClass:["ChoreographyActivity"],properties:[{name:"messageFlowRef",type:"MessageFlow",isMany:!0,isReference:!0}]},{name:"Choreography",superClass:["FlowElementsContainer","Collaboration"]},{name:"GlobalChoreographyTask",superClass:["Choreography"],properties:[{name:"initiatingParticipantRef",type:"Participant",isAttr:!0,isReference:!0}]},{name:"TextAnnotation",superClass:["Artifact"],properties:[{name:"text",type:"String"},{name:"textFormat",default:"text/plain",isAttr:!0,type:"String"}]},{name:"Group",superClass:["Artifact"],properties:[{name:"categoryValueRef",type:"CategoryValue",isAttr:!0,isReference:!0}]},{name:"Association",superClass:["Artifact"],properties:[{name:"associationDirection",type:"AssociationDirection",isAttr:!0},{name:"sourceRef",type:"BaseElement",isAttr:!0,isReference:!0},{name:"targetRef",type:"BaseElement",isAttr:!0,isReference:!0}]},{name:"Category",superClass:["RootElement"],properties:[{name:"categoryValue",type:"CategoryValue",isMany:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Artifact",isAbstract:!0,superClass:["BaseElement"]},{name:"CategoryValue",superClass:["BaseElement"],properties:[{name:"categorizedFlowElements",type:"FlowElement",isVirtual:!0,isMany:!0,isReference:!0},{name:"value",isAttr:!0,type:"String"}]},{name:"Activity",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"isForCompensation",default:!1,isAttr:!0,type:"Boolean"},{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0},{name:"ioSpecification",type:"InputOutputSpecification",xml:{serialize:"property"}},{name:"boundaryEventRefs",type:"BoundaryEvent",isMany:!0,isReference:!0},{name:"properties",type:"Property",isMany:!0},{name:"dataInputAssociations",type:"DataInputAssociation",isMany:!0},{name:"dataOutputAssociations",type:"DataOutputAssociation",isMany:!0},{name:"startQuantity",default:1,isAttr:!0,type:"Integer"},{name:"resources",type:"ResourceRole",isMany:!0},{name:"completionQuantity",default:1,isAttr:!0,type:"Integer"},{name:"loopCharacteristics",type:"LoopCharacteristics"}]},{name:"ServiceTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"SubProcess",superClass:["Activity","FlowElementsContainer","InteractionNode"],properties:[{name:"triggeredByEvent",default:!1,isAttr:!0,type:"Boolean"},{name:"artifacts",type:"Artifact",isMany:!0}]},{name:"LoopCharacteristics",isAbstract:!0,superClass:["BaseElement"]},{name:"MultiInstanceLoopCharacteristics",superClass:["LoopCharacteristics"],properties:[{name:"isSequential",default:!1,isAttr:!0,type:"Boolean"},{name:"behavior",type:"MultiInstanceBehavior",default:"All",isAttr:!0},{name:"loopCardinality",type:"Expression",xml:{serialize:"xsi:type"}},{name:"loopDataInputRef",type:"ItemAwareElement",isReference:!0},{name:"loopDataOutputRef",type:"ItemAwareElement",isReference:!0},{name:"inputDataItem",type:"DataInput",xml:{serialize:"property"}},{name:"outputDataItem",type:"DataOutput",xml:{serialize:"property"}},{name:"complexBehaviorDefinition",type:"ComplexBehaviorDefinition",isMany:!0},{name:"completionCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"oneBehaviorEventRef",type:"EventDefinition",isAttr:!0,isReference:!0},{name:"noneBehaviorEventRef",type:"EventDefinition",isAttr:!0,isReference:!0}]},{name:"StandardLoopCharacteristics",superClass:["LoopCharacteristics"],properties:[{name:"testBefore",default:!1,isAttr:!0,type:"Boolean"},{name:"loopCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"loopMaximum",type:"Integer",isAttr:!0}]},{name:"CallActivity",superClass:["Activity"],properties:[{name:"calledElement",type:"String",isAttr:!0}]},{name:"Task",superClass:["Activity","InteractionNode"]},{name:"SendTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"ReceiveTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"instantiate",default:!1,isAttr:!0,type:"Boolean"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"ScriptTask",superClass:["Task"],properties:[{name:"scriptFormat",isAttr:!0,type:"String"},{name:"script",type:"String"}]},{name:"BusinessRuleTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"}]},{name:"AdHocSubProcess",superClass:["SubProcess"],properties:[{name:"completionCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"ordering",type:"AdHocOrdering",isAttr:!0},{name:"cancelRemainingInstances",default:!0,isAttr:!0,type:"Boolean"}]},{name:"Transaction",superClass:["SubProcess"],properties:[{name:"protocol",isAttr:!0,type:"String"},{name:"method",isAttr:!0,type:"String"}]},{name:"GlobalScriptTask",superClass:["GlobalTask"],properties:[{name:"scriptLanguage",isAttr:!0,type:"String"},{name:"script",isAttr:!0,type:"String"}]},{name:"GlobalBusinessRuleTask",superClass:["GlobalTask"],properties:[{name:"implementation",isAttr:!0,type:"String"}]},{name:"ComplexBehaviorDefinition",superClass:["BaseElement"],properties:[{name:"condition",type:"FormalExpression"},{name:"event",type:"ImplicitThrowEvent"}]},{name:"ResourceRole",superClass:["BaseElement"],properties:[{name:"resourceRef",type:"Resource",isReference:!0},{name:"resourceParameterBindings",type:"ResourceParameterBinding",isMany:!0},{name:"resourceAssignmentExpression",type:"ResourceAssignmentExpression"},{name:"name",isAttr:!0,type:"String"}]},{name:"ResourceParameterBinding",properties:[{name:"expression",type:"Expression",xml:{serialize:"xsi:type"}},{name:"parameterRef",type:"ResourceParameter",isAttr:!0,isReference:!0}],superClass:["BaseElement"]},{name:"ResourceAssignmentExpression",properties:[{name:"expression",type:"Expression",xml:{serialize:"xsi:type"}}],superClass:["BaseElement"]},{name:"Import",properties:[{name:"importType",isAttr:!0,type:"String"},{name:"location",isAttr:!0,type:"String"},{name:"namespace",isAttr:!0,type:"String"}]},{name:"Definitions",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"targetNamespace",isAttr:!0,type:"String"},{name:"expressionLanguage",default:"http://www.w3.org/1999/XPath",isAttr:!0,type:"String"},{name:"typeLanguage",default:"http://www.w3.org/2001/XMLSchema",isAttr:!0,type:"String"},{name:"imports",type:"Import",isMany:!0},{name:"extensions",type:"Extension",isMany:!0},{name:"rootElements",type:"RootElement",isMany:!0},{name:"diagrams",isMany:!0,type:"bpmndi:BPMNDiagram"},{name:"exporter",isAttr:!0,type:"String"},{name:"relationships",type:"Relationship",isMany:!0},{name:"exporterVersion",isAttr:!0,type:"String"}]}],enumerations:[{name:"ProcessType",literalValues:[{name:"None"},{name:"Public"},{name:"Private"}]},{name:"GatewayDirection",literalValues:[{name:"Unspecified"},{name:"Converging"},{name:"Diverging"},{name:"Mixed"}]},{name:"EventBasedGatewayType",literalValues:[{name:"Parallel"},{name:"Exclusive"}]},{name:"RelationshipDirection",literalValues:[{name:"None"},{name:"Forward"},{name:"Backward"},{name:"Both"}]},{name:"ItemKind",literalValues:[{name:"Physical"},{name:"Information"}]},{name:"ChoreographyLoopType",literalValues:[{name:"None"},{name:"Standard"},{name:"MultiInstanceSequential"},{name:"MultiInstanceParallel"}]},{name:"AssociationDirection",literalValues:[{name:"None"},{name:"One"},{name:"Both"}]},{name:"MultiInstanceBehavior",literalValues:[{name:"None"},{name:"One"},{name:"All"},{name:"Complex"}]},{name:"AdHocOrdering",literalValues:[{name:"Parallel"},{name:"Sequential"}]}],prefix:"bpmn",xml:{tagAlias:"lowerCase",typePrefix:"t"}}},function(e,t){e.exports={name:"BPMNDI",uri:"http://www.omg.org/spec/BPMN/20100524/DI",types:[{name:"BPMNDiagram",properties:[{name:"plane",type:"BPMNPlane",redefines:"di:Diagram#rootElement"},{name:"labelStyle",type:"BPMNLabelStyle",isMany:!0}],superClass:["di:Diagram"]},{name:"BPMNPlane",properties:[{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"}],superClass:["di:Plane"]},{name:"BPMNShape",properties:[{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"},{name:"isHorizontal",isAttr:!0,type:"Boolean"},{name:"isExpanded",isAttr:!0,type:"Boolean"},{name:"isMarkerVisible",isAttr:!0,type:"Boolean"},{name:"label",type:"BPMNLabel"},{name:"isMessageVisible",isAttr:!0,type:"Boolean"},{name:"participantBandKind",type:"ParticipantBandKind",isAttr:!0},{name:"choreographyActivityShape",type:"BPMNShape",isAttr:!0,isReference:!0}],superClass:["di:LabeledShape"]},{name:"BPMNEdge",properties:[{name:"label",type:"BPMNLabel"},{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"},{name:"sourceElement",isAttr:!0,isReference:!0,type:"di:DiagramElement",redefines:"di:Edge#source"},{name:"targetElement",isAttr:!0,isReference:!0,type:"di:DiagramElement",redefines:"di:Edge#target"},{name:"messageVisibleKind",type:"MessageVisibleKind",isAttr:!0,default:"initiating"}],superClass:["di:LabeledEdge"]},{name:"BPMNLabel",properties:[{name:"labelStyle",type:"BPMNLabelStyle",isAttr:!0,isReference:!0,redefines:"di:DiagramElement#style"}],superClass:["di:Label"]},{name:"BPMNLabelStyle",properties:[{name:"font",type:"dc:Font"}],superClass:["di:Style"]}],enumerations:[{name:"ParticipantBandKind",literalValues:[{name:"top_initiating"},{name:"middle_initiating"},{name:"bottom_initiating"},{name:"top_non_initiating"},{name:"middle_non_initiating"},{name:"bottom_non_initiating"}]},{name:"MessageVisibleKind",literalValues:[{name:"initiating"},{name:"non_initiating"}]}],associations:[],prefix:"bpmndi"}},function(e,t){e.exports={name:"DC",uri:"http://www.omg.org/spec/DD/20100524/DC",types:[{name:"Boolean"},{name:"Integer"},{name:"Real"},{name:"String"},{name:"Font",properties:[{name:"name",type:"String",isAttr:!0},{name:"size",type:"Real",isAttr:!0},{name:"isBold",type:"Boolean",isAttr:!0},{name:"isItalic",type:"Boolean",isAttr:!0},{name:"isUnderline",type:"Boolean",isAttr:!0},{name:"isStrikeThrough",type:"Boolean",isAttr:!0}]},{name:"Point",properties:[{name:"x",type:"Real",default:"0",isAttr:!0},{name:"y",type:"Real",default:"0",isAttr:!0}]},{name:"Bounds",properties:[{name:"x",type:"Real",default:"0",isAttr:!0},{name:"y",type:"Real",default:"0",isAttr:!0},{name:"width",type:"Real",isAttr:!0},{name:"height",type:"Real",isAttr:!0}]}],prefix:"dc",associations:[]}},function(e,t){e.exports={name:"DI",uri:"http://www.omg.org/spec/DD/20100524/DI",types:[{name:"DiagramElement",isAbstract:!0,properties:[{name:"id",type:"String",isAttr:!0,isId:!0},{name:"extension",type:"Extension"},{name:"owningDiagram",type:"Diagram",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"owningElement",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"modelElement",isReadOnly:!0,isVirtual:!0,isReference:!0,type:"Element"},{name:"style",type:"Style",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"ownedElement",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isMany:!0}]},{name:"Node",isAbstract:!0,superClass:["DiagramElement"]},{name:"Edge",isAbstract:!0,superClass:["DiagramElement"],properties:[{name:"source",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"target",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"waypoint",isUnique:!1,isMany:!0,type:"dc:Point",xml:{serialize:"xsi:type"}}]},{name:"Diagram",isAbstract:!0,properties:[{name:"id",type:"String",isAttr:!0,isId:!0},{name:"rootElement",type:"DiagramElement",isReadOnly:!0,isVirtual:!0},{name:"name",isAttr:!0,type:"String"},{name:"documentation",isAttr:!0,type:"String"},{name:"resolution",isAttr:!0,type:"Real"},{name:"ownedStyle",type:"Style",isReadOnly:!0,isVirtual:!0,isMany:!0}]},{name:"Shape",isAbstract:!0,superClass:["Node"],properties:[{name:"bounds",type:"dc:Bounds"}]},{name:"Plane",isAbstract:!0,superClass:["Node"],properties:[{name:"planeElement",type:"DiagramElement",subsettedProperty:"DiagramElement-ownedElement",isMany:!0}]},{name:"LabeledEdge",isAbstract:!0,superClass:["Edge"],properties:[{name:"ownedLabel",type:"Label",isReadOnly:!0,subsettedProperty:"DiagramElement-ownedElement",isVirtual:!0,isMany:!0}]},{name:"LabeledShape",isAbstract:!0,superClass:["Shape"],properties:[{name:"ownedLabel",type:"Label",isReadOnly:!0,subsettedProperty:"DiagramElement-ownedElement",isVirtual:!0,isMany:!0}]},{name:"Label",isAbstract:!0,superClass:["Node"],properties:[{name:"bounds",type:"dc:Bounds"}]},{name:"Style",isAbstract:!0,properties:[{name:"id",type:"String",isAttr:!0,isId:!0}]},{name:"Extension",properties:[{name:"values",type:"Element",isMany:!0}]}],associations:[],prefix:"di",xml:{tagAlias:"lowerCase"}}},function(e,t,n){"use strict";var i=n(47);t.a=i.a},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=(n(0),n(2)),a=n(3),o=n(1),s=function(){function e(e,t){for(var n=0;n').appendTo(p)),h.attr({width:i,height:s});var f=h[0].getContext("2d");f.clearRect(0,0,i,s);var d=i-0,y=s-0;f.fillStyle="rgb("+l+")",f.beginPath(),f.rect(0,0,d,y),f.fill();var m=Math.round(Object(o.k)(n.size));m<10&&(m=10),f.translate(0,0),f.lineWidth=1,f.save();for(var g=.5,v=0;g<=y;)f.restore(),f.strokeStyle=v%4==0?"rgb("+u+")":"rgb("+c+")",f.beginPath(),f.moveTo(0,g),f.lineTo(d,g),g+=m,v++,f.stroke();for(g=.5,v=0;g<=d;)f.restore(),f.strokeStyle=v%4==0?"rgb("+u+")":"rgb("+c+")",f.beginPath(),f.moveTo(g,0),f.lineTo(g,y),g+=m,v++,f.stroke()}}}]),e}();t.a=c},function(e,t,n){"use strict";var i=n(49);t.a=i.a},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=n(0),a=n(2),o=n(1),s=n(3),l=function(){function e(e,t){for(var n=0;n").appendTo(n),p=Object(o.k)(c.lineStyle.lineWidth+2);p<5&&(p=5);var h=p/2;r.half=h,r.dom=u,u.css({width:p,height:p,"-webkit-border-radius":h,"-moz-border-radius":h,"-ms-border-radius":h,"-o-border-radius":h,"border-radius":h,"z-index":Object(a.a)("#"+l.id).css("z-index")})}this.interval=setInterval(function(){for(var t=0;t=n.maxT&&(n.t=0,n.dom.show());var s=n.t;if("broken"===a.linkerType)for(var l=1;l=c.t&&s=1&&n.dom.hide()}},30)}},{key:"hideDirection",value:function(){this.interval&&clearInterval(this.interval),this.$container.find(".connection-direction").remove()}}]),e}();t.a=u},function(e,t,n){"use strict";var i=n(51);t.a=i.a},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=n(0),a=n(2),o=n(3),s=n(1),l=function(){function e(e,t){for(var n=0;n0)){f=Object(a.a)("
").appendTo(h),f.css({left:Object(s.k)(l.bounds.x),top:Object(s.k)(l.bounds.y),"z-index":u.length+1}),p.indexOf(i.id)>=0||f.addClass("shape-contour-hover");for(var d=t.size-2,y={"border-color":t.color,"border-radius":t.size/2,width:d,height:d},m=c.getAnchors(),g={x:l.bounds.width/2,y:l.bounds.height/2},v=0;v").appendTo(f),w=o.a.getRotated(g,x,c.shapeStyle.angle);y.left=Object(s.k)(w.x)-t.size/2,y.top=Object(s.k)(w.y)-t.size/2,b.css(y)}}}},{key:"moveAnchors",value:function(e){for(var t=e.elements,n=(e.pos,0);n20||Math.abs(t.y-d.y)>20?(r.a.trigger("element.add",f),null==f.data.targetRef&&null!=f.data.sourceRef&&r.a.trigger("group.connection.show",f)):l.find('.shape-box[data-id="'+f.data.id+'"]').remove(),Object(a.a)(document).off("mouseup.dropConnection")})}),Object(a.a)(document).on("mouseup.connection",function(){r.a.trigger("anchor.point.remove"),t.reset(),u.off("mousedown.connection"),u.off("mousemove.connection"),Object(a.a)(document).off("mouseup.connection")})})}},{key:"showAnchorPoint",value:function(e){var t=this.config,n=this.$container,i=r.a.trigger("orders.get"),o=n.find(".bpd-designer"),s=o.find(".anchor-point");if(0===s.length){s=Object(a.a)("").appendTo(o);var l=s[0].getContext("2d");l.translate(1,1),l.lineWidth=1,l.globalAlpha=.3,l.strokeStyle=t.color,l.fillStyle=t.color,l.beginPath(),l.moveTo(0,15),l.bezierCurveTo(0,-5,30,-5,30,15),l.bezierCurveTo(30,35,0,35,0,15),l.closePath(),l.fill(),l.stroke()}s.css({left:e.x-16,top:e.y-16,"z-index":i.length}).show()}},{key:"hideAnchorPoint",value:function(){this.$container.find(".anchor-point").remove()}},{key:"createConnection",value:function(e,t){var n=r.a.trigger("element.create",{name:"",type:"SequenceFlow",prefix:"obj"}),i=n.data,a=n.plane;return i.sourceRef=e.id,a.waypoint.length>1?a.waypoint[a.waypoint.length-1]={$type:"dc:Point",x:t.x,y:t.y,angle:null}:(a.waypoint[0]={$type:"dc:Point",x:e.x,y:e.y,angle:e.angle},a.waypoint[1]={$type:"dc:Point",x:t.x,y:t.y,angle:null}),r.a.trigger("connection.render",{element:n}),n}},{key:"destroy",value:function(){this.hideAnchors()}}]),e}();t.a=u},function(e,t,n){"use strict";var i=n(53);t.a=i.a},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=n(0),a=n(2),o=n(1),s=n(3),l=function(){function e(e,t){for(var n=0;n").appendTo(l));var t=s.a.getRelativePos(e.pageX,e.pageY,l),i={"z-index":c.length,left:t.x,top:t.y};t.x>r.x&&(i.left=r.x),t.y>r.y&&(i.top=r.y),i.width=Math.abs(t.x-r.x),i.height=Math.abs(t.y-r.y),n.css(i)}),Object(a.a)(document).off("mouseup.multiselect").on("mouseup.multiselect",function(e){if(null!=n){var r={x:Object(o.i)(n.position().left),y:Object(o.i)(n.position().top),width:Object(o.i)(n.width()),height:Object(o.i)(n.height())},l=s.a.getElementIdsByRange(r);if(e.ctrlKey){var c=u.getSelectedIds();Object(o.h)(l,c)}u.unselect(),u.selectShape({ids:l}),n.remove()}t.reset(),Object(a.a)(document).off("mouseup.multiselect"),i.off("mousemove.multiselect")})}i.off("mousedown.multiselect")})}},{key:"getSelectedIds",value:function(){return this.selectIds}},{key:"getSelected",value:function(){for(var e=[],t=0;t0&&!h&&this.renderSelectBox(p),this.config.onSelected&&(1===p.length?this.config.onSelected(Object(o.j)(this.getSelected()[0])):this.config.onSelected(null)),r.a.trigger("direction.show")}}},{key:"renderSelectBox",value:function(e){var t=this.$container,n=(t.find(".bpd-layout"),t.find(".bpd-designer")),i=r.a.trigger("orders.get"),l=n.find(".shape-select");0===l.length&&(l=Object(a.a)("
").appendTo(n)),l.show(),r.a.trigger("group.hide",l);var c=0,u={};if(1===e.length){var p=r.a.trigger("element.get",e[0]);u.angle=c=p.shape.shapeStyle.angle,u.zindex=p.shape.shapeStyle.zindex,u.height=p.plane.bounds.height,u.width=p.plane.bounds.width,u.x=p.plane.bounds.x,u.y=p.plane.bounds.y,p.shape.groupName&&"CallActivity"!==p.shape.groupName&&r.a.trigger("group.show",this.getSelected())}else u=s.a.getElementsBox(e);var h=s.a.getRotatedBox(u,c);this.renderControlBound(l,u,h,c),l.css({left:Object(o.k)(h.x),top:Object(o.k)(h.y),width:Object(o.k)(h.width),height:Object(o.k)(h.height),"z-index":i.length,display:"block"})}},{key:"renderControlBound",value:function(e,t,n,i){var r=this.config,a=Object(o.k)(n.width),s=Object(o.k)(n.height),l=a+20,c=s+20,u=e.find(".shape-bound");u.attr({width:l,height:c});var p=u[0].getContext("2d");p.lineJoin="round",p.lineWidth=1,p.strokeStyle=r.color,p.globalAlpha=.5,p.save(),p.clearRect(0,0,l,c),p.translate(l/2,c/2),p.rotate(i),p.translate(-l/2,-c/2),p.translate(9.5,9.5);var h={x:Object(o.k)(Math.round(t.x-n.x)),y:Object(o.k)(Math.round(t.y-n.y)),width:Math.floor(Object(o.k)(t.width)+1),heigth:Math.floor(Object(o.k)(t.height)+1)};p.strokeRect(h.x,h.y,h.width,h.heigth),p.restore()}},{key:"moveSelect",value:function(e){var t=e.elements,n=e.pos,i=s.a.getSelectedConnectionIds();if(1!==t.length||1!==i.length)if(i.length>0){var a=r.a.trigger("shape.select.getIds");this.renderSelectBox(a)}else{var o=this.$container.find(".shape-select");o.css({left:parseFloat(o.css("left"))+n.x,top:parseFloat(o.css("top"))+n.y})}}},{key:"unselect",value:function(){var e=this.selectIds;this.selectIds=[];for(var t=0;t=0}},{key:"destroy",value:function(){var e=this.$container.find(".bpd-layout");this.$container.find(".bpd-designer").off("mousedown.select"),e.off("mousedown.multiselect")}}]),e}();t.a=u},function(e,t,n){"use strict";var i=n(55);t.a=i.a},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=n(0),a=n(2),o=n(3),s=n(1),l=function(){function e(e,t){for(var n=0;n=0?(null!=p.sourceRef&&n.indexOf(p.sourceRef)>=0&&(h.waypoint[0].x+=l.x,h.waypoint[0].y+=l.y,d=!0),null!=p.targetRef&&n.indexOf(p.targetRef)>=0&&(h.waypoint[h.waypoint.length-1].x+=l.x,h.waypoint[h.waypoint.length-1].y+=l.y,y=!0)):((null==p.sourceRef||n.indexOf(p.sourceRef)>=0)&&(h.waypoint[0].x+=l.x,h.waypoint[0].y+=l.y,d=!0),(null==p.targetRef||n.indexOf(p.targetRef)>=0)&&(h.waypoint[h.waypoint.length-1].x+=l.x,h.waypoint[h.waypoint.length-1].y+=l.y,y=!0)),d&&y){for(var m=0;m=c.x-6&&p.x<=c.x+6&&(l.x=c.x),p.y>=c.y-6&&p.y<=c.y+6&&(l.y=c.y))):(e.data.targetRef=h,c.x=p.x,c.y=p.y,c.angle=p.angle,null==h&&(p.x>=l.x-6&&p.x<=l.x+6&&(c.x=l.x),p.y>=l.y-6&&p.y<=l.y+6&&(c.y=l.y))),r.a.trigger("connection.render",{element:e,rendered:!0})}},{key:"moveDom",value:function(e,t,n){var i=e.data,r=e.plane;e.shape;r.bounds.x+=t.x,r.bounds.y+=t.y;var a=this.$container.find('.shape-box[data-id="'+i.id+'"]');a.css({left:parseFloat(a.css("left"))+n.x,top:parseFloat(a.css("top"))+n.y})}},{key:"destroy",value:function(){this.$container.find(".bpd-designer").off("mousedown.drag").off("mousedown.dragconnection")}}]),e}();t.a=c},function(e,t,n){"use strict";var i=n(57);t.a=i.a},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=n(0),a=n(2),o=(n(3),n(1)),s=function(){function e(e,t){for(var n=0;n=0;v--){var x=l[v].id,b=r.a.trigger("element.get",x),w=(b.data,b.plane),E=b.shape;if(!("SequenceFlow"===E.bpmnName||t.indexOf(x)>=0||E.parent)){var S=w.bounds;if(null==g.h){var k=S.y,C=S.y+S.height/2,A=S.y+S.height;C>=m-2&&C<=m+2?(g.h={type:"middle",y:C},e.y=C-e.height/2):k>=p-2&&k<=p+2?(g.h={type:"top",y:k},e.y=k):A>=h-2&&A<=h+2?(g.h={type:"bottom",y:A},e.y=A-e.height):A>=p-2&&A<=p+2?(g.h={type:"top",y:A},e.y=A):k>=h-2&&k<=h+2&&(g.h={type:"bottom",y:k},e.y=k-e.height)}if(null==g.v){var O=S.x,R=S.x+S.width/2,P=S.x+S.width;R>=y-2&&R<=y+2?(g.v={type:"center",x:R},e.x=R-e.width/2):O>=f-2&&O<=f+2?(g.v={type:"left",x:O},e.x=O):P>=d-2&&P<=d+2?(g.v={type:"right",x:P},e.x=P-e.width):P>=f-2&&P<=f+2?(g.v={type:"left",x:P},e.x=P):O>=d-2&&O<=d+2&&(g.v={type:"right",x:O},e.x=O-e.width)}if(null!=g.h&&null!=g.v)break}}if(this.hideSnapLine(),null!=g.attach){var T=u.find(".snapline-attach");0===T.length&&(T=Object(a.a)("
").appendTo(u));var M=g.attach,j=M.lineStyle.lineWidth;T.css({width:Object(o.k)(M.props.w+j),height:Object(o.k)(M.props.h+j),left:Object(o.k)(M.props.x-j/2)-2,top:Object(o.k)(M.props.y-j/2)-2,"z-index":Object(a.a)("#"+M.id).css("z-index")}).show()}if(null!=g.h){var N=u.find(".snapline-attach-h");0===N.length&&(N=Object(a.a)("
").appendTo(u)),N.css({width:u.width(),left:0,top:Math.round(Object(o.k)(g.h.y)),"z-index":l.length+1}).show()}if(null!=g.v){var D=u.find(".snapline-attach-v");0===D.length&&(D=Object(a.a)("
").appendTo(u)),D.css({height:u.height(),top:0,left:Math.round(Object(o.k)(g.v.x)),"z-index":l.length+1}).show()}return g}},{key:"showSnapLine",value:function(e){var t=e.size,n=e.ids,i=e.render,r=e.element;this.renderSnapLine(t,n,i,r)}},{key:"hideSnapLine",value:function(){var e=this.$container,t=e.find(".bpd-designer");t.find(".snapline-attach-h").hide(),t.find(".snapline-attach-v").hide(),t.find(".snapline-attach").hide()}}]),e}();t.a=c},function(e,t,n){"use strict";var i=n(59);t.a=i.a},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=n(0),a=n(2),o=(n(3),n(1)),s=function(){function e(e,t){for(var n=0;n").appendTo(n)),e||(e="X: "+Math.round(Object(o.i)(s.left))+"  Y: "+Math.round(Object(o.i)(s.top))),c.html(e),c.css({top:s.top+i.height()+5,left:s.left+i.width()/2-c.outerWidth()/2,"z-index":l.length}).show()}},{key:"hideTooltip",value:function(){this.$container.find(".shape-tooltip").hide()}}]),e}();t.a=c},function(e,t,n){"use strict";var i=n(61);t.a=i.a},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=n(0),a=n(2),o=function(){function e(e,t){for(var n=0;n=0&&(r.x=t.originalEvent.targetTouches[0].clientX,r.y=t.originalEvent.targetTouches[0].clientY),e.moveHand(i,r)}),Object(a.a)(document).on("touchend.hand mouseup.hand",function(){e.flag=!1})}},{key:"moveHand",value:function(e,t){var n=this,i=this.pageStyle,r=this.$container,a=r.find(".bpd-layout");this.$container.on("touchmove.hand mousemove.hand",function(r){if(n.flag){var o=r.clientX-t.x,s=r.clientY-t.y;r.type.indexOf("touch")>=0&&(o=r.originalEvent.targetTouches[0].clientX-t.x,s=r.originalEvent.targetTouches[0].clientY-t.y);var l=e.top+s;l>0?l=0:l<-i.height&&(l=-i.height+window.innerHeight);var c=e.left+o;c>0?c=0:c<-i.width&&(c=-i.width+window.innerWidth),a.css({top:l,left:c})}})}},{key:"destroyHand",value:function(){this.$container.off("mousedown.hand touchstart.hand mousemove.hand touchmove.hand"),Object(a.a)(document).off("mouseup.hand touchend.hand")}}]),e}();t.a=s},function(e,t,n){"use strict";var i=n(63);t.a=i.a},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=n(0),a=n(2),o=n(3),s=n(1),l=function(){function e(e,t){for(var n=0;n0){var h=l.find(".group-icon");h.length<=0&&(h=Object(a.a)("
").appendTo(l));for(var f=r.a.trigger("group.get",u.groupName)||[],d=[],y=0;y').appendTo(h);for(var y=r.a.trigger("group.get",e),m=0;m').appendTo(d);this.renderItem(x.children("canvas")[0],v)}}d.on("mousedown",function(e){e.stopPropagation()})}return d.css({left:t,top:n,"z-index":f.length+1}).show(),d.children(".group-item").off().on("click",function(){var e=Object(a.a)(this).attr("data-shape");i(e),d.hide(),Object(a.a)(document).off("mousedown.group-panel")}),Object(a.a)(document).on("mousedown.group-panel",function(){d.hide(),Object(a.a)(document).off("mousedown.group-panel")}),d}},{key:"hideGroup",value:function(e){(e||this.$container).find(".group-icon").hide()}},{key:"showConnectionGroup",value:function(e){var t=this.$container,n=(this.config,this.bpmns),i=this.filter,o=(e.data,e.plane),l=(e.shape,this),c=r.a.trigger("orders.get"),p=t.find(".bpd-designer");t.find(".connection-group-panel").hide();var h=t.find('.connection-group-panel[data-group="bpmn"]');if(0===h.length){h=Object(a.a)("
").appendTo(p);var f=r.a.trigger("group.get");for(var d in f){for(var y=[],m=0;m0){var g=f[d][0],v=r.a.trigger("shape.create",{type:g,element:Object(s.c)(u)});v.data.text=r.a.trigger("i18n","bpmn."+v.shape.bpmnName),this.renderConnectionItem(v,y,h)}}h.on("mousemove",function(e){e.stopPropagation()}).on("mousedown",function(e){e.stopPropagation()})}h.css({left:Object(s.k)(o.waypoint[o.waypoint.length-1].x),top:Object(s.k)(o.waypoint[o.waypoint.length-1].y),"z-index":c.length}).show(),h.find(".group-icon").off().on("mousedown",function(t){t.stopPropagation();var n=Object(a.a)(this).data("group"),i=Object(a.a)(this).parent().position(),r=h.position(),o=r.left+i.left+Object(a.a)(this).parent().outerWidth()-10,s=r.top+i.top+Object(a.a)(this).parent().outerHeight();l.groupPanel(n,o,s,function(t){l.renderShape(e,t),h.hide(),Object(a.a)(document).off("mousedown.dashboard")})}).on("click",function(e){e.stopPropagation()}),h.children(".group-item").off().on("click",function(){h.hide(),Object(a.a)(document).off("mousedown.dashboard"),l.renderShape(e,Object(a.a)(this).data("shape"))}),Object(a.a)(document).on("mousedown.dashboard",function(){h.hide(),Object(a.a)(document).off("mousedown.dashboard")})}},{key:"renderShape",value:function(e,t){var n=e.plane.waypoint,i=o.a.getEndpointAngle(e.shape,"targetRef"),a=o.a.getAngleDir(i),s=r.a.trigger("i18n","bpmn."+t),l=r.a.trigger("element.create",{name:s,type:t,prefix:"obj"}),c=l.shape.getAnchors(),u=void 0,p=null;switch(a){case 1:p=null;for(var h=0;hp)&&(p=y.x,u=y)}break;case 3:p=null;for(var m=0;mp)&&(p=g.y,u=g)}break;case 4:p=null;for(var v=0;v").appendTo(n);this.renderItem(s.children("canvas")[0],e),t.length>1&&s.append("
")}},{key:"renderItem",value:function(e,t){var n=this.config,i=(t.data,t.plane),a=t.shape,o=e.getContext("2d"),l={x:0,y:0,width:i.bounds.width,height:i.bounds.height};o.clearRect(0,0,n.width,n.height),(l.width>=n.width||l.height>=n.width)&&(i.bounds.width>=i.bounds.height?(l.width=n.width-2*a.lineStyle.lineWidth,l.height=parseInt(i.bounds.height/i.bounds.width*l.width),l.height<20&&(l.height=20)):(l.height=n.height-2*a.lineStyle.lineWidth,l.width=parseInt(i.bounds.width/i.bounds.height*l.height),l.width<20&&(l.width=20))),i.bounds=l;for(var c=Object(s.c)(a.getPath()),u={x:l.x+l.width/2,y:l.y+l.height/2},p=0;p0&&t.preventDefault()}),Object(a.a)(document).off("keydown.hotkey","input,textarea,select").on("keydown.hotkey","input,textarea,select",function(e){e.stopPropagation()})}},{key:"bindKey",value:function(e){var t=e.key,n=e.fun,i=t.split("+");if(1===i.length)if("Ctrl"===i[0]||"Alt"===i[0]||"Shift"===i[0])console.log("error: "+i[0]);else{var r=o.a[i[0]];this.funs[r]||(this.funs[r]=[]),this.funs[r].push(n)}else if(2===i.length)if("Ctrl"===i[0]||"Alt"===i[0]||"Shift"===i[0])if("Ctrl"!==i[1]&&"Alt"!==i[1]&&"Shift"!==i[1]){var a=this.funs[i[0]],s=o.a[i[1]];a[s]||(a[s]=[]),a[s].push(n)}else console.log("组合键2错误");else console.log("组合键1错误");else console.log("组合键数量错误")}},{key:"clearKey",value:function(){this.cancel(),this.funs={Ctrl:{},Alt:{},Shift:{}}}},{key:"cancel",value:function(){Object(a.a)(document).off("keydown.hotkey")}}]),e}();t.a=l},function(e,t,n){"use strict";t.a={0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,Esc:27,BackSpace:8,Tab:9,Spacebar:32,Shift:16,Enter:13,Control:17,Alt:18,Left:37,Up:38,Right:39,Down:40,Insert:45,Delete:46,End:35,Home:36,PageUp:33,PageDown:34}},function(e,t,n){"use strict";var i=n(68);t.a=i.a},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=n(0),a=n(69),o=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"zh_CN";i(this,e),this.local=t,this.init()}return o(e,[{key:"init",value:function(){r.a.on("i18n",this.t.bind(this)),r.a.on("i18n.change",this.change.bind(this))}},{key:"t",value:function(e){for(var t=e.split("."),n=a.a[this.local],i=0;i0&&void 0!==arguments[0]?arguments[0]:"zh_CN";this.local=e}}]),e}();t.a=s},function(e,t,n){"use strict";var i=n(70),r=n(71);t.a={zh_CN:i.a,zh_TW:r.a}},function(e,t,n){"use strict";t.a={bpmn:{StartEvent:"开始事件",MessageStartEvent:"消息开始事件",TimerStartEvent:"时间开始事件",SignalStartEvent:"信号开始事件",UserTask:"人工任务",ServiceTask:"系统任务",ScriptTask:"脚本任务",ManualTask:"手工任务",BusinessRuleTask:"业务规则任务",SendTask:"发送任务",ReceiveTask:"接收任务",ParallelGateway:"并行网关",InclusiveGateway:"包容网关",ExclusiveGateway:"排他网关",EventBasedGateway:"事件网关",ComplexGateway:"复杂网关",IntermediateCatchEvent:"捕获中间事件",TimerIntermediateCatchEvent:"捕获时间事件",MessageIntermediateCatchEvent:"捕获消息事件",SignalIntermediateCatchEvent:"捕获信号事件",IntermediateThrowingEvent:"抛出中间事件",MessageIntermediateThrowingEvent:"抛出消息事件",SignalIntermediateThrowingEvent:"抛出信号事件",CompensateIntermediateThrowingEvent:"抛出补偿事件",BoundaryEvent:"边界事件",CancelBoundaryEvent:"边界取消事件",CompensateBoundaryEvent:"边界补偿事件",ErrorBoundaryEvent:"边界错误事件",MessageBoundaryEvent:"边界消息事件",SignalBoundaryEvent:"边界信号事件",TimerBoundaryEvent:"边界时间事件",CallActivity:"调用子流程",SubProcess:"子流程",Transaction:"事务",TextAnnotation:"注释",HorizontalPool:"泳池",HorizontalLane:"泳道",VerticalPool:"泳池",VerticalLane:"泳道",EndEvent:"结束事件",TerminateEndEvent:"终止事件",MessageEndEvent:"消息结束事件",SignalEndEvent:"信号结束事件",ErrorEndEvent:"错误结束事件",CancelEndEvent:"结束取消事件",CompensateEndEvent:"结束补偿事件"}}},function(e,t,n){"use strict";t.a={bpmn:{StartEvent:"開始事件",MessageStartEvent:"消息開始事件",TimerStartEvent:"時間開始事件",SignalStartEvent:"信號開始事件",UserTask:"人工任務",ServiceTask:"系統任務",ScriptTask:"腳本任務",ManualTask:"手工任務",BusinessRuleTask:"業務規則任務",SendTask:"發送任務",ReceiveTask:"接收任務",ParallelGateway:"並行網關",InclusiveGateway:"包容網關",ExclusiveGateway:"排他網關",EventBasedGateway:"事件網關",ComplexGateway:"復雜網關",IntermediateCatchEvent:"捕獲中間事件",TimerIntermediateCatchEvent:"捕獲時間事件",MessageIntermediateCatchEvent:"捕獲消息事件",SignalIntermediateCatchEvent:"捕獲信號事件",IntermediateThrowingEvent:"拋出中間事件",MessageIntermediateThrowingEvent:"拋出消息事件",SignalIntermediateThrowingEvent:"拋出信號事件",CompensateIntermediateThrowingEvent:"拋出補償事件",BoundaryEvent:"邊界事件",CancelBoundaryEvent:"邊界取消事件",CompensateBoundaryEvent:"邊界補償事件",ErrorBoundaryEvent:"邊界錯誤事件",MessageBoundaryEvent:"邊界消息事件",SignalBoundaryEvent:"邊界信號事件",TimerBoundaryEvent:"邊界時間事件",CallActivity:"調用子流程",SubProcess:"子流程",Transaction:"事務",TextAnnotation:"註釋",HorizontalPool:"泳池",HorizontalLane:"泳道",VerticalPool:"泳池",VerticalLane:"泳道",EndEvent:"結束事件",TerminateEndEvent:"終止事件",MessageEndEvent:"消息結束事件",SignalEndEvent:"信號結束事件",ErrorEndEvent:"錯誤結束事件",CancelEndEvent:"結束取消事件",CompensateEndEvent:"結束補償事件"}}}]); \ No newline at end of file diff --git a/dist/js/bpd-core.umd.js b/dist/js/bpd-core.umd.js index d21538a..5e720ef 100644 --- a/dist/js/bpd-core.umd.js +++ b/dist/js/bpd-core.umd.js @@ -1 +1 @@ -!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var i in n)("object"==typeof exports?exports:e)[i]=n[i]}}("undefined"!=typeof self?self:this,function(){return function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=9)}([function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=n(1),a=function(){function e(e,t){for(var n=0;n0?e.toLowerCase():null)},s=function(){function e(){i(this,e),this.fns=[],this.datas=[]}return a(e,[{key:"add",value:function(e,t){this.fns.push(e),this.datas.push(t)}},{key:"remove",value:function(e){var t=this.fns.indexOf(e);t>=0&&(this.fns.splice(t,1),this.datas.splice(t,1))}},{key:"invoke",value:function(e,t){var n=this,i=null;return this.fns.forEach(function(r,a){try{i=r(e,t,n.datas[a])}catch(e){console.error(e)}}),i}}]),e}(),l=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,e),this.handers=t}return a(e,[{key:"on",value:function(e,t,n){if(null==(e=o(e)))throw new Error("事件名无效");if(!Object(r.f)(n)){var i=n;n=t,t=i}if(!Object(r.f)(n))throw new Error("必须提供事件函数");var a=this.handers[e];null==a&&(a=new s,this.handers[e]=a),a.add(n,t)}},{key:"off",value:function(e,t){if(null!=(e=o(e))){var n=this.handers[e];null!=n&&(null==t?delete this.handers[e]:n.remove(t))}}},{key:"destroy",value:function(){this.handers={}}},{key:"trigger",value:function(e,t,n){if(null!=(e=o(e))){var i=this.handers[e];return null!=i?i.invoke(t,n):void 0}}}]),e}(),c=new l;t.a=c},function(e,t,n){"use strict";n.d(t,"g",function(){return r}),n.d(t,"f",function(){return a}),n.d(t,"d",function(){return o}),n.d(t,"c",function(){return s}),n.d(t,"h",function(){return l}),n.d(t,"k",function(){return c}),n.d(t,"i",function(){return u}),n.d(t,"e",function(){return p}),n.d(t,"a",function(){return h}),n.d(t,"b",function(){return f}),n.d(t,"j",function(){return d});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=document.createElement("span");n.innerHTML="",n.style.visibility="hidden",n.style.fontSize="500px",document.body.appendChild(n);var i=n.offsetWidth,r=n.offsetHeight;n.style.fontFamily=e;var a=setInterval(function(){n.offsetWidth===i&&n.offsetHeight===r||(clearInterval(a),document.body.removeChild(n),n=null,t())},50)},a=function(e){return"function"==typeof e},o=function(e,t){return"uppercase"===t?e.substring(0,1).toUpperCase()+e.substring(1):e.substring(0,1).toLowerCase()+e.substring(1)},s=function(e){return JSON.parse(JSON.stringify(e))},l=function(e,t){for(var n=[],i=e.concat(t),r=0;r1&&void 0!==arguments[1]?arguments[1]:1;if("object"===(void 0===t?"undefined":i(t))){var r={};for(var a in t)r[a]=t[a],"number"==typeof t[a]&&(r[a]=e(r[a],n));return r}return t*n},u=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if("object"===(void 0===t?"undefined":i(t))){var r={};for(var a in t)r[a]=t[a],"number"==typeof t[a]&&(r[a]=e(r[a],n));return r}return t/n},p=function(e){return e.indexOf(":")>=0?e.substr(e.indexOf(":")+1):""},h={font:function(e,t){var n=t.fontStyle,i=t.fontVariant,r=t.fontWeight,a=t.fontSize,o=t.fontFamily,s=t.content,l=t.fontColor,c=t.textAlign,u=t.textBaseline,p=t.x,h=t.y;c&&(e.textAlign=c),u&&(e.textBaseline=u),l&&(e.fillStyle=l),e.font=n+" "+i+" "+r+" "+a+" "+o,e.fillText(s,p,h)},move:function(e,t){e.moveTo(t.x,t.y)},line:function(e,t){e.lineTo(t.x,t.y)},curve:function(e,t){e.bezierCurveTo(t.x1,t.y1,t.x2,t.y2,t.x,t.y)},quadraticCurve:function(e,t){e.quadraticCurveTo(t.x1,t.y1,t.x,t.y)},close:function(e){e.closePath()}},f=function(e,t,n){var i="";return e.forEach(function(n,r){t.indexOf(n)<0&&(i+=n+(r!==e.length?",":""))}),-1===i.indexOf(n)},d=function(e){var t={};if("bpmn:Process"===e.$type)t.id=e.id,t.extensions=y(e.extensionElements.values||[]);else{var n=e.data,i=e.shape;t.bpmnName=i.bpmnName,t.groupName=i.groupName;for(var r in n)switch(r){case"$type":break;case"extensionElements":t.extensions=y(n[r].values||[]);break;default:t[r]=n[r]}}return t},y=function(e){for(var t=[],n=0;n0&&n-1 in e)}function r(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}function a(e,t,n){return re(t)?se.grep(e,function(e,i){return!!t.call(e,i,e)!==n}):t.nodeType?se.grep(e,function(e){return e===t!==n}):"string"!=typeof t?se.grep(e,function(e){return J.call(t,e)>-1!==n}):se.filter(t,e,n)}function o(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function s(e){var t={};return se.each(e.match(ve)||[],function(e,n){t[n]=!0}),t}function l(e){return e}function c(e){throw e}function u(e,t,n,i){var r;try{e&&re(r=e.promise)?r.call(e).done(t).fail(n):e&&re(r=e.then)?r.call(e,t,n):t.apply(void 0,[e].slice(i))}catch(e){n.apply(void 0,[e])}}function p(){V.removeEventListener("DOMContentLoaded",p),window.removeEventListener("load",p),se.ready()}function h(e,t){return t.toUpperCase()}function f(e){return e.replace(Ee,"ms-").replace(Se,h)}function d(){this.expando=se.expando+d.uid++}function y(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:Oe.test(e)?JSON.parse(e):e)}function m(e,t,n){var i;if(void 0===n&&1===e.nodeType)if(i="data-"+t.replace(Re,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(i))){try{n=y(n)}catch(e){}Ae.set(e,t,n)}else n=void 0;return n}function g(e,t,n,i){var r,a,o=20,s=i?function(){return i.cur()}:function(){return se.css(e,t,"")},l=s(),c=n&&n[3]||(se.cssNumber[t]?"":"px"),u=(se.cssNumber[t]||"px"!==c&&+l)&&Te.exec(se.css(e,t));if(u&&u[3]!==c){for(l/=2,c=c||u[3],u=+l||1;o--;)se.style(e,t,u+c),(1-a)*(1-(a=s()/l||.5))<=0&&(o=0),u/=a;u*=2,se.style(e,t,u+c),n=n||[]}return n&&(u=+u||+l||0,r=n[1]?u+(n[1]+1)*n[2]:+n[2],i&&(i.unit=c,i.start=u,i.end=r)),r}function v(e){var t,n=e.ownerDocument,i=e.nodeName,r=De[i];return r||(t=n.body.appendChild(n.createElement(i)),r=se.css(t,"display"),t.parentNode.removeChild(t),"none"===r&&(r="block"),De[i]=r,r)}function x(e,t){for(var n,i,r=[],a=0,o=e.length;a-1)a&&a.push(o);else if(u=se.contains(o.ownerDocument,o),s=b(h.appendChild(o),"script"),u&&w(s),i)for(p=0;o=s[p++];)Le.test(o.type||"")&&i.push(o);return h}function S(){return!0}function k(){return!1}function C(){try{return V.activeElement}catch(e){}}function A(e,t,n,r,a,o){var s,l;if("object"===(void 0===t?"undefined":i(t))){"string"!=typeof n&&(r=r||n,n=void 0);for(l in t)A(e,l,n,r,t[l],o);return e}if(null==r&&null==a?(a=n,r=n=void 0):null==a&&("string"==typeof n?(a=r,r=void 0):(a=r,r=n,n=void 0)),!1===a)a=k;else if(!a)return e;return 1===o&&(s=a,a=function(e){return se().off(e),s.apply(this,arguments)},a.guid=s.guid||(s.guid=se.guid++)),e.each(function(){se.event.add(this,t,a,r,n)})}function O(e,t){return r(e,"table")&&r(11!==t.nodeType?t:t.firstChild,"tr")?se(e).children("tbody")[0]||e:e}function R(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function P(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function T(e,t){var n,i,r,a,o,s,l,c;if(1===t.nodeType){if(Ce.hasData(e)&&(a=Ce.access(e),o=Ce.set(t,a),c=a.events)){delete o.handle,o.events={};for(r in c)for(n=0,i=c[r].length;n1&&"string"==typeof d&&!ie.checkClone&&Ve.test(d))return t.each(function(e){var a=t.eq(e);y&&(n[0]=d.call(this,e,a.html())),M(a,n,i,r)});if(h&&(a=E(n,t[0].ownerDocument,!1,t,r),o=a.firstChild,1===a.childNodes.length&&(a=o),o||r)){for(s=se.map(b(a,"script"),R),l=s.length;p=0&&(l+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-a-l-s-.5))),l}function F(e,t,n){var i=Ke(e),r=D(e,t,i),a="border-box"===se.css(e,"boxSizing",!1,i),o=a;if(Xe.test(r)){if(!n)return r;r="auto"}return o=o&&(ie.boxSizingReliable()||r===e.style[t]),("auto"===r||!parseFloat(r)&&"inline"===se.css(e,"display",!1,i))&&(r=e["offset"+t[0].toUpperCase()+t.slice(1)],o=!0),(r=parseFloat(r)||0)+_(e,t,n||(a?"border":"content"),o,i,r)+"px"}function q(e){return(e.match(ve)||[]).join(" ")}function z(e){return e.getAttribute&&e.getAttribute("class")||""}function W(e){return Array.isArray(e)?e:"string"==typeof e?e.match(ve)||[]:[]}function H(e,n,r,a){var o;if(Array.isArray(n))se.each(n,function(t,n){r||ut.test(e)?a(e,n):H(e+"["+("object"===(void 0===n?"undefined":i(n))&&null!=n?t:"")+"]",n,r,a)});else if(r||"object"!==t(n))a(e,n);else for(o in n)H(e+"["+o+"]",n[o],r,a)}var G=[],V=window.document,U=Object.getPrototypeOf,X=G.slice,K=G.concat,Y=G.push,J=G.indexOf,Q={},Z=Q.toString,ee=Q.hasOwnProperty,te=ee.toString,ne=te.call(Object),ie={},re=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},ae=function(e){return null!=e&&e===e.window},oe={type:!0,src:!0,noModule:!0},se=function e(t,n){return new e.fn.Init(t,n)},le=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;se.fn=se.prototype={slimJQ:"3.3.1",constructor:se,length:0,toArray:function(){return X.call(this)},get:function(e){return null==e?X.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=se.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return se.each(this,e)},map:function(e){return this.pushStack(se.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(X.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&nw.cacheLength&&delete e[t.shift()],e[n+" "]=i}var t=[];return e}function i(e){return e[$]=!0,e}function r(e){var t=j.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function a(e,t){for(var n=e.split("|"),i=n.length;i--;)w.attrHandle[n[i]]=t}function o(e,t){var n=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(i)return i;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&Ee(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function l(e){return i(function(t){return t=+t,i(function(n,i){for(var r,a=e([],n.length,t),o=a.length;o--;)n[r=a[o]]&&(n[r]=!(i[r]=n[r]))})})}function c(e){return e&&void 0!==e.getElementsByTagName&&e}function u(){}function p(e){for(var t=0,n=e.length,i="";t1?function(t,n,i){for(var r=e.length;r--;)if(!e[r](t,n,i))return!1;return!0}:e[0]}function d(e,n,i){for(var r=0,a=n.length;r-1&&(i[c]=!(o[c]=p))}}else x=y(x===o?x.splice(m,x.length):x),a?a(null,o,x,l):Y.apply(o,x)})}function g(e){for(var t,n,i,r=e.length,a=w.relative[e[0].type],o=a||w.relative[" "],s=a?1:0,l=h(function(e){return e===t},o,!0),c=h(function(e){return Q(t,e)>-1},o,!0),u=[function(e,n,i){var r=!a&&(i||n!==O)||((t=n).nodeType?l(e,n,i):c(e,n,i));return t=null,r}];s1&&f(u),s>1&&p(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(ae,"$1"),n,s0,a=e.length>0,o=function(i,o,s,l,c){var u,p,h,f=0,d="0",m=i&&[],g=[],v=O,x=i||a&&w.find.TAG("*",c),b=F+=null==v?1:Math.random()||.1,E=x.length;for(c&&(O=o===j||o||c);d!==E&&null!=(u=x[d]);d++){if(a&&u){for(p=0,o||u.ownerDocument===j||(T(u),s=!N);h=e[p++];)if(h(u,o||j,s)){l.push(u);break}c&&(F=b)}r&&((u=!h&&u)&&f--,i&&m.push(u))}if(f+=d,r&&d!==f){for(p=0;h=n[p++];)h(m,g,o,s);if(i){if(f>0)for(;d--;)m[d]||g[d]||(g[d]=X.call(l));g=y(g)}Y.apply(l,g),c&&!i&&g.length>0&&f+n.length>1&&t.uniqueSort(l)}return c&&(F=b,O=v),m};return r?i(o):o}var x,b,w,E,S,k,C,A,O,R,P,T,j,M,N,D,B,I,L,$="sizzle"+1*new Date,_=e.document,F=0,q=0,z=n(),W=n(),H=n(),G=function(e,t){return e===t&&(P=!0),0},V={}.hasOwnProperty,U=[],X=U.pop,K=U.push,Y=U.push,J=U.slice,Q=function(e,t){for(var n=0,i=e.length;n+~]|"+ee+")"+ee+"*"),le=new RegExp("="+ee+"*([^\\]'\"]*?)"+ee+"*\\]","g"),ce=new RegExp(ie),ue=new RegExp("^"+te+"$"),pe={ID:new RegExp("^#("+te+")"),CLASS:new RegExp("^\\.("+te+")"),TAG:new RegExp("^("+te+"|[*])"),ATTR:new RegExp("^"+ne),PSEUDO:new RegExp("^"+ie),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ee+"*(even|odd|(([+-]|)(\\d*)n|)"+ee+"*(?:([+-]|)"+ee+"*(\\d+)|))"+ee+"*\\)|)","i"),bool:new RegExp("^(?:"+Z+")$","i"),needsContext:new RegExp("^"+ee+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ee+"*((?:-\\d)?\\d*)"+ee+"*\\)|)(?=[^-]|$)","i")},he=/^(?:input|select|textarea|button)$/i,fe=/^h\d$/i,de=/^[^{]+\{\s*\[native \w/,ye=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,me=/[+~]/,ge=new RegExp("\\\\([\\da-f]{1,6}"+ee+"?|("+ee+")|.)","ig"),ve=function(e,t,n){var i="0x"+t-65536;return i!==i||n?t:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)},xe=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,be=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},we=function(){T()},Ee=h(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{Y.apply(U=J.call(_.childNodes),_.childNodes),U[_.childNodes.length].nodeType}catch(e){Y={apply:U.length?function(e,t){K.apply(e,J.call(t))}:function(e,t){for(var n=e.length,i=0;e[n++]=t[i++];);e.length=n-1}}}b=t.support={},S=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},T=t.setDocument=function(e){var t,n,i=e?e.ownerDocument||e:_;return i!==j&&9===i.nodeType&&i.documentElement?(j=i,M=j.documentElement,N=!S(j),_!==j&&(n=j.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",we,!1):n.attachEvent&&n.attachEvent("onunload",we)),b.attributes=r(function(e){return e.className="i",!e.getAttribute("className")}),b.getElementsByTagName=r(function(e){return e.appendChild(j.createComment("")),!e.getElementsByTagName("*").length}),b.getElementsByClassName=de.test(j.getElementsByClassName),b.getById=r(function(e){return M.appendChild(e).id=$,!j.getElementsByName||!j.getElementsByName($).length}),b.getById?(w.filter.ID=function(e){var t=e.replace(ge,ve);return function(e){return e.getAttribute("id")===t}},w.find.ID=function(e,t){if(void 0!==t.getElementById&&N){var n=t.getElementById(e);return n?[n]:[]}}):(w.filter.ID=function(e){var t=e.replace(ge,ve);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},w.find.ID=function(e,t){if(void 0!==t.getElementById&&N){var n,i,r,a=t.getElementById(e);if(a){if((n=a.getAttributeNode("id"))&&n.value===e)return[a];for(r=t.getElementsByName(e),i=0;a=r[i++];)if((n=a.getAttributeNode("id"))&&n.value===e)return[a]}return[]}}),w.find.TAG=b.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):b.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,i=[],r=0,a=t.getElementsByTagName(e);if("*"===e){for(;n=a[r++];)1===n.nodeType&&i.push(n);return i}return a},w.find.CLASS=b.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&N)return t.getElementsByClassName(e)},B=[],D=[],(b.qsa=de.test(j.querySelectorAll))&&(r(function(e){M.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&D.push("[*^$]="+ee+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||D.push("\\["+ee+"*(?:value|"+Z+")"),e.querySelectorAll("[id~="+$+"-]").length||D.push("~="),e.querySelectorAll(":checked").length||D.push(":checked"),e.querySelectorAll("a#"+$+"+*").length||D.push(".#.+[+~]")}),r(function(e){e.innerHTML="";var t=j.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&D.push("name"+ee+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&D.push(":enabled",":disabled"),M.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&D.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),D.push(",.*:")})),(b.matchesSelector=de.test(I=M.matches||M.webkitMatchesSelector||M.mozMatchesSelector||M.oMatchesSelector||M.msMatchesSelector))&&r(function(e){b.disconnectedMatch=I.call(e,"*"),I.call(e,"[s!='']:x"),B.push("!=",ie)}),D=D.length&&new RegExp(D.join("|")),B=B.length&&new RegExp(B.join("|")),t=de.test(M.compareDocumentPosition),L=t||de.test(M.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,i=t&&t.parentNode;return e===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):e.compareDocumentPosition&&16&e.compareDocumentPosition(i)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},G=t?function(e,t){if(e===t)return P=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!b.sortDetached&&t.compareDocumentPosition(e)===n?e===j||e.ownerDocument===_&&L(_,e)?-1:t===j||t.ownerDocument===_&&L(_,t)?1:R?Q(R,e)-Q(R,t):0:4&n?-1:1)}:function(e,t){if(e===t)return P=!0,0;var n,i=0,r=e.parentNode,a=t.parentNode,s=[e],l=[t];if(!r||!a)return e===j?-1:t===j?1:r?-1:a?1:R?Q(R,e)-Q(R,t):0;if(r===a)return o(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)l.unshift(n);for(;s[i]===l[i];)i++;return i?o(s[i],l[i]):s[i]===_?-1:l[i]===_?1:0},j):j},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==j&&T(e),n=n.replace(le,"='$1']"),b.matchesSelector&&N&&!H[n+" "]&&(!B||!B.test(n))&&(!D||!D.test(n)))try{var i=I.call(e,n);if(i||b.disconnectedMatch||e.document&&11!==e.document.nodeType)return i}catch(e){}return t(n,j,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==j&&T(e),L(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==j&&T(e);var n=w.attrHandle[t.toLowerCase()],i=n&&V.call(w.attrHandle,t.toLowerCase())?n(e,t,!N):void 0;return void 0!==i?i:b.attributes||!N?e.getAttribute(t):(i=e.getAttributeNode(t))&&i.specified?i.value:null},t.escape=function(e){return(e+"").replace(xe,be)},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],i=0,r=0;if(P=!b.detectDuplicates,R=!b.sortStable&&e.slice(0),e.sort(G),P){for(;t=e[r++];)t===e[r]&&(i=n.push(r));for(;i--;)e.splice(n[i],1)}return R=null,e},E=t.getText=function(e){var t,n="",i=0,r=e.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=E(e)}else if(3===r||4===r)return e.nodeValue}else for(;t=e[i++];)n+=E(t);return n},w=t.selectors={cacheLength:50,createPseudo:i,match:pe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(ge,ve),e[3]=(e[3]||e[4]||e[5]||"").replace(ge,ve),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return pe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&ce.test(n)&&(t=k(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(ge,ve).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=z[e+" "];return t||(t=new RegExp("(^|"+ee+")"+e+"("+ee+"|$)"))&&z(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,i){return function(r){var a=t.attr(r,e);return null==a?"!="===n:!n||(a+="","="===n?a===i:"!="===n?a!==i:"^="===n?i&&0===a.indexOf(i):"*="===n?i&&a.indexOf(i)>-1:"$="===n?i&&a.slice(-i.length)===i:"~="===n?(" "+a.replace(re," ")+" ").indexOf(i)>-1:"|="===n&&(a===i||a.slice(0,i.length+1)===i+"-"))}},CHILD:function(e,t,n,i,r){var a="nth"!==e.slice(0,3),o="last"!==e.slice(-4),s="of-type"===t;return 1===i&&0===r?function(e){return!!e.parentNode}:function(t,n,l){var c,u,p,h,f,d,y=a!==o?"nextSibling":"previousSibling",m=t.parentNode,g=s&&t.nodeName.toLowerCase(),v=!l&&!s,x=!1;if(m){if(a){for(;y;){for(h=t;h=h[y];)if(s?h.nodeName.toLowerCase()===g:1===h.nodeType)return!1;d=y="only"===e&&!d&&"nextSibling"}return!0}if(d=[o?m.firstChild:m.lastChild],o&&v){for(h=m,p=h[$]||(h[$]={}),u=p[h.uniqueID]||(p[h.uniqueID]={}),c=u[e]||[],f=c[0]===F&&c[1],x=f&&c[2],h=f&&m.childNodes[f];h=++f&&h&&h[y]||(x=f=0)||d.pop();)if(1===h.nodeType&&++x&&h===t){u[e]=[F,f,x];break}}else if(v&&(h=t,p=h[$]||(h[$]={}),u=p[h.uniqueID]||(p[h.uniqueID]={}),c=u[e]||[],f=c[0]===F&&c[1],x=f),!1===x)for(;(h=++f&&h&&h[y]||(x=f=0)||d.pop())&&((s?h.nodeName.toLowerCase()!==g:1!==h.nodeType)||!++x||(v&&(p=h[$]||(h[$]={}),u=p[h.uniqueID]||(p[h.uniqueID]={}),u[e]=[F,x]),h!==t)););return(x-=r)===i||x%i==0&&x/i>=0}}},PSEUDO:function(e,n){var r,a=w.pseudos[e]||w.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return a[$]?a(n):a.length>1?(r=[e,e,"",n],w.setFilters.hasOwnProperty(e.toLowerCase())?i(function(e,t){for(var i,r=a(e,n),o=r.length;o--;)i=Q(e,r[o]),e[i]=!(t[i]=r[o])}):function(e){return a(e,0,r)}):a}},pseudos:{not:i(function(e){var t=[],n=[],r=C(e.replace(ae,"$1"));return r[$]?i(function(e,t,n,i){for(var a,o=r(e,null,i,[]),s=e.length;s--;)(a=o[s])&&(e[s]=!(t[s]=a))}):function(e,i,a){return t[0]=e,r(t,null,a,n),t[0]=null,!n.pop()}}),has:i(function(e){return function(n){return t(e,n).length>0}}),contains:i(function(e){return e=e.replace(ge,ve),function(t){return(t.textContent||t.innerText||E(t)).indexOf(e)>-1}}),lang:i(function(e){return ue.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(ge,ve).toLowerCase(),function(t){var n;do{if(n=N?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===M},focus:function(e){return e===j.activeElement&&(!j.hasFocus||j.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:s(!1),disabled:s(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!w.pseudos.empty(e)},header:function(e){return fe.test(e.nodeName)},input:function(e){return he.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:l(function(){return[0]}),last:l(function(e,t){return[t-1]}),eq:l(function(e,t,n){return[n<0?n+t:n]}),even:l(function(e,t){for(var n=0;n=0;)e.push(i);return e}),gt:l(function(e,t,n){for(var i=n<0?n+t:n;++i2&&"ID"===(o=a[0]).type&&9===t.nodeType&&N&&w.relative[a[1].type]){if(!(t=(w.find.ID(o.matches[0].replace(ge,ve),t)||[])[0]))return n;u&&(t=t.parentNode),e=e.slice(a.shift().value.length)}for(r=pe.needsContext.test(e)?0:a.length;r--&&(o=a[r],!w.relative[s=o.type]);)if((l=w.find[s])&&(i=l(o.matches[0].replace(ge,ve),me.test(a[0].type)&&c(t.parentNode)||t))){if(a.splice(r,1),!(e=i.length&&p(a)))return Y.apply(n,i),n;break}}return(u||C(e,h))(i,t,!N,n,!t||me.test(e)&&c(t.parentNode)||t),n},b.sortStable=$.split("").sort(G).join("")===$,b.detectDuplicates=!!P,T(),b.sortDetached=r(function(e){return 1&e.compareDocumentPosition(j.createElement("fieldset"))}),r(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||a("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),b.attributes&&r(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||a("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),r(function(e){return null==e.getAttribute("disabled")})||a(Z,function(e,t,n){var i;if(!n)return!0===e[t]?t.toLowerCase():(i=e.getAttributeNode(t))&&i.specified?i.value:null}),t}(window);se.find=ce,se.expr=ce.selectors,se.expr[":"]=se.expr.pseudos,se.uniqueSort=se.unique=ce.uniqueSort,se.text=ce.getText,se.isXMLDoc=ce.isXML,se.contains=ce.contains,se.escapeSelector=ce.escape;var ue=function(e,t,n){for(var i=[],r=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(r&&se(e).is(n))break;i.push(e)}return i},pe=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},he=se.expr.match.needsContext,fe=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;se.filter=function(e,t,n){var i=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?se.find.matchesSelector(i,e)?[i]:[]:se.find.matches(e,se.grep(t,function(e){return 1===e.nodeType}))},se.fn.extend({find:function(e){var t,n,i=this.length,r=this;if("string"!=typeof e)return this.pushStack(se(e).filter(function(){for(t=0;t1?se.uniqueSort(n):n},filter:function(e){return this.pushStack(a(this,e||[],!1))},not:function(e){return this.pushStack(a(this,e||[],!0))},is:function(e){return!!a(this,"string"==typeof e&&he.test(e)?se(e):e||[],!1).length}});var de,ye=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(se.fn.Init=function(e,t,n){var i,r;if(!e)return this;if(n=n||de,"string"==typeof e){if(!(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:ye.exec(e))||!i[1]&&t)return!t||t.slimJQ?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof se?t[0]:t,se.merge(this,se.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:V,!0)),fe.test(i[1])&&se.isPlainObject(t))for(i in t)re(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return r=V.getElementById(i[2]),r&&(this[0]=r,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):re(e)?void 0!==n.ready?n.ready(e):e(se):se.makeArray(e,this)}).prototype=se.fn,de=se(V);var me=/^(?:parents|prev(?:Until|All))/,ge={children:!0,contents:!0,next:!0,prev:!0};se.fn.extend({has:function(e){var t=se(e,this),n=t.length;return this.filter(function(){for(var e=0;e-1:1===n.nodeType&&se.find.matchesSelector(n,e))){a.push(n);break}return this.pushStack(a.length>1?se.uniqueSort(a):a)},index:function(e){return e?"string"==typeof e?J.call(se(e),this[0]):J.call(this,e.slimJQ?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(se.uniqueSort(se.merge(this.get(),se(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),se.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return ue(e,"parentNode")},parentsUntil:function(e,t,n){return ue(e,"parentNode",n)},next:function(e){return o(e,"nextSibling")},prev:function(e){return o(e,"previousSibling")},nextAll:function(e){return ue(e,"nextSibling")},prevAll:function(e){return ue(e,"previousSibling")},nextUntil:function(e,t,n){return ue(e,"nextSibling",n)},prevUntil:function(e,t,n){return ue(e,"previousSibling",n)},siblings:function(e){return pe((e.parentNode||{}).firstChild,e)},children:function(e){return pe(e.firstChild)},contents:function(e){return r(e,"iframe")?e.contentDocument:(r(e,"template")&&(e=e.content||e),se.merge([],e.childNodes))}},function(e,t){se.fn[e]=function(n,i){var r=se.map(this,t,n);return"Until"!==e.slice(-5)&&(i=n),i&&"string"==typeof i&&(r=se.filter(i,r)),this.length>1&&(ge[e]||se.uniqueSort(r),me.test(e)&&r.reverse()),this.pushStack(r)}});var ve=/[^\x20\t\r\n\f]+/g;se.Callbacks=function(e){e="string"==typeof e?s(e):se.extend({},e);var n,i,r,a,o=[],l=[],c=-1,u=function(){for(a=a||e.once,r=n=!0;l.length;c=-1)for(i=l.shift();++c-1;)o.splice(n,1),n<=c&&c--}),this},has:function(e){return e?se.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return a=l=[],o=i="",this},disabled:function(){return!o},lock:function(){return a=l=[],i||n||(o=i=""),this},locked:function(){return!!a},fireWith:function(e,t){return a||(t=t||[],t=[e,t.slice?t.slice():t],l.push(t),n||u()),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!r}};return p},se.extend({Deferred:function(e){var t=[["notify","progress",se.Callbacks("memory"),se.Callbacks("memory"),2],["resolve","done",se.Callbacks("once memory"),se.Callbacks("once memory"),0,"resolved"],["reject","fail",se.Callbacks("once memory"),se.Callbacks("once memory"),1,"rejected"]],n="pending",r={state:function(){return n},always:function(){return a.done(arguments).fail(arguments),this},catch:function(e){return r.then(null,e)},pipe:function(){var e=arguments;return se.Deferred(function(n){se.each(t,function(t,i){var r=re(e[i[4]])&&e[i[4]];a[i[1]](function(){var e=r&&r.apply(this,arguments);e&&re(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[i[0]+"With"](this,r?[e]:arguments)})}),e=null}).promise()},then:function(e,n,r){function a(e,t,n,r){return function(){var s=this,u=arguments,p=function(){var p,h;if(!(e=o&&(n!==c&&(s=void 0,u=[i]),t.rejectWith(s,u))}};e?h():(se.Deferred.getStackHook&&(h.stackTrace=se.Deferred.getStackHook()),window.setTimeout(h))}}var o=0;return se.Deferred(function(i){t[0][3].add(a(0,i,re(r)?r:l,i.notifyWith)),t[1][3].add(a(0,i,re(e)?e:l)),t[2][3].add(a(0,i,re(n)?n:c))}).promise()},promise:function(e){return null!=e?se.extend(e,r):r}},a={};return se.each(t,function(e,i){var o=i[2],s=i[5];r[i[1]]=o.add,s&&o.add(function(){n=s},t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),o.add(i[3].fire),a[i[0]]=function(){return a[i[0]+"With"](this===a?void 0:this,arguments),this},a[i[0]+"With"]=o.fireWith}),r.promise(a),e&&e.call(a,a),a},when:function(e){var t=arguments.length,n=t,i=Array(n),r=X.call(arguments),a=se.Deferred(),o=function(e){return function(n){i[e]=this,r[e]=arguments.length>1?X.call(arguments):n,--t||a.resolveWith(i,r)}};if(t<=1&&(u(e,a.done(o(n)).resolve,a.reject,!t),"pending"===a.state()||re(r[n]&&r[n].then)))return a.then();for(;n--;)u(r[n],o(n),a.reject);return a.promise()}});var xe=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;se.Deferred.exceptionHook=function(e,t){window.console&&window.console.warn&&e&&xe.test(e.name)&&window.console.warn("SlimJQ.Deferred exception: "+e.message,e.stack,t)},se.readyException=function(e){window.setTimeout(function(){throw e})};var be=se.Deferred();se.fn.ready=function(e){return be.then(e).catch(function(e){se.readyException(e)}),this},se.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--se.readyWait:se.isReady)||(se.isReady=!0,!0!==e&&--se.readyWait>0||be.resolveWith(V,[se]))}}),se.ready.then=be.then,"complete"===V.readyState||"loading"!==V.readyState&&!V.documentElement.doScroll?window.setTimeout(se.ready):(V.addEventListener("DOMContentLoaded",p),window.addEventListener("load",p));var we=function e(n,i,r,a,o,s,l){var c=0,u=n.length,p=null==r;if("object"===t(r)){o=!0;for(c in r)e(n,i,c,r[c],!0,s,l)}else if(void 0!==a&&(o=!0,re(a)||(l=!0),p&&(l?(i.call(n,a),i=null):(p=i,i=function(e,t,n){return p.call(se(e),n)})),i))for(;c1,null,!0)},removeData:function(e){return this.each(function(){Ae.remove(this,e)})}}),se.extend({queue:function(e,t,n){var i;if(e)return t=(t||"fx")+"queue",i=Ce.get(e,t),n&&(!i||Array.isArray(n)?i=Ce.access(e,t,se.makeArray(n)):i.push(n)),i||[]},dequeue:function(e,t){t=t||"fx";var n=se.queue(e,t),i=n.length,r=n.shift(),a=se._queueHooks(e,t),o=function(){se.dequeue(e,t)};"inprogress"===r&&(r=n.shift(),i--),r&&("fx"===t&&n.unshift("inprogress"),delete a.stop,r.call(e,o,a)),!i&&a&&a.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Ce.get(e,n)||Ce.access(e,n,{empty:se.Callbacks("once memory").add(function(){Ce.remove(e,[t+"queue",n])})})}}),se.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length\x20\t\r\n\f]+)/i,Le=/^$|^module$|\/(?:java|ecma)script/i,$e={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};$e.optgroup=$e.option,$e.tbody=$e.tfoot=$e.colgroup=$e.caption=$e.thead,$e.th=$e.td;var _e=/<|&#?\w+;/;!function(){var e=V.createDocumentFragment(),t=e.appendChild(V.createElement("div")),n=V.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),ie.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="",ie.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var Fe=V.documentElement,qe=/^key/,ze=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,We=/^([^.]*)(?:\.(.+)|)/;se.event={global:{},add:function(e,t,n,i,r){var a,o,s,l,c,u,p,h,f,d,y,m=Ce.get(e);if(m)for(n.handler&&(a=n,n=a.handler,r=a.selector),r&&se.find.matchesSelector(Fe,r),n.guid||(n.guid=se.guid++),(l=m.events)||(l=m.events={}),(o=m.handle)||(o=m.handle=function(t){return void 0!==se&&se.event.triggered!==t.type?se.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(ve)||[""],c=t.length;c--;)s=We.exec(t[c])||[],f=y=s[1],d=(s[2]||"").split(".").sort(),f&&(p=se.event.special[f]||{},f=(r?p.delegateType:p.bindType)||f,p=se.event.special[f]||{},u=se.extend({type:f,origType:y,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&se.expr.match.needsContext.test(r),namespace:d.join(".")},a),(h=l[f])||(h=l[f]=[],h.delegateCount=0,p.setup&&!1!==p.setup.call(e,i,d,o)||e.addEventListener&&e.addEventListener(f,o)),p.add&&(p.add.call(e,u),u.handler.guid||(u.handler.guid=n.guid)),r?h.splice(h.delegateCount++,0,u):h.push(u),se.event.global[f]=!0)},remove:function(e,t,n,i,r){var a,o,s,l,c,u,p,h,f,d,y,m=Ce.hasData(e)&&Ce.get(e);if(m&&(l=m.events)){for(t=(t||"").match(ve)||[""],c=t.length;c--;)if(s=We.exec(t[c])||[],f=y=s[1],d=(s[2]||"").split(".").sort(),f){for(p=se.event.special[f]||{},f=(i?p.delegateType:p.bindType)||f,h=l[f]||[],s=s[2]&&new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"),o=a=h.length;a--;)u=h[a],!r&&y!==u.origType||n&&n.guid!==u.guid||s&&!s.test(u.namespace)||i&&i!==u.selector&&("**"!==i||!u.selector)||(h.splice(a,1),u.selector&&h.delegateCount--,p.remove&&p.remove.call(e,u));o&&!h.length&&(p.teardown&&!1!==p.teardown.call(e,d,m.handle)||se.removeEvent(e,f,m.handle),delete l[f])}else for(f in l)se.event.remove(e,f+t[c],n,i,!0);se.isEmptyObject(l)&&Ce.remove(e,"handle events")}},dispatch:function(e){var t,n,i,r,a,o,s=se.event.fix(e),l=new Array(arguments.length),c=(Ce.get(this,"events")||{})[s.type]||[],u=se.event.special[s.type]||{};for(l[0]=s,t=1;t=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==e.type||!0!==c.disabled)){for(a=[],o={},n=0;n-1:se.find(r,this,null,[c]).length),o[r]&&a.push(i);a.length&&s.push({elem:c,handlers:a})}return c=this,l\x20\t\r\n\f]*)[^>]*)\/>/gi,Ge=/\s*$/g;se.extend({htmlPrefilter:function(e){return e.replace(He,"<$1>")},clone:function(e,t,n){var i,r,a,o,s=e.cloneNode(!0),l=se.contains(e.ownerDocument,e);if(!(ie.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||se.isXMLDoc(e)))for(o=b(s),a=b(e),i=0,r=a.length;i0&&w(o,!l&&b(e,"script")),s},cleanData:function(e){for(var t,n,i,r=se.event.special,a=0;void 0!==(n=e[a]);a++)if(ke(n)){if(t=n[Ce.expando]){if(t.events)for(i in t.events)r[i]?se.event.remove(n,i):se.removeEvent(n,i,t.handle);n[Ce.expando]=void 0}n[Ae.expando]&&(n[Ae.expando]=void 0)}}}),se.fn.extend({detach:function(e){return N(this,e,!0)},remove:function(e){return N(this,e)},text:function(e){return we(this,function(e){return void 0===e?se.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return M(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){O(this,e).appendChild(e)}})},prepend:function(){return M(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=O(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return M(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return M(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(se.cleanData(b(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return se.clone(this,e,t)})},html:function(e){return we(this,function(e){var t=this[0]||{},n=0,i=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ge.test(e)&&!$e[(Ie.exec(e)||["",""])[1].toLowerCase()]){e=se.htmlPrefilter(e);try{for(;n1)}}),se.fn.delay=function(e,t){return e=se.fx?se.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var i=window.setTimeout(t,e);n.stop=function(){window.clearTimeout(i)}})},function(){var e=V.createElement("input"),t=V.createElement("select"),n=t.appendChild(V.createElement("option"));e.type="checkbox",ie.checkOn=""!==e.value,ie.optSelected=n.selected,e=V.createElement("input"),e.value="t",e.type="radio",ie.radioValue="t"===e.value}();var it,rt=se.expr.attrHandle;se.fn.extend({attr:function(e,t){return we(this,se.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){se.removeAttr(this,e)})}}),se.extend({attr:function(e,t,n){var i,r,a=e.nodeType;if(3!==a&&8!==a&&2!==a)return void 0===e.getAttribute?se.prop(e,t,n):(1===a&&se.isXMLDoc(e)||(r=se.attrHooks[t.toLowerCase()]||(se.expr.match.bool.test(t)?it:void 0)),void 0!==n?null===n?void se.removeAttr(e,t):r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:(e.setAttribute(t,n+""),n):r&&"get"in r&&null!==(i=r.get(e,t))?i:(i=se.find.attr(e,t),null==i?void 0:i))},attrHooks:{type:{set:function(e,t){if(!ie.radioValue&&"radio"===t&&r(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,i=0,r=t&&t.match(ve);if(r&&1===e.nodeType)for(;n=r[i++];)e.removeAttribute(n)}}),it={set:function(e,t,n){return!1===t?se.removeAttr(e,n):e.setAttribute(n,n),n}},se.each(se.expr.match.bool.source.match(/\w+/g),function(e,t){var n=rt[t]||se.find.attr;rt[t]=function(e,t,i){var r,a,o=t.toLowerCase();return i||(a=rt[o],rt[o]=r,r=null!=n(e,t,i)?o:null,rt[o]=a),r}});var at=/^(?:input|select|textarea|button)$/i,ot=/^(?:a|area)$/i;se.fn.extend({prop:function(e,t){return we(this,se.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[se.propFix[e]||e]})}}),se.extend({prop:function(e,t,n){var i,r,a=e.nodeType;if(3!==a&&8!==a&&2!==a)return 1===a&&se.isXMLDoc(e)||(t=se.propFix[t]||t,r=se.propHooks[t]),void 0!==n?r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:e[t]=n:r&&"get"in r&&null!==(i=r.get(e,t))?i:e[t]},propHooks:{tabIndex:{get:function(e){var t=se.find.attr(e,"tabindex");return t?parseInt(t,10):at.test(e.nodeName)||ot.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),ie.optSelected||(se.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),se.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){se.propFix[this.toLowerCase()]=this}),se.fn.extend({addClass:function(e){var t,n,i,r,a,o,s,l=0;if(re(e))return this.each(function(t){se(this).addClass(e.call(this,t,z(this)))});if(t=W(e),t.length)for(;n=this[l++];)if(r=z(n),i=1===n.nodeType&&" "+q(r)+" "){for(o=0;a=t[o++];)i.indexOf(" "+a+" ")<0&&(i+=a+" ");s=q(i),r!==s&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,i,r,a,o,s,l=0;if(re(e))return this.each(function(t){se(this).removeClass(e.call(this,t,z(this)))});if(!arguments.length)return this.attr("class","");if(t=W(e),t.length)for(;n=this[l++];)if(r=z(n),i=1===n.nodeType&&" "+q(r)+" "){for(o=0;a=t[o++];)for(;i.indexOf(" "+a+" ")>-1;)i=i.replace(" "+a+" "," ");s=q(i),r!==s&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=void 0===e?"undefined":i(e),r="string"===n||Array.isArray(e);return"boolean"==typeof t&&r?t?this.addClass(e):this.removeClass(e):re(e)?this.each(function(n){se(this).toggleClass(e.call(this,n,z(this),t),t)}):this.each(function(){var t,i,a,o;if(r)for(i=0,a=se(this),o=W(e);t=o[i++];)a.hasClass(t)?a.removeClass(t):a.addClass(t);else void 0!==e&&"boolean"!==n||(t=z(this),t&&Ce.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":Ce.get(this,"__className__")||""))})},hasClass:function(e){var t,n,i=0;for(t=" "+e+" ";n=this[i++];)if(1===n.nodeType&&(" "+q(z(n))+" ").indexOf(t)>-1)return!0;return!1}});var st=/\r/g;se.fn.extend({val:function(e){var t,n,i,r=this[0];return arguments.length?(i=re(e),this.each(function(n){var r;1===this.nodeType&&(r=i?e.call(this,n,se(this).val()):e,null==r?r="":"number"==typeof r?r+="":Array.isArray(r)&&(r=se.map(r,function(e){return null==e?"":e+""})),(t=se.valHooks[this.type]||se.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,r,"value")||(this.value=r))})):r?(t=se.valHooks[r.type]||se.valHooks[r.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(r,"value"))?n:(n=r.value,"string"==typeof n?n.replace(st,""):null==n?"":n):void 0}}),se.extend({valHooks:{option:{get:function(e){var t=se.find.attr(e,"value");return null!=t?t:q(se.text(e))}},select:{get:function(e){var t,n,i,a=e.options,o=e.selectedIndex,s="select-one"===e.type,l=s?null:[],c=s?o+1:a.length;for(i=o<0?c:s?o:0;i-1)&&(n=!0);return n||(e.selectedIndex=-1),a}}}}),se.each(["radio","checkbox"],function(){se.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=se.inArray(se(e).val(),t)>-1}},ie.checkOn||(se.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),ie.focusin="onfocusin"in window;var lt=/^(?:focusinfocus|focusoutblur)$/,ct=function(e){e.stopPropagation()};se.extend(se.event,{trigger:function(e,t,n,r){var a,o,s,l,c,u,p,h,f=[n||V],d=ee.call(e,"type")?e.type:e,y=ee.call(e,"namespace")?e.namespace.split("."):[];if(o=h=s=n=n||V,3!==n.nodeType&&8!==n.nodeType&&!lt.test(d+se.event.triggered)&&(d.indexOf(".")>-1&&(y=d.split("."),d=y.shift(),y.sort()),c=d.indexOf(":")<0&&"on"+d,e=e[se.expando]?e:new se.Event(d,"object"===(void 0===e?"undefined":i(e))&&e),e.isTrigger=r?2:3,e.namespace=y.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+y.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:se.makeArray(t,[e]),p=se.event.special[d]||{},r||!p.trigger||!1!==p.trigger.apply(n,t))){if(!r&&!p.noBubble&&!ae(n)){for(l=p.delegateType||d,lt.test(l+d)||(o=o.parentNode);o;o=o.parentNode)f.push(o),s=o;s===(n.ownerDocument||V)&&f.push(s.defaultView||s.parentWindow||window)}for(a=0;(o=f[a++])&&!e.isPropagationStopped();)h=o,e.type=a>1?l:p.bindType||d,u=(Ce.get(o,"events")||{})[e.type]&&Ce.get(o,"handle"),u&&u.apply(o,t),(u=c&&o[c])&&u.apply&&ke(o)&&(e.result=u.apply(o,t),!1===e.result&&e.preventDefault());return e.type=d,r||e.isDefaultPrevented()||p._default&&!1!==p._default.apply(f.pop(),t)||!ke(n)||c&&re(n[d])&&!ae(n)&&(s=n[c],s&&(n[c]=null),se.event.triggered=d,e.isPropagationStopped()&&h.addEventListener(d,ct),n[d](),e.isPropagationStopped()&&h.removeEventListener(d,ct),se.event.triggered=void 0,s&&(n[c]=s)),e.result}},simulate:function(e,t,n){var i=se.extend(new se.Event,n,{type:e,isSimulated:!0});se.event.trigger(i,null,t)}}),se.fn.extend({trigger:function(e,t){return this.each(function(){se.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return se.event.trigger(e,t,n,!0)}}),ie.focusin||se.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){se.event.simulate(t,e.target,se.event.fix(e))};se.event.special[t]={setup:function(){var i=this.ownerDocument||this,r=Ce.access(i,t);r||i.addEventListener(e,n,!0),Ce.access(i,t,(r||0)+1)},teardown:function(){var i=this.ownerDocument||this,r=Ce.access(i,t)-1;r?Ce.access(i,t,r):(i.removeEventListener(e,n,!0),Ce.remove(i,t))}}});var ut=/\[\]$/,pt=/\r?\n/g,ht=/^(?:submit|button|image|reset|file)$/i,ft=/^(?:input|select|textarea|keygen)/i;return se.param=function(e,t){var n,i=[],r=function(e,t){var n=re(t)?t():t;i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(e)||e.slimJQ&&!se.isPlainObject(e))se.each(e,function(){r(this.name,this.value)});else for(n in e)H(n,e[n],t,r);return i.join("&")},se.fn.extend({serialize:function(){return se.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=se.prop(this,"elements");return e?se.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!se(this).is(":disabled")&&ft.test(this.nodeName)&&!ht.test(e)&&(this.checked||!Be.test(e))}).map(function(e,t){var n=se(this).val();return null==n?null:Array.isArray(n)?se.map(n,function(e){return{name:t.name,value:e.replace(pt,"\r\n")}}):{name:t.name,value:n.replace(pt,"\r\n")}}).get()}}),se.fn.extend({wrapAll:function(e){var t;return this[0]&&(re(e)&&(e=e.call(this[0])),t=se(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return re(e)?this.each(function(t){se(this).wrapInner(e.call(this,t))}):this.each(function(){var t=se(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=re(e);return this.each(function(n){se(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){se(this).replaceWith(this.childNodes)}),this}}),se.expr.pseudos.hidden=function(e){return!se.expr.pseudos.visible(e)},se.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},ie.createHTMLDocument=function(){var e=V.implementation.createHTMLDocument("").body;return e.innerHTML="
",2===e.childNodes.length}(),se.parseHTML=function(e,t,n){if("string"!=typeof e)return[];"boolean"==typeof t&&(n=t,t=!1);var i,r,a;return t||(ie.createHTMLDocument?(t=V.implementation.createHTMLDocument(""),i=t.createElement("base"),i.href=V.location.href,t.head.appendChild(i)):t=V),r=fe.exec(e),a=!n&&[],r?[t.createElement(r[1])]:(r=E([e],t,a),a&&a.length&&se(a).remove(),se.merge([],r.childNodes))},se.offset={setOffset:function(e,t,n){var i,r,a,o,s,l,c,u=se.css(e,"position"),p=se(e),h={};"static"===u&&(e.style.position="relative"),s=p.offset(),a=se.css(e,"top"),l=se.css(e,"left"),c=("absolute"===u||"fixed"===u)&&(a+l).indexOf("auto")>-1,c?(i=p.position(),o=i.top,r=i.left):(o=parseFloat(a)||0,r=parseFloat(l)||0),re(t)&&(t=t.call(e,n,se.extend({},s))),null!=t.top&&(h.top=t.top-s.top+o),null!=t.left&&(h.left=t.left-s.left+r),"using"in t?t.using.call(e,h):p.css(h)}},se.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){se.offset.setOffset(this,e,t)});var t,n,i=this[0];return i?i.getClientRects().length?(t=i.getBoundingClientRect(),n=i.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,i=this[0],r={top:0,left:0};if("fixed"===se.css(i,"position"))t=i.getBoundingClientRect();else{for(t=this.offset(),n=i.ownerDocument,e=i.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===se.css(e,"position");)e=e.parentNode;e&&e!==i&&1===e.nodeType&&(r=se(e).offset(),r.top+=se.css(e,"borderTopWidth",!0),r.left+=se.css(e,"borderLeftWidth",!0))}return{top:t.top-r.top-se.css(i,"marginTop",!0),left:t.left-r.left-se.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===se.css(e,"position");)e=e.offsetParent;return e||Fe})}}),se.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;se.fn[e]=function(i){return we(this,function(e,i,r){var a;if(ae(e)?a=e:9===e.nodeType&&(a=e.defaultView),void 0===r)return a?a[t]:e[i];a?a.scrollTo(n?a.pageXOffset:r,n?r:a.pageYOffset):e[i]=r},e,i,arguments.length)}}),se.each(["top","left"],function(e,t){se.cssHooks[t]=B(ie.pixelPosition,function(e,n){if(n)return n=D(e,t),Xe.test(n)?se(e).position()[t]+"px":n})}),se.each({Height:"height",Width:"width"},function(e,t){se.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,i){se.fn[i]=function(r,a){var o=arguments.length&&(n||"boolean"!=typeof r),s=n||(!0===r||!0===a?"margin":"border");return we(this,function(t,n,r){var a;return ae(t)?0===i.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(a=t.documentElement,Math.max(t.body["scroll"+e],a["scroll"+e],t.body["offset"+e],a["offset"+e],a["client"+e])):void 0===r?se.css(t,n,s):se.style(t,n,r,s)},t,o?r:void 0,o)}})}),se.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){se.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),se.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),se.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,i){return this.on(t,e,n,i)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),se.proxy=function(e,t){var n,i,r;if("string"==typeof t&&(n=e[t],t=e,e=n),re(e))return i=X.call(arguments,2),r=function(){return e.apply(t||this,i.concat(X.call(arguments)))},r.guid=e.guid=e.guid||se.guid++,r},se.holdReady=function(e){e?se.readyWait++:se.ready(!0)},se.isArray=Array.isArray,se.parseJSON=JSON.parse,se.nodeName=r,se.isFunction=re,se.isWindow=ae,se.camelCase=f,se.type=t,se.now=Date.now,se.isNumeric=function(e){var t=se.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},se}()},function(e,t,n){"use strict";var i=n(0),r=n(1),a=function(e){var t=Math.PI;return e>=t/4&&e=t/4*3&&e=t/4*5&&ee.y?n=Math.PI-n:t.x=e.x&&t.yt.x2)&&(t.x2=r.x+r.width),(null==t.y2||r.y+r.height>t.y2)&&(t.y2=r.y+r.height)}return{x:t.x1,y:t.y1,width:t.x2-t.x1,height:t.y2-t.y1}},l=function(e,t,n){for(var i=Math.PI/18,r=[],a=0;a<36;a+=1){var o=i*a,s={x:e-Math.cos(o)*n,y:t-Math.sin(o)*n,angle:o};r.push(s)}return r},c=function(e){for(var t=R(e),n=0,i=1;i1&&void 0!==arguments[1]?arguments[1]:60,n=e.split(","),i=parseInt(n[0]),r=parseInt(n[1]),a=parseInt(n[2]),o=Math.round(i+(255-i)/255*t);o>255&&(o=255);var s=Math.round(r+(255-r)/255*t);s>255&&(s=255);var l=Math.round(a+(255-a)/255*t);return l>255&&(l=255),o+","+s+","+l},p=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:13,n=e.split(","),i=parseInt(n[0]),r=parseInt(n[1]),a=parseInt(n[2]),o=Math.round(i-i/255*t);o<0&&(o=0);var s=Math.round(r-r/255*t);s<0&&(s=0);var l=Math.round(a-a/255*t);return l<0&&(l=0),o+","+s+","+l},h=function(e){return p(e,26)},f=function(e){var t=i.a.trigger("element.get"),n=[];for(var r in t){var a=t[r],o=a.plane.bounds;o="SequenceFlow"===a.shape.bpmnName?P(a):L(a),q(o.x,o.y,e)&&q(o.x+o.width,o.y,e)&&q(o.x+o.width,o.y+o.height,e)&&q(o.x,o.y+o.height,e)&&n.push(a.data.id)}return n},d=function(e,t,n){var i=30,r=[],a=n.plane.bounds,o=a.x,s=a.width,l={};return t.x>=o-i&&t.x<=o+s+i?(t.x=o-i&&t.y<=o+s+i?(l.x=e.x+i,t.y=o-i&&t.x<=o+s+i?(t.x=o-i&&t.y<=o+s+i?(l.x=e.x+i,t.y=s.x&&l.x<=u){var h=s.x+s.width/2;t.xp?u+a:p+a,l.ye.x)c.x=e.x+r/2,o.push({x:c.x,y:e.y}),o.push({x:c.x,y:t.y});else{var u=s.y+s.height,p=l.y+l.height;if(c.x=e.x+a,p>=s.y&&l.y<=u){var h=s.y+s.height/2;t.yp?u+a:p+a,l.x+l.width>e.x&&(c.x=l.x+l.width+a)}else t.ye.x&&t.y>e.y)a.push({x:t.x,y:e.y});else if(t.x>e.x&&s.x>e.x)s.x-e.x<60?l.x=e.x+(s.x-e.x)/2:l.x=e.x+r,l.y=t.y-r,a.push({x:l.x,y:e.y}),a.push({x:l.x,y:l.y}),a.push({x:t.x,y:l.y});else if(t.x<=e.x&&t.y>o.y+o.height){var c=o.y+o.height;l.x=e.x+r,t.y-c<60?l.y=c+(t.y-c)/2:l.y=t.y-r,a.push({x:l.x,y:e.y}),a.push({x:l.x,y:l.y}),a.push({x:t.x,y:l.y})}else{var u=s.x+s.width;u>e.x?l.x=u+r:l.x=e.x+r,t.ye.y)a.push({x:t.x,y:e.y});else if(t.x=e.x&&t.y>o.y+o.height){var u=o.y+o.height;l.x=e.x-r,t.y-u<60?l.y=u+(t.y-u)/2:l.y=t.y-r,a.push({x:l.x,y:e.y}),a.push({x:l.x,y:l.y}),a.push({x:t.x,y:l.y})}else s.xe.x&&t.ye.x&&s.x>e.x)s.x-e.x<60?l.x=e.x+(s.x-e.x)/2:l.x=e.x+r,l.y=t.y+r,a.push({x:l.x,y:e.y}),a.push({x:l.x,y:l.y}),a.push({x:t.x,y:l.y});else if(t.x<=e.x&&t.ye.x?l.x=c+r:l.x=e.x+r,t.y>o.y+o.height?l.y=t.y+r:l.y=o.y+o.height+r,a.push({x:l.x,y:e.y}),a.push({x:l.x,y:l.y}),a.push({x:t.x,y:l.y})}return a},S=function(e,t,n,i){var r=30,a=[],o=n.plane.bounds,s=i.plane.bounds,l={},c=s.x+s.width;return t.x=e.x&&t.yo.y+o.height?l.y=t.y+r:l.y=o.y+o.height+r,a.push({x:l.x,y:e.y}),a.push({x:l.x,y:l.y}),a.push({x:t.x,y:l.y})),a},k=function(e,t,n,i){if(null!=n)return{x:e.x-i*Math.cos(e.angle),y:e.y-i*Math.sin(e.angle)};var r=Math.abs(e.y-t.y),a=Math.abs(e.x-t.x),o=Math.atan(r/a),s={};return e.x<=t.x?s.x=e.x+i*Math.cos(o):s.x=e.x-i*Math.cos(o),e.y<=t.y?s.y=e.y+i*Math.sin(o):s.y=e.y-i*Math.sin(o),s},C=function(e,t){var n=e.data,i=n.sourceRef,r=n.targetRef,o=t[i],s=t[r],l=e.plane.waypoint,c=l[0],u=l[l.length-1],p=[];if("broken"===e.linkerType){var h=Math.abs(u.x-c.x),f=Math.abs(u.y-c.y),C=Math.PI,A=30,O=!1,R=void 0,P=void 0,T=void 0,j=void 0,M=void 0;if(null!=i&&null!=r){var N=a(c.angle),D=a(u.angle);1===N&&1===D?(c.yu.y?(R=c,P=u,T=o,j=s,O=!1):(R=u,P=c,T=s,j=o,O=!0),p=m(R,P,T)):2===N&&2===D?(c.y>u.y?(R=c,P=u,T=o,j=s,O=!1):(R=u,P=c,T=s,j=o,O=!0),p=y(R,P,T)):4===N&&4===D?(c.x=C/4&&M=f)p.push({x:R.x,y:P.y});else{var I=f/2;p.push({x:R.x,y:R.y-I}),p.push({x:P.x,y:R.y-I})}else if(p.push({x:R.x,y:R.y-A}),h>=f)if(P.x>=B.x-A&&P.x<=B.x+B.width+A){var L=B.x+B.width/2;P.x=B.x-A&&P.x<=B.x+B.width+A){var $=B.x+B.width/2;P.x<$?(p.push({x:B.x-A,y:R.y-A}),p.push({x:B.x-A,y:P.y-A}),p.push({x:P.x,y:P.y-A})):(p.push({x:B.x+B.width+A,y:R.y-A}),p.push({x:B.x+B.width+A,y:P.y-A}),p.push({x:P.x,y:P.y-A}))}else p.push({x:P.x,y:R.y-A});else if(M>=C/4*3&&MR.x)h>=f?(p.push({x:R.x+h/2,y:R.y}),p.push({x:R.x+h/2,y:P.y})):p.push({x:P.x,y:R.y});else if(p.push({x:R.x+A,y:R.y}),h>=f)if(P.y>=B.y-A&&P.y<=B.y+B.height+A){var F=B.y+B.height/2;P.y=B.y-A&&P.y<=B.y+B.height+A){var q=B.y+B.height/2;P.y=C/4*5&&MR.y)h>=f?p.push({x:R.x,y:P.y}):(p.push({x:R.x,y:R.y+f/2}),p.push({x:P.x,y:R.y+f/2}));else if(p.push({x:R.x,y:R.y+A}),h>=f)if(P.x>=B.x-A&&P.x<=B.x+B.width+A){var z=B.x+B.width/2;P.x=B.x-A&&P.x<=B.x+B.width+A){var W=B.x+B.width/2;P.x=f?(p.push({x:R.x-h/2,y:R.y}),p.push({x:R.x-h/2,y:P.y})):p.push({x:P.x,y:R.y});else if(p.push({x:R.x-A,y:R.y}),h>=f)if(P.y>=B.y-A&&P.y<=B.y+B.height+A){var H=B.y+B.height/2;P.y=B.y-A&&P.y<=B.y+B.height+A){var G=B.y+B.height/2;P.y=f){var V=(u.x-c.x)/2;p.push({x:c.x+V,y:c.y}),p.push({x:c.x+V,y:u.y})}else{var U=(u.y-c.y)/2;p.push({x:c.x,y:c.y+U}),p.push({x:u.x,y:c.y+U})}}else if("curve"===e.linkerType){var X=_(c,u),K=.4*X;p.push(k(c,u,i,K)),p.push(k(u,c,r,K))}return p},A=function(e){var t={},n=e.plane.waypoint,i=n[0],r=n[n.length-1];if("normal"===e.linkerType)t.x=.5*i.x+.5*r.x,t.y=.5*i.y+.5*r.y;else if("curve"===e.linkerType)t.x=.125*i.x+.375*e.points[0].x+.375*e.points[1].x+.125*r.x,t.y=.125*i.y+.375*e.points[0].y+.375*e.points[1].y+.125*r.y;else{var a=[];a.push(i),a=a.concat(e.points),a.push(r);for(var o=0,s=1;sl){var d=(l-c)/f;t.x=(1-d)*p.x+d*h.x,t.y=(1-d)*p.y+d*h.y;break}c=f}}return t},O=function(e,t){var n=e.data,i=(n.sourceRef,n.targetRef,e.plane.waypoint),r=i[0],a=i[i.length-1],s=void 0,l=void 0;if("normal"===e.linkerType)s="source"===t?a:r;else if("broken"===e.linkerType)s="source"===t?e.points[0]:e.points[e.points.length-1];else{var c=_(r,a),u=void 0;u="source"===t?12/c:1-12/c,s={x:(1-u)*(1-u)*(1-u)*r.x+3*(1-u)*(1-u)*u*e.points[0].x+3*(1-u)*u*u*e.points[1].x+u*u*u*a.x,y:(1-u)*(1-u)*(1-u)*r.y+3*(1-u)*(1-u)*u*e.points[0].y+3*(1-u)*u*u*e.points[1].y+u*u*u*a.y}}return l="source"===t?r:a,o(s,l)},R=function(e){var t=e.plane,n=e.shape,i=[];if("curve"!==n.linkerType)i.push(t.waypoint[0]),i=i.concat(n.points);else for(var r=0;r<=1;){var a={x:(1-r)*(1-r)*(1-r)*n.points[0].x+3*(1-r)*(1-r)*r*n.points[1].x+3*(1-r)*r*r*n.points[2].x+r*r*r*n.points[n.points.length-1].x,y:(1-r)*(1-r)*(1-r)*n.points[0].y+3*(1-r)*(1-r)*r*n.points[1].y+3*(1-r)*r*r*n.points[2].y+r*r*r*n.points[n.points.length-1].y};i.push(a),r+=.05}return i.push(t.waypoint[t.waypoint.length-1]),i},P=function(e){for(var t=R(e),n=t[0].x,i=t[0].y,r=t[0].x,a=t[0].y,o=0;or&&(r=s.x),s.ya&&(a=s.y)}return{x:n,y:i,width:r-n,height:a-i}},T=function(e){for(var t=[],n=[],r=i.a.trigger("shape.select.getIds"),a=0;a0)for(var l=0;l=0)&&n.indexOf(c)<0&&(t.push(i.a.trigger("element.get",c)),n.push(c))}}}return t},j=function(){for(var e=i.a.trigger("shape.select.get"),t=[],n=0;nt.x2)&&(t.x2=s.x+s.width),(null==t.y2||s.y+s.height>t.y2)&&(t.y2=s.y+s.height)}return{x:t.x1,y:t.y1,width:t.x2-t.x1,height:t.y2-t.y1}},I=function(e,t,n){var i=_(e,t);if(0===i||0===n)return t;var r=Math.atan(Math.abs(t.x-e.x)/Math.abs(e.y-t.y));t.x>=e.x&&t.y>=e.y?r=Math.PI-r:t.x<=e.x&&t.y>=e.y?r=Math.PI+r:t.x<=e.x&&t.y<=e.y&&(r=2*Math.PI-r),r%=2*Math.PI;var a=(r+n)%(2*Math.PI);return{x:e.x+Math.sin(a)*i,y:e.y-Math.cos(a)*i}},L=function(e){var t=e.plane,n=e.shape;return D(t.bounds,n.shapeStyle.angle)},$=function(e,t,n,a){var o=[],s=i.a.trigger("element.get");for(var l in s){var c=s[l],u=c.data,p=c.plane,h=c.shape,f=n.find('.shape-box[data-id="'+u.id+'"]'),d=f.position(),y=e-d.left,m=t-d.top,g=void 0,v=void 0,x={x:d.left,y:d.top,width:f.width(),height:f.height()},b=f.find(".shape-canvas"),w=b[0].getContext("2d"),E=q(e,t,x);if("SequenceFlow"===h.bpmnName){if(!E)continue;if(a)continue;g=Object(r.k)(10),v={x:e-g,y:t-g,width:2*g,height:2*g};var S=(p.waypoint[0].x,p.waypoint[0].y,{x:p.waypoint[p.waypoint.length-1].x,y:p.waypoint[p.waypoint.length-1].y});if(q(Object(r.k)(S.x),Object(r.k)(S.y),v)){var k={type:"sequence_point",point:"target",element:c};o.push(k);continue}if(q(Object(r.k)(S.x),Object(r.k)(S.y),v)){var C={type:"sequence_point",point:"source",element:c};o.push(C);continue}var A=f.find(".text-box"),O=A.position(),R={x:O.left,y:O.top,width:A.width(),height:A.height()};if(q(y,m,R)){var P={type:"sequence_text",element:c};o.push(P);continue}g=Object(r.k)(7);var T=z({x:Object(r.i)(e),y:Object(r.i)(t)},c,g);if(T>-1){o.push({type:"sequence",element:c,pointIndex:T});continue}}else{if(E&&h.locked&&!a){w.isPointInPath(y,m)&&o.push({type:"shape",element:c});continue}if(g=Object(r.k)(7),E){v={x:e-g,y:t-g,width:2*g,height:2*g},x={x:p.bounds.x+p.bounds.width/2,y:p.bounds.y+p.bounds.height/2};for(var j=h.getAnchors(),N=null,D=0;D1&&a)$=o[0];else if(o.length>1){if("bounds"===o[0].type&&"sequence_point"!==o[0].type&&"sequence"!==o[0].type)return o[0];for(var _=[],F=[],W=[],H=0;H0&&F.length>0)for(var V=0;V0&&(F.sort(function(e,t){return i.a.trigger("shape.select.check",e.element.data.id)&&!i.a.trigger("shape.select.check",t.element.data.id)?-1:!i.a.trigger("shape.select.check",e.element.data.id)&&i.a.trigger("shape.select.check",t.element.data.id)?1:t.element.shape.shapeStyle.zindex-e.element.shape.shapeStyle.zindex}),$=F[0]),null==$&&_.length>0&&(_.sort(function(e,t){return i.a.trigger("shape.select.check",e.element.data.id)&&!i.a.trigger("shape.select.check",t.element.data.id)?-1:!i.a.trigger("shape.select.check",e.element.data.id)&&i.a.trigger("shape.select.check",t.element.data.id)?1:t.element.shape.shapeStyle.zindex-e.element.shape.shapeStyle.zindex}),$=_[0]),null==$&&($=o[0])}return $},_=function(e,t){var n=t.y-e.y,i=t.x-e.x;return Math.sqrt(Math.pow(n,2)+Math.pow(i,2))},F=function(e,t){e.setLineDash||(e.setLineDash=function(){}),e.setLineDash(t),e.mozDash=t,e.webkitLineDash=t},q=function(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height},z=function(e,t,n){for(var i=R(t),r={x:e.x-n,y:e.y},a={x:e.x+n,y:e.y},o={x:e.x,y:e.y-n},s={x:e.x,y:e.y+n},l=1;l=0&&o<=1&&s>=0&&s<=1&&(r=!0)}return r};t.a={getAngle:o,getAngleDir:a,getBounding:s,getConnectionLength:c,getConnectionMidpoint:A,getConnectionPoints:C,getEndpointAngle:O,getElementsBox:B,getElementIdsByRange:f,getConnectionBox:P,getLighterColor:u,getDarkerColor:p,getDarkestColor:h,getOutConnections:T,getPointAngle:M,getRelativePos:N,getRotated:I,getRotatedBox:D,getSelectedConnectionIds:j,getShapeByPosition:$,getShapeBox:L,measureDistance:_,setLineDash:F}},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=n(6),s=function(e){function t(){i(this,t);var e=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.children=[],e.parent="",e.resizeDir=["tl","tr","br","bl"],e.attribute={container:!1,visible:!0,rotatable:!1,linkable:!0,editable:!0,markerOffset:5},e.lineStyle={lineWidth:2,lineColor:"50,50,50",lineStyle:"solid"},e.fillStyle={type:"solid",color:"255,255,255"},e.lightStyle={},e.actions=null,e}return a(t,e),t}(o.a);t.a=s},function(e,t,n){"use strict";n.d(t,"a",function(){return a}),n.d(t,"b",function(){return o}),n.d(t,"c",function(){return s}),n.d(t,"e",function(){return l}),n.d(t,"f",function(){return c}),n.d(t,"d",function(){return u}),n.d(t,"i",function(){return h}),n.d(t,"h",function(){return f}),n.d(t,"g",function(){return d});var i={String:!0,Boolean:!0,Integer:!0,Real:!0,Element:!0},r={String:function(e){return e},Boolean:function(e){return"true"===e},Integer:function(e){return parseInt(e,10)},Real:function(e){return parseFloat(e,10)}},a={xsi:"http://www.w3.org/2001/XMLSchema-instance"},o="xsi:type",s=function(e,t){var n=r[e];return n?n(t):t},l=function(e){return!!i[e]},c=function(e){return!!r[e]},u=function(e){return e.xml&&"lowerCase"===e.xml.tagAlias},p=function(e){return e.xml&&e.xml.serialize},h=function(e){return p(e)===o},f=function(e){return"property"===p(e)},d=function(e,t){var n,i,r=e.split(/:/);if(1===r.length)n=e,i=t;else{if(2!==r.length)throw new Error("expected or , got "+e);n=r[1],i=r[0]}return e=(i?i+":":"")+n,{name:e,prefix:i,localName:n}}},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=function(){function e(e,t){for(var n=0;no&&(s={x:0,y:o/2},l={x:a,y:o/2},c=(h.angle+Math.PI/2)%(2*Math.PI)),0!==c){var u={x:a/2,y:o/2};s=i.a.getRotated(u,s,c),l=i.a.getRotated(u,l,c),s.x<0&&(s.x=0),s.x>a&&(s.x=a),s.y<0&&(s.y=0),s.y>o&&(s.y=o),l.x<0&&(l.x=0),l.x>a&&(l.x=a),l.y<0&&(l.y=0),l.y>o&&(l.y=o)}var p=e.createLinearGradient(s.x,s.y,l.x,l.y);return p.addColorStop(0,"rgb("+n.beginColor+")"),p.addColorStop(1,"rgb("+n.endColor+")"),p},createRadialGradient:function(e,t,n){var i=t.bpmnPlane.bounds,r=i.width,a=i.height,o=r");return new n(t)}},{key:"getType",value:function(e){var t=this.typeCache,n="string"==typeof e&&e.constructor===String?e:e.ns.name,i=t[n];return i||(e=this.registry.getEffectiveDescriptor(n),i=t[n]=this.factory.createType(e)),i}},{key:"createAny",value:function(e,t,n){var i=Object(l.g)(e),r={$type:e,$instanceOf:function(e){return e===this.$type}},o={name:e,isGeneric:!0,ns:{prefix:i.prefix,localName:i.localName,uri:t}};this.properties.defineDescriptor(r,o),this.properties.defineModel(r,this),this.properties.define(r,"$parent",{enumerable:!1,writable:!0});for(var s in n){var u=n[s];"object"===(void 0===u?"undefined":c(u))&&u.constructor===Object&&void 0!==u.value?r[u.name]=a.value:r[s]=u}return r}},{key:"getPackage",value:function(e){return this.registry.getPackage(e)}},{key:"getPackages",value:function(){return this.registry.getPackages()}},{key:"getElementDescriptor",value:function(e){return e.$descriptor}},{key:"hasType",value:function(e,t){return void 0===t&&(t=e,e=this),t in e.$model.getElementDescriptor(e).allTypesByName}},{key:"getPropertyDescriptor",value:function(e,t){return this.getElementDescriptor(e).propertiesByName[t]}},{key:"getTypeDescriptor",value:function(e){return this.registry.typeMap[e]}}]),e}();t.a=p},function(e,t,n){"use strict";function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t',extensions:{},filter:[],bpmns:["StartEvent","UserTask","ServiceTask","ReceiveTask","CallActivity","ExclusiveGateway","InclusiveGateway","ParallelGateway","ComplexGateway","EndEvent","TerminateEndEvent"]},C=!1,A=function(e){var t=Object(l.a)(e.container);if(!e.container||t.length<=0)throw new Error("Can not find container: "+e.container);var n=Object(l.a)('
');return n.css({width:e.width,height:e.height}),n.find(".bpd-layout").css({top:-e.pageStyle.height/2,left:-e.pageStyle.width/2}),t.append(n),n},O=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r(this,e),this.version="0.1.4",this.options=Object.assign({},k,t),this.$container=A(this.options),this.features={HotKey:new w.a,I18n:new E.a(this.options.local),BpmnXML:new p.a(this.options.extensions),Background:new h.a(this.$container,this.options,this.options.config.background),Hand:new x.a(this.$container,this.options.pageStyle)},this.options.readonly||(this.features.Anchor=new d.a(this.$container,this.options.config.anchor),this.features.Snapline=new g.a(this.$container,this.options.config.snapline),this.features.Direction=new f.a(this.$container,this.options.config.direction),this.features.Select=new y.a(this.$container,this.options.config.select),this.features.Tooltip=new v.a(this.$container,this.options.config.tooltip),this.features.Drag=new m.a(this.options,this.$container),this.features.GroupPanel=new b.a(this.$container,this.options)),this.draw=Object(s.a)(this.options,this.$container),Object(u.g)("bpmn",function(){C=!0}),this.init()}return S(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){};this.importBpmn(this.options.definition,e)}},{key:"createShape",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=Object(l.a)(e.target);if(!n.hasClass("readonly")&&!this.options.readonly){var i=n.attr("shapeName");if(!i||""===i)throw new Error("shapeName error");this.draw.createShape(i,t)}}},{key:"getAllElement",value:function(){var e=[],t=o.a.trigger("element.get");for(var n in t){var i=Object(u.j)(t[n]);e.push(i)}return e}},{key:"getRootElement",value:function(){var e=o.a.trigger("process.get");return e?Object(u.j)(e):null}},{key:"getFrontElementsByBpmn",value:function(e,t){return this.getFrontElements(o.a.trigger("element.get",e.id)).filter(function(e){return e.bpmnName===t})}},{key:"getFrontElement",value:function(e){if(!e)throw new Error("select element error");var t=null;return this.getFrontElements(o.a.trigger("element.get",e.id)).forEach(function(e){t||"SequenceFlow"===e.bpmnName||(t=e)}),t}},{key:"getFrontElements",value:function(e){if(!e)throw new Error("select element error");for(var t=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=[];return i?n:(t.forEach(function(e){if("SequenceFlow"===e.shape.bpmnName){if(e.data.sourceRef&&""!==e.sourceRef){var t=o.a.trigger("element.get",e.data.sourceRef)||[],i=!1;n.forEach(function(e){e.data.id===t.data.id&&(i=!0)}),i||(r.push(t),n.push(t))}}else{(o.a.trigger("connections.get",e.data.id)||[]).forEach(function(t){var i=o.a.trigger("element.get",t);if(i.data.targetRef===e.data.id){var a=!1;n.forEach(function(e){e.data.id===i.data.id&&(a=!0)}),a||(r.push(i),n.push(i))}})}}),r.length<=0?e(r,n,!0):e(r,n))}([e]),n=0;n2&&void 0!==arguments[2]?arguments[2]:function(){};t.extensions.forEach(function(e){e.$type=e.name,delete e.name});var r=o.a.trigger("element.get",e);if(r){var a=Object.assign({},t.original);for(var s in a)r.data[s]=a[s];var l=r.data.extensionElements,c=[];l.values||(l.values=[]),l.values.forEach(function(e){var n=!1;t.extensions.forEach(function(t){t.$type===e.$type&&(n=!0)}),n||c.push(e)}),l.values=[].concat(c,i(t.extensions)),"SequenceFlow"===r.shape.bpmnName||o.a.trigger("shape.render",{type:r.shape.bpmnName,element:r}),n()}}},{key:"updateProcessProperties",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};e.extensions.forEach(function(e){e.$type=e.name,delete e.name});var n=o.a.trigger("process.get");if(n){var r=Object.assign({},e.original);for(var a in r)n[a]=r[a];var s=[];n.extensionElements.values||(n.extensionElements.values=[]),n.extensionElements.values.forEach(function(t){var n=!1;e.extensions.forEach(function(e){e.$type===t.$type&&(n=!0)}),n||s.push(t)}),n.extensionElements.values=[].concat(s,i(e.extensions)),t()}}},{key:"updataLineStyle",value:function(e,t){this.draw.updataLineStyle(e,t)}},{key:"destroy",value:function(){this.$container.remove(),this.draw.cancel(),o.a.trigger("key.clear"),o.a.destroy()}},{key:"activateHand",value:function(){o.a.trigger("hand.activate"),this.draw.resetState()}},{key:"activateSelect",value:function(){o.a.trigger("hand.destroy"),o.a.trigger("shape.multiSelect",{state:this.draw.state}),this.draw.changeState("multiSelect")}},{key:"importBpmn",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=this,i=setInterval(function(){C&&(clearInterval(i),o.a.trigger("model.import",e,function(e,i){e?console.log(e):(n.draw.render(i),t())}))},1e3)}},{key:"exportBpmn",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){},t=this.draw.designer.createDefinition();o.a.trigger("model.export",t,function(t,n){t&&console.log(t,n),e(n)})}}]),e}();t.default=O,window.BPDCore=O},function(e,t){},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=n(0),s=n(12),l=n(13),c=n(14),u=n(26),p=n(3),h=n(1),f=(n(2),function(){function e(e,t){for(var n=0;n0&&a.forEach(function(t,n){if(t.id===e.id+"_di"){var i=Object(h.c)(e);e.extensionElements&&(i.extensionElements.values=e.extensionElements.values||[]);"SequenceFlow"!==Object(h.e)(e.$type)?(i.incoming=e.incoming?e.incoming.id:"",i.outgoing=e.outgoing?e.outgoing.id:""):(i.sourceRef=e.sourceRef?e.sourceRef.id:"",i.targetRef=e.targetRef?e.targetRef.id:""),r[e.id]={data:i,plane:Object(h.c)(t)}}})})}):this.designer.setProcessModel(),this.renderPage();var a=0;for(var o in r){var s=r[o],l=Object(h.e)(s.data.$type);"SequenceFlow"!==l&&(this.renderShape({type:l,element:s}),this.designer.addData(s,!1)),a++}for(var c in r){var u=r[c];"SequenceFlow"===Object(h.e)(u.data.$type)&&(this.renderConnection({element:u}),this.designer.addData(u,!1))}0===a&&this.designer.build();var f=this.$container,d=this.options,y=d.pageStyle,m=y.width,g=y.height,v=f.find(".bpd-layout"),x=v.offset(),b={x:Object(h.i)(0),y:Object(h.i)(0),width:Object(h.i)(m),height:Object(h.i)(g)},w=p.a.getElementIdsByRange(b),E=p.a.getElementsBox(w),S=x.top;E.y<-g/2?S=E.y:E.y>0&&(S=0);var k=x.left;E.x<-m/2?k=E.x:E.x>0&&(k=0),v.offset({top:S,left:k})}},{key:"renderPage",value:function(){var e=this.options.pageStyle,t=e.width,n=e.height,i=e.backgroundColor,r=p.a.getDarkerColor(i);p.a.getDarkestColor(i);this.$container.find(".bpd-designer").css({"background-color":"rgb("+r+")"}),this.$container.find(".bpd-layout").css({width:t,height:n})}},{key:"renderShape",value:function(e){var t=e.type,n=e.element;this.drawShape.render(t,n)}},{key:"renderShapePath",value:function(e){var t=e.shape2D,n=e.element,i=e.render;this.drawShape.renderShapePath(t,n,i)}},{key:"renderConnection",value:function(e){var t=e.element,n=e.rendered;this.drawConnection.render(t,n)}},{key:"moveConnection",value:function(e){var t=e.element,n=e.type,i=e.x,r=e.y;this.drawConnection.move(t,n,i,r)}},{key:"updataLineStyle",value:function(e,t){if(e){var n=o.a.trigger("element.get",e);"SequenceFlow"===n.shape.bpmnName||(n.shape.lightStyle={lineStyle:t},console.log(n),this.drawShape.renderShape(n))}else{var i=o.a.trigger("element.get");for(var r in i){var a=i[r];"SequenceFlow"===a.shape.bpmnName||(a.shape.lightStyle={},this.drawShape.renderShape(a))}}}},{key:"removeShape",value:function(e,t){var n=this;e||(e=o.a.trigger("shape.select.get")),void 0===t&&(t=!0),t&&(e=this.beforeRemove(e));var i=[],r=[],a=[];return 0!==e.length&&(e.forEach(function(e){"SequenceFlow"===e.shape.bpmnName?a.push(e.data.id):r.push(e.data.id)}),e.forEach(function(e){i.push(Object(h.c)(e));var t=e.data,s=e.shape;if(n.$container.find('.shape-box[data-id="'+t.id+'"]').remove(),delete n.designer.elements[t.id],"SequenceFlow"===s.bpmnName)t.sourceRef,t.targetRef;else{s.parent&&r.indexOf(s.parent);var l=n.designer.connections[t.id];if(l&&l.length>0)for(var c=0;c1&&void 0!==arguments[1]?arguments[1]:function(){},n=null;o.a.trigger("data.create",e,function(e){n=e,t(n)})}},{key:"beforeRemove",value:function(e){for(var t={},n=0;n1&&void 0!==arguments[1]?arguments[1]:function(){},i=null,l=null,c=this.$container.find(".bpd-layout"),u=c.find(".bpd-designer");c.on("mousemove.create",function(n){var o=a.a.getRelativePos(n.pageX,n.pageY,u),c=0,p=null;null==i?(i=r.a.trigger("element.create",{name:null,type:Object(s.d)(e,"uppercase"),prefix:"obj",pos:o}),p=i.plane.bounds,p.x=Object(s.i)(o.x)-p.width/2,p.y=Object(s.i)(o.y)-p.height/2,c=Object.keys(t.elements),r.a.trigger("shape.render",{type:e,element:i}),l=t.$container.find('.shape-box[data-id="'+i.data.id+'"]'),l.attr("class","shape-box-creating"),l.css({left:o.x-l.width()/2+"px",top:o.y-l.height()/2+"px","z-index":c.length})):(p=i.plane.bounds,p.x=Object(s.i)(o.x)-p.width/2,p.y=Object(s.i)(o.y)-p.height/2);r.a.trigger("shape.snapline.show",{size:p,ids:[]});l.css({left:Object(s.k)(p.x-10)+"px",top:Object(s.k)(p.y-10)+"px","z-index":c.length})});var p=!1;c.on("mouseup.create",function(){p=!0}),Object(o.a)(document).on("mouseup.create",function(){Object(o.a)(document).off("mouseup.create"),u.off("mousemove.creating"),r.a.trigger("shape.snapline.hide"),c.off("mouseup.create").off("mousemove.create"),null!=i&&(!1===p?l.remove():(l.attr("class","shape-box"),t.addData(i),n(i)))})}},{key:"addData",value:function(e,t){this.addDatas([e],t)}},{key:"addDatas",value:function(e,t){void 0===t&&(t=!0);for(var n=[],i=0;i1&&void 0!==arguments[1]?arguments[1]:function(){};if(e.length>0){var n=[];e=e.concat(n),t(e)}}},{key:"getElement",value:function(e){return e?this.elements[e]:this.elements}},{key:"getProcess",value:function(){var e=null;return this.definitions&&(e=this.definitions.rootElements[0],delete e.flowElements),e}},{key:"setShapeGroups",value:function(e,t){this.groups[e]||(this.groups[e]=[]),this.groups[e].indexOf(t)<0&&this.groups[e].push(t)}},{key:"getShapeConnections",value:function(e){return this.connections[e]}},{key:"setShapeConnections",value:function(e,t){this.connections[e]||(this.connections[e]=[]),this.connections[e].indexOf(t)<0&&this.connections[e].push(t)}},{key:"update",value:function(e){this.updateMulti([e])}},{key:"updateMulti",value:function(e){for(var t=[],n=[],i=0;i0&&(o=this.orders[this.orders.length-1].zindex),this.maxZIndex=o}},{key:"createAttrs",value:function(e,t,n){var i=this,r={data:{},plane:{}},a=e.id||"obj_"+this.options.ids.next();if(e)for(var o in e)switch(o){case"$type":case"flowElements":case"sourceRef":case"targetRef":case"incoming":case"outgoing":break;case"extensionElements":r.data.extensionElements=this.createExtensionModel(e[o].values||[]);break;default:r.data[o]=e[o]}if(t)for(var s in t)switch(s){case"$type":break;case"id":r.plane[s]=a+"_di";break;case"waypoint":"SequenceFlow"===n.bpmnName&&function(){var e=t[s][0],a=t[s][t[s].length-1],o=[];o.push(i.createModel({descriptor:"dc:Point",attrs:{x:e.x,y:e.y}})),n.points.forEach(function(e){o.push(i.createModel({descriptor:"dc:Point",attrs:{x:e.x,y:e.y}}))}),o.push(i.createModel({descriptor:"dc:Point",attrs:{x:a.x,y:a.y}})),r.plane[s]=o}();break;case"bounds":if("SequenceFlow"!==n.bpmnName){var l=t[s],c=l.height,u=l.width,p=l.x,h=l.y;r.plane[s]=this.createModel({descriptor:"dc:Bounds",attrs:{height:c,width:u,x:p,y:h}})}break;default:r.plane[s]=t[s]}return r}},{key:"createElement",value:function(e){var t=e.type,n=e.prefix,i=e.name,a=e.pos,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},l=n+"_"+this.options.ids.next(),c=Object(s.c)(this.createModel({descriptor:"bpmn:"+t,attrs:{name:i,id:l,extensionElements:this.createExtensionModel()}})),u={};"SequenceFlow"===t?u=Object(s.c)(this.createModel({descriptor:"bpmndi:BPMNEdge",attrs:{id:l+"_di",waypoint:[]}})):(u=Object(s.c)(this.createModel({descriptor:"bpmndi:BPMNShape",attrs:{bounds:this.createModel({descriptor:"dc:Bounds",attrs:{x:0,y:0}}),bpmnElement:l,id:l+"_di"}})),a&&(u.bounds.x=Object(s.i)(a.x)-u.bounds.width,u.bounds.y=Object(s.i)(a.y)-u.bounds.height));var p={data:c,plane:u};return p=r.a.trigger("shape.create",{type:t,element:p}),this.maxZIndex=p.shape.shapeStyle.zindex=this.maxZIndex+1,o(p),p}},{key:"createDefinition",value:function(){var e=this;return this.definitions.rootElements.forEach(function(t,n){var i={},r=[],a=[];for(var o in e.elements){var s=e.elements[o],l=s.data,c=s.plane,u=s.shape;if("SequenceFlow"!==u.bpmnName){var p=e.createAttrs(l,c,u);p.data.incoming=[],p.data.outgoing=[];var h=e.createModel({descriptor:l.$type,attrs:p.data});p.plane.bpmnElement=h;var f=e.createModel({descriptor:c.$type,attrs:p.plane});i[h.id]=h,r.push(h),a.push(f)}}for(var d in e.elements){var y=e.elements[d],m=y.data,g=y.plane,v=y.shape;if("SequenceFlow"===v.bpmnName){var x=e.createAttrs(m,g,v);x.data.sourceRef=i[m.sourceRef],x.data.targetRef=i[m.targetRef];var b=e.createModel({descriptor:m.$type,attrs:x.data});m.sourceRef&&i[m.sourceRef].outgoing.push(b),m.targetRef&&i[m.targetRef].incoming.push(b),x.plane.bpmnElement=b;var w=e.createModel({descriptor:g.$type,attrs:x.plane});r.push(b),a.push(w)}}e.definitions.diagrams[n].plane.planeElement=a,e.definitions.rootElements[n]=e.createModel({descriptor:t.$type,attrs:{id:t.id||e.options.ids.next(),extensionElements:e.createExtensionModel(t.extensionElements.values||[])}}),e.definitions.rootElements[n].flowElements=r}),this.definitions}},{key:"setProcessModel",value:function(){var e="process_"+this.options.ids.next(),t=[this.createModel({descriptor:"bpmn:Process",attrs:{id:e,flowElements:[],extensionElements:this.createExtensionModel([])}})],n=[this.createModel({descriptor:"bpmndi:BPMNDiagram",attrs:{id:e+"_di",plane:this.createModel({descriptor:"bpmndi:BPMNPlane",attrs:{id:e+"_pl",planeElement:[]}})}})];this.definitions.rootElements=t,this.definitions.diagrams=n}},{key:"createModel",value:function(e){var t=null;return r.a.trigger("model.create",e,function(e){t=e}),t}},{key:"createExtensionModel",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=[];return t.forEach(function(t){var i=t.$type||t.name,r=Object(s.c)(t);delete r.$type,delete r.name;var a=e.createModel({descriptor:i,attrs:r});a&&n.push(a)}),this.createModel({descriptor:"bpmn:ExtensionElements",attrs:{values:n}})}}]),e}(),u=function(e,t,n){return new c(e,t,n)};t.a=u},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=n(0),a=n(3),o=function(){function e(e,t){for(var n=0;n1&&p<=u.shape.points.length||null==u.data.sourceRef&&null==u.data.targetRef&&(o.css("cursor","move"),r.a.trigger("shape.drag",s))}else if("sequence_point"===c.type)o.css("cursor","move"),r.a.trigger("shape.hover",s),r.a.trigger("connection.drag",s);else if("sequence_text"===c.type)o.css("cursor","text"),r.a.trigger("shape.hover",s);else if("shape"===c.type?c.element.shape.locked?(o.css("cursor","default"),r.a.trigger("shape.hover",s)):(o.css("cursor","move"),r.a.trigger("shape.hover",s),r.a.trigger("shape.edit",s),r.a.trigger("shape.drag",s)):(o.css("cursor","crosshair"),r.a.trigger("shape.hover",s),r.a.trigger("anchor.hover",s)),c.element.shape.parent){var h=r.a.on("element.get",c.element.shape.parent);r.a.trigger("anchor.show",h)}else r.a.trigger("anchor.show",c.element);else o.css("cursor","default"),r.a.trigger("canvas.hover",s),r.a.trigger("shape.multiSelect",s),r.a.trigger("hand.activate")}}},{key:"changeState",value:function(e){this.state.state=e}},{key:"resetState",value:function(){this.state.state=null,this.$container.find(".bpd-designer").css("cursor","default")}}]),e}();t.a=s},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=n(2),a=n(15),o=n(1),s=n(7),l=n(3),c=function(){function e(e,t){for(var n=0;n").appendTo(this.$container.find(".bpd-designer")));var s=i.bounds,c=s.x,u=s.y,p=s.width,h=s.height,f=t.shapeStyle,d=f.angle,y=(f.zindex,l.a.getShapeBox(e)),m=y.width+20,g=y.height+20,v=a.find(".shape-canvas");v.attr({width:m,height:g}),a.css({left:Object(o.k)(y.x-10)+"px",top:Object(o.k)(y.y-10)+"px",width:m,height:g});var x=v[0].getContext("2d");x.clearRect(0,0,p+20,h+20),x.scale(this.options.scale,this.options.scale),x.translate(10,10),x.translate(c-y.x,u-y.y),x.translate(p/2,h/2),x.rotate(d),x.translate(-p/2,-h/2),x.globalAlpha=t.shapeStyle.alpha,x.lineJoin="round",this.renderShapePath(x,e),this.renderText(t,y)}},{key:"renderShapePath",value:function(e,t,n){var i=t.plane.bounds,r=i.width,a=i.height,s=void 0;s=n&&o.a.drawIcon?o.a.drawIcon(r,a):t.shape.actions,this.renderPath(e,t,s,n)}},{key:"renderPath",value:function(e,t,n,i){for(var r=t.data,a=(t.plane,t.shape),s=0;s").appendTo(u),p.on("focus",function(){Object(r.a)(this).blur()})),p.attr("readonly","readonly"),null==e.data.name||""===e.data.name.trim())return void p.css({height:"0px",width:"0px"}).hide();var h=e.fontStyle;p.css({"line-height":Math.round(1.25*h.size)+"px","font-size":h.size+"px","font-family":h.fontFamily,"font-weight":h.bold?"bold":"normal","font-style":h.italic?"italic":"normal","text-align":h.textAlign,color:"rgb("+h.color+")","text-decoration":h.underline?"underline":"none",opacity:e.shapeStyle.alpha}).show();var f=e.getTextBlock();if("horizontal"===e.fontStyle.orientation){var d={x:f.x+f.width/2,y:f.y+f.height/2};f.x=d.x-f.height/2,f.y=d.y-f.width/2,f.width=f.height,f.height=f.width}p.css({width:f.width}),p.height(0),p.val(e.data.name),p.scrollTop(99999);var y=p.scrollTop(),m=0;m="middle"===h.vAlign?f.y+f.height/2-y/2:"bottom"===e.fontStyle.vAlign?f.y+f.height-y:f.y;var g={x:f.x+f.width/2,y:m+y/2},v=e.shapeStyle.angle;0!==v&&(g=l.a.getRotated({x:s/2,y:c/2},g,v)),"horizontal"===h.orientation&&(v=(1.5*Math.PI+v)%(2*Math.PI));var x=Math.round(v/(2*Math.PI)*360),b="rotate("+x+"deg) scale("+this.options.scale+")",w=f.width,E=y;p.css({width:w,height:E,left:Object(o.k)(g.x+(i-t.x)+10)-w/2,top:Object(o.k)(g.y+(a-t.y)+10)-y/2,"-webkit-transform":b,"-ms-transform":b,"-o-transform":b,"-moz-transform":b,transform:b})}},{key:"fillShape",value:function(e,t,n){if(e.save(),"solid"===n.type)e.fillStyle="rgb("+n.color+")",e.fill();else if("gradient"===n.type){var i=void 0;i="linear"===n.gradientType?s.a.createLinearGradient(e,t,n):s.a.createRadialGradient(e,t,n),e.fillStyle=i,e.fill()}e.restore()}}]),e}();t.a=u},function(e,t,n){"use strict";n.d(t,"b",function(){return y});var i=n(16),r=n(17),a=n(18),o=n(19),s=n(20),l=n(21),c=n(22),u=n(23),p=n(24),h=n(25),f=n(0),d={StartEvent:["StartEvent"],Task:["UserTask","ServiceTask"],CallActivity:["CallActivity"],Gateway:["ExclusiveGateway","InclusiveGateway","ParallelGateway","ComplexGateway"],EndEvent:["EndEvent","TerminateEndEvent"]},y=function(){f.a.on("group.get",function(e){return e?d[e]:d})};t.a={EndEvent:i.a,StartEvent:r.a,UserTask:a.a,ServiceTask:o.a,TerminateEndEvent:s.a,ExclusiveGateway:l.a,InclusiveGateway:c.a,ParallelGateway:u.a,ComplexGateway:p.a,CallActivity:h.a}},function(e,t,n){"use strict";function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1&&void 0!==arguments[1]?arguments[1]:{};r(this,t);var i=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.style=n,e.plane&&e.plane.bounds&&(e.plane.bounds.width=e.plane.bounds.width||40,e.plane.bounds.height=e.plane.bounds.height||40),e.data.name||(e.data.name=l.a.trigger("i18n","bpmn.EndEvent")),i.data=e.data,i.plane=e.plane,i.bpmnName="EndEvent",i.groupName="EndEvent",i.actions=i.getPath(),i}return o(t,e),c(t,[{key:"getPath",value:function(){var e=this.plane.bounds,t=e.height,n=e.width,r=[];return[{lineStyle:{lineStyle:"solid",lineWidth:this.lineStyle.lineWidth+2},actions:[{action:"move",x:0,y:t/2},{action:"curve",x1:0,y1:-t/6,x2:n,y2:-t/6,x:n,y:t/2},{action:"curve",x1:n,y1:t+t/6,x2:0,y2:t+t/6,x:0,y:t/2},{action:"close"}]}].concat(i(this.style.content||r),[{fillStyle:{type:"none"},lineStyle:{lineWidth:0},actions:[{action:"move",x:0,y:t/2},{action:"curve",x1:0,y1:-t/6,x2:n,y2:-t/6,x:n,y:t/2},{action:"curve",x1:n,y1:t+t/6,x2:0,y2:t+t/6,x:0,y:t/2},{action:"close"}]}])}},{key:"getTextBlock",value:function(){var e=this.plane.bounds,t=e.height;return{x:e.width/2-60,y:t,width:120,height:30}}}]),t}(s.a);t.a=u},function(e,t,n){"use strict";function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1&&void 0!==arguments[1]?arguments[1]:{};r(this,t);var i=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.style=n,e.plane&&e.plane.bounds&&(e.plane.bounds.width=e.plane.bounds.width||40,e.plane.bounds.height=e.plane.bounds.height||40),e.data.name||(e.data.name=l.a.trigger("i18n","bpmn.StartEvent")),i.data=e.data,i.plane=e.plane,i.bpmnName="StartEvent",i.groupName="StartEvent",i.actions=i.getPath(),i}return o(t,e),c(t,[{key:"getPath",value:function(){var e=this.plane.bounds,t=e.height,n=e.width,r=[];return[{lineStyle:{lineStyle:"solid"},actions:[{action:"move",x:0,y:t/2},{action:"curve",x1:0,y1:-t/6,x2:n,y2:-t/6,x:n,y:t/2},{action:"curve",x1:n,y1:t+t/6,x2:0,y2:t+t/6,x:0,y:t/2},{action:"close"}]}].concat(i(this.style.content||r),[{fillStyle:{type:"none"},lineStyle:{lineWidth:0},actions:[{action:"move",x:0,y:t/2},{action:"curve",x1:0,y1:-t/6,x2:n,y2:-t/6,x:n,y:t/2},{action:"curve",x1:n,y1:t+t/6,x2:0,y2:t+t/6,x:0,y:t/2},{action:"close"}]}])}},{key:"getTextBlock",value:function(){var e=this.plane.bounds,t=e.height;return{x:e.width/2-60,y:t,width:120,height:30}}}]),t}(s.a);t.a=u},function(e,t,n){"use strict";function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1&&void 0!==arguments[1]?arguments[1]:{};r(this,t);var i=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.style=n,e.plane&&e.plane.bounds&&(e.plane.bounds.width=e.plane.bounds.width||110,e.plane.bounds.height=e.plane.bounds.height||55),e.data.name||(e.data.name=l.a.trigger("i18n","bpmn.UserTask")),i.data=e.data,i.plane=e.plane,i.bpmnName="UserTask",i.groupName="Task",i.actions=i.getPath(),i}return o(t,e),c(t,[{key:"getPath",value:function(){var e=this.plane.bounds,t=e.height,n=e.width,r=[{action:"move",x:0,y:4},{action:"quadraticCurve",x1:0,y1:0,x:4,y:0},{action:"line",x:n-4,y:0},{action:"quadraticCurve",x1:n,y1:0,x:n,y:4},{action:"line",x:n,y:t-4},{action:"quadraticCurve",x1:n,y1:t,x:n-4,y:t},{action:"line",x:4,y:t},{action:"quadraticCurve",x1:0,y1:t,x:0,y:t-4},{action:"close"}],a=[{actions:[{action:"font",fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",fontSize:"18px",fontFamily:"bpmn",content:"",x:4,y:16}]}];return[{lineStyle:{lineStyle:"solid"},actions:r}].concat(i(this.style.content||a),[{fillStyle:{type:"none"},lineStyle:{lineWidth:0},actions:r}])}},{key:"getTextBlock",value:function(){var e=this.plane.bounds,t=e.height;return{x:10,y:0,width:e.width-20,height:t}}}]),t}(s.a);t.a=u},function(e,t,n){"use strict";function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1&&void 0!==arguments[1]?arguments[1]:{};r(this,t);var i=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.style=n,e.plane&&e.plane.bounds&&(e.plane.bounds.width=e.plane.bounds.width||110,e.plane.bounds.height=e.plane.bounds.height||55),e.data.name||(e.data.name=l.a.trigger("i18n","bpmn.ServiceTask")),i.data=e.data,i.plane=e.plane,i.bpmnName="ServiceTask",i.groupName="Task",i.actions=i.getPath(),i}return o(t,e),c(t,[{key:"getPath",value:function(){var e=this.plane.bounds,t=e.height,n=e.width,r=[{actions:[{action:"font",fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",fontSize:"18px",fontFamily:"bpmn",content:"",x:4,y:16}]}];return[{lineStyle:{lineStyle:"solid"},actions:[{action:"move",x:0,y:4},{action:"quadraticCurve",x1:0,y1:0,x:4,y:0},{action:"line",x:n-4,y:0},{action:"quadraticCurve",x1:n,y1:0,x:n,y:4},{action:"line",x:n,y:t-4},{action:"quadraticCurve",x1:n,y1:t,x:n-4,y:t},{action:"line",x:4,y:t},{action:"quadraticCurve",x1:0,y1:t,x:0,y:t-4},{action:"close"}]}].concat(i(this.style.content||r),[{fillStyle:{type:"none"},lineStyle:{lineWidth:0},actions:[{action:"move",x:0,y:4},{action:"quadraticCurve",x1:0,y1:0,x:4,y:0},{action:"line",x:n-4,y:0},{action:"quadraticCurve",x1:n,y1:0,x:n,y:4},{action:"line",x:n,y:t-4},{action:"quadraticCurve",x1:n,y1:t,x:n-4,y:t},{action:"line",x:4,y:t},{action:"quadraticCurve",x1:0,y1:t,x:0,y:t-4},{action:"close"}]}])}},{key:"getTextBlock",value:function(){var e=this.plane.bounds,t=e.height;return{x:10,y:0,width:e.width-20,height:t}}}]),t}(s.a);t.a=u},function(e,t,n){"use strict";function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1&&void 0!==arguments[1]?arguments[1]:{};r(this,t);var i=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.style=n,e.plane&&e.plane.bounds&&(e.plane.bounds.width=e.plane.bounds.width||40,e.plane.bounds.height=e.plane.bounds.height||40),e.data.name||(e.data.name=l.a.trigger("i18n","bpmn.TerminateEndEvent")),i.data=e.data,i.plane=e.plane,i.bpmnName="TerminateEndEvent",i.groupName="EndEvent",i.actions=i.getPath(),i}return o(t,e),c(t,[{key:"getPath",value:function(){var e=this.plane.bounds,t=e.height,n=e.width,r=this.lineStyle.lineWidth,a=[{fillStyle:{type:"solid",color:"50,50,50"},lineStyle:{lineWidth:0,lineStyle:"solid"},actions:[{action:"move",x:.5*n-.25*n,y:.5*t},{action:"curve",x1:.5*n-.25*n,y1:.5*t-2*t/3*.5,x2:.5*n+.25*n,y2:.5*t-2*t/3*.5,x:.5*n+.25*n,y:.5*t},{action:"curve",x1:.5*n+.25*n,y1:.5*t+2*t/3*.5,x2:.5*n-.25*n,y2:.5*t+2*t/3*.5,x:.5*n-.25*n,y:.5*t},{action:"close"}]}];return[{lineStyle:{lineWidth:r+2,lineStyle:"solid"},actions:[{action:"move",x:0,y:t/2},{action:"curve",x1:0,y1:-t/6,x2:n,y2:-t/6,x:n,y:t/2},{action:"curve",x1:n,y1:t+t/6,x2:0,y2:t+t/6,x:0,y:t/2},{action:"close"}]}].concat(i(this.style.content||a),[{fillStyle:{type:"none"},lineStyle:{lineWidth:0},actions:[{action:"move",x:0,y:t/2},{action:"curve",x1:0,y1:-t/6,x2:n,y2:-t/6,x:n,y:t/2},{action:"curve",x1:n,y1:t+t/6,x2:0,y2:t+t/6,x:0,y:t/2},{action:"close"}]}])}},{key:"getTextBlock",value:function(){var e=this.plane.bounds,t=e.height;return{x:e.width/2-60,y:t,width:120,height:30}}}]),t}(s.a);t.a=u},function(e,t,n){"use strict";function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1&&void 0!==arguments[1]?arguments[1]:{};r(this,t);var i=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.style=n,e.plane&&e.plane.bounds&&(e.plane.bounds.width=e.plane.bounds.width||50,e.plane.bounds.height=e.plane.bounds.height||50),e.data.name||(e.data.name=""),i.data=e.data,i.plane=e.plane,i.bpmnName="ExclusiveGateway",i.groupName="Gateway",i.actions=i.getPath(),i}return o(t,e),l(t,[{key:"getPath",value:function(){var e=this.plane.bounds,t=e.height,n=e.width,r=[{fillStyle:{type:"solid",color:"0, 0, 0"},lineStyle:{lineWidth:0,lineStyle:"solid"},actions:[{action:"move",x:.5*n+.5*n*.4-.02*n,y:.5*t-.5*t*.4-.02*t},{action:"line",x:.5*n-.5*n*.4-.02*n,y:.5*t+.5*t*.4-.02*t},{action:"line",x:.5*n-.5*n*.4+.02*n,y:.5*t+.5*t*.4+.02*t},{action:"line",x:.5*n+.5*n*.4+.02*n,y:.5*t-.5*t*.4+.02*t},{action:"line",x:.5*n+.5*n*.4-.02*n,y:.5*t-.5*t*.4-.02*t},{action:"close"}]},{fillStyle:{type:"solid",color:"0, 0, 0"},lineStyle:{lineWidth:0,lineStyle:"solid"},actions:[{action:"move",x:.5*n,y:.5*t},{action:"move",x:.5*n-.5*n*.4+.02*n,y:.5*t-.5*t*.4-.02*t},{action:"line",x:.5*n+.5*n*.4+.02*n,y:.5*t+.5*t*.4-.02*t},{action:"line",x:.5*n+.5*n*.4-.02*n,y:.5*t+.5*t*.4+.02*t},{action:"line",x:.5*n-.5*n*.4-.02*n,y:.5*t-.5*t*.4+.02*t},{action:"close"}]}];return[{lineStyle:{lineStyle:"solid"},actions:[{action:"move",x:0,y:.5*t},{action:"line",x:.5*n,y:0},{action:"line",x:n,y:.5*t},{action:"line",x:.5*n,y:t},{action:"line",x:0,y:.5*t},{action:"close"}]}].concat(i(this.style.content||r),[{fillStyle:{type:"none"},lineStyle:{lineWidth:0},actions:[{action:"move",x:0,y:.5*t},{action:"line",x:.5*n,y:0},{action:"line",x:n,y:.5*t},{action:"line",x:.5*n,y:t},{action:"line",x:0,y:.5*t},{action:"close"}]}])}},{key:"getTextBlock",value:function(){var e=this.plane.bounds,t=e.height;return{x:e.width/2-60,y:t,width:120,height:30}}}]),t}(s.a);t.a=c},function(e,t,n){"use strict";function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1&&void 0!==arguments[1]?arguments[1]:{};r(this,t);var i=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.style=n,e.plane&&e.plane.bounds&&(e.plane.bounds.width=e.plane.bounds.width||50,e.plane.bounds.height=e.plane.bounds.height||50),e.data.name||(e.data.name=""),i.data=e.data,i.plane=e.plane,i.bpmnName="InclusiveGateway",i.groupName="Gateway",i.actions=i.getPath(),i}return o(t,e),l(t,[{key:"getPath",value:function(){var e=this.plane.bounds,t=e.height,n=e.width,r=[{lineStyle:{lineStyle:"solid",lineColor:"0, 0, 0"},actions:[{action:"move",x:.5*n-.25*n,y:.5*t},{action:"curve",x1:.5*n-.25*n,y1:.5*t-2*t/3*.5,x2:.5*n+.25*n,y2:.5*t-2*t/3*.5,x:.5*n+.25*n,y:.5*t},{action:"curve",x1:.5*n+.25*n,y1:.5*t+2*t/3*.5,x2:.5*n-.25*n,y2:.5*t+2*t/3*.5,x:.5*n-.25*n,y:.5*t},{action:"close"}]}];return[{lineStyle:{lineStyle:"solid"},actions:[{action:"move",x:0,y:.5*t},{action:"line",x:.5*n,y:0},{action:"line",x:n,y:.5*t},{action:"line",x:.5*n,y:t},{action:"line",x:0,y:.5*t},{action:"close"}]}].concat(i(this.style.content||r),[{fillStyle:{type:"none"},lineStyle:{lineWidth:0},actions:[{action:"move",x:0,y:.5*t},{action:"line",x:.5*n,y:0},{action:"line",x:n,y:.5*t},{action:"line",x:.5*n,y:t},{action:"line",x:0,y:.5*t},{action:"close"}]}])}},{key:"getTextBlock",value:function(){var e=this.plane.bounds,t=e.height;return{x:e.width/2-60,y:t,width:120,height:30}}}]),t}(s.a);t.a=c},function(e,t,n){"use strict";function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1&&void 0!==arguments[1]?arguments[1]:{};r(this,t);var i=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.style=n,e.plane&&e.plane.bounds&&(e.plane.bounds.width=e.plane.bounds.width||50,e.plane.bounds.height=e.plane.bounds.height||50),e.data.name||(e.data.name=""),i.data=e.data,i.plane=e.plane,i.bpmnName="ParallelGateway",i.groupName="Gateway",i.actions=i.getPath(),i}return o(t,e),l(t,[{key:"getPath",value:function(){var e=this.plane.bounds,t=e.height,n=e.width,r=[{fillStyle:{type:"solid",color:"0, 0, 0"},lineStyle:{lineWidth:0,lineStyle:"solid"},actions:[{action:"move",x:.5*n-.04*Math.min(n,t),y:.5*t-.5*t*.5},{action:"line",x:.5*n-.04*Math.min(n,t),y:.5*t+.5*t*.5},{action:"line",x:.5*n+.04*Math.min(n,t),y:.5*t+.5*t*.5},{action:"line",x:.5*n+.04*Math.min(n,t),y:.5*t-.5*t*.5},{action:"line",x:.5*n-.04*Math.min(n,t),y:.5*t-.5*t*.5},{action:"close"},{action:"move",x:.5*n-.5*n*.5,y:.5*t-.04*Math.min(n,t)},{action:"line",x:.5*n-.5*n*.5,y:.5*t+.04*Math.min(n,t)},{action:"line",x:.5*n+.5*n*.5,y:.5*t+.04*Math.min(n,t)},{action:"line",x:.5*n+.5*n*.5,y:.5*t-.04*Math.min(n,t)},{action:"line",x:.5*n-.5*n*.5,y:.5*t-.04*Math.min(n,t)},{action:"close"}]}];return[{lineStyle:{lineStyle:"solid"},actions:[{action:"move",x:0,y:.5*t},{action:"line",x:.5*n,y:0},{action:"line",x:n,y:.5*t},{action:"line",x:.5*n,y:t},{action:"line",x:0,y:.5*t},{action:"close"}]}].concat(i(this.style.content||r),[{fillStyle:{type:"none"},lineStyle:{lineWidth:0},actions:[{action:"move",x:0,y:.5*t},{action:"line",x:.5*n,y:0},{action:"line",x:n,y:.5*t},{action:"line",x:.5*n,y:t},{action:"line",x:0,y:.5*t},{action:"close"}]}])}},{key:"getTextBlock",value:function(){var e=this.plane.bounds,t=e.height;return{x:e.width/2-60,y:t,width:120,height:30}}}]),t}(s.a);t.a=c},function(e,t,n){"use strict";function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1&&void 0!==arguments[1]?arguments[1]:{};r(this,t);var i=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.style=n,e.plane&&e.plane.bounds&&(e.plane.bounds.width=e.plane.bounds.width||50,e.plane.bounds.height=e.plane.bounds.height||50),e.data.name||(e.data.name=""),i.data=e.data,i.plane=e.plane,i.bpmnName="ComplexGateway",i.groupName="Gateway",i.actions=i.getPath(),i}return o(t,e),l(t,[{key:"getPath",value:function(){var e=this.plane.bounds,t=e.height,n=e.width,r=[{fillStyle:{type:"solid",color:"0, 0, 0"},lineStyle:{lineWidth:0,lineStyle:"solid"},actions:[{action:"move",x:.5*n-.5*Math.min(n,t)*.3+.02*Math.min(n,t),y:.5*t-.5*Math.min(n,t)*.3-.02*Math.min(n,t)},{action:"line",x:.5*n+.5*Math.min(n,t)*.3+.02*Math.min(n,t),y:.5*t+.5*Math.min(n,t)*.3-.03*Math.min(n,t)},{action:"line",x:.5*n+.5*Math.min(n,t)*.3-.02*Math.min(n,t),y:.5*t+.5*Math.min(n,t)*.3+.02*Math.min(n,t)},{action:"line",x:.5*n-.5*Math.min(n,t)*.3-.02*Math.min(n,t),y:.5*t-.5*Math.min(n,t)*.3+.02*Math.min(n,t)},{action:"close"}]},{fillStyle:{type:"solid",color:"0, 0, 0"},lineStyle:{lineWidth:0,lineStyle:"solid"},actions:[{action:"move",x:.5*n+.5*Math.min(n,t)*.3-.02*Math.min(n,t),y:.5*t-.5*Math.min(n,t)*.3-.02*Math.min(n,t)},{action:"line",x:.5*n-.5*Math.min(n,t)*.3-.02*Math.min(n,t),y:.5*t+.5*Math.min(n,t)*.3-.02*Math.min(n,t)},{action:"line",x:.5*n-.5*Math.min(n,t)*.3+.02*Math.min(n,t),y:.5*t+.5*Math.min(n,t)*.3+.02*Math.min(n,t)},{action:"line",x:.5*n+.5*Math.min(n,t)*.3+.02*Math.min(n,t),y:.5*t-.5*Math.min(n,t)*.3+.02*Math.min(n,t)},{action:"line",x:.5*n+.5*Math.min(n,t)*.3-.02*Math.min(n,t),y:.5*t-.5*Math.min(n,t)*.3-.02*Math.min(n,t)},{action:"close"}]},{fillStyle:{type:"solid",color:"0, 0, 0"},lineStyle:{lineWidth:0,lineStyle:"solid"},actions:[{action:"move",x:.5*n-.027*Math.min(n,t),y:.5*t-.5*Math.min(n,t)*.4},{action:"line",x:.5*n-.027*Math.min(n,t),y:.5*t+.5*Math.min(n,t)*.4},{action:"line",x:.5*n+.027*Math.min(n,t),y:.5*t+.5*Math.min(n,t)*.4},{action:"line",x:.5*n+.027*Math.min(n,t),y:.5*t-.5*Math.min(n,t)*.4},{action:"line",x:.5*n-.027*Math.min(n,t),y:.5*t-.5*Math.min(n,t)*.4},{action:"close"}]},{fillStyle:{type:"solid",color:"0, 0, 0"},lineStyle:{lineWidth:0,lineStyle:"solid"},actions:[{action:"move",x:.5*n-.5*Math.min(n,t)*.4,y:.5*t-.027*Math.min(n,t)},{action:"line",x:.5*n-.5*Math.min(n,t)*.4,y:.5*t+.027*Math.min(n,t)},{action:"line",x:.5*n+.5*Math.min(n,t)*.4,y:.5*t+.027*Math.min(n,t)},{action:"line",x:.5*n+.5*Math.min(n,t)*.4,y:.5*t-.027*Math.min(n,t)},{action:"line",x:.5*n-.5*Math.min(n,t)*.4,y:.5*t-.027*Math.min(n,t)},{action:"close"}]}];return[{lineStyle:{lineStyle:"solid"},actions:[{action:"move",x:0,y:.5*t},{action:"line",x:.5*n,y:0},{action:"line",x:n,y:.5*t},{action:"line",x:.5*n,y:t},{action:"line",x:0,y:.5*t},{action:"close"}]}].concat(i(this.style.content||r),[{fillStyle:{type:"none"},lineStyle:{lineWidth:0},actions:[{action:"move",x:0,y:.5*t},{action:"line",x:.5*n,y:0},{action:"line",x:n,y:.5*t},{action:"line",x:.5*n,y:t},{action:"line",x:0,y:.5*t},{action:"close"}]}])}},{key:"getTextBlock",value:function(){var e=this.plane.bounds,t=e.height;return{x:e.width/2-60,y:t,width:120,height:30}}}]),t}(s.a);t.a=c},function(e,t,n){"use strict";function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1&&void 0!==arguments[1]?arguments[1]:{};r(this,t);var i=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.style=n,e.plane&&e.plane.bounds&&(e.plane.bounds.width=e.plane.bounds.width||110,e.plane.bounds.height=e.plane.bounds.height||55),e.data.name||(e.data.name=l.a.trigger("i18n","bpmn.CallActivity")),i.data=e.data,i.plane=e.plane,i.bpmnName="CallActivity",i.groupName="CallActivity",i.actions=i.getPath(),i}return o(t,e),c(t,[{key:"getPath",value:function(){var e=this.plane.bounds,t=e.height,n=e.width,r=this.lineStyle.lineWidth,a=[];return[{lineStyle:{lineWidth:r+2,lineStyle:"solid"},actions:[{action:"move",x:0,y:4},{action:"quadraticCurve",x1:0,y1:0,x:4,y:0},{action:"line",x:n-4,y:0},{action:"quadraticCurve",x1:n,y1:0,x:n,y:4},{action:"line",x:n,y:t-4},{action:"quadraticCurve",x1:n,y1:t,x:n-4,y:t},{action:"line",x:4,y:t},{action:"quadraticCurve",x1:0,y1:t,x:0,y:t-4},{action:"close"}]}].concat(i(this.style.content||a),[{fillStyle:{type:"none"},lineStyle:{lineWidth:0},actions:[{action:"move",x:0,y:4},{action:"quadraticCurve",x1:0,y1:0,x:4,y:0},{action:"line",x:n-4,y:0},{action:"quadraticCurve",x1:n,y1:0,x:n,y:4},{action:"line",x:n,y:t-4},{action:"quadraticCurve",x1:n,y1:t,x:n-4,y:t},{action:"line",x:4,y:t},{action:"quadraticCurve",x1:0,y1:t,x:0,y:t-4},{action:"close"}]}])}},{key:"getTextBlock",value:function(){var e=this.plane.bounds,t=e.height;return{x:10,y:0,width:e.width-20,height:t}}}]),t}(s.a);t.a=u},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=n(0),a=n(3),o=n(27),s=n(1),l=(n(7),n(2)),c=function(){function e(e,t){for(var n=0;n2&&n.points.length<=0&&(n.points=p.filter(function(e,t){return 0!==t&&t!==p.length-1})),t&&(n.points=a.a.getConnectionPoints(n,y)),"curve"!==n.linkerType&&"broken"!==n.linkerType||n.points&&0!==n.points.length||(n.points=a.a.getConnectionPoints(n,y)),null==h.angle&&(h.angle=a.a.getAngle(p[1],p[0])),null==f.angle&&(f.angle=a.a.getAngle(p[p.length-2],p[p.length-1]));var m=f.x,g=f.y,v=h.x,x=h.y;f.x>=h.x&&(m=h.x,v=f.x),f.y>=h.y&&(g=h.y,x=f.y),n.points.forEach(function(e,t){e.xv&&(v=e.x),e.yx&&(x=e.y)});var b={x:m,y:g,width:v-m,height:x-g},w=this.$container.find('.shape-box[data-id="'+i.id+'"]');0===w.length&&(w=Object(l.a)("
").appendTo(this.$container.find(".bpd-designer")));var E=w.find(".shape-canvas"),S=Object(s.k)(b.width+20),k=Object(s.k)(b.height+20);E.attr({width:S,height:k}),w.css({left:Object(s.k)(b.x-10)+"px",top:Object(s.k)(b.y-10)+"px",width:S,height:k});var C=E[0].getContext("2d"),A=this.options.bpmnStyle[n.bpmnName]||{},O=Object.assign({},n.lineStyle,A.lineStyle);C.scale(this.options.scale,this.options.scale),C.translate(10,10),C.lineWidth=O.lineWidth,C.strokeStyle="rgb("+O.lineColor+")",C.fillStyle="rgb("+O.lineColor+")",C.save(),"dashed"===O.lineStyle?a.a.setLineDash(C,[8*O.lineWidth,4*O.lineWidth]):"dot"===O.lineStyle?a.a.setLineDash(C,[O.lineWidth,2*O.lineWidth]):"dashdot"===O.lineStyle&&a.a.setLineDash(C,[8*O.lineWidth,3*O.lineWidth,O.lineWidth,3*O.lineWidth]);var R={x:h.x-b.x,y:h.y-b.y},P={x:f.x-b.x,y:f.y-b.y};if(C.beginPath(),C.moveTo(R.x,R.y),"curve"===n.linkerType){var T=n.points[0],j=n.points[1];C.bezierCurveTo(T.x-b.x,T.y-b.y,j.x-b.x,j.y-b.y,P.x,P.y)}else n.points.forEach(function(e,t){C.lineTo(e.x-b.x,e.y-b.y)}),C.lineTo(P.x,P.y);d.indexOf(i.id)>=0&&(C.shadowBlur=4,C.shadowColor="#ec5343"),C.stroke(),C.restore();var M=a.a.getEndpointAngle(n,"sourceRef");this.renderArrow(R,M,c,O.beginArrowStyle,n,h.angle,C);var N=a.a.getEndpointAngle(n,"targetRef");this.renderArrow(P,N,u,O.endArrowStyle,n,f.angle,C),C.restore(),this.renderConnectionText(n)}},{key:"renderArrow",value:function(e,t,n,i,a,o,s){if("solidArrow"===i){var l=Math.PI/10,c=12/Math.cos(l),u={x:e.x-c*Math.cos(t-l),y:e.y-c*Math.sin(t-l)},p={x:e.x-c*Math.sin(Math.PI/2-t-l),y:e.y-c*Math.cos(Math.PI/2-t-l)};s.beginPath(),s.moveTo(e.x,e.y),s.lineTo(u.x,u.y),s.lineTo(p.x,p.y),s.lineTo(e.x,e.y),s.closePath(),s.fill(),s.stroke()}if(n&&"solidCircle"!==i&&"dashedCircle"!==i){var h=r.a.trigger("element.get",n);if(h){s.save(),s.translate(e.x,e.y),s.rotate(o),s.translate(-e.x,-e.y);for(var f=e.x-h.shape.lineStyle.lineWidth/2,d=e.y-1.2*a.lineStyle.lineWidth,y=2*a.lineStyle.lineWidth,m=1.8*a.lineStyle.lineWidth,g=f;g<=f+y;){for(var v=d;v<=d+m;)s.clearRect(g,v,1.5,1.5),v+=1;g+=1}s.restore()}}}},{key:"renderConnectionText",value:function(e){var t=this.$container.find('.shape-box[data-id="'+e.data.id+'"]'),n=t.find(".text-box[data-shape="+e.data.id+"]");0===n.length&&(n=Object(l.a)("
").appendTo(t));var i=e.fontStyle,r="scale("+this.options.scale+")",o={"line-height":Math.round(1.25*i.size)+"px","font-size":i.size+"px","font-family":i.fontFamily,"font-weight":i.bold?"bold":"normal","font-style":i.italic?"italic":"normal","text-align":i.textAlign,color:"rgb("+i.color+")","text-decoration":i.underline?"underline":"none","-webkit-transform":r,"-ms-transform":r,"-o-transform":r,"-moz-transform":r,transform:r};if(n.css(o),null==e.data.name||""===e.data.name.trim())return void n.hide();n.show();var c=e.data.name;c.length>12&&(c=c.substr(0,12)+"..."),n.html(c),n.attr("title",e.data.name);var u=a.a.getConnectionMidpoint(e),p=t.position();n.css({left:Object(s.k)(u.x)-p.left-n.width()/2,top:Object(s.k)(u.y)-p.top-n.height()/2})}},{key:"move",value:function(e,t,n,i){var o=e.data,l=e.plane,c=(e.shape,l.waypoint[0]),u=l.waypoint[l.waypoint.length-1],p=a.a.getShapeByPosition(n,i,this.$container,!0),h=null,f=null;if(r.a.trigger("anchor.point.hide"),null!=p){var d=p.element;if(f=d.data.id,"bounds"===p.type)h=p.anchor,r.a.trigger("anchor.point.show",Object(s.k)(h));else if("shape"===p.type){var y=void 0,m=void 0;if("source"===t?(y={x:u.x,y:u.y},m=o.targetRef):(y={x:c.x,y:c.y},m=o.sourceRef),d.data.id===m)r.a.trigger("anchor.point.hide"),h={x:Object(s.i)(n),y:Object(s.i)(i),angle:null},f=null;else{for(var g=d.shape.getAnchors(),v=d.plane.bounds,x={x:v.x+v.width/2,y:v.y+v.height/2},b=-1,w=void 0,E=0;E=u.x-6&&h.x<=u.x+6&&(c.x=u.x),h.y>=u.y-6&&h.y<=u.y+6&&(c.y=u.y))):(o.targetRef=f,u.x=h.x,u.y=h.y,u.angle=h.angle,null==f&&(h.x>=c.x-6&&h.x<=c.x+6&&(u.x=c.x),h.y>=c.y-6&&h.y<=c.y+6&&(u.y=c.y))),this.renderConnection(e,!0)}}]),e}();t.a=u},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=n(6),s=function(e){function t(e){i(this,t);var n=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.data=e.data,n.plane=e.plane,n.bpmnName="SequenceFlow",n.groupName="SequenceFlow",n.linkerType="broken",n.points=[],n.lineStyle={lineWidth:2,lineColor:"50,50,50",lineStyle:"solid",beginArrowStyle:"none",endArrowStyle:"solidArrow"},n}return a(t,e),t}(o.a);t.a=s},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:128,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:16;if(e<=0)return"0";for(var n=Math.log(Math.pow(2,e))/Math.log(t),i=2;n===1/0;i*=2)n=Math.log(Math.pow(2,e/i))/Math.log(t)*i;for(var r=n-Math.floor(n),a="",o=0;o=Math.pow(2,e)?this.createId(e,t):a}},{key:"rack",value:function(e,t,n){var i=function(i){var a=0,o=void 0;do{if(a++>10){if(!n)throw new Error("too many ID collisions, use more bits");e+=n}o=this.createId(e,t)}while(Object.hasOwnProperty.call(r,o));return r[o]=i,o},r=i.hats={};return i.get=function(e){return i.hats[e]},i.set=function(e,t){return i.hats[e]=t,i},i.bits=e||128,i.base=t||16,i}},{key:"next",value:function(e){return this._seed(e||!0)}},{key:"nextPrefixed",value:function(e,t){var n=void 0;do{n=e+this.next(!0)}while(this.assigned(n));return this.claim(n,t),n}},{key:"claim",value:function(e,t){this._seed.set(e,t||!0)}},{key:"assigned",value:function(e){return this._seed.get(e)||!1}},{key:"unclaim",value:function(e){delete this._seed.hats[e]}},{key:"clear",value:function(){var e=this._seed.hats;for(var t in e)this.unclaim(t)}}]),e}();t.a=a},function(e,t,n){"use strict";var i=n(30),r=n(42),a=n.n(r),o=n(43),s=n.n(o),l=n(44),c=n.n(l),u=n(45),p=n.n(u),h={bpmn:a.a,bpmndi:s.a,dc:c.a,di:p.a};t.a=function(e,t){var n=Object.assign({},h,e);return new i.a(n,t)}},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=n(8),s=n(0),l=n(36),c=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:function(){})(this.create(e.descriptor,e.attrs))}},{key:"fromXML",value:function(e,t,n,i){"string"==typeof t&&t.constructor===String||(i=n,n=t,t="bpmn:Definitions"),"function"==typeof n&&n.constructor===Function&&(i=n,n={});var r=new l.a(Object.assign({model:this,lax:!0},n)),a=r.handler(t);r.fromXML(e,a,i)}},{key:"toXML",value:function(e,t,n){"function"==typeof t&&t.constructor===Function&&(n=t,t={});var i,r,a=new l.b(t);try{i=a.toXML(e)}catch(e){r=e}return n(r,i)}},{key:"test",value:function(e){console.log("test",e,this.a)}}]),t}(o.a);t.a=u},function(e,t,n){"use strict";function i(e,t){this.model=e,this.properties=t}t.a=i;var r=n(32);i.prototype.createType=function(e){function t(e){i.define(this,"$type",{value:o,enumerable:!0}),i.define(this,"$attrs",{value:{}}),i.define(this,"$parent",{writable:!0});for(var t in e)this.set(t,e[t])}var n=this.model,i=this.properties,a=Object.create(r.a.prototype);e.properties.forEach(function(e){e.isMany||void 0===e.default||(a[e.name]=e.default)}),i.defineModel(a,n),i.defineDescriptor(a,e);var o=e.ns.name;return t.prototype=a,t.hasType=a.$instanceOf=this.model.hasType,i.defineModel(t,n),i.defineDescriptor(t,e),t}},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=function(){function e(e,t){for(var n=0;n already defined")}t.a=i;var a=n(34),o=n(5);i.prototype.getPackage=function(e){return this.packageMap[e]},i.prototype.getPackages=function(){return this.packages},i.prototype.registerPackage=function(e){var t=this;e=Object.assign({},e);var n=this.packageMap;r(n,e,"prefix"),r(n,e,"uri"),e.types.forEach(function(n){t.registerType(n,e)}),n[e.uri]=n[e.prefix]=e,this.packages.push(e)},i.prototype.registerType=function(e,t){var n=this;e=Object.assign({},e,{superClass:(e.superClass||[]).slice(),extends:(e.extends||[]).slice(),properties:(e.properties||[]).slice(),meta:Object.assign(e.meta||{})});var i=Object(o.g)(e.name,t.prefix),r=i.name,a={};e.properties.forEach(function(e){var t=Object(o.g)(e.name,i.prefix),n=t.name;Object(o.e)(e.type)||(e.type=Object(o.g)(e.type,t.prefix).name),Object.assign(e,{ns:t,name:n}),a[n]=e}),Object.assign(e,{ns:i,name:r,propertiesByName:a}),e.extends.forEach(function(e){var t=n.typeMap[e];t.traits=t.traits||[],t.traits.push(r)}),this.definePackage(e,t),this.typeMap[r]=e},i.prototype.mapTypes=function(e,t,n){function i(e){return r(e,!0)}function r(n,i){var r=Object(o.g)(n,Object(o.e)(n)?"":e.prefix);s.mapTypes(r,t,i)}var a=Object(o.e)(e.name)?{name:e.name}:this.typeMap[e.name],s=this;if(!a)throw new Error("unknown type <"+e.name+">");a.superClass&&a.superClass.forEach(function(e){n?i(e):r(e)}),t(a,!n),a.traits&&a.traits.length>0&&a.traits.forEach(function(e){i(e)})},i.prototype.getEffectiveDescriptor=function(e){var t=Object(o.g)(e),n=new a.a(t);this.mapTypes(t,function(e,t){n.addTrait(e,t)});var i=n.build();return this.definePackage(i,i.allTypes[i.allTypes.length-1].$pkg),i},i.prototype.definePackage=function(e,t){this.properties.define(e,"$pkg",{value:t})}},function(e,t,n){"use strict";function i(e,t){var n={},i=Object(e);return t.forEach(function(t){t in i&&(n[t]=e[t])}),n}function r(e){this.ns=e,this.name=e.name,this.allTypes=[],this.allTypesByName={},this.properties=[],this.propertiesByName={}}t.a=r;var a=n(5);r.prototype.build=function(){return i(this,["ns","name","allTypes","allTypesByName","properties","propertiesByName","bodyProperty","idProperty"])},r.prototype.addProperty=function(e,t,n){"boolean"==typeof t&&(n=t,t=void 0),this.addNamedProperty(e,!1!==n);var i=this.properties;void 0!==t?i.splice(t,0,e):i.push(e)},r.prototype.replaceProperty=function(e,t,n){var i=e.ns,r=this.properties,a=this.propertiesByName,o=e.name!==t.name;if(e.isId){if(!t.isId)throw new Error("property <"+t.ns.name+"> must be id property to refine <"+e.ns.name+">");this.setIdProperty(t,!1)}if(e.isBody){if(!t.isBody)throw new Error("property <"+t.ns.name+"> must be body property to refine <"+e.ns.name+">");this.setBodyProperty(t,!1)}var s=r.indexOf(e);if(-1===s)throw new Error("property <"+i.name+"> not found in property list");r.splice(s,1),this.addProperty(t,n?void 0:s,o),a[i.name]=a[i.localName]=t},r.prototype.redefineProperty=function(e,t,n){var i=e.ns.prefix,r=t.split("#"),o=Object(a.g)(r[0],i),s=Object(a.g)(r[1],o.prefix).name,l=this.propertiesByName[s];if(!l)throw new Error("refined property <"+s+"> not found");this.replaceProperty(l,e,n),delete e.redefines},r.prototype.addNamedProperty=function(e,t){var n=e.ns,i=this.propertiesByName;t&&(this.assertNotDefined(e,n.name),this.assertNotDefined(e,n.localName)),i[n.name]=i[n.localName]=e},r.prototype.removeNamedProperty=function(e){var t=e.ns,n=this.propertiesByName;delete n[t.name],delete n[t.localName]},r.prototype.setBodyProperty=function(e,t){if(t&&this.bodyProperty)throw new Error("body property defined multiple times (<"+this.bodyProperty.ns.name+">, <"+e.ns.name+">)");this.bodyProperty=e},r.prototype.setIdProperty=function(e,t){if(t&&this.idProperty)throw new Error("id property defined multiple times (<"+this.idProperty.ns.name+">, <"+e.ns.name+">)");this.idProperty=e},r.prototype.assertNotDefined=function(e,t){var n=e.name,i=this.propertiesByName[n];if(i)throw new Error("property <"+n+"> already defined; override of <"+i.definedBy.ns.name+"#"+i.ns.name+"> by <"+e.definedBy.ns.name+"#"+e.ns.name+"> not allowed without redefines")},r.prototype.hasProperty=function(e){return this.propertiesByName[e]},r.prototype.addTrait=function(e,t){var n=this,i=this.allTypesByName,r=this.allTypes,a=e.name;a in i||(e.properties&&e.properties.forEach(function(i){i=Object.assign({},i,{name:i.ns.localName,inherited:t}),Object.defineProperty(i,"definedBy",{value:e});var r=i.replaces,a=i.redefines;r||a?n.redefineProperty(i,r||a,r):(i.isBody&&n.setBodyProperty(i),i.isId&&n.setIdProperty(i),n.addProperty(i))}),r.push(e),i[a]=e)}},function(e,t,n){"use strict";function i(e){this.model=e}function r(e){return void 0===e}function a(e,t,n){Object.defineProperty(e,t.name,{enumerable:!t.isReference,writable:!0,value:n,configurable:!0})}t.a=i,i.prototype.set=function(e,t,n){var i=this.model.getPropertyDescriptor(e,t),o=i&&i.name;r(n)?i?delete e[o]:delete e.$attrs[t]:i?o in e?e[o]=n:a(e,i,n):e.$attrs[t]=n},i.prototype.get=function(e,t){var n=this.model.getPropertyDescriptor(e,t);if(!n)return e.$attrs[t];var i=n.name;return!e[i]&&n.isMany&&a(e,n,[]),e[i]},i.prototype.define=function(e,t,n){Object.defineProperty(e,t,n)},i.prototype.defineDescriptor=function(e,t){this.define(e,"$descriptor",{value:t})},i.prototype.defineModel=function(e,t){this.define(e,"$model",{value:t})}},function(e,t,n){"use strict";var i=n(37);n.d(t,"a",function(){return i.a});var r=n(41);n.d(t,"b",function(){return r.a})},function(e,t,n){"use strict";function i(e,t){t="function"==typeof t&&t.constructor===Function?t:function(e){return e===t};var n;return e.forEach(function(e,i){if(t(e,i))return n=e,!1}),n}function r(e){return e.charAt(0).toUpperCase()+e.slice(1)}function a(e,t){return Object(A.d)(t)?e.prefix+":"+r(e.localName):e.name}function o(e,t){var n=e.name,i=e.localName,r=t.xml&&t.xml.typePrefix;return r&&0===i.indexOf(r)?e.prefix+":"+i.slice(r.length):n}function s(e,t){var n=Object(A.g)(e);return o(n,t.getPackage(n.prefix))}function l(e){return new Error(e)}function c(e){return e.$descriptor}function u(e){setTimeout(e,0)}function p(e){Object.assign(this,e),this.elementsById={},this.references=[],this.warnings=[],this.addReference=function(e){this.references.push(e)},this.addElement=function(e){if(!e)throw l("expected element");var t,n=this.elementsById,i=c(e),r=i.idProperty;if(r&&(t=e.get(r.name))){if(n[t])throw l("duplicate ID <"+t+">");n[t]=e}},this.addWarning=function(e){this.warnings.push(e)}}function h(){}function f(){}function d(){}function y(e,t){this.property=e,this.context=t}function m(e,t){this.element=t,this.propertyDesc=e}function g(){}function v(e,t,n){this.model=e,this.type=e.getType(t),this.context=n}function x(e,t,n){v.call(this,e,t,n)}function b(e,t,n){this.model=e,this.context=n}function w(e){e instanceof C.a&&(e={model:e}),Object.assign(this,{lax:!1},e)}t.a=w;var E=n(38),S=n.n(E),k=n(40),C=n(8),A=n(5),O=k.a.Parser;h.prototype.handleEnd=function(){},h.prototype.handleText=function(){},h.prototype.handleNode=function(){},f.prototype=Object.create(h.prototype),f.prototype.handleNode=function(){return this},d.prototype=Object.create(h.prototype),d.prototype.handleText=function(e){this.body=(this.body||"")+e},y.prototype=Object.create(d.prototype),y.prototype.handleNode=function(e){if(this.element)throw l("expected no sub nodes");return this.element=this.createReference(e),this},y.prototype.handleEnd=function(){this.element.id=this.body},y.prototype.createReference=function(e){return{property:this.property.ns.name,id:""}},m.prototype=Object.create(d.prototype),m.prototype.handleEnd=function(){var e=this.body||"",t=this.element,n=this.propertyDesc;e=Object(A.c)(n.type,e),n.isMany?t.get(n.name).push(e):t.set(n.name,e)},g.prototype=Object.create(d.prototype),g.prototype.handleNode=function(e){var t=this,n=this.element;return n?t=this.handleChild(e):(n=this.element=this.createElement(e),this.context.addElement(n)),t},v.prototype=Object.create(g.prototype),v.prototype.addReference=function(e){this.context.addReference(e)},v.prototype.handleText=function(e){if(!c(this.element).bodyProperty)throw l("unexpected body text <"+e+">");d.prototype.handleText.call(this,e)},v.prototype.handleEnd=function(){var e=this.body,t=this.element,n=c(t),i=n.bodyProperty;i&&void 0!==e&&(e=Object(A.c)(i.type,e),t.set(i.name,e))},v.prototype.createElement=function(e){var t,n=e.attributes,i=this.type,r=c(i),a=this.context,o=new i({}),s=this.model;return Object.keys(n).forEach(function(e){var i,l=n[e],c=r.propertiesByName[e];c&&c.isReference?c.isMany?(i=l.split(" "),i.forEach(function(e){a.addReference({element:o,property:c.ns.name,id:e})})):a.addReference({element:o,property:c.ns.name,id:l}):(c?l=Object(A.c)(c.type,l):"xmlns"!==e&&(t=Object(A.g)(e,r.ns.prefix),s.getPackage(t.prefix)&&a.addWarning({message:"unknown attribute <"+e+">",element:o,property:e,value:l})),o.set(e,l))}),o},v.prototype.getPropertyForNode=function(e){var t,n,r=e.name,o=Object(A.g)(r),u=this.type,p=this.model,h=c(u),f=o.name,d=h.propertiesByName[f];if(d)return Object(A.i)(d)&&(t=e.attributes[A.b])?(t=s(t,p),n=p.getType(t),Object.assign({},d,{effectiveType:c(n).name})):d;var y=p.getPackage(o.prefix);if(y){if(t=a(o,y),n=p.getType(t),d=i(h.properties,function(e){return!e.isVirtual&&!e.isReference&&!e.isAttribute&&n.hasType(e.type)}))return Object.assign({},d,{effectiveType:c(n).name})}else if(d=i(h.properties,function(e){return!e.isReference&&!e.isAttribute&&"Element"===e.type}))return d;throw l("unrecognized element <"+o.name+">")},v.prototype.toString=function(){return"ElementDescriptor["+c(this.type).name+"]"},v.prototype.valueHandler=function(e,t){return new m(e,t)},v.prototype.referenceHandler=function(e){return new y(e,this.context)},v.prototype.handler=function(e){return"Element"===e?new b(this.model,e,this.context):new v(this.model,e,this.context)},v.prototype.handleChild=function(e){var t,n,i,r;if(t=this.getPropertyForNode(e),i=this.element,n=t.effectiveType||t.type,Object(A.f)(n))return this.valueHandler(t,i);r=t.isReference?this.referenceHandler(t).handleNode(e):this.handler(n).handleNode(e);var a=r.element;return void 0!==a&&(t.isMany?i.get(t.name).push(a):i.set(t.name,a),t.isReference?(Object.assign(a,{element:i}),this.context.addReference(a)):a.$parent=i),r},x.prototype=Object.create(v.prototype),x.prototype.createElement=function(e){var t=e.name,n=Object(A.g)(t),i=this.model,r=this.type,o=i.getPackage(n.prefix),s=o&&a(n,o)||t;if(!r.hasType(s))throw l("unexpected element <"+e.originalName+">");return v.prototype.createElement.call(this,e)},b.prototype=Object.create(g.prototype),b.prototype.createElement=function(e){var t=e.name,n=Object(A.g)(t),i=n.prefix,r=e.ns[i+"$uri"],a=e.attributes;return this.model.createAny(t,r,a)},b.prototype.handleChild=function(e){var t,n=new b(this.model,"Element",this.context).handleNode(e),i=this.element,r=n.element;return void 0!==r&&(t=i.$children=i.$children||[],t.push(r),r.$parent=i),n},b.prototype.handleEnd=function(){this.body&&(this.element.$body=this.body)},w.prototype.fromXML=function(e,t,n){function i(e,t,n){var i=t(),r=i.line,a=i.column,o=i.data;"<"===o.charAt(0)&&-1!==o.indexOf(" ")&&(o=o.slice(0,o.indexOf(" "))+">");var s="unparsable content "+(o?o+" ":"")+"detected\n\tline: "+r+"\n\tcolumn: "+a+"\n\tnested error: "+e.message;if(n)return b.addWarning({message:s,error:e}),console.warn("could not parse node"),console.warn(e),!0;throw console.error("could not parse document"),console.error(e),l(s)}function r(e,t){return i(e,t,!0)}function a(){var e,t,n=b.elementsById,i=b.references;for(e=0;t=i[e];e++){var r=t.element,a=n[t.id],o=c(r).propertiesByName[t.property];if(a||b.addWarning({message:"unresolved reference <"+t.id+">",element:t.element,property:t.property,value:t.id}),o.isMany){var s=r.get(o.name),l=s.indexOf(t);-1===l&&(l=s.length),a?s[l]=a:s.splice(l,1)}else r.set(o.name,a)}}function o(){E.pop().handleEnd()}function s(e){if(k.test(e)){var t=C.exec(e),n=t&&t[1];n&&!A.test(n)&&b.addWarning({message:"unsupported document encoding <"+n+">, falling back to UTF-8"})}}function h(e,t){var n=E.peek();try{E.push(n.handleNode(e))}catch(e){i(e,t,x)&&E.push(new f)}}function d(e,t){try{E.peek().handleText(e)}catch(e){r(e,t)}}function y(e,t){(e=e.trim())&&d(e,t)}var m=t.rootHandler;t instanceof v?(m=t,t={}):"string"==typeof t?(m=this.handler(t),t={}):"string"==typeof m&&(m=this.handler(m));var g=this.model,x=this.lax,b=new p(Object.assign({},t,{rootHandler:m})),w=new O({proxy:!0}),E=new S.a;m.context=b,E.push(m);var k=/^<\?xml /i,C=/ encoding="([^"]+)"/i,A=/^utf-8$/i,R=g.getPackages().reduce(function(e,t){return e[t.uri]=t.prefix,e},{});w.ns(R).on("openTag",function(e,t,n,i){var r=e.attrs||{},a=Object.keys(r).reduce(function(e,n){var i=t(r[n]);return e[n]=i,e},{});h({name:e.name,originalName:e.originalName,attributes:a,ns:e.ns},i)}).on("question",s).on("closeTag",o).on("cdata",d).on("text",function(e,t,n){y(t(e),n)}).on("error",i).on("warn",r),u(function(){var t;try{w.parse(e),a()}catch(e){t=e}var i=m.element;t||i||(t=l("failed to parse document as <"+m.type.$descriptor.name+">")),n(t,t?void 0:i,b)})},w.prototype.handler=function(e){return new x(this.model,e)}},function(e,t,n){"use strict";(function(t){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(e,t){for(var n=0;n0&&(e=this.data.pop(),this.top--),e}},{key:"push",value:function(e){return this.data[++this.top]=e,this}},{key:"search",value:function(e){var t=this.data.indexOf(e);return-1===t?-1:this.data.length-t}}]),e}();e.exports=r}("undefined"!=typeof window&&window)}).call(t,n(39))},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";function i(e,t,n,i){return i?m.call(v,i)?v[i]:"&"+i+";":y(t?t:parseInt(n,16))}function r(e){return e.length>3&&-1!==e.indexOf("&")?e.replace(g,i):e}function a(e){return new Error(e)}function o(e){return"missing namespace for prefix <"+e+">"}function s(e){return{get:e,enumerable:!0}}function l(e){var t,n={};for(t in e)n[t]=e[t];return n}function c(e){return e+"$uri"}function u(e){var t,n,i={};for(t in e)n=e[t],i[n]=n,i[c(n)]=t;return i}function p(){return{line:0,column:0}}function h(e){throw e}function f(e){function t(e){e instanceof Error||(e=a(e)),N=e,P(e,T)}function n(e){S&&(e instanceof Error||(e=a(e)),S(e,T))}function i(e){function i(){if(null!==B)return B;var e,t,i,a,s,u,p,h,f,d,y,m=M&&L.xmlns,g=M&&j?[]:null,v=G,x=H,b=x.length,E={},S={};e:for(;v8)){for((d<65||d>122||d>90&&d<97)&&95!==d&&58!==d&&(n("illegal first char attribute name"),f=!0),y=v+1;y96&&d<123||d>64&&d<91||d>47&&d<59||46===d||45===d||95===d)){if(32===d||d<14&&d>8){n("missing attribute value"),v=y;continue e}if(61===d)break;n("illegal attribute name char"),f=!0}if(h=x.substring(v,y),"xmlns:xmlns"===h&&(n("illegal declaration of xmlns"),f=!0),34===(d=x.charCodeAt(y+1)))-1===(y=x.indexOf('"',v=y+2))&&-1!==(y=x.indexOf("'",v))&&(n("attribute value quote missmatch"),f=!0);else if(39===d)-1===(y=x.indexOf("'",v=y+2))&&-1!==(y=x.indexOf('"',v))&&(n("attribute value quote missmatch"),f=!0);else for(n("missing attribute value quotes"),f=!0,y+=1;y8);y++);for(-1===y&&(n("missing closing quotes"),y=b,f=!0),f||(u=x.substring(v,y)),v=y;y+18);y++)v===y&&(n("illegal character after attribute end"),f=!0);if(v=y+1,!f)if(h in S)n("attribute <"+h+"> already defined");else if(S[h]=!0,M)if(j){if(null!==(s="xmlns"===h?"xmlns":120===h.charCodeAt(0)&&"xmlns:"===h.substr(0,6)?h.substr(6):null)){if(e=r(u),t=c(s),!(p=O[e])){if("xmlns"===s||t in L&&L[t]!==e)do{p="ns"+_++}while(void 0!==L[p]);else p=s;O[e]=p}L[s]!==p&&(a||(L=l(L),a=!0),L[s]=p,"xmlns"===s&&(L[c(p)]=e,m=p),L[t]=e),E[h]=u;continue}g.push(h,u)}else d=h.indexOf(":"),-1!==d?(i=L[h.substring(0,d)])?(h=m===i?h.substr(d+1):i+h.substr(d),h===w&&(d=u.indexOf(":"),-1!==d?(i=u.substring(0,d),i=L[i]||i,u=i+u.substring(d)):u=m+":"+u),E[h]=u):n(o(h.substring(0,d))):E[h]=u;else E[h]=u}if(j)for(v=0,b=g.length;v=o&&(t=i.exec(e))&&!((s=t[0].length+t.index)>z);)r+=1,o=s;return-1===z?(a=s,n=e.substring(W)):0===W?(console.log(z-o),n=e.substring(W,z)):(a=z-o,n=-1===W?e.substring(z):e.substring(z,W+1)),{data:n,line:r,column:a}}var p,h,f,d,x,b,S,P,N,B,I=M?[]:null,L=M?u(O):null,$=[],_=0,F=!1,q=!1,z=0,W=0,H="",G=0;for(T=a,R&&(N=Object.create({},{name:s(function(){return S}),originalName:s(function(){return P}),attrs:s(i),ns:s(function(){return L})}));-1!==W;){if(-1===(z=60===e.charCodeAt(W)?W:e.indexOf("<",W)))return $.length?t("unexpected end of file"):0===W?t("missing start tag"):void(W",z+1)))return t("unclosed tag");if(B={},47===x){if(F=!1,q=!0,!$.length)return t("missing open tag");if(h=S=$.pop(),d=z+2+h.length,e.substring(z+2,d)!==h)return t("closing tag mismatch");for(;d8&&x<14))return t("close tag")}else{if(47===e.charCodeAt(W-1)?(h=S=e.substring(z+1,W-1),F=!0,q=!0):(h=S=e.substring(z+1,W),F=!0,q=!1),!(x>96&&x<123||x>64&&x<91||95===x||58===x))return t("illegal first char nodeName");for(d=1,f=h.length;d96&&x<123||x>64&&x<91||x>47&&x<59||45===x||95===x||46===x)){if(32===x||x<14&&x>8){S=h.substring(0,d),B=null;break}return t("invalid nodeName")}q||$.push(S)}if(M){if(p=L,F&&(q||I.push(p),null===B&&(j=-1!==h.indexOf("xmlns",d))&&(G=d,H=h,i(),j=!1)),P=S,-1!==(x=S.indexOf(":"))){if(!(b=L[S.substring(0,x)]))return t("missing namespace on <"+P+">");S=S.substr(x+1)}else b=L.xmlns;b&&(S=b+":"+S)}if(F&&(G=d,H=h,m&&(R?m(N,r,q,T):m(S,i,r,q,T),D)))return;if(q){if(g&&(g(R?N:S,r,F,T),D))return;M&&(L=F?p:I.pop())}W+=1}else{if(-1===(W=e.indexOf("?>",z)))return t("unclosed question");if(C&&(C(e.substring(z,W+2),T),D))return;W+=2}else{if(91===(x=e.charCodeAt(z+2))&&"CDATA["===e.substr(z+3,6)){if(-1===(W=e.indexOf("]]>",z)))return t("unclosed cdata");if(v&&(v(e.substring(z+9,W),T),D))return;W+=3;continue}if(45===x&&45===e.charCodeAt(z+3)){if(-1===(W=e.indexOf("--\x3e",z)))return t("unclosed comment");if(k&&(k(e.substring(z+4,W),r,T),D))return;W+=3;continue}if(-1===(W=e.indexOf(">",z+1)))return t("unclosed tag");if(A&&(A(e.substring(z,W+1),r,T),D))return;W+=1}}}if(!this)return new f(e);var y,m,g,v,S,k,C,A,O,R=e&&e.proxy,P=h,T=p,j=!1,M=!1,N=null,D=!1;this.on=function(e,t){if("function"!=typeof t)throw a("required args ");switch(e){case"openTag":m=t;break;case"text":y=t;break;case"closeTag":g=t;break;case"error":P=t;break;case"warn":S=t;break;case"cdata":v=t;break;case"attention":A=t;break;case"question":C=t;break;case"comment":k=t;break;default:throw a("unsupported event: "+e)}return this},this.ns=function(e){if(void 0===e&&(e={}),"object"!==(void 0===e?"undefined":d(e)))throw a("required args ");var t,n={};for(t in e)n[t]=e[t];return n[x]=b,M=!0,O=n,this},this.parse=function(e){if("string"!=typeof e)throw a("required args ");return N=null,i(e),T=p,D=!1,N},this.stop=function(){D=!0}}var d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y=String.fromCharCode,m=Object.prototype.hasOwnProperty,g=/&#(\d+);|&#x([0-9a-f]+);|&(\w+);/gi,v={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'};Object.keys(v).forEach(function(e){v[e.toUpperCase()]=v[e]});var x="http://www.w3.org/2001/XMLSchema-instance",b="xsi",w="xsi:type",E="non-whitespace outside of root node";t.a={Parser:f,decode:r}},function(e,t,n){"use strict";function i(e,t){var n=[];return e.forEach(function(e,i){t(e,i)&&n.push(e)}),n}function r(e){var t={},n={},i={},r=[],a=[];this.byUri=function(t){return n[t]||e&&e.byUri(t)},this.add=function(e,t){n[e.uri]=e,t?r.push(e):a.push(e),this.mapPrefix(e.prefix,e.uri)},this.uriByPrefix=function(e){return t[e||"xmlns"]},this.mapPrefix=function(e,n){t[e||"xmlns"]=n},this.logUsed=function(e){var t=e.uri;i[t]=this.byUri(t)},this.getUsed=function(e){function t(e){return i[e.uri]}return[].concat(r,a).filter(t)}}function a(e){return e.charAt(0).toLowerCase()+e.slice(1)}function o(e,t){return Object(A.d)(t)?a(e):e}function s(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function l(e){return"string"==typeof e&&e.constructor===String?e:(e.prefix?e.prefix+":":"")+e.localName}function c(e){return e.getUsed().map(function(e){return{name:"xmlns"+(e.prefix?":"+e.prefix:""),value:e.uri}})}function u(e,t){return t.isGeneric?Object.assign({localName:t.ns.localName},e):Object.assign({localName:o(t.ns.localName,t.$pkg)},e)}function p(e,t){return Object.assign({localName:t.ns.localName},e)}function h(e){return i(e.$descriptor.properties,function(t){var n=t.name;if(t.isVirtual)return!1;if(!e.hasOwnProperty(n))return!1;var i=e[n];return i!==t.default&&null!==i&&(!t.isMany||i.length)})}function f(e,t,n){return e="string"==typeof e&&e.constructor===String?e:""+e,e.replace(t,function(e){return"&"+n[e]+";"})}function d(e){return f(e,R,T)}function y(e){return f(e,P,j)}function m(e){return i(e,function(e){return e.isAttr})}function g(e){return i(e,function(e){return!e.isAttr})}function v(e){this.tagName=e}function x(){}function b(e){this.tagName=e}function w(e,t){this.body=[],this.attrs=[],this.parent=e,this.propertyDescriptor=t}function E(e,t){w.call(this,e,t)}function S(){this.value="",this.write=function(e){this.value+=e}}function k(e,t){var n=[""];this.append=function(t){return e.write(t),this},this.appendNewLine=function(){return t&&e.write("\n"),this},this.appendIndent=function(){return t&&e.write(n.join(" ")),this},this.indent=function(){return n.push(""),this},this.unindent=function(){return n.pop(),this}}function C(e){function t(t,n){var i=n||new S,r=new k(i,e.format);if(e.preamble&&r.append(O),(new w).build(t).serializeTo(r),!n)return i.value}return e=Object.assign({format:!1,preamble:!0},e||{}),{toXML:t}}t.a=C;var A=n(5),O='\n',R=/<|>|'|"|&|\n\r|\n/g,P=/<|>|&/g,T={"\n":"#10","\n\r":"#10",'"':"#34","'":"#39","<":"#60",">":"#62","&":"#38"},j={"<":"lt",">":"gt","&":"amp"};v.prototype.build=function(e){return this.element=e,this},v.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"+this.element.id+"").appendNewLine()},x.prototype.serializeValue=x.prototype.serializeTo=function(e){e.append(this.escape?y(this.value):this.value)},x.prototype.build=function(e,t){return this.value=t,"String"===e.type&&-1!==t.search(P)&&(this.escape=!0),this},s(b,x),b.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"),this.serializeValue(e),e.append("").appendNewLine()},w.prototype.build=function(e){this.element=e;var t,n,i=e.$descriptor,r=this.propertyDescriptor,a=i.isGeneric;return t=a?this.parseGeneric(e):this.parseNsAttributes(e),this.ns=r?this.nsPropertyTagName(r):this.nsTagName(i),this.tagName=this.addTagName(this.ns),a||(n=h(e),this.parseAttributes(m(n)),this.parseContainments(g(n))),this.parseGenericAttributes(e,t),this},w.prototype.nsTagName=function(e){return u(this.logNamespaceUsed(e.ns),e)},w.prototype.nsPropertyTagName=function(e){return p(this.logNamespaceUsed(e.ns),e)},w.prototype.isLocalNs=function(e){return e.uri===this.ns.uri},w.prototype.nsAttributeName=function(e){var t;if(t="string"==typeof e&&e.constructor===String?Object(A.g)(e):e.ns,e.inherited)return{localName:t.localName};var n=this.logNamespaceUsed(t);return this.getNamespaces().logUsed(n),this.isLocalNs(n)?{localName:t.localName}:Object.assign({localName:t.localName},n)},w.prototype.parseGeneric=function(e){var t=this,n=this.body,i=[];for(var r in e){"$body"===r?n.push((new x).build({type:"String"},e[r])):"$children"===r?val.forEach(function(e){n.push(new w(t).build(e))}):0!==r.indexOf("$")&&t.parseNsAttribute(e,r,e[r])&&i.push({name:r,value:e[r]})}return i},w.prototype.parseNsAttribute=function(e,t,n){var i,r=e.$model,a=Object(A.g)(t);if("xmlns"===a.prefix&&(i={prefix:a.localName,uri:n}),a.prefix||"xmlns"!==a.localName||(i={uri:n}),!i)return{name:t,value:n};if(r&&r.getPackage(n))this.logNamespace(i,!0,!0);else{var o=this.logNamespaceUsed(i,!0);this.getNamespaces().logUsed(o)}},w.prototype.parseNsAttributes=function(e,t){var n=this,i=e.$attrs,r=[];for(var a in i){var o=n.parseNsAttribute(e,a,i[a]);o&&r.push(o)}return r},w.prototype.parseGenericAttributes=function(e,t){var n=this;t.forEach(function(t){if(t.name!==A.b)try{n.addAttribute(n.nsAttributeName(t.name),t.value)}catch(n){console.warn("missing namespace information for ",t.name,"=",t.value,"on",e,n)}})},w.prototype.parseContainments=function(e){var t=this,n=this.body,i=this.element;e.forEach(function(e){var r=i.get(e.name),a=e.isReference;if(e.isMany||(r=[r]),e.isBody)n.push((new x).build(e,r[0]));else if(Object(A.f)(e.type))r.forEach(function(i){n.push(new b(t.addTagName(t.nsPropertyTagName(e))).build(e,i))});else if(a)r.forEach(function(i){n.push(new v(t.addTagName(t.nsPropertyTagName(e))).build(i))});else{var o=Object(A.i)(e),s=Object(A.h)(e);r.forEach(function(i){var r;r=o?new E(t,e):s?new w(t,e):new w(t),n.push(r.build(i))})}})},w.prototype.getNamespaces=function(e){var t,n=this.namespaces,i=this.parent;return n||(t=i&&i.getNamespaces(),e||!t?this.namespaces=n=new r(t):n=t),n},w.prototype.logNamespace=function(e,t,n){var i=this.getNamespaces(n),r=e.uri,a=e.prefix;return i.byUri(r)||i.add(e,t),i.mapPrefix(a,r),e},w.prototype.logNamespaceUsed=function(e,t){var n,i,r,a=this.element,o=a.$model,s=this.getNamespaces(t),l=e.prefix,c=e.uri;if(!l&&!c)return{localName:e.localName};if(r=A.a[l]||o&&(o.getPackage(l)||{}).uri,!(c=c||r||s.uriByPrefix(l)))throw new Error("no namespace uri given for prefix <"+l+">");if(!(e=s.byUri(c))){for(n=l,i=1;s.uriByPrefix(n);)n=l+"_"+i++;e=this.logNamespace({prefix:n,uri:c},r===c)}return l&&s.mapPrefix(l,c),e},w.prototype.parseAttributes=function(e){var t=this,n=this.element;e.forEach(function(e){var i=n.get(e.name);if(e.isReference)if(e.isMany){var r=[];forEach(i,function(e){r.push(e.id)}),i=r.join(" ")}else i=i.id;t.addAttribute(t.nsAttributeName(e),i)})},w.prototype.addTagName=function(e){var t=this.logNamespaceUsed(e);return this.getNamespaces().logUsed(t),l(e)},w.prototype.addAttribute=function(e,t){var n=this.attrs;"string"==typeof t&&t.constructor===String&&(t=d(t)),n.push({name:e,value:t})},w.prototype.serializeAttributes=function(e){var t=this.attrs,n=this.namespaces;n&&(t=c(n).concat(t)),t.forEach(function(t){e.append(" ").append(l(t.name)).append('="').append(t.value).append('"')})},w.prototype.serializeTo=function(e){var t=this.body[0],n=t&&t.constructor!==x;e.appendIndent().append("<"+this.tagName),this.serializeAttributes(e),e.append(t?">":" />"),t&&(n&&e.appendNewLine().indent(),this.body.forEach(function(t){t.serializeTo(e)}),n&&e.unindent().appendIndent(),e.append("")),e.appendNewLine()},s(E,w),E.prototype.parseNsAttributes=function(e){var t=w.prototype.parseNsAttributes.call(this,e),n=e.$descriptor;if(n.name===this.propertyDescriptor.type)return t;var i=this.typeNs=this.nsTagName(n);this.getNamespaces().logUsed(this.typeNs);var r=e.$model.getPackage(i.uri),a=r.xml&&r.xml.typePrefix||"";return this.addAttribute(this.nsAttributeName(A.b),(i.prefix?i.prefix+":":"")+a+n.ns.localName),t},E.prototype.isLocalNs=function(e){return e.uri===(this.typeNs||this.ns).uri}},function(e,t){e.exports={name:"BPMN20",uri:"http://www.omg.org/spec/BPMN/20100524/MODEL",associations:[],types:[{name:"Interface",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"operations",type:"Operation",isMany:!0},{name:"implementationRef",type:"String",isAttr:!0}]},{name:"Operation",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"inMessageRef",type:"Message",isReference:!0},{name:"outMessageRef",type:"Message",isReference:!0},{name:"errorRef",type:"Error",isMany:!0,isReference:!0},{name:"implementationRef",type:"String",isAttr:!0}]},{name:"EndPoint",superClass:["RootElement"]},{name:"Auditing",superClass:["BaseElement"]},{name:"GlobalTask",superClass:["CallableElement"],properties:[{name:"resources",type:"ResourceRole",isMany:!0}]},{name:"Monitoring",superClass:["BaseElement"]},{name:"Performer",superClass:["ResourceRole"]},{name:"Process",superClass:["FlowElementsContainer","CallableElement"],properties:[{name:"processType",type:"ProcessType",isAttr:!0},{name:"isClosed",isAttr:!0,type:"Boolean"},{name:"auditing",type:"Auditing"},{name:"monitoring",type:"Monitoring"},{name:"properties",type:"Property",isMany:!0},{name:"laneSets",type:"LaneSet",isMany:!0,replaces:"FlowElementsContainer#laneSets"},{name:"flowElements",type:"FlowElement",isMany:!0,replaces:"FlowElementsContainer#flowElements"},{name:"artifacts",type:"Artifact",isMany:!0},{name:"resources",type:"ResourceRole",isMany:!0},{name:"correlationSubscriptions",type:"CorrelationSubscription",isMany:!0},{name:"supports",type:"Process",isMany:!0,isReference:!0},{name:"definitionalCollaborationRef",type:"Collaboration",isAttr:!0,isReference:!0},{name:"isExecutable",isAttr:!0,type:"Boolean"}]},{name:"LaneSet",superClass:["BaseElement"],properties:[{name:"lanes",type:"Lane",isMany:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Lane",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"partitionElementRef",type:"BaseElement",isAttr:!0,isReference:!0},{name:"partitionElement",type:"BaseElement"},{name:"flowNodeRef",type:"FlowNode",isMany:!0,isReference:!0},{name:"childLaneSet",type:"LaneSet",xml:{serialize:"xsi:type"}}]},{name:"GlobalManualTask",superClass:["GlobalTask"]},{name:"ManualTask",superClass:["Task"]},{name:"UserTask",superClass:["Task"],properties:[{name:"renderings",type:"Rendering",isMany:!0},{name:"implementation",isAttr:!0,type:"String"}]},{name:"Rendering",superClass:["BaseElement"]},{name:"HumanPerformer",superClass:["Performer"]},{name:"PotentialOwner",superClass:["HumanPerformer"]},{name:"GlobalUserTask",superClass:["GlobalTask"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"renderings",type:"Rendering",isMany:!0}]},{name:"Gateway",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"gatewayDirection",type:"GatewayDirection",default:"Unspecified",isAttr:!0}]},{name:"EventBasedGateway",superClass:["Gateway"],properties:[{name:"instantiate",default:!1,isAttr:!0,type:"Boolean"},{name:"eventGatewayType",type:"EventBasedGatewayType",isAttr:!0,default:"Exclusive"}]},{name:"ComplexGateway",superClass:["Gateway"],properties:[{name:"activationCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"ExclusiveGateway",superClass:["Gateway"],properties:[{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"InclusiveGateway",superClass:["Gateway"],properties:[{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"ParallelGateway",superClass:["Gateway"]},{name:"RootElement",isAbstract:!0,superClass:["BaseElement"]},{name:"Relationship",superClass:["BaseElement"],properties:[{name:"type",isAttr:!0,type:"String"},{name:"direction",type:"RelationshipDirection",isAttr:!0},{name:"source",isMany:!0,isReference:!0,type:"Element"},{name:"target",isMany:!0,isReference:!0,type:"Element"}]},{name:"BaseElement",isAbstract:!0,properties:[{name:"id",isAttr:!0,type:"String",isId:!0},{name:"documentation",type:"Documentation",isMany:!0},{name:"extensionDefinitions",type:"ExtensionDefinition",isMany:!0,isReference:!0},{name:"extensionElements",type:"ExtensionElements"}]},{name:"Extension",properties:[{name:"mustUnderstand",default:!1,isAttr:!0,type:"Boolean"},{name:"definition",type:"ExtensionDefinition",isAttr:!0,isReference:!0}]},{name:"ExtensionDefinition",properties:[{name:"name",isAttr:!0,type:"String"},{name:"extensionAttributeDefinitions",type:"ExtensionAttributeDefinition",isMany:!0}]},{name:"ExtensionAttributeDefinition",properties:[{name:"name",isAttr:!0,type:"String"},{name:"type",isAttr:!0,type:"String"},{name:"isReference",default:!1,isAttr:!0,type:"Boolean"},{name:"extensionDefinition",type:"ExtensionDefinition",isAttr:!0,isReference:!0}]},{name:"ExtensionElements",properties:[{name:"valueRef",isAttr:!0,isReference:!0,type:"Element"},{name:"values",type:"Element",isMany:!0},{name:"extensionAttributeDefinition",type:"ExtensionAttributeDefinition",isAttr:!0,isReference:!0}]},{name:"Documentation",superClass:["BaseElement"],properties:[{name:"text",type:"String",isBody:!0},{name:"textFormat",default:"text/plain",isAttr:!0,type:"String"}]},{name:"Event",isAbstract:!0,superClass:["FlowNode","InteractionNode"],properties:[{name:"properties",type:"Property",isMany:!0}]},{name:"IntermediateCatchEvent",superClass:["CatchEvent"]},{name:"IntermediateThrowEvent",superClass:["ThrowEvent"]},{name:"EndEvent",superClass:["ThrowEvent"]},{name:"StartEvent",superClass:["CatchEvent"],properties:[{name:"isInterrupting",default:!0,isAttr:!0,type:"Boolean"}]},{name:"ThrowEvent",isAbstract:!0,superClass:["Event"],properties:[{name:"dataInputs",type:"DataInput",isMany:!0},{name:"dataInputAssociations",type:"DataInputAssociation",isMany:!0},{name:"inputSet",type:"InputSet"},{name:"eventDefinitions",type:"EventDefinition",isMany:!0},{name:"eventDefinitionRef",type:"EventDefinition",isMany:!0,isReference:!0}]},{name:"CatchEvent",isAbstract:!0,superClass:["Event"],properties:[{name:"parallelMultiple",isAttr:!0,type:"Boolean",default:!1},{name:"dataOutputs",type:"DataOutput",isMany:!0},{name:"dataOutputAssociations",type:"DataOutputAssociation",isMany:!0},{name:"outputSet",type:"OutputSet"},{name:"eventDefinitions",type:"EventDefinition",isMany:!0},{name:"eventDefinitionRef",type:"EventDefinition",isMany:!0,isReference:!0}]},{name:"BoundaryEvent",superClass:["CatchEvent"],properties:[{name:"cancelActivity",default:!0,isAttr:!0,type:"Boolean"},{name:"attachedToRef",type:"Activity",isAttr:!0,isReference:!0}]},{name:"EventDefinition",isAbstract:!0,superClass:["RootElement"]},{name:"CancelEventDefinition",superClass:["EventDefinition"]},{name:"ErrorEventDefinition",superClass:["EventDefinition"],properties:[{name:"errorRef",type:"Error",isAttr:!0,isReference:!0}]},{name:"TerminateEndEvent",superClass:["EventDefinition"]},{name:"EscalationEventDefinition",superClass:["EventDefinition"],properties:[{name:"escalationRef",type:"Escalation",isAttr:!0,isReference:!0}]},{name:"Escalation",properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"escalationCode",isAttr:!0,type:"String"}],superClass:["RootElement"]},{name:"CompensateEventDefinition",superClass:["EventDefinition"],properties:[{name:"waitForCompletion",isAttr:!0,type:"Boolean",default:!0},{name:"activityRef",type:"Activity",isAttr:!0,isReference:!0}]},{name:"TimerEventDefinition",superClass:["EventDefinition"],properties:[{name:"timeDate",type:"Expression",xml:{serialize:"xsi:type"}},{name:"timeCycle",type:"Expression",xml:{serialize:"xsi:type"}},{name:"timeDuration",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"LinkEventDefinition",superClass:["EventDefinition"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"target",type:"LinkEventDefinition",isAttr:!0,isReference:!0},{name:"source",type:"LinkEventDefinition",isMany:!0,isReference:!0}]},{name:"MessageEventDefinition",superClass:["EventDefinition"],properties:[{name:"messageRef",type:"Message",isAttr:!0,isReference:!0},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"ConditionalEventDefinition",superClass:["EventDefinition"],properties:[{name:"condition",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"SignalEventDefinition",superClass:["EventDefinition"],properties:[{name:"signalRef",type:"Signal",isAttr:!0,isReference:!0}]},{name:"Signal",superClass:["RootElement"],properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"ImplicitThrowEvent",superClass:["ThrowEvent"]},{name:"DataState",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"ItemAwareElement",superClass:["BaseElement"],properties:[{name:"itemSubjectRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"dataState",type:"DataState"}]},{name:"DataAssociation",superClass:["BaseElement"],properties:[{name:"assignment",type:"Assignment",isMany:!0},{name:"sourceRef",type:"ItemAwareElement",isMany:!0,isReference:!0},{name:"targetRef",type:"ItemAwareElement",isReference:!0},{name:"transformation",type:"FormalExpression",xml:{serialize:"property"}}]},{name:"DataInput",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"inputSetRef",type:"InputSet",isVirtual:!0,isMany:!0,isReference:!0},{name:"inputSetWithOptional",type:"InputSet",isVirtual:!0,isMany:!0,isReference:!0},{name:"inputSetWithWhileExecuting",type:"InputSet",isVirtual:!0,isMany:!0,isReference:!0}]},{name:"DataOutput",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"outputSetRef",type:"OutputSet",isVirtual:!0,isMany:!0,isReference:!0},{name:"outputSetWithOptional",type:"OutputSet",isVirtual:!0,isMany:!0,isReference:!0},{name:"outputSetWithWhileExecuting",type:"OutputSet",isVirtual:!0,isMany:!0,isReference:!0}]},{name:"InputSet",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"dataInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"optionalInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"whileExecutingInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"outputSetRefs",type:"OutputSet",isMany:!0,isReference:!0}]},{name:"OutputSet",superClass:["BaseElement"],properties:[{name:"dataOutputRefs",type:"DataOutput",isMany:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"inputSetRefs",type:"InputSet",isMany:!0,isReference:!0},{name:"optionalOutputRefs",type:"DataOutput",isMany:!0,isReference:!0},{name:"whileExecutingOutputRefs",type:"DataOutput",isMany:!0,isReference:!0}]},{name:"Property",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"DataInputAssociation",superClass:["DataAssociation"]},{name:"DataOutputAssociation",superClass:["DataAssociation"]},{name:"InputOutputSpecification",superClass:["BaseElement"],properties:[{name:"dataInputs",type:"DataInput",isMany:!0},{name:"dataOutputs",type:"DataOutput",isMany:!0},{name:"inputSets",type:"InputSet",isMany:!0},{name:"outputSets",type:"OutputSet",isMany:!0}]},{name:"DataObject",superClass:["FlowElement","ItemAwareElement"],properties:[{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"}]},{name:"InputOutputBinding",properties:[{name:"inputDataRef",type:"InputSet",isAttr:!0,isReference:!0},{name:"outputDataRef",type:"OutputSet",isAttr:!0,isReference:!0},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"Assignment",superClass:["BaseElement"],properties:[{name:"from",type:"Expression",xml:{serialize:"xsi:type"}},{name:"to",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"DataStore",superClass:["RootElement","ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"capacity",isAttr:!0,type:"Integer"},{name:"isUnlimited",default:!0,isAttr:!0,type:"Boolean"}]},{name:"DataStoreReference",superClass:["ItemAwareElement","FlowElement"],properties:[{name:"dataStoreRef",type:"DataStore",isAttr:!0,isReference:!0}]},{name:"DataObjectReference",superClass:["ItemAwareElement","FlowElement"],properties:[{name:"dataObjectRef",type:"DataObject",isAttr:!0,isReference:!0}]},{name:"ConversationLink",superClass:["BaseElement"],properties:[{name:"sourceRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"ConversationAssociation",superClass:["BaseElement"],properties:[{name:"innerConversationNodeRef",type:"ConversationNode",isAttr:!0,isReference:!0},{name:"outerConversationNodeRef",type:"ConversationNode",isAttr:!0,isReference:!0}]},{name:"CallConversation",superClass:["ConversationNode"],properties:[{name:"calledCollaborationRef",type:"Collaboration",isAttr:!0,isReference:!0},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0}]},{name:"Conversation",superClass:["ConversationNode"]},{name:"SubConversation",superClass:["ConversationNode"],properties:[{name:"conversationNodes",type:"ConversationNode",isMany:!0}]},{name:"ConversationNode",isAbstract:!0,superClass:["InteractionNode","BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRefs",type:"Participant",isMany:!0,isReference:!0},{name:"messageFlowRefs",type:"MessageFlow",isMany:!0,isReference:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0}]},{name:"GlobalConversation",superClass:["Collaboration"]},{name:"PartnerEntity",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0}]},{name:"PartnerRole",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0}]},{name:"CorrelationProperty",superClass:["RootElement"],properties:[{name:"correlationPropertyRetrievalExpression",type:"CorrelationPropertyRetrievalExpression",isMany:!0},{name:"name",isAttr:!0,type:"String"},{name:"type",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"Error",superClass:["RootElement"],properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"errorCode",isAttr:!0,type:"String"}]},{name:"CorrelationKey",superClass:["BaseElement"],properties:[{name:"correlationPropertyRef",type:"CorrelationProperty",isMany:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Expression",superClass:["BaseElement"],isAbstract:!1,properties:[{name:"body",type:"String",isBody:!0}]},{name:"FormalExpression",superClass:["Expression"],properties:[{name:"language",isAttr:!0,type:"String"},{name:"evaluatesToTypeRef",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"Message",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"itemRef",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"ItemDefinition",superClass:["RootElement"],properties:[{name:"itemKind",type:"ItemKind",isAttr:!0},{name:"structureRef",type:"String",isAttr:!0},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"import",type:"Import",isAttr:!0,isReference:!0}]},{name:"FlowElement",isAbstract:!0,superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"auditing",type:"Auditing"},{name:"monitoring",type:"Monitoring"},{name:"categoryValueRef",type:"CategoryValue",isMany:!0,isReference:!0}]},{name:"SequenceFlow",superClass:["FlowElement"],properties:[{name:"isImmediate",isAttr:!0,type:"Boolean"},{name:"conditionExpression",type:"Expression",xml:{serialize:"xsi:type"}},{name:"sourceRef",type:"FlowNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"FlowNode",isAttr:!0,isReference:!0}]},{name:"FlowElementsContainer",isAbstract:!0,superClass:["BaseElement"],properties:[{name:"laneSets",type:"LaneSet",isMany:!0},{name:"flowElements",type:"FlowElement",isMany:!0}]},{name:"CallableElement",isAbstract:!0,superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"ioSpecification",type:"InputOutputSpecification",xml:{serialize:"property"}},{name:"supportedInterfaceRef",type:"Interface",isMany:!0,isReference:!0},{name:"ioBinding",type:"InputOutputBinding",isMany:!0,xml:{serialize:"property"}}]},{name:"FlowNode",isAbstract:!0,superClass:["FlowElement"],properties:[{name:"incoming",type:"SequenceFlow",isMany:!0,isReference:!0},{name:"outgoing",type:"SequenceFlow",isMany:!0,isReference:!0},{name:"lanes",type:"Lane",isVirtual:!0,isMany:!0,isReference:!0}]},{name:"CorrelationPropertyRetrievalExpression",superClass:["BaseElement"],properties:[{name:"messagePath",type:"FormalExpression"},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"CorrelationPropertyBinding",superClass:["BaseElement"],properties:[{name:"dataPath",type:"FormalExpression"},{name:"correlationPropertyRef",type:"CorrelationProperty",isAttr:!0,isReference:!0}]},{name:"Resource",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"resourceParameters",type:"ResourceParameter",isMany:!0}]},{name:"ResourceParameter",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isRequired",isAttr:!0,type:"Boolean"},{name:"type",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"CorrelationSubscription",superClass:["BaseElement"],properties:[{name:"correlationKeyRef",type:"CorrelationKey",isAttr:!0,isReference:!0},{name:"correlationPropertyBinding",type:"CorrelationPropertyBinding",isMany:!0}]},{name:"MessageFlow",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"sourceRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"MessageFlowAssociation",superClass:["BaseElement"],properties:[{name:"innerMessageFlowRef",type:"MessageFlow",isAttr:!0,isReference:!0},{name:"outerMessageFlowRef",type:"MessageFlow",isAttr:!0,isReference:!0}]},{name:"InteractionNode",isAbstract:!0,properties:[{name:"incomingConversationLinks",type:"ConversationLink",isVirtual:!0,isMany:!0,isReference:!0},{name:"outgoingConversationLinks",type:"ConversationLink",isVirtual:!0,isMany:!0,isReference:!0}]},{name:"Participant",superClass:["InteractionNode","BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"interfaceRef",type:"Interface",isMany:!0,isReference:!0},{name:"participantMultiplicity",type:"ParticipantMultiplicity"},{name:"endPointRefs",type:"EndPoint",isMany:!0,isReference:!0},{name:"processRef",type:"Process",isAttr:!0,isReference:!0}]},{name:"ParticipantAssociation",superClass:["BaseElement"],properties:[{name:"innerParticipantRef",type:"Participant",isAttr:!0,isReference:!0},{name:"outerParticipantRef",type:"Participant",isAttr:!0,isReference:!0}]},{name:"ParticipantMultiplicity",properties:[{name:"minimum",default:0,isAttr:!0,type:"Integer"},{name:"maximum",default:1,isAttr:!0,type:"Integer"}],superClass:["BaseElement"]},{name:"Collaboration",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isClosed",isAttr:!0,type:"Boolean"},{name:"participants",type:"Participant",isMany:!0},{name:"messageFlows",type:"MessageFlow",isMany:!0},{name:"artifacts",type:"Artifact",isMany:!0},{name:"conversations",type:"ConversationNode",isMany:!0},{name:"conversationAssociations",type:"ConversationAssociation"},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0},{name:"messageFlowAssociations",type:"MessageFlowAssociation",isMany:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0},{name:"choreographyRef",type:"Choreography",isMany:!0,isReference:!0},{name:"conversationLinks",type:"ConversationLink",isMany:!0}]},{name:"ChoreographyActivity",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"participantRefs",type:"Participant",isMany:!0,isReference:!0},{name:"initiatingParticipantRef",type:"Participant",isAttr:!0,isReference:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0},{name:"loopType",type:"ChoreographyLoopType",default:"None",isAttr:!0}]},{name:"CallChoreography",superClass:["ChoreographyActivity"],properties:[{name:"calledChoreographyRef",type:"Choreography",isAttr:!0,isReference:!0},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0}]},{name:"SubChoreography",superClass:["ChoreographyActivity","FlowElementsContainer"],properties:[{name:"artifacts",type:"Artifact",isMany:!0}]},{name:"ChoreographyTask",superClass:["ChoreographyActivity"],properties:[{name:"messageFlowRef",type:"MessageFlow",isMany:!0,isReference:!0}]},{name:"Choreography",superClass:["FlowElementsContainer","Collaboration"]},{name:"GlobalChoreographyTask",superClass:["Choreography"],properties:[{name:"initiatingParticipantRef",type:"Participant",isAttr:!0,isReference:!0}]},{name:"TextAnnotation",superClass:["Artifact"],properties:[{name:"text",type:"String"},{name:"textFormat",default:"text/plain",isAttr:!0,type:"String"}]},{name:"Group",superClass:["Artifact"],properties:[{name:"categoryValueRef",type:"CategoryValue",isAttr:!0,isReference:!0}]},{name:"Association",superClass:["Artifact"],properties:[{name:"associationDirection",type:"AssociationDirection",isAttr:!0},{name:"sourceRef",type:"BaseElement",isAttr:!0,isReference:!0},{name:"targetRef",type:"BaseElement",isAttr:!0,isReference:!0}]},{name:"Category",superClass:["RootElement"],properties:[{name:"categoryValue",type:"CategoryValue",isMany:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Artifact",isAbstract:!0,superClass:["BaseElement"]},{name:"CategoryValue",superClass:["BaseElement"],properties:[{name:"categorizedFlowElements",type:"FlowElement",isVirtual:!0,isMany:!0,isReference:!0},{name:"value",isAttr:!0,type:"String"}]},{name:"Activity",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"isForCompensation",default:!1,isAttr:!0,type:"Boolean"},{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0},{name:"ioSpecification",type:"InputOutputSpecification",xml:{serialize:"property"}},{name:"boundaryEventRefs",type:"BoundaryEvent",isMany:!0,isReference:!0},{name:"properties",type:"Property",isMany:!0},{name:"dataInputAssociations",type:"DataInputAssociation",isMany:!0},{name:"dataOutputAssociations",type:"DataOutputAssociation",isMany:!0},{name:"startQuantity",default:1,isAttr:!0,type:"Integer"},{name:"resources",type:"ResourceRole",isMany:!0},{name:"completionQuantity",default:1,isAttr:!0,type:"Integer"},{name:"loopCharacteristics",type:"LoopCharacteristics"}]},{name:"ServiceTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"SubProcess",superClass:["Activity","FlowElementsContainer","InteractionNode"],properties:[{name:"triggeredByEvent",default:!1,isAttr:!0,type:"Boolean"},{name:"artifacts",type:"Artifact",isMany:!0}]},{name:"LoopCharacteristics",isAbstract:!0,superClass:["BaseElement"]},{name:"MultiInstanceLoopCharacteristics",superClass:["LoopCharacteristics"],properties:[{name:"isSequential",default:!1,isAttr:!0,type:"Boolean"},{name:"behavior",type:"MultiInstanceBehavior",default:"All",isAttr:!0},{name:"loopCardinality",type:"Expression",xml:{serialize:"xsi:type"}},{name:"loopDataInputRef",type:"ItemAwareElement",isReference:!0},{name:"loopDataOutputRef",type:"ItemAwareElement",isReference:!0},{name:"inputDataItem",type:"DataInput",xml:{serialize:"property"}},{name:"outputDataItem",type:"DataOutput",xml:{serialize:"property"}},{name:"complexBehaviorDefinition",type:"ComplexBehaviorDefinition",isMany:!0},{name:"completionCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"oneBehaviorEventRef",type:"EventDefinition",isAttr:!0,isReference:!0},{name:"noneBehaviorEventRef",type:"EventDefinition",isAttr:!0,isReference:!0}]},{name:"StandardLoopCharacteristics",superClass:["LoopCharacteristics"],properties:[{name:"testBefore",default:!1,isAttr:!0,type:"Boolean"},{name:"loopCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"loopMaximum",type:"Integer",isAttr:!0}]},{name:"CallActivity",superClass:["Activity"],properties:[{name:"calledElement",type:"String",isAttr:!0}]},{name:"Task",superClass:["Activity","InteractionNode"]},{name:"SendTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"ReceiveTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"instantiate",default:!1,isAttr:!0,type:"Boolean"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"ScriptTask",superClass:["Task"],properties:[{name:"scriptFormat",isAttr:!0,type:"String"},{name:"script",type:"String"}]},{name:"BusinessRuleTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"}]},{name:"AdHocSubProcess",superClass:["SubProcess"],properties:[{name:"completionCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"ordering",type:"AdHocOrdering",isAttr:!0},{name:"cancelRemainingInstances",default:!0,isAttr:!0,type:"Boolean"}]},{name:"Transaction",superClass:["SubProcess"],properties:[{name:"protocol",isAttr:!0,type:"String"},{name:"method",isAttr:!0,type:"String"}]},{name:"GlobalScriptTask",superClass:["GlobalTask"],properties:[{name:"scriptLanguage",isAttr:!0,type:"String"},{name:"script",isAttr:!0,type:"String"}]},{name:"GlobalBusinessRuleTask",superClass:["GlobalTask"],properties:[{name:"implementation",isAttr:!0,type:"String"}]},{name:"ComplexBehaviorDefinition",superClass:["BaseElement"],properties:[{name:"condition",type:"FormalExpression"},{name:"event",type:"ImplicitThrowEvent"}]},{name:"ResourceRole",superClass:["BaseElement"],properties:[{name:"resourceRef",type:"Resource",isReference:!0},{name:"resourceParameterBindings",type:"ResourceParameterBinding",isMany:!0},{name:"resourceAssignmentExpression",type:"ResourceAssignmentExpression"},{name:"name",isAttr:!0,type:"String"}]},{name:"ResourceParameterBinding",properties:[{name:"expression",type:"Expression",xml:{serialize:"xsi:type"}},{name:"parameterRef",type:"ResourceParameter",isAttr:!0,isReference:!0}],superClass:["BaseElement"]},{name:"ResourceAssignmentExpression",properties:[{name:"expression",type:"Expression",xml:{serialize:"xsi:type"}}],superClass:["BaseElement"]},{name:"Import",properties:[{name:"importType",isAttr:!0,type:"String"},{name:"location",isAttr:!0,type:"String"},{name:"namespace",isAttr:!0,type:"String"}]},{name:"Definitions",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"targetNamespace",isAttr:!0,type:"String"},{name:"expressionLanguage",default:"http://www.w3.org/1999/XPath",isAttr:!0,type:"String"},{name:"typeLanguage",default:"http://www.w3.org/2001/XMLSchema",isAttr:!0,type:"String"},{name:"imports",type:"Import",isMany:!0},{name:"extensions",type:"Extension",isMany:!0},{name:"rootElements",type:"RootElement",isMany:!0},{name:"diagrams",isMany:!0,type:"bpmndi:BPMNDiagram"},{name:"exporter",isAttr:!0,type:"String"},{name:"relationships",type:"Relationship",isMany:!0},{name:"exporterVersion",isAttr:!0,type:"String"}]}],enumerations:[{name:"ProcessType",literalValues:[{name:"None"},{name:"Public"},{name:"Private"}]},{name:"GatewayDirection",literalValues:[{name:"Unspecified"},{name:"Converging"},{name:"Diverging"},{name:"Mixed"}]},{name:"EventBasedGatewayType",literalValues:[{name:"Parallel"},{name:"Exclusive"}]},{name:"RelationshipDirection",literalValues:[{name:"None"},{name:"Forward"},{name:"Backward"},{name:"Both"}]},{name:"ItemKind",literalValues:[{name:"Physical"},{name:"Information"}]},{name:"ChoreographyLoopType",literalValues:[{name:"None"},{name:"Standard"},{name:"MultiInstanceSequential"},{name:"MultiInstanceParallel"}]},{name:"AssociationDirection",literalValues:[{name:"None"},{name:"One"},{name:"Both"}]},{name:"MultiInstanceBehavior",literalValues:[{name:"None"},{name:"One"},{name:"All"},{name:"Complex"}]},{name:"AdHocOrdering",literalValues:[{name:"Parallel"},{name:"Sequential"}]}],prefix:"bpmn",xml:{tagAlias:"lowerCase",typePrefix:"t"}}},function(e,t){e.exports={name:"BPMNDI",uri:"http://www.omg.org/spec/BPMN/20100524/DI",types:[{name:"BPMNDiagram",properties:[{name:"plane",type:"BPMNPlane",redefines:"di:Diagram#rootElement"},{name:"labelStyle",type:"BPMNLabelStyle",isMany:!0}],superClass:["di:Diagram"]},{name:"BPMNPlane",properties:[{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"}],superClass:["di:Plane"]},{name:"BPMNShape",properties:[{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"},{name:"isHorizontal",isAttr:!0,type:"Boolean"},{name:"isExpanded",isAttr:!0,type:"Boolean"},{name:"isMarkerVisible",isAttr:!0,type:"Boolean"},{name:"label",type:"BPMNLabel"},{name:"isMessageVisible",isAttr:!0,type:"Boolean"},{name:"participantBandKind",type:"ParticipantBandKind",isAttr:!0},{name:"choreographyActivityShape",type:"BPMNShape",isAttr:!0,isReference:!0}],superClass:["di:LabeledShape"]},{name:"BPMNEdge",properties:[{name:"label",type:"BPMNLabel"},{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"},{name:"sourceElement",isAttr:!0,isReference:!0,type:"di:DiagramElement",redefines:"di:Edge#source"},{name:"targetElement",isAttr:!0,isReference:!0,type:"di:DiagramElement",redefines:"di:Edge#target"},{name:"messageVisibleKind",type:"MessageVisibleKind",isAttr:!0,default:"initiating"}],superClass:["di:LabeledEdge"]},{name:"BPMNLabel",properties:[{name:"labelStyle",type:"BPMNLabelStyle",isAttr:!0,isReference:!0,redefines:"di:DiagramElement#style"}],superClass:["di:Label"]},{name:"BPMNLabelStyle",properties:[{name:"font",type:"dc:Font"}],superClass:["di:Style"]}],enumerations:[{name:"ParticipantBandKind",literalValues:[{name:"top_initiating"},{name:"middle_initiating"},{name:"bottom_initiating"},{name:"top_non_initiating"},{name:"middle_non_initiating"},{name:"bottom_non_initiating"}]},{name:"MessageVisibleKind",literalValues:[{name:"initiating"},{name:"non_initiating"}]}],associations:[],prefix:"bpmndi"}},function(e,t){e.exports={name:"DC",uri:"http://www.omg.org/spec/DD/20100524/DC",types:[{name:"Boolean"},{name:"Integer"},{name:"Real"},{name:"String"},{name:"Font",properties:[{name:"name",type:"String",isAttr:!0},{name:"size",type:"Real",isAttr:!0},{name:"isBold",type:"Boolean",isAttr:!0},{name:"isItalic",type:"Boolean",isAttr:!0},{name:"isUnderline",type:"Boolean",isAttr:!0},{name:"isStrikeThrough",type:"Boolean",isAttr:!0}]},{name:"Point",properties:[{name:"x",type:"Real",default:"0",isAttr:!0},{name:"y",type:"Real",default:"0",isAttr:!0}]},{name:"Bounds",properties:[{name:"x",type:"Real",default:"0",isAttr:!0},{name:"y",type:"Real",default:"0",isAttr:!0},{name:"width",type:"Real",isAttr:!0},{name:"height",type:"Real",isAttr:!0}]}],prefix:"dc",associations:[]}},function(e,t){e.exports={name:"DI",uri:"http://www.omg.org/spec/DD/20100524/DI",types:[{name:"DiagramElement",isAbstract:!0,properties:[{name:"id",type:"String",isAttr:!0,isId:!0},{name:"extension",type:"Extension"},{name:"owningDiagram",type:"Diagram",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"owningElement",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"modelElement",isReadOnly:!0,isVirtual:!0,isReference:!0,type:"Element"},{name:"style",type:"Style",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"ownedElement",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isMany:!0}]},{name:"Node",isAbstract:!0,superClass:["DiagramElement"]},{name:"Edge",isAbstract:!0,superClass:["DiagramElement"],properties:[{name:"source",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"target",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"waypoint",isUnique:!1,isMany:!0,type:"dc:Point",xml:{serialize:"xsi:type"}}]},{name:"Diagram",isAbstract:!0,properties:[{name:"id",type:"String",isAttr:!0,isId:!0},{name:"rootElement",type:"DiagramElement",isReadOnly:!0,isVirtual:!0},{name:"name",isAttr:!0,type:"String"},{name:"documentation",isAttr:!0,type:"String"},{name:"resolution",isAttr:!0,type:"Real"},{name:"ownedStyle",type:"Style",isReadOnly:!0,isVirtual:!0,isMany:!0}]},{name:"Shape",isAbstract:!0,superClass:["Node"],properties:[{name:"bounds",type:"dc:Bounds"}]},{name:"Plane",isAbstract:!0,superClass:["Node"],properties:[{name:"planeElement",type:"DiagramElement",subsettedProperty:"DiagramElement-ownedElement",isMany:!0}]},{name:"LabeledEdge",isAbstract:!0,superClass:["Edge"],properties:[{name:"ownedLabel",type:"Label",isReadOnly:!0,subsettedProperty:"DiagramElement-ownedElement",isVirtual:!0,isMany:!0}]},{name:"LabeledShape",isAbstract:!0,superClass:["Shape"],properties:[{name:"ownedLabel",type:"Label",isReadOnly:!0,subsettedProperty:"DiagramElement-ownedElement",isVirtual:!0,isMany:!0}]},{name:"Label",isAbstract:!0,superClass:["Node"],properties:[{name:"bounds",type:"dc:Bounds"}]},{name:"Style",isAbstract:!0,properties:[{name:"id",type:"String",isAttr:!0,isId:!0}]},{name:"Extension",properties:[{name:"values",type:"Element",isMany:!0}]}],associations:[],prefix:"di",xml:{tagAlias:"lowerCase"}}},function(e,t,n){"use strict";var i=n(47);t.a=i.a},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=(n(0),n(2)),a=n(3),o=n(1),s=function(){function e(e,t){for(var n=0;n').appendTo(p)),h.attr({width:i,height:s});var f=h[0].getContext("2d");f.clearRect(0,0,i,s);var d=i-0,y=s-0;f.fillStyle="rgb("+l+")",f.beginPath(),f.rect(0,0,d,y),f.fill();var m=Math.round(Object(o.k)(n.size));m<10&&(m=10),f.translate(0,0),f.lineWidth=1,f.save();for(var g=.5,v=0;g<=y;)f.restore(),f.strokeStyle=v%4==0?"rgb("+u+")":"rgb("+c+")",f.beginPath(),f.moveTo(0,g),f.lineTo(d,g),g+=m,v++,f.stroke();for(g=.5,v=0;g<=d;)f.restore(),f.strokeStyle=v%4==0?"rgb("+u+")":"rgb("+c+")",f.beginPath(),f.moveTo(g,0),f.lineTo(g,y),g+=m,v++,f.stroke()}}}]),e}();t.a=c},function(e,t,n){"use strict";var i=n(49);t.a=i.a},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=n(0),a=n(2),o=n(1),s=n(3),l=function(){function e(e,t){for(var n=0;n").appendTo(n),p=Object(o.k)(c.lineStyle.lineWidth+2);p<5&&(p=5);var h=p/2;r.half=h,r.dom=u,u.css({width:p,height:p,"-webkit-border-radius":h,"-moz-border-radius":h,"-ms-border-radius":h,"-o-border-radius":h,"border-radius":h,"z-index":Object(a.a)("#"+l.id).css("z-index")})}this.interval=setInterval(function(){for(var t=0;t=n.maxT&&(n.t=0,n.dom.show());var s=n.t;if("broken"===a.linkerType)for(var l=1;l=c.t&&s=1&&n.dom.hide()}},30)}},{key:"hideDirection",value:function(){this.interval&&clearInterval(this.interval),this.$container.find(".connection-direction").remove()}}]),e}();t.a=u},function(e,t,n){"use strict";var i=n(51);t.a=i.a},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=n(0),a=n(2),o=n(3),s=n(1),l=function(){function e(e,t){for(var n=0;n0)){f=Object(a.a)("
").appendTo(h),f.css({left:Object(s.k)(l.bounds.x),top:Object(s.k)(l.bounds.y),"z-index":u.length+1}),p.indexOf(i.id)>=0||f.addClass("shape-contour-hover");for(var d=t.size-2,y={"border-color":t.color,"border-radius":t.size/2,width:d,height:d},m=c.getAnchors(),g={x:l.bounds.width/2,y:l.bounds.height/2},v=0;v").appendTo(f),w=o.a.getRotated(g,x,c.shapeStyle.angle);y.left=Object(s.k)(w.x)-t.size/2,y.top=Object(s.k)(w.y)-t.size/2,b.css(y)}}}},{key:"moveAnchors",value:function(e){for(var t=e.elements,n=(e.pos,0);n20||Math.abs(t.y-d.y)>20?(r.a.trigger("element.add",f),null==f.data.targetRef&&null!=f.data.sourceRef&&r.a.trigger("group.connection.show",f)):l.find('.shape-box[data-id="'+f.data.id+'"]').remove(),Object(a.a)(document).off("mouseup.dropConnection")})}),Object(a.a)(document).on("mouseup.connection",function(){r.a.trigger("anchor.point.remove"),t.reset(),u.off("mousedown.connection"),u.off("mousemove.connection"),Object(a.a)(document).off("mouseup.connection")})})}},{key:"showAnchorPoint",value:function(e){var t=this.config,n=this.$container,i=r.a.trigger("orders.get"),o=n.find(".bpd-designer"),s=o.find(".anchor-point");if(0===s.length){s=Object(a.a)("").appendTo(o);var l=s[0].getContext("2d");l.translate(1,1),l.lineWidth=1,l.globalAlpha=.3,l.strokeStyle=t.color,l.fillStyle=t.color,l.beginPath(),l.moveTo(0,15),l.bezierCurveTo(0,-5,30,-5,30,15),l.bezierCurveTo(30,35,0,35,0,15),l.closePath(),l.fill(),l.stroke()}s.css({left:e.x-16,top:e.y-16,"z-index":i.length}).show()}},{key:"hideAnchorPoint",value:function(){this.$container.find(".anchor-point").remove()}},{key:"createConnection",value:function(e,t){var n=r.a.trigger("element.create",{name:"",type:"SequenceFlow",prefix:"obj"}),i=n.data,a=n.plane;return i.sourceRef=e.id,a.waypoint.length>1?a.waypoint[a.waypoint.length-1]={$type:"dc:Point",x:t.x,y:t.y,angle:null}:(a.waypoint[0]={$type:"dc:Point",x:e.x,y:e.y,angle:e.angle},a.waypoint[1]={$type:"dc:Point",x:t.x,y:t.y,angle:null}),r.a.trigger("connection.render",{element:n}),n}},{key:"destroy",value:function(){this.hideAnchors()}}]),e}();t.a=u},function(e,t,n){"use strict";var i=n(53);t.a=i.a},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=n(0),a=n(2),o=n(1),s=n(3),l=function(){function e(e,t){for(var n=0;n").appendTo(l));var t=s.a.getRelativePos(e.pageX,e.pageY,l),i={"z-index":c.length,left:t.x,top:t.y};t.x>r.x&&(i.left=r.x),t.y>r.y&&(i.top=r.y),i.width=Math.abs(t.x-r.x),i.height=Math.abs(t.y-r.y),n.css(i)}),Object(a.a)(document).off("mouseup.multiselect").on("mouseup.multiselect",function(e){if(null!=n){var r={x:Object(o.i)(n.position().left),y:Object(o.i)(n.position().top),width:Object(o.i)(n.width()),height:Object(o.i)(n.height())},l=s.a.getElementIdsByRange(r);if(e.ctrlKey){var c=u.getSelectedIds();Object(o.h)(l,c)}u.unselect(),u.selectShape({ids:l}),n.remove()}t.reset(),Object(a.a)(document).off("mouseup.multiselect"),i.off("mousemove.multiselect")})}i.off("mousedown.multiselect")})}},{key:"getSelectedIds",value:function(){return this.selectIds}},{key:"getSelected",value:function(){for(var e=[],t=0;t0&&!h&&this.renderSelectBox(p),this.config.onSelected&&(1===p.length?this.config.onSelected(Object(o.j)(this.getSelected()[0])):this.config.onSelected(null)),r.a.trigger("direction.show")}}},{key:"renderSelectBox",value:function(e){var t=this.$container,n=(t.find(".bpd-layout"),t.find(".bpd-designer")),i=r.a.trigger("orders.get"),l=n.find(".shape-select");0===l.length&&(l=Object(a.a)("
").appendTo(n)),l.show(),r.a.trigger("group.hide",l);var c=0,u={};if(1===e.length){var p=r.a.trigger("element.get",e[0]);u.angle=c=p.shape.shapeStyle.angle,u.zindex=p.shape.shapeStyle.zindex,u.height=p.plane.bounds.height,u.width=p.plane.bounds.width,u.x=p.plane.bounds.x,u.y=p.plane.bounds.y,p.shape.groupName&&"CallActivity"!==p.shape.groupName&&r.a.trigger("group.show",this.getSelected())}else u=s.a.getElementsBox(e);var h=s.a.getRotatedBox(u,c);this.renderControlBound(l,u,h,c),l.css({left:Object(o.k)(h.x),top:Object(o.k)(h.y),width:Object(o.k)(h.width),height:Object(o.k)(h.height),"z-index":i.length,display:"block"})}},{key:"renderControlBound",value:function(e,t,n,i){var r=this.config,a=Object(o.k)(n.width),s=Object(o.k)(n.height),l=a+20,c=s+20,u=e.find(".shape-bound");u.attr({width:l,height:c});var p=u[0].getContext("2d");p.lineJoin="round",p.lineWidth=1,p.strokeStyle=r.color,p.globalAlpha=.5,p.save(),p.clearRect(0,0,l,c),p.translate(l/2,c/2),p.rotate(i),p.translate(-l/2,-c/2),p.translate(9.5,9.5);var h={x:Object(o.k)(Math.round(t.x-n.x)),y:Object(o.k)(Math.round(t.y-n.y)),width:Math.floor(Object(o.k)(t.width)+1),heigth:Math.floor(Object(o.k)(t.height)+1)};p.strokeRect(h.x,h.y,h.width,h.heigth),p.restore()}},{key:"moveSelect",value:function(e){var t=e.elements,n=e.pos,i=s.a.getSelectedConnectionIds();if(1!==t.length||1!==i.length)if(i.length>0){var a=r.a.trigger("shape.select.getIds");this.renderSelectBox(a)}else{var o=this.$container.find(".shape-select");o.css({left:parseFloat(o.css("left"))+n.x,top:parseFloat(o.css("top"))+n.y})}}},{key:"unselect",value:function(){var e=this.selectIds;this.selectIds=[];for(var t=0;t=0}},{key:"destroy",value:function(){var e=this.$container.find(".bpd-layout");this.$container.find(".bpd-designer").off("mousedown.select"),e.off("mousedown.multiselect")}}]),e}();t.a=u},function(e,t,n){"use strict";var i=n(55);t.a=i.a},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=n(0),a=n(2),o=n(3),s=n(1),l=function(){function e(e,t){for(var n=0;n=0?(null!=p.sourceRef&&n.indexOf(p.sourceRef)>=0&&(h.waypoint[0].x+=l.x,h.waypoint[0].y+=l.y,d=!0),null!=p.targetRef&&n.indexOf(p.targetRef)>=0&&(h.waypoint[h.waypoint.length-1].x+=l.x,h.waypoint[h.waypoint.length-1].y+=l.y,y=!0)):((null==p.sourceRef||n.indexOf(p.sourceRef)>=0)&&(h.waypoint[0].x+=l.x,h.waypoint[0].y+=l.y,d=!0),(null==p.targetRef||n.indexOf(p.targetRef)>=0)&&(h.waypoint[h.waypoint.length-1].x+=l.x,h.waypoint[h.waypoint.length-1].y+=l.y,y=!0)),d&&y){for(var m=0;m=c.x-6&&p.x<=c.x+6&&(l.x=c.x),p.y>=c.y-6&&p.y<=c.y+6&&(l.y=c.y))):(e.data.targetRef=h,c.x=p.x,c.y=p.y,c.angle=p.angle,null==h&&(p.x>=l.x-6&&p.x<=l.x+6&&(c.x=l.x),p.y>=l.y-6&&p.y<=l.y+6&&(c.y=l.y))),r.a.trigger("connection.render",{element:e,rendered:!0})}},{key:"moveDom",value:function(e,t,n){var i=e.data,r=e.plane;e.shape;r.bounds.x+=t.x,r.bounds.y+=t.y;var a=this.$container.find('.shape-box[data-id="'+i.id+'"]');a.css({left:parseFloat(a.css("left"))+n.x,top:parseFloat(a.css("top"))+n.y})}},{key:"destroy",value:function(){this.$container.find(".bpd-designer").off("mousedown.drag").off("mousedown.dragconnection")}}]),e}();t.a=c},function(e,t,n){"use strict";var i=n(57);t.a=i.a},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=n(0),a=n(2),o=(n(3),n(1)),s=function(){function e(e,t){for(var n=0;n=0;v--){var x=l[v].id,b=r.a.trigger("element.get",x),w=(b.data,b.plane),E=b.shape;if(!("SequenceFlow"===E.bpmnName||t.indexOf(x)>=0||E.parent)){var S=w.bounds;if(null==g.h){var k=S.y,C=S.y+S.height/2,A=S.y+S.height;C>=m-2&&C<=m+2?(g.h={type:"middle",y:C},e.y=C-e.height/2):k>=p-2&&k<=p+2?(g.h={type:"top",y:k},e.y=k):A>=h-2&&A<=h+2?(g.h={type:"bottom",y:A},e.y=A-e.height):A>=p-2&&A<=p+2?(g.h={type:"top",y:A},e.y=A):k>=h-2&&k<=h+2&&(g.h={type:"bottom",y:k},e.y=k-e.height)}if(null==g.v){var O=S.x,R=S.x+S.width/2,P=S.x+S.width;R>=y-2&&R<=y+2?(g.v={type:"center",x:R},e.x=R-e.width/2):O>=f-2&&O<=f+2?(g.v={type:"left",x:O},e.x=O):P>=d-2&&P<=d+2?(g.v={type:"right",x:P},e.x=P-e.width):P>=f-2&&P<=f+2?(g.v={type:"left",x:P},e.x=P):O>=d-2&&O<=d+2&&(g.v={type:"right",x:O},e.x=O-e.width)}if(null!=g.h&&null!=g.v)break}}if(this.hideSnapLine(),null!=g.attach){var T=u.find(".snapline-attach");0===T.length&&(T=Object(a.a)("
").appendTo(u));var j=g.attach,M=j.lineStyle.lineWidth;T.css({width:Object(o.k)(j.props.w+M),height:Object(o.k)(j.props.h+M),left:Object(o.k)(j.props.x-M/2)-2,top:Object(o.k)(j.props.y-M/2)-2,"z-index":Object(a.a)("#"+j.id).css("z-index")}).show()}if(null!=g.h){var N=u.find(".snapline-attach-h");0===N.length&&(N=Object(a.a)("
").appendTo(u)),N.css({width:u.width(),left:0,top:Math.round(Object(o.k)(g.h.y)),"z-index":l.length+1}).show()}if(null!=g.v){var D=u.find(".snapline-attach-v");0===D.length&&(D=Object(a.a)("
").appendTo(u)),D.css({height:u.height(),top:0,left:Math.round(Object(o.k)(g.v.x)),"z-index":l.length+1}).show()}return g}},{key:"showSnapLine",value:function(e){var t=e.size,n=e.ids,i=e.render,r=e.element;this.renderSnapLine(t,n,i,r)}},{key:"hideSnapLine",value:function(){var e=this.$container,t=e.find(".bpd-designer");t.find(".snapline-attach-h").hide(),t.find(".snapline-attach-v").hide(),t.find(".snapline-attach").hide()}}]),e}();t.a=c},function(e,t,n){"use strict";var i=n(59);t.a=i.a},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=n(0),a=n(2),o=(n(3),n(1)),s=function(){function e(e,t){for(var n=0;n").appendTo(n)),e||(e="X: "+Math.round(Object(o.i)(s.left))+"  Y: "+Math.round(Object(o.i)(s.top))),c.html(e),c.css({top:s.top+i.height()+5,left:s.left+i.width()/2-c.outerWidth()/2,"z-index":l.length}).show()}},{key:"hideTooltip",value:function(){this.$container.find(".shape-tooltip").hide()}}]),e}();t.a=c},function(e,t,n){"use strict";var i=n(61);t.a=i.a},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=n(0),a=n(2),o=function(){function e(e,t){for(var n=0;n=0&&(r.x=t.originalEvent.targetTouches[0].clientX,r.y=t.originalEvent.targetTouches[0].clientY),e.moveHand(i,r)}),Object(a.a)(document).on("touchend.hand mouseup.hand",function(){e.flag=!1})}},{key:"moveHand",value:function(e,t){var n=this,i=this.pageStyle,r=this.$container,a=r.find(".bpd-layout");this.$container.on("touchmove.hand mousemove.hand",function(r){if(n.flag){var o=r.clientX-t.x,s=r.clientY-t.y;r.type.indexOf("touch")>=0&&(o=r.originalEvent.targetTouches[0].clientX-t.x,s=r.originalEvent.targetTouches[0].clientY-t.y);var l=e.top+s;l>0?l=0:l<-i.height&&(l=-i.height+window.innerHeight);var c=e.left+o;c>0?c=0:c<-i.width&&(c=-i.width+window.innerWidth),a.offset({top:l,left:c})}})}},{key:"destroyHand",value:function(){this.$container.off("mousedown.hand touchstart.hand mousemove.hand touchmove.hand"),Object(a.a)(document).off("mouseup.hand touchend.hand")}}]),e}();t.a=s},function(e,t,n){"use strict";var i=n(63);t.a=i.a},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=n(0),a=n(2),o=n(3),s=n(1),l=function(){function e(e,t){for(var n=0;n0){var h=l.find(".group-icon");h.length<=0&&(h=Object(a.a)("
").appendTo(l));for(var f=r.a.trigger("group.get",u.groupName)||[],d=[],y=0;y').appendTo(h);for(var y=r.a.trigger("group.get",e),m=0;m').appendTo(d);this.renderItem(x.children("canvas")[0],v)}}d.on("mousedown",function(e){e.stopPropagation()})}return d.css({left:t,top:n,"z-index":f.length+1}).show(),d.children(".group-item").off().on("click",function(){var e=Object(a.a)(this).attr("data-shape");i(e),d.hide(),Object(a.a)(document).off("mousedown.group-panel")}),Object(a.a)(document).on("mousedown.group-panel",function(){d.hide(),Object(a.a)(document).off("mousedown.group-panel")}),d}},{key:"hideGroup",value:function(e){(e||this.$container).find(".group-icon").hide()}},{key:"showConnectionGroup",value:function(e){var t=this.$container,n=(this.config,this.bpmns),i=this.filter,o=(e.data,e.plane),l=(e.shape,this),c=r.a.trigger("orders.get"),p=t.find(".bpd-designer");t.find(".connection-group-panel").hide();var h=t.find('.connection-group-panel[data-group="bpmn"]');if(0===h.length){h=Object(a.a)("
").appendTo(p);var f=r.a.trigger("group.get");for(var d in f){for(var y=[],m=0;m0){var g=f[d][0],v=r.a.trigger("shape.create",{type:g,element:Object(s.c)(u)});v.data.text=r.a.trigger("i18n","bpmn."+v.shape.bpmnName),this.renderConnectionItem(v,y,h)}}h.on("mousemove",function(e){e.stopPropagation()}).on("mousedown",function(e){e.stopPropagation()})}h.css({left:Object(s.k)(o.waypoint[o.waypoint.length-1].x),top:Object(s.k)(o.waypoint[o.waypoint.length-1].y),"z-index":c.length}).show(),h.find(".group-icon").off().on("mousedown",function(t){t.stopPropagation();var n=Object(a.a)(this).data("group"),i=Object(a.a)(this).parent().position(),r=h.position(),o=r.left+i.left+Object(a.a)(this).parent().outerWidth()-10,s=r.top+i.top+Object(a.a)(this).parent().outerHeight();l.groupPanel(n,o,s,function(t){l.renderShape(e,t),h.hide(),Object(a.a)(document).off("mousedown.dashboard")})}).on("click",function(e){e.stopPropagation()}),h.children(".group-item").off().on("click",function(){h.hide(),Object(a.a)(document).off("mousedown.dashboard"),l.renderShape(e,Object(a.a)(this).data("shape"))}),Object(a.a)(document).on("mousedown.dashboard",function(){h.hide(),Object(a.a)(document).off("mousedown.dashboard")})}},{key:"renderShape",value:function(e,t){var n=e.plane.waypoint,i=o.a.getEndpointAngle(e.shape,"targetRef"),a=o.a.getAngleDir(i),s=r.a.trigger("i18n","bpmn."+t),l=r.a.trigger("element.create",{name:s,type:t,prefix:"obj"}),c=l.shape.getAnchors(),u=void 0,p=null;switch(a){case 1:p=null;for(var h=0;hp)&&(p=y.x,u=y)}break;case 3:p=null;for(var m=0;mp)&&(p=g.y,u=g)}break;case 4:p=null;for(var v=0;v").appendTo(n);this.renderItem(s.children("canvas")[0],e),t.length>1&&s.append("
")}},{key:"renderItem",value:function(e,t){var n=this.config,i=(t.data,t.plane),a=t.shape,o=e.getContext("2d"),l={x:0,y:0,width:i.bounds.width,height:i.bounds.height};o.clearRect(0,0,n.width,n.height),(l.width>=n.width||l.height>=n.width)&&(i.bounds.width>=i.bounds.height?(l.width=n.width-2*a.lineStyle.lineWidth,l.height=parseInt(i.bounds.height/i.bounds.width*l.width),l.height<20&&(l.height=20)):(l.height=n.height-2*a.lineStyle.lineWidth,l.width=parseInt(i.bounds.width/i.bounds.height*l.height),l.width<20&&(l.width=20))),i.bounds=l;for(var c=Object(s.c)(a.getPath()),u={x:l.x+l.width/2,y:l.y+l.height/2},p=0;p0&&t.preventDefault()}),Object(a.a)(document).off("keydown.hotkey","input,textarea,select").on("keydown.hotkey","input,textarea,select",function(e){e.stopPropagation()})}},{key:"bindKey",value:function(e){var t=e.key,n=e.fun,i=t.split("+");if(1===i.length)if("Ctrl"===i[0]||"Alt"===i[0]||"Shift"===i[0])console.log("error: "+i[0]);else{var r=o.a[i[0]];this.funs[r]||(this.funs[r]=[]),this.funs[r].push(n)}else if(2===i.length)if("Ctrl"===i[0]||"Alt"===i[0]||"Shift"===i[0])if("Ctrl"!==i[1]&&"Alt"!==i[1]&&"Shift"!==i[1]){var a=this.funs[i[0]],s=o.a[i[1]];a[s]||(a[s]=[]),a[s].push(n)}else console.log("组合键2错误");else console.log("组合键1错误");else console.log("组合键数量错误")}},{key:"clearKey",value:function(){this.cancel(),this.funs={Ctrl:{},Alt:{},Shift:{}}}},{key:"cancel",value:function(){Object(a.a)(document).off("keydown.hotkey")}}]),e}();t.a=l},function(e,t,n){"use strict";t.a={0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,Esc:27,BackSpace:8,Tab:9,Spacebar:32,Shift:16,Enter:13,Control:17,Alt:18,Left:37,Up:38,Right:39,Down:40,Insert:45,Delete:46,End:35,Home:36,PageUp:33,PageDown:34}},function(e,t,n){"use strict";var i=n(68);t.a=i.a},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=n(0),a=n(69),o=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"zh_CN";i(this,e),this.local=t,this.init()}return o(e,[{key:"init",value:function(){r.a.on("i18n",this.t.bind(this)),r.a.on("i18n.change",this.change.bind(this))}},{key:"t",value:function(e){for(var t=e.split("."),n=a.a[this.local],i=0;i0&&void 0!==arguments[0]?arguments[0]:"zh_CN";this.local=e}}]),e}();t.a=s},function(e,t,n){"use strict";var i=n(70),r=n(71);t.a={zh_CN:i.a,zh_TW:r.a}},function(e,t,n){"use strict";t.a={bpmn:{StartEvent:"开始事件",MessageStartEvent:"消息开始事件",TimerStartEvent:"时间开始事件",SignalStartEvent:"信号开始事件",UserTask:"人工任务",ServiceTask:"系统任务",ScriptTask:"脚本任务",ManualTask:"手工任务",BusinessRuleTask:"业务规则任务",SendTask:"发送任务",ReceiveTask:"接收任务",ParallelGateway:"并行网关",InclusiveGateway:"包容网关",ExclusiveGateway:"排他网关",EventBasedGateway:"事件网关",ComplexGateway:"复杂网关",IntermediateCatchEvent:"捕获中间事件",TimerIntermediateCatchEvent:"捕获时间事件",MessageIntermediateCatchEvent:"捕获消息事件",SignalIntermediateCatchEvent:"捕获信号事件",IntermediateThrowingEvent:"抛出中间事件",MessageIntermediateThrowingEvent:"抛出消息事件",SignalIntermediateThrowingEvent:"抛出信号事件",CompensateIntermediateThrowingEvent:"抛出补偿事件",BoundaryEvent:"边界事件",CancelBoundaryEvent:"边界取消事件",CompensateBoundaryEvent:"边界补偿事件",ErrorBoundaryEvent:"边界错误事件",MessageBoundaryEvent:"边界消息事件",SignalBoundaryEvent:"边界信号事件",TimerBoundaryEvent:"边界时间事件",CallActivity:"调用子流程",SubProcess:"子流程",Transaction:"事务",TextAnnotation:"注释",HorizontalPool:"泳池",HorizontalLane:"泳道",VerticalPool:"泳池",VerticalLane:"泳道",EndEvent:"结束事件",TerminateEndEvent:"终止事件",MessageEndEvent:"消息结束事件",SignalEndEvent:"信号结束事件",ErrorEndEvent:"错误结束事件",CancelEndEvent:"结束取消事件",CompensateEndEvent:"结束补偿事件"}}},function(e,t,n){"use strict";t.a={bpmn:{StartEvent:"開始事件",MessageStartEvent:"消息開始事件",TimerStartEvent:"時間開始事件",SignalStartEvent:"信號開始事件",UserTask:"人工任務",ServiceTask:"系統任務",ScriptTask:"腳本任務",ManualTask:"手工任務",BusinessRuleTask:"業務規則任務",SendTask:"發送任務",ReceiveTask:"接收任務",ParallelGateway:"並行網關",InclusiveGateway:"包容網關",ExclusiveGateway:"排他網關",EventBasedGateway:"事件網關",ComplexGateway:"復雜網關",IntermediateCatchEvent:"捕獲中間事件",TimerIntermediateCatchEvent:"捕獲時間事件",MessageIntermediateCatchEvent:"捕獲消息事件",SignalIntermediateCatchEvent:"捕獲信號事件",IntermediateThrowingEvent:"拋出中間事件",MessageIntermediateThrowingEvent:"拋出消息事件",SignalIntermediateThrowingEvent:"拋出信號事件",CompensateIntermediateThrowingEvent:"拋出補償事件",BoundaryEvent:"邊界事件",CancelBoundaryEvent:"邊界取消事件",CompensateBoundaryEvent:"邊界補償事件",ErrorBoundaryEvent:"邊界錯誤事件",MessageBoundaryEvent:"邊界消息事件",SignalBoundaryEvent:"邊界信號事件",TimerBoundaryEvent:"邊界時間事件",CallActivity:"調用子流程",SubProcess:"子流程",Transaction:"事務",TextAnnotation:"註釋",HorizontalPool:"泳池",HorizontalLane:"泳道",VerticalPool:"泳池",VerticalLane:"泳道",EndEvent:"結束事件",TerminateEndEvent:"終止事件",MessageEndEvent:"消息結束事件",SignalEndEvent:"信號結束事件",ErrorEndEvent:"錯誤結束事件",CancelEndEvent:"結束取消事件",CompensateEndEvent:"結束補償事件"}}}])}); \ No newline at end of file +!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var i in n)("object"==typeof exports?exports:e)[i]=n[i]}}("undefined"!=typeof self?self:this,function(){return function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=9)}([function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=n(1),a=function(){function e(e,t){for(var n=0;n0?e.toLowerCase():null)},s=function(){function e(){i(this,e),this.fns=[],this.datas=[]}return a(e,[{key:"add",value:function(e,t){this.fns.push(e),this.datas.push(t)}},{key:"remove",value:function(e){var t=this.fns.indexOf(e);t>=0&&(this.fns.splice(t,1),this.datas.splice(t,1))}},{key:"invoke",value:function(e,t){var n=this,i=null;return this.fns.forEach(function(r,a){try{i=r(e,t,n.datas[a])}catch(e){console.error(e)}}),i}}]),e}(),l=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,e),this.handers=t}return a(e,[{key:"on",value:function(e,t,n){if(null==(e=o(e)))throw new Error("事件名无效");if(!Object(r.f)(n)){var i=n;n=t,t=i}if(!Object(r.f)(n))throw new Error("必须提供事件函数");var a=this.handers[e];null==a&&(a=new s,this.handers[e]=a),a.add(n,t)}},{key:"off",value:function(e,t){if(null!=(e=o(e))){var n=this.handers[e];null!=n&&(null==t?delete this.handers[e]:n.remove(t))}}},{key:"destroy",value:function(){this.handers={}}},{key:"trigger",value:function(e,t,n){if(null!=(e=o(e))){var i=this.handers[e];return null!=i?i.invoke(t,n):void 0}}}]),e}(),c=new l;t.a=c},function(e,t,n){"use strict";n.d(t,"g",function(){return r}),n.d(t,"f",function(){return a}),n.d(t,"d",function(){return o}),n.d(t,"c",function(){return s}),n.d(t,"h",function(){return l}),n.d(t,"k",function(){return c}),n.d(t,"i",function(){return u}),n.d(t,"e",function(){return p}),n.d(t,"a",function(){return h}),n.d(t,"b",function(){return f}),n.d(t,"j",function(){return d});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=document.createElement("span");n.innerHTML="",n.style.visibility="hidden",n.style.fontSize="500px",document.body.appendChild(n);var i=n.offsetWidth,r=n.offsetHeight;n.style.fontFamily=e;var a=setInterval(function(){n.offsetWidth===i&&n.offsetHeight===r||(clearInterval(a),document.body.removeChild(n),n=null,t())},50)},a=function(e){return"function"==typeof e},o=function(e,t){return"uppercase"===t?e.substring(0,1).toUpperCase()+e.substring(1):e.substring(0,1).toLowerCase()+e.substring(1)},s=function(e){return JSON.parse(JSON.stringify(e))},l=function(e,t){for(var n=[],i=e.concat(t),r=0;r1&&void 0!==arguments[1]?arguments[1]:1;if("object"===(void 0===t?"undefined":i(t))){var r={};for(var a in t)r[a]=t[a],"number"==typeof t[a]&&(r[a]=e(r[a],n));return r}return t*n},u=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if("object"===(void 0===t?"undefined":i(t))){var r={};for(var a in t)r[a]=t[a],"number"==typeof t[a]&&(r[a]=e(r[a],n));return r}return t/n},p=function(e){return e.indexOf(":")>=0?e.substr(e.indexOf(":")+1):""},h={font:function(e,t){var n=t.fontStyle,i=t.fontVariant,r=t.fontWeight,a=t.fontSize,o=t.fontFamily,s=t.content,l=t.fontColor,c=t.textAlign,u=t.textBaseline,p=t.x,h=t.y;c&&(e.textAlign=c),u&&(e.textBaseline=u),l&&(e.fillStyle=l),e.font=n+" "+i+" "+r+" "+a+" "+o,e.fillText(s,p,h)},move:function(e,t){e.moveTo(t.x,t.y)},line:function(e,t){e.lineTo(t.x,t.y)},curve:function(e,t){e.bezierCurveTo(t.x1,t.y1,t.x2,t.y2,t.x,t.y)},quadraticCurve:function(e,t){e.quadraticCurveTo(t.x1,t.y1,t.x,t.y)},close:function(e){e.closePath()}},f=function(e,t,n){var i="";return e.forEach(function(n,r){t.indexOf(n)<0&&(i+=n+(r!==e.length?",":""))}),-1===i.indexOf(n)},d=function(e){var t={};if("bpmn:Process"===e.$type)t.id=e.id,t.extensions=y(e.extensionElements.values||[]);else{var n=e.data,i=e.shape;t.bpmnName=i.bpmnName,t.groupName=i.groupName;for(var r in n)switch(r){case"$type":break;case"extensionElements":t.extensions=y(n[r].values||[]);break;default:t[r]=n[r]}}return t},y=function(e){for(var t=[],n=0;n0&&n-1 in e)}function r(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}function a(e,t,n){return re(t)?se.grep(e,function(e,i){return!!t.call(e,i,e)!==n}):t.nodeType?se.grep(e,function(e){return e===t!==n}):"string"!=typeof t?se.grep(e,function(e){return J.call(t,e)>-1!==n}):se.filter(t,e,n)}function o(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function s(e){var t={};return se.each(e.match(ve)||[],function(e,n){t[n]=!0}),t}function l(e){return e}function c(e){throw e}function u(e,t,n,i){var r;try{e&&re(r=e.promise)?r.call(e).done(t).fail(n):e&&re(r=e.then)?r.call(e,t,n):t.apply(void 0,[e].slice(i))}catch(e){n.apply(void 0,[e])}}function p(){V.removeEventListener("DOMContentLoaded",p),window.removeEventListener("load",p),se.ready()}function h(e,t){return t.toUpperCase()}function f(e){return e.replace(Ee,"ms-").replace(Se,h)}function d(){this.expando=se.expando+d.uid++}function y(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:Oe.test(e)?JSON.parse(e):e)}function m(e,t,n){var i;if(void 0===n&&1===e.nodeType)if(i="data-"+t.replace(Re,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(i))){try{n=y(n)}catch(e){}Ae.set(e,t,n)}else n=void 0;return n}function g(e,t,n,i){var r,a,o=20,s=i?function(){return i.cur()}:function(){return se.css(e,t,"")},l=s(),c=n&&n[3]||(se.cssNumber[t]?"":"px"),u=(se.cssNumber[t]||"px"!==c&&+l)&&Te.exec(se.css(e,t));if(u&&u[3]!==c){for(l/=2,c=c||u[3],u=+l||1;o--;)se.style(e,t,u+c),(1-a)*(1-(a=s()/l||.5))<=0&&(o=0),u/=a;u*=2,se.style(e,t,u+c),n=n||[]}return n&&(u=+u||+l||0,r=n[1]?u+(n[1]+1)*n[2]:+n[2],i&&(i.unit=c,i.start=u,i.end=r)),r}function v(e){var t,n=e.ownerDocument,i=e.nodeName,r=De[i];return r||(t=n.body.appendChild(n.createElement(i)),r=se.css(t,"display"),t.parentNode.removeChild(t),"none"===r&&(r="block"),De[i]=r,r)}function x(e,t){for(var n,i,r=[],a=0,o=e.length;a-1)a&&a.push(o);else if(u=se.contains(o.ownerDocument,o),s=b(h.appendChild(o),"script"),u&&w(s),i)for(p=0;o=s[p++];)Le.test(o.type||"")&&i.push(o);return h}function S(){return!0}function k(){return!1}function C(){try{return V.activeElement}catch(e){}}function A(e,t,n,r,a,o){var s,l;if("object"===(void 0===t?"undefined":i(t))){"string"!=typeof n&&(r=r||n,n=void 0);for(l in t)A(e,l,n,r,t[l],o);return e}if(null==r&&null==a?(a=n,r=n=void 0):null==a&&("string"==typeof n?(a=r,r=void 0):(a=r,r=n,n=void 0)),!1===a)a=k;else if(!a)return e;return 1===o&&(s=a,a=function(e){return se().off(e),s.apply(this,arguments)},a.guid=s.guid||(s.guid=se.guid++)),e.each(function(){se.event.add(this,t,a,r,n)})}function O(e,t){return r(e,"table")&&r(11!==t.nodeType?t:t.firstChild,"tr")?se(e).children("tbody")[0]||e:e}function R(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function P(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function T(e,t){var n,i,r,a,o,s,l,c;if(1===t.nodeType){if(Ce.hasData(e)&&(a=Ce.access(e),o=Ce.set(t,a),c=a.events)){delete o.handle,o.events={};for(r in c)for(n=0,i=c[r].length;n1&&"string"==typeof d&&!ie.checkClone&&Ve.test(d))return t.each(function(e){var a=t.eq(e);y&&(n[0]=d.call(this,e,a.html())),M(a,n,i,r)});if(h&&(a=E(n,t[0].ownerDocument,!1,t,r),o=a.firstChild,1===a.childNodes.length&&(a=o),o||r)){for(s=se.map(b(a,"script"),R),l=s.length;p=0&&(l+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-a-l-s-.5))),l}function F(e,t,n){var i=Ke(e),r=D(e,t,i),a="border-box"===se.css(e,"boxSizing",!1,i),o=a;if(Xe.test(r)){if(!n)return r;r="auto"}return o=o&&(ie.boxSizingReliable()||r===e.style[t]),("auto"===r||!parseFloat(r)&&"inline"===se.css(e,"display",!1,i))&&(r=e["offset"+t[0].toUpperCase()+t.slice(1)],o=!0),(r=parseFloat(r)||0)+_(e,t,n||(a?"border":"content"),o,i,r)+"px"}function q(e){return(e.match(ve)||[]).join(" ")}function z(e){return e.getAttribute&&e.getAttribute("class")||""}function W(e){return Array.isArray(e)?e:"string"==typeof e?e.match(ve)||[]:[]}function H(e,n,r,a){var o;if(Array.isArray(n))se.each(n,function(t,n){r||ut.test(e)?a(e,n):H(e+"["+("object"===(void 0===n?"undefined":i(n))&&null!=n?t:"")+"]",n,r,a)});else if(r||"object"!==t(n))a(e,n);else for(o in n)H(e+"["+o+"]",n[o],r,a)}var G=[],V=window.document,U=Object.getPrototypeOf,X=G.slice,K=G.concat,Y=G.push,J=G.indexOf,Q={},Z=Q.toString,ee=Q.hasOwnProperty,te=ee.toString,ne=te.call(Object),ie={},re=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},ae=function(e){return null!=e&&e===e.window},oe={type:!0,src:!0,noModule:!0},se=function e(t,n){return new e.fn.Init(t,n)},le=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;se.fn=se.prototype={slimJQ:"3.3.1",constructor:se,length:0,toArray:function(){return X.call(this)},get:function(e){return null==e?X.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=se.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return se.each(this,e)},map:function(e){return this.pushStack(se.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(X.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&nw.cacheLength&&delete e[t.shift()],e[n+" "]=i}var t=[];return e}function i(e){return e[$]=!0,e}function r(e){var t=j.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function a(e,t){for(var n=e.split("|"),i=n.length;i--;)w.attrHandle[n[i]]=t}function o(e,t){var n=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(i)return i;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&Ee(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function l(e){return i(function(t){return t=+t,i(function(n,i){for(var r,a=e([],n.length,t),o=a.length;o--;)n[r=a[o]]&&(n[r]=!(i[r]=n[r]))})})}function c(e){return e&&void 0!==e.getElementsByTagName&&e}function u(){}function p(e){for(var t=0,n=e.length,i="";t1?function(t,n,i){for(var r=e.length;r--;)if(!e[r](t,n,i))return!1;return!0}:e[0]}function d(e,n,i){for(var r=0,a=n.length;r-1&&(i[c]=!(o[c]=p))}}else x=y(x===o?x.splice(m,x.length):x),a?a(null,o,x,l):Y.apply(o,x)})}function g(e){for(var t,n,i,r=e.length,a=w.relative[e[0].type],o=a||w.relative[" "],s=a?1:0,l=h(function(e){return e===t},o,!0),c=h(function(e){return Q(t,e)>-1},o,!0),u=[function(e,n,i){var r=!a&&(i||n!==O)||((t=n).nodeType?l(e,n,i):c(e,n,i));return t=null,r}];s1&&f(u),s>1&&p(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(ae,"$1"),n,s0,a=e.length>0,o=function(i,o,s,l,c){var u,p,h,f=0,d="0",m=i&&[],g=[],v=O,x=i||a&&w.find.TAG("*",c),b=F+=null==v?1:Math.random()||.1,E=x.length;for(c&&(O=o===j||o||c);d!==E&&null!=(u=x[d]);d++){if(a&&u){for(p=0,o||u.ownerDocument===j||(T(u),s=!N);h=e[p++];)if(h(u,o||j,s)){l.push(u);break}c&&(F=b)}r&&((u=!h&&u)&&f--,i&&m.push(u))}if(f+=d,r&&d!==f){for(p=0;h=n[p++];)h(m,g,o,s);if(i){if(f>0)for(;d--;)m[d]||g[d]||(g[d]=X.call(l));g=y(g)}Y.apply(l,g),c&&!i&&g.length>0&&f+n.length>1&&t.uniqueSort(l)}return c&&(F=b,O=v),m};return r?i(o):o}var x,b,w,E,S,k,C,A,O,R,P,T,j,M,N,D,B,I,L,$="sizzle"+1*new Date,_=e.document,F=0,q=0,z=n(),W=n(),H=n(),G=function(e,t){return e===t&&(P=!0),0},V={}.hasOwnProperty,U=[],X=U.pop,K=U.push,Y=U.push,J=U.slice,Q=function(e,t){for(var n=0,i=e.length;n+~]|"+ee+")"+ee+"*"),le=new RegExp("="+ee+"*([^\\]'\"]*?)"+ee+"*\\]","g"),ce=new RegExp(ie),ue=new RegExp("^"+te+"$"),pe={ID:new RegExp("^#("+te+")"),CLASS:new RegExp("^\\.("+te+")"),TAG:new RegExp("^("+te+"|[*])"),ATTR:new RegExp("^"+ne),PSEUDO:new RegExp("^"+ie),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ee+"*(even|odd|(([+-]|)(\\d*)n|)"+ee+"*(?:([+-]|)"+ee+"*(\\d+)|))"+ee+"*\\)|)","i"),bool:new RegExp("^(?:"+Z+")$","i"),needsContext:new RegExp("^"+ee+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ee+"*((?:-\\d)?\\d*)"+ee+"*\\)|)(?=[^-]|$)","i")},he=/^(?:input|select|textarea|button)$/i,fe=/^h\d$/i,de=/^[^{]+\{\s*\[native \w/,ye=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,me=/[+~]/,ge=new RegExp("\\\\([\\da-f]{1,6}"+ee+"?|("+ee+")|.)","ig"),ve=function(e,t,n){var i="0x"+t-65536;return i!==i||n?t:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)},xe=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,be=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},we=function(){T()},Ee=h(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{Y.apply(U=J.call(_.childNodes),_.childNodes),U[_.childNodes.length].nodeType}catch(e){Y={apply:U.length?function(e,t){K.apply(e,J.call(t))}:function(e,t){for(var n=e.length,i=0;e[n++]=t[i++];);e.length=n-1}}}b=t.support={},S=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},T=t.setDocument=function(e){var t,n,i=e?e.ownerDocument||e:_;return i!==j&&9===i.nodeType&&i.documentElement?(j=i,M=j.documentElement,N=!S(j),_!==j&&(n=j.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",we,!1):n.attachEvent&&n.attachEvent("onunload",we)),b.attributes=r(function(e){return e.className="i",!e.getAttribute("className")}),b.getElementsByTagName=r(function(e){return e.appendChild(j.createComment("")),!e.getElementsByTagName("*").length}),b.getElementsByClassName=de.test(j.getElementsByClassName),b.getById=r(function(e){return M.appendChild(e).id=$,!j.getElementsByName||!j.getElementsByName($).length}),b.getById?(w.filter.ID=function(e){var t=e.replace(ge,ve);return function(e){return e.getAttribute("id")===t}},w.find.ID=function(e,t){if(void 0!==t.getElementById&&N){var n=t.getElementById(e);return n?[n]:[]}}):(w.filter.ID=function(e){var t=e.replace(ge,ve);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},w.find.ID=function(e,t){if(void 0!==t.getElementById&&N){var n,i,r,a=t.getElementById(e);if(a){if((n=a.getAttributeNode("id"))&&n.value===e)return[a];for(r=t.getElementsByName(e),i=0;a=r[i++];)if((n=a.getAttributeNode("id"))&&n.value===e)return[a]}return[]}}),w.find.TAG=b.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):b.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,i=[],r=0,a=t.getElementsByTagName(e);if("*"===e){for(;n=a[r++];)1===n.nodeType&&i.push(n);return i}return a},w.find.CLASS=b.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&N)return t.getElementsByClassName(e)},B=[],D=[],(b.qsa=de.test(j.querySelectorAll))&&(r(function(e){M.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&D.push("[*^$]="+ee+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||D.push("\\["+ee+"*(?:value|"+Z+")"),e.querySelectorAll("[id~="+$+"-]").length||D.push("~="),e.querySelectorAll(":checked").length||D.push(":checked"),e.querySelectorAll("a#"+$+"+*").length||D.push(".#.+[+~]")}),r(function(e){e.innerHTML="";var t=j.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&D.push("name"+ee+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&D.push(":enabled",":disabled"),M.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&D.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),D.push(",.*:")})),(b.matchesSelector=de.test(I=M.matches||M.webkitMatchesSelector||M.mozMatchesSelector||M.oMatchesSelector||M.msMatchesSelector))&&r(function(e){b.disconnectedMatch=I.call(e,"*"),I.call(e,"[s!='']:x"),B.push("!=",ie)}),D=D.length&&new RegExp(D.join("|")),B=B.length&&new RegExp(B.join("|")),t=de.test(M.compareDocumentPosition),L=t||de.test(M.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,i=t&&t.parentNode;return e===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):e.compareDocumentPosition&&16&e.compareDocumentPosition(i)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},G=t?function(e,t){if(e===t)return P=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!b.sortDetached&&t.compareDocumentPosition(e)===n?e===j||e.ownerDocument===_&&L(_,e)?-1:t===j||t.ownerDocument===_&&L(_,t)?1:R?Q(R,e)-Q(R,t):0:4&n?-1:1)}:function(e,t){if(e===t)return P=!0,0;var n,i=0,r=e.parentNode,a=t.parentNode,s=[e],l=[t];if(!r||!a)return e===j?-1:t===j?1:r?-1:a?1:R?Q(R,e)-Q(R,t):0;if(r===a)return o(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)l.unshift(n);for(;s[i]===l[i];)i++;return i?o(s[i],l[i]):s[i]===_?-1:l[i]===_?1:0},j):j},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==j&&T(e),n=n.replace(le,"='$1']"),b.matchesSelector&&N&&!H[n+" "]&&(!B||!B.test(n))&&(!D||!D.test(n)))try{var i=I.call(e,n);if(i||b.disconnectedMatch||e.document&&11!==e.document.nodeType)return i}catch(e){}return t(n,j,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==j&&T(e),L(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==j&&T(e);var n=w.attrHandle[t.toLowerCase()],i=n&&V.call(w.attrHandle,t.toLowerCase())?n(e,t,!N):void 0;return void 0!==i?i:b.attributes||!N?e.getAttribute(t):(i=e.getAttributeNode(t))&&i.specified?i.value:null},t.escape=function(e){return(e+"").replace(xe,be)},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],i=0,r=0;if(P=!b.detectDuplicates,R=!b.sortStable&&e.slice(0),e.sort(G),P){for(;t=e[r++];)t===e[r]&&(i=n.push(r));for(;i--;)e.splice(n[i],1)}return R=null,e},E=t.getText=function(e){var t,n="",i=0,r=e.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=E(e)}else if(3===r||4===r)return e.nodeValue}else for(;t=e[i++];)n+=E(t);return n},w=t.selectors={cacheLength:50,createPseudo:i,match:pe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(ge,ve),e[3]=(e[3]||e[4]||e[5]||"").replace(ge,ve),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return pe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&ce.test(n)&&(t=k(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(ge,ve).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=z[e+" "];return t||(t=new RegExp("(^|"+ee+")"+e+"("+ee+"|$)"))&&z(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,i){return function(r){var a=t.attr(r,e);return null==a?"!="===n:!n||(a+="","="===n?a===i:"!="===n?a!==i:"^="===n?i&&0===a.indexOf(i):"*="===n?i&&a.indexOf(i)>-1:"$="===n?i&&a.slice(-i.length)===i:"~="===n?(" "+a.replace(re," ")+" ").indexOf(i)>-1:"|="===n&&(a===i||a.slice(0,i.length+1)===i+"-"))}},CHILD:function(e,t,n,i,r){var a="nth"!==e.slice(0,3),o="last"!==e.slice(-4),s="of-type"===t;return 1===i&&0===r?function(e){return!!e.parentNode}:function(t,n,l){var c,u,p,h,f,d,y=a!==o?"nextSibling":"previousSibling",m=t.parentNode,g=s&&t.nodeName.toLowerCase(),v=!l&&!s,x=!1;if(m){if(a){for(;y;){for(h=t;h=h[y];)if(s?h.nodeName.toLowerCase()===g:1===h.nodeType)return!1;d=y="only"===e&&!d&&"nextSibling"}return!0}if(d=[o?m.firstChild:m.lastChild],o&&v){for(h=m,p=h[$]||(h[$]={}),u=p[h.uniqueID]||(p[h.uniqueID]={}),c=u[e]||[],f=c[0]===F&&c[1],x=f&&c[2],h=f&&m.childNodes[f];h=++f&&h&&h[y]||(x=f=0)||d.pop();)if(1===h.nodeType&&++x&&h===t){u[e]=[F,f,x];break}}else if(v&&(h=t,p=h[$]||(h[$]={}),u=p[h.uniqueID]||(p[h.uniqueID]={}),c=u[e]||[],f=c[0]===F&&c[1],x=f),!1===x)for(;(h=++f&&h&&h[y]||(x=f=0)||d.pop())&&((s?h.nodeName.toLowerCase()!==g:1!==h.nodeType)||!++x||(v&&(p=h[$]||(h[$]={}),u=p[h.uniqueID]||(p[h.uniqueID]={}),u[e]=[F,x]),h!==t)););return(x-=r)===i||x%i==0&&x/i>=0}}},PSEUDO:function(e,n){var r,a=w.pseudos[e]||w.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return a[$]?a(n):a.length>1?(r=[e,e,"",n],w.setFilters.hasOwnProperty(e.toLowerCase())?i(function(e,t){for(var i,r=a(e,n),o=r.length;o--;)i=Q(e,r[o]),e[i]=!(t[i]=r[o])}):function(e){return a(e,0,r)}):a}},pseudos:{not:i(function(e){var t=[],n=[],r=C(e.replace(ae,"$1"));return r[$]?i(function(e,t,n,i){for(var a,o=r(e,null,i,[]),s=e.length;s--;)(a=o[s])&&(e[s]=!(t[s]=a))}):function(e,i,a){return t[0]=e,r(t,null,a,n),t[0]=null,!n.pop()}}),has:i(function(e){return function(n){return t(e,n).length>0}}),contains:i(function(e){return e=e.replace(ge,ve),function(t){return(t.textContent||t.innerText||E(t)).indexOf(e)>-1}}),lang:i(function(e){return ue.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(ge,ve).toLowerCase(),function(t){var n;do{if(n=N?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===M},focus:function(e){return e===j.activeElement&&(!j.hasFocus||j.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:s(!1),disabled:s(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!w.pseudos.empty(e)},header:function(e){return fe.test(e.nodeName)},input:function(e){return he.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:l(function(){return[0]}),last:l(function(e,t){return[t-1]}),eq:l(function(e,t,n){return[n<0?n+t:n]}),even:l(function(e,t){for(var n=0;n=0;)e.push(i);return e}),gt:l(function(e,t,n){for(var i=n<0?n+t:n;++i2&&"ID"===(o=a[0]).type&&9===t.nodeType&&N&&w.relative[a[1].type]){if(!(t=(w.find.ID(o.matches[0].replace(ge,ve),t)||[])[0]))return n;u&&(t=t.parentNode),e=e.slice(a.shift().value.length)}for(r=pe.needsContext.test(e)?0:a.length;r--&&(o=a[r],!w.relative[s=o.type]);)if((l=w.find[s])&&(i=l(o.matches[0].replace(ge,ve),me.test(a[0].type)&&c(t.parentNode)||t))){if(a.splice(r,1),!(e=i.length&&p(a)))return Y.apply(n,i),n;break}}return(u||C(e,h))(i,t,!N,n,!t||me.test(e)&&c(t.parentNode)||t),n},b.sortStable=$.split("").sort(G).join("")===$,b.detectDuplicates=!!P,T(),b.sortDetached=r(function(e){return 1&e.compareDocumentPosition(j.createElement("fieldset"))}),r(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||a("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),b.attributes&&r(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||a("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),r(function(e){return null==e.getAttribute("disabled")})||a(Z,function(e,t,n){var i;if(!n)return!0===e[t]?t.toLowerCase():(i=e.getAttributeNode(t))&&i.specified?i.value:null}),t}(window);se.find=ce,se.expr=ce.selectors,se.expr[":"]=se.expr.pseudos,se.uniqueSort=se.unique=ce.uniqueSort,se.text=ce.getText,se.isXMLDoc=ce.isXML,se.contains=ce.contains,se.escapeSelector=ce.escape;var ue=function(e,t,n){for(var i=[],r=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(r&&se(e).is(n))break;i.push(e)}return i},pe=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},he=se.expr.match.needsContext,fe=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;se.filter=function(e,t,n){var i=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?se.find.matchesSelector(i,e)?[i]:[]:se.find.matches(e,se.grep(t,function(e){return 1===e.nodeType}))},se.fn.extend({find:function(e){var t,n,i=this.length,r=this;if("string"!=typeof e)return this.pushStack(se(e).filter(function(){for(t=0;t1?se.uniqueSort(n):n},filter:function(e){return this.pushStack(a(this,e||[],!1))},not:function(e){return this.pushStack(a(this,e||[],!0))},is:function(e){return!!a(this,"string"==typeof e&&he.test(e)?se(e):e||[],!1).length}});var de,ye=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(se.fn.Init=function(e,t,n){var i,r;if(!e)return this;if(n=n||de,"string"==typeof e){if(!(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:ye.exec(e))||!i[1]&&t)return!t||t.slimJQ?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof se?t[0]:t,se.merge(this,se.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:V,!0)),fe.test(i[1])&&se.isPlainObject(t))for(i in t)re(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return r=V.getElementById(i[2]),r&&(this[0]=r,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):re(e)?void 0!==n.ready?n.ready(e):e(se):se.makeArray(e,this)}).prototype=se.fn,de=se(V);var me=/^(?:parents|prev(?:Until|All))/,ge={children:!0,contents:!0,next:!0,prev:!0};se.fn.extend({has:function(e){var t=se(e,this),n=t.length;return this.filter(function(){for(var e=0;e-1:1===n.nodeType&&se.find.matchesSelector(n,e))){a.push(n);break}return this.pushStack(a.length>1?se.uniqueSort(a):a)},index:function(e){return e?"string"==typeof e?J.call(se(e),this[0]):J.call(this,e.slimJQ?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(se.uniqueSort(se.merge(this.get(),se(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),se.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return ue(e,"parentNode")},parentsUntil:function(e,t,n){return ue(e,"parentNode",n)},next:function(e){return o(e,"nextSibling")},prev:function(e){return o(e,"previousSibling")},nextAll:function(e){return ue(e,"nextSibling")},prevAll:function(e){return ue(e,"previousSibling")},nextUntil:function(e,t,n){return ue(e,"nextSibling",n)},prevUntil:function(e,t,n){return ue(e,"previousSibling",n)},siblings:function(e){return pe((e.parentNode||{}).firstChild,e)},children:function(e){return pe(e.firstChild)},contents:function(e){return r(e,"iframe")?e.contentDocument:(r(e,"template")&&(e=e.content||e),se.merge([],e.childNodes))}},function(e,t){se.fn[e]=function(n,i){var r=se.map(this,t,n);return"Until"!==e.slice(-5)&&(i=n),i&&"string"==typeof i&&(r=se.filter(i,r)),this.length>1&&(ge[e]||se.uniqueSort(r),me.test(e)&&r.reverse()),this.pushStack(r)}});var ve=/[^\x20\t\r\n\f]+/g;se.Callbacks=function(e){e="string"==typeof e?s(e):se.extend({},e);var n,i,r,a,o=[],l=[],c=-1,u=function(){for(a=a||e.once,r=n=!0;l.length;c=-1)for(i=l.shift();++c-1;)o.splice(n,1),n<=c&&c--}),this},has:function(e){return e?se.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return a=l=[],o=i="",this},disabled:function(){return!o},lock:function(){return a=l=[],i||n||(o=i=""),this},locked:function(){return!!a},fireWith:function(e,t){return a||(t=t||[],t=[e,t.slice?t.slice():t],l.push(t),n||u()),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!r}};return p},se.extend({Deferred:function(e){var t=[["notify","progress",se.Callbacks("memory"),se.Callbacks("memory"),2],["resolve","done",se.Callbacks("once memory"),se.Callbacks("once memory"),0,"resolved"],["reject","fail",se.Callbacks("once memory"),se.Callbacks("once memory"),1,"rejected"]],n="pending",r={state:function(){return n},always:function(){return a.done(arguments).fail(arguments),this},catch:function(e){return r.then(null,e)},pipe:function(){var e=arguments;return se.Deferred(function(n){se.each(t,function(t,i){var r=re(e[i[4]])&&e[i[4]];a[i[1]](function(){var e=r&&r.apply(this,arguments);e&&re(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[i[0]+"With"](this,r?[e]:arguments)})}),e=null}).promise()},then:function(e,n,r){function a(e,t,n,r){return function(){var s=this,u=arguments,p=function(){var p,h;if(!(e=o&&(n!==c&&(s=void 0,u=[i]),t.rejectWith(s,u))}};e?h():(se.Deferred.getStackHook&&(h.stackTrace=se.Deferred.getStackHook()),window.setTimeout(h))}}var o=0;return se.Deferred(function(i){t[0][3].add(a(0,i,re(r)?r:l,i.notifyWith)),t[1][3].add(a(0,i,re(e)?e:l)),t[2][3].add(a(0,i,re(n)?n:c))}).promise()},promise:function(e){return null!=e?se.extend(e,r):r}},a={};return se.each(t,function(e,i){var o=i[2],s=i[5];r[i[1]]=o.add,s&&o.add(function(){n=s},t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),o.add(i[3].fire),a[i[0]]=function(){return a[i[0]+"With"](this===a?void 0:this,arguments),this},a[i[0]+"With"]=o.fireWith}),r.promise(a),e&&e.call(a,a),a},when:function(e){var t=arguments.length,n=t,i=Array(n),r=X.call(arguments),a=se.Deferred(),o=function(e){return function(n){i[e]=this,r[e]=arguments.length>1?X.call(arguments):n,--t||a.resolveWith(i,r)}};if(t<=1&&(u(e,a.done(o(n)).resolve,a.reject,!t),"pending"===a.state()||re(r[n]&&r[n].then)))return a.then();for(;n--;)u(r[n],o(n),a.reject);return a.promise()}});var xe=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;se.Deferred.exceptionHook=function(e,t){window.console&&window.console.warn&&e&&xe.test(e.name)&&window.console.warn("SlimJQ.Deferred exception: "+e.message,e.stack,t)},se.readyException=function(e){window.setTimeout(function(){throw e})};var be=se.Deferred();se.fn.ready=function(e){return be.then(e).catch(function(e){se.readyException(e)}),this},se.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--se.readyWait:se.isReady)||(se.isReady=!0,!0!==e&&--se.readyWait>0||be.resolveWith(V,[se]))}}),se.ready.then=be.then,"complete"===V.readyState||"loading"!==V.readyState&&!V.documentElement.doScroll?window.setTimeout(se.ready):(V.addEventListener("DOMContentLoaded",p),window.addEventListener("load",p));var we=function e(n,i,r,a,o,s,l){var c=0,u=n.length,p=null==r;if("object"===t(r)){o=!0;for(c in r)e(n,i,c,r[c],!0,s,l)}else if(void 0!==a&&(o=!0,re(a)||(l=!0),p&&(l?(i.call(n,a),i=null):(p=i,i=function(e,t,n){return p.call(se(e),n)})),i))for(;c1,null,!0)},removeData:function(e){return this.each(function(){Ae.remove(this,e)})}}),se.extend({queue:function(e,t,n){var i;if(e)return t=(t||"fx")+"queue",i=Ce.get(e,t),n&&(!i||Array.isArray(n)?i=Ce.access(e,t,se.makeArray(n)):i.push(n)),i||[]},dequeue:function(e,t){t=t||"fx";var n=se.queue(e,t),i=n.length,r=n.shift(),a=se._queueHooks(e,t),o=function(){se.dequeue(e,t)};"inprogress"===r&&(r=n.shift(),i--),r&&("fx"===t&&n.unshift("inprogress"),delete a.stop,r.call(e,o,a)),!i&&a&&a.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Ce.get(e,n)||Ce.access(e,n,{empty:se.Callbacks("once memory").add(function(){Ce.remove(e,[t+"queue",n])})})}}),se.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length\x20\t\r\n\f]+)/i,Le=/^$|^module$|\/(?:java|ecma)script/i,$e={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};$e.optgroup=$e.option,$e.tbody=$e.tfoot=$e.colgroup=$e.caption=$e.thead,$e.th=$e.td;var _e=/<|&#?\w+;/;!function(){var e=V.createDocumentFragment(),t=e.appendChild(V.createElement("div")),n=V.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),ie.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="",ie.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var Fe=V.documentElement,qe=/^key/,ze=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,We=/^([^.]*)(?:\.(.+)|)/;se.event={global:{},add:function(e,t,n,i,r){var a,o,s,l,c,u,p,h,f,d,y,m=Ce.get(e);if(m)for(n.handler&&(a=n,n=a.handler,r=a.selector),r&&se.find.matchesSelector(Fe,r),n.guid||(n.guid=se.guid++),(l=m.events)||(l=m.events={}),(o=m.handle)||(o=m.handle=function(t){return void 0!==se&&se.event.triggered!==t.type?se.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(ve)||[""],c=t.length;c--;)s=We.exec(t[c])||[],f=y=s[1],d=(s[2]||"").split(".").sort(),f&&(p=se.event.special[f]||{},f=(r?p.delegateType:p.bindType)||f,p=se.event.special[f]||{},u=se.extend({type:f,origType:y,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&se.expr.match.needsContext.test(r),namespace:d.join(".")},a),(h=l[f])||(h=l[f]=[],h.delegateCount=0,p.setup&&!1!==p.setup.call(e,i,d,o)||e.addEventListener&&e.addEventListener(f,o)),p.add&&(p.add.call(e,u),u.handler.guid||(u.handler.guid=n.guid)),r?h.splice(h.delegateCount++,0,u):h.push(u),se.event.global[f]=!0)},remove:function(e,t,n,i,r){var a,o,s,l,c,u,p,h,f,d,y,m=Ce.hasData(e)&&Ce.get(e);if(m&&(l=m.events)){for(t=(t||"").match(ve)||[""],c=t.length;c--;)if(s=We.exec(t[c])||[],f=y=s[1],d=(s[2]||"").split(".").sort(),f){for(p=se.event.special[f]||{},f=(i?p.delegateType:p.bindType)||f,h=l[f]||[],s=s[2]&&new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"),o=a=h.length;a--;)u=h[a],!r&&y!==u.origType||n&&n.guid!==u.guid||s&&!s.test(u.namespace)||i&&i!==u.selector&&("**"!==i||!u.selector)||(h.splice(a,1),u.selector&&h.delegateCount--,p.remove&&p.remove.call(e,u));o&&!h.length&&(p.teardown&&!1!==p.teardown.call(e,d,m.handle)||se.removeEvent(e,f,m.handle),delete l[f])}else for(f in l)se.event.remove(e,f+t[c],n,i,!0);se.isEmptyObject(l)&&Ce.remove(e,"handle events")}},dispatch:function(e){var t,n,i,r,a,o,s=se.event.fix(e),l=new Array(arguments.length),c=(Ce.get(this,"events")||{})[s.type]||[],u=se.event.special[s.type]||{};for(l[0]=s,t=1;t=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==e.type||!0!==c.disabled)){for(a=[],o={},n=0;n-1:se.find(r,this,null,[c]).length),o[r]&&a.push(i);a.length&&s.push({elem:c,handlers:a})}return c=this,l\x20\t\r\n\f]*)[^>]*)\/>/gi,Ge=/\s*$/g;se.extend({htmlPrefilter:function(e){return e.replace(He,"<$1>")},clone:function(e,t,n){var i,r,a,o,s=e.cloneNode(!0),l=se.contains(e.ownerDocument,e);if(!(ie.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||se.isXMLDoc(e)))for(o=b(s),a=b(e),i=0,r=a.length;i0&&w(o,!l&&b(e,"script")),s},cleanData:function(e){for(var t,n,i,r=se.event.special,a=0;void 0!==(n=e[a]);a++)if(ke(n)){if(t=n[Ce.expando]){if(t.events)for(i in t.events)r[i]?se.event.remove(n,i):se.removeEvent(n,i,t.handle);n[Ce.expando]=void 0}n[Ae.expando]&&(n[Ae.expando]=void 0)}}}),se.fn.extend({detach:function(e){return N(this,e,!0)},remove:function(e){return N(this,e)},text:function(e){return we(this,function(e){return void 0===e?se.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return M(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){O(this,e).appendChild(e)}})},prepend:function(){return M(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=O(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return M(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return M(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(se.cleanData(b(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return se.clone(this,e,t)})},html:function(e){return we(this,function(e){var t=this[0]||{},n=0,i=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ge.test(e)&&!$e[(Ie.exec(e)||["",""])[1].toLowerCase()]){e=se.htmlPrefilter(e);try{for(;n1)}}),se.fn.delay=function(e,t){return e=se.fx?se.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var i=window.setTimeout(t,e);n.stop=function(){window.clearTimeout(i)}})},function(){var e=V.createElement("input"),t=V.createElement("select"),n=t.appendChild(V.createElement("option"));e.type="checkbox",ie.checkOn=""!==e.value,ie.optSelected=n.selected,e=V.createElement("input"),e.value="t",e.type="radio",ie.radioValue="t"===e.value}();var it,rt=se.expr.attrHandle;se.fn.extend({attr:function(e,t){return we(this,se.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){se.removeAttr(this,e)})}}),se.extend({attr:function(e,t,n){var i,r,a=e.nodeType;if(3!==a&&8!==a&&2!==a)return void 0===e.getAttribute?se.prop(e,t,n):(1===a&&se.isXMLDoc(e)||(r=se.attrHooks[t.toLowerCase()]||(se.expr.match.bool.test(t)?it:void 0)),void 0!==n?null===n?void se.removeAttr(e,t):r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:(e.setAttribute(t,n+""),n):r&&"get"in r&&null!==(i=r.get(e,t))?i:(i=se.find.attr(e,t),null==i?void 0:i))},attrHooks:{type:{set:function(e,t){if(!ie.radioValue&&"radio"===t&&r(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,i=0,r=t&&t.match(ve);if(r&&1===e.nodeType)for(;n=r[i++];)e.removeAttribute(n)}}),it={set:function(e,t,n){return!1===t?se.removeAttr(e,n):e.setAttribute(n,n),n}},se.each(se.expr.match.bool.source.match(/\w+/g),function(e,t){var n=rt[t]||se.find.attr;rt[t]=function(e,t,i){var r,a,o=t.toLowerCase();return i||(a=rt[o],rt[o]=r,r=null!=n(e,t,i)?o:null,rt[o]=a),r}});var at=/^(?:input|select|textarea|button)$/i,ot=/^(?:a|area)$/i;se.fn.extend({prop:function(e,t){return we(this,se.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[se.propFix[e]||e]})}}),se.extend({prop:function(e,t,n){var i,r,a=e.nodeType;if(3!==a&&8!==a&&2!==a)return 1===a&&se.isXMLDoc(e)||(t=se.propFix[t]||t,r=se.propHooks[t]),void 0!==n?r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:e[t]=n:r&&"get"in r&&null!==(i=r.get(e,t))?i:e[t]},propHooks:{tabIndex:{get:function(e){var t=se.find.attr(e,"tabindex");return t?parseInt(t,10):at.test(e.nodeName)||ot.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),ie.optSelected||(se.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),se.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){se.propFix[this.toLowerCase()]=this}),se.fn.extend({addClass:function(e){var t,n,i,r,a,o,s,l=0;if(re(e))return this.each(function(t){se(this).addClass(e.call(this,t,z(this)))});if(t=W(e),t.length)for(;n=this[l++];)if(r=z(n),i=1===n.nodeType&&" "+q(r)+" "){for(o=0;a=t[o++];)i.indexOf(" "+a+" ")<0&&(i+=a+" ");s=q(i),r!==s&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,i,r,a,o,s,l=0;if(re(e))return this.each(function(t){se(this).removeClass(e.call(this,t,z(this)))});if(!arguments.length)return this.attr("class","");if(t=W(e),t.length)for(;n=this[l++];)if(r=z(n),i=1===n.nodeType&&" "+q(r)+" "){for(o=0;a=t[o++];)for(;i.indexOf(" "+a+" ")>-1;)i=i.replace(" "+a+" "," ");s=q(i),r!==s&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=void 0===e?"undefined":i(e),r="string"===n||Array.isArray(e);return"boolean"==typeof t&&r?t?this.addClass(e):this.removeClass(e):re(e)?this.each(function(n){se(this).toggleClass(e.call(this,n,z(this),t),t)}):this.each(function(){var t,i,a,o;if(r)for(i=0,a=se(this),o=W(e);t=o[i++];)a.hasClass(t)?a.removeClass(t):a.addClass(t);else void 0!==e&&"boolean"!==n||(t=z(this),t&&Ce.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":Ce.get(this,"__className__")||""))})},hasClass:function(e){var t,n,i=0;for(t=" "+e+" ";n=this[i++];)if(1===n.nodeType&&(" "+q(z(n))+" ").indexOf(t)>-1)return!0;return!1}});var st=/\r/g;se.fn.extend({val:function(e){var t,n,i,r=this[0];return arguments.length?(i=re(e),this.each(function(n){var r;1===this.nodeType&&(r=i?e.call(this,n,se(this).val()):e,null==r?r="":"number"==typeof r?r+="":Array.isArray(r)&&(r=se.map(r,function(e){return null==e?"":e+""})),(t=se.valHooks[this.type]||se.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,r,"value")||(this.value=r))})):r?(t=se.valHooks[r.type]||se.valHooks[r.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(r,"value"))?n:(n=r.value,"string"==typeof n?n.replace(st,""):null==n?"":n):void 0}}),se.extend({valHooks:{option:{get:function(e){var t=se.find.attr(e,"value");return null!=t?t:q(se.text(e))}},select:{get:function(e){var t,n,i,a=e.options,o=e.selectedIndex,s="select-one"===e.type,l=s?null:[],c=s?o+1:a.length;for(i=o<0?c:s?o:0;i-1)&&(n=!0);return n||(e.selectedIndex=-1),a}}}}),se.each(["radio","checkbox"],function(){se.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=se.inArray(se(e).val(),t)>-1}},ie.checkOn||(se.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),ie.focusin="onfocusin"in window;var lt=/^(?:focusinfocus|focusoutblur)$/,ct=function(e){e.stopPropagation()};se.extend(se.event,{trigger:function(e,t,n,r){var a,o,s,l,c,u,p,h,f=[n||V],d=ee.call(e,"type")?e.type:e,y=ee.call(e,"namespace")?e.namespace.split("."):[];if(o=h=s=n=n||V,3!==n.nodeType&&8!==n.nodeType&&!lt.test(d+se.event.triggered)&&(d.indexOf(".")>-1&&(y=d.split("."),d=y.shift(),y.sort()),c=d.indexOf(":")<0&&"on"+d,e=e[se.expando]?e:new se.Event(d,"object"===(void 0===e?"undefined":i(e))&&e),e.isTrigger=r?2:3,e.namespace=y.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+y.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:se.makeArray(t,[e]),p=se.event.special[d]||{},r||!p.trigger||!1!==p.trigger.apply(n,t))){if(!r&&!p.noBubble&&!ae(n)){for(l=p.delegateType||d,lt.test(l+d)||(o=o.parentNode);o;o=o.parentNode)f.push(o),s=o;s===(n.ownerDocument||V)&&f.push(s.defaultView||s.parentWindow||window)}for(a=0;(o=f[a++])&&!e.isPropagationStopped();)h=o,e.type=a>1?l:p.bindType||d,u=(Ce.get(o,"events")||{})[e.type]&&Ce.get(o,"handle"),u&&u.apply(o,t),(u=c&&o[c])&&u.apply&&ke(o)&&(e.result=u.apply(o,t),!1===e.result&&e.preventDefault());return e.type=d,r||e.isDefaultPrevented()||p._default&&!1!==p._default.apply(f.pop(),t)||!ke(n)||c&&re(n[d])&&!ae(n)&&(s=n[c],s&&(n[c]=null),se.event.triggered=d,e.isPropagationStopped()&&h.addEventListener(d,ct),n[d](),e.isPropagationStopped()&&h.removeEventListener(d,ct),se.event.triggered=void 0,s&&(n[c]=s)),e.result}},simulate:function(e,t,n){var i=se.extend(new se.Event,n,{type:e,isSimulated:!0});se.event.trigger(i,null,t)}}),se.fn.extend({trigger:function(e,t){return this.each(function(){se.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return se.event.trigger(e,t,n,!0)}}),ie.focusin||se.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){se.event.simulate(t,e.target,se.event.fix(e))};se.event.special[t]={setup:function(){var i=this.ownerDocument||this,r=Ce.access(i,t);r||i.addEventListener(e,n,!0),Ce.access(i,t,(r||0)+1)},teardown:function(){var i=this.ownerDocument||this,r=Ce.access(i,t)-1;r?Ce.access(i,t,r):(i.removeEventListener(e,n,!0),Ce.remove(i,t))}}});var ut=/\[\]$/,pt=/\r?\n/g,ht=/^(?:submit|button|image|reset|file)$/i,ft=/^(?:input|select|textarea|keygen)/i;return se.param=function(e,t){var n,i=[],r=function(e,t){var n=re(t)?t():t;i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(e)||e.slimJQ&&!se.isPlainObject(e))se.each(e,function(){r(this.name,this.value)});else for(n in e)H(n,e[n],t,r);return i.join("&")},se.fn.extend({serialize:function(){return se.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=se.prop(this,"elements");return e?se.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!se(this).is(":disabled")&&ft.test(this.nodeName)&&!ht.test(e)&&(this.checked||!Be.test(e))}).map(function(e,t){var n=se(this).val();return null==n?null:Array.isArray(n)?se.map(n,function(e){return{name:t.name,value:e.replace(pt,"\r\n")}}):{name:t.name,value:n.replace(pt,"\r\n")}}).get()}}),se.fn.extend({wrapAll:function(e){var t;return this[0]&&(re(e)&&(e=e.call(this[0])),t=se(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return re(e)?this.each(function(t){se(this).wrapInner(e.call(this,t))}):this.each(function(){var t=se(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=re(e);return this.each(function(n){se(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){se(this).replaceWith(this.childNodes)}),this}}),se.expr.pseudos.hidden=function(e){return!se.expr.pseudos.visible(e)},se.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},ie.createHTMLDocument=function(){var e=V.implementation.createHTMLDocument("").body;return e.innerHTML="
",2===e.childNodes.length}(),se.parseHTML=function(e,t,n){if("string"!=typeof e)return[];"boolean"==typeof t&&(n=t,t=!1);var i,r,a;return t||(ie.createHTMLDocument?(t=V.implementation.createHTMLDocument(""),i=t.createElement("base"),i.href=V.location.href,t.head.appendChild(i)):t=V),r=fe.exec(e),a=!n&&[],r?[t.createElement(r[1])]:(r=E([e],t,a),a&&a.length&&se(a).remove(),se.merge([],r.childNodes))},se.offset={setOffset:function(e,t,n){var i,r,a,o,s,l,c,u=se.css(e,"position"),p=se(e),h={};"static"===u&&(e.style.position="relative"),s=p.offset(),a=se.css(e,"top"),l=se.css(e,"left"),c=("absolute"===u||"fixed"===u)&&(a+l).indexOf("auto")>-1,c?(i=p.position(),o=i.top,r=i.left):(o=parseFloat(a)||0,r=parseFloat(l)||0),re(t)&&(t=t.call(e,n,se.extend({},s))),null!=t.top&&(h.top=t.top-s.top+o),null!=t.left&&(h.left=t.left-s.left+r),"using"in t?t.using.call(e,h):p.css(h)}},se.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){se.offset.setOffset(this,e,t)});var t,n,i=this[0];return i?i.getClientRects().length?(t=i.getBoundingClientRect(),n=i.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,i=this[0],r={top:0,left:0};if("fixed"===se.css(i,"position"))t=i.getBoundingClientRect();else{for(t=this.offset(),n=i.ownerDocument,e=i.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===se.css(e,"position");)e=e.parentNode;e&&e!==i&&1===e.nodeType&&(r=se(e).offset(),r.top+=se.css(e,"borderTopWidth",!0),r.left+=se.css(e,"borderLeftWidth",!0))}return{top:t.top-r.top-se.css(i,"marginTop",!0),left:t.left-r.left-se.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===se.css(e,"position");)e=e.offsetParent;return e||Fe})}}),se.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;se.fn[e]=function(i){return we(this,function(e,i,r){var a;if(ae(e)?a=e:9===e.nodeType&&(a=e.defaultView),void 0===r)return a?a[t]:e[i];a?a.scrollTo(n?a.pageXOffset:r,n?r:a.pageYOffset):e[i]=r},e,i,arguments.length)}}),se.each(["top","left"],function(e,t){se.cssHooks[t]=B(ie.pixelPosition,function(e,n){if(n)return n=D(e,t),Xe.test(n)?se(e).position()[t]+"px":n})}),se.each({Height:"height",Width:"width"},function(e,t){se.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,i){se.fn[i]=function(r,a){var o=arguments.length&&(n||"boolean"!=typeof r),s=n||(!0===r||!0===a?"margin":"border");return we(this,function(t,n,r){var a;return ae(t)?0===i.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(a=t.documentElement,Math.max(t.body["scroll"+e],a["scroll"+e],t.body["offset"+e],a["offset"+e],a["client"+e])):void 0===r?se.css(t,n,s):se.style(t,n,r,s)},t,o?r:void 0,o)}})}),se.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){se.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),se.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),se.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,i){return this.on(t,e,n,i)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),se.proxy=function(e,t){var n,i,r;if("string"==typeof t&&(n=e[t],t=e,e=n),re(e))return i=X.call(arguments,2),r=function(){return e.apply(t||this,i.concat(X.call(arguments)))},r.guid=e.guid=e.guid||se.guid++,r},se.holdReady=function(e){e?se.readyWait++:se.ready(!0)},se.isArray=Array.isArray,se.parseJSON=JSON.parse,se.nodeName=r,se.isFunction=re,se.isWindow=ae,se.camelCase=f,se.type=t,se.now=Date.now,se.isNumeric=function(e){var t=se.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},se}()},function(e,t,n){"use strict";var i=n(0),r=n(1),a=function(e){var t=Math.PI;return e>=t/4&&e=t/4*3&&e=t/4*5&&ee.y?n=Math.PI-n:t.x=e.x&&t.yt.x2)&&(t.x2=r.x+r.width),(null==t.y2||r.y+r.height>t.y2)&&(t.y2=r.y+r.height)}return{x:t.x1,y:t.y1,width:t.x2-t.x1,height:t.y2-t.y1}},l=function(e,t,n){for(var i=Math.PI/18,r=[],a=0;a<36;a+=1){var o=i*a,s={x:e-Math.cos(o)*n,y:t-Math.sin(o)*n,angle:o};r.push(s)}return r},c=function(e){for(var t=R(e),n=0,i=1;i1&&void 0!==arguments[1]?arguments[1]:60,n=e.split(","),i=parseInt(n[0]),r=parseInt(n[1]),a=parseInt(n[2]),o=Math.round(i+(255-i)/255*t);o>255&&(o=255);var s=Math.round(r+(255-r)/255*t);s>255&&(s=255);var l=Math.round(a+(255-a)/255*t);return l>255&&(l=255),o+","+s+","+l},p=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:13,n=e.split(","),i=parseInt(n[0]),r=parseInt(n[1]),a=parseInt(n[2]),o=Math.round(i-i/255*t);o<0&&(o=0);var s=Math.round(r-r/255*t);s<0&&(s=0);var l=Math.round(a-a/255*t);return l<0&&(l=0),o+","+s+","+l},h=function(e){return p(e,26)},f=function(e){var t=i.a.trigger("element.get"),n=[];for(var r in t){var a=t[r],o=a.plane.bounds;o="SequenceFlow"===a.shape.bpmnName?P(a):L(a),q(o.x,o.y,e)&&q(o.x+o.width,o.y,e)&&q(o.x+o.width,o.y+o.height,e)&&q(o.x,o.y+o.height,e)&&n.push(a.data.id)}return n},d=function(e,t,n){var i=30,r=[],a=n.plane.bounds,o=a.x,s=a.width,l={};return t.x>=o-i&&t.x<=o+s+i?(t.x=o-i&&t.y<=o+s+i?(l.x=e.x+i,t.y=o-i&&t.x<=o+s+i?(t.x=o-i&&t.y<=o+s+i?(l.x=e.x+i,t.y=s.x&&l.x<=u){var h=s.x+s.width/2;t.xp?u+a:p+a,l.ye.x)c.x=e.x+r/2,o.push({x:c.x,y:e.y}),o.push({x:c.x,y:t.y});else{var u=s.y+s.height,p=l.y+l.height;if(c.x=e.x+a,p>=s.y&&l.y<=u){var h=s.y+s.height/2;t.yp?u+a:p+a,l.x+l.width>e.x&&(c.x=l.x+l.width+a)}else t.ye.x&&t.y>e.y)a.push({x:t.x,y:e.y});else if(t.x>e.x&&s.x>e.x)s.x-e.x<60?l.x=e.x+(s.x-e.x)/2:l.x=e.x+r,l.y=t.y-r,a.push({x:l.x,y:e.y}),a.push({x:l.x,y:l.y}),a.push({x:t.x,y:l.y});else if(t.x<=e.x&&t.y>o.y+o.height){var c=o.y+o.height;l.x=e.x+r,t.y-c<60?l.y=c+(t.y-c)/2:l.y=t.y-r,a.push({x:l.x,y:e.y}),a.push({x:l.x,y:l.y}),a.push({x:t.x,y:l.y})}else{var u=s.x+s.width;u>e.x?l.x=u+r:l.x=e.x+r,t.ye.y)a.push({x:t.x,y:e.y});else if(t.x=e.x&&t.y>o.y+o.height){var u=o.y+o.height;l.x=e.x-r,t.y-u<60?l.y=u+(t.y-u)/2:l.y=t.y-r,a.push({x:l.x,y:e.y}),a.push({x:l.x,y:l.y}),a.push({x:t.x,y:l.y})}else s.xe.x&&t.ye.x&&s.x>e.x)s.x-e.x<60?l.x=e.x+(s.x-e.x)/2:l.x=e.x+r,l.y=t.y+r,a.push({x:l.x,y:e.y}),a.push({x:l.x,y:l.y}),a.push({x:t.x,y:l.y});else if(t.x<=e.x&&t.ye.x?l.x=c+r:l.x=e.x+r,t.y>o.y+o.height?l.y=t.y+r:l.y=o.y+o.height+r,a.push({x:l.x,y:e.y}),a.push({x:l.x,y:l.y}),a.push({x:t.x,y:l.y})}return a},S=function(e,t,n,i){var r=30,a=[],o=n.plane.bounds,s=i.plane.bounds,l={},c=s.x+s.width;return t.x=e.x&&t.yo.y+o.height?l.y=t.y+r:l.y=o.y+o.height+r,a.push({x:l.x,y:e.y}),a.push({x:l.x,y:l.y}),a.push({x:t.x,y:l.y})),a},k=function(e,t,n,i){if(null!=n)return{x:e.x-i*Math.cos(e.angle),y:e.y-i*Math.sin(e.angle)};var r=Math.abs(e.y-t.y),a=Math.abs(e.x-t.x),o=Math.atan(r/a),s={};return e.x<=t.x?s.x=e.x+i*Math.cos(o):s.x=e.x-i*Math.cos(o),e.y<=t.y?s.y=e.y+i*Math.sin(o):s.y=e.y-i*Math.sin(o),s},C=function(e,t){var n=e.data,i=n.sourceRef,r=n.targetRef,o=t[i],s=t[r],l=e.plane.waypoint,c=l[0],u=l[l.length-1],p=[];if("broken"===e.linkerType){var h=Math.abs(u.x-c.x),f=Math.abs(u.y-c.y),C=Math.PI,A=30,O=!1,R=void 0,P=void 0,T=void 0,j=void 0,M=void 0;if(null!=i&&null!=r){var N=a(c.angle),D=a(u.angle);1===N&&1===D?(c.yu.y?(R=c,P=u,T=o,j=s,O=!1):(R=u,P=c,T=s,j=o,O=!0),p=m(R,P,T)):2===N&&2===D?(c.y>u.y?(R=c,P=u,T=o,j=s,O=!1):(R=u,P=c,T=s,j=o,O=!0),p=y(R,P,T)):4===N&&4===D?(c.x=C/4&&M=f)p.push({x:R.x,y:P.y});else{var I=f/2;p.push({x:R.x,y:R.y-I}),p.push({x:P.x,y:R.y-I})}else if(p.push({x:R.x,y:R.y-A}),h>=f)if(P.x>=B.x-A&&P.x<=B.x+B.width+A){var L=B.x+B.width/2;P.x=B.x-A&&P.x<=B.x+B.width+A){var $=B.x+B.width/2;P.x<$?(p.push({x:B.x-A,y:R.y-A}),p.push({x:B.x-A,y:P.y-A}),p.push({x:P.x,y:P.y-A})):(p.push({x:B.x+B.width+A,y:R.y-A}),p.push({x:B.x+B.width+A,y:P.y-A}),p.push({x:P.x,y:P.y-A}))}else p.push({x:P.x,y:R.y-A});else if(M>=C/4*3&&MR.x)h>=f?(p.push({x:R.x+h/2,y:R.y}),p.push({x:R.x+h/2,y:P.y})):p.push({x:P.x,y:R.y});else if(p.push({x:R.x+A,y:R.y}),h>=f)if(P.y>=B.y-A&&P.y<=B.y+B.height+A){var F=B.y+B.height/2;P.y=B.y-A&&P.y<=B.y+B.height+A){var q=B.y+B.height/2;P.y=C/4*5&&MR.y)h>=f?p.push({x:R.x,y:P.y}):(p.push({x:R.x,y:R.y+f/2}),p.push({x:P.x,y:R.y+f/2}));else if(p.push({x:R.x,y:R.y+A}),h>=f)if(P.x>=B.x-A&&P.x<=B.x+B.width+A){var z=B.x+B.width/2;P.x=B.x-A&&P.x<=B.x+B.width+A){var W=B.x+B.width/2;P.x=f?(p.push({x:R.x-h/2,y:R.y}),p.push({x:R.x-h/2,y:P.y})):p.push({x:P.x,y:R.y});else if(p.push({x:R.x-A,y:R.y}),h>=f)if(P.y>=B.y-A&&P.y<=B.y+B.height+A){var H=B.y+B.height/2;P.y=B.y-A&&P.y<=B.y+B.height+A){var G=B.y+B.height/2;P.y=f){var V=(u.x-c.x)/2;p.push({x:c.x+V,y:c.y}),p.push({x:c.x+V,y:u.y})}else{var U=(u.y-c.y)/2;p.push({x:c.x,y:c.y+U}),p.push({x:u.x,y:c.y+U})}}else if("curve"===e.linkerType){var X=_(c,u),K=.4*X;p.push(k(c,u,i,K)),p.push(k(u,c,r,K))}return p},A=function(e){var t={},n=e.plane.waypoint,i=n[0],r=n[n.length-1];if("normal"===e.linkerType)t.x=.5*i.x+.5*r.x,t.y=.5*i.y+.5*r.y;else if("curve"===e.linkerType)t.x=.125*i.x+.375*e.points[0].x+.375*e.points[1].x+.125*r.x,t.y=.125*i.y+.375*e.points[0].y+.375*e.points[1].y+.125*r.y;else{var a=[];a.push(i),a=a.concat(e.points),a.push(r);for(var o=0,s=1;sl){var d=(l-c)/f;t.x=(1-d)*p.x+d*h.x,t.y=(1-d)*p.y+d*h.y;break}c=f}}return t},O=function(e,t){var n=e.data,i=(n.sourceRef,n.targetRef,e.plane.waypoint),r=i[0],a=i[i.length-1],s=void 0,l=void 0;if("normal"===e.linkerType)s="source"===t?a:r;else if("broken"===e.linkerType)s="source"===t?e.points[0]:e.points[e.points.length-1];else{var c=_(r,a),u=void 0;u="source"===t?12/c:1-12/c,s={x:(1-u)*(1-u)*(1-u)*r.x+3*(1-u)*(1-u)*u*e.points[0].x+3*(1-u)*u*u*e.points[1].x+u*u*u*a.x,y:(1-u)*(1-u)*(1-u)*r.y+3*(1-u)*(1-u)*u*e.points[0].y+3*(1-u)*u*u*e.points[1].y+u*u*u*a.y}}return l="source"===t?r:a,o(s,l)},R=function(e){var t=e.plane,n=e.shape,i=[];if("curve"!==n.linkerType)i.push(t.waypoint[0]),i=i.concat(n.points);else for(var r=0;r<=1;){var a={x:(1-r)*(1-r)*(1-r)*n.points[0].x+3*(1-r)*(1-r)*r*n.points[1].x+3*(1-r)*r*r*n.points[2].x+r*r*r*n.points[n.points.length-1].x,y:(1-r)*(1-r)*(1-r)*n.points[0].y+3*(1-r)*(1-r)*r*n.points[1].y+3*(1-r)*r*r*n.points[2].y+r*r*r*n.points[n.points.length-1].y};i.push(a),r+=.05}return i.push(t.waypoint[t.waypoint.length-1]),i},P=function(e){for(var t=R(e),n=t[0].x,i=t[0].y,r=t[0].x,a=t[0].y,o=0;or&&(r=s.x),s.ya&&(a=s.y)}return{x:n,y:i,width:r-n,height:a-i}},T=function(e){for(var t=[],n=[],r=i.a.trigger("shape.select.getIds"),a=0;a0)for(var l=0;l=0)&&n.indexOf(c)<0&&(t.push(i.a.trigger("element.get",c)),n.push(c))}}}return t},j=function(){for(var e=i.a.trigger("shape.select.get"),t=[],n=0;nt.x2)&&(t.x2=s.x+s.width),(null==t.y2||s.y+s.height>t.y2)&&(t.y2=s.y+s.height)}return{x:t.x1,y:t.y1,width:t.x2-t.x1,height:t.y2-t.y1}},I=function(e,t,n){var i=_(e,t);if(0===i||0===n)return t;var r=Math.atan(Math.abs(t.x-e.x)/Math.abs(e.y-t.y));t.x>=e.x&&t.y>=e.y?r=Math.PI-r:t.x<=e.x&&t.y>=e.y?r=Math.PI+r:t.x<=e.x&&t.y<=e.y&&(r=2*Math.PI-r),r%=2*Math.PI;var a=(r+n)%(2*Math.PI);return{x:e.x+Math.sin(a)*i,y:e.y-Math.cos(a)*i}},L=function(e){var t=e.plane,n=e.shape;return D(t.bounds,n.shapeStyle.angle)},$=function(e,t,n,a){var o=[],s=i.a.trigger("element.get");for(var l in s){var c=s[l],u=c.data,p=c.plane,h=c.shape,f=n.find('.shape-box[data-id="'+u.id+'"]'),d=f.position(),y=e-d.left,m=t-d.top,g=void 0,v=void 0,x={x:d.left,y:d.top,width:f.width(),height:f.height()},b=f.find(".shape-canvas"),w=b[0].getContext("2d"),E=q(e,t,x);if("SequenceFlow"===h.bpmnName){if(!E)continue;if(a)continue;g=Object(r.k)(10),v={x:e-g,y:t-g,width:2*g,height:2*g};var S=(p.waypoint[0].x,p.waypoint[0].y,{x:p.waypoint[p.waypoint.length-1].x,y:p.waypoint[p.waypoint.length-1].y});if(q(Object(r.k)(S.x),Object(r.k)(S.y),v)){var k={type:"sequence_point",point:"target",element:c};o.push(k);continue}if(q(Object(r.k)(S.x),Object(r.k)(S.y),v)){var C={type:"sequence_point",point:"source",element:c};o.push(C);continue}var A=f.find(".text-box"),O=A.position(),R={x:O.left,y:O.top,width:A.width(),height:A.height()};if(q(y,m,R)){var P={type:"sequence_text",element:c};o.push(P);continue}g=Object(r.k)(7);var T=z({x:Object(r.i)(e),y:Object(r.i)(t)},c,g);if(T>-1){o.push({type:"sequence",element:c,pointIndex:T});continue}}else{if(E&&h.locked&&!a){w.isPointInPath(y,m)&&o.push({type:"shape",element:c});continue}if(g=Object(r.k)(7),E){v={x:e-g,y:t-g,width:2*g,height:2*g},x={x:p.bounds.x+p.bounds.width/2,y:p.bounds.y+p.bounds.height/2};for(var j=h.getAnchors(),N=null,D=0;D1&&a)$=o[0];else if(o.length>1){if("bounds"===o[0].type&&"sequence_point"!==o[0].type&&"sequence"!==o[0].type)return o[0];for(var _=[],F=[],W=[],H=0;H0&&F.length>0)for(var V=0;V0&&(F.sort(function(e,t){return i.a.trigger("shape.select.check",e.element.data.id)&&!i.a.trigger("shape.select.check",t.element.data.id)?-1:!i.a.trigger("shape.select.check",e.element.data.id)&&i.a.trigger("shape.select.check",t.element.data.id)?1:t.element.shape.shapeStyle.zindex-e.element.shape.shapeStyle.zindex}),$=F[0]),null==$&&_.length>0&&(_.sort(function(e,t){return i.a.trigger("shape.select.check",e.element.data.id)&&!i.a.trigger("shape.select.check",t.element.data.id)?-1:!i.a.trigger("shape.select.check",e.element.data.id)&&i.a.trigger("shape.select.check",t.element.data.id)?1:t.element.shape.shapeStyle.zindex-e.element.shape.shapeStyle.zindex}),$=_[0]),null==$&&($=o[0])}return $},_=function(e,t){var n=t.y-e.y,i=t.x-e.x;return Math.sqrt(Math.pow(n,2)+Math.pow(i,2))},F=function(e,t){e.setLineDash||(e.setLineDash=function(){}),e.setLineDash(t),e.mozDash=t,e.webkitLineDash=t},q=function(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height},z=function(e,t,n){for(var i=R(t),r={x:e.x-n,y:e.y},a={x:e.x+n,y:e.y},o={x:e.x,y:e.y-n},s={x:e.x,y:e.y+n},l=1;l=0&&o<=1&&s>=0&&s<=1&&(r=!0)}return r};t.a={getAngle:o,getAngleDir:a,getBounding:s,getConnectionLength:c,getConnectionMidpoint:A,getConnectionPoints:C,getEndpointAngle:O,getElementsBox:B,getElementIdsByRange:f,getConnectionBox:P,getLighterColor:u,getDarkerColor:p,getDarkestColor:h,getOutConnections:T,getPointAngle:M,getRelativePos:N,getRotated:I,getRotatedBox:D,getSelectedConnectionIds:j,getShapeByPosition:$,getShapeBox:L,measureDistance:_,setLineDash:F}},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=n(6),s=function(e){function t(){i(this,t);var e=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.children=[],e.parent="",e.resizeDir=["tl","tr","br","bl"],e.attribute={container:!1,visible:!0,rotatable:!1,linkable:!0,editable:!0,markerOffset:5},e.lineStyle={lineWidth:2,lineColor:"50,50,50",lineStyle:"solid"},e.fillStyle={type:"solid",color:"255,255,255"},e.lightStyle={},e.actions=null,e}return a(t,e),t}(o.a);t.a=s},function(e,t,n){"use strict";n.d(t,"a",function(){return a}),n.d(t,"b",function(){return o}),n.d(t,"c",function(){return s}),n.d(t,"e",function(){return l}),n.d(t,"f",function(){return c}),n.d(t,"d",function(){return u}),n.d(t,"i",function(){return h}),n.d(t,"h",function(){return f}),n.d(t,"g",function(){return d});var i={String:!0,Boolean:!0,Integer:!0,Real:!0,Element:!0},r={String:function(e){return e},Boolean:function(e){return"true"===e},Integer:function(e){return parseInt(e,10)},Real:function(e){return parseFloat(e,10)}},a={xsi:"http://www.w3.org/2001/XMLSchema-instance"},o="xsi:type",s=function(e,t){var n=r[e];return n?n(t):t},l=function(e){return!!i[e]},c=function(e){return!!r[e]},u=function(e){return e.xml&&"lowerCase"===e.xml.tagAlias},p=function(e){return e.xml&&e.xml.serialize},h=function(e){return p(e)===o},f=function(e){return"property"===p(e)},d=function(e,t){var n,i,r=e.split(/:/);if(1===r.length)n=e,i=t;else{if(2!==r.length)throw new Error("expected or , got "+e);n=r[1],i=r[0]}return e=(i?i+":":"")+n,{name:e,prefix:i,localName:n}}},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=function(){function e(e,t){for(var n=0;no&&(s={x:0,y:o/2},l={x:a,y:o/2},c=(h.angle+Math.PI/2)%(2*Math.PI)),0!==c){var u={x:a/2,y:o/2};s=i.a.getRotated(u,s,c),l=i.a.getRotated(u,l,c),s.x<0&&(s.x=0),s.x>a&&(s.x=a),s.y<0&&(s.y=0),s.y>o&&(s.y=o),l.x<0&&(l.x=0),l.x>a&&(l.x=a),l.y<0&&(l.y=0),l.y>o&&(l.y=o)}var p=e.createLinearGradient(s.x,s.y,l.x,l.y);return p.addColorStop(0,"rgb("+n.beginColor+")"),p.addColorStop(1,"rgb("+n.endColor+")"),p},createRadialGradient:function(e,t,n){var i=t.bpmnPlane.bounds,r=i.width,a=i.height,o=r");return new n(t)}},{key:"getType",value:function(e){var t=this.typeCache,n="string"==typeof e&&e.constructor===String?e:e.ns.name,i=t[n];return i||(e=this.registry.getEffectiveDescriptor(n),i=t[n]=this.factory.createType(e)),i}},{key:"createAny",value:function(e,t,n){var i=Object(l.g)(e),r={$type:e,$instanceOf:function(e){return e===this.$type}},o={name:e,isGeneric:!0,ns:{prefix:i.prefix,localName:i.localName,uri:t}};this.properties.defineDescriptor(r,o),this.properties.defineModel(r,this),this.properties.define(r,"$parent",{enumerable:!1,writable:!0});for(var s in n){var u=n[s];"object"===(void 0===u?"undefined":c(u))&&u.constructor===Object&&void 0!==u.value?r[u.name]=a.value:r[s]=u}return r}},{key:"getPackage",value:function(e){return this.registry.getPackage(e)}},{key:"getPackages",value:function(){return this.registry.getPackages()}},{key:"getElementDescriptor",value:function(e){return e.$descriptor}},{key:"hasType",value:function(e,t){return void 0===t&&(t=e,e=this),t in e.$model.getElementDescriptor(e).allTypesByName}},{key:"getPropertyDescriptor",value:function(e,t){return this.getElementDescriptor(e).propertiesByName[t]}},{key:"getTypeDescriptor",value:function(e){return this.registry.typeMap[e]}}]),e}();t.a=p},function(e,t,n){"use strict";function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t',extensions:{},filter:[],bpmns:["StartEvent","UserTask","ServiceTask","ReceiveTask","CallActivity","ExclusiveGateway","InclusiveGateway","ParallelGateway","ComplexGateway","EndEvent","TerminateEndEvent"]},C=!1,A=function(e){var t=Object(l.a)(e.container);if(!e.container||t.length<=0)throw new Error("Can not find container: "+e.container);var n=Object(l.a)('
');return n.css({width:e.width,height:e.height}),n.find(".bpd-layout").css({top:-e.pageStyle.height/2,left:-e.pageStyle.width/2}),t.append(n),n},O=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r(this,e),this.version="0.1.4",this.options=Object.assign({},k,t),this.$container=A(this.options),this.features={HotKey:new w.a,I18n:new E.a(this.options.local),BpmnXML:new p.a(this.options.extensions),Background:new h.a(this.$container,this.options,this.options.config.background),Hand:new x.a(this.$container,this.options.pageStyle)},this.options.readonly||(this.features.Anchor=new d.a(this.$container,this.options.config.anchor),this.features.Snapline=new g.a(this.$container,this.options.config.snapline),this.features.Direction=new f.a(this.$container,this.options.config.direction),this.features.Select=new y.a(this.$container,this.options.config.select),this.features.Tooltip=new v.a(this.$container,this.options.config.tooltip),this.features.Drag=new m.a(this.options,this.$container),this.features.GroupPanel=new b.a(this.$container,this.options)),this.draw=Object(s.a)(this.options,this.$container),Object(u.g)("bpmn",function(){C=!0}),this.init()}return S(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){};this.importBpmn(this.options.definition,e)}},{key:"createShape",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=Object(l.a)(e.target);if(!n.hasClass("readonly")&&!this.options.readonly){var i=n.attr("shapeName");if(!i||""===i)throw new Error("shapeName error");this.draw.createShape(i,t)}}},{key:"getAllElement",value:function(){var e=[],t=o.a.trigger("element.get");for(var n in t){var i=Object(u.j)(t[n]);e.push(i)}return e}},{key:"getRootElement",value:function(){var e=o.a.trigger("process.get");return e?Object(u.j)(e):null}},{key:"getFrontElementsByBpmn",value:function(e,t){return this.getFrontElements(o.a.trigger("element.get",e.id)).filter(function(e){return e.bpmnName===t})}},{key:"getFrontElement",value:function(e){if(!e)throw new Error("select element error");var t=null;return this.getFrontElements(o.a.trigger("element.get",e.id)).forEach(function(e){t||"SequenceFlow"===e.bpmnName||(t=e)}),t}},{key:"getFrontElements",value:function(e){if(!e)throw new Error("select element error");for(var t=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=[];return i?n:(t.forEach(function(e){if("SequenceFlow"===e.shape.bpmnName){if(e.data.sourceRef&&""!==e.sourceRef){var t=o.a.trigger("element.get",e.data.sourceRef)||[],i=!1;n.forEach(function(e){e.data.id===t.data.id&&(i=!0)}),i||(r.push(t),n.push(t))}}else{(o.a.trigger("connections.get",e.data.id)||[]).forEach(function(t){var i=o.a.trigger("element.get",t);if(i.data.targetRef===e.data.id){var a=!1;n.forEach(function(e){e.data.id===i.data.id&&(a=!0)}),a||(r.push(i),n.push(i))}})}}),r.length<=0?e(r,n,!0):e(r,n))}([e]),n=0;n2&&void 0!==arguments[2]?arguments[2]:function(){};t.extensions.forEach(function(e){e.$type=e.name,delete e.name});var r=o.a.trigger("element.get",e);if(r){var a=Object.assign({},t.original);for(var s in a)r.data[s]=a[s];var l=r.data.extensionElements,c=[];l.values||(l.values=[]),l.values.forEach(function(e){var n=!1;t.extensions.forEach(function(t){t.$type===e.$type&&(n=!0)}),n||c.push(e)}),l.values=[].concat(c,i(t.extensions)),"SequenceFlow"===r.shape.bpmnName||o.a.trigger("shape.render",{type:r.shape.bpmnName,element:r}),n()}}},{key:"updateProcessProperties",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};e.extensions.forEach(function(e){e.$type=e.name,delete e.name});var n=o.a.trigger("process.get");if(n){var r=Object.assign({},e.original);for(var a in r)n[a]=r[a];var s=[];n.extensionElements.values||(n.extensionElements.values=[]),n.extensionElements.values.forEach(function(t){var n=!1;e.extensions.forEach(function(e){e.$type===t.$type&&(n=!0)}),n||s.push(t)}),n.extensionElements.values=[].concat(s,i(e.extensions)),t()}}},{key:"updataLineStyle",value:function(e,t){this.draw.updataLineStyle(e,t)}},{key:"destroy",value:function(){this.$container.remove(),this.draw.cancel(),o.a.trigger("key.clear"),o.a.destroy()}},{key:"activateHand",value:function(){o.a.trigger("hand.activate"),this.draw.resetState()}},{key:"activateSelect",value:function(){this.options.readonly||(o.a.trigger("hand.destroy"),o.a.trigger("shape.multiSelect",{state:this.draw.state}),this.draw.changeState("multiSelect"))}},{key:"importBpmn",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=this,i=setInterval(function(){C&&(clearInterval(i),o.a.trigger("model.import",e,function(e,i){e?console.log(e):(n.draw.render(i),t())}))},1e3)}},{key:"exportBpmn",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){},t=this.draw.designer.createDefinition();o.a.trigger("model.export",t,function(t,n){t&&console.log(t,n),e(n)})}}]),e}();t.default=O,window.BPDCore=O},function(e,t){},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=n(0),s=n(12),l=n(13),c=n(14),u=n(26),p=n(3),h=n(1),f=(n(2),function(){function e(e,t){for(var n=0;n0&&a.forEach(function(t,n){if(t.id===e.id+"_di"){var i=Object(h.c)(e);e.extensionElements&&(i.extensionElements.values=e.extensionElements.values||[]);"SequenceFlow"!==Object(h.e)(e.$type)?(i.incoming=e.incoming?e.incoming.id:"",i.outgoing=e.outgoing?e.outgoing.id:""):(i.sourceRef=e.sourceRef?e.sourceRef.id:"",i.targetRef=e.targetRef?e.targetRef.id:""),r[e.id]={data:i,plane:Object(h.c)(t)}}})})}):this.designer.setProcessModel(),this.renderPage();var a=0;for(var o in r){var s=r[o],l=Object(h.e)(s.data.$type);"SequenceFlow"!==l&&(this.renderShape({type:l,element:s}),this.designer.addData(s,!1)),a++}for(var c in r){var u=r[c];"SequenceFlow"===Object(h.e)(u.data.$type)&&(this.renderConnection({element:u}),this.designer.addData(u,!1))}0===a&&this.designer.build();var f=this.$container,d=this.options,y=d.pageStyle,m=y.width,g=y.height,v=f.find(".bpd-layout"),x=v.offset(),b={x:Object(h.i)(0),y:Object(h.i)(0),width:Object(h.i)(m),height:Object(h.i)(g)},w=p.a.getElementIdsByRange(b),E=p.a.getElementsBox(w),S=x.top;E.y<-g/2?S=E.y:E.y>0&&(S=0);var k=x.left;E.x<-m/2?k=E.x:E.x>0&&(k=0),v.css({top:S,left:k})}},{key:"renderPage",value:function(){var e=this.options.pageStyle,t=e.width,n=e.height,i=e.backgroundColor,r=p.a.getDarkerColor(i);p.a.getDarkestColor(i);this.$container.find(".bpd-designer").css({"background-color":"rgb("+r+")"}),this.$container.find(".bpd-layout").css({width:t,height:n})}},{key:"renderShape",value:function(e){var t=e.type,n=e.element;this.drawShape.render(t,n)}},{key:"renderShapePath",value:function(e){var t=e.shape2D,n=e.element,i=e.render;this.drawShape.renderShapePath(t,n,i)}},{key:"renderConnection",value:function(e){var t=e.element,n=e.rendered;this.drawConnection.render(t,n)}},{key:"moveConnection",value:function(e){var t=e.element,n=e.type,i=e.x,r=e.y;this.drawConnection.move(t,n,i,r)}},{key:"updataLineStyle",value:function(e,t){if(e){var n=o.a.trigger("element.get",e);"SequenceFlow"===n.shape.bpmnName||(n.shape.lightStyle={lineStyle:t},console.log(n),this.drawShape.renderShape(n))}else{var i=o.a.trigger("element.get");for(var r in i){var a=i[r];"SequenceFlow"===a.shape.bpmnName||(a.shape.lightStyle={},this.drawShape.renderShape(a))}}}},{key:"removeShape",value:function(e,t){var n=this;e||(e=o.a.trigger("shape.select.get")),void 0===t&&(t=!0),t&&(e=this.beforeRemove(e));var i=[],r=[],a=[];return 0!==e.length&&(e.forEach(function(e){"SequenceFlow"===e.shape.bpmnName?a.push(e.data.id):r.push(e.data.id)}),e.forEach(function(e){i.push(Object(h.c)(e));var t=e.data,s=e.shape;if(n.$container.find('.shape-box[data-id="'+t.id+'"]').remove(),delete n.designer.elements[t.id],"SequenceFlow"===s.bpmnName)t.sourceRef,t.targetRef;else{s.parent&&r.indexOf(s.parent);var l=n.designer.connections[t.id];if(l&&l.length>0)for(var c=0;c1&&void 0!==arguments[1]?arguments[1]:function(){},n=null;o.a.trigger("data.create",e,function(e){n=e,t(n)})}},{key:"beforeRemove",value:function(e){for(var t={},n=0;n1&&void 0!==arguments[1]?arguments[1]:function(){},i=null,l=null,c=this.$container.find(".bpd-layout"),u=c.find(".bpd-designer");c.on("mousemove.create",function(n){var o=a.a.getRelativePos(n.pageX,n.pageY,u),c=0,p=null;null==i?(i=r.a.trigger("element.create",{name:null,type:Object(s.d)(e,"uppercase"),prefix:"obj",pos:o}),p=i.plane.bounds,p.x=Object(s.i)(o.x)-p.width/2,p.y=Object(s.i)(o.y)-p.height/2,c=Object.keys(t.elements),r.a.trigger("shape.render",{type:e,element:i}),l=t.$container.find('.shape-box[data-id="'+i.data.id+'"]'),l.attr("class","shape-box-creating"),l.css({left:o.x-l.width()/2+"px",top:o.y-l.height()/2+"px","z-index":c.length})):(p=i.plane.bounds,p.x=Object(s.i)(o.x)-p.width/2,p.y=Object(s.i)(o.y)-p.height/2);r.a.trigger("shape.snapline.show",{size:p,ids:[]});l.css({left:Object(s.k)(p.x-10)+"px",top:Object(s.k)(p.y-10)+"px","z-index":c.length})});var p=!1;c.on("mouseup.create",function(){p=!0}),Object(o.a)(document).on("mouseup.create",function(){Object(o.a)(document).off("mouseup.create"),u.off("mousemove.creating"),r.a.trigger("shape.snapline.hide"),c.off("mouseup.create").off("mousemove.create"),null!=i&&(!1===p?l.remove():(l.attr("class","shape-box"),t.addData(i),n(i)))})}},{key:"addData",value:function(e,t){this.addDatas([e],t)}},{key:"addDatas",value:function(e,t){void 0===t&&(t=!0);for(var n=[],i=0;i1&&void 0!==arguments[1]?arguments[1]:function(){};if(e.length>0){var n=[];e=e.concat(n),t(e)}}},{key:"getElement",value:function(e){return e?this.elements[e]:this.elements}},{key:"getProcess",value:function(){var e=null;return this.definitions&&(e=this.definitions.rootElements[0],delete e.flowElements),e}},{key:"setShapeGroups",value:function(e,t){this.groups[e]||(this.groups[e]=[]),this.groups[e].indexOf(t)<0&&this.groups[e].push(t)}},{key:"getShapeConnections",value:function(e){return this.connections[e]}},{key:"setShapeConnections",value:function(e,t){this.connections[e]||(this.connections[e]=[]),this.connections[e].indexOf(t)<0&&this.connections[e].push(t)}},{key:"update",value:function(e){this.updateMulti([e])}},{key:"updateMulti",value:function(e){for(var t=[],n=[],i=0;i0&&(o=this.orders[this.orders.length-1].zindex),this.maxZIndex=o}},{key:"createAttrs",value:function(e,t,n){var i=this,r={data:{},plane:{}},a=e.id||"obj_"+this.options.ids.next();if(e)for(var o in e)switch(o){case"$type":case"flowElements":case"sourceRef":case"targetRef":case"incoming":case"outgoing":break;case"extensionElements":r.data.extensionElements=this.createExtensionModel(e[o].values||[]);break;default:r.data[o]=e[o]}if(t)for(var s in t)switch(s){case"$type":break;case"id":r.plane[s]=a+"_di";break;case"waypoint":"SequenceFlow"===n.bpmnName&&function(){var e=t[s][0],a=t[s][t[s].length-1],o=[];o.push(i.createModel({descriptor:"dc:Point",attrs:{x:e.x,y:e.y}})),n.points.forEach(function(e){o.push(i.createModel({descriptor:"dc:Point",attrs:{x:e.x,y:e.y}}))}),o.push(i.createModel({descriptor:"dc:Point",attrs:{x:a.x,y:a.y}})),r.plane[s]=o}();break;case"bounds":if("SequenceFlow"!==n.bpmnName){var l=t[s],c=l.height,u=l.width,p=l.x,h=l.y;r.plane[s]=this.createModel({descriptor:"dc:Bounds",attrs:{height:c,width:u,x:p,y:h}})}break;default:r.plane[s]=t[s]}return r}},{key:"createElement",value:function(e){var t=e.type,n=e.prefix,i=e.name,a=e.pos,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},l=n+"_"+this.options.ids.next(),c=Object(s.c)(this.createModel({descriptor:"bpmn:"+t,attrs:{name:i,id:l,extensionElements:this.createExtensionModel()}})),u={};"SequenceFlow"===t?u=Object(s.c)(this.createModel({descriptor:"bpmndi:BPMNEdge",attrs:{id:l+"_di",waypoint:[]}})):(u=Object(s.c)(this.createModel({descriptor:"bpmndi:BPMNShape",attrs:{bounds:this.createModel({descriptor:"dc:Bounds",attrs:{x:0,y:0}}),bpmnElement:l,id:l+"_di"}})),a&&(u.bounds.x=Object(s.i)(a.x)-u.bounds.width,u.bounds.y=Object(s.i)(a.y)-u.bounds.height));var p={data:c,plane:u};return p=r.a.trigger("shape.create",{type:t,element:p}),this.maxZIndex=p.shape.shapeStyle.zindex=this.maxZIndex+1,o(p),p}},{key:"createDefinition",value:function(){var e=this;return this.definitions.rootElements.forEach(function(t,n){var i={},r=[],a=[];for(var o in e.elements){var s=e.elements[o],l=s.data,c=s.plane,u=s.shape;if("SequenceFlow"!==u.bpmnName){var p=e.createAttrs(l,c,u);p.data.incoming=[],p.data.outgoing=[];var h=e.createModel({descriptor:l.$type,attrs:p.data});p.plane.bpmnElement=h;var f=e.createModel({descriptor:c.$type,attrs:p.plane});i[h.id]=h,r.push(h),a.push(f)}}for(var d in e.elements){var y=e.elements[d],m=y.data,g=y.plane,v=y.shape;if("SequenceFlow"===v.bpmnName){var x=e.createAttrs(m,g,v);x.data.sourceRef=i[m.sourceRef],x.data.targetRef=i[m.targetRef];var b=e.createModel({descriptor:m.$type,attrs:x.data});m.sourceRef&&i[m.sourceRef].outgoing.push(b),m.targetRef&&i[m.targetRef].incoming.push(b),x.plane.bpmnElement=b;var w=e.createModel({descriptor:g.$type,attrs:x.plane});r.push(b),a.push(w)}}e.definitions.diagrams[n].plane.planeElement=a,e.definitions.rootElements[n]=e.createModel({descriptor:t.$type,attrs:{id:t.id||e.options.ids.next(),extensionElements:e.createExtensionModel(t.extensionElements.values||[])}}),e.definitions.rootElements[n].flowElements=r}),this.definitions}},{key:"setProcessModel",value:function(){var e="process_"+this.options.ids.next(),t=[this.createModel({descriptor:"bpmn:Process",attrs:{id:e,flowElements:[],extensionElements:this.createExtensionModel([])}})],n=[this.createModel({descriptor:"bpmndi:BPMNDiagram",attrs:{id:e+"_di",plane:this.createModel({descriptor:"bpmndi:BPMNPlane",attrs:{id:e+"_pl",planeElement:[]}})}})];this.definitions.rootElements=t,this.definitions.diagrams=n}},{key:"createModel",value:function(e){var t=null;return r.a.trigger("model.create",e,function(e){t=e}),t}},{key:"createExtensionModel",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=[];return t.forEach(function(t){var i=t.$type||t.name,r=Object(s.c)(t);delete r.$type,delete r.name;var a=e.createModel({descriptor:i,attrs:r});a&&n.push(a)}),this.createModel({descriptor:"bpmn:ExtensionElements",attrs:{values:n}})}}]),e}(),u=function(e,t,n){return new c(e,t,n)};t.a=u},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=n(0),a=n(3),o=function(){function e(e,t){for(var n=0;n1&&p<=u.shape.points.length||null==u.data.sourceRef&&null==u.data.targetRef&&(o.css("cursor","move"),r.a.trigger("shape.drag",s))}else if("sequence_point"===c.type)o.css("cursor","move"),r.a.trigger("shape.hover",s),r.a.trigger("connection.drag",s);else if("sequence_text"===c.type)o.css("cursor","text"),r.a.trigger("shape.hover",s);else if("shape"===c.type?c.element.shape.locked?(o.css("cursor","default"),r.a.trigger("shape.hover",s)):(o.css("cursor","move"),r.a.trigger("shape.hover",s),r.a.trigger("shape.edit",s),r.a.trigger("shape.drag",s)):(o.css("cursor","crosshair"),r.a.trigger("shape.hover",s),r.a.trigger("anchor.hover",s)),c.element.shape.parent){var h=r.a.on("element.get",c.element.shape.parent);r.a.trigger("anchor.show",h)}else r.a.trigger("anchor.show",c.element)}}},{key:"changeState",value:function(e){this.state.state=e}},{key:"resetState",value:function(){this.state.state=null,this.$container.find(".bpd-designer").css("cursor","default")}}]),e}();t.a=s},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=n(2),a=n(15),o=n(1),s=n(7),l=n(3),c=function(){function e(e,t){for(var n=0;n").appendTo(this.$container.find(".bpd-designer")));var s=i.bounds,c=s.x,u=s.y,p=s.width,h=s.height,f=t.shapeStyle,d=f.angle,y=(f.zindex,l.a.getShapeBox(e)),m=y.width+20,g=y.height+20,v=a.find(".shape-canvas");v.attr({width:m,height:g}),a.css({left:Object(o.k)(y.x-10)+"px",top:Object(o.k)(y.y-10)+"px",width:m,height:g});var x=v[0].getContext("2d");x.clearRect(0,0,p+20,h+20),x.scale(this.options.scale,this.options.scale),x.translate(10,10),x.translate(c-y.x,u-y.y),x.translate(p/2,h/2),x.rotate(d),x.translate(-p/2,-h/2),x.globalAlpha=t.shapeStyle.alpha,x.lineJoin="round",this.renderShapePath(x,e),this.renderText(t,y)}},{key:"renderShapePath",value:function(e,t,n){var i=t.plane.bounds,r=i.width,a=i.height,s=void 0;s=n&&o.a.drawIcon?o.a.drawIcon(r,a):t.shape.actions,this.renderPath(e,t,s,n)}},{key:"renderPath",value:function(e,t,n,i){for(var r=t.data,a=(t.plane,t.shape),s=0;s").appendTo(u),p.on("focus",function(){Object(r.a)(this).blur()})),p.attr("readonly","readonly"),null==e.data.name||""===e.data.name.trim())return void p.css({height:"0px",width:"0px"}).hide();var h=e.fontStyle;p.css({"line-height":Math.round(1.25*h.size)+"px","font-size":h.size+"px","font-family":h.fontFamily,"font-weight":h.bold?"bold":"normal","font-style":h.italic?"italic":"normal","text-align":h.textAlign,color:"rgb("+h.color+")","text-decoration":h.underline?"underline":"none",opacity:e.shapeStyle.alpha}).show();var f=e.getTextBlock();if("horizontal"===e.fontStyle.orientation){var d={x:f.x+f.width/2,y:f.y+f.height/2};f.x=d.x-f.height/2,f.y=d.y-f.width/2,f.width=f.height,f.height=f.width}p.css({width:f.width}),p.height(0),p.val(e.data.name),p.scrollTop(99999);var y=p.scrollTop(),m=0;m="middle"===h.vAlign?f.y+f.height/2-y/2:"bottom"===e.fontStyle.vAlign?f.y+f.height-y:f.y;var g={x:f.x+f.width/2,y:m+y/2},v=e.shapeStyle.angle;0!==v&&(g=l.a.getRotated({x:s/2,y:c/2},g,v)),"horizontal"===h.orientation&&(v=(1.5*Math.PI+v)%(2*Math.PI));var x=Math.round(v/(2*Math.PI)*360),b="rotate("+x+"deg) scale("+this.options.scale+")",w=f.width,E=y;p.css({width:w,height:E,left:Object(o.k)(g.x+(i-t.x)+10)-w/2,top:Object(o.k)(g.y+(a-t.y)+10)-y/2,"-webkit-transform":b,"-ms-transform":b,"-o-transform":b,"-moz-transform":b,transform:b})}},{key:"fillShape",value:function(e,t,n){if(e.save(),"solid"===n.type)e.fillStyle="rgb("+n.color+")",e.fill();else if("gradient"===n.type){var i=void 0;i="linear"===n.gradientType?s.a.createLinearGradient(e,t,n):s.a.createRadialGradient(e,t,n),e.fillStyle=i,e.fill()}e.restore()}}]),e}();t.a=u},function(e,t,n){"use strict";n.d(t,"b",function(){return y});var i=n(16),r=n(17),a=n(18),o=n(19),s=n(20),l=n(21),c=n(22),u=n(23),p=n(24),h=n(25),f=n(0),d={StartEvent:["StartEvent"],Task:["UserTask","ServiceTask"],CallActivity:["CallActivity"],Gateway:["ExclusiveGateway","InclusiveGateway","ParallelGateway","ComplexGateway"],EndEvent:["EndEvent","TerminateEndEvent"]},y=function(){f.a.on("group.get",function(e){return e?d[e]:d})};t.a={EndEvent:i.a,StartEvent:r.a,UserTask:a.a,ServiceTask:o.a,TerminateEndEvent:s.a,ExclusiveGateway:l.a,InclusiveGateway:c.a,ParallelGateway:u.a,ComplexGateway:p.a,CallActivity:h.a}},function(e,t,n){"use strict";function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1&&void 0!==arguments[1]?arguments[1]:{};r(this,t);var i=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.style=n,e.plane&&e.plane.bounds&&(e.plane.bounds.width=e.plane.bounds.width||40,e.plane.bounds.height=e.plane.bounds.height||40),e.data.name||(e.data.name=l.a.trigger("i18n","bpmn.EndEvent")),i.data=e.data,i.plane=e.plane,i.bpmnName="EndEvent",i.groupName="EndEvent",i.actions=i.getPath(),i}return o(t,e),c(t,[{key:"getPath",value:function(){var e=this.plane.bounds,t=e.height,n=e.width,r=[];return[{lineStyle:{lineStyle:"solid",lineWidth:this.lineStyle.lineWidth+2},actions:[{action:"move",x:0,y:t/2},{action:"curve",x1:0,y1:-t/6,x2:n,y2:-t/6,x:n,y:t/2},{action:"curve",x1:n,y1:t+t/6,x2:0,y2:t+t/6,x:0,y:t/2},{action:"close"}]}].concat(i(this.style.content||r),[{fillStyle:{type:"none"},lineStyle:{lineWidth:0},actions:[{action:"move",x:0,y:t/2},{action:"curve",x1:0,y1:-t/6,x2:n,y2:-t/6,x:n,y:t/2},{action:"curve",x1:n,y1:t+t/6,x2:0,y2:t+t/6,x:0,y:t/2},{action:"close"}]}])}},{key:"getTextBlock",value:function(){var e=this.plane.bounds,t=e.height;return{x:e.width/2-60,y:t,width:120,height:30}}}]),t}(s.a);t.a=u},function(e,t,n){"use strict";function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1&&void 0!==arguments[1]?arguments[1]:{};r(this,t);var i=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.style=n,e.plane&&e.plane.bounds&&(e.plane.bounds.width=e.plane.bounds.width||40,e.plane.bounds.height=e.plane.bounds.height||40),e.data.name||(e.data.name=l.a.trigger("i18n","bpmn.StartEvent")),i.data=e.data,i.plane=e.plane,i.bpmnName="StartEvent",i.groupName="StartEvent",i.actions=i.getPath(),i}return o(t,e),c(t,[{key:"getPath",value:function(){var e=this.plane.bounds,t=e.height,n=e.width,r=[];return[{lineStyle:{lineStyle:"solid"},actions:[{action:"move",x:0,y:t/2},{action:"curve",x1:0,y1:-t/6,x2:n,y2:-t/6,x:n,y:t/2},{action:"curve",x1:n,y1:t+t/6,x2:0,y2:t+t/6,x:0,y:t/2},{action:"close"}]}].concat(i(this.style.content||r),[{fillStyle:{type:"none"},lineStyle:{lineWidth:0},actions:[{action:"move",x:0,y:t/2},{action:"curve",x1:0,y1:-t/6,x2:n,y2:-t/6,x:n,y:t/2},{action:"curve",x1:n,y1:t+t/6,x2:0,y2:t+t/6,x:0,y:t/2},{action:"close"}]}])}},{key:"getTextBlock",value:function(){var e=this.plane.bounds,t=e.height;return{x:e.width/2-60,y:t,width:120,height:30}}}]),t}(s.a);t.a=u},function(e,t,n){"use strict";function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1&&void 0!==arguments[1]?arguments[1]:{};r(this,t);var i=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.style=n,e.plane&&e.plane.bounds&&(e.plane.bounds.width=e.plane.bounds.width||110,e.plane.bounds.height=e.plane.bounds.height||55),e.data.name||(e.data.name=l.a.trigger("i18n","bpmn.UserTask")),i.data=e.data,i.plane=e.plane,i.bpmnName="UserTask",i.groupName="Task",i.actions=i.getPath(),i}return o(t,e),c(t,[{key:"getPath",value:function(){var e=this.plane.bounds,t=e.height,n=e.width,r=[{action:"move",x:0,y:4},{action:"quadraticCurve",x1:0,y1:0,x:4,y:0},{action:"line",x:n-4,y:0},{action:"quadraticCurve",x1:n,y1:0,x:n,y:4},{action:"line",x:n,y:t-4},{action:"quadraticCurve",x1:n,y1:t,x:n-4,y:t},{action:"line",x:4,y:t},{action:"quadraticCurve",x1:0,y1:t,x:0,y:t-4},{action:"close"}],a=[{actions:[{action:"font",fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",fontSize:"18px",fontFamily:"bpmn",content:"",x:4,y:16}]}];return[{lineStyle:{lineStyle:"solid"},actions:r}].concat(i(this.style.content||a),[{fillStyle:{type:"none"},lineStyle:{lineWidth:0},actions:r}])}},{key:"getTextBlock",value:function(){var e=this.plane.bounds,t=e.height;return{x:10,y:0,width:e.width-20,height:t}}}]),t}(s.a);t.a=u},function(e,t,n){"use strict";function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1&&void 0!==arguments[1]?arguments[1]:{};r(this,t);var i=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.style=n,e.plane&&e.plane.bounds&&(e.plane.bounds.width=e.plane.bounds.width||110,e.plane.bounds.height=e.plane.bounds.height||55),e.data.name||(e.data.name=l.a.trigger("i18n","bpmn.ServiceTask")),i.data=e.data,i.plane=e.plane,i.bpmnName="ServiceTask",i.groupName="Task",i.actions=i.getPath(),i}return o(t,e),c(t,[{key:"getPath",value:function(){var e=this.plane.bounds,t=e.height,n=e.width,r=[{actions:[{action:"font",fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",fontSize:"18px",fontFamily:"bpmn",content:"",x:4,y:16}]}];return[{lineStyle:{lineStyle:"solid"},actions:[{action:"move",x:0,y:4},{action:"quadraticCurve",x1:0,y1:0,x:4,y:0},{action:"line",x:n-4,y:0},{action:"quadraticCurve",x1:n,y1:0,x:n,y:4},{action:"line",x:n,y:t-4},{action:"quadraticCurve",x1:n,y1:t,x:n-4,y:t},{action:"line",x:4,y:t},{action:"quadraticCurve",x1:0,y1:t,x:0,y:t-4},{action:"close"}]}].concat(i(this.style.content||r),[{fillStyle:{type:"none"},lineStyle:{lineWidth:0},actions:[{action:"move",x:0,y:4},{action:"quadraticCurve",x1:0,y1:0,x:4,y:0},{action:"line",x:n-4,y:0},{action:"quadraticCurve",x1:n,y1:0,x:n,y:4},{action:"line",x:n,y:t-4},{action:"quadraticCurve",x1:n,y1:t,x:n-4,y:t},{action:"line",x:4,y:t},{action:"quadraticCurve",x1:0,y1:t,x:0,y:t-4},{action:"close"}]}])}},{key:"getTextBlock",value:function(){var e=this.plane.bounds,t=e.height;return{x:10,y:0,width:e.width-20,height:t}}}]),t}(s.a);t.a=u},function(e,t,n){"use strict";function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1&&void 0!==arguments[1]?arguments[1]:{};r(this,t);var i=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.style=n,e.plane&&e.plane.bounds&&(e.plane.bounds.width=e.plane.bounds.width||40,e.plane.bounds.height=e.plane.bounds.height||40),e.data.name||(e.data.name=l.a.trigger("i18n","bpmn.TerminateEndEvent")),i.data=e.data,i.plane=e.plane,i.bpmnName="TerminateEndEvent",i.groupName="EndEvent",i.actions=i.getPath(),i}return o(t,e),c(t,[{key:"getPath",value:function(){var e=this.plane.bounds,t=e.height,n=e.width,r=this.lineStyle.lineWidth,a=[{fillStyle:{type:"solid",color:"50,50,50"},lineStyle:{lineWidth:0,lineStyle:"solid"},actions:[{action:"move",x:.5*n-.25*n,y:.5*t},{action:"curve",x1:.5*n-.25*n,y1:.5*t-2*t/3*.5,x2:.5*n+.25*n,y2:.5*t-2*t/3*.5,x:.5*n+.25*n,y:.5*t},{action:"curve",x1:.5*n+.25*n,y1:.5*t+2*t/3*.5,x2:.5*n-.25*n,y2:.5*t+2*t/3*.5,x:.5*n-.25*n,y:.5*t},{action:"close"}]}];return[{lineStyle:{lineWidth:r+2,lineStyle:"solid"},actions:[{action:"move",x:0,y:t/2},{action:"curve",x1:0,y1:-t/6,x2:n,y2:-t/6,x:n,y:t/2},{action:"curve",x1:n,y1:t+t/6,x2:0,y2:t+t/6,x:0,y:t/2},{action:"close"}]}].concat(i(this.style.content||a),[{fillStyle:{type:"none"},lineStyle:{lineWidth:0},actions:[{action:"move",x:0,y:t/2},{action:"curve",x1:0,y1:-t/6,x2:n,y2:-t/6,x:n,y:t/2},{action:"curve",x1:n,y1:t+t/6,x2:0,y2:t+t/6,x:0,y:t/2},{action:"close"}]}])}},{key:"getTextBlock",value:function(){var e=this.plane.bounds,t=e.height;return{x:e.width/2-60,y:t,width:120,height:30}}}]),t}(s.a);t.a=u},function(e,t,n){"use strict";function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1&&void 0!==arguments[1]?arguments[1]:{};r(this,t);var i=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.style=n,e.plane&&e.plane.bounds&&(e.plane.bounds.width=e.plane.bounds.width||50,e.plane.bounds.height=e.plane.bounds.height||50),e.data.name||(e.data.name=""),i.data=e.data,i.plane=e.plane,i.bpmnName="ExclusiveGateway",i.groupName="Gateway",i.actions=i.getPath(),i}return o(t,e),l(t,[{key:"getPath",value:function(){var e=this.plane.bounds,t=e.height,n=e.width,r=[{fillStyle:{type:"solid",color:"0, 0, 0"},lineStyle:{lineWidth:0,lineStyle:"solid"},actions:[{action:"move",x:.5*n+.5*n*.4-.02*n,y:.5*t-.5*t*.4-.02*t},{action:"line",x:.5*n-.5*n*.4-.02*n,y:.5*t+.5*t*.4-.02*t},{action:"line",x:.5*n-.5*n*.4+.02*n,y:.5*t+.5*t*.4+.02*t},{action:"line",x:.5*n+.5*n*.4+.02*n,y:.5*t-.5*t*.4+.02*t},{action:"line",x:.5*n+.5*n*.4-.02*n,y:.5*t-.5*t*.4-.02*t},{action:"close"}]},{fillStyle:{type:"solid",color:"0, 0, 0"},lineStyle:{lineWidth:0,lineStyle:"solid"},actions:[{action:"move",x:.5*n,y:.5*t},{action:"move",x:.5*n-.5*n*.4+.02*n,y:.5*t-.5*t*.4-.02*t},{action:"line",x:.5*n+.5*n*.4+.02*n,y:.5*t+.5*t*.4-.02*t},{action:"line",x:.5*n+.5*n*.4-.02*n,y:.5*t+.5*t*.4+.02*t},{action:"line",x:.5*n-.5*n*.4-.02*n,y:.5*t-.5*t*.4+.02*t},{action:"close"}]}];return[{lineStyle:{lineStyle:"solid"},actions:[{action:"move",x:0,y:.5*t},{action:"line",x:.5*n,y:0},{action:"line",x:n,y:.5*t},{action:"line",x:.5*n,y:t},{action:"line",x:0,y:.5*t},{action:"close"}]}].concat(i(this.style.content||r),[{fillStyle:{type:"none"},lineStyle:{lineWidth:0},actions:[{action:"move",x:0,y:.5*t},{action:"line",x:.5*n,y:0},{action:"line",x:n,y:.5*t},{action:"line",x:.5*n,y:t},{action:"line",x:0,y:.5*t},{action:"close"}]}])}},{key:"getTextBlock",value:function(){var e=this.plane.bounds,t=e.height;return{x:e.width/2-60,y:t,width:120,height:30}}}]),t}(s.a);t.a=c},function(e,t,n){"use strict";function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1&&void 0!==arguments[1]?arguments[1]:{};r(this,t);var i=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.style=n,e.plane&&e.plane.bounds&&(e.plane.bounds.width=e.plane.bounds.width||50,e.plane.bounds.height=e.plane.bounds.height||50),e.data.name||(e.data.name=""),i.data=e.data,i.plane=e.plane,i.bpmnName="InclusiveGateway",i.groupName="Gateway",i.actions=i.getPath(),i}return o(t,e),l(t,[{key:"getPath",value:function(){var e=this.plane.bounds,t=e.height,n=e.width,r=[{lineStyle:{lineStyle:"solid",lineColor:"0, 0, 0"},actions:[{action:"move",x:.5*n-.25*n,y:.5*t},{action:"curve",x1:.5*n-.25*n,y1:.5*t-2*t/3*.5,x2:.5*n+.25*n,y2:.5*t-2*t/3*.5,x:.5*n+.25*n,y:.5*t},{action:"curve",x1:.5*n+.25*n,y1:.5*t+2*t/3*.5,x2:.5*n-.25*n,y2:.5*t+2*t/3*.5,x:.5*n-.25*n,y:.5*t},{action:"close"}]}];return[{lineStyle:{lineStyle:"solid"},actions:[{action:"move",x:0,y:.5*t},{action:"line",x:.5*n,y:0},{action:"line",x:n,y:.5*t},{action:"line",x:.5*n,y:t},{action:"line",x:0,y:.5*t},{action:"close"}]}].concat(i(this.style.content||r),[{fillStyle:{type:"none"},lineStyle:{lineWidth:0},actions:[{action:"move",x:0,y:.5*t},{action:"line",x:.5*n,y:0},{action:"line",x:n,y:.5*t},{action:"line",x:.5*n,y:t},{action:"line",x:0,y:.5*t},{action:"close"}]}])}},{key:"getTextBlock",value:function(){var e=this.plane.bounds,t=e.height;return{x:e.width/2-60,y:t,width:120,height:30}}}]),t}(s.a);t.a=c},function(e,t,n){"use strict";function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1&&void 0!==arguments[1]?arguments[1]:{};r(this,t);var i=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.style=n,e.plane&&e.plane.bounds&&(e.plane.bounds.width=e.plane.bounds.width||50,e.plane.bounds.height=e.plane.bounds.height||50),e.data.name||(e.data.name=""),i.data=e.data,i.plane=e.plane,i.bpmnName="ParallelGateway",i.groupName="Gateway",i.actions=i.getPath(),i}return o(t,e),l(t,[{key:"getPath",value:function(){var e=this.plane.bounds,t=e.height,n=e.width,r=[{fillStyle:{type:"solid",color:"0, 0, 0"},lineStyle:{lineWidth:0,lineStyle:"solid"},actions:[{action:"move",x:.5*n-.04*Math.min(n,t),y:.5*t-.5*t*.5},{action:"line",x:.5*n-.04*Math.min(n,t),y:.5*t+.5*t*.5},{action:"line",x:.5*n+.04*Math.min(n,t),y:.5*t+.5*t*.5},{action:"line",x:.5*n+.04*Math.min(n,t),y:.5*t-.5*t*.5},{action:"line",x:.5*n-.04*Math.min(n,t),y:.5*t-.5*t*.5},{action:"close"},{action:"move",x:.5*n-.5*n*.5,y:.5*t-.04*Math.min(n,t)},{action:"line",x:.5*n-.5*n*.5,y:.5*t+.04*Math.min(n,t)},{action:"line",x:.5*n+.5*n*.5,y:.5*t+.04*Math.min(n,t)},{action:"line",x:.5*n+.5*n*.5,y:.5*t-.04*Math.min(n,t)},{action:"line",x:.5*n-.5*n*.5,y:.5*t-.04*Math.min(n,t)},{action:"close"}]}];return[{lineStyle:{lineStyle:"solid"},actions:[{action:"move",x:0,y:.5*t},{action:"line",x:.5*n,y:0},{action:"line",x:n,y:.5*t},{action:"line",x:.5*n,y:t},{action:"line",x:0,y:.5*t},{action:"close"}]}].concat(i(this.style.content||r),[{fillStyle:{type:"none"},lineStyle:{lineWidth:0},actions:[{action:"move",x:0,y:.5*t},{action:"line",x:.5*n,y:0},{action:"line",x:n,y:.5*t},{action:"line",x:.5*n,y:t},{action:"line",x:0,y:.5*t},{action:"close"}]}])}},{key:"getTextBlock",value:function(){var e=this.plane.bounds,t=e.height;return{x:e.width/2-60,y:t,width:120,height:30}}}]),t}(s.a);t.a=c},function(e,t,n){"use strict";function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1&&void 0!==arguments[1]?arguments[1]:{};r(this,t);var i=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.style=n,e.plane&&e.plane.bounds&&(e.plane.bounds.width=e.plane.bounds.width||50,e.plane.bounds.height=e.plane.bounds.height||50),e.data.name||(e.data.name=""),i.data=e.data,i.plane=e.plane,i.bpmnName="ComplexGateway",i.groupName="Gateway",i.actions=i.getPath(),i}return o(t,e),l(t,[{key:"getPath",value:function(){var e=this.plane.bounds,t=e.height,n=e.width,r=[{fillStyle:{type:"solid",color:"0, 0, 0"},lineStyle:{lineWidth:0,lineStyle:"solid"},actions:[{action:"move",x:.5*n-.5*Math.min(n,t)*.3+.02*Math.min(n,t),y:.5*t-.5*Math.min(n,t)*.3-.02*Math.min(n,t)},{action:"line",x:.5*n+.5*Math.min(n,t)*.3+.02*Math.min(n,t),y:.5*t+.5*Math.min(n,t)*.3-.03*Math.min(n,t)},{action:"line",x:.5*n+.5*Math.min(n,t)*.3-.02*Math.min(n,t),y:.5*t+.5*Math.min(n,t)*.3+.02*Math.min(n,t)},{action:"line",x:.5*n-.5*Math.min(n,t)*.3-.02*Math.min(n,t),y:.5*t-.5*Math.min(n,t)*.3+.02*Math.min(n,t)},{action:"close"}]},{fillStyle:{type:"solid",color:"0, 0, 0"},lineStyle:{lineWidth:0,lineStyle:"solid"},actions:[{action:"move",x:.5*n+.5*Math.min(n,t)*.3-.02*Math.min(n,t),y:.5*t-.5*Math.min(n,t)*.3-.02*Math.min(n,t)},{action:"line",x:.5*n-.5*Math.min(n,t)*.3-.02*Math.min(n,t),y:.5*t+.5*Math.min(n,t)*.3-.02*Math.min(n,t)},{action:"line",x:.5*n-.5*Math.min(n,t)*.3+.02*Math.min(n,t),y:.5*t+.5*Math.min(n,t)*.3+.02*Math.min(n,t)},{action:"line",x:.5*n+.5*Math.min(n,t)*.3+.02*Math.min(n,t),y:.5*t-.5*Math.min(n,t)*.3+.02*Math.min(n,t)},{action:"line",x:.5*n+.5*Math.min(n,t)*.3-.02*Math.min(n,t),y:.5*t-.5*Math.min(n,t)*.3-.02*Math.min(n,t)},{action:"close"}]},{fillStyle:{type:"solid",color:"0, 0, 0"},lineStyle:{lineWidth:0,lineStyle:"solid"},actions:[{action:"move",x:.5*n-.027*Math.min(n,t),y:.5*t-.5*Math.min(n,t)*.4},{action:"line",x:.5*n-.027*Math.min(n,t),y:.5*t+.5*Math.min(n,t)*.4},{action:"line",x:.5*n+.027*Math.min(n,t),y:.5*t+.5*Math.min(n,t)*.4},{action:"line",x:.5*n+.027*Math.min(n,t),y:.5*t-.5*Math.min(n,t)*.4},{action:"line",x:.5*n-.027*Math.min(n,t),y:.5*t-.5*Math.min(n,t)*.4},{action:"close"}]},{fillStyle:{type:"solid",color:"0, 0, 0"},lineStyle:{lineWidth:0,lineStyle:"solid"},actions:[{action:"move",x:.5*n-.5*Math.min(n,t)*.4,y:.5*t-.027*Math.min(n,t)},{action:"line",x:.5*n-.5*Math.min(n,t)*.4,y:.5*t+.027*Math.min(n,t)},{action:"line",x:.5*n+.5*Math.min(n,t)*.4,y:.5*t+.027*Math.min(n,t)},{action:"line",x:.5*n+.5*Math.min(n,t)*.4,y:.5*t-.027*Math.min(n,t)},{action:"line",x:.5*n-.5*Math.min(n,t)*.4,y:.5*t-.027*Math.min(n,t)},{action:"close"}]}];return[{lineStyle:{lineStyle:"solid"},actions:[{action:"move",x:0,y:.5*t},{action:"line",x:.5*n,y:0},{action:"line",x:n,y:.5*t},{action:"line",x:.5*n,y:t},{action:"line",x:0,y:.5*t},{action:"close"}]}].concat(i(this.style.content||r),[{fillStyle:{type:"none"},lineStyle:{lineWidth:0},actions:[{action:"move",x:0,y:.5*t},{action:"line",x:.5*n,y:0},{action:"line",x:n,y:.5*t},{action:"line",x:.5*n,y:t},{action:"line",x:0,y:.5*t},{action:"close"}]}])}},{key:"getTextBlock",value:function(){var e=this.plane.bounds,t=e.height;return{x:e.width/2-60,y:t,width:120,height:30}}}]),t}(s.a);t.a=c},function(e,t,n){"use strict";function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1&&void 0!==arguments[1]?arguments[1]:{};r(this,t);var i=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.style=n,e.plane&&e.plane.bounds&&(e.plane.bounds.width=e.plane.bounds.width||110,e.plane.bounds.height=e.plane.bounds.height||55),e.data.name||(e.data.name=l.a.trigger("i18n","bpmn.CallActivity")),i.data=e.data,i.plane=e.plane,i.bpmnName="CallActivity",i.groupName="CallActivity",i.actions=i.getPath(),i}return o(t,e),c(t,[{key:"getPath",value:function(){var e=this.plane.bounds,t=e.height,n=e.width,r=this.lineStyle.lineWidth,a=[];return[{lineStyle:{lineWidth:r+2,lineStyle:"solid"},actions:[{action:"move",x:0,y:4},{action:"quadraticCurve",x1:0,y1:0,x:4,y:0},{action:"line",x:n-4,y:0},{action:"quadraticCurve",x1:n,y1:0,x:n,y:4},{action:"line",x:n,y:t-4},{action:"quadraticCurve",x1:n,y1:t,x:n-4,y:t},{action:"line",x:4,y:t},{action:"quadraticCurve",x1:0,y1:t,x:0,y:t-4},{action:"close"}]}].concat(i(this.style.content||a),[{fillStyle:{type:"none"},lineStyle:{lineWidth:0},actions:[{action:"move",x:0,y:4},{action:"quadraticCurve",x1:0,y1:0,x:4,y:0},{action:"line",x:n-4,y:0},{action:"quadraticCurve",x1:n,y1:0,x:n,y:4},{action:"line",x:n,y:t-4},{action:"quadraticCurve",x1:n,y1:t,x:n-4,y:t},{action:"line",x:4,y:t},{action:"quadraticCurve",x1:0,y1:t,x:0,y:t-4},{action:"close"}]}])}},{key:"getTextBlock",value:function(){var e=this.plane.bounds,t=e.height;return{x:10,y:0,width:e.width-20,height:t}}}]),t}(s.a);t.a=u},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=n(0),a=n(3),o=n(27),s=n(1),l=(n(7),n(2)),c=function(){function e(e,t){for(var n=0;n2&&n.points.length<=0&&(n.points=p.filter(function(e,t){return 0!==t&&t!==p.length-1})),t&&(n.points=a.a.getConnectionPoints(n,y)),"curve"!==n.linkerType&&"broken"!==n.linkerType||n.points&&0!==n.points.length||(n.points=a.a.getConnectionPoints(n,y)),null==h.angle&&(h.angle=a.a.getAngle(p[1],p[0])),null==f.angle&&(f.angle=a.a.getAngle(p[p.length-2],p[p.length-1]));var m=f.x,g=f.y,v=h.x,x=h.y;f.x>=h.x&&(m=h.x,v=f.x),f.y>=h.y&&(g=h.y,x=f.y),n.points.forEach(function(e,t){e.xv&&(v=e.x),e.yx&&(x=e.y)});var b={x:m,y:g,width:v-m,height:x-g},w=this.$container.find('.shape-box[data-id="'+i.id+'"]');0===w.length&&(w=Object(l.a)("
").appendTo(this.$container.find(".bpd-designer")));var E=w.find(".shape-canvas"),S=Object(s.k)(b.width+20),k=Object(s.k)(b.height+20);E.attr({width:S,height:k}),w.css({left:Object(s.k)(b.x-10)+"px",top:Object(s.k)(b.y-10)+"px",width:S,height:k});var C=E[0].getContext("2d"),A=this.options.bpmnStyle[n.bpmnName]||{},O=Object.assign({},n.lineStyle,A.lineStyle);C.scale(this.options.scale,this.options.scale),C.translate(10,10),C.lineWidth=O.lineWidth,C.strokeStyle="rgb("+O.lineColor+")",C.fillStyle="rgb("+O.lineColor+")",C.save(),"dashed"===O.lineStyle?a.a.setLineDash(C,[8*O.lineWidth,4*O.lineWidth]):"dot"===O.lineStyle?a.a.setLineDash(C,[O.lineWidth,2*O.lineWidth]):"dashdot"===O.lineStyle&&a.a.setLineDash(C,[8*O.lineWidth,3*O.lineWidth,O.lineWidth,3*O.lineWidth]);var R={x:h.x-b.x,y:h.y-b.y},P={x:f.x-b.x,y:f.y-b.y};if(C.beginPath(),C.moveTo(R.x,R.y),"curve"===n.linkerType){var T=n.points[0],j=n.points[1];C.bezierCurveTo(T.x-b.x,T.y-b.y,j.x-b.x,j.y-b.y,P.x,P.y)}else n.points.forEach(function(e,t){C.lineTo(e.x-b.x,e.y-b.y)}),C.lineTo(P.x,P.y);d.indexOf(i.id)>=0&&(C.shadowBlur=4,C.shadowColor="#ec5343"),C.stroke(),C.restore();var M=a.a.getEndpointAngle(n,"sourceRef");this.renderArrow(R,M,c,O.beginArrowStyle,n,h.angle,C);var N=a.a.getEndpointAngle(n,"targetRef");this.renderArrow(P,N,u,O.endArrowStyle,n,f.angle,C),C.restore(),this.renderConnectionText(n)}},{key:"renderArrow",value:function(e,t,n,i,a,o,s){if("solidArrow"===i){var l=Math.PI/10,c=12/Math.cos(l),u={x:e.x-c*Math.cos(t-l),y:e.y-c*Math.sin(t-l)},p={x:e.x-c*Math.sin(Math.PI/2-t-l),y:e.y-c*Math.cos(Math.PI/2-t-l)};s.beginPath(),s.moveTo(e.x,e.y),s.lineTo(u.x,u.y),s.lineTo(p.x,p.y),s.lineTo(e.x,e.y),s.closePath(),s.fill(),s.stroke()}if(n&&"solidCircle"!==i&&"dashedCircle"!==i){var h=r.a.trigger("element.get",n);if(h){s.save(),s.translate(e.x,e.y),s.rotate(o),s.translate(-e.x,-e.y);for(var f=e.x-h.shape.lineStyle.lineWidth/2,d=e.y-1.2*a.lineStyle.lineWidth,y=2*a.lineStyle.lineWidth,m=1.8*a.lineStyle.lineWidth,g=f;g<=f+y;){for(var v=d;v<=d+m;)s.clearRect(g,v,1.5,1.5),v+=1;g+=1}s.restore()}}}},{key:"renderConnectionText",value:function(e){var t=this.$container.find('.shape-box[data-id="'+e.data.id+'"]'),n=t.find(".text-box[data-shape="+e.data.id+"]");0===n.length&&(n=Object(l.a)("
").appendTo(t));var i=e.fontStyle,r="scale("+this.options.scale+")",o={"line-height":Math.round(1.25*i.size)+"px","font-size":i.size+"px","font-family":i.fontFamily,"font-weight":i.bold?"bold":"normal","font-style":i.italic?"italic":"normal","text-align":i.textAlign,color:"rgb("+i.color+")","text-decoration":i.underline?"underline":"none","-webkit-transform":r,"-ms-transform":r,"-o-transform":r,"-moz-transform":r,transform:r};if(n.css(o),null==e.data.name||""===e.data.name.trim())return void n.hide();n.show();var c=e.data.name;c.length>12&&(c=c.substr(0,12)+"..."),n.html(c),n.attr("title",e.data.name);var u=a.a.getConnectionMidpoint(e),p=t.position();n.css({left:Object(s.k)(u.x)-p.left-n.width()/2,top:Object(s.k)(u.y)-p.top-n.height()/2})}},{key:"move",value:function(e,t,n,i){var o=e.data,l=e.plane,c=(e.shape,l.waypoint[0]),u=l.waypoint[l.waypoint.length-1],p=a.a.getShapeByPosition(n,i,this.$container,!0),h=null,f=null;if(r.a.trigger("anchor.point.hide"),null!=p){var d=p.element;if(f=d.data.id,"bounds"===p.type)h=p.anchor,r.a.trigger("anchor.point.show",Object(s.k)(h));else if("shape"===p.type){var y=void 0,m=void 0;if("source"===t?(y={x:u.x,y:u.y},m=o.targetRef):(y={x:c.x,y:c.y},m=o.sourceRef),d.data.id===m)r.a.trigger("anchor.point.hide"),h={x:Object(s.i)(n),y:Object(s.i)(i),angle:null},f=null;else{for(var g=d.shape.getAnchors(),v=d.plane.bounds,x={x:v.x+v.width/2,y:v.y+v.height/2},b=-1,w=void 0,E=0;E=u.x-6&&h.x<=u.x+6&&(c.x=u.x),h.y>=u.y-6&&h.y<=u.y+6&&(c.y=u.y))):(o.targetRef=f,u.x=h.x,u.y=h.y,u.angle=h.angle,null==f&&(h.x>=c.x-6&&h.x<=c.x+6&&(u.x=c.x),h.y>=c.y-6&&h.y<=c.y+6&&(u.y=c.y))),this.renderConnection(e,!0)}}]),e}();t.a=u},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=n(6),s=function(e){function t(e){i(this,t);var n=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.data=e.data,n.plane=e.plane,n.bpmnName="SequenceFlow",n.groupName="SequenceFlow",n.linkerType="broken",n.points=[],n.lineStyle={lineWidth:2,lineColor:"50,50,50",lineStyle:"solid",beginArrowStyle:"none",endArrowStyle:"solidArrow"},n}return a(t,e),t}(o.a);t.a=s},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:128,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:16;if(e<=0)return"0";for(var n=Math.log(Math.pow(2,e))/Math.log(t),i=2;n===1/0;i*=2)n=Math.log(Math.pow(2,e/i))/Math.log(t)*i;for(var r=n-Math.floor(n),a="",o=0;o=Math.pow(2,e)?this.createId(e,t):a}},{key:"rack",value:function(e,t,n){var i=function(i){var a=0,o=void 0;do{if(a++>10){if(!n)throw new Error("too many ID collisions, use more bits");e+=n}o=this.createId(e,t)}while(Object.hasOwnProperty.call(r,o));return r[o]=i,o},r=i.hats={};return i.get=function(e){return i.hats[e]},i.set=function(e,t){return i.hats[e]=t,i},i.bits=e||128,i.base=t||16,i}},{key:"next",value:function(e){return this._seed(e||!0)}},{key:"nextPrefixed",value:function(e,t){var n=void 0;do{n=e+this.next(!0)}while(this.assigned(n));return this.claim(n,t),n}},{key:"claim",value:function(e,t){this._seed.set(e,t||!0)}},{key:"assigned",value:function(e){return this._seed.get(e)||!1}},{key:"unclaim",value:function(e){delete this._seed.hats[e]}},{key:"clear",value:function(){var e=this._seed.hats;for(var t in e)this.unclaim(t)}}]),e}();t.a=a},function(e,t,n){"use strict";var i=n(30),r=n(42),a=n.n(r),o=n(43),s=n.n(o),l=n(44),c=n.n(l),u=n(45),p=n.n(u),h={bpmn:a.a,bpmndi:s.a,dc:c.a,di:p.a};t.a=function(e,t){var n=Object.assign({},h,e);return new i.a(n,t)}},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=n(8),s=n(0),l=n(36),c=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:function(){})(this.create(e.descriptor,e.attrs))}},{key:"fromXML",value:function(e,t,n,i){"string"==typeof t&&t.constructor===String||(i=n,n=t,t="bpmn:Definitions"),"function"==typeof n&&n.constructor===Function&&(i=n,n={});var r=new l.a(Object.assign({model:this,lax:!0},n)),a=r.handler(t);r.fromXML(e,a,i)}},{key:"toXML",value:function(e,t,n){"function"==typeof t&&t.constructor===Function&&(n=t,t={});var i,r,a=new l.b(t);try{i=a.toXML(e)}catch(e){r=e}return n(r,i)}},{key:"test",value:function(e){console.log("test",e,this.a)}}]),t}(o.a);t.a=u},function(e,t,n){"use strict";function i(e,t){this.model=e,this.properties=t}t.a=i;var r=n(32);i.prototype.createType=function(e){function t(e){i.define(this,"$type",{value:o,enumerable:!0}),i.define(this,"$attrs",{value:{}}),i.define(this,"$parent",{writable:!0});for(var t in e)this.set(t,e[t])}var n=this.model,i=this.properties,a=Object.create(r.a.prototype);e.properties.forEach(function(e){e.isMany||void 0===e.default||(a[e.name]=e.default)}),i.defineModel(a,n),i.defineDescriptor(a,e);var o=e.ns.name;return t.prototype=a,t.hasType=a.$instanceOf=this.model.hasType,i.defineModel(t,n),i.defineDescriptor(t,e),t}},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=function(){function e(e,t){for(var n=0;n already defined")}t.a=i;var a=n(34),o=n(5);i.prototype.getPackage=function(e){return this.packageMap[e]},i.prototype.getPackages=function(){return this.packages},i.prototype.registerPackage=function(e){var t=this;e=Object.assign({},e);var n=this.packageMap;r(n,e,"prefix"),r(n,e,"uri"),e.types.forEach(function(n){t.registerType(n,e)}),n[e.uri]=n[e.prefix]=e,this.packages.push(e)},i.prototype.registerType=function(e,t){var n=this;e=Object.assign({},e,{superClass:(e.superClass||[]).slice(),extends:(e.extends||[]).slice(),properties:(e.properties||[]).slice(),meta:Object.assign(e.meta||{})});var i=Object(o.g)(e.name,t.prefix),r=i.name,a={};e.properties.forEach(function(e){var t=Object(o.g)(e.name,i.prefix),n=t.name;Object(o.e)(e.type)||(e.type=Object(o.g)(e.type,t.prefix).name),Object.assign(e,{ns:t,name:n}),a[n]=e}),Object.assign(e,{ns:i,name:r,propertiesByName:a}),e.extends.forEach(function(e){var t=n.typeMap[e];t.traits=t.traits||[],t.traits.push(r)}),this.definePackage(e,t),this.typeMap[r]=e},i.prototype.mapTypes=function(e,t,n){function i(e){return r(e,!0)}function r(n,i){var r=Object(o.g)(n,Object(o.e)(n)?"":e.prefix);s.mapTypes(r,t,i)}var a=Object(o.e)(e.name)?{name:e.name}:this.typeMap[e.name],s=this;if(!a)throw new Error("unknown type <"+e.name+">");a.superClass&&a.superClass.forEach(function(e){n?i(e):r(e)}),t(a,!n),a.traits&&a.traits.length>0&&a.traits.forEach(function(e){i(e)})},i.prototype.getEffectiveDescriptor=function(e){var t=Object(o.g)(e),n=new a.a(t);this.mapTypes(t,function(e,t){n.addTrait(e,t)});var i=n.build();return this.definePackage(i,i.allTypes[i.allTypes.length-1].$pkg),i},i.prototype.definePackage=function(e,t){this.properties.define(e,"$pkg",{value:t})}},function(e,t,n){"use strict";function i(e,t){var n={},i=Object(e);return t.forEach(function(t){t in i&&(n[t]=e[t])}),n}function r(e){this.ns=e,this.name=e.name,this.allTypes=[],this.allTypesByName={},this.properties=[],this.propertiesByName={}}t.a=r;var a=n(5);r.prototype.build=function(){return i(this,["ns","name","allTypes","allTypesByName","properties","propertiesByName","bodyProperty","idProperty"])},r.prototype.addProperty=function(e,t,n){"boolean"==typeof t&&(n=t,t=void 0),this.addNamedProperty(e,!1!==n);var i=this.properties;void 0!==t?i.splice(t,0,e):i.push(e)},r.prototype.replaceProperty=function(e,t,n){var i=e.ns,r=this.properties,a=this.propertiesByName,o=e.name!==t.name;if(e.isId){if(!t.isId)throw new Error("property <"+t.ns.name+"> must be id property to refine <"+e.ns.name+">");this.setIdProperty(t,!1)}if(e.isBody){if(!t.isBody)throw new Error("property <"+t.ns.name+"> must be body property to refine <"+e.ns.name+">");this.setBodyProperty(t,!1)}var s=r.indexOf(e);if(-1===s)throw new Error("property <"+i.name+"> not found in property list");r.splice(s,1),this.addProperty(t,n?void 0:s,o),a[i.name]=a[i.localName]=t},r.prototype.redefineProperty=function(e,t,n){var i=e.ns.prefix,r=t.split("#"),o=Object(a.g)(r[0],i),s=Object(a.g)(r[1],o.prefix).name,l=this.propertiesByName[s];if(!l)throw new Error("refined property <"+s+"> not found");this.replaceProperty(l,e,n),delete e.redefines},r.prototype.addNamedProperty=function(e,t){var n=e.ns,i=this.propertiesByName;t&&(this.assertNotDefined(e,n.name),this.assertNotDefined(e,n.localName)),i[n.name]=i[n.localName]=e},r.prototype.removeNamedProperty=function(e){var t=e.ns,n=this.propertiesByName;delete n[t.name],delete n[t.localName]},r.prototype.setBodyProperty=function(e,t){if(t&&this.bodyProperty)throw new Error("body property defined multiple times (<"+this.bodyProperty.ns.name+">, <"+e.ns.name+">)");this.bodyProperty=e},r.prototype.setIdProperty=function(e,t){if(t&&this.idProperty)throw new Error("id property defined multiple times (<"+this.idProperty.ns.name+">, <"+e.ns.name+">)");this.idProperty=e},r.prototype.assertNotDefined=function(e,t){var n=e.name,i=this.propertiesByName[n];if(i)throw new Error("property <"+n+"> already defined; override of <"+i.definedBy.ns.name+"#"+i.ns.name+"> by <"+e.definedBy.ns.name+"#"+e.ns.name+"> not allowed without redefines")},r.prototype.hasProperty=function(e){return this.propertiesByName[e]},r.prototype.addTrait=function(e,t){var n=this,i=this.allTypesByName,r=this.allTypes,a=e.name;a in i||(e.properties&&e.properties.forEach(function(i){i=Object.assign({},i,{name:i.ns.localName,inherited:t}),Object.defineProperty(i,"definedBy",{value:e});var r=i.replaces,a=i.redefines;r||a?n.redefineProperty(i,r||a,r):(i.isBody&&n.setBodyProperty(i),i.isId&&n.setIdProperty(i),n.addProperty(i))}),r.push(e),i[a]=e)}},function(e,t,n){"use strict";function i(e){this.model=e}function r(e){return void 0===e}function a(e,t,n){Object.defineProperty(e,t.name,{enumerable:!t.isReference,writable:!0,value:n,configurable:!0})}t.a=i,i.prototype.set=function(e,t,n){var i=this.model.getPropertyDescriptor(e,t),o=i&&i.name;r(n)?i?delete e[o]:delete e.$attrs[t]:i?o in e?e[o]=n:a(e,i,n):e.$attrs[t]=n},i.prototype.get=function(e,t){var n=this.model.getPropertyDescriptor(e,t);if(!n)return e.$attrs[t];var i=n.name;return!e[i]&&n.isMany&&a(e,n,[]),e[i]},i.prototype.define=function(e,t,n){Object.defineProperty(e,t,n)},i.prototype.defineDescriptor=function(e,t){this.define(e,"$descriptor",{value:t})},i.prototype.defineModel=function(e,t){this.define(e,"$model",{value:t})}},function(e,t,n){"use strict";var i=n(37);n.d(t,"a",function(){return i.a});var r=n(41);n.d(t,"b",function(){return r.a})},function(e,t,n){"use strict";function i(e,t){t="function"==typeof t&&t.constructor===Function?t:function(e){return e===t};var n;return e.forEach(function(e,i){if(t(e,i))return n=e,!1}),n}function r(e){return e.charAt(0).toUpperCase()+e.slice(1)}function a(e,t){return Object(A.d)(t)?e.prefix+":"+r(e.localName):e.name}function o(e,t){var n=e.name,i=e.localName,r=t.xml&&t.xml.typePrefix;return r&&0===i.indexOf(r)?e.prefix+":"+i.slice(r.length):n}function s(e,t){var n=Object(A.g)(e);return o(n,t.getPackage(n.prefix))}function l(e){return new Error(e)}function c(e){return e.$descriptor}function u(e){setTimeout(e,0)}function p(e){Object.assign(this,e),this.elementsById={},this.references=[],this.warnings=[],this.addReference=function(e){this.references.push(e)},this.addElement=function(e){if(!e)throw l("expected element");var t,n=this.elementsById,i=c(e),r=i.idProperty;if(r&&(t=e.get(r.name))){if(n[t])throw l("duplicate ID <"+t+">");n[t]=e}},this.addWarning=function(e){this.warnings.push(e)}}function h(){}function f(){}function d(){}function y(e,t){this.property=e,this.context=t}function m(e,t){this.element=t,this.propertyDesc=e}function g(){}function v(e,t,n){this.model=e,this.type=e.getType(t),this.context=n}function x(e,t,n){v.call(this,e,t,n)}function b(e,t,n){this.model=e,this.context=n}function w(e){e instanceof C.a&&(e={model:e}),Object.assign(this,{lax:!1},e)}t.a=w;var E=n(38),S=n.n(E),k=n(40),C=n(8),A=n(5),O=k.a.Parser;h.prototype.handleEnd=function(){},h.prototype.handleText=function(){},h.prototype.handleNode=function(){},f.prototype=Object.create(h.prototype),f.prototype.handleNode=function(){return this},d.prototype=Object.create(h.prototype),d.prototype.handleText=function(e){this.body=(this.body||"")+e},y.prototype=Object.create(d.prototype),y.prototype.handleNode=function(e){if(this.element)throw l("expected no sub nodes");return this.element=this.createReference(e),this},y.prototype.handleEnd=function(){this.element.id=this.body},y.prototype.createReference=function(e){return{property:this.property.ns.name,id:""}},m.prototype=Object.create(d.prototype),m.prototype.handleEnd=function(){var e=this.body||"",t=this.element,n=this.propertyDesc;e=Object(A.c)(n.type,e),n.isMany?t.get(n.name).push(e):t.set(n.name,e)},g.prototype=Object.create(d.prototype),g.prototype.handleNode=function(e){var t=this,n=this.element;return n?t=this.handleChild(e):(n=this.element=this.createElement(e),this.context.addElement(n)),t},v.prototype=Object.create(g.prototype),v.prototype.addReference=function(e){this.context.addReference(e)},v.prototype.handleText=function(e){if(!c(this.element).bodyProperty)throw l("unexpected body text <"+e+">");d.prototype.handleText.call(this,e)},v.prototype.handleEnd=function(){var e=this.body,t=this.element,n=c(t),i=n.bodyProperty;i&&void 0!==e&&(e=Object(A.c)(i.type,e),t.set(i.name,e))},v.prototype.createElement=function(e){var t,n=e.attributes,i=this.type,r=c(i),a=this.context,o=new i({}),s=this.model;return Object.keys(n).forEach(function(e){var i,l=n[e],c=r.propertiesByName[e];c&&c.isReference?c.isMany?(i=l.split(" "),i.forEach(function(e){a.addReference({element:o,property:c.ns.name,id:e})})):a.addReference({element:o,property:c.ns.name,id:l}):(c?l=Object(A.c)(c.type,l):"xmlns"!==e&&(t=Object(A.g)(e,r.ns.prefix),s.getPackage(t.prefix)&&a.addWarning({message:"unknown attribute <"+e+">",element:o,property:e,value:l})),o.set(e,l))}),o},v.prototype.getPropertyForNode=function(e){var t,n,r=e.name,o=Object(A.g)(r),u=this.type,p=this.model,h=c(u),f=o.name,d=h.propertiesByName[f];if(d)return Object(A.i)(d)&&(t=e.attributes[A.b])?(t=s(t,p),n=p.getType(t),Object.assign({},d,{effectiveType:c(n).name})):d;var y=p.getPackage(o.prefix);if(y){if(t=a(o,y),n=p.getType(t),d=i(h.properties,function(e){return!e.isVirtual&&!e.isReference&&!e.isAttribute&&n.hasType(e.type)}))return Object.assign({},d,{effectiveType:c(n).name})}else if(d=i(h.properties,function(e){return!e.isReference&&!e.isAttribute&&"Element"===e.type}))return d;throw l("unrecognized element <"+o.name+">")},v.prototype.toString=function(){return"ElementDescriptor["+c(this.type).name+"]"},v.prototype.valueHandler=function(e,t){return new m(e,t)},v.prototype.referenceHandler=function(e){return new y(e,this.context)},v.prototype.handler=function(e){return"Element"===e?new b(this.model,e,this.context):new v(this.model,e,this.context)},v.prototype.handleChild=function(e){var t,n,i,r;if(t=this.getPropertyForNode(e),i=this.element,n=t.effectiveType||t.type,Object(A.f)(n))return this.valueHandler(t,i);r=t.isReference?this.referenceHandler(t).handleNode(e):this.handler(n).handleNode(e);var a=r.element;return void 0!==a&&(t.isMany?i.get(t.name).push(a):i.set(t.name,a),t.isReference?(Object.assign(a,{element:i}),this.context.addReference(a)):a.$parent=i),r},x.prototype=Object.create(v.prototype),x.prototype.createElement=function(e){var t=e.name,n=Object(A.g)(t),i=this.model,r=this.type,o=i.getPackage(n.prefix),s=o&&a(n,o)||t;if(!r.hasType(s))throw l("unexpected element <"+e.originalName+">");return v.prototype.createElement.call(this,e)},b.prototype=Object.create(g.prototype),b.prototype.createElement=function(e){var t=e.name,n=Object(A.g)(t),i=n.prefix,r=e.ns[i+"$uri"],a=e.attributes;return this.model.createAny(t,r,a)},b.prototype.handleChild=function(e){var t,n=new b(this.model,"Element",this.context).handleNode(e),i=this.element,r=n.element;return void 0!==r&&(t=i.$children=i.$children||[],t.push(r),r.$parent=i),n},b.prototype.handleEnd=function(){this.body&&(this.element.$body=this.body)},w.prototype.fromXML=function(e,t,n){function i(e,t,n){var i=t(),r=i.line,a=i.column,o=i.data;"<"===o.charAt(0)&&-1!==o.indexOf(" ")&&(o=o.slice(0,o.indexOf(" "))+">");var s="unparsable content "+(o?o+" ":"")+"detected\n\tline: "+r+"\n\tcolumn: "+a+"\n\tnested error: "+e.message;if(n)return b.addWarning({message:s,error:e}),console.warn("could not parse node"),console.warn(e),!0;throw console.error("could not parse document"),console.error(e),l(s)}function r(e,t){return i(e,t,!0)}function a(){var e,t,n=b.elementsById,i=b.references;for(e=0;t=i[e];e++){var r=t.element,a=n[t.id],o=c(r).propertiesByName[t.property];if(a||b.addWarning({message:"unresolved reference <"+t.id+">",element:t.element,property:t.property,value:t.id}),o.isMany){var s=r.get(o.name),l=s.indexOf(t);-1===l&&(l=s.length),a?s[l]=a:s.splice(l,1)}else r.set(o.name,a)}}function o(){E.pop().handleEnd()}function s(e){if(k.test(e)){var t=C.exec(e),n=t&&t[1];n&&!A.test(n)&&b.addWarning({message:"unsupported document encoding <"+n+">, falling back to UTF-8"})}}function h(e,t){var n=E.peek();try{E.push(n.handleNode(e))}catch(e){i(e,t,x)&&E.push(new f)}}function d(e,t){try{E.peek().handleText(e)}catch(e){r(e,t)}}function y(e,t){(e=e.trim())&&d(e,t)}var m=t.rootHandler;t instanceof v?(m=t,t={}):"string"==typeof t?(m=this.handler(t),t={}):"string"==typeof m&&(m=this.handler(m));var g=this.model,x=this.lax,b=new p(Object.assign({},t,{rootHandler:m})),w=new O({proxy:!0}),E=new S.a;m.context=b,E.push(m);var k=/^<\?xml /i,C=/ encoding="([^"]+)"/i,A=/^utf-8$/i,R=g.getPackages().reduce(function(e,t){return e[t.uri]=t.prefix,e},{});w.ns(R).on("openTag",function(e,t,n,i){var r=e.attrs||{},a=Object.keys(r).reduce(function(e,n){var i=t(r[n]);return e[n]=i,e},{});h({name:e.name,originalName:e.originalName,attributes:a,ns:e.ns},i)}).on("question",s).on("closeTag",o).on("cdata",d).on("text",function(e,t,n){y(t(e),n)}).on("error",i).on("warn",r),u(function(){var t;try{w.parse(e),a()}catch(e){t=e}var i=m.element;t||i||(t=l("failed to parse document as <"+m.type.$descriptor.name+">")),n(t,t?void 0:i,b)})},w.prototype.handler=function(e){return new x(this.model,e)}},function(e,t,n){"use strict";(function(t){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(e,t){for(var n=0;n0&&(e=this.data.pop(),this.top--),e}},{key:"push",value:function(e){return this.data[++this.top]=e,this}},{key:"search",value:function(e){var t=this.data.indexOf(e);return-1===t?-1:this.data.length-t}}]),e}();e.exports=r}("undefined"!=typeof window&&window)}).call(t,n(39))},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";function i(e,t,n,i){return i?m.call(v,i)?v[i]:"&"+i+";":y(t?t:parseInt(n,16))}function r(e){return e.length>3&&-1!==e.indexOf("&")?e.replace(g,i):e}function a(e){return new Error(e)}function o(e){return"missing namespace for prefix <"+e+">"}function s(e){return{get:e,enumerable:!0}}function l(e){var t,n={};for(t in e)n[t]=e[t];return n}function c(e){return e+"$uri"}function u(e){var t,n,i={};for(t in e)n=e[t],i[n]=n,i[c(n)]=t;return i}function p(){return{line:0,column:0}}function h(e){throw e}function f(e){function t(e){e instanceof Error||(e=a(e)),N=e,P(e,T)}function n(e){S&&(e instanceof Error||(e=a(e)),S(e,T))}function i(e){function i(){if(null!==B)return B;var e,t,i,a,s,u,p,h,f,d,y,m=M&&L.xmlns,g=M&&j?[]:null,v=G,x=H,b=x.length,E={},S={};e:for(;v8)){for((d<65||d>122||d>90&&d<97)&&95!==d&&58!==d&&(n("illegal first char attribute name"),f=!0),y=v+1;y96&&d<123||d>64&&d<91||d>47&&d<59||46===d||45===d||95===d)){if(32===d||d<14&&d>8){n("missing attribute value"),v=y;continue e}if(61===d)break;n("illegal attribute name char"),f=!0}if(h=x.substring(v,y),"xmlns:xmlns"===h&&(n("illegal declaration of xmlns"),f=!0),34===(d=x.charCodeAt(y+1)))-1===(y=x.indexOf('"',v=y+2))&&-1!==(y=x.indexOf("'",v))&&(n("attribute value quote missmatch"),f=!0);else if(39===d)-1===(y=x.indexOf("'",v=y+2))&&-1!==(y=x.indexOf('"',v))&&(n("attribute value quote missmatch"),f=!0);else for(n("missing attribute value quotes"),f=!0,y+=1;y8);y++);for(-1===y&&(n("missing closing quotes"),y=b,f=!0),f||(u=x.substring(v,y)),v=y;y+18);y++)v===y&&(n("illegal character after attribute end"),f=!0);if(v=y+1,!f)if(h in S)n("attribute <"+h+"> already defined");else if(S[h]=!0,M)if(j){if(null!==(s="xmlns"===h?"xmlns":120===h.charCodeAt(0)&&"xmlns:"===h.substr(0,6)?h.substr(6):null)){if(e=r(u),t=c(s),!(p=O[e])){if("xmlns"===s||t in L&&L[t]!==e)do{p="ns"+_++}while(void 0!==L[p]);else p=s;O[e]=p}L[s]!==p&&(a||(L=l(L),a=!0),L[s]=p,"xmlns"===s&&(L[c(p)]=e,m=p),L[t]=e),E[h]=u;continue}g.push(h,u)}else d=h.indexOf(":"),-1!==d?(i=L[h.substring(0,d)])?(h=m===i?h.substr(d+1):i+h.substr(d),h===w&&(d=u.indexOf(":"),-1!==d?(i=u.substring(0,d),i=L[i]||i,u=i+u.substring(d)):u=m+":"+u),E[h]=u):n(o(h.substring(0,d))):E[h]=u;else E[h]=u}if(j)for(v=0,b=g.length;v=o&&(t=i.exec(e))&&!((s=t[0].length+t.index)>z);)r+=1,o=s;return-1===z?(a=s,n=e.substring(W)):0===W?(console.log(z-o),n=e.substring(W,z)):(a=z-o,n=-1===W?e.substring(z):e.substring(z,W+1)),{data:n,line:r,column:a}}var p,h,f,d,x,b,S,P,N,B,I=M?[]:null,L=M?u(O):null,$=[],_=0,F=!1,q=!1,z=0,W=0,H="",G=0;for(T=a,R&&(N=Object.create({},{name:s(function(){return S}),originalName:s(function(){return P}),attrs:s(i),ns:s(function(){return L})}));-1!==W;){if(-1===(z=60===e.charCodeAt(W)?W:e.indexOf("<",W)))return $.length?t("unexpected end of file"):0===W?t("missing start tag"):void(W",z+1)))return t("unclosed tag");if(B={},47===x){if(F=!1,q=!0,!$.length)return t("missing open tag");if(h=S=$.pop(),d=z+2+h.length,e.substring(z+2,d)!==h)return t("closing tag mismatch");for(;d8&&x<14))return t("close tag")}else{if(47===e.charCodeAt(W-1)?(h=S=e.substring(z+1,W-1),F=!0,q=!0):(h=S=e.substring(z+1,W),F=!0,q=!1),!(x>96&&x<123||x>64&&x<91||95===x||58===x))return t("illegal first char nodeName");for(d=1,f=h.length;d96&&x<123||x>64&&x<91||x>47&&x<59||45===x||95===x||46===x)){if(32===x||x<14&&x>8){S=h.substring(0,d),B=null;break}return t("invalid nodeName")}q||$.push(S)}if(M){if(p=L,F&&(q||I.push(p),null===B&&(j=-1!==h.indexOf("xmlns",d))&&(G=d,H=h,i(),j=!1)),P=S,-1!==(x=S.indexOf(":"))){if(!(b=L[S.substring(0,x)]))return t("missing namespace on <"+P+">");S=S.substr(x+1)}else b=L.xmlns;b&&(S=b+":"+S)}if(F&&(G=d,H=h,m&&(R?m(N,r,q,T):m(S,i,r,q,T),D)))return;if(q){if(g&&(g(R?N:S,r,F,T),D))return;M&&(L=F?p:I.pop())}W+=1}else{if(-1===(W=e.indexOf("?>",z)))return t("unclosed question");if(C&&(C(e.substring(z,W+2),T),D))return;W+=2}else{if(91===(x=e.charCodeAt(z+2))&&"CDATA["===e.substr(z+3,6)){if(-1===(W=e.indexOf("]]>",z)))return t("unclosed cdata");if(v&&(v(e.substring(z+9,W),T),D))return;W+=3;continue}if(45===x&&45===e.charCodeAt(z+3)){if(-1===(W=e.indexOf("--\x3e",z)))return t("unclosed comment");if(k&&(k(e.substring(z+4,W),r,T),D))return;W+=3;continue}if(-1===(W=e.indexOf(">",z+1)))return t("unclosed tag");if(A&&(A(e.substring(z,W+1),r,T),D))return;W+=1}}}if(!this)return new f(e);var y,m,g,v,S,k,C,A,O,R=e&&e.proxy,P=h,T=p,j=!1,M=!1,N=null,D=!1;this.on=function(e,t){if("function"!=typeof t)throw a("required args ");switch(e){case"openTag":m=t;break;case"text":y=t;break;case"closeTag":g=t;break;case"error":P=t;break;case"warn":S=t;break;case"cdata":v=t;break;case"attention":A=t;break;case"question":C=t;break;case"comment":k=t;break;default:throw a("unsupported event: "+e)}return this},this.ns=function(e){if(void 0===e&&(e={}),"object"!==(void 0===e?"undefined":d(e)))throw a("required args ");var t,n={};for(t in e)n[t]=e[t];return n[x]=b,M=!0,O=n,this},this.parse=function(e){if("string"!=typeof e)throw a("required args ");return N=null,i(e),T=p,D=!1,N},this.stop=function(){D=!0}}var d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y=String.fromCharCode,m=Object.prototype.hasOwnProperty,g=/&#(\d+);|&#x([0-9a-f]+);|&(\w+);/gi,v={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'};Object.keys(v).forEach(function(e){v[e.toUpperCase()]=v[e]});var x="http://www.w3.org/2001/XMLSchema-instance",b="xsi",w="xsi:type",E="non-whitespace outside of root node";t.a={Parser:f,decode:r}},function(e,t,n){"use strict";function i(e,t){var n=[];return e.forEach(function(e,i){t(e,i)&&n.push(e)}),n}function r(e){var t={},n={},i={},r=[],a=[];this.byUri=function(t){return n[t]||e&&e.byUri(t)},this.add=function(e,t){n[e.uri]=e,t?r.push(e):a.push(e),this.mapPrefix(e.prefix,e.uri)},this.uriByPrefix=function(e){return t[e||"xmlns"]},this.mapPrefix=function(e,n){t[e||"xmlns"]=n},this.logUsed=function(e){var t=e.uri;i[t]=this.byUri(t)},this.getUsed=function(e){function t(e){return i[e.uri]}return[].concat(r,a).filter(t)}}function a(e){return e.charAt(0).toLowerCase()+e.slice(1)}function o(e,t){return Object(A.d)(t)?a(e):e}function s(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function l(e){return"string"==typeof e&&e.constructor===String?e:(e.prefix?e.prefix+":":"")+e.localName}function c(e){return e.getUsed().map(function(e){return{name:"xmlns"+(e.prefix?":"+e.prefix:""),value:e.uri}})}function u(e,t){return t.isGeneric?Object.assign({localName:t.ns.localName},e):Object.assign({localName:o(t.ns.localName,t.$pkg)},e)}function p(e,t){return Object.assign({localName:t.ns.localName},e)}function h(e){return i(e.$descriptor.properties,function(t){var n=t.name;if(t.isVirtual)return!1;if(!e.hasOwnProperty(n))return!1;var i=e[n];return i!==t.default&&null!==i&&(!t.isMany||i.length)})}function f(e,t,n){return e="string"==typeof e&&e.constructor===String?e:""+e,e.replace(t,function(e){return"&"+n[e]+";"})}function d(e){return f(e,R,T)}function y(e){return f(e,P,j)}function m(e){return i(e,function(e){return e.isAttr})}function g(e){return i(e,function(e){return!e.isAttr})}function v(e){this.tagName=e}function x(){}function b(e){this.tagName=e}function w(e,t){this.body=[],this.attrs=[],this.parent=e,this.propertyDescriptor=t}function E(e,t){w.call(this,e,t)}function S(){this.value="",this.write=function(e){this.value+=e}}function k(e,t){var n=[""];this.append=function(t){return e.write(t),this},this.appendNewLine=function(){return t&&e.write("\n"),this},this.appendIndent=function(){return t&&e.write(n.join(" ")),this},this.indent=function(){return n.push(""),this},this.unindent=function(){return n.pop(),this}}function C(e){function t(t,n){var i=n||new S,r=new k(i,e.format);if(e.preamble&&r.append(O),(new w).build(t).serializeTo(r),!n)return i.value}return e=Object.assign({format:!1,preamble:!0},e||{}),{toXML:t}}t.a=C;var A=n(5),O='\n',R=/<|>|'|"|&|\n\r|\n/g,P=/<|>|&/g,T={"\n":"#10","\n\r":"#10",'"':"#34","'":"#39","<":"#60",">":"#62","&":"#38"},j={"<":"lt",">":"gt","&":"amp"};v.prototype.build=function(e){return this.element=e,this},v.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"+this.element.id+"").appendNewLine()},x.prototype.serializeValue=x.prototype.serializeTo=function(e){e.append(this.escape?y(this.value):this.value)},x.prototype.build=function(e,t){return this.value=t,"String"===e.type&&-1!==t.search(P)&&(this.escape=!0),this},s(b,x),b.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"),this.serializeValue(e),e.append("").appendNewLine()},w.prototype.build=function(e){this.element=e;var t,n,i=e.$descriptor,r=this.propertyDescriptor,a=i.isGeneric;return t=a?this.parseGeneric(e):this.parseNsAttributes(e),this.ns=r?this.nsPropertyTagName(r):this.nsTagName(i),this.tagName=this.addTagName(this.ns),a||(n=h(e),this.parseAttributes(m(n)),this.parseContainments(g(n))),this.parseGenericAttributes(e,t),this},w.prototype.nsTagName=function(e){return u(this.logNamespaceUsed(e.ns),e)},w.prototype.nsPropertyTagName=function(e){return p(this.logNamespaceUsed(e.ns),e)},w.prototype.isLocalNs=function(e){return e.uri===this.ns.uri},w.prototype.nsAttributeName=function(e){var t;if(t="string"==typeof e&&e.constructor===String?Object(A.g)(e):e.ns,e.inherited)return{localName:t.localName};var n=this.logNamespaceUsed(t);return this.getNamespaces().logUsed(n),this.isLocalNs(n)?{localName:t.localName}:Object.assign({localName:t.localName},n)},w.prototype.parseGeneric=function(e){var t=this,n=this.body,i=[];for(var r in e){"$body"===r?n.push((new x).build({type:"String"},e[r])):"$children"===r?val.forEach(function(e){n.push(new w(t).build(e))}):0!==r.indexOf("$")&&t.parseNsAttribute(e,r,e[r])&&i.push({name:r,value:e[r]})}return i},w.prototype.parseNsAttribute=function(e,t,n){var i,r=e.$model,a=Object(A.g)(t);if("xmlns"===a.prefix&&(i={prefix:a.localName,uri:n}),a.prefix||"xmlns"!==a.localName||(i={uri:n}),!i)return{name:t,value:n};if(r&&r.getPackage(n))this.logNamespace(i,!0,!0);else{var o=this.logNamespaceUsed(i,!0);this.getNamespaces().logUsed(o)}},w.prototype.parseNsAttributes=function(e,t){var n=this,i=e.$attrs,r=[];for(var a in i){var o=n.parseNsAttribute(e,a,i[a]);o&&r.push(o)}return r},w.prototype.parseGenericAttributes=function(e,t){var n=this;t.forEach(function(t){if(t.name!==A.b)try{n.addAttribute(n.nsAttributeName(t.name),t.value)}catch(n){console.warn("missing namespace information for ",t.name,"=",t.value,"on",e,n)}})},w.prototype.parseContainments=function(e){var t=this,n=this.body,i=this.element;e.forEach(function(e){var r=i.get(e.name),a=e.isReference;if(e.isMany||(r=[r]),e.isBody)n.push((new x).build(e,r[0]));else if(Object(A.f)(e.type))r.forEach(function(i){n.push(new b(t.addTagName(t.nsPropertyTagName(e))).build(e,i))});else if(a)r.forEach(function(i){n.push(new v(t.addTagName(t.nsPropertyTagName(e))).build(i))});else{var o=Object(A.i)(e),s=Object(A.h)(e);r.forEach(function(i){var r;r=o?new E(t,e):s?new w(t,e):new w(t),n.push(r.build(i))})}})},w.prototype.getNamespaces=function(e){var t,n=this.namespaces,i=this.parent;return n||(t=i&&i.getNamespaces(),e||!t?this.namespaces=n=new r(t):n=t),n},w.prototype.logNamespace=function(e,t,n){var i=this.getNamespaces(n),r=e.uri,a=e.prefix;return i.byUri(r)||i.add(e,t),i.mapPrefix(a,r),e},w.prototype.logNamespaceUsed=function(e,t){var n,i,r,a=this.element,o=a.$model,s=this.getNamespaces(t),l=e.prefix,c=e.uri;if(!l&&!c)return{localName:e.localName};if(r=A.a[l]||o&&(o.getPackage(l)||{}).uri,!(c=c||r||s.uriByPrefix(l)))throw new Error("no namespace uri given for prefix <"+l+">");if(!(e=s.byUri(c))){for(n=l,i=1;s.uriByPrefix(n);)n=l+"_"+i++;e=this.logNamespace({prefix:n,uri:c},r===c)}return l&&s.mapPrefix(l,c),e},w.prototype.parseAttributes=function(e){var t=this,n=this.element;e.forEach(function(e){var i=n.get(e.name);if(e.isReference)if(e.isMany){var r=[];forEach(i,function(e){r.push(e.id)}),i=r.join(" ")}else i=i.id;t.addAttribute(t.nsAttributeName(e),i)})},w.prototype.addTagName=function(e){var t=this.logNamespaceUsed(e);return this.getNamespaces().logUsed(t),l(e)},w.prototype.addAttribute=function(e,t){var n=this.attrs;"string"==typeof t&&t.constructor===String&&(t=d(t)),n.push({name:e,value:t})},w.prototype.serializeAttributes=function(e){var t=this.attrs,n=this.namespaces;n&&(t=c(n).concat(t)),t.forEach(function(t){e.append(" ").append(l(t.name)).append('="').append(t.value).append('"')})},w.prototype.serializeTo=function(e){var t=this.body[0],n=t&&t.constructor!==x;e.appendIndent().append("<"+this.tagName),this.serializeAttributes(e),e.append(t?">":" />"),t&&(n&&e.appendNewLine().indent(),this.body.forEach(function(t){t.serializeTo(e)}),n&&e.unindent().appendIndent(),e.append("")),e.appendNewLine()},s(E,w),E.prototype.parseNsAttributes=function(e){var t=w.prototype.parseNsAttributes.call(this,e),n=e.$descriptor;if(n.name===this.propertyDescriptor.type)return t;var i=this.typeNs=this.nsTagName(n);this.getNamespaces().logUsed(this.typeNs);var r=e.$model.getPackage(i.uri),a=r.xml&&r.xml.typePrefix||"";return this.addAttribute(this.nsAttributeName(A.b),(i.prefix?i.prefix+":":"")+a+n.ns.localName),t},E.prototype.isLocalNs=function(e){return e.uri===(this.typeNs||this.ns).uri}},function(e,t){e.exports={name:"BPMN20",uri:"http://www.omg.org/spec/BPMN/20100524/MODEL",associations:[],types:[{name:"Interface",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"operations",type:"Operation",isMany:!0},{name:"implementationRef",type:"String",isAttr:!0}]},{name:"Operation",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"inMessageRef",type:"Message",isReference:!0},{name:"outMessageRef",type:"Message",isReference:!0},{name:"errorRef",type:"Error",isMany:!0,isReference:!0},{name:"implementationRef",type:"String",isAttr:!0}]},{name:"EndPoint",superClass:["RootElement"]},{name:"Auditing",superClass:["BaseElement"]},{name:"GlobalTask",superClass:["CallableElement"],properties:[{name:"resources",type:"ResourceRole",isMany:!0}]},{name:"Monitoring",superClass:["BaseElement"]},{name:"Performer",superClass:["ResourceRole"]},{name:"Process",superClass:["FlowElementsContainer","CallableElement"],properties:[{name:"processType",type:"ProcessType",isAttr:!0},{name:"isClosed",isAttr:!0,type:"Boolean"},{name:"auditing",type:"Auditing"},{name:"monitoring",type:"Monitoring"},{name:"properties",type:"Property",isMany:!0},{name:"laneSets",type:"LaneSet",isMany:!0,replaces:"FlowElementsContainer#laneSets"},{name:"flowElements",type:"FlowElement",isMany:!0,replaces:"FlowElementsContainer#flowElements"},{name:"artifacts",type:"Artifact",isMany:!0},{name:"resources",type:"ResourceRole",isMany:!0},{name:"correlationSubscriptions",type:"CorrelationSubscription",isMany:!0},{name:"supports",type:"Process",isMany:!0,isReference:!0},{name:"definitionalCollaborationRef",type:"Collaboration",isAttr:!0,isReference:!0},{name:"isExecutable",isAttr:!0,type:"Boolean"}]},{name:"LaneSet",superClass:["BaseElement"],properties:[{name:"lanes",type:"Lane",isMany:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Lane",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"partitionElementRef",type:"BaseElement",isAttr:!0,isReference:!0},{name:"partitionElement",type:"BaseElement"},{name:"flowNodeRef",type:"FlowNode",isMany:!0,isReference:!0},{name:"childLaneSet",type:"LaneSet",xml:{serialize:"xsi:type"}}]},{name:"GlobalManualTask",superClass:["GlobalTask"]},{name:"ManualTask",superClass:["Task"]},{name:"UserTask",superClass:["Task"],properties:[{name:"renderings",type:"Rendering",isMany:!0},{name:"implementation",isAttr:!0,type:"String"}]},{name:"Rendering",superClass:["BaseElement"]},{name:"HumanPerformer",superClass:["Performer"]},{name:"PotentialOwner",superClass:["HumanPerformer"]},{name:"GlobalUserTask",superClass:["GlobalTask"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"renderings",type:"Rendering",isMany:!0}]},{name:"Gateway",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"gatewayDirection",type:"GatewayDirection",default:"Unspecified",isAttr:!0}]},{name:"EventBasedGateway",superClass:["Gateway"],properties:[{name:"instantiate",default:!1,isAttr:!0,type:"Boolean"},{name:"eventGatewayType",type:"EventBasedGatewayType",isAttr:!0,default:"Exclusive"}]},{name:"ComplexGateway",superClass:["Gateway"],properties:[{name:"activationCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"ExclusiveGateway",superClass:["Gateway"],properties:[{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"InclusiveGateway",superClass:["Gateway"],properties:[{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"ParallelGateway",superClass:["Gateway"]},{name:"RootElement",isAbstract:!0,superClass:["BaseElement"]},{name:"Relationship",superClass:["BaseElement"],properties:[{name:"type",isAttr:!0,type:"String"},{name:"direction",type:"RelationshipDirection",isAttr:!0},{name:"source",isMany:!0,isReference:!0,type:"Element"},{name:"target",isMany:!0,isReference:!0,type:"Element"}]},{name:"BaseElement",isAbstract:!0,properties:[{name:"id",isAttr:!0,type:"String",isId:!0},{name:"documentation",type:"Documentation",isMany:!0},{name:"extensionDefinitions",type:"ExtensionDefinition",isMany:!0,isReference:!0},{name:"extensionElements",type:"ExtensionElements"}]},{name:"Extension",properties:[{name:"mustUnderstand",default:!1,isAttr:!0,type:"Boolean"},{name:"definition",type:"ExtensionDefinition",isAttr:!0,isReference:!0}]},{name:"ExtensionDefinition",properties:[{name:"name",isAttr:!0,type:"String"},{name:"extensionAttributeDefinitions",type:"ExtensionAttributeDefinition",isMany:!0}]},{name:"ExtensionAttributeDefinition",properties:[{name:"name",isAttr:!0,type:"String"},{name:"type",isAttr:!0,type:"String"},{name:"isReference",default:!1,isAttr:!0,type:"Boolean"},{name:"extensionDefinition",type:"ExtensionDefinition",isAttr:!0,isReference:!0}]},{name:"ExtensionElements",properties:[{name:"valueRef",isAttr:!0,isReference:!0,type:"Element"},{name:"values",type:"Element",isMany:!0},{name:"extensionAttributeDefinition",type:"ExtensionAttributeDefinition",isAttr:!0,isReference:!0}]},{name:"Documentation",superClass:["BaseElement"],properties:[{name:"text",type:"String",isBody:!0},{name:"textFormat",default:"text/plain",isAttr:!0,type:"String"}]},{name:"Event",isAbstract:!0,superClass:["FlowNode","InteractionNode"],properties:[{name:"properties",type:"Property",isMany:!0}]},{name:"IntermediateCatchEvent",superClass:["CatchEvent"]},{name:"IntermediateThrowEvent",superClass:["ThrowEvent"]},{name:"EndEvent",superClass:["ThrowEvent"]},{name:"StartEvent",superClass:["CatchEvent"],properties:[{name:"isInterrupting",default:!0,isAttr:!0,type:"Boolean"}]},{name:"ThrowEvent",isAbstract:!0,superClass:["Event"],properties:[{name:"dataInputs",type:"DataInput",isMany:!0},{name:"dataInputAssociations",type:"DataInputAssociation",isMany:!0},{name:"inputSet",type:"InputSet"},{name:"eventDefinitions",type:"EventDefinition",isMany:!0},{name:"eventDefinitionRef",type:"EventDefinition",isMany:!0,isReference:!0}]},{name:"CatchEvent",isAbstract:!0,superClass:["Event"],properties:[{name:"parallelMultiple",isAttr:!0,type:"Boolean",default:!1},{name:"dataOutputs",type:"DataOutput",isMany:!0},{name:"dataOutputAssociations",type:"DataOutputAssociation",isMany:!0},{name:"outputSet",type:"OutputSet"},{name:"eventDefinitions",type:"EventDefinition",isMany:!0},{name:"eventDefinitionRef",type:"EventDefinition",isMany:!0,isReference:!0}]},{name:"BoundaryEvent",superClass:["CatchEvent"],properties:[{name:"cancelActivity",default:!0,isAttr:!0,type:"Boolean"},{name:"attachedToRef",type:"Activity",isAttr:!0,isReference:!0}]},{name:"EventDefinition",isAbstract:!0,superClass:["RootElement"]},{name:"CancelEventDefinition",superClass:["EventDefinition"]},{name:"ErrorEventDefinition",superClass:["EventDefinition"],properties:[{name:"errorRef",type:"Error",isAttr:!0,isReference:!0}]},{name:"TerminateEndEvent",superClass:["EventDefinition"]},{name:"EscalationEventDefinition",superClass:["EventDefinition"],properties:[{name:"escalationRef",type:"Escalation",isAttr:!0,isReference:!0}]},{name:"Escalation",properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"escalationCode",isAttr:!0,type:"String"}],superClass:["RootElement"]},{name:"CompensateEventDefinition",superClass:["EventDefinition"],properties:[{name:"waitForCompletion",isAttr:!0,type:"Boolean",default:!0},{name:"activityRef",type:"Activity",isAttr:!0,isReference:!0}]},{name:"TimerEventDefinition",superClass:["EventDefinition"],properties:[{name:"timeDate",type:"Expression",xml:{serialize:"xsi:type"}},{name:"timeCycle",type:"Expression",xml:{serialize:"xsi:type"}},{name:"timeDuration",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"LinkEventDefinition",superClass:["EventDefinition"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"target",type:"LinkEventDefinition",isAttr:!0,isReference:!0},{name:"source",type:"LinkEventDefinition",isMany:!0,isReference:!0}]},{name:"MessageEventDefinition",superClass:["EventDefinition"],properties:[{name:"messageRef",type:"Message",isAttr:!0,isReference:!0},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"ConditionalEventDefinition",superClass:["EventDefinition"],properties:[{name:"condition",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"SignalEventDefinition",superClass:["EventDefinition"],properties:[{name:"signalRef",type:"Signal",isAttr:!0,isReference:!0}]},{name:"Signal",superClass:["RootElement"],properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"ImplicitThrowEvent",superClass:["ThrowEvent"]},{name:"DataState",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"ItemAwareElement",superClass:["BaseElement"],properties:[{name:"itemSubjectRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"dataState",type:"DataState"}]},{name:"DataAssociation",superClass:["BaseElement"],properties:[{name:"assignment",type:"Assignment",isMany:!0},{name:"sourceRef",type:"ItemAwareElement",isMany:!0,isReference:!0},{name:"targetRef",type:"ItemAwareElement",isReference:!0},{name:"transformation",type:"FormalExpression",xml:{serialize:"property"}}]},{name:"DataInput",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"inputSetRef",type:"InputSet",isVirtual:!0,isMany:!0,isReference:!0},{name:"inputSetWithOptional",type:"InputSet",isVirtual:!0,isMany:!0,isReference:!0},{name:"inputSetWithWhileExecuting",type:"InputSet",isVirtual:!0,isMany:!0,isReference:!0}]},{name:"DataOutput",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"outputSetRef",type:"OutputSet",isVirtual:!0,isMany:!0,isReference:!0},{name:"outputSetWithOptional",type:"OutputSet",isVirtual:!0,isMany:!0,isReference:!0},{name:"outputSetWithWhileExecuting",type:"OutputSet",isVirtual:!0,isMany:!0,isReference:!0}]},{name:"InputSet",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"dataInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"optionalInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"whileExecutingInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"outputSetRefs",type:"OutputSet",isMany:!0,isReference:!0}]},{name:"OutputSet",superClass:["BaseElement"],properties:[{name:"dataOutputRefs",type:"DataOutput",isMany:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"inputSetRefs",type:"InputSet",isMany:!0,isReference:!0},{name:"optionalOutputRefs",type:"DataOutput",isMany:!0,isReference:!0},{name:"whileExecutingOutputRefs",type:"DataOutput",isMany:!0,isReference:!0}]},{name:"Property",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"DataInputAssociation",superClass:["DataAssociation"]},{name:"DataOutputAssociation",superClass:["DataAssociation"]},{name:"InputOutputSpecification",superClass:["BaseElement"],properties:[{name:"dataInputs",type:"DataInput",isMany:!0},{name:"dataOutputs",type:"DataOutput",isMany:!0},{name:"inputSets",type:"InputSet",isMany:!0},{name:"outputSets",type:"OutputSet",isMany:!0}]},{name:"DataObject",superClass:["FlowElement","ItemAwareElement"],properties:[{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"}]},{name:"InputOutputBinding",properties:[{name:"inputDataRef",type:"InputSet",isAttr:!0,isReference:!0},{name:"outputDataRef",type:"OutputSet",isAttr:!0,isReference:!0},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"Assignment",superClass:["BaseElement"],properties:[{name:"from",type:"Expression",xml:{serialize:"xsi:type"}},{name:"to",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"DataStore",superClass:["RootElement","ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"capacity",isAttr:!0,type:"Integer"},{name:"isUnlimited",default:!0,isAttr:!0,type:"Boolean"}]},{name:"DataStoreReference",superClass:["ItemAwareElement","FlowElement"],properties:[{name:"dataStoreRef",type:"DataStore",isAttr:!0,isReference:!0}]},{name:"DataObjectReference",superClass:["ItemAwareElement","FlowElement"],properties:[{name:"dataObjectRef",type:"DataObject",isAttr:!0,isReference:!0}]},{name:"ConversationLink",superClass:["BaseElement"],properties:[{name:"sourceRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"ConversationAssociation",superClass:["BaseElement"],properties:[{name:"innerConversationNodeRef",type:"ConversationNode",isAttr:!0,isReference:!0},{name:"outerConversationNodeRef",type:"ConversationNode",isAttr:!0,isReference:!0}]},{name:"CallConversation",superClass:["ConversationNode"],properties:[{name:"calledCollaborationRef",type:"Collaboration",isAttr:!0,isReference:!0},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0}]},{name:"Conversation",superClass:["ConversationNode"]},{name:"SubConversation",superClass:["ConversationNode"],properties:[{name:"conversationNodes",type:"ConversationNode",isMany:!0}]},{name:"ConversationNode",isAbstract:!0,superClass:["InteractionNode","BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRefs",type:"Participant",isMany:!0,isReference:!0},{name:"messageFlowRefs",type:"MessageFlow",isMany:!0,isReference:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0}]},{name:"GlobalConversation",superClass:["Collaboration"]},{name:"PartnerEntity",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0}]},{name:"PartnerRole",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0}]},{name:"CorrelationProperty",superClass:["RootElement"],properties:[{name:"correlationPropertyRetrievalExpression",type:"CorrelationPropertyRetrievalExpression",isMany:!0},{name:"name",isAttr:!0,type:"String"},{name:"type",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"Error",superClass:["RootElement"],properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"errorCode",isAttr:!0,type:"String"}]},{name:"CorrelationKey",superClass:["BaseElement"],properties:[{name:"correlationPropertyRef",type:"CorrelationProperty",isMany:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Expression",superClass:["BaseElement"],isAbstract:!1,properties:[{name:"body",type:"String",isBody:!0}]},{name:"FormalExpression",superClass:["Expression"],properties:[{name:"language",isAttr:!0,type:"String"},{name:"evaluatesToTypeRef",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"Message",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"itemRef",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"ItemDefinition",superClass:["RootElement"],properties:[{name:"itemKind",type:"ItemKind",isAttr:!0},{name:"structureRef",type:"String",isAttr:!0},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"import",type:"Import",isAttr:!0,isReference:!0}]},{name:"FlowElement",isAbstract:!0,superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"auditing",type:"Auditing"},{name:"monitoring",type:"Monitoring"},{name:"categoryValueRef",type:"CategoryValue",isMany:!0,isReference:!0}]},{name:"SequenceFlow",superClass:["FlowElement"],properties:[{name:"isImmediate",isAttr:!0,type:"Boolean"},{name:"conditionExpression",type:"Expression",xml:{serialize:"xsi:type"}},{name:"sourceRef",type:"FlowNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"FlowNode",isAttr:!0,isReference:!0}]},{name:"FlowElementsContainer",isAbstract:!0,superClass:["BaseElement"],properties:[{name:"laneSets",type:"LaneSet",isMany:!0},{name:"flowElements",type:"FlowElement",isMany:!0}]},{name:"CallableElement",isAbstract:!0,superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"ioSpecification",type:"InputOutputSpecification",xml:{serialize:"property"}},{name:"supportedInterfaceRef",type:"Interface",isMany:!0,isReference:!0},{name:"ioBinding",type:"InputOutputBinding",isMany:!0,xml:{serialize:"property"}}]},{name:"FlowNode",isAbstract:!0,superClass:["FlowElement"],properties:[{name:"incoming",type:"SequenceFlow",isMany:!0,isReference:!0},{name:"outgoing",type:"SequenceFlow",isMany:!0,isReference:!0},{name:"lanes",type:"Lane",isVirtual:!0,isMany:!0,isReference:!0}]},{name:"CorrelationPropertyRetrievalExpression",superClass:["BaseElement"],properties:[{name:"messagePath",type:"FormalExpression"},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"CorrelationPropertyBinding",superClass:["BaseElement"],properties:[{name:"dataPath",type:"FormalExpression"},{name:"correlationPropertyRef",type:"CorrelationProperty",isAttr:!0,isReference:!0}]},{name:"Resource",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"resourceParameters",type:"ResourceParameter",isMany:!0}]},{name:"ResourceParameter",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isRequired",isAttr:!0,type:"Boolean"},{name:"type",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"CorrelationSubscription",superClass:["BaseElement"],properties:[{name:"correlationKeyRef",type:"CorrelationKey",isAttr:!0,isReference:!0},{name:"correlationPropertyBinding",type:"CorrelationPropertyBinding",isMany:!0}]},{name:"MessageFlow",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"sourceRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"MessageFlowAssociation",superClass:["BaseElement"],properties:[{name:"innerMessageFlowRef",type:"MessageFlow",isAttr:!0,isReference:!0},{name:"outerMessageFlowRef",type:"MessageFlow",isAttr:!0,isReference:!0}]},{name:"InteractionNode",isAbstract:!0,properties:[{name:"incomingConversationLinks",type:"ConversationLink",isVirtual:!0,isMany:!0,isReference:!0},{name:"outgoingConversationLinks",type:"ConversationLink",isVirtual:!0,isMany:!0,isReference:!0}]},{name:"Participant",superClass:["InteractionNode","BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"interfaceRef",type:"Interface",isMany:!0,isReference:!0},{name:"participantMultiplicity",type:"ParticipantMultiplicity"},{name:"endPointRefs",type:"EndPoint",isMany:!0,isReference:!0},{name:"processRef",type:"Process",isAttr:!0,isReference:!0}]},{name:"ParticipantAssociation",superClass:["BaseElement"],properties:[{name:"innerParticipantRef",type:"Participant",isAttr:!0,isReference:!0},{name:"outerParticipantRef",type:"Participant",isAttr:!0,isReference:!0}]},{name:"ParticipantMultiplicity",properties:[{name:"minimum",default:0,isAttr:!0,type:"Integer"},{name:"maximum",default:1,isAttr:!0,type:"Integer"}],superClass:["BaseElement"]},{name:"Collaboration",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isClosed",isAttr:!0,type:"Boolean"},{name:"participants",type:"Participant",isMany:!0},{name:"messageFlows",type:"MessageFlow",isMany:!0},{name:"artifacts",type:"Artifact",isMany:!0},{name:"conversations",type:"ConversationNode",isMany:!0},{name:"conversationAssociations",type:"ConversationAssociation"},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0},{name:"messageFlowAssociations",type:"MessageFlowAssociation",isMany:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0},{name:"choreographyRef",type:"Choreography",isMany:!0,isReference:!0},{name:"conversationLinks",type:"ConversationLink",isMany:!0}]},{name:"ChoreographyActivity",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"participantRefs",type:"Participant",isMany:!0,isReference:!0},{name:"initiatingParticipantRef",type:"Participant",isAttr:!0,isReference:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0},{name:"loopType",type:"ChoreographyLoopType",default:"None",isAttr:!0}]},{name:"CallChoreography",superClass:["ChoreographyActivity"],properties:[{name:"calledChoreographyRef",type:"Choreography",isAttr:!0,isReference:!0},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0}]},{name:"SubChoreography",superClass:["ChoreographyActivity","FlowElementsContainer"],properties:[{name:"artifacts",type:"Artifact",isMany:!0}]},{name:"ChoreographyTask",superClass:["ChoreographyActivity"],properties:[{name:"messageFlowRef",type:"MessageFlow",isMany:!0,isReference:!0}]},{name:"Choreography",superClass:["FlowElementsContainer","Collaboration"]},{name:"GlobalChoreographyTask",superClass:["Choreography"],properties:[{name:"initiatingParticipantRef",type:"Participant",isAttr:!0,isReference:!0}]},{name:"TextAnnotation",superClass:["Artifact"],properties:[{name:"text",type:"String"},{name:"textFormat",default:"text/plain",isAttr:!0,type:"String"}]},{name:"Group",superClass:["Artifact"],properties:[{name:"categoryValueRef",type:"CategoryValue",isAttr:!0,isReference:!0}]},{name:"Association",superClass:["Artifact"],properties:[{name:"associationDirection",type:"AssociationDirection",isAttr:!0},{name:"sourceRef",type:"BaseElement",isAttr:!0,isReference:!0},{name:"targetRef",type:"BaseElement",isAttr:!0,isReference:!0}]},{name:"Category",superClass:["RootElement"],properties:[{name:"categoryValue",type:"CategoryValue",isMany:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Artifact",isAbstract:!0,superClass:["BaseElement"]},{name:"CategoryValue",superClass:["BaseElement"],properties:[{name:"categorizedFlowElements",type:"FlowElement",isVirtual:!0,isMany:!0,isReference:!0},{name:"value",isAttr:!0,type:"String"}]},{name:"Activity",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"isForCompensation",default:!1,isAttr:!0,type:"Boolean"},{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0},{name:"ioSpecification",type:"InputOutputSpecification",xml:{serialize:"property"}},{name:"boundaryEventRefs",type:"BoundaryEvent",isMany:!0,isReference:!0},{name:"properties",type:"Property",isMany:!0},{name:"dataInputAssociations",type:"DataInputAssociation",isMany:!0},{name:"dataOutputAssociations",type:"DataOutputAssociation",isMany:!0},{name:"startQuantity",default:1,isAttr:!0,type:"Integer"},{name:"resources",type:"ResourceRole",isMany:!0},{name:"completionQuantity",default:1,isAttr:!0,type:"Integer"},{name:"loopCharacteristics",type:"LoopCharacteristics"}]},{name:"ServiceTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"SubProcess",superClass:["Activity","FlowElementsContainer","InteractionNode"],properties:[{name:"triggeredByEvent",default:!1,isAttr:!0,type:"Boolean"},{name:"artifacts",type:"Artifact",isMany:!0}]},{name:"LoopCharacteristics",isAbstract:!0,superClass:["BaseElement"]},{name:"MultiInstanceLoopCharacteristics",superClass:["LoopCharacteristics"],properties:[{name:"isSequential",default:!1,isAttr:!0,type:"Boolean"},{name:"behavior",type:"MultiInstanceBehavior",default:"All",isAttr:!0},{name:"loopCardinality",type:"Expression",xml:{serialize:"xsi:type"}},{name:"loopDataInputRef",type:"ItemAwareElement",isReference:!0},{name:"loopDataOutputRef",type:"ItemAwareElement",isReference:!0},{name:"inputDataItem",type:"DataInput",xml:{serialize:"property"}},{name:"outputDataItem",type:"DataOutput",xml:{serialize:"property"}},{name:"complexBehaviorDefinition",type:"ComplexBehaviorDefinition",isMany:!0},{name:"completionCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"oneBehaviorEventRef",type:"EventDefinition",isAttr:!0,isReference:!0},{name:"noneBehaviorEventRef",type:"EventDefinition",isAttr:!0,isReference:!0}]},{name:"StandardLoopCharacteristics",superClass:["LoopCharacteristics"],properties:[{name:"testBefore",default:!1,isAttr:!0,type:"Boolean"},{name:"loopCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"loopMaximum",type:"Integer",isAttr:!0}]},{name:"CallActivity",superClass:["Activity"],properties:[{name:"calledElement",type:"String",isAttr:!0}]},{name:"Task",superClass:["Activity","InteractionNode"]},{name:"SendTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"ReceiveTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"instantiate",default:!1,isAttr:!0,type:"Boolean"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"ScriptTask",superClass:["Task"],properties:[{name:"scriptFormat",isAttr:!0,type:"String"},{name:"script",type:"String"}]},{name:"BusinessRuleTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"}]},{name:"AdHocSubProcess",superClass:["SubProcess"],properties:[{name:"completionCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"ordering",type:"AdHocOrdering",isAttr:!0},{name:"cancelRemainingInstances",default:!0,isAttr:!0,type:"Boolean"}]},{name:"Transaction",superClass:["SubProcess"],properties:[{name:"protocol",isAttr:!0,type:"String"},{name:"method",isAttr:!0,type:"String"}]},{name:"GlobalScriptTask",superClass:["GlobalTask"],properties:[{name:"scriptLanguage",isAttr:!0,type:"String"},{name:"script",isAttr:!0,type:"String"}]},{name:"GlobalBusinessRuleTask",superClass:["GlobalTask"],properties:[{name:"implementation",isAttr:!0,type:"String"}]},{name:"ComplexBehaviorDefinition",superClass:["BaseElement"],properties:[{name:"condition",type:"FormalExpression"},{name:"event",type:"ImplicitThrowEvent"}]},{name:"ResourceRole",superClass:["BaseElement"],properties:[{name:"resourceRef",type:"Resource",isReference:!0},{name:"resourceParameterBindings",type:"ResourceParameterBinding",isMany:!0},{name:"resourceAssignmentExpression",type:"ResourceAssignmentExpression"},{name:"name",isAttr:!0,type:"String"}]},{name:"ResourceParameterBinding",properties:[{name:"expression",type:"Expression",xml:{serialize:"xsi:type"}},{name:"parameterRef",type:"ResourceParameter",isAttr:!0,isReference:!0}],superClass:["BaseElement"]},{name:"ResourceAssignmentExpression",properties:[{name:"expression",type:"Expression",xml:{serialize:"xsi:type"}}],superClass:["BaseElement"]},{name:"Import",properties:[{name:"importType",isAttr:!0,type:"String"},{name:"location",isAttr:!0,type:"String"},{name:"namespace",isAttr:!0,type:"String"}]},{name:"Definitions",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"targetNamespace",isAttr:!0,type:"String"},{name:"expressionLanguage",default:"http://www.w3.org/1999/XPath",isAttr:!0,type:"String"},{name:"typeLanguage",default:"http://www.w3.org/2001/XMLSchema",isAttr:!0,type:"String"},{name:"imports",type:"Import",isMany:!0},{name:"extensions",type:"Extension",isMany:!0},{name:"rootElements",type:"RootElement",isMany:!0},{name:"diagrams",isMany:!0,type:"bpmndi:BPMNDiagram"},{name:"exporter",isAttr:!0,type:"String"},{name:"relationships",type:"Relationship",isMany:!0},{name:"exporterVersion",isAttr:!0,type:"String"}]}],enumerations:[{name:"ProcessType",literalValues:[{name:"None"},{name:"Public"},{name:"Private"}]},{name:"GatewayDirection",literalValues:[{name:"Unspecified"},{name:"Converging"},{name:"Diverging"},{name:"Mixed"}]},{name:"EventBasedGatewayType",literalValues:[{name:"Parallel"},{name:"Exclusive"}]},{name:"RelationshipDirection",literalValues:[{name:"None"},{name:"Forward"},{name:"Backward"},{name:"Both"}]},{name:"ItemKind",literalValues:[{name:"Physical"},{name:"Information"}]},{name:"ChoreographyLoopType",literalValues:[{name:"None"},{name:"Standard"},{name:"MultiInstanceSequential"},{name:"MultiInstanceParallel"}]},{name:"AssociationDirection",literalValues:[{name:"None"},{name:"One"},{name:"Both"}]},{name:"MultiInstanceBehavior",literalValues:[{name:"None"},{name:"One"},{name:"All"},{name:"Complex"}]},{name:"AdHocOrdering",literalValues:[{name:"Parallel"},{name:"Sequential"}]}],prefix:"bpmn",xml:{tagAlias:"lowerCase",typePrefix:"t"}}},function(e,t){e.exports={name:"BPMNDI",uri:"http://www.omg.org/spec/BPMN/20100524/DI",types:[{name:"BPMNDiagram",properties:[{name:"plane",type:"BPMNPlane",redefines:"di:Diagram#rootElement"},{name:"labelStyle",type:"BPMNLabelStyle",isMany:!0}],superClass:["di:Diagram"]},{name:"BPMNPlane",properties:[{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"}],superClass:["di:Plane"]},{name:"BPMNShape",properties:[{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"},{name:"isHorizontal",isAttr:!0,type:"Boolean"},{name:"isExpanded",isAttr:!0,type:"Boolean"},{name:"isMarkerVisible",isAttr:!0,type:"Boolean"},{name:"label",type:"BPMNLabel"},{name:"isMessageVisible",isAttr:!0,type:"Boolean"},{name:"participantBandKind",type:"ParticipantBandKind",isAttr:!0},{name:"choreographyActivityShape",type:"BPMNShape",isAttr:!0,isReference:!0}],superClass:["di:LabeledShape"]},{name:"BPMNEdge",properties:[{name:"label",type:"BPMNLabel"},{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"},{name:"sourceElement",isAttr:!0,isReference:!0,type:"di:DiagramElement",redefines:"di:Edge#source"},{name:"targetElement",isAttr:!0,isReference:!0,type:"di:DiagramElement",redefines:"di:Edge#target"},{name:"messageVisibleKind",type:"MessageVisibleKind",isAttr:!0,default:"initiating"}],superClass:["di:LabeledEdge"]},{name:"BPMNLabel",properties:[{name:"labelStyle",type:"BPMNLabelStyle",isAttr:!0,isReference:!0,redefines:"di:DiagramElement#style"}],superClass:["di:Label"]},{name:"BPMNLabelStyle",properties:[{name:"font",type:"dc:Font"}],superClass:["di:Style"]}],enumerations:[{name:"ParticipantBandKind",literalValues:[{name:"top_initiating"},{name:"middle_initiating"},{name:"bottom_initiating"},{name:"top_non_initiating"},{name:"middle_non_initiating"},{name:"bottom_non_initiating"}]},{name:"MessageVisibleKind",literalValues:[{name:"initiating"},{name:"non_initiating"}]}],associations:[],prefix:"bpmndi"}},function(e,t){e.exports={name:"DC",uri:"http://www.omg.org/spec/DD/20100524/DC",types:[{name:"Boolean"},{name:"Integer"},{name:"Real"},{name:"String"},{name:"Font",properties:[{name:"name",type:"String",isAttr:!0},{name:"size",type:"Real",isAttr:!0},{name:"isBold",type:"Boolean",isAttr:!0},{name:"isItalic",type:"Boolean",isAttr:!0},{name:"isUnderline",type:"Boolean",isAttr:!0},{name:"isStrikeThrough",type:"Boolean",isAttr:!0}]},{name:"Point",properties:[{name:"x",type:"Real",default:"0",isAttr:!0},{name:"y",type:"Real",default:"0",isAttr:!0}]},{name:"Bounds",properties:[{name:"x",type:"Real",default:"0",isAttr:!0},{name:"y",type:"Real",default:"0",isAttr:!0},{name:"width",type:"Real",isAttr:!0},{name:"height",type:"Real",isAttr:!0}]}],prefix:"dc",associations:[]}},function(e,t){e.exports={name:"DI",uri:"http://www.omg.org/spec/DD/20100524/DI",types:[{name:"DiagramElement",isAbstract:!0,properties:[{name:"id",type:"String",isAttr:!0,isId:!0},{name:"extension",type:"Extension"},{name:"owningDiagram",type:"Diagram",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"owningElement",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"modelElement",isReadOnly:!0,isVirtual:!0,isReference:!0,type:"Element"},{name:"style",type:"Style",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"ownedElement",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isMany:!0}]},{name:"Node",isAbstract:!0,superClass:["DiagramElement"]},{name:"Edge",isAbstract:!0,superClass:["DiagramElement"],properties:[{name:"source",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"target",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"waypoint",isUnique:!1,isMany:!0,type:"dc:Point",xml:{serialize:"xsi:type"}}]},{name:"Diagram",isAbstract:!0,properties:[{name:"id",type:"String",isAttr:!0,isId:!0},{name:"rootElement",type:"DiagramElement",isReadOnly:!0,isVirtual:!0},{name:"name",isAttr:!0,type:"String"},{name:"documentation",isAttr:!0,type:"String"},{name:"resolution",isAttr:!0,type:"Real"},{name:"ownedStyle",type:"Style",isReadOnly:!0,isVirtual:!0,isMany:!0}]},{name:"Shape",isAbstract:!0,superClass:["Node"],properties:[{name:"bounds",type:"dc:Bounds"}]},{name:"Plane",isAbstract:!0,superClass:["Node"],properties:[{name:"planeElement",type:"DiagramElement",subsettedProperty:"DiagramElement-ownedElement",isMany:!0}]},{name:"LabeledEdge",isAbstract:!0,superClass:["Edge"],properties:[{name:"ownedLabel",type:"Label",isReadOnly:!0,subsettedProperty:"DiagramElement-ownedElement",isVirtual:!0,isMany:!0}]},{name:"LabeledShape",isAbstract:!0,superClass:["Shape"],properties:[{name:"ownedLabel",type:"Label",isReadOnly:!0,subsettedProperty:"DiagramElement-ownedElement",isVirtual:!0,isMany:!0}]},{name:"Label",isAbstract:!0,superClass:["Node"],properties:[{name:"bounds",type:"dc:Bounds"}]},{name:"Style",isAbstract:!0,properties:[{name:"id",type:"String",isAttr:!0,isId:!0}]},{name:"Extension",properties:[{name:"values",type:"Element",isMany:!0}]}],associations:[],prefix:"di",xml:{tagAlias:"lowerCase"}}},function(e,t,n){"use strict";var i=n(47);t.a=i.a},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=(n(0),n(2)),a=n(3),o=n(1),s=function(){function e(e,t){for(var n=0;n').appendTo(p)),h.attr({width:i,height:s});var f=h[0].getContext("2d");f.clearRect(0,0,i,s);var d=i-0,y=s-0;f.fillStyle="rgb("+l+")",f.beginPath(),f.rect(0,0,d,y),f.fill();var m=Math.round(Object(o.k)(n.size));m<10&&(m=10),f.translate(0,0),f.lineWidth=1,f.save();for(var g=.5,v=0;g<=y;)f.restore(),f.strokeStyle=v%4==0?"rgb("+u+")":"rgb("+c+")",f.beginPath(),f.moveTo(0,g),f.lineTo(d,g),g+=m,v++,f.stroke();for(g=.5,v=0;g<=d;)f.restore(),f.strokeStyle=v%4==0?"rgb("+u+")":"rgb("+c+")",f.beginPath(),f.moveTo(g,0),f.lineTo(g,y),g+=m,v++,f.stroke()}}}]),e}();t.a=c},function(e,t,n){"use strict";var i=n(49);t.a=i.a},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=n(0),a=n(2),o=n(1),s=n(3),l=function(){function e(e,t){for(var n=0;n").appendTo(n),p=Object(o.k)(c.lineStyle.lineWidth+2);p<5&&(p=5);var h=p/2;r.half=h,r.dom=u,u.css({width:p,height:p,"-webkit-border-radius":h,"-moz-border-radius":h,"-ms-border-radius":h,"-o-border-radius":h,"border-radius":h,"z-index":Object(a.a)("#"+l.id).css("z-index")})}this.interval=setInterval(function(){for(var t=0;t=n.maxT&&(n.t=0,n.dom.show());var s=n.t;if("broken"===a.linkerType)for(var l=1;l=c.t&&s=1&&n.dom.hide()}},30)}},{key:"hideDirection",value:function(){this.interval&&clearInterval(this.interval),this.$container.find(".connection-direction").remove()}}]),e}();t.a=u},function(e,t,n){"use strict";var i=n(51);t.a=i.a},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=n(0),a=n(2),o=n(3),s=n(1),l=function(){function e(e,t){for(var n=0;n0)){f=Object(a.a)("
").appendTo(h),f.css({left:Object(s.k)(l.bounds.x),top:Object(s.k)(l.bounds.y),"z-index":u.length+1}),p.indexOf(i.id)>=0||f.addClass("shape-contour-hover");for(var d=t.size-2,y={"border-color":t.color,"border-radius":t.size/2,width:d,height:d},m=c.getAnchors(),g={x:l.bounds.width/2,y:l.bounds.height/2},v=0;v").appendTo(f),w=o.a.getRotated(g,x,c.shapeStyle.angle);y.left=Object(s.k)(w.x)-t.size/2,y.top=Object(s.k)(w.y)-t.size/2,b.css(y)}}}},{key:"moveAnchors",value:function(e){for(var t=e.elements,n=(e.pos,0);n20||Math.abs(t.y-d.y)>20?(r.a.trigger("element.add",f),null==f.data.targetRef&&null!=f.data.sourceRef&&r.a.trigger("group.connection.show",f)):l.find('.shape-box[data-id="'+f.data.id+'"]').remove(),Object(a.a)(document).off("mouseup.dropConnection")})}),Object(a.a)(document).on("mouseup.connection",function(){r.a.trigger("anchor.point.remove"),t.reset(),u.off("mousedown.connection"),u.off("mousemove.connection"),Object(a.a)(document).off("mouseup.connection")})})}},{key:"showAnchorPoint",value:function(e){var t=this.config,n=this.$container,i=r.a.trigger("orders.get"),o=n.find(".bpd-designer"),s=o.find(".anchor-point");if(0===s.length){s=Object(a.a)("").appendTo(o);var l=s[0].getContext("2d");l.translate(1,1),l.lineWidth=1,l.globalAlpha=.3,l.strokeStyle=t.color,l.fillStyle=t.color,l.beginPath(),l.moveTo(0,15),l.bezierCurveTo(0,-5,30,-5,30,15),l.bezierCurveTo(30,35,0,35,0,15),l.closePath(),l.fill(),l.stroke()}s.css({left:e.x-16,top:e.y-16,"z-index":i.length}).show()}},{key:"hideAnchorPoint",value:function(){this.$container.find(".anchor-point").remove()}},{key:"createConnection",value:function(e,t){var n=r.a.trigger("element.create",{name:"",type:"SequenceFlow",prefix:"obj"}),i=n.data,a=n.plane;return i.sourceRef=e.id,a.waypoint.length>1?a.waypoint[a.waypoint.length-1]={$type:"dc:Point",x:t.x,y:t.y,angle:null}:(a.waypoint[0]={$type:"dc:Point",x:e.x,y:e.y,angle:e.angle},a.waypoint[1]={$type:"dc:Point",x:t.x,y:t.y,angle:null}),r.a.trigger("connection.render",{element:n}),n}},{key:"destroy",value:function(){this.hideAnchors()}}]),e}();t.a=u},function(e,t,n){"use strict";var i=n(53);t.a=i.a},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=n(0),a=n(2),o=n(1),s=n(3),l=function(){function e(e,t){for(var n=0;n").appendTo(l));var t=s.a.getRelativePos(e.pageX,e.pageY,l),i={"z-index":c.length,left:t.x,top:t.y};t.x>r.x&&(i.left=r.x),t.y>r.y&&(i.top=r.y),i.width=Math.abs(t.x-r.x),i.height=Math.abs(t.y-r.y),n.css(i)}),Object(a.a)(document).off("mouseup.multiselect").on("mouseup.multiselect",function(e){if(null!=n){var r={x:Object(o.i)(n.position().left),y:Object(o.i)(n.position().top),width:Object(o.i)(n.width()),height:Object(o.i)(n.height())},l=s.a.getElementIdsByRange(r);if(e.ctrlKey){var c=u.getSelectedIds();Object(o.h)(l,c)}u.unselect(),u.selectShape({ids:l}),n.remove()}t.reset(),Object(a.a)(document).off("mouseup.multiselect"),i.off("mousemove.multiselect")})}i.off("mousedown.multiselect")})}},{key:"getSelectedIds",value:function(){return this.selectIds}},{key:"getSelected",value:function(){for(var e=[],t=0;t0&&!h&&this.renderSelectBox(p),this.config.onSelected&&(1===p.length?this.config.onSelected(Object(o.j)(this.getSelected()[0])):this.config.onSelected(null)),r.a.trigger("direction.show")}}},{key:"renderSelectBox",value:function(e){var t=this.$container,n=(t.find(".bpd-layout"),t.find(".bpd-designer")),i=r.a.trigger("orders.get"),l=n.find(".shape-select");0===l.length&&(l=Object(a.a)("
").appendTo(n)),l.show(),r.a.trigger("group.hide",l);var c=0,u={};if(1===e.length){var p=r.a.trigger("element.get",e[0]);u.angle=c=p.shape.shapeStyle.angle,u.zindex=p.shape.shapeStyle.zindex,u.height=p.plane.bounds.height,u.width=p.plane.bounds.width,u.x=p.plane.bounds.x,u.y=p.plane.bounds.y,p.shape.groupName&&"CallActivity"!==p.shape.groupName&&r.a.trigger("group.show",this.getSelected())}else u=s.a.getElementsBox(e);var h=s.a.getRotatedBox(u,c);this.renderControlBound(l,u,h,c),l.css({left:Object(o.k)(h.x),top:Object(o.k)(h.y),width:Object(o.k)(h.width),height:Object(o.k)(h.height),"z-index":i.length,display:"block"})}},{key:"renderControlBound",value:function(e,t,n,i){var r=this.config,a=Object(o.k)(n.width),s=Object(o.k)(n.height),l=a+20,c=s+20,u=e.find(".shape-bound");u.attr({width:l,height:c});var p=u[0].getContext("2d");p.lineJoin="round",p.lineWidth=1,p.strokeStyle=r.color,p.globalAlpha=.5,p.save(),p.clearRect(0,0,l,c),p.translate(l/2,c/2),p.rotate(i),p.translate(-l/2,-c/2),p.translate(9.5,9.5);var h={x:Object(o.k)(Math.round(t.x-n.x)),y:Object(o.k)(Math.round(t.y-n.y)),width:Math.floor(Object(o.k)(t.width)+1),heigth:Math.floor(Object(o.k)(t.height)+1)};p.strokeRect(h.x,h.y,h.width,h.heigth),p.restore()}},{key:"moveSelect",value:function(e){var t=e.elements,n=e.pos,i=s.a.getSelectedConnectionIds();if(1!==t.length||1!==i.length)if(i.length>0){var a=r.a.trigger("shape.select.getIds");this.renderSelectBox(a)}else{var o=this.$container.find(".shape-select");o.css({left:parseFloat(o.css("left"))+n.x,top:parseFloat(o.css("top"))+n.y})}}},{key:"unselect",value:function(){var e=this.selectIds;this.selectIds=[];for(var t=0;t=0}},{key:"destroy",value:function(){var e=this.$container.find(".bpd-layout");this.$container.find(".bpd-designer").off("mousedown.select"),e.off("mousedown.multiselect")}}]),e}();t.a=u},function(e,t,n){"use strict";var i=n(55);t.a=i.a},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=n(0),a=n(2),o=n(3),s=n(1),l=function(){function e(e,t){for(var n=0;n=0?(null!=p.sourceRef&&n.indexOf(p.sourceRef)>=0&&(h.waypoint[0].x+=l.x,h.waypoint[0].y+=l.y,d=!0),null!=p.targetRef&&n.indexOf(p.targetRef)>=0&&(h.waypoint[h.waypoint.length-1].x+=l.x,h.waypoint[h.waypoint.length-1].y+=l.y,y=!0)):((null==p.sourceRef||n.indexOf(p.sourceRef)>=0)&&(h.waypoint[0].x+=l.x,h.waypoint[0].y+=l.y,d=!0),(null==p.targetRef||n.indexOf(p.targetRef)>=0)&&(h.waypoint[h.waypoint.length-1].x+=l.x,h.waypoint[h.waypoint.length-1].y+=l.y,y=!0)),d&&y){for(var m=0;m=c.x-6&&p.x<=c.x+6&&(l.x=c.x),p.y>=c.y-6&&p.y<=c.y+6&&(l.y=c.y))):(e.data.targetRef=h,c.x=p.x,c.y=p.y,c.angle=p.angle,null==h&&(p.x>=l.x-6&&p.x<=l.x+6&&(c.x=l.x),p.y>=l.y-6&&p.y<=l.y+6&&(c.y=l.y))),r.a.trigger("connection.render",{element:e,rendered:!0})}},{key:"moveDom",value:function(e,t,n){var i=e.data,r=e.plane;e.shape;r.bounds.x+=t.x,r.bounds.y+=t.y;var a=this.$container.find('.shape-box[data-id="'+i.id+'"]');a.css({left:parseFloat(a.css("left"))+n.x,top:parseFloat(a.css("top"))+n.y})}},{key:"destroy",value:function(){this.$container.find(".bpd-designer").off("mousedown.drag").off("mousedown.dragconnection")}}]),e}();t.a=c},function(e,t,n){"use strict";var i=n(57);t.a=i.a},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=n(0),a=n(2),o=(n(3),n(1)),s=function(){function e(e,t){for(var n=0;n=0;v--){var x=l[v].id,b=r.a.trigger("element.get",x),w=(b.data,b.plane),E=b.shape;if(!("SequenceFlow"===E.bpmnName||t.indexOf(x)>=0||E.parent)){var S=w.bounds;if(null==g.h){var k=S.y,C=S.y+S.height/2,A=S.y+S.height;C>=m-2&&C<=m+2?(g.h={type:"middle",y:C},e.y=C-e.height/2):k>=p-2&&k<=p+2?(g.h={type:"top",y:k},e.y=k):A>=h-2&&A<=h+2?(g.h={type:"bottom",y:A},e.y=A-e.height):A>=p-2&&A<=p+2?(g.h={type:"top",y:A},e.y=A):k>=h-2&&k<=h+2&&(g.h={type:"bottom",y:k},e.y=k-e.height)}if(null==g.v){var O=S.x,R=S.x+S.width/2,P=S.x+S.width;R>=y-2&&R<=y+2?(g.v={type:"center",x:R},e.x=R-e.width/2):O>=f-2&&O<=f+2?(g.v={type:"left",x:O},e.x=O):P>=d-2&&P<=d+2?(g.v={type:"right",x:P},e.x=P-e.width):P>=f-2&&P<=f+2?(g.v={type:"left",x:P},e.x=P):O>=d-2&&O<=d+2&&(g.v={type:"right",x:O},e.x=O-e.width)}if(null!=g.h&&null!=g.v)break}}if(this.hideSnapLine(),null!=g.attach){var T=u.find(".snapline-attach");0===T.length&&(T=Object(a.a)("
").appendTo(u));var j=g.attach,M=j.lineStyle.lineWidth;T.css({width:Object(o.k)(j.props.w+M),height:Object(o.k)(j.props.h+M),left:Object(o.k)(j.props.x-M/2)-2,top:Object(o.k)(j.props.y-M/2)-2,"z-index":Object(a.a)("#"+j.id).css("z-index")}).show()}if(null!=g.h){var N=u.find(".snapline-attach-h");0===N.length&&(N=Object(a.a)("
").appendTo(u)),N.css({width:u.width(),left:0,top:Math.round(Object(o.k)(g.h.y)),"z-index":l.length+1}).show()}if(null!=g.v){var D=u.find(".snapline-attach-v");0===D.length&&(D=Object(a.a)("
").appendTo(u)),D.css({height:u.height(),top:0,left:Math.round(Object(o.k)(g.v.x)),"z-index":l.length+1}).show()}return g}},{key:"showSnapLine",value:function(e){var t=e.size,n=e.ids,i=e.render,r=e.element;this.renderSnapLine(t,n,i,r)}},{key:"hideSnapLine",value:function(){var e=this.$container,t=e.find(".bpd-designer");t.find(".snapline-attach-h").hide(),t.find(".snapline-attach-v").hide(),t.find(".snapline-attach").hide()}}]),e}();t.a=c},function(e,t,n){"use strict";var i=n(59);t.a=i.a},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=n(0),a=n(2),o=(n(3),n(1)),s=function(){function e(e,t){for(var n=0;n").appendTo(n)),e||(e="X: "+Math.round(Object(o.i)(s.left))+"  Y: "+Math.round(Object(o.i)(s.top))),c.html(e),c.css({top:s.top+i.height()+5,left:s.left+i.width()/2-c.outerWidth()/2,"z-index":l.length}).show()}},{key:"hideTooltip",value:function(){this.$container.find(".shape-tooltip").hide()}}]),e}();t.a=c},function(e,t,n){"use strict";var i=n(61);t.a=i.a},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=n(0),a=n(2),o=function(){function e(e,t){for(var n=0;n=0&&(r.x=t.originalEvent.targetTouches[0].clientX,r.y=t.originalEvent.targetTouches[0].clientY),e.moveHand(i,r)}),Object(a.a)(document).on("touchend.hand mouseup.hand",function(){e.flag=!1})}},{key:"moveHand",value:function(e,t){var n=this,i=this.pageStyle,r=this.$container,a=r.find(".bpd-layout");this.$container.on("touchmove.hand mousemove.hand",function(r){if(n.flag){var o=r.clientX-t.x,s=r.clientY-t.y;r.type.indexOf("touch")>=0&&(o=r.originalEvent.targetTouches[0].clientX-t.x,s=r.originalEvent.targetTouches[0].clientY-t.y);var l=e.top+s;l>0?l=0:l<-i.height&&(l=-i.height+window.innerHeight);var c=e.left+o;c>0?c=0:c<-i.width&&(c=-i.width+window.innerWidth),a.css({top:l,left:c})}})}},{key:"destroyHand",value:function(){this.$container.off("mousedown.hand touchstart.hand mousemove.hand touchmove.hand"),Object(a.a)(document).off("mouseup.hand touchend.hand")}}]),e}();t.a=s},function(e,t,n){"use strict";var i=n(63);t.a=i.a},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=n(0),a=n(2),o=n(3),s=n(1),l=function(){function e(e,t){for(var n=0;n0){var h=l.find(".group-icon");h.length<=0&&(h=Object(a.a)("
").appendTo(l));for(var f=r.a.trigger("group.get",u.groupName)||[],d=[],y=0;y').appendTo(h);for(var y=r.a.trigger("group.get",e),m=0;m').appendTo(d);this.renderItem(x.children("canvas")[0],v)}}d.on("mousedown",function(e){e.stopPropagation()})}return d.css({left:t,top:n,"z-index":f.length+1}).show(),d.children(".group-item").off().on("click",function(){var e=Object(a.a)(this).attr("data-shape");i(e),d.hide(),Object(a.a)(document).off("mousedown.group-panel")}),Object(a.a)(document).on("mousedown.group-panel",function(){d.hide(),Object(a.a)(document).off("mousedown.group-panel")}),d}},{key:"hideGroup",value:function(e){(e||this.$container).find(".group-icon").hide()}},{key:"showConnectionGroup",value:function(e){var t=this.$container,n=(this.config,this.bpmns),i=this.filter,o=(e.data,e.plane),l=(e.shape,this),c=r.a.trigger("orders.get"),p=t.find(".bpd-designer");t.find(".connection-group-panel").hide();var h=t.find('.connection-group-panel[data-group="bpmn"]');if(0===h.length){h=Object(a.a)("
").appendTo(p);var f=r.a.trigger("group.get");for(var d in f){for(var y=[],m=0;m0){var g=f[d][0],v=r.a.trigger("shape.create",{type:g,element:Object(s.c)(u)});v.data.text=r.a.trigger("i18n","bpmn."+v.shape.bpmnName),this.renderConnectionItem(v,y,h)}}h.on("mousemove",function(e){e.stopPropagation()}).on("mousedown",function(e){e.stopPropagation()})}h.css({left:Object(s.k)(o.waypoint[o.waypoint.length-1].x),top:Object(s.k)(o.waypoint[o.waypoint.length-1].y),"z-index":c.length}).show(),h.find(".group-icon").off().on("mousedown",function(t){t.stopPropagation();var n=Object(a.a)(this).data("group"),i=Object(a.a)(this).parent().position(),r=h.position(),o=r.left+i.left+Object(a.a)(this).parent().outerWidth()-10,s=r.top+i.top+Object(a.a)(this).parent().outerHeight();l.groupPanel(n,o,s,function(t){l.renderShape(e,t),h.hide(),Object(a.a)(document).off("mousedown.dashboard")})}).on("click",function(e){e.stopPropagation()}),h.children(".group-item").off().on("click",function(){h.hide(),Object(a.a)(document).off("mousedown.dashboard"),l.renderShape(e,Object(a.a)(this).data("shape"))}),Object(a.a)(document).on("mousedown.dashboard",function(){h.hide(),Object(a.a)(document).off("mousedown.dashboard")})}},{key:"renderShape",value:function(e,t){var n=e.plane.waypoint,i=o.a.getEndpointAngle(e.shape,"targetRef"),a=o.a.getAngleDir(i),s=r.a.trigger("i18n","bpmn."+t),l=r.a.trigger("element.create",{name:s,type:t,prefix:"obj"}),c=l.shape.getAnchors(),u=void 0,p=null;switch(a){case 1:p=null;for(var h=0;hp)&&(p=y.x,u=y)}break;case 3:p=null;for(var m=0;mp)&&(p=g.y,u=g)}break;case 4:p=null;for(var v=0;v").appendTo(n);this.renderItem(s.children("canvas")[0],e),t.length>1&&s.append("
")}},{key:"renderItem",value:function(e,t){var n=this.config,i=(t.data,t.plane),a=t.shape,o=e.getContext("2d"),l={x:0,y:0,width:i.bounds.width,height:i.bounds.height};o.clearRect(0,0,n.width,n.height),(l.width>=n.width||l.height>=n.width)&&(i.bounds.width>=i.bounds.height?(l.width=n.width-2*a.lineStyle.lineWidth,l.height=parseInt(i.bounds.height/i.bounds.width*l.width),l.height<20&&(l.height=20)):(l.height=n.height-2*a.lineStyle.lineWidth,l.width=parseInt(i.bounds.width/i.bounds.height*l.height),l.width<20&&(l.width=20))),i.bounds=l;for(var c=Object(s.c)(a.getPath()),u={x:l.x+l.width/2,y:l.y+l.height/2},p=0;p0&&t.preventDefault()}),Object(a.a)(document).off("keydown.hotkey","input,textarea,select").on("keydown.hotkey","input,textarea,select",function(e){e.stopPropagation()})}},{key:"bindKey",value:function(e){var t=e.key,n=e.fun,i=t.split("+");if(1===i.length)if("Ctrl"===i[0]||"Alt"===i[0]||"Shift"===i[0])console.log("error: "+i[0]);else{var r=o.a[i[0]];this.funs[r]||(this.funs[r]=[]),this.funs[r].push(n)}else if(2===i.length)if("Ctrl"===i[0]||"Alt"===i[0]||"Shift"===i[0])if("Ctrl"!==i[1]&&"Alt"!==i[1]&&"Shift"!==i[1]){var a=this.funs[i[0]],s=o.a[i[1]];a[s]||(a[s]=[]),a[s].push(n)}else console.log("组合键2错误");else console.log("组合键1错误");else console.log("组合键数量错误")}},{key:"clearKey",value:function(){this.cancel(),this.funs={Ctrl:{},Alt:{},Shift:{}}}},{key:"cancel",value:function(){Object(a.a)(document).off("keydown.hotkey")}}]),e}();t.a=l},function(e,t,n){"use strict";t.a={0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,Esc:27,BackSpace:8,Tab:9,Spacebar:32,Shift:16,Enter:13,Control:17,Alt:18,Left:37,Up:38,Right:39,Down:40,Insert:45,Delete:46,End:35,Home:36,PageUp:33,PageDown:34}},function(e,t,n){"use strict";var i=n(68);t.a=i.a},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=n(0),a=n(69),o=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"zh_CN";i(this,e),this.local=t,this.init()}return o(e,[{key:"init",value:function(){r.a.on("i18n",this.t.bind(this)),r.a.on("i18n.change",this.change.bind(this))}},{key:"t",value:function(e){for(var t=e.split("."),n=a.a[this.local],i=0;i0&&void 0!==arguments[0]?arguments[0]:"zh_CN";this.local=e}}]),e}();t.a=s},function(e,t,n){"use strict";var i=n(70),r=n(71);t.a={zh_CN:i.a,zh_TW:r.a}},function(e,t,n){"use strict";t.a={bpmn:{StartEvent:"开始事件",MessageStartEvent:"消息开始事件",TimerStartEvent:"时间开始事件",SignalStartEvent:"信号开始事件",UserTask:"人工任务",ServiceTask:"系统任务",ScriptTask:"脚本任务",ManualTask:"手工任务",BusinessRuleTask:"业务规则任务",SendTask:"发送任务",ReceiveTask:"接收任务",ParallelGateway:"并行网关",InclusiveGateway:"包容网关",ExclusiveGateway:"排他网关",EventBasedGateway:"事件网关",ComplexGateway:"复杂网关",IntermediateCatchEvent:"捕获中间事件",TimerIntermediateCatchEvent:"捕获时间事件",MessageIntermediateCatchEvent:"捕获消息事件",SignalIntermediateCatchEvent:"捕获信号事件",IntermediateThrowingEvent:"抛出中间事件",MessageIntermediateThrowingEvent:"抛出消息事件",SignalIntermediateThrowingEvent:"抛出信号事件",CompensateIntermediateThrowingEvent:"抛出补偿事件",BoundaryEvent:"边界事件",CancelBoundaryEvent:"边界取消事件",CompensateBoundaryEvent:"边界补偿事件",ErrorBoundaryEvent:"边界错误事件",MessageBoundaryEvent:"边界消息事件",SignalBoundaryEvent:"边界信号事件",TimerBoundaryEvent:"边界时间事件",CallActivity:"调用子流程",SubProcess:"子流程",Transaction:"事务",TextAnnotation:"注释",HorizontalPool:"泳池",HorizontalLane:"泳道",VerticalPool:"泳池",VerticalLane:"泳道",EndEvent:"结束事件",TerminateEndEvent:"终止事件",MessageEndEvent:"消息结束事件",SignalEndEvent:"信号结束事件",ErrorEndEvent:"错误结束事件",CancelEndEvent:"结束取消事件",CompensateEndEvent:"结束补偿事件"}}},function(e,t,n){"use strict";t.a={bpmn:{StartEvent:"開始事件",MessageStartEvent:"消息開始事件",TimerStartEvent:"時間開始事件",SignalStartEvent:"信號開始事件",UserTask:"人工任務",ServiceTask:"系統任務",ScriptTask:"腳本任務",ManualTask:"手工任務",BusinessRuleTask:"業務規則任務",SendTask:"發送任務",ReceiveTask:"接收任務",ParallelGateway:"並行網關",InclusiveGateway:"包容網關",ExclusiveGateway:"排他網關",EventBasedGateway:"事件網關",ComplexGateway:"復雜網關",IntermediateCatchEvent:"捕獲中間事件",TimerIntermediateCatchEvent:"捕獲時間事件",MessageIntermediateCatchEvent:"捕獲消息事件",SignalIntermediateCatchEvent:"捕獲信號事件",IntermediateThrowingEvent:"拋出中間事件",MessageIntermediateThrowingEvent:"拋出消息事件",SignalIntermediateThrowingEvent:"拋出信號事件",CompensateIntermediateThrowingEvent:"拋出補償事件",BoundaryEvent:"邊界事件",CancelBoundaryEvent:"邊界取消事件",CompensateBoundaryEvent:"邊界補償事件",ErrorBoundaryEvent:"邊界錯誤事件",MessageBoundaryEvent:"邊界消息事件",SignalBoundaryEvent:"邊界信號事件",TimerBoundaryEvent:"邊界時間事件",CallActivity:"調用子流程",SubProcess:"子流程",Transaction:"事務",TextAnnotation:"註釋",HorizontalPool:"泳池",HorizontalLane:"泳道",VerticalPool:"泳池",VerticalLane:"泳道",EndEvent:"結束事件",TerminateEndEvent:"終止事件",MessageEndEvent:"消息結束事件",SignalEndEvent:"信號結束事件",ErrorEndEvent:"錯誤結束事件",CancelEndEvent:"結束取消事件",CompensateEndEvent:"結束補償事件"}}}])}); \ No newline at end of file diff --git a/src/draw/draw.js b/src/draw/draw.js index e45d1ce..1db73f3 100644 --- a/src/draw/draw.js +++ b/src/draw/draw.js @@ -35,11 +35,10 @@ class Draw extends Operation { this.init() } init() { - if (!this.options.readonly) { - this.$container - .off('mousemove.operate') - .on('mousemove.operate', this.move.bind(this)) - } + this.$container + .off('mousemove.operate') + .on('mousemove.operate', this.move.bind(this)) + // 创建图形 eventBus.on('shape.create', this.createShapeData.bind(this)) // 渲染图形 @@ -191,7 +190,7 @@ class Draw extends Operation { left = 0 } - $layout.offset({ top, left }) + $layout.css({ top, left }) } /** * 渲染页面 diff --git a/src/draw/operation.js b/src/draw/operation.js index cdf807b..4e86fc2 100644 --- a/src/draw/operation.js +++ b/src/draw/operation.js @@ -67,7 +67,7 @@ class Operation { $container ) - if (shapeData != null) { + if (shapeData != null && !this.options.readonly) { eventBus.trigger('hand.destroy') data.element = shapeData.element diff --git a/src/features/hand/hand.js b/src/features/hand/hand.js index e9b0385..aac9c57 100644 --- a/src/features/hand/hand.js +++ b/src/features/hand/hand.js @@ -26,7 +26,7 @@ class Hand { .off('touchstart.hand mousedown.hand') .on('touchstart.hand mousedown.hand', e => { const $layout = this.$container.find('.bpd-layout') - const layoutPos = $layout.offset() + const layoutPos = $layout.position() const mousePos = { x: 0, y: 0 @@ -75,7 +75,7 @@ class Hand { left = -pageStyle.width + window.innerWidth } - $layout.offset({ top, left }) + $layout.css({ top, left }) } }) } diff --git a/src/main.js b/src/main.js index 94a5e53..631b0a4 100644 --- a/src/main.js +++ b/src/main.js @@ -443,11 +443,13 @@ class BPDCore { * 激活选择模式 */ activateSelect() { - eventBus.trigger('hand.destroy') - eventBus.trigger('shape.multiSelect', { - state: this.draw.state - }) - this.draw.changeState('multiSelect') + if (!this.options.readonly) { + eventBus.trigger('hand.destroy') + eventBus.trigger('shape.multiSelect', { + state: this.draw.state + }) + this.draw.changeState('multiSelect') + } } /** diff --git a/static/index.html b/static/index.html index b9f4dcd..f987fcc 100644 --- a/static/index.html +++ b/static/index.html @@ -53,7 +53,7 @@ -
+