vmes-flowable
Version:
ceshibao
1 lines • 64.8 kB
JavaScript
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).BpmnModdle=t()}(this,function(){"use strict";var e=Object.prototype.toString,t=Object.prototype.hasOwnProperty;function n(t){var n=e.call(t);return"[object Function]"===n||"[object AsyncFunction]"===n||"[object GeneratorFunction]"===n||"[object AsyncGeneratorFunction]"===n||"[object Proxy]"===n}function i(t){return"[object String]"===e.call(t)}function r(e,n){return t.call(e,n)}function a(e,t){var i;return t=function(e){return n(e)?e:function(t){return t===e}}(t),o(e,function(e,n){if(t(e,n))return i=e,!1}),i}function s(e,t){var n=[];return o(e,function(e,i){t(e,i)&&n.push(e)}),n}function o(t,n){var i;if(void 0!==t){var a=function(t){return"[object Array]"===e.call(t)}(t)?m:p;for(var s in t)if(r(t,s)&&!1===n(i=t[s],a(s)))return i}}function p(e){return e}function m(e){return Number(e)}function l(e,t){return e.bind(t)}function u(){return(u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function c(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return u.apply(void 0,[e].concat(n))}function y(){}function f(e,t){this.model=e,this.properties=t}y.prototype.get=function(e){return this.$model.properties.get(this,e)},y.prototype.set=function(e,t){this.$model.properties.set(this,e,t)},f.prototype.createType=function(e){var t=this.model,n=this.properties,i=Object.create(y.prototype);o(e.properties,function(e){e.isMany||void 0===e.default||(i[e.name]=e.default)}),n.defineModel(i,t),n.defineDescriptor(i,e);var r=e.ns.name;function a(e){n.define(this,"$type",{value:r,enumerable:!0}),n.define(this,"$attrs",{value:{}}),n.define(this,"$parent",{writable:!0}),o(e,l(function(e,t){this.set(t,e)},this))}return a.prototype=i,a.hasType=i.$instanceOf=this.model.hasType,n.defineModel(a,t),n.defineDescriptor(a,e),a};var d={String:!0,Boolean:!0,Integer:!0,Real:!0,Element:!0},h={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)}};function g(e,t){var n=h[e];return n?n(t):t}function A(e){return!!d[e]}function E(e){return!!h[e]}function v(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 <prefix:localName> or <localName>, got "+e);n=r[1],i=r[0]}return{name:e=(i?i+":":"")+n,prefix:i,localName:n}}function R(e){this.ns=e,this.name=e.name,this.allTypes=[],this.allTypesByName={},this.properties=[],this.propertiesByName={}}function b(e,t){this.packageMap={},this.typeMap={},this.packages=[],this.properties=t,o(e,l(this.registerPackage,this))}function C(e,t,n){var i=t[n];if(i in e)throw new Error("package with "+n+" <"+i+"> already defined")}function x(e){this.model=e}function w(e,t,n){Object.defineProperty(e,t.name,{enumerable:!t.isReference,writable:!0,value:n,configurable:!0})}function M(e){this.properties=new x(this),this.factory=new f(this,this.properties),this.registry=new b(e,this.properties),this.typeCache={}}R.prototype.build=function(){return e=this,t=["ns","name","allTypes","allTypesByName","properties","propertiesByName","bodyProperty","idProperty"],n={},i=Object(e),o(t,function(t){t in i&&(n[t]=e[t])}),n;var e,t,n,i},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,s=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 o=r.indexOf(e);if(-1===o)throw new Error("property <"+i.name+"> not found in property list");r.splice(o,1),this.addProperty(t,n?void 0:o,s),a[i.name]=a[i.localName]=t},R.prototype.redefineProperty=function(e,t,n){var i=e.ns.prefix,r=t.split("#"),a=v(r[0],i),s=v(r[1],a.prefix).name,o=this.propertiesByName[s];if(!o)throw new Error("refined property <"+s+"> not found");this.replaceProperty(o,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.allTypesByName,i=this.allTypes,r=e.name;r in n||(o(e.properties,l(function(n){n=c({},n,{name:n.ns.localName,inherited:t}),Object.defineProperty(n,"definedBy",{value:e});var i=n.replaces,r=n.redefines;i||r?this.redefineProperty(n,i||r,i):(n.isBody&&this.setBodyProperty(n),n.isId&&this.setIdProperty(n),this.addProperty(n))},this)),i.push(e),n[r]=e)},b.prototype.getPackage=function(e){return this.packageMap[e]},b.prototype.getPackages=function(){return this.packages},b.prototype.registerPackage=function(e){e=c({},e);var t=this.packageMap;C(t,e,"prefix"),C(t,e,"uri"),o(e.types,l(function(t){this.registerType(t,e)},this)),t[e.uri]=t[e.prefix]=e,this.packages.push(e)},b.prototype.registerType=function(e,t){var n=v((e=c({},e,{superClass:(e.superClass||[]).slice(),extends:(e.extends||[]).slice(),properties:(e.properties||[]).slice(),meta:c(e.meta||{})})).name,t.prefix),i=n.name,r={};o(e.properties,l(function(e){var t=v(e.name,n.prefix),i=t.name;A(e.type)||(e.type=v(e.type,t.prefix).name),c(e,{ns:t,name:i}),r[i]=e},this)),c(e,{ns:n,name:i,propertiesByName:r}),o(e.extends,l(function(e){var t=this.typeMap[e];t.traits=t.traits||[],t.traits.push(i)},this)),this.definePackage(e,t),this.typeMap[i]=e},b.prototype.mapTypes=function(e,t,n){var i=A(e.name)?{name:e.name}:this.typeMap[e.name],r=this;function a(e){return s(e,!0)}function s(n,i){var a=v(n,A(n)?"":e.prefix);r.mapTypes(a,t,i)}if(!i)throw new Error("unknown type <"+e.name+">");o(i.superClass,n?a:s),t(i,!n),o(i.traits,a)},b.prototype.getEffectiveDescriptor=function(e){var t=v(e),n=new R(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},b.prototype.definePackage=function(e,t){this.properties.define(e,"$pkg",{value:t})},x.prototype.set=function(e,t,n){var i=this.model.getPropertyDescriptor(e,t),r=i&&i.name;void 0===n?i?delete e[r]:delete e.$attrs[t]:i?r in e?e[r]=n:w(e,i,n):e.$attrs[t]=n},x.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&&w(e,n,[]),e[i]},x.prototype.define=function(e,t,n){Object.defineProperty(e,t,n)},x.prototype.defineDescriptor=function(e,t){this.define(e,"$descriptor",{value:t})},x.prototype.defineModel=function(e,t){this.define(e,"$model",{value:t})},M.prototype.create=function(e,t){var n=this.getType(e);if(!n)throw new Error("unknown type <"+e+">");return new n(t)},M.prototype.getType=function(e){var t=this.typeCache,n=i(e)?e:e.ns.name,r=t[n];return r||(e=this.registry.getEffectiveDescriptor(n),r=t[n]=this.factory.createType(e)),r},M.prototype.createAny=function(t,n,i){var r=v(t),a={$type:t,$instanceOf:function(e){return e===this.$type}},s={name:t,isGeneric:!0,ns:{prefix:r.prefix,localName:r.localName,uri:n}};return this.properties.defineDescriptor(a,s),this.properties.defineModel(a,this),this.properties.define(a,"$parent",{enumerable:!1,writable:!0}),o(i,function(t,n){var i;i=t,"[object Object]"===e.call(i)&&void 0!==t.value?a[t.name]=t.value:a[n]=t}),a},M.prototype.getPackage=function(e){return this.registry.getPackage(e)},M.prototype.getPackages=function(){return this.registry.getPackages()},M.prototype.getElementDescriptor=function(e){return e.$descriptor},M.prototype.hasType=function(e,t){return void 0===t&&(t=e,e=this),t in e.$model.getElementDescriptor(e).allTypesByName},M.prototype.getPropertyDescriptor=function(e,t){return this.getElementDescriptor(e).propertiesByName[t]},M.prototype.getTypeDescriptor=function(e){return this.registry.typeMap[e]};var N=String.fromCharCode,S=Object.prototype.hasOwnProperty,P=/&#(\d+);|&#x([0-9a-f]+);|&(\w+);/gi,B={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'};function D(e,t,n,i){return i?S.call(B,i)?B[i]:"&"+i+";":N(t||parseInt(n,16))}function I(e){return e.length>3&&-1!==e.indexOf("&")?e.replace(P,D):e}Object.keys(B).forEach(function(e){B[e.toUpperCase()]=B[e]});var O="http://www.w3.org/2001/XMLSchema-instance",T="xsi",k="xsi:type",F="non-whitespace outside of root node";function L(e){return new Error(e)}function V(e){return"missing namespace for prefix <"+e+">"}function j(e){return{get:e,enumerable:!0}}function $(e){var t,n={};for(t in e)n[t]=e[t];return n}function z(e){return e+"$uri"}function G(){return{line:0,column:0}}function U(e){throw e}function q(e){if(!this)return new q(e);var t,n,i,r,a,s,o,p,m,l=e&&e.proxy,u=U,c=G,y=!1,f=!1,d=null,h=!1;function g(e){e instanceof Error||(e=L(e)),d=e,u(e,c)}function A(e){a&&(e instanceof Error||(e=L(e)),a(e,c))}this.on=function(e,m){if("function"!=typeof m)throw L("required args <name, cb>");switch(e){case"openTag":n=m;break;case"text":t=m;break;case"closeTag":i=m;break;case"error":u=m;break;case"warn":a=m;break;case"cdata":r=m;break;case"attention":p=m;break;case"question":o=m;break;case"comment":s=m;break;default:throw L("unsupported event: "+e)}return this},this.ns=function(e){if(void 0===e&&(e={}),"object"!=typeof e)throw L("required args <nsMap={}>");var t,n={};for(t in e)n[t]=e[t];return n[O]=T,f=!0,m=n,this},this.parse=function(e){if("string"!=typeof e)throw L("required args <xml=string>");return d=null,function(e){var a,u,d,E,v,R,b,C,x,w,M,N=f?[]:null,S=f?function(e){var t,n,i={};for(t in e)i[n=e[t]]=n,i[z(n)]=t;return i}(m):null,P=[],B=0,D=!1,O=!1,T=0,L=0,G="",U=0;function q(){if(null!==M)return M;var e,t,n,i,r,a,s,o,p,l,u,c=f&&S.xmlns,d=f&&y?[]:null,h=U,g=G,E=g.length,v={},R={};e:for(;h<E;h++)if(p=!1,!(32===(l=g.charCodeAt(h))||l<14&&l>8)){for((l<65||l>122||l>90&&l<97)&&95!==l&&58!==l&&(A("illegal first char attribute name"),p=!0),u=h+1;u<E;u++)if(!((l=g.charCodeAt(u))>96&&l<123||l>64&&l<91||l>47&&l<59||46===l||45===l||95===l)){if(32===l||l<14&&l>8){A("missing attribute value"),h=u;continue e}if(61===l)break;A("illegal attribute name char"),p=!0}if("xmlns:xmlns"===(o=g.substring(h,u))&&(A("illegal declaration of xmlns"),p=!0),34===(l=g.charCodeAt(u+1)))-1===(u=g.indexOf('"',h=u+2))&&-1!==(u=g.indexOf("'",h))&&(A("attribute value quote missmatch"),p=!0);else if(39===l)-1===(u=g.indexOf("'",h=u+2))&&-1!==(u=g.indexOf('"',h))&&(A("attribute value quote missmatch"),p=!0);else for(A("missing attribute value quotes"),p=!0,u+=1;u<E&&!(32===(l=g.charCodeAt(u+1))||l<14&&l>8);u++);for(-1===u&&(A("missing closing quotes"),u=E,p=!0),p||(a=g.substring(h,u)),h=u;u+1<E&&!(32===(l=g.charCodeAt(u+1))||l<14&&l>8);u++)h===u&&(A("illegal character after attribute end"),p=!0);if(h=u+1,!p)if(o in R)A("attribute <"+o+"> already defined");else if(R[o]=!0,f)if(y){if(null!==(r="xmlns"===o?"xmlns":120===o.charCodeAt(0)&&"xmlns:"===o.substr(0,6)?o.substr(6):null)){if(e=I(a),t=z(r),!(s=m[e])){if("xmlns"===r||t in S&&S[t]!==e)do{s="ns"+B++}while(void 0!==S[s]);else s=r;m[e]=s}S[r]!==s&&(i||(S=$(S),i=!0),S[r]=s,"xmlns"===r&&(S[z(s)]=e,c=s),S[t]=e),v[o]=a;continue}d.push(o,a)}else-1!==(l=o.indexOf(":"))?(n=S[o.substring(0,l)])?((o=c===n?o.substr(l+1):n+o.substr(l))===k&&(-1!==(l=a.indexOf(":"))?(n=a.substring(0,l),n=S[n]||n,a=n+a.substring(l)):a=c+":"+a),v[o]=a):A(V(o.substring(0,l))):v[o]=a;else v[o]=a}if(y)for(h=0,E=d.length;h<E;h++){if(o=d[h++],a=d[h],-1!==(l=o.indexOf(":"))){if(!(n=S[o.substring(0,l)])){A(V(o.substring(0,l)));continue}(o=c===n?o.substr(l+1):n+o.substr(l))===k&&(-1!==(l=a.indexOf(":"))?(n=a.substring(0,l),n=S[n]||n,a=n+a.substring(l)):a=c+":"+a)}v[o]=a}return M=v}c=function(){for(var t,n,i=/(\r\n|\r|\n)/g,r=0,a=0,s=0,o=L;T>=s&&(t=i.exec(e))&&!((o=t[0].length+t.index)>T);)r+=1,s=o;return-1==T?(a=o,n=e.substring(L)):0===L?n=e.substring(L,T):(a=T-s,n=-1==L?e.substring(T):e.substring(T,L+1)),{data:n,line:r,column:a}},l&&(w=Object.create({},{name:j(function(){return C}),originalName:j(function(){return x}),attrs:j(q),ns:j(function(){return S})}));for(;-1!==L;){if(-1===(T=60===e.charCodeAt(L)?L:e.indexOf("<",L)))return P.length?g("unexpected end of file"):0===L?g("missing start tag"):void(L<e.length&&e.substring(L).trim()&&A(F));if(L!==T)if(P.length){if(t&&(t(e.substring(L,T),I,c),h))return}else if(e.substring(L,T).trim()&&(A(F),h))return;if(33===(v=e.charCodeAt(T+1))){if(91===(E=e.charCodeAt(T+2))&&"CDATA["===e.substr(T+3,6)){if(-1===(L=e.indexOf("]]>",T)))return g("unclosed cdata");if(r&&(r(e.substring(T+9,L),c),h))return;L+=3;continue}if(45===E&&45===e.charCodeAt(T+3)){if(-1===(L=e.indexOf("--\x3e",T)))return g("unclosed comment");if(s&&(s(e.substring(T+4,L),I,c),h))return;L+=3;continue}}if(63!==v){for(u=T+1;;u++){if(R=e.charCodeAt(u),isNaN(R))return L=-1,g("unclosed tag");if(34===R)E=e.indexOf('"',u+1),u=-1!==E?E:u;else if(39===R)E=e.indexOf("'",u+1),u=-1!==E?E:u;else if(62===R){L=u;break}}if(33!==v){if(M={},47===v){if(D=!1,O=!0,!P.length)return g("missing open tag");if(u=C=P.pop(),E=T+2+u.length,e.substring(T+2,E)!==u)return g("closing tag mismatch");for(;E<L;E++)if(!(32===(v=e.charCodeAt(E))||v>8&&v<14))return g("close tag")}else{if(47===e.charCodeAt(L-1)?(u=C=e.substring(T+1,L-1),D=!0,O=!0):(u=C=e.substring(T+1,L),D=!0,O=!1),!(v>96&&v<123||v>64&&v<91||95===v||58===v))return g("illegal first char nodeName");for(E=1,d=u.length;E<d;E++)if(!((v=u.charCodeAt(E))>96&&v<123||v>64&&v<91||v>47&&v<59||45===v||95===v||46==v)){if(32===v||v<14&&v>8){C=u.substring(0,E),M=null;break}return g("invalid nodeName")}O||P.push(C)}if(f){if(a=S,D&&(O||N.push(a),null===M&&(y=-1!==u.indexOf("xmlns",E))&&(U=E,G=u,q(),y=!1)),x=C,-1!==(v=C.indexOf(":"))){if(!(b=S[C.substring(0,v)]))return g("missing namespace on <"+x+">");C=C.substr(v+1)}else b=S.xmlns;b&&(C=b+":"+C)}if(D&&(U=E,G=u,n&&(l?n(w,I,O,c):n(C,q,I,O,c),h)))return;if(O){if(i&&(i(l?w:C,I,D,c),h))return;f&&(S=D?a:N.pop())}L+=1}else{if(p&&(p(e.substring(T,L+1),I,c),h))return;L+=1}}else{if(-1===(L=e.indexOf("?>",T)))return g("unclosed question");if(o&&(o(e.substring(T,L+2),c),h))return;L+=2}}}(e),c=G,h=!1,d},this.stop=function(){h=!0}}function K(e){return e.xml&&"lowerCase"===e.xml.tagAlias}var _={xsi:"http://www.w3.org/2001/XMLSchema-instance",xml:"http://www.w3.org/XML/1998/namespace"},H="xsi:type";function X(e){return e.xml&&e.xml.serialize}function W(e){return X(e)===H}function Q(e,t){return K(t)?e.prefix+":"+((n=e.localName).charAt(0).toUpperCase()+n.slice(1)):e.name;var n}function J(e){return new Error(e)}function Y(e){return e.$descriptor}function Z(e){c(this,e),this.elementsById={},this.references=[],this.warnings=[],this.addReference=function(e){this.references.push(e)},this.addElement=function(e){if(!e)throw J("expected element");var t,n=this.elementsById,i=Y(e).idProperty;if(i&&(t=e.get(i.name))){if(!/^([a-z][\w-.]*:)?[a-z_][\w-.]*$/i.test(t))throw new Error("illegal ID <"+t+">");if(n[t])throw J("duplicate ID <"+t+">");n[t]=e}},this.addWarning=function(e){this.warnings.push(e)}}function ee(){}function te(){}function ne(){}function ie(e,t){this.property=e,this.context=t}function re(e,t){this.element=t,this.propertyDesc=e}function ae(){}function se(e,t,n){this.model=e,this.type=e.getType(t),this.context=n}function oe(e,t,n){se.call(this,e,t,n)}function pe(e,t,n){this.model=e,this.context=n}function me(e){e instanceof M&&(e={model:e}),c(this,{lax:!1},e)}ee.prototype.handleEnd=function(){},ee.prototype.handleText=function(){},ee.prototype.handleNode=function(){},te.prototype=Object.create(ee.prototype),te.prototype.handleNode=function(){return this},ne.prototype=Object.create(ee.prototype),ne.prototype.handleText=function(e){this.body=(this.body||"")+e},ie.prototype=Object.create(ne.prototype),ie.prototype.handleNode=function(e){if(this.element)throw J("expected no sub nodes");return this.element=this.createReference(e),this},ie.prototype.handleEnd=function(){this.element.id=this.body},ie.prototype.createReference=function(e){return{property:this.property.ns.name,id:""}},re.prototype=Object.create(ne.prototype),re.prototype.handleEnd=function(){var e=this.body||"",t=this.element,n=this.propertyDesc;e=g(n.type,e),n.isMany?t.get(n.name).push(e):t.set(n.name,e)},ae.prototype=Object.create(ne.prototype),ae.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},se.prototype=Object.create(ae.prototype),se.prototype.addReference=function(e){this.context.addReference(e)},se.prototype.handleText=function(e){if(!Y(this.element).bodyProperty)throw J("unexpected body text <"+e+">");ne.prototype.handleText.call(this,e)},se.prototype.handleEnd=function(){var e=this.body,t=this.element,n=Y(t).bodyProperty;n&&void 0!==e&&(e=g(n.type,e),t.set(n.name,e))},se.prototype.createElement=function(e){var t,n=e.attributes,i=this.type,r=Y(i),a=this.context,s=new i({}),p=this.model;return o(n,function(e,n){var i=r.propertiesByName[n];i&&i.isReference?i.isMany?o(e.split(" "),function(e){a.addReference({element:s,property:i.ns.name,id:e})}):a.addReference({element:s,property:i.ns.name,id:e}):(i?e=g(i.type,e):"xmlns"!==n&&(t=v(n,r.ns.prefix),p.getPackage(t.prefix)&&a.addWarning({message:"unknown attribute <"+n+">",element:s,property:n,value:e})),s.set(n,e))}),s},se.prototype.getPropertyForNode=function(e){var t,n,i=v(e.name),r=this.type,s=this.model,o=Y(r),p=i.name,m=o.propertiesByName[p];if(m&&!m.isAttr)return W(m)&&(t=e.attributes[H])?(t=function(e,t){var n=v(e);return function(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}(n,t.getPackage(n.prefix))}(t,s),c({},m,{effectiveType:Y(n=s.getType(t)).name})):m;var l=s.getPackage(i.prefix);if(l){if(t=Q(i,l),n=s.getType(t),m=a(o.properties,function(e){return!e.isVirtual&&!e.isReference&&!e.isAttribute&&n.hasType(e.type)}))return c({},m,{effectiveType:Y(n).name})}else if(m=a(o.properties,function(e){return!e.isReference&&!e.isAttribute&&"Element"===e.type}))return m;throw J("unrecognized element <"+i.name+">")},se.prototype.toString=function(){return"ElementDescriptor["+Y(this.type).name+"]"},se.prototype.valueHandler=function(e,t){return new re(e,t)},se.prototype.referenceHandler=function(e){return new ie(e,this.context)},se.prototype.handler=function(e){return"Element"===e?new pe(this.model,e,this.context):new se(this.model,e,this.context)},se.prototype.handleChild=function(e){var t,n,i,r;if(t=this.getPropertyForNode(e),i=this.element,E(n=t.effectiveType||t.type))return this.valueHandler(t,i);var a=(r=t.isReference?this.referenceHandler(t).handleNode(e):this.handler(n).handleNode(e)).element;return void 0!==a&&(t.isMany?i.get(t.name).push(a):i.set(t.name,a),t.isReference?(c(a,{element:i}),this.context.addReference(a)):a.$parent=i),r},oe.prototype=Object.create(se.prototype),oe.prototype.createElement=function(e){var t=e.name,n=v(t),i=this.model,r=this.type,a=i.getPackage(n.prefix),s=a&&Q(n,a)||t;if(!r.hasType(s))throw J("unexpected element <"+e.originalName+">");return se.prototype.createElement.call(this,e)},pe.prototype=Object.create(ae.prototype),pe.prototype.createElement=function(e){var t=e.name,n=v(t).prefix,i=e.ns[n+"$uri"],r=e.attributes;return this.model.createAny(t,i,r)},pe.prototype.handleChild=function(e){var t=new pe(this.model,"Element",this.context).handleNode(e),n=this.element,i=t.element;return void 0!==i&&((n.$children=n.$children||[]).push(i),i.$parent=n),t},pe.prototype.handleEnd=function(){this.body&&(this.element.$body=this.body)},me.prototype.fromXML=function(e,t,n){var i=t.rootHandler;t instanceof se?(i=t,t={}):"string"==typeof t?(i=this.handler(t),t={}):"string"==typeof i&&(i=this.handler(i));var r=this.model,a=this.lax,s=new Z(c({},t,{rootHandler:i})),o=new q({proxy:!0}),p=function(){var e=[];return Object.defineProperty(e,"peek",{value:function(){return this[this.length-1]}}),e}();function m(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 p="unparsable content "+(o?o+" ":"")+"detected\n\tline: "+r+"\n\tcolumn: "+a+"\n\tnested error: "+e.message;if(n)return s.addWarning({message:p,error:e}),!0;throw J(p)}function l(e,t){return m(e,t,!0)}i.context=s,p.push(i);var u=/^<\?xml /i,y=/ encoding="([^"]+)"/i,f=/^utf-8$/i;function d(e,t){try{p.peek().handleText(e)}catch(e){l(e,t)}}var h=r.getPackages().reduce(function(e,t){return e[t.uri]=t.prefix,e},{"http://www.w3.org/XML/1998/namespace":"xml"});o.ns(h).on("openTag",function(e,t,n,i){var r=e.attrs||{},s=Object.keys(r).reduce(function(e,n){var i=t(r[n]);return e[n]=i,e},{});!function(e,t){var n=p.peek();try{p.push(n.handleNode(e))}catch(e){m(e,t,a)&&p.push(new te)}}({name:e.name,originalName:e.originalName,attributes:s,ns:e.ns},i)}).on("question",function(e){if(u.test(e)){var t=y.exec(e),n=t&&t[1];n&&!f.test(n)&&s.addWarning({message:"unsupported document encoding <"+n+">, falling back to UTF-8"})}}).on("closeTag",function(){p.pop().handleEnd()}).on("cdata",d).on("text",function(e,t,n){!function(e,t){(e=e.trim())&&d(e,t)}(t(e),n)}).on("error",m).on("warn",l),setTimeout(function(){var t;try{o.parse(e),function(){var e,t,n=s.elementsById,i=s.references;for(e=0;t=i[e];e++){var r=t.element,a=n[t.id],o=Y(r).propertiesByName[t.property];if(a||s.addWarning({message:"unresolved reference <"+t.id+">",element:t.element,property:t.property,value:t.id}),o.isMany){var p=r.get(o.name),m=p.indexOf(t);-1===m&&(m=p.length),a?p[m]=a:p.splice(m,1)}else r.set(o.name,a)}}()}catch(e){t=e}var r=i.element;t||r||(t=J("failed to parse document as <"+i.type.$descriptor.name+">")),n(t,t?void 0:r,s)},0)},me.prototype.handler=function(e){return new oe(this.model,e)};var le='<?xml version="1.0" encoding="UTF-8"?>\n',ue=/<|>|'|"|&|\n\r|\n/g,ce=/<|>|&/g;function ye(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.getNSKey=function(e){return void 0!==e.prefix?e.uri+"|"+e.prefix:e.uri},this.logUsed=function(t){var n=t.uri,r=this.getNSKey(t);i[r]=this.byUri(n),e&&e.logUsed(t)},this.getUsed=function(e){var t=this;return[].concat(r,a).filter(function(e){var n=t.getNSKey(e);return i[n]})}}function fe(e,t){return K(t)?(n=e).charAt(0).toLowerCase()+n.slice(1):e;var n}function de(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function he(e){return i(e)?e:(e.prefix?e.prefix+":":"")+e.localName}function ge(e){return t=e.getUsed(),n=function(e){return{name:"xmlns"+(e.prefix?":"+e.prefix:""),value:e.uri}},i=[],o(t,function(e,t){i.push(n(e,t))}),i;var t,n,i}var Ae={"\n":"#10","\n\r":"#10",'"':"#34","'":"#39","<":"#60",">":"#62","&":"#38"},Ee={"<":"lt",">":"gt","&":"amp"};function ve(e,t,n){return(e=i(e)?e:""+e).replace(t,function(e){return"&"+n[e]+";"})}function Re(e){this.tagName=e}function be(){}function Ce(e){this.tagName=e}function xe(e,t){this.body=[],this.attrs=[],this.parent=e,this.propertyDescriptor=t}function we(e,t){xe.call(this,e,t)}function Me(){this.value="",this.write=function(e){this.value+=e}}function Ne(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 Se(e){return e=c({format:!1,preamble:!0},e||{}),{toXML:function(t,n){var i=n||new Me,r=new Ne(i,e.format);if(e.preamble&&r.append(le),(new xe).build(t).serializeTo(r),!n)return i.value}}}function Pe(e,t){M.call(this,e,t)}Re.prototype.build=function(e){return this.element=e,this},Re.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"+this.element.id+"</"+this.tagName+">").appendNewLine()},be.prototype.serializeValue=be.prototype.serializeTo=function(e){e.append(this.escape?ve(this.value,ce,Ee):this.value)},be.prototype.build=function(e,t){return this.value=t,"String"===e.type&&-1!==t.search(ce)&&(this.escape=!0),this},de(Ce,be),Ce.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"),this.serializeValue(e),e.append("</"+this.tagName+">").appendNewLine()},xe.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=function(e){return s(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)})}(e),this.parseAttributes(s(n,function(e){return e.isAttr})),this.parseContainments(function(e){return s(e,function(e){return!e.isAttr})}(n))),this.parseGenericAttributes(e,t),this},xe.prototype.nsTagName=function(e){return function(e,t){return t.isGeneric?c({localName:t.ns.localName},e):c({localName:fe(t.ns.localName,t.$pkg)},e)}(this.logNamespaceUsed(e.ns),e)},xe.prototype.nsPropertyTagName=function(e){return function(e,t){return c({localName:t.ns.localName},e)}(this.logNamespaceUsed(e.ns),e)},xe.prototype.isLocalNs=function(e){return e.uri===this.ns.uri},xe.prototype.nsAttributeName=function(e){var t;if(t=i(e)?v(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}:c({localName:t.localName},n)},xe.prototype.parseGeneric=function(e){var t=this,n=this.body,i=[];return o(e,function(r,a){"$body"===a?n.push((new be).build({type:"String"},r)):"$children"===a?o(r,function(e){n.push(new xe(t).build(e))}):0!==a.indexOf("$")&&t.parseNsAttribute(e,a,r)&&i.push({name:a,value:r})}),i},xe.prototype.parseNsAttribute=function(e,t,n){var i,r=e.$model,a=v(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 s=this.logNamespaceUsed(i,!0);this.getNamespaces().logUsed(s)}},xe.prototype.parseNsAttributes=function(e,t){var n=this,i=e.$attrs,r=[];return o(i,function(t,i){var a=n.parseNsAttribute(e,i,t);a&&r.push(a)}),r},xe.prototype.parseGenericAttributes=function(e,t){var n=this;o(t,function(t){if(t.name!==H)try{n.addAttribute(n.nsAttributeName(t.name),t.value)}catch(n){console.warn("missing namespace information for ",t.name,"=",t.value,"on",e,n)}})},xe.prototype.parseContainments=function(e){var t=this,n=this.body,i=this.element;o(e,function(e){var r=i.get(e.name),a=e.isReference;if(e.isMany||(r=[r]),e.isBody)n.push((new be).build(e,r[0]));else if(E(e.type))o(r,function(i){n.push(new Ce(t.addTagName(t.nsPropertyTagName(e))).build(e,i))});else if(a)o(r,function(i){n.push(new Re(t.addTagName(t.nsPropertyTagName(e))).build(i))});else{var s=W(e),p=function(e){return"property"===X(e)}(e);o(r,function(i){var r;r=s?new we(t,e):p?new xe(t,e):new xe(t),n.push(r.build(i))})}})},xe.prototype.getNamespaces=function(e){var t,n=this.namespaces,i=this.parent;return n||(t=i&&i.getNamespaces(),e||!t?this.namespaces=n=new ye(t):n=t),n},xe.prototype.logNamespace=function(e,t,n){var i=this.getNamespaces(n),r=e.uri,a=e.prefix,s=i.byUri(r);return"xml"===a||s&&!n||i.add(e,t),i.mapPrefix(a,r),e},xe.prototype.logNamespaceUsed=function(e,t){var n,i,r,a=this.element.$model,s=this.getNamespaces(t),o=e.prefix,p=e.uri;if(!o&&!p)return{localName:e.localName};if(r=_[o]||a&&(a.getPackage(o)||{}).uri,!(p=p||r||s.uriByPrefix(o)))throw new Error("no namespace uri given for prefix <"+o+">");if(!(e=s.byUri(p))){for(n=o,i=1;s.uriByPrefix(n);)n=o+"_"+i++;e=this.logNamespace({prefix:n,uri:p},r===p)}return o&&s.mapPrefix(o,p),e},xe.prototype.parseAttributes=function(e){var t=this,n=this.element;o(e,function(e){var i=n.get(e.name);if(e.isReference)if(e.isMany){var r=[];o(i,function(e){r.push(e.id)}),i=r.join(" ")}else i=i.id;t.addAttribute(t.nsAttributeName(e),i)})},xe.prototype.addTagName=function(e){var t=this.logNamespaceUsed(e);return this.getNamespaces().logUsed(t),he(e)},xe.prototype.addAttribute=function(e,t){var n=this.attrs;i(t)&&(t=ve(t,ue,Ae)),n.push({name:e,value:t})},xe.prototype.serializeAttributes=function(e){var t=this.attrs,n=this.namespaces;n&&(t=ge(n).concat(t)),o(t,function(t){e.append(" ").append(he(t.name)).append('="').append(t.value).append('"')})},xe.prototype.serializeTo=function(e){var t=this.body[0],n=t&&t.constructor!==be;e.appendIndent().append("<"+this.tagName),this.serializeAttributes(e),e.append(t?">":" />"),t&&(n&&e.appendNewLine().indent(),o(this.body,function(t){t.serializeTo(e)}),n&&e.unindent().appendIndent(),e.append("</"+this.tagName+">")),e.appendNewLine()},de(we,xe),we.prototype.parseNsAttributes=function(e){var t=xe.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(H),(i.prefix?i.prefix+":":"")+a+n.ns.localName),t},we.prototype.isLocalNs=function(e){return e.uri===(this.typeNs||this.ns).uri},Pe.prototype=Object.create(M.prototype),Pe.prototype.fromXML=function(e,t,r,a){i(t)||(a=r,r=t,t="bpmn:Definitions"),n(r)&&(a=r,r={});var s=new me(c({model:this,lax:!0},r)),o=s.handler(t);s.fromXML(e,o,a)},Pe.prototype.toXML=function(e,t,i){n(t)&&(i=t,t={});var r,a,s=new Se(t);try{r=s.toXML(e)}catch(e){a=e}return i(a,r)};var Be={bpmn:{name:"BPMN20",uri:"http://www.omg.org/spec/BPMN/20100524/MODEL",prefix:"bpmn",associations:[],types:[{name:"Interface",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"operations",type:"Operation",isMany:!0},{name:"implementationRef",isAttr:!0,type:"String"}]},{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",isAttr:!0,type:"String"}]},{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",isMany:!0,replaces:"FlowElementsContainer#laneSets",type:"LaneSet"},{name:"flowElements",isMany:!0,replaces:"FlowElementsContainer#flowElements",type:"FlowElement"},{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:"TerminateEventDefinition",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:"sourceRef",type:"ItemAwareElement",isMany:!0,isReference:!0},{name:"targetRef",type:"ItemAwareElement",isReference:!0},{name:"transformation",type:"FormalExpression",xml:{serialize:"property"}},{name:"assignment",type:"Assignment",isMany:!0}]},{name:"DataInput",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"inputSetRef",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"inputSetWithOptional",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"inputSetWithWhileExecuting",type:"InputSet",isMany:!0,isVirtual:!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",isMany:!0,isVirtual:!0,isReference:!0},{name:"outputSetWithOptional",type:"OutputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"outputSetWithWhileExecuting",type:"OutputSet",isMany:!0,isVirtual:!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:"participantRef",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",isBody:!0,type:"String"}]},{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",isAttr:!0,type:"String"},{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",isMany:!0,isVirtual:!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",isMany:!0,isVirtual:!0,isReference:!0},{name:"outgoingConversationLinks",type:"ConversationLink",isMany:!0,isVirtual:!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:"I