diff --git a/demo/0.7.0/bpmn-visualization.js b/demo/0.7.0/bpmn-visualization.js new file mode 100644 index 00000000..67690060 --- /dev/null +++ b/demo/0.7.0/bpmn-visualization.js @@ -0,0 +1 @@ +const options={mxLoadResources:!1,mxLoadStylesheets:!1},optionKeys=["mxBasePath","mxDefaultLanguage","mxForceIncludes","mxImageBasePath","mxLanguage","mxLanguages","mxLoadResources","mxLoadStylesheets","mxResourceExtension"];optionKeys.forEach(t=>{window[t]=options[t]});var mxClient={VERSION:"4.1.0",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),IS_OP:0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/"),IS_OT:0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:0<=navigator.userAgent.indexOf("AppleWebKit/")&&0>navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_ANDROID:0<=navigator.userAgent.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform),IOS_VERSION:function(){if(/iP(hone|od|ad)/.test(navigator.platform)){var t=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);if(null!=t&&0navigator.userAgent.indexOf("Edge/"),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:0<=navigator.userAgent.indexOf("Firefox/"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_VML:"MICROSOFT INTERNET EXPLORER"==navigator.appName.toUpperCase(),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!=document.createElementNS("http://www.w3.org/2000/svg","foreignObject")||0<=navigator.userAgent.indexOf("Opera/"),IS_WIN:0document.location.href.indexOf("http://")&&0>document.location.href.indexOf("https://"),defaultBundles:[],isBrowserSupported:function(){return mxClient.IS_VML||mxClient.IS_SVG},link:function(t,e,n,i){if(n=n||document,mxClient.IS_IE6)n.write('');else{var s=n.createElement("link");s.setAttribute("rel",t),s.setAttribute("href",e),s.setAttribute("charset","UTF-8"),s.setAttribute("type","text/css"),i&&s.setAttribute("id",i),n.getElementsByTagName("head")[0].appendChild(s)}},loadResources:function(t,e){function n(){0==--i&&t()}for(var i=mxClient.defaultBundles.length,s=0;s<\/script>')}};mxClient.IS_SF&&mxClient.IS_TOUCH&&!mxClient.IS_IOS&&(mxClient.IOS_VERSION=13,mxClient.IOS=!0),"undefined"==typeof mxLoadResources&&(mxLoadResources=!0),"undefined"==typeof mxForceIncludes&&(mxForceIncludes=!1),"undefined"==typeof mxResourceExtension&&(mxResourceExtension=".txt"),"undefined"==typeof mxLoadStylesheets&&(mxLoadStylesheets=!0),"undefined"!=typeof mxBasePath&&0i&&o?(i++,window.setTimeout(s,r)):null!=n&&n()},r=30;s()},cascadeOpacity:function(t,e,n){for(var i=t.model.getChildCount(e),s=0;sdocument.documentMode)?function(t){return null!=t?t.currentStyle:null}:function(t){return null!=t?window.getComputedStyle(t,""):null},parseCssNumber:function(t){return"thin"==t?t="2":"medium"==t?t="4":"thick"==t&&(t="6"),t=parseFloat(t),isNaN(t)&&(t=0),t},setPrefixedStyle:function(){var t=null;return mxClient.IS_OT?t="O":mxClient.IS_SF||mxClient.IS_GC?t="Webkit":mxClient.IS_MT?t="Moz":mxClient.IS_IE&&9<=document.documentMode&&10>document.documentMode&&(t="ms"),function(e,n,i){e[n]=i,null!=t&&0document.documentMode)?mxUtils.importNodeImplementation(t,e,n):t.importNode(e,n)},importNodeImplementation:function(t,e,n){switch(e.nodeType){case 1:var i=t.createElement(e.nodeName);if(e.attributes&&0/g,">"),(null==e||e)&&(t=t.replace(/\n/g," ")),t},isVml:function(t){return null!=t&&"urn:schemas-microsoft-com:vml"==t.tagUrn},getXml:function(t,e){var n="";return mxClient.IS_IE||mxClient.IS_IE11?n=mxUtils.getPrettyXml(t,"","",""):null!=window.XMLSerializer?n=(new XMLSerializer).serializeToString(t):null!=t.xml&&(n=t.xml.replace(/\r\n\t[\t]*/g,"").replace(/>\r\n/g,">").replace(/\r\n/g,"\n")),n.replace(/\n/g,e||" ")},getPrettyXml:function(t,e,n,i,s){var r=[];if(null!=t)if(e=null!=e?e:" ",n=null!=n?n:"",i=null!=i?i:"\n",null!=t.namespaceURI&&t.namespaceURI!=s&&(s=t.namespaceURI,null==t.getAttribute("xmlns")&&t.setAttribute("xmlns",t.namespaceURI)),t.nodeType==mxConstants.NODETYPE_TEXT)0<(t=mxUtils.getTextContent(t)).length&&r.push(n+mxUtils.htmlEntities(mxUtils.trim(t),!1));else{r.push(n+"<"+t.nodeName);var o=t.attributes;if(null!=o)for(var l=0;l"+i);null!=o;)r.push(mxUtils.getPrettyXml(o,e,n+e,i,s)),o=o.nextSibling;r.push(n+""+i)}else r.push("/>"+i)}return r.join("")},extractTextWithWhitespace:function(t){var e="BLOCKQUOTE DIV H1 H2 H3 H4 H5 H6 OL P PRE TABLE UL".split(" "),n=[];return function t(i){if(1!=i.length||"BR"!=i[0].nodeName&&"\n"!=i[0].innerHTML)for(var s=0;s"==r.innerHTML.toLowerCase()?n.push("\n"):(3===r.nodeType||4===r.nodeType?0"):(e.push(">"),e.push(t.innerHTML),e.push("")),e.join("")}return""}:function(t){return null!=t?(new XMLSerializer).serializeToString(t):""},write:function(t,e){var n=t.ownerDocument.createTextNode(e);return null!=t&&t.appendChild(n),n},writeln:function(t,e){var n=t.ownerDocument.createTextNode(e);return null!=t&&(t.appendChild(n),t.appendChild(document.createElement("br"))),n},br:function(t,e){e=e||1;for(var n=null,i=0;io&&(t.style.left=Math.max(s,o-i)+"px"),(n=parseInt(t.offsetTop))+(i=parseInt(t.offsetHeight))>(e=r+e.height)&&(t.style.top=Math.max(r,e-i)+"px")},load:function(t){return(t=new mxXmlRequest(t,null,"GET",!1)).send(),t},get:function(t,e,n,i,s,r){return t=new mxXmlRequest(t,null,"GET"),null!=i&&t.setBinary(i),t.send(e,n,s,r),t},getAll:function(t,e,n){for(var i=t.length,s=[],r=0,o=function(){0==r&&null!=n&&n(),r++},l=0;lr||299mxUtils.indexOf(e,s))&&(i[s]=n||"object"!=typeof t[s]?t[s]:mxUtils.clone(t[s]))}return i},equalPoints:function(t,e){if(null==t&&null!=e||null!=t&&null==e||null!=t&&null!=e&&t.length!=e.length)return!1;if(null!=t&&null!=e)for(var n=0;n [Function]\n";else if("object"==typeof t[e])n=n+(e+" => [")+mxUtils.getFunctionName(t[e].constructor)+"]\n";else n+=e+" = "+t[e]+"\n"}catch(t){n+=e+"="+t.message}return n},toRadians:function(t){return Math.PI*t/180},toDegree:function(t){return 180*t/Math.PI},arcToCurves:function(t,e,n,i,s,r,o,l,a){if(l-=t,a-=e,0===n||0===i)return g;n=Math.abs(n),i=Math.abs(i);var h=-l/2,u=-a/2,p=Math.cos(s*Math.PI/180);s=p*h+(g=Math.sin(s*Math.PI/180))*u;h=-1*g*h+p*u;1<(v=(u=s*s)/(m=n*n)+(c=h*h)/(f=i*i))?(n*=Math.sqrt(v),i*=Math.sqrt(v),r=0):(v=1,r===o&&(v=-1),r=v*Math.sqrt((m*f-m*c-f*u)/(m*c+f*u))),l=p*(u=r*n*h/i)-g*(c=-1*r*i*s/n)+l/2,a=g*u+p*c+a/2,r=0<=(m=Math.atan2((h-c)/i,(s-u)/n)-Math.atan2(0,1))?m:2*Math.PI+m,s=0<=(m=Math.atan2((-h-c)/i,(-s-u)/n)-Math.atan2((h-c)/i,(s-u)/n))?m:2*Math.PI+m,0==o&&0s&&(s+=2*Math.PI),o=2*s/Math.PI,s/=o=Math.ceil(0>o?-1*o:o),h=8/3*Math.sin(s/4)*Math.sin(s/4)/Math.sin(s/2),u=p*n,p*=i,n*=g,i*=g;for(var d=Math.cos(r),c=-h*(u*(y=Math.sin(r))+i*d),m=-h*(n*y-p*d),g=[],x=0;xn&&(t=3,-135>=n&&(t=2)),0<=i.indexOf(mxConstants.DIRECTION_NORTH))switch(t){case 0:e|=mxConstants.DIRECTION_MASK_NORTH;break;case 1:e|=mxConstants.DIRECTION_MASK_EAST;break;case 2:e|=mxConstants.DIRECTION_MASK_SOUTH;break;case 3:e|=mxConstants.DIRECTION_MASK_WEST}if(0<=i.indexOf(mxConstants.DIRECTION_WEST))switch(t){case 0:e|=mxConstants.DIRECTION_MASK_WEST;break;case 1:e|=mxConstants.DIRECTION_MASK_NORTH;break;case 2:e|=mxConstants.DIRECTION_MASK_EAST;break;case 3:e|=mxConstants.DIRECTION_MASK_SOUTH}if(0<=i.indexOf(mxConstants.DIRECTION_SOUTH))switch(t){case 0:e|=mxConstants.DIRECTION_MASK_SOUTH;break;case 1:e|=mxConstants.DIRECTION_MASK_WEST;break;case 2:e|=mxConstants.DIRECTION_MASK_NORTH;break;case 3:e|=mxConstants.DIRECTION_MASK_EAST}if(0<=i.indexOf(mxConstants.DIRECTION_EAST))switch(t){case 0:e|=mxConstants.DIRECTION_MASK_EAST;break;case 1:e|=mxConstants.DIRECTION_MASK_SOUTH;break;case 2:e|=mxConstants.DIRECTION_MASK_WEST;break;case 3:e|=mxConstants.DIRECTION_MASK_NORTH}return e},reversePortConstraints:function(t){var e;return e=(t&mxConstants.DIRECTION_MASK_WEST)<<3,e|=(t&mxConstants.DIRECTION_MASK_NORTH)<<1,(e|=(t&mxConstants.DIRECTION_MASK_SOUTH)>>1)|(t&mxConstants.DIRECTION_MASK_EAST)>>3},findNearestSegment:function(t,e,n){var i=-1;if(0r.distSq)&&(i=r)}}return null!=i?i.p:null},rectangleIntersectsSegment:function(t,e,n){var i=t.y,s=t.x,r=i+t.height,o=s+t.width;t=e.x;var l=n.x;if(e.x>n.x&&(t=n.x,l=e.x),l>o&&(l=o),tl)return!1;s=e.y,o=n.y;var a=n.x-e.x;return 1e-7o&&(e=o,o=s,s=e),o>r&&(o=r),so)},contains:function(t,e,n){return t.x<=e&&t.x+t.width>=e&&t.y<=n&&t.y+t.height>=n},intersects:function(t,e){var n=t.width,i=t.height,s=e.width,r=e.height;if(0>=s||0>=r||0>=n||0>=i)return!1;var o=t.x,l=t.y,a=e.x,h=e.y;r+=h,n+=o,i+=l;return((s=s+a)o)&&(rl)&&(na)&&(ih)},intersectsHotspot:function(t,e,n,i,s,r){if(s=null!=s?s:0,r=null!=r?r:0,0<(i=null!=i?i:1)){var o=t.getCenterX(),l=t.getCenterY(),a=t.width,h=t.height,u=mxUtils.getValue(t.style,mxConstants.STYLE_STARTSIZE)*t.view.scale;return 0t.toLowerCase().indexOf("0x"))},isInteger:function(t){return String(parseInt(t))===String(t)},mod:function(t,e){return(t%e+e)%e},intersection:function(t,e,n,i,s,r,o,l){var a=(l-r)*(n-t)-(o-s)*(i-e);return o=((o-s)*(e-r)-(l-r)*(t-s))/a,s=((n-t)*(e-r)-(i-e)*(t-s))/a,0<=o&&1>=o&&0<=s&&1>=s?new mxPoint(t+o*(n-t),e+o*(i-e)):null},ptSegDistSq:function(t,e,n,i,s,r){return 0>=(s-=t)*(n-=t)+(r-=e)*(i-=e)?n=0:n=0>=(t=(s=n-s)*n+(r=i-r)*i)?0:t*t/(n*n+i*i),0>(s=s*s+r*r-n)&&(s=0),s},ptLineDist:function(t,e,n,i,s,r){return Math.abs((i-e)*s-(n-t)*r+n*e-i*t)/Math.sqrt((i-e)*(i-e)+(n-t)*(n-t))},relativeCcw:function(t,e,n,i,s,r){return 0==(t=(s-=t)*(i-=e)-(r-=e)*(n-=t))&&(0<(t=s*n+r*i)&&(0>(t=(s-n)*n+(r-i)*i)&&(t=0))),0>t?-1:0document.documentMode)?t.style.filter=100<=e?"":"alpha(opacity="+e+")":t.style.opacity=e/100},createImage:function(t){var e;return mxClient.IS_IE6&&"CSS1Compat"!=document.compatMode?((e=document.createElement(mxClient.VML_PREFIX+":image")).setAttribute("src",t),e.style.borderStyle="none"):((e=document.createElement("img")).setAttribute("src",t),e.setAttribute("border","0")),e},sortCells:function(t,e){e=null==e||e;var n=new mxDictionary;return t.sort((function(t,i){var s=n.get(t);null==s&&(s=mxCellPath.create(t).split(mxCellPath.PATH_SEPARATOR),n.put(t,s));var r=n.get(i);return null==r&&(r=mxCellPath.create(i).split(mxCellPath.PATH_SEPARATOR),n.put(i,r)),0==(s=mxCellPath.compare(s,r))?0:0(t=t.split(";")[0]).indexOf("=")?t:""},getStylenames:function(t){var e=[];if(null!=t){t=t.split(";");for(var n=0;nt[n].indexOf("=")&&e.push(t[n])}return e},indexOfStylename:function(t,e){if(null!=t&&null!=e)for(var n=t.split(";"),i=0,s=0;smxUtils.indexOfStylename(t,e)&&(null==t?t="":0s?";":t.substring(s)):0>s||s==t.length-1?"":t.substring(s+1)}else{var r=t.indexOf(";"+e+"=");0>r?i&&(i=";"==t.charAt(t.length-1)?"":";",t=t+i+e+"="+n+";"):(s=t.indexOf(";",r+1),t=i?t.substring(0,r+1)+e+"="+n+(0>s?";":t.substring(s)):t.substring(0,r)+(0>s?";":t.substring(s)))}return t},setCellStyleFlags:function(t,e,n,i,s){if(null!=e&&0s)s=";"==t.charAt(t.length-1)?"":";",t=i||null==i?t+s+e+"="+n:t+s+e+"=0";else{var r,o=t.indexOf(";",s);r=0>o?t.substring(s+e.length+1):t.substring(s+e.length+1,o),r=null==i?parseInt(r)^n:i?parseInt(r)|n:parseInt(r)&~n,t=t.substring(0,s)+e+"="+r+(0<=o?t.substring(o):"")}}return t},getAlignmentAsPoint:function(t,e){var n=-.5,i=-.5;return t==mxConstants.ALIGN_LEFT?n=0:t==mxConstants.ALIGN_RIGHT&&(n=-1),e==mxConstants.ALIGN_TOP?i=0:e==mxConstants.ALIGN_BOTTOM&&(i=-1),new mxPoint(n,i)},getSizeForString:function(t,e,n,i,s){e=null!=e?e:mxConstants.DEFAULT_FONTSIZE,n=null!=n?n:mxConstants.DEFAULT_FONTFAMILY;var r=document.createElement("div");return r.style.fontFamily=n,r.style.fontSize=Math.round(e)+"px",r.style.lineHeight=Math.round(e*mxConstants.LINE_HEIGHT)+"px",null!=s&&((s&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(r.style.fontWeight="bold"),(s&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(r.style.fontStyle="italic"),e=[],(s&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&e.push("underline"),(s&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&e.push("line-through"),0t)return 1;i=null!=i?i:0;var s=(n=null!=n?n:mxConstants.PAGE_FORMAT_A4_PORTRAIT).width-2*i;n=n.height-2*i,i=e.getGraphBounds().clone(),e=e.getView().getScale(),i.width/=e,i.height/=e,e=i.width;var r=Math.sqrt(t);if(n=r*(i=Math.sqrt(e/i.height/(s/n))),i=r/i,1>n&&i>t){var o=i/t;i=t,n/=o}for(1>i&&n>t&&(o=n/t,n=t,i/=o),o=Math.ceil(n)*Math.ceil(i),r=0;o>t;){o=Math.floor(n)/n;var l=Math.floor(i)/i;if(1==o&&(o=Math.floor(n-1)/n),1==l&&(l=Math.floor(i-1)/i),n*=o=o>l?o:l,i*=o,o=Math.ceil(n)*Math.ceil(i),10<++r)break}return s*n/e*.99999},show:function(t,e,n,i,s,r){n=null!=n?n:0,i=null!=i?i:0,null==e?e=window.open().document:e.open(),9==document.documentMode&&e.writeln('\x3c!--[if IE]>",o=document.getElementsByTagName("base"),n=0;n",n=0;n
'+t.container.innerHTML,e.writeln(i+"
"),e.close()}else{for(e.writeln(""),o=document.getElementsByTagName("base"),n=0;n'),e.close(),(n=e.createElement("div")).position="absolute",n.overflow="hidden",n.style.width=s+"px",n.style.height=r+"px",(s=e.createElement("div")).style.position="absolute",s.style.left=l+"px",s.style.top=a+"px",r=t.container.firstChild,i=null;null!=r;)o=r.cloneNode(!0),r==t.view.drawPane.ownerSVGElement?(n.appendChild(o),i=o):s.appendChild(o),r=r.nextSibling;e.body.appendChild(n),null!=s.firstChild&&e.body.appendChild(s),null!=i&&(i.style.minWidth="",i.style.minHeight="",i.firstChild.setAttribute("transform","translate("+l+","+a+")"))}return mxUtils.removeCursors(e.body),e},printScreen:function(t){var e=window.open();t.getGraphBounds(),mxUtils.show(t,e.document),t=function(){e.focus(),e.print(),e.close()},mxClient.IS_GC?e.setTimeout(t,500):t()},popup:function(t,e){if(e){var n=document.createElement("div");n.style.overflow="scroll",n.style.width="636px",n.style.height="460px";var i=document.createElement("pre");i.innerHTML=mxUtils.htmlEntities(t,!1).replace(/\n/g,"
").replace(/ /g," "),n.appendChild(i),(n=new mxWindow("Popup Window",n,document.body.clientWidth/2-320,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight)/2-240,640,480,!1,!0)).setClosable(!0),n.setVisible(!0)}else mxClient.IS_NS?((n=window.open()).document.writeln("
"+mxUtils.htmlEntities(t)+"").replace(/ /g," "),n.document.body.appendChild(i))},alert:function(t){alert(t)},prompt:function(t,e){return prompt(t,null!=e?e:"")},confirm:function(t){return confirm(t)},error:function(t,e,n,i){var s=document.createElement("div");s.style.padding="20px";var r=document.createElement("img");r.setAttribute("src",i||mxUtils.errorImage),r.setAttribute("valign","bottom"),r.style.verticalAlign="middle",s.appendChild(r),s.appendChild(document.createTextNode(" ")),s.appendChild(document.createTextNode(" ")),s.appendChild(document.createTextNode(" ")),mxUtils.write(s,t),t=document.body.clientWidth,i=document.body.clientHeight||document.documentElement.clientHeight;var o=new mxWindow(mxResources.get(mxUtils.errorResource)||mxUtils.errorResource,s,(t-e)/2,i/4,e,null,!1,!0);return n&&(mxUtils.br(s),e=document.createElement("p"),n=document.createElement("button"),mxClient.IS_IE?n.style.cssText="float:right":n.setAttribute("style","float:right"),mxEvent.addListener(n,"click",(function(t){o.destroy()})),mxUtils.write(n,mxResources.get(mxUtils.closeResource)||mxUtils.closeResource),e.appendChild(n),s.appendChild(e),mxUtils.br(s),o.setClosable(!0)),o.setVisible(!0),o},makeDraggable:function(t,e,n,i,s,r,o,l,a,h){return(t=new mxDragSource(t,n)).dragOffset=new mxPoint(null!=s?s:0,null!=r?r:mxConstants.TOOLTIP_VERTICAL_OFFSET),t.autoscroll=o,t.setGuidesEnabled(!1),null!=a&&(t.highlightDropTargets=a),null!=h&&(t.getDropTarget=h),t.getGraphForEvent=function(t){return"function"==typeof e?e(t):e},null!=i&&(t.createDragElement=function(){return i.cloneNode(!0)},l&&(t.createPreviewElement=function(t){var e=i.cloneNode(!0),n=parseInt(e.style.width),s=parseInt(e.style.height);return e.style.width=Math.round(n*t.view.scale)+"px",e.style.height=Math.round(s*t.view.scale)+"px",e})),t}},mxConstants={DEFAULT_HOTSPOT:.3,MIN_HOTSPOT_SIZE:8,MAX_HOTSPOT_SIZE:0,RENDERING_HINT_EXACT:"exact",RENDERING_HINT_FASTER:"faster",RENDERING_HINT_FASTEST:"fastest",DIALECT_SVG:"svg",DIALECT_VML:"vml",DIALECT_MIXEDHTML:"mixedHtml",DIALECT_PREFERHTML:"preferHtml",DIALECT_STRICTHTML:"strictHtml",NS_SVG:"http://www.w3.org/2000/svg",NS_XHTML:"http://www.w3.org/1999/xhtml",NS_XLINK:"http://www.w3.org/1999/xlink",SHADOWCOLOR:"gray",VML_SHADOWCOLOR:"gray",SHADOW_OFFSET_X:2,SHADOW_OFFSET_Y:3,SHADOW_OPACITY:1,NODETYPE_ELEMENT:1,NODETYPE_ATTRIBUTE:2,NODETYPE_TEXT:3,NODETYPE_CDATA:4,NODETYPE_ENTITY_REFERENCE:5,NODETYPE_ENTITY:6,NODETYPE_PROCESSING_INSTRUCTION:7,NODETYPE_COMMENT:8,NODETYPE_DOCUMENT:9,NODETYPE_DOCUMENTTYPE:10,NODETYPE_DOCUMENT_FRAGMENT:11,NODETYPE_NOTATION:12,TOOLTIP_VERTICAL_OFFSET:16,DEFAULT_VALID_COLOR:"#00FF00",DEFAULT_INVALID_COLOR:"#FF0000",OUTLINE_HIGHLIGHT_COLOR:"#00FF00",OUTLINE_HIGHLIGHT_STROKEWIDTH:5,HIGHLIGHT_STROKEWIDTH:3,HIGHLIGHT_SIZE:2,HIGHLIGHT_OPACITY:100,CURSOR_MOVABLE_VERTEX:"move",CURSOR_MOVABLE_EDGE:"move",CURSOR_LABEL_HANDLE:"default",CURSOR_TERMINAL_HANDLE:"pointer",CURSOR_BEND_HANDLE:"crosshair",CURSOR_VIRTUAL_BEND_HANDLE:"crosshair",CURSOR_CONNECT:"pointer",HIGHLIGHT_COLOR:"#00FF00",CONNECT_TARGET_COLOR:"#0000FF",INVALID_CONNECT_TARGET_COLOR:"#FF0000",DROP_TARGET_COLOR:"#0000FF",VALID_COLOR:"#00FF00",INVALID_COLOR:"#FF0000",EDGE_SELECTION_COLOR:"#00FF00",VERTEX_SELECTION_COLOR:"#00FF00",VERTEX_SELECTION_STROKEWIDTH:1,EDGE_SELECTION_STROKEWIDTH:1,VERTEX_SELECTION_DASHED:!0,EDGE_SELECTION_DASHED:!0,GUIDE_COLOR:"#FF0000",GUIDE_STROKEWIDTH:1,OUTLINE_COLOR:"#0099FF",OUTLINE_STROKEWIDTH:mxClient.IS_IE?2:3,HANDLE_SIZE:6,LABEL_HANDLE_SIZE:4,HANDLE_FILLCOLOR:"#00FF00",HANDLE_STROKECOLOR:"black",LABEL_HANDLE_FILLCOLOR:"yellow",CONNECT_HANDLE_FILLCOLOR:"#0000FF",LOCKED_HANDLE_FILLCOLOR:"#FF0000",OUTLINE_HANDLE_FILLCOLOR:"#00FFFF",OUTLINE_HANDLE_STROKECOLOR:"#0033FF",DEFAULT_FONTFAMILY:"Arial,Helvetica",DEFAULT_FONTSIZE:11,DEFAULT_TEXT_DIRECTION:"",LINE_HEIGHT:1.2,WORD_WRAP:"normal",ABSOLUTE_LINE_HEIGHT:!1,DEFAULT_FONTSTYLE:0,DEFAULT_STARTSIZE:40,DEFAULT_MARKERSIZE:6,DEFAULT_IMAGESIZE:24,ENTITY_SEGMENT:30,RECTANGLE_ROUNDING_FACTOR:.15,LINE_ARCSIZE:20,ARROW_SPACING:0,ARROW_WIDTH:30,ARROW_SIZE:30,PAGE_FORMAT_A4_PORTRAIT:new mxRectangle(0,0,827,1169),PAGE_FORMAT_A4_LANDSCAPE:new mxRectangle(0,0,1169,827),PAGE_FORMAT_LETTER_PORTRAIT:new mxRectangle(0,0,850,1100),PAGE_FORMAT_LETTER_LANDSCAPE:new mxRectangle(0,0,1100,850),NONE:"none",STYLE_PERIMETER:"perimeter",STYLE_SOURCE_PORT:"sourcePort",STYLE_TARGET_PORT:"targetPort",STYLE_PORT_CONSTRAINT:"portConstraint",STYLE_PORT_CONSTRAINT_ROTATION:"portConstraintRotation",STYLE_SOURCE_PORT_CONSTRAINT:"sourcePortConstraint",STYLE_TARGET_PORT_CONSTRAINT:"targetPortConstraint",STYLE_OPACITY:"opacity",STYLE_FILL_OPACITY:"fillOpacity",STYLE_STROKE_OPACITY:"strokeOpacity",STYLE_TEXT_OPACITY:"textOpacity",STYLE_TEXT_DIRECTION:"textDirection",STYLE_OVERFLOW:"overflow",STYLE_ORTHOGONAL:"orthogonal",STYLE_EXIT_X:"exitX",STYLE_EXIT_Y:"exitY",STYLE_EXIT_DX:"exitDx",STYLE_EXIT_DY:"exitDy",STYLE_EXIT_PERIMETER:"exitPerimeter",STYLE_ENTRY_X:"entryX",STYLE_ENTRY_Y:"entryY",STYLE_ENTRY_DX:"entryDx",STYLE_ENTRY_DY:"entryDy",STYLE_ENTRY_PERIMETER:"entryPerimeter",STYLE_WHITE_SPACE:"whiteSpace",STYLE_ROTATION:"rotation",STYLE_FILLCOLOR:"fillColor",STYLE_POINTER_EVENTS:"pointerEvents",STYLE_SWIMLANE_FILLCOLOR:"swimlaneFillColor",STYLE_MARGIN:"margin",STYLE_GRADIENTCOLOR:"gradientColor",STYLE_GRADIENT_DIRECTION:"gradientDirection",STYLE_STROKECOLOR:"strokeColor",STYLE_SEPARATORCOLOR:"separatorColor",STYLE_STROKEWIDTH:"strokeWidth",STYLE_ALIGN:"align",STYLE_VERTICAL_ALIGN:"verticalAlign",STYLE_LABEL_WIDTH:"labelWidth",STYLE_LABEL_POSITION:"labelPosition",STYLE_VERTICAL_LABEL_POSITION:"verticalLabelPosition",STYLE_IMAGE_ASPECT:"imageAspect",STYLE_IMAGE_ALIGN:"imageAlign",STYLE_IMAGE_VERTICAL_ALIGN:"imageVerticalAlign",STYLE_GLASS:"glass",STYLE_IMAGE:"image",STYLE_IMAGE_WIDTH:"imageWidth",STYLE_IMAGE_HEIGHT:"imageHeight",STYLE_IMAGE_BACKGROUND:"imageBackground",STYLE_IMAGE_BORDER:"imageBorder",STYLE_FLIPH:"flipH",STYLE_FLIPV:"flipV",STYLE_NOLABEL:"noLabel",STYLE_NOEDGESTYLE:"noEdgeStyle",STYLE_LABEL_BACKGROUNDCOLOR:"labelBackgroundColor",STYLE_LABEL_BORDERCOLOR:"labelBorderColor",STYLE_LABEL_PADDING:"labelPadding",STYLE_INDICATOR_SHAPE:"indicatorShape",STYLE_INDICATOR_IMAGE:"indicatorImage",STYLE_INDICATOR_COLOR:"indicatorColor",STYLE_INDICATOR_STROKECOLOR:"indicatorStrokeColor",STYLE_INDICATOR_GRADIENTCOLOR:"indicatorGradientColor",STYLE_INDICATOR_SPACING:"indicatorSpacing",STYLE_INDICATOR_WIDTH:"indicatorWidth",STYLE_INDICATOR_HEIGHT:"indicatorHeight",STYLE_INDICATOR_DIRECTION:"indicatorDirection",STYLE_SHADOW:"shadow",STYLE_SEGMENT:"segment",STYLE_ENDARROW:"endArrow",STYLE_STARTARROW:"startArrow",STYLE_ENDSIZE:"endSize",STYLE_STARTSIZE:"startSize",STYLE_SWIMLANE_LINE:"swimlaneLine",STYLE_ENDFILL:"endFill",STYLE_STARTFILL:"startFill",STYLE_DASHED:"dashed",STYLE_DASH_PATTERN:"dashPattern",STYLE_FIX_DASH:"fixDash",STYLE_ROUNDED:"rounded",STYLE_CURVED:"curved",STYLE_ARCSIZE:"arcSize",STYLE_ABSOLUTE_ARCSIZE:"absoluteArcSize",STYLE_SOURCE_PERIMETER_SPACING:"sourcePerimeterSpacing",STYLE_TARGET_PERIMETER_SPACING:"targetPerimeterSpacing",STYLE_PERIMETER_SPACING:"perimeterSpacing",STYLE_SPACING:"spacing",STYLE_SPACING_TOP:"spacingTop",STYLE_SPACING_LEFT:"spacingLeft",STYLE_SPACING_BOTTOM:"spacingBottom",STYLE_SPACING_RIGHT:"spacingRight",STYLE_HORIZONTAL:"horizontal",STYLE_DIRECTION:"direction",STYLE_ANCHOR_POINT_DIRECTION:"anchorPointDirection",STYLE_ELBOW:"elbow",STYLE_FONTCOLOR:"fontColor",STYLE_FONTFAMILY:"fontFamily",STYLE_FONTSIZE:"fontSize",STYLE_FONTSTYLE:"fontStyle",STYLE_ASPECT:"aspect",STYLE_AUTOSIZE:"autosize",STYLE_FOLDABLE:"foldable",STYLE_EDITABLE:"editable",STYLE_BACKGROUND_OUTLINE:"backgroundOutline",STYLE_BENDABLE:"bendable",STYLE_MOVABLE:"movable",STYLE_RESIZABLE:"resizable",STYLE_RESIZE_WIDTH:"resizeWidth",STYLE_RESIZE_HEIGHT:"resizeHeight",STYLE_ROTATABLE:"rotatable",STYLE_CLONEABLE:"cloneable",STYLE_DELETABLE:"deletable",STYLE_SHAPE:"shape",STYLE_EDGE:"edgeStyle",STYLE_JETTY_SIZE:"jettySize",STYLE_SOURCE_JETTY_SIZE:"sourceJettySize",STYLE_TARGET_JETTY_SIZE:"targetJettySize",STYLE_LOOP:"loopStyle",STYLE_ORTHOGONAL_LOOP:"orthogonalLoop",STYLE_ROUTING_CENTER_X:"routingCenterX",STYLE_ROUTING_CENTER_Y:"routingCenterY",FONT_BOLD:1,FONT_ITALIC:2,FONT_UNDERLINE:4,FONT_STRIKETHROUGH:8,SHAPE_RECTANGLE:"rectangle",SHAPE_ELLIPSE:"ellipse",SHAPE_DOUBLE_ELLIPSE:"doubleEllipse",SHAPE_RHOMBUS:"rhombus",SHAPE_LINE:"line",SHAPE_IMAGE:"image",SHAPE_ARROW:"arrow",SHAPE_ARROW_CONNECTOR:"arrowConnector",SHAPE_LABEL:"label",SHAPE_CYLINDER:"cylinder",SHAPE_SWIMLANE:"swimlane",SHAPE_CONNECTOR:"connector",SHAPE_ACTOR:"actor",SHAPE_CLOUD:"cloud",SHAPE_TRIANGLE:"triangle",SHAPE_HEXAGON:"hexagon",ARROW_CLASSIC:"classic",ARROW_CLASSIC_THIN:"classicThin",ARROW_BLOCK:"block",ARROW_BLOCK_THIN:"blockThin",ARROW_OPEN:"open",ARROW_OPEN_THIN:"openThin",ARROW_OVAL:"oval",ARROW_DIAMOND:"diamond",ARROW_DIAMOND_THIN:"diamondThin",ALIGN_LEFT:"left",ALIGN_CENTER:"center",ALIGN_RIGHT:"right",ALIGN_TOP:"top",ALIGN_MIDDLE:"middle",ALIGN_BOTTOM:"bottom",DIRECTION_NORTH:"north",DIRECTION_SOUTH:"south",DIRECTION_EAST:"east",DIRECTION_WEST:"west",TEXT_DIRECTION_DEFAULT:"",TEXT_DIRECTION_AUTO:"auto",TEXT_DIRECTION_LTR:"ltr",TEXT_DIRECTION_RTL:"rtl",DIRECTION_MASK_NONE:0,DIRECTION_MASK_WEST:1,DIRECTION_MASK_NORTH:2,DIRECTION_MASK_SOUTH:4,DIRECTION_MASK_EAST:8,DIRECTION_MASK_ALL:15,ELBOW_VERTICAL:"vertical",ELBOW_HORIZONTAL:"horizontal",EDGESTYLE_ELBOW:"elbowEdgeStyle",EDGESTYLE_ENTITY_RELATION:"entityRelationEdgeStyle",EDGESTYLE_LOOP:"loopEdgeStyle",EDGESTYLE_SIDETOSIDE:"sideToSideEdgeStyle",EDGESTYLE_TOPTOBOTTOM:"topToBottomEdgeStyle",EDGESTYLE_ORTHOGONAL:"orthogonalEdgeStyle",EDGESTYLE_SEGMENT:"segmentEdgeStyle",PERIMETER_ELLIPSE:"ellipsePerimeter",PERIMETER_RECTANGLE:"rectanglePerimeter",PERIMETER_RHOMBUS:"rhombusPerimeter",PERIMETER_HEXAGON:"hexagonPerimeter",PERIMETER_TRIANGLE:"trianglePerimeter"};function mxEventObject(t){this.name=t,this.properties=[];for(var e=1;ei,!0),n=e.scale)})),mxEvent.addListener(e,"gestureend",(function(t){mxEvent.consume(t)}))}mxEvent.addListener(e,"wheel",(function(e){null==e&&(e=window.event),e.ctrlKey&&e.preventDefault(),(.5navigator.userAgent.indexOf("Presto/2.5")&&(this.contentWrapper.style.overflow=t?"auto":"hidden")},mxWindow.prototype.activate=function(){if(mxWindow.activeWindow!=this){var t=null!=(t=mxUtils.getCurrentStyle(this.getElement()))?t.zIndex:3;if(mxWindow.activeWindow){var e=mxWindow.activeWindow.getElement();null!=e&&null!=e.style&&(e.style.zIndex=t)}e=mxWindow.activeWindow,this.getElement().style.zIndex=parseInt(t)+1,mxWindow.activeWindow=this,this.fireEvent(new mxEventObject(mxEvent.ACTIVATE,"previousWindow",e))}},mxWindow.prototype.getElement=function(){return this.div},mxWindow.prototype.fit=function(){mxUtils.fit(this.div)},mxWindow.prototype.isResizable=function(){return null!=this.resize&&"none"!=this.resize.style.display},mxWindow.prototype.setResizable=function(t){if(t)if(null==this.resize){this.resize=document.createElement("img"),this.resize.style.position="absolute",this.resize.style.bottom="2px",this.resize.style.right="2px",this.resize.setAttribute("src",this.resizeImage),this.resize.style.cursor="nw-resize";var e=null,n=null,i=null,s=null;t=mxUtils.bind(this,(function(t){this.activate(),e=mxEvent.getClientX(t),n=mxEvent.getClientY(t),i=this.div.offsetWidth,s=this.div.offsetHeight,mxEvent.addGestureListeners(document,null,r,o),this.fireEvent(new mxEventObject(mxEvent.RESIZE_START,"event",t)),mxEvent.consume(t)}));var r=mxUtils.bind(this,(function(t){if(null!=e&&null!=n){var r=mxEvent.getClientX(t)-e,o=mxEvent.getClientY(t)-n;this.setSize(i+r,s+o),this.fireEvent(new mxEventObject(mxEvent.RESIZE,"event",t)),mxEvent.consume(t)}})),o=mxUtils.bind(this,(function(t){null!=e&&null!=n&&(n=e=null,mxEvent.removeGestureListeners(document,null,r,o),this.fireEvent(new mxEventObject(mxEvent.RESIZE_END,"event",t)),mxEvent.consume(t))}));mxEvent.addGestureListeners(this.resize,t,r,o),this.div.appendChild(this.resize)}else this.resize.style.display="inline";else null!=this.resize&&(this.resize.style.display="none")},mxWindow.prototype.setSize=function(t,e){t=Math.max(this.minimumSize.width,t),e=Math.max(this.minimumSize.height,e),mxClient.IS_QUIRKS||(this.div.style.width=t+"px",this.div.style.height=e+"px"),this.table.style.width=t+"px",this.table.style.height=e+"px",mxClient.IS_QUIRKS||(this.contentWrapper.style.height=this.div.offsetHeight-this.title.offsetHeight-this.contentHeightCorrection+"px")},mxWindow.prototype.setMinimizable=function(t){this.minimize.style.display=t?"":"none"},mxWindow.prototype.getMinimumSize=function(){return new mxRectangle(0,0,0,this.title.offsetHeight)},mxWindow.prototype.installMinimizeHandler=function(){this.minimize=document.createElement("img"),this.minimize.setAttribute("src",this.minimizeImage),this.minimize.setAttribute("title","Minimize"),this.minimize.style.cursor="pointer",this.minimize.style.marginLeft="2px",this.minimize.style.display="none",this.buttons.appendChild(this.minimize);var t=!1,e=null,n=null,i=mxUtils.bind(this,(function(i){if(this.activate(),t)t=!1,this.minimize.setAttribute("src",this.minimizeImage),this.minimize.setAttribute("title","Minimize"),this.contentWrapper.style.display="",this.maximize.style.display=e,mxClient.IS_QUIRKS||(this.div.style.height=n),this.table.style.height=n,null!=this.resize&&(this.resize.style.visibility=""),this.fireEvent(new mxEventObject(mxEvent.NORMALIZE,"event",i));else{t=!0,this.minimize.setAttribute("src",this.normalizeImage),this.minimize.setAttribute("title","Normalize"),this.contentWrapper.style.display="none",e=this.maximize.style.display,this.maximize.style.display="none",n=this.table.style.height;var s=this.getMinimumSize();0=s.x-r.x&&i>=s.y-r.y&&n<=s.x-r.x+t.container.offsetWidth&&i<=s.y-r.y+t.container.offsetHeight},mxDragSource.prototype.mouseMove=function(t){if(null==(e=this.getGraphForEvent(t))||this.graphContainsEvent(e,t)||(e=null),e!=this.currentGraph&&(null!=this.currentGraph&&this.dragExit(this.currentGraph,t),this.currentGraph=e,null!=this.currentGraph&&this.dragEnter(this.currentGraph,t)),null!=this.currentGraph&&this.dragOver(this.currentGraph,t),null==this.dragElement||null!=this.previewElement&&"visible"==this.previewElement.style.visibility)null!=this.dragElement&&(this.dragElement.style.visibility="hidden");else{var e=mxEvent.getClientX(t),n=mxEvent.getClientY(t);null==this.dragElement.parentNode&&document.body.appendChild(this.dragElement),this.dragElement.style.visibility="visible",null!=this.dragOffset&&(e+=this.dragOffset.x,n+=this.dragOffset.y);var i=mxUtils.getDocumentScrollOrigin(document);this.dragElement.style.left=e+i.x+"px",this.dragElement.style.top=n+i.y+"px"}mxEvent.consume(t)},mxDragSource.prototype.mouseUp=function(t){if(null!=this.currentGraph){if(null!=this.currentPoint&&(null==this.previewElement||"hidden"!=this.previewElement.style.visibility)){var e=this.currentGraph.view.scale,n=this.currentGraph.view.translate;this.drop(this.currentGraph,t,this.currentDropTarget,this.currentPoint.x/e-n.x,this.currentPoint.y/e-n.y)}this.dragExit(this.currentGraph),this.currentGraph=null}this.stopDrag(),this.removeListeners(),mxEvent.consume(t)},mxDragSource.prototype.removeListeners=function(){null!=this.eventSource&&(mxEvent.removeGestureListeners(this.eventSource,null,this.mouseMoveHandler,this.mouseUpHandler),this.eventSource=null),mxEvent.removeGestureListeners(document,null,this.mouseMoveHandler,this.mouseUpHandler),this.mouseUpHandler=this.mouseMoveHandler=null},mxDragSource.prototype.dragEnter=function(t,e){t.isMouseDown=!0,t.isMouseTrigger=mxEvent.isMouseEvent(e),this.previewElement=this.createPreviewElement(t),null!=this.previewElement&&this.checkEventSource&&mxClient.IS_SVG&&(this.previewElement.style.pointerEvents="none"),this.isGuidesEnabled()&&null!=this.previewElement&&(this.currentGuide=new mxGuide(t,t.graphHandler.getGuideStates())),this.highlightDropTargets&&(this.currentHighlight=new mxCellHighlight(t,mxConstants.DROP_TARGET_COLOR)),t.addListener(mxEvent.FIRE_MOUSE_EVENT,this.eventConsumer)},mxDragSource.prototype.dragExit=function(t,e){this.currentPoint=this.currentDropTarget=null,t.isMouseDown=!1,t.removeListener(this.eventConsumer),null!=this.previewElement&&(null!=this.previewElement.parentNode&&this.previewElement.parentNode.removeChild(this.previewElement),this.previewElement=null),null!=this.currentGuide&&(this.currentGuide.destroy(),this.currentGuide=null),null!=this.currentHighlight&&(this.currentHighlight.destroy(),this.currentHighlight=null)},mxDragSource.prototype.dragOver=function(t,e){var n=mxUtils.getOffset(t.container),i=mxUtils.getScrollOrigin(t.container),s=mxEvent.getClientX(e)-n.x+i.x-t.panDx;n=mxEvent.getClientY(e)-n.y+i.y-t.panDy;if(t.autoScroll&&(null==this.autoscroll||this.autoscroll)&&t.scrollPointToVisible(s,n,t.autoExtend),null!=this.currentHighlight&&t.isDropEnabled()&&(this.currentDropTarget=this.getDropTarget(t,s,n,e),i=t.getView().getState(this.currentDropTarget),this.currentHighlight.highlight(i)),null!=this.previewElement){null==this.previewElement.parentNode&&(t.container.appendChild(this.previewElement),this.previewElement.style.zIndex="3",this.previewElement.style.position="absolute");i=this.isGridEnabled()&&t.isGridEnabledEvent(e);var r=!0;if(null!=this.currentGuide&&this.currentGuide.isEnabledForEvent(e))r=new mxRectangle(0,0,r=parseInt(this.previewElement.style.width),o=parseInt(this.previewElement.style.height)),n=new mxPoint(s,n),n=this.currentGuide.move(r,n,i,!0),r=!1,s=n.x,n=n.y;else if(i){i=t.view.scale;var o=t.view.translate,l=t.gridSize/2;s=(t.snap(s/i-o.x-l)+o.x)*i,n=(t.snap(n/i-o.y-l)+o.y)*i}null!=this.currentGuide&&r&&this.currentGuide.hide(),null!=this.previewOffset&&(s+=this.previewOffset.x,n+=this.previewOffset.y),this.previewElement.style.left=Math.round(s)+"px",this.previewElement.style.top=Math.round(n)+"px",this.previewElement.style.visibility="visible"}this.currentPoint=new mxPoint(s,n)},mxDragSource.prototype.drop=function(t,e,n,i,s){this.dropHandler.apply(this,arguments),"hidden"!=t.container.style.visibility&&t.container.focus()},mxToolbar.prototype=new mxEventSource,mxToolbar.prototype.constructor=mxToolbar,mxToolbar.prototype.container=null,mxToolbar.prototype.enabled=!0,mxToolbar.prototype.noReset=!1,mxToolbar.prototype.updateDefaultMode=!0,mxToolbar.prototype.addItem=function(t,e,n,i,s,r){var o=document.createElement(null!=e?"img":"button"),l=s||(null!=r?"mxToolbarMode":"mxToolbarItem");return o.className=l,o.setAttribute("src",e),null!=t&&(null!=e?o.setAttribute("title",t):mxUtils.write(o,t)),this.container.appendChild(o),null!=n&&(mxEvent.addListener(o,"click",n),mxClient.IS_TOUCH&&mxEvent.addListener(o,"touchend",n)),t=mxUtils.bind(this,(function(t){null!=i?o.setAttribute("src",e):o.style.backgroundColor=""})),mxEvent.addGestureListeners(o,mxUtils.bind(this,(function(t){if(null!=i?o.setAttribute("src",i):o.style.backgroundColor="gray",null!=r){null==this.menu&&(this.menu=new mxPopupMenu,this.menu.init());var e=this.currentImg;this.menu.isMenuShowing()&&this.menu.hideMenu(),e!=o&&(this.currentImg=o,this.menu.factoryMethod=r,e=new mxPoint(o.offsetLeft,o.offsetTop+o.offsetHeight),this.menu.popup(e.x,e.y,null,t),this.menu.isMenuShowing()&&(o.className=l+"Selected",this.menu.hideMenu=function(){mxPopupMenu.prototype.hideMenu.apply(this),o.className=l,this.currentImg=null}))}})),null,t),mxEvent.addListener(o,"mouseout",t),o},mxToolbar.prototype.addCombo=function(t){var e=document.createElement("div");e.style.display="inline",e.className="mxToolbarComboContainer";var n=document.createElement("select");return n.className=t||"mxToolbarCombo",e.appendChild(n),this.container.appendChild(e),n},mxToolbar.prototype.addActionCombo=function(t,e){var n=document.createElement("select");return n.className=e||"mxToolbarCombo",this.addOption(n,t,null),mxEvent.addListener(n,"change",(function(t){var e=n.options[n.selectedIndex];n.selectedIndex=0,null!=e.funct&&e.funct(t)})),this.container.appendChild(n),n},mxToolbar.prototype.addOption=function(t,e,n){var i=document.createElement("option");return mxUtils.writeln(i,e),"function"==typeof n?i.funct=n:i.setAttribute("value",n),t.appendChild(i),i},mxToolbar.prototype.addSwitchMode=function(t,e,n,i,s){var r=document.createElement("img");return r.initialClassName=s||"mxToolbarMode",r.className=r.initialClassName,r.setAttribute("src",e),r.altIcon=i,null!=t&&r.setAttribute("title",t),mxEvent.addListener(r,"click",mxUtils.bind(this,(function(t){null!=(t=this.selectedMode.altIcon)?(this.selectedMode.altIcon=this.selectedMode.getAttribute("src"),this.selectedMode.setAttribute("src",t)):this.selectedMode.className=this.selectedMode.initialClassName,this.updateDefaultMode&&(this.defaultMode=r),this.selectedMode=r,null!=(t=r.altIcon)?(r.altIcon=r.getAttribute("src"),r.setAttribute("src",t)):r.className=r.initialClassName+"Selected",this.fireEvent(new mxEventObject(mxEvent.SELECT)),n()}))),this.container.appendChild(r),null==this.defaultMode&&(this.defaultMode=r,this.selectMode(r),n()),r},mxToolbar.prototype.addMode=function(t,e,n,i,s,r){r=null==r||r;var o=document.createElement(null!=e?"img":"button");return o.initialClassName=s||"mxToolbarMode",o.className=o.initialClassName,o.setAttribute("src",e),o.altIcon=i,null!=t&&o.setAttribute("title",t),this.enabled&&r&&(mxEvent.addListener(o,"click",mxUtils.bind(this,(function(t){this.selectMode(o,n),this.noReset=!1}))),mxEvent.addListener(o,"dblclick",mxUtils.bind(this,(function(t){this.selectMode(o,n),this.noReset=!0}))),null==this.defaultMode&&(this.defaultMode=o,this.defaultFunction=n,this.selectMode(o,n))),this.container.appendChild(o),o},mxToolbar.prototype.selectMode=function(t,e){if(this.selectedMode!=t){if(null!=this.selectedMode){var n=this.selectedMode.altIcon;null!=n?(this.selectedMode.altIcon=this.selectedMode.getAttribute("src"),this.selectedMode.setAttribute("src",n)):this.selectedMode.className=this.selectedMode.initialClassName}this.selectedMode=t,null!=(n=this.selectedMode.altIcon)?(this.selectedMode.altIcon=this.selectedMode.getAttribute("src"),this.selectedMode.setAttribute("src",n)):this.selectedMode.className=this.selectedMode.initialClassName+"Selected",this.fireEvent(new mxEventObject(mxEvent.SELECT,"function",e))}},mxToolbar.prototype.resetMode=function(t){!t&&this.noReset||this.selectedMode==this.defaultMode||this.selectMode(this.defaultMode,this.defaultFunction)},mxToolbar.prototype.addSeparator=function(t){return this.addItem(null,t,null)},mxToolbar.prototype.addBreak=function(){mxUtils.br(this.container)},mxToolbar.prototype.addLine=function(){var t=document.createElement("hr");t.style.marginRight="6px",t.setAttribute("size","1"),this.container.appendChild(t)},mxToolbar.prototype.destroy=function(){mxEvent.release(this.container),this.selectedMode=this.defaultFunction=this.defaultMode=this.container=null,null!=this.menu&&this.menu.destroy()},mxUndoableEdit.prototype.source=null,mxUndoableEdit.prototype.changes=null,mxUndoableEdit.prototype.significant=null,mxUndoableEdit.prototype.undone=!1,mxUndoableEdit.prototype.redone=!1,mxUndoableEdit.prototype.isEmpty=function(){return 0==this.changes.length},mxUndoableEdit.prototype.isSignificant=function(){return this.significant},mxUndoableEdit.prototype.add=function(t){this.changes.push(t)},mxUndoableEdit.prototype.notify=function(){},mxUndoableEdit.prototype.die=function(){},mxUndoableEdit.prototype.undo=function(){if(!this.undone){this.source.fireEvent(new mxEventObject(mxEvent.START_EDIT));for(var t=this.changes.length-1;0<=t;t--){var e=this.changes[t];null!=e.execute?e.execute():null!=e.undo&&e.undo(),this.source.fireEvent(new mxEventObject(mxEvent.EXECUTED,"change",e))}this.undone=!0,this.redone=!1,this.source.fireEvent(new mxEventObject(mxEvent.END_EDIT))}this.notify()},mxUndoableEdit.prototype.redo=function(){if(!this.redone){this.source.fireEvent(new mxEventObject(mxEvent.START_EDIT));for(var t=this.changes.length,e=0;ethis.indexOfNextAdd)for(var t=this.history.splice(this.indexOfNextAdd,this.history.length-this.indexOfNextAdd),e=0;ethis.dx&&Math.abs(this.dx)this.dy&&Math.abs(this.dy)s.x+(document.body.clientWidth||r.clientWidth)&&(e.div.style.left=Math.max(0,t.div.offsetLeft-i+(mxClient.IS_IE?6:-6))+"px"),mxUtils.fit(e.div)}},mxPopupMenu.prototype.addSeparator=function(t,e){if(t=t||this,this.smartSeparators&&!e)t.willAddSeparator=!0;else if(null!=t.tbody){t.willAddSeparator=!1;var n=document.createElement("tr"),i=document.createElement("td");i.className="mxPopupMenuIcon",i.style.padding="0 0 0 0px",n.appendChild(i),(i=document.createElement("td")).style.padding="0 0 0 0px",i.setAttribute("colSpan","2");var s=document.createElement("hr");s.setAttribute("size","1"),i.appendChild(s),n.appendChild(i),t.tbody.appendChild(n)}},mxPopupMenu.prototype.popup=function(t,e,n,i){if(null!=this.div&&null!=this.tbody&&null!=this.factoryMethod){for(this.div.style.left=t+"px",this.div.style.top=e+"px";null!=this.tbody.firstChild;)mxEvent.release(this.tbody.firstChild),this.tbody.removeChild(this.tbody.firstChild);this.itemCount=0,this.factoryMethod(this,n,i),0this.autoSaveDelay||this.ignoredChanges>=this.autoSaveThreshold&&t>this.autoSaveThrottle?(this.save(),this.reset()):this.ignoredChanges++},mxAutoSaveManager.prototype.reset=function(){this.lastSnapshot=(new Date).getTime(),this.ignoredChanges=0},mxAutoSaveManager.prototype.destroy=function(){this.setGraph(null)},mxAnimation.prototype=new mxEventSource,mxAnimation.prototype.constructor=mxAnimation,mxAnimation.prototype.delay=null,mxAnimation.prototype.thread=null,mxAnimation.prototype.isRunning=function(){return null!=this.thread},mxAnimation.prototype.startAnimation=function(){null==this.thread&&(this.thread=window.setInterval(mxUtils.bind(this,this.updateAnimation),this.delay))},mxAnimation.prototype.updateAnimation=function(){this.fireEvent(new mxEventObject(mxEvent.EXECUTE))},mxAnimation.prototype.stopAnimation=function(){null!=this.thread&&(window.clearInterval(this.thread),this.thread=null,this.fireEvent(new mxEventObject(mxEvent.DONE)))},mxMorphing.prototype=new mxAnimation,mxMorphing.prototype.constructor=mxMorphing,mxMorphing.prototype.graph=null,mxMorphing.prototype.steps=null,mxMorphing.prototype.step=0,mxMorphing.prototype.ease=null,mxMorphing.prototype.cells=null,mxMorphing.prototype.updateAnimation=function(){mxAnimation.prototype.updateAnimation.apply(this,arguments);var t=new mxCellStatePreview(this.graph);if(null!=this.cells)for(var e=0;e=this.steps)&&this.stopAnimation()},mxMorphing.prototype.show=function(t){t.show()},mxMorphing.prototype.animateCell=function(t,e,n){var i=this.graph.getView().getState(t),s=null;if(null!=i&&(s=this.getDelta(i),this.graph.getModel().isVertex(t)&&(0!=s.x||0!=s.y))){var r=this.graph.view.getTranslate(),o=this.graph.view.getScale();s.x+=r.x*o,s.y+=r.y*o,e.moveState(i,-s.x/this.ease,-s.y/this.ease)}if(n&&!this.stopRecursion(i,s))for(i=this.graph.getModel().getChildCount(t),s=0;sn?";stop-opacity:"+n:"",(s=this.createElement("stop")).setAttribute("offset","0%"),s.setAttribute("style","stop-color:"+t+n),r.appendChild(s),n=1>i?";stop-opacity:"+i:"",(s=this.createElement("stop")).setAttribute("offset","100%"),s.setAttribute("style","stop-color:"+e+n),r.appendChild(s),r},mxSvgCanvas2D.prototype.addNode=function(t,e){var n=this.node,i=this.state;if(null!=n){if("path"==n.nodeName){if(!(null!=this.path&&0t.alpha||1>t.fillAlpha)&&this.node.setAttribute("fill-opacity",t.alpha*t.fillAlpha),null!=t.fillColor)if(null!=t.gradientColor)if(t=this.getSvgGradient(String(t.fillColor),String(t.gradientColor),t.gradientFillAlpha,t.gradientAlpha,t.gradientDirection),mxClient.IS_CHROMEAPP||mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE||this.root.ownerDocument!=document)this.node.setAttribute("fill","url(#"+t+")");else{var e=this.getBaseUrl().replace(/([\(\)])/g,"\\$1");this.node.setAttribute("fill","url("+e+"#"+t+")")}else this.node.setAttribute("fill",String(t.fillColor).toLowerCase())},mxSvgCanvas2D.prototype.getCurrentStrokeWidth=function(){return Math.max(this.minStrokeWidth,Math.max(.01,this.format(this.state.strokeWidth*this.state.scale)))},mxSvgCanvas2D.prototype.updateStroke=function(){var t=this.state;this.node.setAttribute("stroke",String(t.strokeColor).toLowerCase()),(1>t.alpha||1>t.strokeAlpha)&&this.node.setAttribute("stroke-opacity",t.alpha*t.strokeAlpha);var e=this.getCurrentStrokeWidth();1!=e&&this.node.setAttribute("stroke-width",e),"path"==this.node.nodeName&&this.updateStrokeAttributes(),t.dashed&&this.node.setAttribute("stroke-dasharray",this.createDashPattern((t.fixDash?1:t.strokeWidth)*t.scale))},mxSvgCanvas2D.prototype.updateStrokeAttributes=function(){var t=this.state;if(null!=t.lineJoin&&"miter"!=t.lineJoin&&this.node.setAttribute("stroke-linejoin",t.lineJoin),null!=t.lineCap){var e=t.lineCap;"flat"==e&&(e="butt"),"butt"!=e&&this.node.setAttribute("stroke-linecap",e)}null==t.miterLimit||this.styleEnabled&&10==t.miterLimit||this.node.setAttribute("stroke-miterlimit",t.miterLimit)},mxSvgCanvas2D.prototype.createDashPattern=function(t){var e=[];if("string"==typeof this.state.dashPattern){var n=this.state.dashPattern.split(" ");if(0a.alpha||1>a.fillAlpha)&&h.setAttribute("opacity",a.alpha*a.fillAlpha),s=this.state.transform||"",o||l){var u=r=1,p=0,d=0;o&&(r=-1,p=-n-2*t),l&&(u=-1,d=-i-2*e),s+="scale("+r+","+u+")translate("+p*a.scale+","+d*a.scale+")"}0",5)+1)),""==t.substring(t.length-7,t.length)&&(t=t.substring(0,t.length-7)))}else{if(null!=document.implementation&&null!=document.implementation.createDocument){var e,n=(e=document.implementation.createDocument("http://www.w3.org/1999/xhtml","html",null)).createElement("body");e.documentElement.appendChild(n);var i=document.createElement("div");for(i.innerHTML=t,t=i.firstChild;null!=t;)i=t.nextSibling,n.appendChild(e.adoptNode(t)),t=i;return n.innerHTML}(e=document.createElement("textarea")).innerHTML=t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(//g,">"),t=e.value.replace(/&/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&").replace(/
/g,"
").replace(/
/g,"
").replace(/(]+)>/gm,"$1 />")}return t},mxSvgCanvas2D.prototype.createDiv=function(t){if(mxUtils.isNode(t)||(t="
"+this.convertHtml(t)+"
"),mxClient.IS_IE||mxClient.IS_IE11||!document.createElementNS)return mxUtils.isNode(t)&&(t="
"+mxUtils.getXml(t)+"
"),mxUtils.parseXml('
'+t+"
").documentElement;var e=document.createElementNS("http://www.w3.org/1999/xhtml","div");if(mxUtils.isNode(t)){var n=document.createElement("div"),i=n.cloneNode(!1);this.root.ownerDocument!=document?n.appendChild(t.cloneNode(!0)):n.appendChild(t),i.appendChild(n),e.appendChild(i)}else e.innerHTML=t;return e},mxSvgCanvas2D.prototype.updateText=function(t,e,n,i,s,r,o,l,a,h,u){null!=u&&null!=u.firstChild&&null!=u.firstChild.firstChild&&this.updateTextNodes(t,e,n,i,s,r,o,l,a,h,u.firstChild)},mxSvgCanvas2D.prototype.addForeignObject=function(t,e,n,i,s,r,o,l,a,h,u,p,d,c,m){d=this.createElement("g");var g=this.createElement("foreignObject");g.setAttribute("style","overflow: visible; text-align: left;"),g.setAttribute("pointer-events","none"),c.ownerDocument!=document&&(c=mxUtils.importNodeImplementation(g.ownerDocument,c,!0)),g.appendChild(c),d.appendChild(g),this.updateTextNodes(t,e,n,i,r,o,l,h,u,p,d),this.root.ownerDocument!=document&&(null!=(t=this.createAlternateContent(g,t,e,n,i,s,r,o,l,a,h,u,p))&&(g.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility"),(e=this.createElement("switch")).appendChild(g),e.appendChild(t),d.appendChild(e))),m.appendChild(d)},mxSvgCanvas2D.prototype.updateTextNodes=function(t,e,n,i,s,r,o,l,a,h,u){var p=this.state.scale;mxSvgCanvas2D.createCss(n,i,s,r,o,l,a,null!=this.state.fontBackgroundColor?this.state.fontBackgroundColor:null,null!=this.state.fontBorderColor?this.state.fontBorderColor:null,"display: flex; align-items: unsafe "+(r==mxConstants.ALIGN_TOP?"flex-start":r==mxConstants.ALIGN_BOTTOM?"flex-end":"center")+"; justify-content: unsafe "+(s==mxConstants.ALIGN_LEFT?"flex-start":s==mxConstants.ALIGN_RIGHT?"flex-end":"center")+"; ",this.getTextCss(),p,mxUtils.bind(this,(function(n,i,s,r,o){t+=this.state.dx,e+=this.state.dy;var l=u.firstChild,a=l.firstChild,d=a.firstChild,c=(this.rotateHtml?this.state.rotation:0)+(null!=h?h:0),m=(0!=this.foOffset?"translate("+this.foOffset+" "+this.foOffset+")":"")+(1!=p?"scale("+p+")":"");d.firstChild.setAttribute("style",o),d.setAttribute("style",r),l.setAttribute("width",Math.ceil(1/Math.min(1,p)*100)+"%"),l.setAttribute("height",Math.ceil(1/Math.min(1,p)*100)+"%"),0>(i=Math.round(e+i))?l.setAttribute("y",i):(l.removeAttribute("y"),s+="padding-top: "+i+"px; "),a.setAttribute("style",s+"margin-left: "+Math.round(t+n)+"px;"),""!=(m+=0!=c?"rotate("+c+" "+t+" "+e+")":"")?u.setAttribute("transform",m):u.removeAttribute("transform"),1!=this.state.alpha?u.setAttribute("opacity",this.state.alpha):u.removeAttribute("opacity")})))},mxSvgCanvas2D.createCss=function(t,e,n,i,s,r,o,l,a,h,u,p,d){p="box-sizing: border-box; font-size: 0; text-align: "+(n==mxConstants.ALIGN_LEFT?"left":n==mxConstants.ALIGN_RIGHT?"right":"center")+"; ";var c=mxUtils.getAlignmentAsPoint(n,i);n="overflow: hidden; ",i="width: 1px; ";var m="height: 1px; ",g=c.x*t;c=c.y*e;o?(i="width: "+Math.round(t)+"px; ",p+="max-height: "+Math.round(e)+"px; ",c=0):"fill"==r?(u+="width: 100%; height: 100%; ",p+=(i="width: "+Math.round(t)+"px; ")+(m="height: "+Math.round(e)+"px; ")):"width"==r?(u+="width: 100%; ",p+=i="width: "+Math.round(t)+"px; ",c=0,0l.alpha&&c.setAttribute("opacity",l.alpha),m=s.split("\n"),p=Math.round(d*mxConstants.LINE_HEIGHT);var g=d+(m.length-1)*p;for(u=e+d-1,o==mxConstants.ALIGN_MIDDLE?"fill"==a?u-=i/2:u-=h=(this.matchHtmlAlignment&&h&&0"),document.body.appendChild(u),s=u.offsetWidth,r=u.offsetHeight,u.parentNode.removeChild(u),o==mxConstants.ALIGN_CENTER?n-=s/2:o==mxConstants.ALIGN_RIGHT&&(n-=s),l==mxConstants.ALIGN_MIDDLE?i-=r/2:l==mxConstants.ALIGN_BOTTOM&&(i-=r),u=new mxRectangle((n+1)*h.scale,(i+2)*h.scale,s*h.scale,(r+1)*h.scale);null!=u&&((e=this.createElement("rect")).setAttribute("fill",h.fontBackgroundColor||"none"),e.setAttribute("stroke",h.fontBorderColor||"none"),e.setAttribute("x",Math.floor(u.x-1)),e.setAttribute("y",Math.floor(u.y-1)),e.setAttribute("width",Math.ceil(u.width+2)),e.setAttribute("height",Math.ceil(u.height)),h=null!=h.fontBorderColor?Math.max(1,this.format(h.scale)):0,e.setAttribute("stroke-width",h),this.root.ownerDocument==document&&1==mxUtils.mod(h,2)&&e.setAttribute("transform","translate(0.5, 0.5)"),t.insertBefore(e,t.firstChild))}},mxSvgCanvas2D.prototype.stroke=function(){this.addNode(!1,!0)},mxSvgCanvas2D.prototype.fill=function(){this.addNode(!0,!1)},mxSvgCanvas2D.prototype.fillAndStroke=function(){this.addNode(!0,!0)};var mxVmlCanvas2D=function(t){mxAbstractCanvas2D.call(this),this.root=t};function mxGuide(t,e){this.graph=t,this.setStates(e)}function mxShape(t){this.stencil=t,this.initStyles()}function mxStencil(t){this.desc=t,this.parseDescription(),this.parseConstraints()}mxUtils.extend(mxVmlCanvas2D,mxAbstractCanvas2D),mxVmlCanvas2D.prototype.node=null,mxVmlCanvas2D.prototype.textEnabled=!0,mxVmlCanvas2D.prototype.moveOp="m",mxVmlCanvas2D.prototype.lineOp="l",mxVmlCanvas2D.prototype.curveOp="c",mxVmlCanvas2D.prototype.closeOp="x",mxVmlCanvas2D.prototype.rotatedHtmlBackground="",mxVmlCanvas2D.prototype.vmlScale=1,mxVmlCanvas2D.prototype.createElement=function(t){return document.createElement(t)},mxVmlCanvas2D.prototype.createVmlElement=function(t){return this.createElement(mxClient.VML_PREFIX+":"+t)},mxVmlCanvas2D.prototype.addNode=function(t,e){var n=this.node,i=this.state;if(null!=n){if("shape"==n.nodeName){if(!(null!=this.path&&0t.alpha||1>t.fillAlpha)&&(e.opacity=t.alpha*t.fillAlpha*100+"%");return e},mxVmlCanvas2D.prototype.createStroke=function(){var t=this.state,e=this.createVmlElement("stroke");return e.endcap=t.lineCap||"flat",e.joinstyle=t.lineJoin||"miter",e.miterlimit=t.miterLimit||"10",(1>t.alpha||1>t.strokeAlpha)&&(e.opacity=t.alpha*t.strokeAlpha*100+"%"),t.dashed&&(e.dashstyle=this.getVmlDashStyle()),e},mxVmlCanvas2D.prototype.getVmlDashStyle=function(){var t="dash";if("string"==typeof this.state.dashPattern){var e=this.state.dashPattern.split(" ");0this.state.alpha||1>this.state.fillAlpha)&&(t.style.filter+="alpha(opacity="+this.state.alpha*this.state.fillAlpha*100+")"),this.root.appendChild(t)},mxVmlCanvas2D.prototype.createDiv=function(t,e,n,i){n=this.createElement("div");var s=this.state,r="";return null!=s.fontBackgroundColor&&(r+="background-color:"+mxUtils.htmlEntities(s.fontBackgroundColor)+";"),null!=s.fontBorderColor&&(r+="border:1px solid "+mxUtils.htmlEntities(s.fontBorderColor)+";"),mxUtils.isNode(t)?n.appendChild(t):"fill"!=i&&"width"!=i?((i=this.createElement("div")).style.cssText=r,i.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",i.style.zoom="1",i.style.textDecoration="inherit",i.innerHTML=t,n.appendChild(i)):(n.style.cssText=r,n.innerHTML=t),(t=n.style).fontSize=s.fontSize/this.vmlScale+"px",t.fontFamily=s.fontFamily,t.color=s.fontColor,t.verticalAlign="top",t.textAlign=e||"left",t.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?s.fontSize*mxConstants.LINE_HEIGHT/this.vmlScale+"px":mxConstants.LINE_HEIGHT,(s.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(t.fontWeight="bold"),(s.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(t.fontStyle="italic"),(s.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&(t.textDecoration="underline"),n},mxVmlCanvas2D.prototype.text=function(t,e,n,i,s,r,o,l,a,h,u,p,d){if(this.textEnabled&&null!=s){var c=this.state;if("html"==a){null!=c.rotation&&(t=(e=this.rotatePoint(t,e,c.rotation,c.rotationCx,c.rotationCy)).x,e=e.y),8!=document.documentMode||mxClient.IS_EM?(t*=c.scale,e*=c.scale):(t+=c.dx,e+=c.dy,"fill"!=h&&o==mxConstants.ALIGN_TOP&&--e),(a=8!=document.documentMode||mxClient.IS_EM?this.createElement("div"):this.createVmlElement("group")).style.position="absolute",a.style.display="inline",a.style.left=this.format(t)+"px",a.style.top=this.format(e)+"px",a.style.zoom=c.scale;var m=this.createElement("div");m.style.position="relative",m.style.display="inline";var g=(x=mxUtils.getAlignmentAsPoint(r,o)).x,x=x.y;if(s=this.createDiv(s,r,o,h),r=this.createElement("div"),null!=d&&s.setAttribute("dir",d),l&&0(y%=2*Math.PI)&&(y+=2*Math.PI),(y%=Math.PI)>Math.PI/2&&(y=Math.PI-y),o=Math.cos(y);var f=Math.sin(y);8!=document.documentMode||mxClient.IS_EM||(s.style.display="inline-block",r.style.display="inline-block",m.style.display="inline-block"),s.style.visibility="hidden",s.style.position="absolute",document.body.appendChild(s),null!=(m=s).firstChild&&"DIV"==m.firstChild.nodeName&&(m=m.firstChild),y=m.offsetWidth+3,m=m.offsetHeight,u?(n=Math.min(n,y),m=Math.min(m,i)):n=y,l&&(s.style.width=n+"px"),mxClient.IS_QUIRKS&&(u||"width"==h)&&m>i&&(m=i,s.style.height=m+"px"),u=((i=m)-i*o+n*-f)/2-d*n*(g+.5)+p*i*(x+.5),l=(n-n*o+i*-f)/2+p*n*(g+.5)+d*i*(x+.5),"group"==a.nodeName&&"DIV"==this.root.nodeName?((h=this.createElement("div")).style.display="inline-block",h.style.position="absolute",h.style.left=this.format(t+(l-n/2)*c.scale)+"px",h.style.top=this.format(e+(u-i/2)*c.scale)+"px",a.parentNode.appendChild(h),h.appendChild(a)):(c=8!=document.documentMode||mxClient.IS_EM?c.scale:1,a.style.left=this.format(t+(l-n/2)*c)+"px",a.style.top=this.format(e+(u-i/2)*c)+"px"),r.style.filter="progid:DXImageTransform.Microsoft.Matrix(M11="+p+", M12="+d+", M21="+-d+", M22="+p+", sizingMethod='auto expand')",r.style.backgroundColor=this.rotatedHtmlBackground,1>this.state.alpha&&(r.style.filter+="alpha(opacity="+100*this.state.alpha+")"),r.appendChild(s),s.style.position="",s.style.visibility=""}else 8!=document.documentMode||mxClient.IS_EM?(s.style.verticalAlign="top",1>this.state.alpha&&(a.style.filter="alpha(opacity="+100*this.state.alpha+")"),c=s.parentNode,s.style.visibility="hidden",document.body.appendChild(s),n=s.offsetWidth,m=s.offsetHeight,mxClient.IS_QUIRKS&&u&&m>i&&(m=i,s.style.height=m+"px"),i=m,s.style.visibility="",c.appendChild(s),a.style.left=this.format(t+n*g*this.state.scale)+"px",a.style.top=this.format(e+i*x*this.state.scale)+"px"):(1>this.state.alpha&&(s.style.filter="alpha(opacity="+100*this.state.alpha+")"),m.style.left=100*g+"%",m.style.top=100*x+"%")}else this.plainText(t,e,n,i,mxUtils.htmlEntities(s,!1),r,o,l,a,h,u,p,d)}},mxVmlCanvas2D.prototype.plainText=function(t,e,n,i,s,r,o,l,a,h,u,p,d){t=(t+(l=this.state).dx)*l.scale,e=(e+l.dy)*l.scale,(n=this.createVmlElement("shape")).style.width="1px",n.style.height="1px",n.stroked="false",(i=this.createVmlElement("fill")).color=l.fontColor,i.opacity=100*l.alpha+"%",n.appendChild(i),(i=this.createVmlElement("path")).textpathok="true",i.v="m "+this.format(0)+" "+this.format(0)+" l "+this.format(1)+" "+this.format(0),n.appendChild(i),(i=this.createVmlElement("textpath")).style.cssText="v-text-align:"+r,i.style.align=r,i.style.fontFamily=l.fontFamily,i.string=s,i.on="true",r=l.fontSize*l.scale/this.vmlScale,i.style.fontSize=r+"px",(l.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(i.style.fontWeight="bold"),(l.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(i.style.fontStyle="italic"),(l.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&(i.style.textDecoration="underline"),l=r+((s=s.split("\n")).length-1)*r*mxConstants.LINE_HEIGHT,r=s=0,o==mxConstants.ALIGN_BOTTOM?r=-l/2:o!=mxConstants.ALIGN_MIDDLE&&(r=l/2),null!=p&&(n.style.rotation=p,o=Math.PI/180*p,s=Math.sin(o)*r,r*=Math.cos(o)),n.appendChild(i),n.style.left=this.format(t-s)+"px",n.style.top=this.format(e+r)+"px",this.root.appendChild(n)},mxVmlCanvas2D.prototype.stroke=function(){this.addNode(!1,!0)},mxVmlCanvas2D.prototype.fill=function(){this.addNode(!0,!1)},mxVmlCanvas2D.prototype.fillAndStroke=function(){this.addNode(!0,!0)},mxGuide.prototype.graph=null,mxGuide.prototype.states=null,mxGuide.prototype.horizontal=!0,mxGuide.prototype.vertical=!0,mxGuide.prototype.guideX=null,mxGuide.prototype.guideY=null,mxGuide.prototype.rounded=!1,mxGuide.prototype.tolerance=2,mxGuide.prototype.setStates=function(t){this.states=t},mxGuide.prototype.isEnabledForEvent=function(t){return!0},mxGuide.prototype.getGuideTolerance=function(t){return t&&this.graph.gridEnabled?this.graph.gridSize/2:this.tolerance},mxGuide.prototype.createGuideShape=function(t){return(t=new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)).isDashed=!0,t},mxGuide.prototype.isStateIgnored=function(t){return!1},mxGuide.prototype.move=function(t,e,n,i){if(null!=this.states&&(this.horizontal||this.vertical)&&null!=t&&null!=e){i=function(n,i,s){n+=this.graph.panDy;var r=!1;s&&Math.abs(n-E)<=m?(e.y=n-t.getCenterY(),m=Math.abs(n-E),r=!0):s||(Math.abs(n-f)<=m?(e.y=n-t.y,m=Math.abs(n-f),r=!0):Math.abs(n-v)<=m&&(e.y=n-t.y-t.height,m=Math.abs(n-v),r=!0)),r&&(p=i,d=Math.round(n-this.graph.panDy),null==this.guideY&&(this.guideY=this.createGuideShape(!1),this.guideY.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,this.guideY.pointerEvents=!1,this.guideY.init(this.graph.getView().getOverlayPane()))),u=u||r};var s=function(n,i,s){n+=this.graph.panDx;var r=!1;s&&Math.abs(n-y)<=c?(e.x=n-t.getCenterX(),c=Math.abs(n-y),r=!0):s||(Math.abs(n-g)<=c?(e.x=n-t.x,c=Math.abs(n-g),r=!0):Math.abs(n-x)<=c&&(e.x=n-t.x-t.width,c=Math.abs(n-x),r=!0)),r&&(a=i,h=Math.round(n-this.graph.panDx),null==this.guideX&&(this.guideX=this.createGuideShape(!0),this.guideX.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,this.guideX.pointerEvents=!1,this.guideX.init(this.graph.getView().getOverlayPane()))),l=l||r};this.graph.getView();var r=this.graph.getView().scale,o=(r=this.getGuideTolerance(n)*r,t.clone());o.x+=e.x,o.y+=e.y;var l=!1,a=null,h=null,u=!1,p=null,d=null,c=r,m=r,g=o.x,x=o.x+o.width,y=o.getCenterX(),f=o.y,v=o.y+o.height,E=o.getCenterY();for(r=0;rthis.opacity&&(e+="alpha(opacity="+this.opacity+")"),this.isShadow&&(e+="progid:DXImageTransform.Microsoft.dropShadow (OffX='"+Math.round(mxConstants.SHADOW_OFFSET_X*this.scale)+"', OffY='"+Math.round(mxConstants.SHADOW_OFFSET_Y*this.scale)+"', Color='"+mxConstants.VML_SHADOWCOLOR+"')"),null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE){var n=this.fill,i=this.gradient,s="0",r={east:0,south:1,west:2,north:3},o=null!=this.direction?r[this.direction]:0;null!=this.gradientDirection&&(o=mxUtils.mod(o+r[this.gradientDirection]-1,4)),1==o?(s="1",r=n,n=i,i=r):2==o?(r=n,n=i,i=r):3==o&&(s="1"),e+="progid:DXImageTransform.Microsoft.gradient(startColorStr='"+n+"', endColorStr='"+i+"', gradientType='"+s+"')"}t.style.filter=e},mxShape.prototype.updateHtmlColors=function(t){var e=this.stroke;null!=e&&e!=mxConstants.NONE?(t.style.borderColor=e,this.isDashed?t.style.borderStyle="dashed":0mxUtils.indexOf(r,a-1))){var p=Math.sqrt(u*u+h*h);for(t.lineTo(o.x+u*Math.min(i,p/2)/p,o.y+h*Math.min(i,p/2)/p),h=e[mxUtils.mod(a+1,e.length)];amxUtils.indexOf(a.connectsAsTarget,o)&&a.connectsAsTarget.push(o))}}n[i].temp[0]=1}}function mxSwimlaneModel(t,e,n,i,s){for(t.getGraph(),this.tightenToSource=s,this.roots=n,this.parent=i,this.vertexMapper=new mxDictionary,this.edgeMapper=new mxDictionary,this.maxRank=0,n=[],null==e&&(e=this.graph.getChildVertices(i)),this.maxRank=this.SOURCESCANSTARTRANK,this.createInternalCells(t,e,n),i=0;imxUtils.indexOf(a.connectsAsTarget,o)&&a.connectsAsTarget.push(o))}}n[i].temp[0]=1}}function mxHierarchicalLayoutStage(){}function mxMedianHybridCrossingReduction(t){this.layout=t}function MedianCellSorter(){}function mxMinimumCycleRemover(t){this.layout=t}function mxCoordinateAssignment(t,e,n,i,s,r){this.layout=t,this.intraCellSpacing=e,this.interRankCellSpacing=n,this.orientation=i,this.initialX=s,this.parallelEdgeSpacing=r}function mxSwimlaneOrdering(t){this.layout=t}function mxHierarchicalLayout(t,e,n){mxGraphLayout.call(this,t),this.orientation=null!=e?e:mxConstants.DIRECTION_NORTH,this.deterministic=null==n||n}!function(){function t(t){return t=null!=t?t:2,function(e,n,i,s,r,o,l,a,h,u){n=r*h*1.118,a=o*h*1.118,r*=l+h,o*=l+h;var p=s.clone();return p.x-=n,p.y-=a,l=i!=mxConstants.ARROW_CLASSIC&&i!=mxConstants.ARROW_CLASSIC_THIN?1:.75,s.x+=-r*l-n,s.y+=-o*l-a,function(){e.begin(),e.moveTo(p.x,p.y),e.lineTo(p.x-r-o/t,p.y-o+r/t),i!=mxConstants.ARROW_CLASSIC&&i!=mxConstants.ARROW_CLASSIC_THIN||e.lineTo(p.x-3*r/4,p.y-3*o/4),e.lineTo(p.x+o/t-r,p.y-o-r/t),e.close(),u?e.fillAndStroke():e.stroke()}}}function e(t){return t=null!=t?t:2,function(e,n,i,s,r,o,l,a,h,u){n=r*h*1.118,i=o*h*1.118,r*=l+h,o*=l+h;var p=s.clone();return p.x-=n,p.y-=i,s.x+=2*-n,s.y+=2*-i,function(){e.begin(),e.moveTo(p.x-r-o/t,p.y-o+r/t),e.lineTo(p.x,p.y),e.lineTo(p.x+o/t-r,p.y-o-r/t),e.stroke()}}}function n(t,e,n,i,s,r,o,l,a,h){l=n==mxConstants.ARROW_DIAMOND?.7071:.9862,e=s*a*l,l*=r*a,s*=o+a,r*=o+a;var u=i.clone();u.x-=e,u.y-=l,i.x+=-s-e,i.y+=-r-l;var p=n==mxConstants.ARROW_DIAMOND?2:3.4;return function(){t.begin(),t.moveTo(u.x,u.y),t.lineTo(u.x-s/2-r/p,u.y+s/p-r/2),t.lineTo(u.x-s,u.y-r),t.lineTo(u.x-s/2+r/p,u.y-r/2-s/p),t.close(),h?t.fillAndStroke():t.stroke()}}mxMarker.addMarker("classic",t(2)),mxMarker.addMarker("classicThin",t(3)),mxMarker.addMarker("block",t(2)),mxMarker.addMarker("blockThin",t(3)),mxMarker.addMarker("open",e(2)),mxMarker.addMarker("openThin",e(3)),mxMarker.addMarker("oval",(function(t,e,n,i,s,r,o,l,a,h){var u=o/2,p=i.clone();return i.x-=s*u,i.y-=r*u,function(){t.ellipse(p.x-u,p.y-u,o,o),h?t.fillAndStroke():t.stroke()}})),mxMarker.addMarker("diamond",n),mxMarker.addMarker("diamondThin",n)}(),mxUtils.extend(mxActor,mxShape),mxActor.prototype.paintVertexShape=function(t,e,n,i,s){t.translate(e,n),t.begin(),this.redrawPath(t,e,n,i,s),t.fillAndStroke()},mxActor.prototype.redrawPath=function(t,e,n,i,s){e=i/3,t.moveTo(0,s),t.curveTo(0,3*s/5,0,2*s/5,i/2,2*s/5),t.curveTo(i/2-e,2*s/5,i/2-e,0,i/2,0),t.curveTo(i/2+e,0,i/2+e,2*s/5,i/2,2*s/5),t.curveTo(i,2*s/5,i,3*s/5,i,s),t.close()},mxUtils.extend(mxCloud,mxActor),mxCloud.prototype.redrawPath=function(t,e,n,i,s){t.moveTo(.25*i,.25*s),t.curveTo(.05*i,.25*s,0,.5*s,.16*i,.55*s),t.curveTo(0,.66*s,.18*i,.9*s,.31*i,.8*s),t.curveTo(.4*i,s,.7*i,s,.8*i,.8*s),t.curveTo(i,.8*s,i,.6*s,.875*i,.5*s),t.curveTo(i,.3*s,.8*i,.1*s,.625*i,.2*s),t.curveTo(.5*i,.05*s,.3*i,.05*s,.25*i,.25*s),t.close()},mxUtils.extend(mxRectangleShape,mxShape),mxRectangleShape.prototype.isHtmlAllowed=function(){var t=!0;return null!=this.style&&(t="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")),!this.isRounded&&!this.glass&&0==this.rotation&&(t||null!=this.fill&&this.fill!=mxConstants.NONE)},mxRectangleShape.prototype.paintBackground=function(t,e,n,i,s){var r=!0;null!=this.style&&(r="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")),(r||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)&&(r||null!=this.fill&&this.fill!=mxConstants.NONE||(t.pointerEvents=!1),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?r=Math.min(i/2,Math.min(s/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(r=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,r=Math.min(i*r,s*r)),t.roundrect(e,n,i,s,r,r)):t.rect(e,n,i,s),t.fillAndStroke())},mxRectangleShape.prototype.isRoundable=function(t,e,n,i,s){return!0},mxRectangleShape.prototype.paintForeground=function(t,e,n,i,s){this.glass&&!this.outline&&null!=this.fill&&this.fill!=mxConstants.NONE&&this.paintGlassEffect(t,e,n,i,s,this.getArcSize(i+this.strokewidth,s+this.strokewidth))},mxUtils.extend(mxEllipse,mxShape),mxEllipse.prototype.paintVertexShape=function(t,e,n,i,s){t.ellipse(e,n,i,s),t.fillAndStroke()},mxUtils.extend(mxDoubleEllipse,mxShape),mxDoubleEllipse.prototype.vmlScale=10,mxDoubleEllipse.prototype.paintBackground=function(t,e,n,i,s){t.ellipse(e,n,i,s),t.fillAndStroke()},mxDoubleEllipse.prototype.paintForeground=function(t,e,n,i,s){if(!this.outline){var r=mxUtils.getValue(this.style,mxConstants.STYLE_MARGIN,Math.min(3+this.strokewidth,Math.min(i/5,s/5)));s-=2*r,0<(i-=2*r)&&0
"));a=!mxUtils.isNode(this.value)&&this.replaceLinefeeds&&"html"==l?a.replace(/\n/g,"
"):a;var h=this.textDirection;h!=mxConstants.TEXT_DIRECTION_AUTO||o||(h=this.getAutoDirection()),h!=mxConstants.TEXT_DIRECTION_LTR&&h!=mxConstants.TEXT_DIRECTION_RTL&&(h=null),t.text(i,s,r,n,a,this.align,this.valign,this.wrap,l,this.overflow,this.clipped,this.getTextRotation(),h)}},mxText.prototype.redraw=function(){if(this.visible&&this.checkBounds()&&this.cacheEnabled&&this.lastValue==this.value&&(mxUtils.isNode(this.value)||this.dialect==mxConstants.DIALECT_STRICTHTML))if("DIV"!=this.node.nodeName||!this.isHtmlAllowed()&&mxClient.IS_VML){var t=this.createCanvas();null!=t&&null!=t.updateText?(t.pointerEvents=this.pointerEvents,this.paint(t,!0),this.destroyCanvas(t),this.updateBoundingBox()):mxShape.prototype.redraw.apply(this,arguments)}else mxClient.IS_SVG?this.redrawHtmlShapeWithCss3():(this.updateSize(this.node,null==this.state||null==this.state.view.textDiv),mxClient.IS_IE&&(null==document.documentMode||8>=document.documentMode)?this.updateHtmlFilter():this.updateHtmlTransform()),this.updateBoundingBox();else mxShape.prototype.redraw.apply(this,arguments),mxUtils.isNode(this.value)||this.dialect==mxConstants.DIALECT_STRICTHTML?this.lastValue=this.value:this.lastValue=null},mxText.prototype.resetStyles=function(){mxShape.prototype.resetStyles.apply(this,arguments),this.color="black",this.align=mxConstants.ALIGN_CENTER,this.valign=mxConstants.ALIGN_MIDDLE,this.family=mxConstants.DEFAULT_FONTFAMILY,this.size=mxConstants.DEFAULT_FONTSIZE,this.fontStyle=mxConstants.DEFAULT_FONTSTYLE,this.spacingLeft=this.spacingBottom=this.spacingRight=this.spacingTop=this.spacing=2,this.horizontal=!0,delete this.background,delete this.border,this.textDirection=mxConstants.DEFAULT_TEXT_DIRECTION,delete this.margin},mxText.prototype.apply=function(t){var e=this.spacing;mxShape.prototype.apply.apply(this,arguments),null!=this.style&&(this.fontStyle=mxUtils.getValue(this.style,mxConstants.STYLE_FONTSTYLE,this.fontStyle),this.family=mxUtils.getValue(this.style,mxConstants.STYLE_FONTFAMILY,this.family),this.size=mxUtils.getValue(this.style,mxConstants.STYLE_FONTSIZE,this.size),this.color=mxUtils.getValue(this.style,mxConstants.STYLE_FONTCOLOR,this.color),this.align=mxUtils.getValue(this.style,mxConstants.STYLE_ALIGN,this.align),this.valign=mxUtils.getValue(this.style,mxConstants.STYLE_VERTICAL_ALIGN,this.valign),this.spacing=parseInt(mxUtils.getValue(this.style,mxConstants.STYLE_SPACING,this.spacing)),this.spacingTop=parseInt(mxUtils.getValue(this.style,mxConstants.STYLE_SPACING_TOP,this.spacingTop-e))+this.spacing,this.spacingRight=parseInt(mxUtils.getValue(this.style,mxConstants.STYLE_SPACING_RIGHT,this.spacingRight-e))+this.spacing,this.spacingBottom=parseInt(mxUtils.getValue(this.style,mxConstants.STYLE_SPACING_BOTTOM,this.spacingBottom-e))+this.spacing,this.spacingLeft=parseInt(mxUtils.getValue(this.style,mxConstants.STYLE_SPACING_LEFT,this.spacingLeft-e))+this.spacing,this.horizontal=mxUtils.getValue(this.style,mxConstants.STYLE_HORIZONTAL,this.horizontal),this.background=mxUtils.getValue(this.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,this.background),this.border=mxUtils.getValue(this.style,mxConstants.STYLE_LABEL_BORDERCOLOR,this.border),this.textDirection=mxUtils.getValue(this.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION),this.opacity=mxUtils.getValue(this.style,mxConstants.STYLE_TEXT_OPACITY,100),this.updateMargin()),this.flipH=this.flipV=null},mxText.prototype.getAutoDirection=function(){var t=/[A-Za-z\u05d0-\u065f\u066a-\u06ef\u06fa-\u07ff\ufb1d-\ufdff\ufe70-\ufefc]/.exec(this.value);return null!=t&&0
"),this.replaceLinefeeds?t.replace(/\n/g,"
"):t},mxText.prototype.getTextCss=function(){var t="display: inline-block; font-size: "+this.size+"px; font-family: "+this.family+"; color: "+this.color+"; line-height: "+(mxConstants.ABSOLUTE_LINE_HEIGHT?this.size*mxConstants.LINE_HEIGHT+"px":mxConstants.LINE_HEIGHT)+"; pointer-events: "+(this.pointerEvents?"all":"none")+"; ";(this.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(t+="font-weight: bold; "),(this.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(t+="font-style: italic; ");var e=[];return(this.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&e.push("underline"),(this.fontStyle&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&e.push("line-through"),0=document.documentMode)?this.updateHtmlFilter():this.updateHtmlTransform()}},mxText.prototype.redrawHtmlShapeWithCss3=function(){var t=Math.max(0,Math.round(this.bounds.width/this.scale)),e=Math.max(0,Math.round(this.bounds.height/this.scale)),n="position: absolute; left: "+Math.round(this.bounds.x)+"px; top: "+Math.round(this.bounds.y)+"px; pointer-events: none; ",i=this.getTextCss()+(this.pointerEvents?"pointer-events: all; ":"");mxSvgCanvas2D.createCss(t,e,this.align,this.valign,this.wrap,this.overflow,this.clipped,null!=this.background?mxUtils.htmlEntities(this.background):null,null!=this.border?mxUtils.htmlEntities(this.border):null,n,i,this.scale,mxUtils.bind(this,(function(t,e,n,i,s,r){t=this.getTextRotation(),""!=(t=(1!=this.scale?"scale("+this.scale+") ":"")+(0!=t?"rotate("+t+"deg) ":"")+(0!=this.margin.x||0!=this.margin.y?"translate("+100*this.margin.x+"%,"+100*this.margin.y+"%)":""))&&(t="transform-origin: 0 0; transform: "+t+"; "),""==r?(n+=i,i="display:inline-block; min-width: 100%; "+t):i+=t,100>this.opacity&&(s+="opacity: "+this.opacity/100+"; "),this.node.setAttribute("style",n),n=mxUtils.isNode(this.value)?this.value.outerHTML:this.getHtmlValue(),null==this.node.firstChild&&(this.node.innerHTML="
"+n+"
"),this.node.firstChild.firstChild.setAttribute("style",s),this.node.firstChild.setAttribute("style",i)})))},mxText.prototype.updateHtmlTransform=function(){var t=this.getTextRotation(),e=this.node.style,n=this.margin.x,i=this.margin.y;0!=t?(mxUtils.setPrefixedStyle(e,"transformOrigin",100*-n+"% "+100*-i+"%"),mxUtils.setPrefixedStyle(e,"transform","translate("+100*n+"%,"+100*i+"%) scale("+this.scale+") rotate("+t+"deg)")):(mxUtils.setPrefixedStyle(e,"transformOrigin","0% 0%"),mxUtils.setPrefixedStyle(e,"transform","scale("+this.scale+") translate("+100*n+"%,"+100*i+"%)")),e.left=Math.round(this.bounds.x-Math.ceil(n*("fill"!=this.overflow&&"width"!=this.overflow?3:1)))+"px",e.top=Math.round(this.bounds.y-i*("fill"!=this.overflow?3:1))+"px",e.opacity=100>this.opacity?this.opacity/100:""},mxText.prototype.updateInnerHtml=function(t){if(mxUtils.isNode(this.value))t.innerHTML=this.value.outerHTML;else{var e=this.value;this.dialect!=mxConstants.DIALECT_STRICTHTML&&(e=mxUtils.htmlEntities(e,!1)),e=mxUtils.replaceTrailingNewlines(e,"
 
"),e=this.replaceLinefeeds?e.replace(/\n/g,"
"):e,t.innerHTML='
'+e+"
"}},mxText.prototype.updateHtmlFilter=function(){var t=this.node.style,e=this.margin.x,n=this.margin.y,i=this.scale;mxUtils.setOpacity(this.node,this.opacity);var s,r=0,o=null!=this.state?this.state.view.textDiv:null,l=this.node;if(null!=o){o.style.overflow="",o.style.height="",o.style.width="",this.updateFont(o),this.updateSize(o,!1),this.updateInnerHtml(o);var a=Math.round(this.bounds.width/this.scale);this.wrap&&0(h%=2*Math.PI)&&(h+=2*Math.PI),(h%=Math.PI)>Math.PI/2&&(h=Math.PI-h);l=Math.cos(h);var u=Math.sin(-h),p=(e=a*-(e+.5),o*-(n+.5));0!=h&&(n="progid:DXImageTransform.Microsoft.Matrix(M11="+s+", M12="+r+", M21="+-r+", M22="+s+", sizingMethod='auto expand')",t.filter=null!=t.filter&&0
"),t=this.replaceLinefeeds?t.replace(/\n/g,"
"):t;var e=null!=this.background&&this.background!=mxConstants.NONE?this.background:null,n=null!=this.border&&this.border!=mxConstants.NONE?this.border:null;if("fill"==this.overflow||"width"==this.overflow)null!=e&&(this.node.style.backgroundColor=e),null!=n&&(this.node.style.border="1px solid "+n);else{var i="";null!=e&&(i+="background-color:"+mxUtils.htmlEntities(e)+";"),null!=n&&(i+="border:1px solid "+mxUtils.htmlEntities(n)+";"),t='
'+t+"
"}this.node.innerHTML=t,0<(t=this.node.getElementsByTagName("div")).length&&((e=this.textDirection)==mxConstants.TEXT_DIRECTION_AUTO&&this.dialect!=mxConstants.DIALECT_STRICTHTML&&(e=this.getAutoDirection()),e==mxConstants.TEXT_DIRECTION_LTR||e==mxConstants.TEXT_DIRECTION_RTL?t[t.length-1].setAttribute("dir",e):t[t.length-1].removeAttribute("dir"))}},mxText.prototype.updateFont=function(t){(t=t.style).lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?this.size*mxConstants.LINE_HEIGHT+"px":mxConstants.LINE_HEIGHT,t.fontSize=this.size+"px",t.fontFamily=this.family,t.verticalAlign="top",t.color=this.color,t.fontWeight=(this.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?"bold":"",t.fontStyle=(this.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?"italic":"";var e=[];(this.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&e.push("underline"),(this.fontStyle&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&e.push("line-through"),t.textDecoration=e.join(" "),t.textAlign=this.align==mxConstants.ALIGN_CENTER?"center":this.align==mxConstants.ALIGN_RIGHT?"right":"left"},mxText.prototype.updateSize=function(t,e){var n=Math.max(0,Math.round(this.bounds.width/this.scale)),i=Math.max(0,Math.round(this.bounds.height/this.scale)),s=t.style;if(this.clipped?(s.overflow="hidden",mxClient.IS_QUIRKS?s.width=n+"px":(s.maxHeight=i+"px",s.maxWidth=n+"px")):"fill"==this.overflow?(s.width=n+1+"px",s.height=i+1+"px",s.overflow="hidden"):"width"==this.overflow&&(s.width=n+1+"px",s.maxHeight=i+1+"px",s.overflow="hidden"),this.wrap&&0=document.documentMode)&&0!=this.rotation?mxClient.VML_PREFIX+":image":"img")).setAttribute("border","0"),t.style.position="absolute",t.src=this.image,e=100>this.opacity?"alpha(opacity="+this.opacity+")":"",this.node.style.filter=e,this.flipH&&this.flipV?e+="progid:DXImageTransform.Microsoft.BasicImage(rotation=2)":this.flipH?e+="progid:DXImageTransform.Microsoft.BasicImage(mirror=1)":this.flipV&&(e+="progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)"),t.style.filter!=e&&(t.style.filter=e),"image"==t.nodeName?t.style.rotation=this.rotation:0!=this.rotation?mxUtils.setPrefixedStyle(t.style,"transform","rotate("+this.rotation+"deg)"):mxUtils.setPrefixedStyle(t.style,"transform",""),t.style.width=this.node.style.width,t.style.height=this.node.style.height,this.node.style.backgroundImage="",this.node.appendChild(t)}else this.setTransparentBackgroundImage(this.node)},mxUtils.extend(mxLabel,mxRectangleShape),mxLabel.prototype.imageSize=mxConstants.DEFAULT_IMAGESIZE,mxLabel.prototype.spacing=2,mxLabel.prototype.indicatorSize=10,mxLabel.prototype.indicatorSpacing=2,mxLabel.prototype.init=function(t){mxShape.prototype.init.apply(this,arguments),null!=this.indicatorShape&&(this.indicator=new this.indicatorShape,this.indicator.dialect=this.dialect,this.indicator.init(this.node))},mxLabel.prototype.redraw=function(){null!=this.indicator&&(this.indicator.fill=this.indicatorColor,this.indicator.stroke=this.indicatorStrokeColor,this.indicator.gradient=this.indicatorGradientColor,this.indicator.direction=this.indicatorDirection),mxShape.prototype.redraw.apply(this,arguments)},mxLabel.prototype.isHtmlAllowed=function(){return mxRectangleShape.prototype.isHtmlAllowed.apply(this,arguments)&&null==this.indicatorColor&&null==this.indicatorShape},mxLabel.prototype.paintForeground=function(t,e,n,i,s){this.paintImage(t,e,n,i,s),this.paintIndicator(t,e,n,i,s),mxRectangleShape.prototype.paintForeground.apply(this,arguments)},mxLabel.prototype.paintImage=function(t,e,n,i,s){null!=this.image&&(e=this.getImageBounds(e,n,i,s),t.image(e.x,e.y,e.width,e.height,this.image,!1,!1,!1))},mxLabel.prototype.getImageBounds=function(t,e,n,i){var s=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_ALIGN,mxConstants.ALIGN_LEFT),r=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE),o=mxUtils.getNumber(this.style,mxConstants.STYLE_IMAGE_WIDTH,mxConstants.DEFAULT_IMAGESIZE),l=mxUtils.getNumber(this.style,mxConstants.STYLE_IMAGE_HEIGHT,mxConstants.DEFAULT_IMAGESIZE),a=mxUtils.getNumber(this.style,mxConstants.STYLE_SPACING,this.spacing)+5;return new mxRectangle(t=s==mxConstants.ALIGN_CENTER?t+(n-o)/2:s==mxConstants.ALIGN_RIGHT?t+(n-o-a):t+a,e=r==mxConstants.ALIGN_TOP?e+a:r==mxConstants.ALIGN_BOTTOM?e+(i-l-a):e+(i-l)/2,o,l)},mxLabel.prototype.paintIndicator=function(t,e,n,i,s){null!=this.indicator?(this.indicator.bounds=this.getIndicatorBounds(e,n,i,s),this.indicator.paint(t)):null!=this.indicatorImage&&(e=this.getIndicatorBounds(e,n,i,s),t.image(e.x,e.y,e.width,e.height,this.indicatorImage,!1,!1,!1))},mxLabel.prototype.getIndicatorBounds=function(t,e,n,i){var s=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_ALIGN,mxConstants.ALIGN_LEFT),r=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE),o=mxUtils.getNumber(this.style,mxConstants.STYLE_INDICATOR_WIDTH,this.indicatorSize),l=mxUtils.getNumber(this.style,mxConstants.STYLE_INDICATOR_HEIGHT,this.indicatorSize),a=this.spacing+5;return new mxRectangle(t=s==mxConstants.ALIGN_RIGHT?t+(n-o-a):s==mxConstants.ALIGN_CENTER?t+(n-o)/2:t+a,e=r==mxConstants.ALIGN_BOTTOM?e+(i-l-a):r==mxConstants.ALIGN_TOP?e+a:e+(i-l)/2,o,l)},mxLabel.prototype.redrawHtmlShape=function(){for(mxRectangleShape.prototype.redrawHtmlShape.apply(this,arguments);this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);if(null!=this.image){var t=document.createElement("img");t.style.position="relative",t.setAttribute("border","0");var e=this.getImageBounds(this.bounds.x,this.bounds.y,this.bounds.width,this.bounds.height);e.x-=this.bounds.x,e.y-=this.bounds.y,t.style.left=Math.round(e.x)+"px",t.style.top=Math.round(e.y)+"px",t.style.width=Math.round(e.width)+"px",t.style.height=Math.round(e.height)+"px",t.src=this.image,this.node.appendChild(t)}},mxUtils.extend(mxCylinder,mxShape),mxCylinder.prototype.maxHeight=40,mxCylinder.prototype.svgStrokeTolerance=0,mxCylinder.prototype.paintVertexShape=function(t,e,n,i,s){t.translate(e,n),t.begin(),this.redrawPath(t,e,n,i,s,!1),t.fillAndStroke(),this.outline&&null!=this.style&&0!=mxUtils.getValue(this.style,mxConstants.STYLE_BACKGROUND_OUTLINE,0)||(t.setShadow(!1),t.begin(),this.redrawPath(t,e,n,i,s,!0),t.stroke())},mxCylinder.prototype.getCylinderSize=function(t,e,n,i){return Math.min(this.maxHeight,Math.round(i/5))},mxCylinder.prototype.redrawPath=function(t,e,n,i,s,r){e=this.getCylinderSize(e,n,i,s),(r&&null!=this.fill||!r&&null==this.fill)&&(t.moveTo(0,e),t.curveTo(0,2*e,i,2*e,i,e),r||(t.stroke(),t.begin())),r||(t.moveTo(0,e),t.curveTo(0,-e/3,i,-e/3,i,e),t.lineTo(i,s-e),t.curveTo(i,s+e/3,0,s+e/3,0,s-e),t.close())},mxUtils.extend(mxConnector,mxPolyline),mxConnector.prototype.updateBoundingBox=function(){this.useSvgBoundingBox=null!=this.style&&1==this.style[mxConstants.STYLE_CURVED],mxShape.prototype.updateBoundingBox.apply(this,arguments)},mxConnector.prototype.paintEdgeShape=function(t,e){var n=this.createMarker(t,e,!0),i=this.createMarker(t,e,!1);mxPolyline.prototype.paintEdgeShape.apply(this,arguments),t.setFillColor(this.stroke),t.setShadow(!1),t.setDashed(!1),null!=n&&n(),null!=i&&i()},mxConnector.prototype.createMarker=function(t,e,n){var i=null,s=e.length,r=mxUtils.getValue(this.style,n?mxConstants.STYLE_STARTARROW:mxConstants.STYLE_ENDARROW),o=n?e[1]:e[s-2],l=n?e[0]:e[s-1];if(null!=r&&null!=o&&null!=l){for(i=1;it.weightedValue?-1:e.weightedValuen)break;o=a}}r=s.getIndex(t),r=Math.max(0,e-(e>r?1:0)),i.add(s,t,r)}},mxStackLayout.prototype.getParentSize=function(t){var e=this.graph.getModel(),n=e.getGeometry(t);return null!=this.graph.container&&(null==n&&e.isLayer(t)||t==this.graph.getView().currentRoot)&&(n=new mxRectangle(0,0,this.graph.container.offsetWidth-1,this.graph.container.offsetHeight-1)),n},mxStackLayout.prototype.getLayoutCells=function(t){for(var e=this.graph.getModel(),n=e.getChildCount(t),i=[],s=0;si.y>0?1:-1}))),i},mxStackLayout.prototype.snap=function(t){if(null!=this.gridSize&&0this.gridSize/2?this.gridSize-e:-e}return t},mxStackLayout.prototype.execute=function(t){if(null!=t){var e=this.getParentSize(t),n=this.isHorizontal(),i=this.graph.getModel(),s=null;null!=e&&(s=n?e.height-this.marginTop-this.marginBottom:e.width-this.marginLeft-this.marginRight);s=s-2*this.border;var r=this.x0+this.border+this.marginLeft,o=this.y0+this.border+this.marginTop;if(this.graph.isSwimlane(t)){var l=this.graph.getCellStyle(t),a=mxUtils.getNumber(l,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);l=1==mxUtils.getValue(l,mxConstants.STYLE_HORIZONTAL,!0);null!=e&&(a=l?Math.min(a,e.height):Math.min(a,e.width)),n==l&&(s-=a),l?o+=a:r+=a}i.beginUpdate();try{a=0,l=null;for(var h=0,u=null,p=this.getLayoutCells(t),d=0;dthis.wrap||!n&&l.y+l.height+m.height+2*this.spacing>this.wrap)&&(l=null,n?o+=a+this.spacing:r+=a+this.spacing,a=0);a=Math.max(a,n?m.height:m.width);var g=0;if(!this.borderCollapse){var x=this.graph.getCellStyle(c);g=mxUtils.getNumber(x,mxConstants.STYLE_STROKEWIDTH,1)}if(null!=l){var y=h+this.spacing+Math.floor(g/2);n?m.x=this.snap((this.allowGaps?Math.max(y,m.x):y)-this.marginLeft)+this.marginLeft:m.y=this.snap((this.allowGaps?Math.max(y,m.y):y)-this.marginTop)+this.marginTop}else this.keepFirstLocation||(n?m.x=this.allowGaps&&m.x>r?Math.max(this.snap(m.x-this.marginLeft)+this.marginLeft,r):r:m.y=this.allowGaps&&m.y>o?Math.max(this.snap(m.y-this.marginTop)+this.marginTop,o):o);n?m.y=o:m.x=r,this.fill&&null!=s&&(n?m.height=s:m.width=s),n?m.width=this.snap(m.width):m.height=this.snap(m.height),this.setChildGeometry(c,m),u=c,l=m,h=n?l.x+l.width+Math.floor(g/2):l.y+l.height+Math.floor(g/2)}}this.resizeParent&&null!=e&&null!=l&&!this.graph.isCellCollapsed(t)?this.updateParentGeometry(t,e,l):this.resizeLast&&null!=e&&null!=l&&null!=u&&(n?l.width=e.width-l.x-this.spacing-this.marginRight-this.marginLeft:l.height=e.height-l.y-this.spacing-this.marginBottom,this.setChildGeometry(u,l))}finally{i.endUpdate()}}},mxStackLayout.prototype.setChildGeometry=function(t,e){var n=this.graph.getCellGeometry(t);null!=n&&e.x==n.x&&e.y==n.y&&e.width==n.width&&e.height==n.height||this.graph.getModel().setGeometry(t,e)},mxStackLayout.prototype.updateParentGeometry=function(t,e,n){var i=this.isHorizontal(),s=this.graph.getModel(),r=e.clone();i?(n=n.x+n.width+this.marginRight+this.border,r.width=this.resizeParentMax?Math.max(r.width,n):n):(n=n.y+n.height+this.marginBottom+this.border,r.height=this.resizeParentMax?Math.max(r.height,n):n),e.x==r.x&&e.y==r.y&&e.width==r.width&&e.height==r.height||s.setGeometry(t,r)},mxPartitionLayout.prototype=new mxGraphLayout,mxPartitionLayout.prototype.constructor=mxPartitionLayout,mxPartitionLayout.prototype.horizontal=null,mxPartitionLayout.prototype.spacing=null,mxPartitionLayout.prototype.border=null,mxPartitionLayout.prototype.resizeVertices=!0,mxPartitionLayout.prototype.isHorizontal=function(){return this.horizontal},mxPartitionLayout.prototype.moveCell=function(t,e,n){var i=(n=this.graph.getModel()).getParent(t);if(null!=t&&null!=i){var s,r=0,o=n.getChildCount(i);for(s=0;se)break;r=l}}e=i.getIndex(t),e=Math.max(0,s-(s>e?1:0)),n.add(i,t,e)}},mxPartitionLayout.prototype.execute=function(t){var e=this.isHorizontal(),n=this.graph.getModel(),i=n.getGeometry(t);if(null!=this.graph.container&&(null==i&&n.isLayer(t)||t==this.graph.getView().currentRoot)&&(i=new mxRectangle(0,0,this.graph.container.offsetWidth-1,this.graph.container.offsetHeight-1)),null!=i){for(var s=[],r=n.getChildCount(t),o=0;ol.x&&(i=Math.abs(r-l.x)),0>l.y&&(a=Math.abs(o-l.y)),0==i&&0==a||this.moveNode(this.node,i,a),this.resizeParent&&this.adjustParents(),this.edgeRouting&&this.localEdgeProcessing(this.node)}null!=this.parentX&&null!=this.parentY&&(null!=(s=this.graph.getCellGeometry(t))&&((s=s.clone()).x=this.parentX,s.y=this.parentY,n.setGeometry(t,s)))}}finally{n.endUpdate()}}},mxCompactTreeLayout.prototype.moveNode=function(t,e,n){for(t.x+=e,t.y+=n,this.apply(t),t=t.child;null!=t;)this.moveNode(t,e,n),t=t.next},mxCompactTreeLayout.prototype.sortOutgoingEdges=function(t,e){var n=new mxDictionary;e.sort((function(e,i){var s=e.getTerminal(e.getTerminal(!1)==t),r=n.get(s);null==r&&(r=mxCellPath.create(s).split(mxCellPath.PATH_SEPARATOR),n.put(s,r));s=i.getTerminal(i.getTerminal(!1)==t);var o=n.get(s);return null==o&&(o=mxCellPath.create(s).split(mxCellPath.PATH_SEPARATOR),n.put(s,o)),mxCellPath.compare(r,o)}))},mxCompactTreeLayout.prototype.findRankHeights=function(t,e){(null==this.maxRankHeight[e]||this.maxRankHeight[e]t.height&&(t.height=this.maxRankHeight[e]);for(var n=t.child;null!=n;)this.setCellHeights(n,e+1),n=n.next},mxCompactTreeLayout.prototype.dfs=function(t,e){var n=mxCellPath.create(t),i=null;if(null!=t&&null==this.visited[n]&&!this.isVertexIgnored(t)){this.visited[n]=t;i=this.createNode(t),n=this.graph.getModel();var s=null,r=this.graph.getEdges(t,e,this.invert,!this.invert,!1,!0),o=this.graph.getView();this.sortEdges&&this.sortOutgoingEdges(t,r);for(var l=0;l=t+n?0:0<(t=0t?t*i/n-e:0t+n?(n+t)*r/s-(e+i):r-(e+i))?t:0},mxCompactTreeLayout.prototype.bridge=function(t,e,n,i,s,r){return e=s+i.dx-e,0==i.dx?s=i.dy:(s=e*i.dy,s/=i.dx),e=this.createLine(e,s,i.next),t.next=this.createLine(0,r+i.dy-s-n,e),e},mxCompactTreeLayout.prototype.createNode=function(t){var e={};return e.cell=t,e.x=0,e.y=0,e.width=0,e.height=0,null!=(t=this.getVertexBounds(t))&&(this.isHorizontal()?(e.width=t.height,e.height=t.width):(e.width=t.width,e.height=t.height)),e.offsetX=0,e.offsetY=0,e.contour={},e},mxCompactTreeLayout.prototype.apply=function(t,e){var n=this.graph.getModel(),i=t.cell,s=n.getGeometry(i);return null!=i&&null!=s&&(this.isVertexMovable(i)&&(s=this.setVertexLocation(i,t.x,t.y),this.resizeParent&&(n=n.getParent(i),i=mxCellPath.create(n),null==this.parentsChanged[i]&&(this.parentsChanged[i]=n))),e=null==e?new mxRectangle(s.x,s.y,s.width,s.height):new mxRectangle(Math.min(e.x,s.x),Math.min(e.y,s.y),Math.max(e.x+e.width,s.x+s.width),Math.max(e.y+e.height,s.y+s.height))),e},mxCompactTreeLayout.prototype.createLine=function(t,e,n){var i={};return i.dx=t,i.dy=e,i.next=n,i},mxCompactTreeLayout.prototype.adjustParents=function(){var t,e=[];for(t in this.parentsChanged)e.push(this.parentsChanged[t]);this.arrangeGroups(mxUtils.sortCells(e,!0),this.groupPadding,this.groupPaddingTop,this.groupPaddingRight,this.groupPaddingBottom,this.groupPaddingLeft)},mxCompactTreeLayout.prototype.localEdgeProcessing=function(t){for(this.processNodeOutgoing(t),t=t.child;null!=t;)this.localEdgeProcessing(t),t=t.next},mxCompactTreeLayout.prototype.processNodeOutgoing=function(t){for(var e=t.child,n=t.cell,i=0,s=[];null!=e;){i++;var r=e.x;this.horizontal&&(r=e.y),s.push(new WeightedCellSorter(e,r)),e=e.next}s.sort(WeightedCellSorter.prototype.compare),(r=t.width)>(o=(i+1)*this.prefHozEdgeSep)+2*this.prefHozEdgeSep&&(r-=2*this.prefHozEdgeSep),e=(t=r/i)/2,r>o+2*this.prefHozEdgeSep&&(e+=this.prefHozEdgeSep);r=this.minEdgeJetty-this.prefVertEdgeOff;for(var o=this.getVertexBounds(n),l=0;li/2&&(r-=this.prefVertEdgeOff),e+=t}},mxUtils.extend(mxRadialTreeLayout,mxCompactTreeLayout),mxRadialTreeLayout.prototype.angleOffset=.5,mxRadialTreeLayout.prototype.rootx=0,mxRadialTreeLayout.prototype.rooty=0,mxRadialTreeLayout.prototype.levelDistance=120,mxRadialTreeLayout.prototype.nodeDistance=10,mxRadialTreeLayout.prototype.autoRadius=!1,mxRadialTreeLayout.prototype.sortEdges=!1,mxRadialTreeLayout.prototype.rowMinX=[],mxRadialTreeLayout.prototype.rowMaxX=[],mxRadialTreeLayout.prototype.rowMinCenX=[],mxRadialTreeLayout.prototype.rowMaxCenX=[],mxRadialTreeLayout.prototype.rowRadi=[],mxRadialTreeLayout.prototype.row=[],mxRadialTreeLayout.prototype.isVertexIgnored=function(t){return mxGraphLayout.prototype.isVertexIgnored.apply(this,arguments)||0==this.graph.getConnections(t).length},mxRadialTreeLayout.prototype.execute=function(t,e){this.parent=t,this.edgeRouting=this.useBoundingBox=!1,mxCompactTreeLayout.prototype.execute.apply(this,arguments);var n=null,i=this.getVertexBounds(this.root);for(var s in this.centerX=i.x+i.width/2,this.centerY=i.y+i.height/2,this.visited){var r=this.getVertexBounds(this.visited[s]);(n=null!=n?n:r.clone()).add(r)}this.calcRowDims([this.node],0);var o=0,l=0;for(n=0;ni.theta&&sthis.forceConstant&&(this.forceConstant=.001),this.forceConstantSquared=this.forceConstant*this.forceConstant,i=0;i(n=Math.sqrt(this.dispX[t]*this.dispX[t]+this.dispY[t]*this.dispY[t]))&&(n=.001);var e=this.dispX[t]/n*Math.min(n,this.temperature),n=this.dispY[t]/n*Math.min(n,this.temperature);this.dispX[t]=0,this.dispY[t]=0,this.cellLocation[t][0]+=e,this.cellLocation[t][1]+=n}},mxFastOrganicLayout.prototype.calcAttraction=function(){for(var t=0;tthis.maxDistanceLimit||(o(t=mxObjectIdentity.get(t))?t+"-"+n:n+"-"+t:null},mxParallelEdgeLayout.prototype.layout=function(t){var e=t[0],n=this.graph.getView(),i=(r=this.graph.getModel()).getGeometry(n.getVisibleTerminal(e,!0));if(i==(r=r.getGeometry(n.getVisibleTerminal(e,!1)))){e=i.x+i.width+this.spacing,n=i.y+i.height/2;for(var s=0;s=l.length){a=new mxGraphHierarchyEdge(l);for(var h=0;hmxUtils.indexOf(n[s].connectsAsSource,a)&&n[s].connectsAsSource.push(a)}}}n[s].temp[0]=0}},mxGraphHierarchyModel.prototype.initialRank=function(){var t=[];if(null!=this.roots)for(var e=0;en.maxRank&&0>n.minRank&&(t[n.temp[0]].push(n),n.maxRank=n.temp[0],n.minRank=n.temp[0],n.temp[0]=t[n.maxRank].length-1),null!=e&&null!=i&&1=a.length){h=new mxGraphHierarchyEdge(a);for(var u=0;umxUtils.indexOf(n[r].connectsAsSource,h)&&n[r].connectsAsSource.push(h)}}}n[r].temp[0]=0}},mxSwimlaneModel.prototype.initialRank=function(){this.ranksPerGroup=[];var t=[],e={};if(null!=this.roots)for(var n=0;ne[i.swimlaneIndex]&&(l=e[i.swimlaneIndex]),i.temp[0]=l,null!=r)for(n=0;nn.maxRank&&0>n.minRank&&(t[n.temp[0]].push(n),n.maxRank=n.temp[0],n.minRank=n.temp[0],n.temp[0]=t[n.maxRank].length-1),null!=e&&null!=i&&1>1];return n},mxMedianHybridCrossingReduction.prototype.transpose=function(t,e){for(var n=!0,i=0;n&&10>i++;)for(var s=1==t%2&&1==i%2,r=(n=!1,0);ru&&(u=a),l[u]=h}var p,d,c,m=null,g=null,x=null,y=null,f=null;for(a=0;ax[S]&&E++,p[v]y[S]&&E++,d[v]t.medianValue?-1:e.medianValuex+1&&(a==i[l].length-1?(s.setGeneralPurposeVariable(l,y),p=!0):(x=(x=(a=i[l][a+1]).getGeneralPurposeVariable(l))-a.width/2-this.intraCellSpacing-s.width/2)>y?(s.setGeneralPurposeVariable(l,y),p=!0):x>s.getGeneralPurposeVariable(l)+1&&(s.setGeneralPurposeVariable(l,x),p=!0)),p){for(s=0;s=o&&a<=d?l.setGeneralPurposeVariable(t,a):ad&&(l.setGeneralPurposeVariable(t,d),this.currentXDelta+=a-d),i[r].visited=!0}},mxCoordinateAssignment.prototype.calculatedWeightedValue=function(t,e){for(var n=0,i=0;ithis.widestRankValue&&(this.widestRankValue=l,this.widestRank=s),this.rankWidths[s]=l}for(1==a&&mxLog.warn("At least one cell has no bounds"),this.rankY[s]=n,l=r/2+i/2+this.interRankCellSpacing,i=r,n=this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_WEST?n+l:n-l,h=0;hs.maxRank-s.minRank-1)){for(var r=s.getGeneralPurposeVariable(s.minRank+1),o=!0,l=0,a=s.minRank+2;as.minRank+1;a--)p==(d=s.getX(a-1))||this.repositionValid(e,s,a-1,p)?(u[a-s.minRank-2]=p,o++):(u[a-s.minRank-2]=s.getX(a-1),p=d);if(o>l||r>l)if(o>=r)for(a=s.maxRank-2;a>s.minRank;a--)s.setX(a,u[a-s.minRank-1]);else if(r>o)for(a=s.minRank+2;as)return!1;if(i<(r=e.getGeneralPurposeVariable(n))){if(0==s)return!0;if(!((n=(n=(t=t[s-1]).getGeneralPurposeVariable(n))+t.width/2+this.intraCellSpacing+e.width/2)<=i))return!1}else if(i>r){if(s==t.length-1)return!0;if(!((n=(n=(t=t[s+1]).getGeneralPurposeVariable(n))-t.width/2-this.intraCellSpacing-e.width/2)>=i))return!1}return!0},mxCoordinateAssignment.prototype.setCellLocations=function(t,e){this.rankTopY=[],this.rankBottomY=[];for(var n=0;nl;l++){if(-1(r+1)*this.prefHozEdgeSep+2*this.prefHozEdgeSep&&(u+=this.prefHozEdgeSep,p-=this.prefHozEdgeSep),u+=(a=(p-u)/r)/2,p=this.minEdgeJetty-this.prefVertEdgeOff,h=0;hr/2&&(p-=this.prefVertEdgeOff),c=0;co&&(o=a,r=l)}}0==n.length&&null!=r&&n.push(r)}return n},mxHierarchicalLayout.prototype.getEdges=function(t){if(null!=(n=this.edgesCache.get(t)))return n;for(var e=this.graph.model,n=[],i=this.graph.isCellCollapsed(t),s=e.getChildCount(t),r=0;re.length)){if(null==t&&(t=n.getParent(e[0])),this.parentY=this.parentX=null,t!=this.root&&null!=n.isVertex(t)&&this.maintainParentLocation){var i=this.graph.getCellGeometry(t);null!=i&&(this.parentX=i.x,this.parentY=i.y)}this.swimlanes=e;for(var s=[],r=0;ro&&(o=a,r=l)}}0==n.length&&null!=r&&n.push(r)}return n},mxSwimlaneLayout.prototype.getEdges=function(t){if(null!=(n=this.edgesCache.get(t)))return n;for(var e=this.graph.model,n=[],i=this.graph.isCellCollapsed(t),s=e.getChildCount(t),r=0;r=this.swimlanes.length||!(u>l||(!e||d)&&u==l)||(s=this.traverse(p,e,a[n],i,s,r,o,u))}}return s},mxSwimlaneLayout.prototype.cycleStage=function(t){new mxSwimlaneOrdering(this).execute(t)},mxSwimlaneLayout.prototype.layeringStage=function(){this.model.initialRank(),this.model.fixRanks()},mxSwimlaneLayout.prototype.crossingStage=function(t){new mxMedianHybridCrossingReduction(this).execute(t)},mxSwimlaneLayout.prototype.placementStage=function(t,e){var n=new mxCoordinateAssignment(this,this.intraCellSpacing,this.interRankCellSpacing,this.orientation,t,this.parallelEdgeSpacing);return n.fineTuning=this.fineTuning,n.execute(e),n.limitX+this.interHierarchySpacing},mxGraphModel.prototype=new mxEventSource,mxGraphModel.prototype.constructor=mxGraphModel,mxGraphModel.prototype.root=null,mxGraphModel.prototype.cells=null,mxGraphModel.prototype.maintainEdgeParent=!0,mxGraphModel.prototype.ignoreRelativeEdgeParent=!0,mxGraphModel.prototype.createIds=!0,mxGraphModel.prototype.prefix="",mxGraphModel.prototype.postfix="",mxGraphModel.prototype.nextId=0,mxGraphModel.prototype.currentEdit=null,mxGraphModel.prototype.updateLevel=0,mxGraphModel.prototype.endingUpdate=!1,mxGraphModel.prototype.clear=function(){this.setRoot(this.createRoot())},mxGraphModel.prototype.isCreateIds=function(){return this.createIds},mxGraphModel.prototype.setCreateIds=function(t){this.createIds=t},mxGraphModel.prototype.createRoot=function(){var t=new mxCell;return t.insert(new mxCell),t},mxGraphModel.prototype.getCell=function(t){return null!=this.cells?this.cells[t]:null},mxGraphModel.prototype.filterCells=function(t,e){var n=null;if(null!=t){n=[];for(var i=0;imxUtils.indexOf(this.edges,t))&&(null==this.edges&&(this.edges=[]),this.edges.push(t)),t},mxCell.prototype.removeEdge=function(t,e){if(null!=t){if(t.getTerminal(!e)!=this&&null!=this.edges){var n=this.getEdgeIndex(t);0<=n&&this.edges.splice(n,1)}t.setTerminal(null,e)}return t},mxCell.prototype.removeFromTerminal=function(t){var e=this.getTerminal(t);null!=e&&e.removeEdge(this,t)},mxCell.prototype.hasAttribute=function(t){var e=this.getValue();return null!=e&&e.nodeType==mxConstants.NODETYPE_ELEMENT&&e.hasAttribute?e.hasAttribute(t):null!=e.getAttribute(t)},mxCell.prototype.getAttribute=function(t,e){var n;return null!=(n=null!=(n=this.getValue())&&n.nodeType==mxConstants.NODETYPE_ELEMENT?n.getAttribute(t):null)?n:e},mxCell.prototype.setAttribute=function(t,e){var n=this.getValue();null!=n&&n.nodeType==mxConstants.NODETYPE_ELEMENT&&n.setAttribute(t,e)},mxCell.prototype.clone=function(){var t=mxUtils.clone(this,this.mxTransient);return t.setValue(this.cloneValue()),t},mxCell.prototype.cloneValue=function(){var t=this.getValue();return null!=t&&("function"==typeof t.clone?t=t.clone():isNaN(t.nodeType)||(t=t.cloneNode(!0))),t},mxGeometry.prototype=new mxRectangle,mxGeometry.prototype.constructor=mxGeometry,mxGeometry.prototype.TRANSLATE_CONTROL_POINTS=!0,mxGeometry.prototype.alternateBounds=null,mxGeometry.prototype.sourcePoint=null,mxGeometry.prototype.targetPoint=null,mxGeometry.prototype.points=null,mxGeometry.prototype.offset=null,mxGeometry.prototype.relative=!1,mxGeometry.prototype.swap=function(){if(null!=this.alternateBounds){var t=new mxRectangle(this.x,this.y,this.width,this.height);this.x=this.alternateBounds.x,this.y=this.alternateBounds.y,this.width=this.alternateBounds.width,this.height=this.alternateBounds.height,this.alternateBounds=t}},mxGeometry.prototype.getTerminalPoint=function(t){return t?this.sourcePoint:this.targetPoint},mxGeometry.prototype.setTerminalPoint=function(t,e){return e?this.sourcePoint=t:this.targetPoint=t,t},mxGeometry.prototype.rotate=function(t,e){var n=mxUtils.toRadians(t),i=Math.cos(n);n=Math.sin(n);if(!this.relative){var s=new mxPoint(this.getCenterX(),this.getCenterY());s=mxUtils.getRotatedPoint(s,i,n,e);this.x=Math.round(s.x-this.width/2),this.y=Math.round(s.y-this.height/2)}if(null!=this.sourcePoint&&(s=mxUtils.getRotatedPoint(this.sourcePoint,i,n,e),this.sourcePoint.x=Math.round(s.x),this.sourcePoint.y=Math.round(s.y)),null!=this.targetPoint&&(s=mxUtils.getRotatedPoint(this.targetPoint,i,n,e),this.targetPoint.x=Math.round(s.x),this.targetPoint.y=Math.round(s.y)),null!=this.points)for(var r=0;re[s]?1:-1:i=(n=parseInt(t[s]))==(s=parseInt(e[s]))?0:n>s?1:-1;break}return 0==i&&((n=t.length)!=(s=e.length)&&(i=n>s?1:-1)),i}},mxPerimeter={RectanglePerimeter:function(t,e,n,i){e=t.getCenterX();var s=t.getCenterY(),r=Math.atan2(n.y-s,n.x-e),o=new mxPoint(0,0),l=Math.PI,a=Math.PI/2-r,h=Math.atan2(t.height,t.width);return r<-l+h||r>l-h?(o.x=t.x,o.y=s-t.width*Math.tan(r)/2):r<-h?(o.y=t.y,o.x=e-t.height*Math.tan(a)/2):r=t.x&&n.x<=t.x+t.width?o.x=n.x:n.y>=t.y&&n.y<=t.y+t.height&&(o.y=n.y),n.xt.x+t.width&&(o.x=t.x+t.width),n.yt.y+t.height&&(o.y=t.y+t.height)),o},EllipsePerimeter:function(t,e,n,i){var s=t.x,r=t.y,o=t.width/2,l=t.height/2,a=s+o,h=r+l;e=n.x,n=n.y;var u=parseInt(e-a),p=parseInt(n-h);if(0==u&&0!=p)return new mxPoint(a,h+l*p/Math.abs(p));if(0==u&&0==p)return new mxPoint(e,n);if(i){if(n>=r&&n<=r+t.height)return t=n-h,t=Math.sqrt(o*o*(1-t*t/(l*l)))||0,e<=s&&(t=-t),new mxPoint(a+t,n);if(e>=s&&e<=s+t.width)return t=e-a,t=Math.sqrt(l*l*(1-t*t/(o*o)))||0,n<=r&&(t=-t),new mxPoint(e,h+t)}return h-=(s=p/u)*a,a=(-(t=-2*a*(r=o*o*s*s+l*l))-(l=Math.sqrt(t*t-4*r*(o*o*s*s*a*a+l*l*a*a-o*o*l*l))))/(2*r),l=s*(o=(-t+l)/(2*r))+h,h=s*a+h,Math.sqrt(Math.pow(o-e,2)+Math.pow(l-n,2))n?s:s+t);if(l==n)return new mxPoint(o>a?e:e+r,l);var h=o,u=l;return i&&(a>=e&&a<=e+r?h=a:n>=s&&n<=s+t&&(u=n)),a-m&&cMath.PI-m)?n=i&&(s&&n.x>=u.x&&n.x<=d.x||!s&&n.y>=u.y&&n.y<=d.y)?s?new mxPoint(n.x,u.y):new mxPoint(u.x,n.y):e==mxConstants.DIRECTION_NORTH?new mxPoint(r+l/2+a*Math.tan(c)/2,o+a):e==mxConstants.DIRECTION_SOUTH?new mxPoint(r+l/2-a*Math.tan(c)/2,o):e==mxConstants.DIRECTION_WEST?new mxPoint(r+l,o+a/2+l*Math.tan(c)/2):new mxPoint(r,o+a/2-l*Math.tan(c)/2):(i&&(i=new mxPoint(t,h),n.y>=o&&n.y<=o+a?(i.x=s?t:e==mxConstants.DIRECTION_WEST?r+l:r,i.y=n.y):n.x>=r&&n.x<=r+l&&(i.x=n.x,i.y=s?e==mxConstants.DIRECTION_NORTH?o+a:o:h),t=i.x,h=i.y),n=s&&n.x<=r+l/2||!s&&n.y<=o+a/2?mxUtils.intersection(n.x,n.y,t,h,u.x,u.y,p.x,p.y):mxUtils.intersection(n.x,n.y,t,h,p.x,p.y,d.x,d.y)),null==n&&(n=new mxPoint(t,h)),n},HexagonPerimeter:function(t,e,n,i){var s=t.x,r=t.y,o=t.width,l=t.height,a=t.getCenterX();t=t.getCenterY();var h=n.x,u=n.y,p=-Math.atan2(u-t,h-a),d=Math.PI,c=Math.PI/2;new mxPoint(a,t);var m=(e=null!=e?mxUtils.getValue(e.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST)==mxConstants.DIRECTION_NORTH||e==mxConstants.DIRECTION_SOUTH;e=new mxPoint;var g=new mxPoint;if((hr+l||h>s+o&&us+o&&u>r+l)&&(i=!1),i){if(m){if(h==a){if(u<=r)return new mxPoint(a,r);if(u>=r+l)return new mxPoint(a,r+l)}else if(hs+o){if(u==r+l/4)return new mxPoint(s+o,r+l/4);if(u==r+3*l/4)return new mxPoint(s+o,r+3*l/4)}else if(h==s){if(ut)return new mxPoint(s,r+3*l/4)}else if(h==s+o){if(ut)return new mxPoint(s+o,r+3*l/4)}if(u==r)return new mxPoint(a,r);if(u==r+l)return new mxPoint(a,r+l);hr+l/4&&ur+3*l/4&&(e=new mxPoint(s-Math.floor(.5*o),r+Math.floor(.5*l)),g=new mxPoint(s+o,r+Math.floor(1.25*l))):h>a&&(u>r+l/4&&ur+3*l/4&&(e=new mxPoint(s+Math.floor(1.5*o),r+Math.floor(.5*l)),g=new mxPoint(s,r+Math.floor(1.25*l))))}else{if(u==t){if(h<=s)return new mxPoint(s,r+l/2);if(h>=s+o)return new mxPoint(s+o,r+l/2)}else if(ur+l){if(h==s+o/4)return new mxPoint(s+o/4,r+l);if(h==s+3*o/4)return new mxPoint(s+3*o/4,r+l)}else if(u==r){if(ha)return new mxPoint(s+3*o/4,r)}else if(u==r+l){if(ht)return new mxPoint(s+3*o/4,r+l)}if(h==s)return new mxPoint(s,t);if(h==s+o)return new mxPoint(s+o,t);us+o/4&&hs+3*o/4&&(e=new mxPoint(s+Math.floor(.5*o),r-Math.floor(.5*l)),g=new mxPoint(s+Math.floor(1.25*o),r+l)):u>t&&(h>s+o/4&&hs+3*o/4&&(e=new mxPoint(s+Math.floor(.5*o),r+Math.floor(1.5*l)),g=new mxPoint(s+Math.floor(1.25*o),r)))}i=a,p=t,h>=s&&h<=s+o?(i=h,p=u=r&&u<=r+l&&(p=u,i=h-h?(e=new mxPoint(s+o,r),g=new mxPoint(s+o,r+l)):p>h&&pc&&pd-h&&p<=d||p<-d+h&&p>=-d?(e=new mxPoint(s,r),g=new mxPoint(s,r+l)):p<-h&&p>-c?(e=new mxPoint(s+Math.floor(1.5*o),r+Math.floor(.5*l)),g=new mxPoint(s,r+Math.floor(1.25*l))):p<-c&&p>-d+h&&(e=new mxPoint(s-Math.floor(.5*o),r+Math.floor(.5*l)),g=new mxPoint(s+o,r+Math.floor(1.25*l)))}else{if(p==(h=Math.atan2(l/2,o/4)))return new mxPoint(s+Math.floor(.75*o),r);if(p==d-h)return new mxPoint(s+Math.floor(.25*o),r);if(p==d||p==-d)return new mxPoint(s,r+Math.floor(.5*l));if(0==p)return new mxPoint(s+o,r+Math.floor(.5*l));if(p==-h)return new mxPoint(s+Math.floor(.75*o),r+l);if(p==-d+h)return new mxPoint(s+Math.floor(.25*o),r+l);0h&&pd-h&&pp&&p>-h?(e=new mxPoint(s+Math.floor(.5*o),r+Math.floor(1.5*l)),g=new mxPoint(s+Math.floor(1.25*o),r)):p<-h&&p>-d+h?(e=new mxPoint(s,r+l),g=new mxPoint(s+o,r+l)):p<-d+h&&p>-d&&(e=new mxPoint(s-Math.floor(.25*o),r),g=new mxPoint(s+Math.floor(.5*o),r+Math.floor(1.5*l)))}n=mxUtils.intersection(a,t,n.x,n.y,e.x,e.y,g.x,g.y)}return null==n?new mxPoint(a,t):n}};function mxPrintPreview(t,e,n,i,s,r,o,l,a){this.graph=t,this.scale=null!=e?e:1/t.pageScale,this.border=null!=i?i:0,this.pageFormat=mxRectangle.fromRectangle(null!=n?n:t.pageFormat),this.title=null!=l?l:"Printer-friendly version",this.x0=null!=s?s:0,this.y0=null!=r?r:0,this.borderColor=o,this.pageSelector=null==a||a}function mxStylesheet(){this.styles={},this.putDefaultVertexStyle(this.createDefaultVertexStyle()),this.putDefaultEdgeStyle(this.createDefaultEdgeStyle())}function mxCellState(t,e,n){this.view=t,this.cell=e,this.style=null!=n?n:{},this.origin=new mxPoint,this.absoluteOffset=new mxPoint}function mxGraphSelectionModel(t){this.graph=t,this.cells=[]}function mxSelectionChange(t,e,n){this.selectionModel=t,this.added=null!=e?e.slice():null,this.removed=null!=n?n.slice():null}function mxCellEditor(t){this.graph=t,this.zoomHandler=mxUtils.bind(this,(function(){this.graph.isEditing()&&this.resize()})),this.graph.view.addListener(mxEvent.SCALE,this.zoomHandler),this.graph.view.addListener(mxEvent.SCALE_AND_TRANSLATE,this.zoomHandler),this.changeHandler=mxUtils.bind(this,(function(t){null!=this.editingCell&&null==this.graph.getView().getState(this.editingCell)&&this.stopEditing(!0)})),this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler)}function mxCellRenderer(){}mxPrintPreview.prototype.graph=null,mxPrintPreview.prototype.pageFormat=null,mxPrintPreview.prototype.scale=null,mxPrintPreview.prototype.border=0,mxPrintPreview.prototype.marginTop=0,mxPrintPreview.prototype.marginBottom=0,mxPrintPreview.prototype.x0=0,mxPrintPreview.prototype.y0=0,mxPrintPreview.prototype.autoOrigin=!0,mxPrintPreview.prototype.printOverlays=!1,mxPrintPreview.prototype.printControls=!1,mxPrintPreview.prototype.printBackgroundImage=!1,mxPrintPreview.prototype.backgroundColor="#ffffff",mxPrintPreview.prototype.borderColor=null,mxPrintPreview.prototype.title=null,mxPrintPreview.prototype.pageSelector=null,mxPrintPreview.prototype.wnd=null,mxPrintPreview.prototype.targetWindow=null,mxPrintPreview.prototype.pageCount=0,mxPrintPreview.prototype.clipping=!0,mxPrintPreview.prototype.getWindow=function(){return this.wnd},mxPrintPreview.prototype.getDoctype=function(){var t="";return 5==document.documentMode?t='':8==document.documentMode?t='':8'):("CSS1Compat"===document.compatMode&&l.writeln(""),l.writeln("")),l.writeln(""),this.writeHead(l,t),l.writeln(""),l.writeln('')}var h=this.graph.getGraphBounds().clone(),u=this.graph.getView().getScale(),p=u/this.scale,d=this.graph.getView().getTranslate();this.autoOrigin||(this.x0-=d.x*this.scale,this.y0-=d.y*this.scale,h.width+=h.x,h.height+=h.y,h.x=0,this.border=h.y=0);var c=this.pageFormat.width-2*this.border,m=this.pageFormat.height-2*this.border;this.pageFormat.height+=this.marginTop+this.marginBottom,h.width/=p,h.height/=p;var g=Math.max(1,Math.ceil((h.width+this.x0)/c)),x=Math.max(1,Math.ceil((h.height+this.y0)/m));this.pageCount=g*x;var y=mxUtils.bind(this,(function(){if(this.pageSelector&&(1"),t.writeln(""),t.close(),mxEvent.release(t.body)}}catch(t){}},mxPrintPreview.prototype.writeHead=function(t,e){null!=this.title&&t.writeln(""+this.title+""),mxClient.IS_VML&&t.writeln(''),mxClient.link("stylesheet",mxClient.basePath+"/css/common.css",t),t.writeln('")},mxPrintPreview.prototype.writePostfix=function(t){},mxPrintPreview.prototype.createPageSelector=function(t,e){var n=this.wnd.document,i=n.createElement("table");i.className="mxPageSelector",i.setAttribute("border","0");for(var s=n.createElement("tbody"),r=0;r":"",mxCellEditor.prototype.escapeCancelsEditing=!0,mxCellEditor.prototype.textNode="",mxCellEditor.prototype.zIndex=5,mxCellEditor.prototype.minResize=new mxRectangle(0,20),mxCellEditor.prototype.wordWrapPadding=mxClient.IS_QUIRKS?2:mxClient.IS_IE11?0:1,mxCellEditor.prototype.blurEnabled=!1,mxCellEditor.prototype.initialValue=null,mxCellEditor.prototype.align=null,mxCellEditor.prototype.init=function(){this.textarea=document.createElement("div"),this.textarea.className="mxCellEditor mxPlainTextEditor",this.textarea.contentEditable=!0,mxClient.IS_GC&&(this.textarea.style.minHeight="1em"),this.textarea.style.position=this.isLegacyEditor()?"absolute":"relative",this.installListeners(this.textarea)},mxCellEditor.prototype.applyValue=function(t,e){this.graph.labelChanged(t.cell,e,this.trigger)},mxCellEditor.prototype.setAlign=function(t){null!=this.textarea&&(this.textarea.style.textAlign=t),this.align=t,this.resize()},mxCellEditor.prototype.getInitialValue=function(t,e){var n=mxUtils.htmlEntities(this.graph.getEditingValue(t.cell,e),!1);return mxClient.IS_QUIRKS||8==document.documentMode||9==document.documentMode||10==document.documentMode||(n=mxUtils.replaceTrailingNewlines(n,"

")),n.replace(/\n/g,"
")},mxCellEditor.prototype.getCurrentValue=function(t){return mxUtils.extractTextWithWhitespace(this.textarea.childNodes)},mxCellEditor.prototype.isCancelEditingKeyEvent=function(t){return this.escapeCancelsEditing||mxEvent.isShiftDown(t)||mxEvent.isControlDown(t)||mxEvent.isMetaDown(t)},mxCellEditor.prototype.installListeners=function(t){mxEvent.addListener(t,"dragstart",mxUtils.bind(this,(function(t){this.graph.stopEditing(!1),mxEvent.consume(t)}))),mxEvent.addListener(t,"blur",mxUtils.bind(this,(function(t){this.blurEnabled&&this.focusLost(t)}))),mxEvent.addListener(t,"keydown",mxUtils.bind(this,(function(t){mxEvent.isConsumed(t)||(this.isStopEditingEvent(t)?(this.graph.stopEditing(!1),mxEvent.consume(t)):27==t.keyCode&&(this.graph.stopEditing(this.isCancelEditingKeyEvent(t)),mxEvent.consume(t)))})));var e=mxUtils.bind(this,(function(e){null!=this.editingCell&&this.clearOnChange&&t.innerHTML==this.getEmptyLabelText()&&(!mxClient.IS_FF||8!=e.keyCode&&46!=e.keyCode)&&(this.clearOnChange=!1,t.innerHTML="")}));mxEvent.addListener(t,"keypress",e),mxEvent.addListener(t,"paste",e),e=mxUtils.bind(this,(function(t){null!=this.editingCell&&(0==this.textarea.innerHTML.length||"
"==this.textarea.innerHTML?(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0s&&(this.textarea.style.width=this.textarea.scrollWidth+"px")):this.textarea.style.maxWidth=s+"px"):(this.textarea.style.whiteSpace="nowrap",this.textarea.style.width=""),8==document.documentMode&&(this.textarea.style.zoom="1",this.textarea.style.height="auto"),t=this.textarea.scrollWidth,s=this.textarea.scrollHeight,8==document.documentMode?(this.textarea.style.left=Math.max(0,Math.ceil((this.bounds.x-i.x*(this.bounds.width-(t+1)*n)+t*(n-1)*0+2*(i.x+.5))/n))+"px",this.textarea.style.top=Math.max(0,Math.ceil((this.bounds.y-i.y*(this.bounds.height-(s+.5)*n)+s*(n-1)*0+1*Math.abs(i.y+.5))/n))+"px",this.textarea.style.width=Math.round(t*n)+"px",this.textarea.style.height=Math.round(s*n)+"px"):mxClient.IS_QUIRKS?(this.textarea.style.left=Math.max(0,Math.ceil(this.bounds.x-i.x*(this.bounds.width-(t+1)*n)+t*(n-1)*0+2*(i.x+.5)))+"px",this.textarea.style.top=Math.max(0,Math.ceil(this.bounds.y-i.y*(this.bounds.height-(s+.5)*n)+s*(n-1)*0+1*Math.abs(i.y+.5)))+"px"):(this.textarea.style.left=Math.max(0,Math.round(this.bounds.x-i.x*(this.bounds.width-2))+1)+"px",this.textarea.style.top=Math.max(0,Math.round(this.bounds.y-i.y*(this.bounds.height-4)+(-1==i.y?3:0))+1)+"px")}else this.bounds=this.getEditorBounds(t),this.textarea.style.width=Math.round(this.bounds.width/n)+"px",this.textarea.style.height=Math.round(this.bounds.height/n)+"px",8==document.documentMode||mxClient.IS_QUIRKS?(this.textarea.style.left=Math.round(this.bounds.x)+"px",this.textarea.style.top=Math.round(this.bounds.y)+"px"):(this.textarea.style.left=Math.max(0,Math.round(this.bounds.x+1))+"px",this.textarea.style.top=Math.max(0,Math.round(this.bounds.y+1))+"px"),this.graph.isWrapping(t.cell)&&(2<=this.bounds.width||2<=this.bounds.height)&&this.textarea.innerHTML!=this.getEmptyLabelText()?(this.textarea.style.wordWrap=mxConstants.WORD_WRAP,this.textarea.style.whiteSpace="normal","fill"!=t.style[mxConstants.STYLE_OVERFLOW]&&(this.textarea.style.width=Math.round(this.bounds.width/n)+this.wordWrapPadding+"px")):(this.textarea.style.whiteSpace="nowrap","fill"!=t.style[mxConstants.STYLE_OVERFLOW]&&(this.textarea.style.width=""));mxClient.IS_VML?this.textarea.style.zoom=n:(mxUtils.setPrefixedStyle(this.textarea.style,"transformOrigin","0px 0px"),mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+n+","+n+")"+(null==i?"":" translate("+100*i.x+"%,"+100*i.y+"%)")))}},mxCellEditor.prototype.focusLost=function(){this.stopEditing(!this.graph.isInvokesStopCellEditing())},mxCellEditor.prototype.getBackgroundColor=function(t){return null},mxCellEditor.prototype.isLegacyEditor=function(){if(mxClient.IS_VML)return!0;var t=!1;if(mxClient.IS_SVG){var e=this.graph.view.getDrawPane().ownerSVGElement;null!=e&&(null!=(e=mxUtils.getCurrentStyle(e))&&(t="absolute"==e.position))}return!t},mxCellEditor.prototype.startEditing=function(t,e){this.stopEditing(!0),this.align=null,null==this.textarea&&this.init(),null!=this.graph.tooltipHandler&&this.graph.tooltipHandler.hideTooltip();var n=this.graph.getView().getState(t);if(null!=n){this.graph.getView();var i=mxUtils.getValue(n.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),s=mxUtils.getValue(n.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),r=mxUtils.getValue(n.style,mxConstants.STYLE_FONTCOLOR,"black"),o=mxUtils.getValue(n.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),l=(mxUtils.getValue(n.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,a=(mxUtils.getValue(n.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,h=[];(mxUtils.getValue(n.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&h.push("underline"),(mxUtils.getValue(n.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&h.push("line-through"),this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(i*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT,this.textarea.style.backgroundColor=this.getBackgroundColor(n),this.textarea.style.textDecoration=h.join(" "),this.textarea.style.fontWeight=l?"bold":"normal",this.textarea.style.fontStyle=a?"italic":"",this.textarea.style.fontSize=Math.round(i)+"px",this.textarea.style.zIndex=this.zIndex,this.textarea.style.fontFamily=s,this.textarea.style.textAlign=o,this.textarea.style.outline="none",this.textarea.style.color=r,(i=this.textDirection=mxUtils.getValue(n.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION))==mxConstants.TEXT_DIRECTION_AUTO&&(null==n||null==n.text||n.text.dialect==mxConstants.DIALECT_STRICTHTML||mxUtils.isNode(n.text.value)||(i=n.text.getAutoDirection())),i==mxConstants.TEXT_DIRECTION_LTR||i==mxConstants.TEXT_DIRECTION_RTL?this.textarea.setAttribute("dir",i):this.textarea.removeAttribute("dir"),this.textarea.innerHTML=this.getInitialValue(n,e)||"",this.initialValue=this.textarea.innerHTML,0==this.textarea.innerHTML.length||"
"==this.textarea.innerHTML?(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=!0):this.clearOnChange=this.textarea.innerHTML==this.getEmptyLabelText(),this.graph.container.appendChild(this.textarea),this.editingCell=t,this.trigger=e,this.textNode=null,null!=n.text&&this.isHideLabel(n)&&(this.textNode=n.text.node,this.textNode.style.visibility="hidden"),this.autoSize&&(this.graph.model.isEdge(n.cell)||"fill"!=n.style[mxConstants.STYLE_OVERFLOW])&&window.setTimeout(mxUtils.bind(this,(function(){this.resize()})),0),this.resize();try{this.textarea.focus(),this.isSelectText()&&0=l.x:null!=n&&(h=n.x+n.width=t.x:null!=e&&(l=e.x+e.widthe.x+e.width?null!=n?(i=n.x,h=Math.max(Math.abs(a-n.y),h)):t==mxConstants.DIRECTION_NORTH?a=e.y-2*l:t==mxConstants.DIRECTION_SOUTH?a=e.y+e.height+2*l:i=t==mxConstants.DIRECTION_EAST?e.x-2*h:e.x+e.width+2*h:null!=n&&(i=r.getRoutingCenterX(e),l=Math.max(Math.abs(i-n.x),h),a=n.y,h=0),s.push(new mxPoint(i-l,a-h)),s.push(new mxPoint(i+l,a+h))}},ElbowConnector:function(t,e,n,i,s){var r=null!=i&&0u,l=r.xh}else(o=(a=Math.max(e.x,n.x))==(h=Math.min(e.x+e.width,n.x+n.width)))||(l=(l=Math.max(e.y,n.y))==(u=Math.min(e.y+e.height,n.y+n.height)));l||!o&&t.style[mxConstants.STYLE_ELBOW]!=mxConstants.ELBOW_VERTICAL?mxEdgeStyle.SideToSide(t,e,n,i,s):mxEdgeStyle.TopToBottom(t,e,n,i,s)},SideToSide:function(t,e,n,i,s){var r=t.view;i=null!=i&&0=e.y&&i.y<=e.y+e.height&&(o=i.y),i.y>=n.y&&i.y<=n.y+n.height&&(r=i.y)),mxUtils.contains(n,t,o)||mxUtils.contains(e,t,o)||s.push(new mxPoint(t,o)),mxUtils.contains(n,t,r)||mxUtils.contains(e,t,r)||s.push(new mxPoint(t,r)),1==s.length&&(null!=i?mxUtils.contains(n,t,i.y)||mxUtils.contains(e,t,i.y)||s.push(new mxPoint(t,i.y)):(r=Math.max(e.y,n.y),s.push(new mxPoint(t,r+(Math.min(e.y+e.height,n.y+n.height)-r)/2)))))},TopToBottom:function(t,e,n,i,s){var r=t.view;i=null!=i&&0=e.x&&i.x<=e.x+e.width&&(t=i.x),o=null!=i?i.y:Math.round(l+(o-l)/2),mxUtils.contains(n,t,o)||mxUtils.contains(e,t,o)||s.push(new mxPoint(t,o)),t=null!=i&&i.x>=n.x&&i.x<=n.x+n.width?i.x:r.getRoutingCenterX(n),mxUtils.contains(n,t,o)||mxUtils.contains(e,t,o)||s.push(new mxPoint(t,o)),1==s.length&&(null!=i&&1==s.length?mxUtils.contains(n,i.x,o)||mxUtils.contains(e,i.x,o)||s.push(new mxPoint(i.x,o)):(r=Math.max(e.x,n.x),s.push(new mxPoint(r+(Math.min(e.x+e.width,n.x+n.width)-r)/2,o)))))},SegmentConnector:function(t,e,n,i,s){function r(t){return(null==a||Math.abs(a.x-t.x)>=l||Math.abs(a.y-t.y)>=l)&&(s.push(t),a=t),a}var o=t.absolutePoints,l=Math.max(1,t.view.scale),a=0c;c++){var v=null!=x&&x.x==y.x,E=null!=x&&x.y==y.y,C=null!=g&&y.y>=g.y&&y.y<=g.y+g.height;g=null!=g&&y.x>=g.x&&y.x<=g.x+g.width,y=E||null==x&&C,f=v||null==x&&g;if(0!=c||!(y&&f||v&&E)){if(null!=x&&!E&&!v&&(C||g)){h=!C;break}if(f||y){h=y,1==c&&(h=0==i.length%2?y:f);break}}g=n,null!=(x=o[d])&&(x.x=Math.round(x.x),x.y=Math.round(x.y),g=null),y=i[i.length-1],v&&E&&(i=i.slice(1))}for(h&&(null!=o[0]&&o[0].y!=u.y||null==o[0]&&null!=e&&(u.ye.y+e.height))?r(new mxPoint(p.x,u.y)):!h&&(null!=o[0]&&o[0].x!=u.x||null==o[0]&&null!=e&&(u.xe.x+e.width))&&r(new mxPoint(u.x,p.y)),h?p.y=u.y:p.x=u.x,c=0;cn.y+n.height))?r(new mxPoint(p.x,u.y)):!h&&(null!=o[d]&&o[d].x!=u.x||null==o[d]&&null!=n&&(u.xn.x+n.width))&&r(new mxPoint(u.x,p.y)))),null==o[0]&&null!=e)for(;1E;E++)mxEdgeStyle.limits[E][1]=u[E][0]-f[E],mxEdgeStyle.limits[E][2]=u[E][1]-f[E],mxEdgeStyle.limits[E][4]=u[E][0]+u[E][2]+f[E],mxEdgeStyle.limits[E][8]=u[E][1]+u[E][3]+f[E];for(C=(f=u[0][1]+u[0][3]/2)-(p=u[1][1]+u[1][3]/2),f=0,0>(E=u[0][0]+u[0][2]/2-(u[1][0]+u[1][2]/2))?f=0>C?2:1:0>=C&&(f=3,0==E&&(f=2)),p=null,null!=e&&(p=a),e=[[.5,.5],[.5,.5]],E=0;2>E;E++)null!=p&&(e[E][0]=(p.x-u[E][0])/u[E][2],1>=Math.abs(p.x-u[E][0])?t[E]=mxConstants.DIRECTION_MASK_WEST:1>=Math.abs(p.x-u[E][0]-u[E][2])&&(t[E]=mxConstants.DIRECTION_MASK_EAST),e[E][1]=(p.y-u[E][1])/u[E][3],1>=Math.abs(p.y-u[E][1])?t[E]=mxConstants.DIRECTION_MASK_NORTH:1>=Math.abs(p.y-u[E][1]-u[E][3])&&(t[E]=mxConstants.DIRECTION_MASK_SOUTH)),p=null,null!=n&&(p=h);for(E=u[0][1]-(u[1][1]+u[1][3]),h=u[0][0]-(u[1][0]+u[1][2]),p=u[1][1]-(u[0][1]+u[0][3]),d=u[1][0]-(u[0][0]+u[0][2]),mxEdgeStyle.vertexSeperations[1]=Math.max(h-v,0),mxEdgeStyle.vertexSeperations[2]=Math.max(E-v,0),mxEdgeStyle.vertexSeperations[4]=Math.max(p-v,0),mxEdgeStyle.vertexSeperations[3]=Math.max(d-v,0),v=[],a=[],(n=[])[0]=h>=d?mxConstants.DIRECTION_MASK_WEST:mxConstants.DIRECTION_MASK_EAST,a[0]=E>=p?mxConstants.DIRECTION_MASK_NORTH:mxConstants.DIRECTION_MASK_SOUTH,n[1]=mxUtils.reversePortConstraints(n[0]),a[1]=mxUtils.reversePortConstraints(a[0]),h=h>=d?h:d,p=E>=p?E:p,d=[[0,0],[0,0]],c=!1,E=0;2>E;E++)0==t[E]&&(0==(n[E]&i[E])&&(n[E]=mxUtils.reversePortConstraints(n[E])),0==(a[E]&i[E])&&(a[E]=mxUtils.reversePortConstraints(a[E])),d[E][0]=a[E],d[E][1]=n[E]);for(0E;E++)0==t[E]&&(0==(d[E][0]&i[E])&&(d[E][0]=d[E][1]),v[E]=d[E][0]&i[E],v[E]|=(d[E][1]&i[E])<<8,v[E]|=(d[1-E][E]&i[E])<<16,v[E]|=(d[1-E][1-E]&i[E])<<24,0==(15&v[E])&&(v[E]<<=8),0==(3840&v[E])&&(v[E]=15&v[E]|v[E]>>8),0==(983040&v[E])&&(v[E]=65535&v[E]|(251658240&v[E])>>8),t[E]=15&v[E],i[E]==mxConstants.DIRECTION_MASK_WEST||i[E]==mxConstants.DIRECTION_MASK_NORTH||i[E]==mxConstants.DIRECTION_MASK_EAST||i[E]==mxConstants.DIRECTION_MASK_SOUTH)&&(t[E]=i[E]);switch(i=t[0]==mxConstants.DIRECTION_MASK_EAST?3:t[0],v=t[1]==mxConstants.DIRECTION_MASK_EAST?3:t[1],1>(i-=f)&&(i+=4),1>(v-=f)&&(v+=4),i=mxEdgeStyle.routePatterns[i-1][v-1],mxEdgeStyle.wayPoints1[0][0]=u[0][0],mxEdgeStyle.wayPoints1[0][1]=u[0][1],t[0]){case mxConstants.DIRECTION_MASK_WEST:mxEdgeStyle.wayPoints1[0][0]-=r,mxEdgeStyle.wayPoints1[0][1]+=e[0][1]*u[0][3];break;case mxConstants.DIRECTION_MASK_SOUTH:mxEdgeStyle.wayPoints1[0][0]+=e[0][0]*u[0][2],mxEdgeStyle.wayPoints1[0][1]+=u[0][3]+r;break;case mxConstants.DIRECTION_MASK_EAST:mxEdgeStyle.wayPoints1[0][0]+=u[0][2]+r,mxEdgeStyle.wayPoints1[0][1]+=e[0][1]*u[0][3];break;case mxConstants.DIRECTION_MASK_NORTH:mxEdgeStyle.wayPoints1[0][0]+=e[0][0]*u[0][2],mxEdgeStyle.wayPoints1[0][1]-=r}for(r=0,n=v=0<(t[0]&(mxConstants.DIRECTION_MASK_EAST|mxConstants.DIRECTION_MASK_WEST))?0:1,E=0;E>5,15<(p<<=f)&&(p>>=4),d=0<(i[E]&mxEdgeStyle.CENTER_MASK),(g||m)&&9>p?(c=g?0:1,p=d&&0==a?u[c][0]+e[c][0]*u[c][2]:d?u[c][1]+e[c][1]*u[c][3]:mxEdgeStyle.limits[c][p],0==a?0<(p=(p-mxEdgeStyle.wayPoints1[r][0])*h[0])&&(mxEdgeStyle.wayPoints1[r][0]+=h[0]*p):0<(p=(p-mxEdgeStyle.wayPoints1[r][1])*h[1])&&(mxEdgeStyle.wayPoints1[r][1]+=h[1]*p)):d&&(mxEdgeStyle.wayPoints1[r][0]+=h[0]*Math.abs(mxEdgeStyle.vertexSeperations[c]/2),mxEdgeStyle.wayPoints1[r][1]+=h[1]*Math.abs(mxEdgeStyle.vertexSeperations[c]/2)),0(s-=e)&&(s+=4),1>(t-=e)&&(t+=4),e=routePatterns[s-1][t-1],0!=n&&0!=i||null==inlineRoutePatterns[s-1][t-1]||(e=inlineRoutePatterns[s-1][t-1]),e}},mxStyleRegistry={values:[],putValue:function(t,e){mxStyleRegistry.values[t]=e},getValue:function(t){return mxStyleRegistry.values[t]},getName:function(t){for(var e in mxStyleRegistry.values)if(mxStyleRegistry.values[e]==t)return e;return null}};function mxGraphView(t){this.graph=t,this.translate=new mxPoint,this.graphBounds=new mxRectangle,this.states=new mxDictionary}function mxCurrentRootChange(t,e){if(this.view=t,this.previous=this.root=e,this.isUp=null==e,!this.isUp)for(var n=this.view.currentRoot,i=this.view.graph.getModel();null!=n;){if(n==e){this.isUp=!0;break}n=i.getParent(n)}}function mxGraph(t,e,n,i){this.mouseListeners=null,this.renderHint=n,this.dialect=mxClient.IS_SVG?mxConstants.DIALECT_SVG:n==mxConstants.RENDERING_HINT_EXACT&&mxClient.IS_VML?mxConstants.DIALECT_VML:n==mxConstants.RENDERING_HINT_FASTEST?mxConstants.DIALECT_STRICTHTML:n==mxConstants.RENDERING_HINT_FASTER?mxConstants.DIALECT_PREFERHTML:mxConstants.DIALECT_MIXEDHTML,this.model=null!=e?e:new mxGraphModel,this.multiplicities=[],this.imageBundles=[],this.cellRenderer=this.createCellRenderer(),this.setSelectionModel(this.createSelectionModel()),this.setStylesheet(null!=i?i:this.createStylesheet()),this.view=this.createGraphView(),this.graphModelChangeListener=mxUtils.bind(this,(function(t,e){this.graphModelChanged(e.getProperty("edit").changes)})),this.model.addListener(mxEvent.CHANGE,this.graphModelChangeListener),this.createHandlers(),null!=t&&this.init(t),this.view.revalidate()}function mxCellOverlay(t,e,n,i,s,r){this.image=t,this.tooltip=e,this.align=null!=n?n:this.align,this.verticalAlign=null!=i?i:this.verticalAlign,this.offset=null!=s?s:new mxPoint,this.cursor=null!=r?r:"help"}function mxOutline(t,e){this.source=t,null!=e&&this.init(e)}function mxMultiplicity(t,e,n,i,s,r,o,l,a,h){this.source=t,this.type=e,this.attr=n,this.value=i,this.min=null!=s?s:0,this.max=null!=r?r:"n",this.validNeighbors=o,this.countError=mxResources.get(l)||l,this.typeError=mxResources.get(a)||a,this.validNeighborsAllowed=null==h||h}function mxLayoutManager(t){this.undoHandler=mxUtils.bind(this,(function(t,e){this.isEnabled()&&this.beforeUndo(e.getProperty("edit"))})),this.moveHandler=mxUtils.bind(this,(function(t,e){this.isEnabled()&&this.cellsMoved(e.getProperty("cells"),e.getProperty("event"))})),this.setGraph(t)}function mxSwimlaneManager(t,e,n,i){this.horizontal=null==e||e,this.addEnabled=null==n||n,this.resizeEnabled=null==i||i,this.addHandler=mxUtils.bind(this,(function(t,e){this.isEnabled()&&this.isAddEnabled()&&this.cellsAdded(e.getProperty("cells"))})),this.resizeHandler=mxUtils.bind(this,(function(t,e){this.isEnabled()&&this.isResizeEnabled()&&this.cellsResized(e.getProperty("cells"))})),this.setGraph(t)}function mxTemporaryCellStates(t,e,n,i,s){e=null!=e?e:1,this.view=t,this.oldValidateCellState=t.validateCellState,this.oldBounds=t.getGraphBounds(),this.oldStates=t.getStates(),this.oldScale=t.getScale(),this.oldDoRedrawShape=t.graph.cellRenderer.doRedrawShape;var r=this;if(null!=s&&(t.graph.cellRenderer.doRedrawShape=function(e){var n=e.shape.paint;e.shape.paint=function(t){var i=s(e);null!=i&&t.setLink(i),n.apply(this,arguments),null!=i&&t.setLink(null)},r.oldDoRedrawShape.apply(t.graph.cellRenderer,arguments),e.shape.paint=n}),t.validateCellState=function(e,n){return null==e||null==i||i(e)?r.oldValidateCellState.apply(t,arguments):null},t.setStates(new mxDictionary),t.setScale(e),null!=n){t.resetValidationState(),e=null;for(var o=0;on.length||null==n[0]||null==n[n.length-1])?this.clear(t.cell,!0):(this.updateEdgeBounds(t),this.updateEdgeLabelOffset(t)))},mxGraphView.prototype.updateVertexLabelOffset=function(t){var e=mxUtils.getValue(t.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);if(e==mxConstants.ALIGN_LEFT)e=null!=(e=mxUtils.getValue(t.style,mxConstants.STYLE_LABEL_WIDTH,null))?e*this.scale:t.width,t.absoluteOffset.x-=e;else if(e==mxConstants.ALIGN_RIGHT)t.absoluteOffset.x+=t.width;else if(e==mxConstants.ALIGN_CENTER&&null!=(e=mxUtils.getValue(t.style,mxConstants.STYLE_LABEL_WIDTH,null))){var n=mxUtils.getValue(t.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),i=0;n==mxConstants.ALIGN_CENTER?i=.5:n==mxConstants.ALIGN_RIGHT&&(i=1),0!=i&&(t.absoluteOffset.x-=(e*this.scale-t.width)*i)}(e=mxUtils.getValue(t.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE))==mxConstants.ALIGN_TOP?t.absoluteOffset.y-=t.height:e==mxConstants.ALIGN_BOTTOM&&(t.absoluteOffset.y+=t.height)},mxGraphView.prototype.resetValidationState=function(){this.lastForegroundHtmlNode=this.lastForegroundNode=this.lastHtmlNode=this.lastNode=null},mxGraphView.prototype.stateValidated=function(t){var e=this.graph.getModel().isEdge(t.cell)&&this.graph.keepEdgesInForeground||this.graph.getModel().isVertex(t.cell)&&this.graph.keepEdgesInBackground;t=this.graph.cellRenderer.insertStateAfter(t,e&&this.lastForegroundNode||this.lastNode,e&&this.lastForegroundHtmlNode||this.lastHtmlNode),e?(this.lastForegroundHtmlNode=t[1],this.lastForegroundNode=t[0]):(this.lastHtmlNode=t[1],this.lastNode=t[0])},mxGraphView.prototype.updateFixedTerminalPoints=function(t,e,n){this.updateFixedTerminalPoint(t,e,!0,this.graph.getConnectionConstraint(t,e,!0)),this.updateFixedTerminalPoint(t,n,!1,this.graph.getConnectionConstraint(t,n,!1))},mxGraphView.prototype.updateFixedTerminalPoint=function(t,e,n,i){t.setAbsoluteTerminalPoint(this.getFixedTerminalPoint(t,e,n,i),n)},mxGraphView.prototype.getFixedTerminalPoint=function(t,e,n,i){var s=null;if(null!=i&&(s=this.graph.getConnectionPoint(e,i,!1)),null==s&&null==e){e=this.scale,i=this.translate;var r=t.origin;null!=(s=this.graph.getCellGeometry(t.cell).getTerminalPoint(n))&&(s=new mxPoint(e*(i.x+s.x+r.x),e*(i.y+s.y+r.y)))}return s},mxGraphView.prototype.updateBoundsFromStencil=function(t){var e=null;if(null!=t&&null!=t.shape&&null!=t.shape.stencil&&"fixed"==t.shape.stencil.aspect){e=mxRectangle.fromRectangle(t);var n=t.shape.stencil.computeAspect(t.style,t.x,t.y,t.width,t.height);t.setRect(n.x,n.y,t.shape.stencil.w0*n.width,t.shape.stencil.h0*n.height)}return e},mxGraphView.prototype.updatePoints=function(t,e,n,i){if(null!=t){var s=[];s.push(t.absolutePoints[0]);var r=this.getEdgeStyle(t,e,n,i);if(null!=r){n=this.getTerminalPort(t,n,!0),i=this.getTerminalPort(t,i,!1);var o=this.updateBoundsFromStencil(n),l=this.updateBoundsFromStencil(i);r(t,n,i,e,s),null!=o&&n.setRect(o.x,o.y,o.width,o.height),null!=l&&i.setRect(l.x,l.y,l.width,l.height)}else if(null!=e)for(r=0;re.length)||mxUtils.getValue(t.style,mxConstants.STYLE_ORTHOGONAL_LOOP,!1)&&(null!=s&&null!=s.point||null!=r&&null!=r.point))&&(null!=n&&n==i)},mxGraphView.prototype.getEdgeStyle=function(t,e,n,i){return"string"==typeof(t=this.isLoopStyleEnabled(t,e,n,i)?mxUtils.getValue(t.style,mxConstants.STYLE_LOOP,this.graph.defaultLoopStyle):mxUtils.getValue(t.style,mxConstants.STYLE_NOEDGESTYLE,!1)?null:t.style[mxConstants.STYLE_EDGE])&&(null==(e=mxStyleRegistry.getValue(t))&&this.isAllowEval()&&(e=mxUtils.eval(t)),t=e),"function"==typeof t?t:null},mxGraphView.prototype.updateFloatingTerminalPoints=function(t,e,n){var i=t.absolutePoints,s=i[0];null==i[i.length-1]&&null!=n&&this.updateFloatingTerminalPoint(t,n,e,!1),null==s&&null!=e&&this.updateFloatingTerminalPoint(t,e,n,!0)},mxGraphView.prototype.updateFloatingTerminalPoint=function(t,e,n,i){t.setAbsoluteTerminalPoint(this.getFloatingTerminalPoint(t,e,n,i),i)},mxGraphView.prototype.getFloatingTerminalPoint=function(t,e,n,i){e=this.getTerminalPort(t,e,i);var s=this.getNextPoint(t,n,i),r=this.graph.isOrthogonal(t);n=mxUtils.toRadians(Number(e.style[mxConstants.STYLE_ROTATION]||"0"));var o=new mxPoint(e.getCenterX(),e.getCenterY());if(0!=n){var l=Math.cos(-n),a=Math.sin(-n);s=mxUtils.getRotatedPoint(s,l,a,o)}return l=parseFloat(t.style[mxConstants.STYLE_PERIMETER_SPACING]||0),l+=parseFloat(t.style[i?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0),t=this.getPerimeterPoint(e,s,0==n&&r,l),0!=n&&(l=Math.cos(n),a=Math.sin(n),t=mxUtils.getRotatedPoint(t,l,a,o)),t},mxGraphView.prototype.getTerminalPort=function(t,e,n){return null!=(t=mxUtils.getValue(t.style,n?mxConstants.STYLE_SOURCE_PORT:mxConstants.STYLE_TARGET_PORT))&&(null!=(t=this.getState(this.graph.getModel().getCell(t)))&&(e=t)),e},mxGraphView.prototype.getPerimeterPoint=function(t,e,n,i){var s=null;if(null!=t){var r=this.getPerimeterFunction(t);if(null!=r&&null!=e&&(0<(i=this.getPerimeterBounds(t,i)).width||0=Math.round(l+o)&&a=r?0:r*r/(t*t+h*h)))>i&&(t=i),i=Math.sqrt(mxUtils.ptSegDistSq(o.x,o.y,l.x,l.y,e,n)),-1==mxUtils.relativeCcw(o.x,o.y,l.x,l.y,e,n)&&(i=-i),new mxPoint((s/2-p-t)/s*-2,i/this.scale)}}return new mxPoint},mxGraphView.prototype.updateEdgeLabelOffset=function(t){var e=t.absolutePoints;if(t.absoluteOffset.x=t.getCenterX(),t.absoluteOffset.y=t.getCenterY(),null!=e&&0n&&t.x>n+2&&t.x<=e||(e=this.graph.container.offsetHeight)>(n=this.graph.container.clientHeight)&&t.y>n+2&&t.y<=e},mxGraphView.prototype.init=function(){this.installListeners();var t=this.graph;t.dialect==mxConstants.DIALECT_SVG?this.createSvg():t.dialect==mxConstants.DIALECT_VML?this.createVml():this.createHtml()},mxGraphView.prototype.installListeners=function(){var t=this.graph,e=t.container;if(null!=e){mxClient.IS_TOUCH&&(mxEvent.addListener(e,"gesturestart",mxUtils.bind(this,(function(e){t.fireGestureEvent(e),mxEvent.consume(e)}))),mxEvent.addListener(e,"gesturechange",mxUtils.bind(this,(function(e){t.fireGestureEvent(e),mxEvent.consume(e)}))),mxEvent.addListener(e,"gestureend",mxUtils.bind(this,(function(e){t.fireGestureEvent(e),mxEvent.consume(e)})))),mxEvent.addGestureListeners(e,mxUtils.bind(this,(function(e){!this.isContainerEvent(e)||(mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_GC||mxClient.IS_OP||mxClient.IS_SF)&&this.isScrollEvent(e)||t.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(e))})),mxUtils.bind(this,(function(e){this.isContainerEvent(e)&&t.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(e))})),mxUtils.bind(this,(function(e){this.isContainerEvent(e)&&t.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(e))}))),mxEvent.addListener(e,"dblclick",mxUtils.bind(this,(function(e){this.isContainerEvent(e)&&t.dblClick(e)})));var n=function(n){var i=null;return mxClient.IS_TOUCH&&(i=mxEvent.getClientX(n),n=mxEvent.getClientY(n),n=mxUtils.convertPoint(e,i,n),i=t.view.getState(t.getCellAt(n.x,n.y))),i};t.addMouseListener({mouseDown:function(e,n){t.popupMenuHandler.hideMenu()},mouseMove:function(){},mouseUp:function(){}}),this.moveHandler=mxUtils.bind(this,(function(e){null!=t.tooltipHandler&&t.tooltipHandler.isHideOnHover()&&t.tooltipHandler.hide(),this.captureDocumentGesture&&t.isMouseDown&&null!=t.container&&!this.isContainerEvent(e)&&"none"!=t.container.style.display&&"hidden"!=t.container.style.visibility&&!mxEvent.isConsumed(e)&&t.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(e,n(e)))})),this.endHandler=mxUtils.bind(this,(function(e){this.captureDocumentGesture&&t.isMouseDown&&null!=t.container&&!this.isContainerEvent(e)&&"none"!=t.container.style.display&&"hidden"!=t.container.style.visibility&&t.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(e))})),mxEvent.addGestureListeners(document,null,this.moveHandler,this.endHandler)}},mxGraphView.prototype.createHtml=function(){var t=this.graph.container;null!=t&&(this.canvas=this.createHtmlPane("100%","100%"),this.canvas.style.overflow="hidden",this.backgroundPane=this.createHtmlPane("1px","1px"),this.drawPane=this.createHtmlPane("1px","1px"),this.overlayPane=this.createHtmlPane("1px","1px"),this.decoratorPane=this.createHtmlPane("1px","1px"),this.canvas.appendChild(this.backgroundPane),this.canvas.appendChild(this.drawPane),this.canvas.appendChild(this.overlayPane),this.canvas.appendChild(this.decoratorPane),t.appendChild(this.canvas),this.updateContainerStyle(t),mxClient.IS_QUIRKS&&(t=mxUtils.bind(this,(function(t){t=this.getGraphBounds(),this.updateHtmlCanvasSize(t.x+t.width+this.graph.border,t.y+t.height+this.graph.border)})),mxEvent.addListener(window,"resize",t)))},mxGraphView.prototype.updateHtmlCanvasSize=function(t,e){if(null!=this.graph.container){var n=this.graph.container.offsetHeight;this.canvas.style.width=this.graph.container.offsetWidth")},mxGraph.prototype.createHandlers=function(){this.tooltipHandler=this.createTooltipHandler(),this.tooltipHandler.setEnabled(!1),this.selectionCellsHandler=this.createSelectionCellsHandler(),this.connectionHandler=this.createConnectionHandler(),this.connectionHandler.setEnabled(!1),this.graphHandler=this.createGraphHandler(),this.panningHandler=this.createPanningHandler(),this.panningHandler.panningEnabled=!1,this.popupMenuHandler=this.createPopupMenuHandler()},mxGraph.prototype.createTooltipHandler=function(){return new mxTooltipHandler(this)},mxGraph.prototype.createSelectionCellsHandler=function(){return new mxSelectionCellsHandler(this)},mxGraph.prototype.createConnectionHandler=function(){return new mxConnectionHandler(this)},mxGraph.prototype.createGraphHandler=function(){return new mxGraphHandler(this)},mxGraph.prototype.createPanningHandler=function(){return new mxPanningHandler(this)},mxGraph.prototype.createPopupMenuHandler=function(){return new mxPopupMenuHandler(this)},mxGraph.prototype.createSelectionModel=function(){return new mxGraphSelectionModel(this)},mxGraph.prototype.createStylesheet=function(){return new mxStylesheet},mxGraph.prototype.createGraphView=function(){return new mxGraphView(this)},mxGraph.prototype.createCellRenderer=function(){return new mxCellRenderer},mxGraph.prototype.createCellEditor=function(){return new mxCellEditor(this)},mxGraph.prototype.getModel=function(){return this.model},mxGraph.prototype.getView=function(){return this.view},mxGraph.prototype.getStylesheet=function(){return this.stylesheet},mxGraph.prototype.setStylesheet=function(t){this.stylesheet=t},mxGraph.prototype.getSelectionModel=function(){return this.selectionModel},mxGraph.prototype.setSelectionModel=function(t){this.selectionModel=t},mxGraph.prototype.getSelectionCellsForChanges=function(t){for(var e=new mxDictionary,n=[],i=mxUtils.bind(this,(function(t){if(!e.get(t)&&this.model.contains(t))if(this.model.isEdge(t)||this.model.isVertex(t))e.put(t,!0),n.push(t);else for(var s=this.model.getChildCount(t),r=0;r"+e+""),i&&e.addListener(mxEvent.CLICK,mxUtils.bind(this,(function(e,n){this.isEnabled()&&this.setSelectionCell(t)}))),this.addCellOverlay(t,e)):(this.removeCellOverlays(t),null)},mxGraph.prototype.startEditing=function(t){this.startEditingAtCell(null,t)},mxGraph.prototype.startEditingAtCell=function(t,e){null!=e&&mxEvent.isMultiTouchEvent(e)||(null==t&&(null==(t=this.getSelectionCell())||this.isCellEditable(t)||(t=null)),null!=t&&(this.fireEvent(new mxEventObject(mxEvent.START_EDITING,"cell",t,"event",e)),this.cellEditor.startEditing(t,e),this.fireEvent(new mxEventObject(mxEvent.EDITING_STARTED,"cell",t,"event",e))))},mxGraph.prototype.getEditingValue=function(t,e){return this.convertValueToString(t)},mxGraph.prototype.stopEditing=function(t){this.cellEditor.stopEditing(t),this.fireEvent(new mxEventObject(mxEvent.EDITING_STOPPED,"cancel",t))},mxGraph.prototype.labelChanged=function(t,e,n){this.model.beginUpdate();try{var i=t.value;this.cellLabelChanged(t,e,this.isAutoSizeCell(t)),this.fireEvent(new mxEventObject(mxEvent.LABEL_CHANGED,"cell",t,"value",e,"old",i,"event",n))}finally{this.model.endUpdate()}return t},mxGraph.prototype.cellLabelChanged=function(t,e,n){this.model.beginUpdate();try{this.model.setValue(t,e),n&&this.cellSizeUpdated(t,!1)}finally{this.model.endUpdate()}},mxGraph.prototype.escape=function(t){this.fireEvent(new mxEventObject(mxEvent.ESCAPE,"event",t))},mxGraph.prototype.click=function(t){var e=t.getEvent(),n=t.getCell(),i=new mxEventObject(mxEvent.CLICK,"event",e,"cell",n);if(t.isConsumed()&&i.consume(),this.fireEvent(i),this.isEnabled()&&!mxEvent.isConsumed(e)&&!i.isConsumed())if(null!=n){if(this.isTransparentClickEvent(e)){var s=!1;null!=(t=this.getCellAt(t.graphX,t.graphY,null,null,null,mxUtils.bind(this,(function(t){return t=this.isCellSelected(t.cell),!(s=s||t)||t}))))&&(n=t)}this.selectCellForEvent(n,e)}else n=null,this.isSwimlaneSelectionEnabled()&&(n=this.getSwimlaneAt(t.getGraphX(),t.getGraphY())),null!=n?this.selectCellForEvent(n,e):this.isToggleEvent(e)||this.clearSelection()},mxGraph.prototype.dblClick=function(t,e){var n=new mxEventObject(mxEvent.DOUBLE_CLICK,"event",t,"cell",e);this.fireEvent(n),!this.isEnabled()||mxEvent.isConsumed(t)||n.isConsumed()||null==e||!this.isCellEditable(e)||this.isEditing(e)||(this.startEditingAtCell(e,t),mxEvent.consume(t))},mxGraph.prototype.tapAndHold=function(t){var e=t.getEvent(),n=new mxEventObject(mxEvent.TAP_AND_HOLD,"event",e,"cell",t.getCell());this.fireEvent(n),n.isConsumed()&&(this.panningHandler.panningTrigger=!1),this.isEnabled()&&!mxEvent.isConsumed(e)&&!n.isConsumed()&&this.connectionHandler.isEnabled()&&(null!=(e=this.view.getState(this.connectionHandler.marker.getCell(t)))&&(this.connectionHandler.marker.currentColor=this.connectionHandler.marker.validColor,this.connectionHandler.marker.markedState=e,this.connectionHandler.marker.mark(),this.connectionHandler.first=new mxPoint(t.getGraphX(),t.getGraphY()),this.connectionHandler.edgeState=this.connectionHandler.createEdgeState(t),this.connectionHandler.previous=e,this.connectionHandler.fireEvent(new mxEventObject(mxEvent.START,"state",this.connectionHandler.previous))))},mxGraph.prototype.scrollPointToVisible=function(t,e,n,i){if(this.timerAutoScroll||!this.ignoreScrollbars&&!mxUtils.hasScrollbars(this.container))this.allowAutoPanning&&!this.panningHandler.isActive()&&(null==this.panningManager&&(this.panningManager=this.createPanningManager()),this.panningManager.panTo(t+this.panDx,e+this.panDy));else{var s=this.container;if(i=null!=i?i:20,t>=s.scrollLeft&&e>=s.scrollTop&&t<=s.scrollLeft+s.clientWidth&&e<=s.scrollTop+s.clientHeight){var r=s.scrollLeft+s.clientWidth-t;if(rthis.minPageBreakDist)?Math.ceil(i.height/r.height)+1:0,l=t?Math.ceil(i.width/r.width)+1:0,a=(l-1)*r.width,h=(o-1)*r.height;null==this.horizontalPageBreaks&&0this.model.getChildCount(e)&&n--,this.model.add(e,t[u],n+u),this.autoSizeCellsOnAdd&&this.autoSizeCell(t[u],!0),(null==l||l)&&this.isExtendParentsOnAdd(t[u])&&this.isExtendParent(t[u])&&this.extendParent(t[u]),(null==o||o)&&this.constrainChild(t[u]),null!=i&&this.cellConnected(t[u],i,!0),null!=s&&this.cellConnected(t[u],s,!1)}this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",t,"parent",e,"index",n,"source",i,"target",s,"absolute",r))}finally{this.model.endUpdate()}}},mxGraph.prototype.autoSizeCell=function(t,e){if(null==e||e)for(var n=this.model.getChildCount(t),i=0;i"),n=(s=mxUtils.getSizeForString(r,s,i[mxConstants.STYLE_FONTFAMILY],null,i[mxConstants.STYLE_FONTSTYLE])).width+e,t=s.height+t,mxUtils.getValue(i,mxConstants.STYLE_HORIZONTAL,!0)||(i=t,t=n,n=i),this.gridEnabled&&(n=this.snap(n+this.gridSize/2),t=this.snap(t+this.gridSize/2)),e=new mxRectangle(0,0,n,t)):e=new mxRectangle(0,0,i=4*this.gridSize,i)}}return e},mxGraph.prototype.resizeCell=function(t,e,n){return this.resizeCells([t],[e],n)[0]},mxGraph.prototype.resizeCells=function(t,e,n){n=null!=n?n:this.isRecursiveResize(),this.model.beginUpdate();try{this.cellsResized(t,e,n),this.fireEvent(new mxEventObject(mxEvent.RESIZE_CELLS,"cells",t,"bounds",e))}finally{this.model.endUpdate()}return t},mxGraph.prototype.cellsResized=function(t,e,n){if(n=null!=n&&n,null!=t&&null!=e&&t.length==e.length){this.model.beginUpdate();try{for(var i=0;is.width&&(r=n.width-s.width,n.width-=r),i.x+i.width>s.x+s.width&&(r-=i.x+i.width-s.x-s.width-r),o=0,n.height>s.height&&(o=n.height-s.height,n.height-=o),i.y+i.height>s.y+s.height&&(o-=i.y+i.height-s.y-s.height-o),i.xo&&(u=0),(e=this.container.scrollHeight)>r&&(p=0),this.view.setTranslate(Math.floor(u/2-l.x),Math.floor(p/2-l.y)),this.container.scrollLeft=(t-o)/2,this.container.scrollTop=(e-r)/2):this.view.setTranslate(t?Math.floor(a.x-l.x*h+u*n/h):a.x,e?Math.floor(a.y-l.y*h+p*i/h):a.y)},mxGraph.prototype.zoom=function(t,e){e=null!=e?e:this.centerZoom;var n=Math.round(this.view.scale*t*100)/100,i=this.view.getState(this.getSelectionCell());if(t=n/this.view.scale,this.keepSelectionVisibleOnZoom&&null!=i)i=new mxRectangle(i.x*t,i.y*t,i.width*t,i.height*t),this.view.scale=n,this.scrollRectToVisible(i)||(this.view.revalidate(),this.view.setScale(n));else if(i=mxUtils.hasScrollbars(this.container),e&&!i){i=this.container.offsetWidth;var s=this.container.offsetHeight;if(1e?(n=((e=t.height/e)-t.height)/2,t.height=e,t.y-=Math.min(t.y,n),i=Math.min(this.container.scrollHeight,t.y+t.height),t.height=i-t.y):(n=((e*=t.width)-t.width)/2,t.width=e,t.x-=Math.min(t.x,n),n=Math.min(this.container.scrollWidth,t.x+t.width),t.width=n-t.x),e=this.container.clientWidth/t.width,n=this.view.scale*e,mxUtils.hasScrollbars(this.container)?(this.view.setScale(n),this.container.scrollLeft=Math.round(t.x*e),this.container.scrollTop=Math.round(t.y*e)):this.view.scaleAndTranslate(n,this.view.translate.x-t.x/this.view.scale,this.view.translate.y-t.y/this.view.scale)},mxGraph.prototype.scrollCellToVisible=function(t,e){var n=-this.view.translate.x,i=-this.view.translate.y,s=this.view.getState(t);null!=s&&(n=new mxRectangle(n+s.x,i+s.y,s.width,s.height),e&&null!=this.container&&(i=this.container.clientWidth,s=this.container.clientHeight,n.x=n.getCenterX()-i/2,n.width=i,n.y=n.getCenterY()-s/2,n.height=s),i=new mxPoint(this.view.translate.x,this.view.translate.y),this.scrollRectToVisible(n)&&(n=new mxPoint(this.view.translate.x,this.view.translate.y),this.view.translate.x=i.x,this.view.translate.y=i.y,this.view.setTranslate(n.x,n.y)))},mxGraph.prototype.scrollRectToVisible=function(t){var e=!1;if(null!=t){var n=this.container.offsetWidth,i=this.container.offsetHeight,s=Math.min(n,t.width),r=Math.min(i,t.height);if(mxUtils.hasScrollbars(this.container)){n=this.container,t.x+=this.view.translate.x,t.y+=this.view.translate.y;var o=n.scrollLeft-t.x;i=Math.max(o-n.scrollLeft,0);0o+n&&(this.view.translate.x-=(t.x+s-n-o)/a,e=!0),t.y+r>l+i&&(this.view.translate.y-=(t.y+r-i-l)/a,e=!0),t.x")):this.setCellWarning(r,null),n=n&&null==o}return i="",this.isCellCollapsed(t)&&!n&&(i+=(mxResources.get(this.containsValidationErrorsResource)||this.containsValidationErrorsResource)+"\n"),i=this.model.isEdge(t)?i+(this.getEdgeValidationError(t,this.model.getTerminal(t,!0),this.model.getTerminal(t,!1))||""):i+(this.getCellValidationError(t)||""),null!=(s=this.validateCell(t,e))&&(i+=s),null==this.model.getParent(t)&&this.view.validate(),0r.max||er.max||n")),null==s&&null!=t.overlays&&t.overlays.visit((function(t,n){null!=s||e!=n.node&&e.parentNode!=n.node||(s=n.overlay.toString())})),null==s&&(null!=(n=this.selectionCellsHandler.getHandler(t.cell))&&"function"==typeof n.getTooltipForNode&&(s=n.getTooltipForNode(e))),null==s&&(s=this.getTooltipForCell(t.cell))),s},mxGraph.prototype.getTooltipForCell=function(t){return null!=t&&null!=t.getTooltip?t.getTooltip():this.convertValueToString(t)},mxGraph.prototype.getLinkForCell=function(t){return null},mxGraph.prototype.getCursorForMouseEvent=function(t){return this.getCursorForCell(t.getCell())},mxGraph.prototype.getCursorForCell=function(t){return null},mxGraph.prototype.getStartSize=function(t){var e=new mxRectangle,n=this.view.getState(t);return null!=(t=null!=n?n.style:this.getCellStyle(t))&&(n=parseInt(mxUtils.getValue(t,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE)),mxUtils.getValue(t,mxConstants.STYLE_HORIZONTAL,!0)?e.height=n:e.width=n),e},mxGraph.prototype.getImage=function(t){return null!=t&&null!=t.style?t.style[mxConstants.STYLE_IMAGE]:null},mxGraph.prototype.isTransparentState=function(t){var e=!1;if(null!=t){e=mxUtils.getValue(t.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE);var n=mxUtils.getValue(t.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);e=e==mxConstants.NONE&&n==mxConstants.NONE&&null==this.getImage(t)}return e},mxGraph.prototype.getVerticalAlign=function(t){return null!=t&&null!=t.style?t.style[mxConstants.STYLE_VERTICAL_ALIGN]||mxConstants.ALIGN_MIDDLE:null},mxGraph.prototype.getIndicatorColor=function(t){return null!=t&&null!=t.style?t.style[mxConstants.STYLE_INDICATOR_COLOR]:null},mxGraph.prototype.getIndicatorGradientColor=function(t){return null!=t&&null!=t.style?t.style[mxConstants.STYLE_INDICATOR_GRADIENTCOLOR]:null},mxGraph.prototype.getIndicatorShape=function(t){return null!=t&&null!=t.style?t.style[mxConstants.STYLE_INDICATOR_SHAPE]:null},mxGraph.prototype.getIndicatorImage=function(t){return null!=t&&null!=t.style?t.style[mxConstants.STYLE_INDICATOR_IMAGE]:null},mxGraph.prototype.getBorder=function(){return this.border},mxGraph.prototype.setBorder=function(t){this.border=t},mxGraph.prototype.isSwimlane=function(t){var e;if(null!=t&&this.model.getParent(t)!=this.model.getRoot()&&(null!=(e=null!=(e=this.view.getState(t))?e.style:this.getCellStyle(t))&&!this.model.isEdge(t)))return e[mxConstants.STYLE_SHAPE]==mxConstants.SHAPE_SWIMLANE;return!1},mxGraph.prototype.isResizeContainer=function(){return this.resizeContainer},mxGraph.prototype.setResizeContainer=function(t){this.resizeContainer=t},mxGraph.prototype.isEnabled=function(){return this.enabled},mxGraph.prototype.setEnabled=function(t){this.enabled=t},mxGraph.prototype.isEscapeEnabled=function(){return this.escapeEnabled},mxGraph.prototype.setEscapeEnabled=function(t){this.escapeEnabled=t},mxGraph.prototype.isInvokesStopCellEditing=function(){return this.invokesStopCellEditing},mxGraph.prototype.setInvokesStopCellEditing=function(t){this.invokesStopCellEditing=t},mxGraph.prototype.isEnterStopsCellEditing=function(){return this.enterStopsCellEditing},mxGraph.prototype.setEnterStopsCellEditing=function(t){this.enterStopsCellEditing=t},mxGraph.prototype.isCellLocked=function(t){var e=this.model.getGeometry(t);return this.isCellsLocked()||null!=e&&this.model.isVertex(t)&&e.relative},mxGraph.prototype.isCellsLocked=function(){return this.cellsLocked},mxGraph.prototype.setCellsLocked=function(t){this.cellsLocked=t},mxGraph.prototype.getCloneableCells=function(t){return this.model.filterCells(t,mxUtils.bind(this,(function(t){return this.isCellCloneable(t)})))},mxGraph.prototype.isCellCloneable=function(t){var e=this.view.getState(t);return t=null!=e?e.style:this.getCellStyle(t),this.isCellsCloneable()&&0!=t[mxConstants.STYLE_CLONEABLE]},mxGraph.prototype.isCellsCloneable=function(){return this.cellsCloneable},mxGraph.prototype.setCellsCloneable=function(t){this.cellsCloneable=t},mxGraph.prototype.getExportableCells=function(t){return this.model.filterCells(t,mxUtils.bind(this,(function(t){return this.canExportCell(t)})))},mxGraph.prototype.canExportCell=function(t){return this.exportEnabled},mxGraph.prototype.getImportableCells=function(t){return this.model.filterCells(t,mxUtils.bind(this,(function(t){return this.canImportCell(t)})))},mxGraph.prototype.canImportCell=function(t){return this.importEnabled},mxGraph.prototype.isCellSelectable=function(t){return this.isCellsSelectable()},mxGraph.prototype.isCellsSelectable=function(){return this.cellsSelectable},mxGraph.prototype.setCellsSelectable=function(t){this.cellsSelectable=t},mxGraph.prototype.getDeletableCells=function(t){return this.model.filterCells(t,mxUtils.bind(this,(function(t){return this.isCellDeletable(t)})))},mxGraph.prototype.isCellDeletable=function(t){var e=this.view.getState(t);return t=null!=e?e.style:this.getCellStyle(t),this.isCellsDeletable()&&0!=t[mxConstants.STYLE_DELETABLE]},mxGraph.prototype.isCellsDeletable=function(){return this.cellsDeletable},mxGraph.prototype.setCellsDeletable=function(t){this.cellsDeletable=t},mxGraph.prototype.isLabelMovable=function(t){return!this.isCellLocked(t)&&(this.model.isEdge(t)&&this.edgeLabelsMovable||this.model.isVertex(t)&&this.vertexLabelsMovable)},mxGraph.prototype.isCellRotatable=function(t){var e=this.view.getState(t);return 0!=(null!=e?e.style:this.getCellStyle(t))[mxConstants.STYLE_ROTATABLE]},mxGraph.prototype.getMovableCells=function(t){return this.model.filterCells(t,mxUtils.bind(this,(function(t){return this.isCellMovable(t)})))},mxGraph.prototype.isCellMovable=function(t){var e=null!=(e=this.view.getState(t))?e.style:this.getCellStyle(t);return this.isCellsMovable()&&!this.isCellLocked(t)&&0!=e[mxConstants.STYLE_MOVABLE]},mxGraph.prototype.isCellsMovable=function(){return this.cellsMovable},mxGraph.prototype.setCellsMovable=function(t){this.cellsMovable=t},mxGraph.prototype.isGridEnabled=function(){return this.gridEnabled},mxGraph.prototype.setGridEnabled=function(t){this.gridEnabled=t},mxGraph.prototype.isPortsEnabled=function(){return this.portsEnabled},mxGraph.prototype.setPortsEnabled=function(t){this.portsEnabled=t},mxGraph.prototype.getGridSize=function(){return this.gridSize},mxGraph.prototype.setGridSize=function(t){this.gridSize=t},mxGraph.prototype.getTolerance=function(){return this.tolerance},mxGraph.prototype.setTolerance=function(t){this.tolerance=t},mxGraph.prototype.isVertexLabelsMovable=function(){return this.vertexLabelsMovable},mxGraph.prototype.setVertexLabelsMovable=function(t){this.vertexLabelsMovable=t},mxGraph.prototype.isEdgeLabelsMovable=function(){return this.edgeLabelsMovable},mxGraph.prototype.setEdgeLabelsMovable=function(t){this.edgeLabelsMovable=t},mxGraph.prototype.isSwimlaneNesting=function(){return this.swimlaneNesting},mxGraph.prototype.setSwimlaneNesting=function(t){this.swimlaneNesting=t},mxGraph.prototype.isSwimlaneSelectionEnabled=function(){return this.swimlaneSelectionEnabled},mxGraph.prototype.setSwimlaneSelectionEnabled=function(t){this.swimlaneSelectionEnabled=t},mxGraph.prototype.isMultigraph=function(){return this.multigraph},mxGraph.prototype.setMultigraph=function(t){this.multigraph=t},mxGraph.prototype.isAllowLoops=function(){return this.allowLoops},mxGraph.prototype.setAllowDanglingEdges=function(t){this.allowDanglingEdges=t},mxGraph.prototype.isAllowDanglingEdges=function(){return this.allowDanglingEdges},mxGraph.prototype.setConnectableEdges=function(t){this.connectableEdges=t},mxGraph.prototype.isConnectableEdges=function(){return this.connectableEdges},mxGraph.prototype.setCloneInvalidEdges=function(t){this.cloneInvalidEdges=t},mxGraph.prototype.isCloneInvalidEdges=function(){return this.cloneInvalidEdges},mxGraph.prototype.setAllowLoops=function(t){this.allowLoops=t},mxGraph.prototype.isDisconnectOnMove=function(){return this.disconnectOnMove},mxGraph.prototype.setDisconnectOnMove=function(t){this.disconnectOnMove=t},mxGraph.prototype.isDropEnabled=function(){return this.dropEnabled},mxGraph.prototype.setDropEnabled=function(t){this.dropEnabled=t},mxGraph.prototype.isSplitEnabled=function(){return this.splitEnabled},mxGraph.prototype.setSplitEnabled=function(t){this.splitEnabled=t},mxGraph.prototype.isCellResizable=function(t){var e=null!=(e=this.view.getState(t))?e.style:this.getCellStyle(t);return this.isCellsResizable()&&!this.isCellLocked(t)&&"0"!=mxUtils.getValue(e,mxConstants.STYLE_RESIZABLE,"1")},mxGraph.prototype.isCellsResizable=function(){return this.cellsResizable},mxGraph.prototype.setCellsResizable=function(t){this.cellsResizable=t},mxGraph.prototype.isTerminalPointMovable=function(t,e){return!0},mxGraph.prototype.isCellBendable=function(t){var e=null!=(e=this.view.getState(t))?e.style:this.getCellStyle(t);return this.isCellsBendable()&&!this.isCellLocked(t)&&0!=e[mxConstants.STYLE_BENDABLE]},mxGraph.prototype.isCellsBendable=function(){return this.cellsBendable},mxGraph.prototype.setCellsBendable=function(t){this.cellsBendable=t},mxGraph.prototype.isCellEditable=function(t){var e=null!=(e=this.view.getState(t))?e.style:this.getCellStyle(t);return this.isCellsEditable()&&!this.isCellLocked(t)&&0!=e[mxConstants.STYLE_EDITABLE]},mxGraph.prototype.isCellsEditable=function(){return this.cellsEditable},mxGraph.prototype.setCellsEditable=function(t){this.cellsEditable=t},mxGraph.prototype.isCellDisconnectable=function(t,e,n){return this.isCellsDisconnectable()&&!this.isCellLocked(t)},mxGraph.prototype.isCellsDisconnectable=function(){return this.cellsDisconnectable},mxGraph.prototype.setCellsDisconnectable=function(t){this.cellsDisconnectable=t},mxGraph.prototype.isValidSource=function(t){return null==t&&this.allowDanglingEdges||null!=t&&(!this.model.isEdge(t)||this.connectableEdges)&&this.isCellConnectable(t)},mxGraph.prototype.isValidTarget=function(t){return this.isValidSource(t)},mxGraph.prototype.isValidConnection=function(t,e){return this.isValidSource(t)&&this.isValidTarget(e)},mxGraph.prototype.setConnectable=function(t){this.connectionHandler.setEnabled(t)},mxGraph.prototype.isConnectable=function(){return this.connectionHandler.isEnabled()},mxGraph.prototype.setTooltips=function(t){this.tooltipHandler.setEnabled(t)},mxGraph.prototype.setPanning=function(t){this.panningHandler.panningEnabled=t},mxGraph.prototype.isEditing=function(t){if(null!=this.cellEditor){var e=this.cellEditor.getEditingCell();return null==t?null!=e:t==e}return!1},mxGraph.prototype.isAutoSizeCell=function(t){var e=this.view.getState(t);return t=null!=e?e.style:this.getCellStyle(t),this.isAutoSizeCells()||1==t[mxConstants.STYLE_AUTOSIZE]},mxGraph.prototype.isAutoSizeCells=function(){return this.autoSizeCells},mxGraph.prototype.setAutoSizeCells=function(t){this.autoSizeCells=t},mxGraph.prototype.isExtendParent=function(t){return!this.getModel().isEdge(t)&&this.isExtendParents()},mxGraph.prototype.isExtendParents=function(){return this.extendParents},mxGraph.prototype.setExtendParents=function(t){this.extendParents=t},mxGraph.prototype.isExtendParentsOnAdd=function(t){return this.extendParentsOnAdd},mxGraph.prototype.setExtendParentsOnAdd=function(t){this.extendParentsOnAdd=t},mxGraph.prototype.isExtendParentsOnMove=function(){return this.extendParentsOnMove},mxGraph.prototype.setExtendParentsOnMove=function(t){this.extendParentsOnMove=t},mxGraph.prototype.isRecursiveResize=function(t){return this.recursiveResize},mxGraph.prototype.setRecursiveResize=function(t){this.recursiveResize=t},mxGraph.prototype.isConstrainChild=function(t){return this.isConstrainChildren()&&!this.getModel().isEdge(this.getModel().getParent(t))},mxGraph.prototype.isConstrainChildren=function(){return this.constrainChildren},mxGraph.prototype.setConstrainChildren=function(t){this.constrainChildren=t},mxGraph.prototype.isConstrainRelativeChildren=function(){return this.constrainRelativeChildren},mxGraph.prototype.setConstrainRelativeChildren=function(t){this.constrainRelativeChildren=t},mxGraph.prototype.isAllowNegativeCoordinates=function(){return this.allowNegativeCoordinates},mxGraph.prototype.setAllowNegativeCoordinates=function(t){this.allowNegativeCoordinates=t},mxGraph.prototype.getOverlap=function(t){return this.isAllowOverlapParent(t)?this.defaultOverlap:0},mxGraph.prototype.isAllowOverlapParent=function(t){return!1},mxGraph.prototype.getFoldableCells=function(t,e){return this.model.filterCells(t,mxUtils.bind(this,(function(t){return this.isCellFoldable(t,e)})))},mxGraph.prototype.isCellFoldable=function(t,e){var n=null!=(n=this.view.getState(t))?n.style:this.getCellStyle(t);return 0mxUtils.indexOf(t,o);)o=this.model.getParent(o);return this.model.isLayer(n)||null!=o?null:n},mxGraph.prototype.getDefaultParent=function(){var t=this.getCurrentRoot();return null==t&&(null==(t=this.defaultParent)&&(t=this.model.getRoot(),t=this.model.getChildAt(t,0))),t},mxGraph.prototype.setDefaultParent=function(t){this.defaultParent=t},mxGraph.prototype.getSwimlane=function(t){for(;null!=t&&!this.isSwimlane(t);)t=this.model.getParent(t);return t},mxGraph.prototype.getSwimlaneAt=function(t,e,n){if(null!=(n=n||this.getDefaultParent()))for(var i=this.model.getChildCount(n),s=0;st.width*s||0t.height*s)return!0}return!1},mxGraph.prototype.getChildVertices=function(t){return this.getChildCells(t,!0,!1)},mxGraph.prototype.getChildEdges=function(t){return this.getChildCells(t,!1,!0)},mxGraph.prototype.getChildCells=function(t,e,n){for(t=null!=t?t:this.getDefaultParent(),t=this.model.getChildCells(t,null!=e&&e,null!=n&&n),e=[],n=0;n=t&&d.y+d.height<=a&&d.y>=e&&d.x+d.width<=l?r.push(p):this.getCells(t,e,n,i,p,r)}}}return r},mxGraph.prototype.getCellsBeyond=function(t,e,n,i,s){var r=[];if((i||s)&&(null==n&&(n=this.getDefaultParent()),null!=n))for(var o=this.model.getChildCount(n),l=0;l=t)&&(!s||h.y>=e)&&r.push(a)}return r},mxGraph.prototype.findTreeRoots=function(t,e,n){e=null!=e&&e,n=null!=n&&n;var i=[];if(null!=t){for(var s=this.getModel(),r=s.getChildCount(t),o=null,l=0,a=0;al&&(l=u,o=h)}}0==i.length&&null!=o&&i.push(o)}return i},mxGraph.prototype.traverse=function(t,e,n,i,s,r){if(null!=n&&null!=t&&(e=null==e||e,r=null!=r&&r,!(s=s||new mxDictionary).get(t)&&(s.put(t,!0),null==(i=n(t,i))||i))&&0<(i=this.model.getEdgeCount(t)))for(var o=0;oe?r-1:e)),this.setSelectionCell(t)):this.getCurrentRoot()!=s&&this.setSelectionCell(s)},mxGraph.prototype.selectAll=function(t,e){t=t||this.getDefaultParent();var n=e?this.model.filterDescendants(mxUtils.bind(this,(function(e){return e!=t&&null!=this.view.getState(e)})),t):this.model.getChildren(t);null!=n&&this.setSelectionCells(n)},mxGraph.prototype.selectVertices=function(t,e){this.selectCells(!0,!1,t,e)},mxGraph.prototype.selectEdges=function(t){this.selectCells(!1,!0,t)},mxGraph.prototype.selectCells=function(t,e,n,i){n=n||this.getDefaultParent();var s=mxUtils.bind(this,(function(n){return null!=this.view.getState(n)&&((i||0==this.model.getChildCount(n))&&this.model.isVertex(n)&&t&&!this.model.isEdge(this.model.getParent(n))||this.model.isEdge(n)&&e)}));null!=(n=this.model.filterDescendants(s,n))&&this.setSelectionCells(n)},mxGraph.prototype.selectCellForEvent=function(t,e){var n=this.isCellSelected(t);this.isToggleEvent(e)?n?this.removeSelectionCell(t):this.addSelectionCell(t):n&&1==this.getSelectionCount()||this.setSelectionCell(t)},mxGraph.prototype.selectCellsForEvent=function(t,e){this.isToggleEvent(e)?this.addSelectionCells(t):this.setSelectionCells(t)},mxGraph.prototype.createHandler=function(t){var e=null;if(null!=t)if(this.model.isEdge(t.cell)){e=t.getVisibleTerminalState(!0);var n=t.getVisibleTerminalState(!1),i=this.getCellGeometry(t.cell);e=this.view.getEdgeStyle(t,null!=i?i.points:null,e,n),e=this.createEdgeHandler(t,e)}else e=this.createVertexHandler(t);return e},mxGraph.prototype.createVertexHandler=function(t){return new mxVertexHandler(t)},mxGraph.prototype.createEdgeHandler=function(t,e){return e==mxEdgeStyle.Loop||e==mxEdgeStyle.ElbowConnector||e==mxEdgeStyle.SideToSide||e==mxEdgeStyle.TopToBottom?this.createElbowEdgeHandler(t):e==mxEdgeStyle.SegmentConnector||e==mxEdgeStyle.OrthConnector?this.createEdgeSegmentHandler(t):new mxEdgeHandler(t)},mxGraph.prototype.createEdgeSegmentHandler=function(t){return new mxEdgeSegmentHandler(t)},mxGraph.prototype.createElbowEdgeHandler=function(t){return new mxElbowEdgeHandler(t)},mxGraph.prototype.addMouseListener=function(t){null==this.mouseListeners&&(this.mouseListeners=[]),this.mouseListeners.push(t)},mxGraph.prototype.removeMouseListener=function(t){if(null!=this.mouseListeners)for(var e=0;e=mxClient.IOS_VERSION&&t==mxEvent.MOUSE_DOWN&&!i&&!mxEvent.isPenEvent(e.getEvent())&&(this.eventSource=e.getSource(),this.mouseMoveRedirect=mxUtils.bind(this,(function(t){this.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(t,this.getStateForTouchEvent(t)))})),this.mouseUpRedirect=mxUtils.bind(this,(function(t){this.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(t,this.getStateForTouchEvent(t)))})),mxEvent.addGestureListeners(this.eventSource,null,this.mouseMoveRedirect,this.mouseUpRedirect)):s=!0,this.isSyntheticEventIgnored(t,e,n)&&(s=!0),!mxEvent.isPopupTrigger(this.lastEvent)&&t!=mxEvent.MOUSE_MOVE&&2==this.lastEvent.detail||(t==mxEvent.MOUSE_UP&&this.isMouseDown?this.isMouseDown=!1:t!=mxEvent.MOUSE_DOWN||this.isMouseDown?!s&&((!mxClient.IS_FF||t!=mxEvent.MOUSE_MOVE)&&this.isMouseDown&&this.isMouseTrigger!=i||t==mxEvent.MOUSE_DOWN&&this.isMouseDown||t==mxEvent.MOUSE_UP&&!this.isMouseDown)&&(s=!0):(this.isMouseDown=!0,this.isMouseTrigger=i),s||t!=mxEvent.MOUSE_DOWN||(this.lastMouseX=e.getX(),this.lastMouseY=e.getY()),s)},mxGraph.prototype.isSyntheticEventIgnored=function(t,e,n){return n=!1,e=mxEvent.isMouseEvent(e.getEvent()),this.ignoreMouseEvents&&e&&t!=mxEvent.MOUSE_MOVE?(this.ignoreMouseEvents=t!=mxEvent.MOUSE_UP,n=!0):mxClient.IS_FF&&!e&&t==mxEvent.MOUSE_UP&&(this.ignoreMouseEvents=!0),n},mxGraph.prototype.isEventSourceIgnored=function(t,e){var n=e.getSource(),i=null!=n.nodeName?n.nodeName.toLowerCase():"",s=!mxEvent.isMouseEvent(e.getEvent())||mxEvent.isLeftMouseButton(e.getEvent());return t==mxEvent.MOUSE_DOWN&&s&&("select"==i||"option"==i||"input"==i&&"checkbox"!=n.type&&"radio"!=n.type&&"button"!=n.type&&"submit"!=n.type&&"file"!=n.type)},mxGraph.prototype.getEventState=function(t){return t},mxGraph.prototype.fireMouseEvent=function(t,e,n){if(this.isEventSourceIgnored(t,e))null!=this.tooltipHandler&&this.tooltipHandler.hide();else{if(null==n&&(n=this),e=this.updateMouseEvent(e,t),!this.nativeDblClickEnabled&&!mxEvent.isPopupTrigger(e.getEvent())||this.doubleTapEnabled&&mxClient.IS_TOUCH&&(mxEvent.isTouchEvent(e.getEvent())||mxEvent.isPenEvent(e.getEvent()))){var i=(new Date).getTime();if(!mxClient.IS_QUIRKS&&t==mxEvent.MOUSE_DOWN||mxClient.IS_QUIRKS&&t==mxEvent.MOUSE_UP&&!this.fireDoubleClick)if(null!=this.lastTouchEvent&&this.lastTouchEvent!=e.getEvent()&&i-this.lastTouchTimethis.doubleClickCounter){if(this.doubleClickCounter++,i=!1,t==mxEvent.MOUSE_UP?e.getCell()==this.lastTouchCell&&null!=this.lastTouchCell&&(this.lastTouchTime=0,i=this.lastTouchCell,this.lastTouchCell=null,mxClient.IS_QUIRKS&&e.getSource().fireEvent("ondblclick"),this.dblClick(e.getEvent(),i),i=!0):(this.fireDoubleClick=!0,this.lastTouchTime=0),!mxClient.IS_QUIRKS||i)return void mxEvent.consume(e.getEvent())}else null!=this.lastTouchEvent&&this.lastTouchEvent==e.getEvent()||(this.lastTouchCell=e.getCell(),this.lastTouchX=e.getX(),this.lastTouchY=e.getY(),this.lastTouchTime=i,this.lastTouchEvent=e.getEvent(),this.doubleClickCounter=0);else if((this.isMouseDown||t==mxEvent.MOUSE_UP)&&this.fireDoubleClick)return this.fireDoubleClick=!1,i=this.lastTouchCell,this.lastTouchCell=null,this.isMouseDown=!1,void((null!=i||(mxEvent.isTouchEvent(e.getEvent())||mxEvent.isPenEvent(e.getEvent()))&&(mxClient.IS_GC||mxClient.IS_SF))&&Math.abs(this.lastTouchX-e.getX())n.x&&(r-=n.x),0>n.y&&(o-=n.y),e.translate.x==r&&e.translate.y==o||(e.translate.x=r,e.translate.y=o,t=!0);n=e.translate,r=(i=this.source.getView().scale)/e.scale,o=1/e.scale;var l=this.source.container;this.bounds=new mxRectangle((n.x-s.x-this.source.panDx)/o,(n.y-s.y-this.source.panDy)/o,l.clientWidth/r,l.clientHeight/r),this.bounds.x+=this.source.container.scrollLeft*e.scale/i,this.bounds.y+=this.source.container.scrollTop*e.scale/i,(n=this.selectionBorder.bounds).x==this.bounds.x&&n.y==this.bounds.y&&n.width==this.bounds.width&&n.height==this.bounds.height||(this.selectionBorder.bounds=this.bounds,this.selectionBorder.redraw()),n=this.sizer.bounds,e=new mxRectangle(this.bounds.x+this.bounds.width-n.width/2,this.bounds.y+this.bounds.height-n.height/2,n.width,n.height),n.x==e.x&&n.y==e.y&&n.width==e.width&&n.height==e.height||(this.sizer.bounds=e,"hidden"!=this.sizer.node.style.visibility&&this.sizer.redraw()),t&&this.outline.view.revalidate()}}},mxOutline.prototype.mouseDown=function(t,e){if(this.enabled&&this.showViewport){var n=mxEvent.isMouseEvent(e.getEvent())?0:this.source.tolerance;n=this.source.allowHandleBoundsCheck&&(mxClient.IS_IE||0=this.max)||!this.source&&(0==this.max||r>=this.max))&&(o+=this.countError+"\n"),null!=this.validNeighbors&&null!=this.typeError&&0mxUtils.indexOf(t,r)&&(null!=(r=this.getLayout(r))&&r.moveCell(t[s],n.x,n.y))}},mxLayoutManager.prototype.getCellsForChanges=function(t){for(var e=new mxDictionary,n=[],i=0;ithis.graph.model.getChildCount(s),o=new mxDictionary;for(t=this.graph.getOpposites(this.graph.getEdges(this.cell),this.cell),e=0;es||Math.abs(i.y)>s){null==this.highlight&&(this.highlight=new mxCellHighlight(this.graph,mxConstants.DROP_TARGET_COLOR,3));s=n.isCloneEvent(e.getEvent())&&n.isCellsCloneable()&&this.isCloneEnabled();var r=n.isGridEnabledEvent(e.getEvent()),o=e.getCell(),l=!0,a=null;this.cloning=s,n.isDropEnabled()&&this.highlightEnabled&&(a=n.getDropTarget(this.cells,e.getEvent(),o,s));var h=n.getView().getState(a),u=!1;null==h||n.model.getParent(this.cell)==a&&!s?(this.target=null,this.connectOnDrop&&null!=o&&1==this.cells.length&&n.getModel().isVertex(o)&&n.isCellConnectable(o)&&(null!=(h=n.getView().getState(o))&&(o=null==n.getEdgeValidationError(null,this.cell,o)?mxConstants.VALID_COLOR:mxConstants.INVALID_CONNECT_TARGET_COLOR,this.setHighlightColor(o),u=!0))):(this.target!=a&&(this.target=a,this.setHighlightColor(mxConstants.DROP_TARGET_COLOR)),u=!0),null!=h&&u?this.highlight.highlight(h):this.highlight.hide(),this.livePreviewActive&&s?(this.resetLivePreview(),this.livePreviewActive=!1):this.maxLivePreview>=this.cellCount&&!this.livePreviewActive&&this.allowLivePreview?s&&this.livePreviewActive||(this.setHandlesVisibleForCells(this.graph.getSelectionCells(),!1),this.livePreviewUsed=this.livePreviewActive=!0):this.livePreviewUsed||null!=this.shape||(this.shape=this.createPreviewShape(this.bounds)),null!=this.guide&&this.useGuidesForEvent(e)?(i=this.guide.move(this.bounds,i,r,s),l=!1):i=this.graph.snapDelta(i,this.bounds,!r,!1,!1),null!=this.guide&&l&&this.guide.hide(),n.isConstrainedEvent(e.getEvent())&&(Math.abs(i.x)>Math.abs(i.y)?i.y=0:i.x=0),this.currentDx==i.x&&this.currentDy==i.y||(this.currentDx=i.x,this.currentDy=i.y,this.updatePreview())}this.updateHint(e),this.consumeMouseEvent(mxEvent.MOUSE_MOVE,e),mxEvent.consume(e.getEvent())}},mxGraphHandler.prototype.updatePreview=function(t){this.livePreviewUsed&&!t?null!=this.cells&&this.updateLivePreview(this.currentDx,this.currentDy):this.updatePreviewShape()},mxGraphHandler.prototype.updatePreviewShape=function(){null!=this.shape&&(this.shape.bounds=new mxRectangle(Math.round(this.pBounds.x+this.currentDx),Math.round(this.pBounds.y+this.currentDy),this.pBounds.width,this.pBounds.height),this.shape.redraw())},mxGraphHandler.prototype.updateLivePreview=function(t,e){if(!this.suspended){var n=[];null!=this.allCells&&this.allCells.visit(mxUtils.bind(this,(function(i,s){var r=s.clone();n.push([s,r]),null!=s.shape&&(null==s.shape.originalPointerEvents&&(s.shape.originalPointerEvents=s.shape.pointerEvents),s.shape.pointerEvents=!1,null!=s.text&&(null==s.text.originalPointerEvents&&(s.text.originalPointerEvents=s.text.pointerEvents),s.text.pointerEvents=!1)),this.graph.model.isVertex(s.cell)&&(s.x+=t,s.y+=e,this.cloning||(s.view.graph.cellRenderer.redraw(s,!0),s.view.invalidate(s.cell),s.invalid=!1,null!=s.control&&null!=s.control.node&&(s.control.node.style.visibility="hidden")))})));for(var i=this.graph.view.scale,s=0;sthis.graph.tolerance||Math.abs(this.dy)>this.graph.tolerance,!n&&this.active&&this.fireEvent(new mxEventObject(mxEvent.PAN_START,"event",e))}(this.active||this.panningTrigger)&&e.consume()},mxPanningHandler.prototype.mouseUp=function(t,e){if(this.active){if(null!=this.dx&&null!=this.dy){if(!this.graph.useScrollbarsForPanning||!mxUtils.hasScrollbars(this.graph.container)){var n=this.graph.getView().scale,i=this.graph.getView().translate;this.graph.panGraph(0,0),this.panGraph(i.x+this.dx/n,i.y+this.dy/n)}e.consume()}this.fireEvent(new mxEventObject(mxEvent.PAN_END,"event",e))}this.reset()},mxPanningHandler.prototype.zoomGraph=function(t){var e=Math.round(this.initialScale*t.scale*100)/100;null!=this.minScale&&(e=Math.max(this.minScale,e)),null!=this.maxScale&&(e=Math.min(this.maxScale,e)),this.graph.view.scale!=e&&(this.graph.zoomTo(e),mxEvent.consume(t))},mxPanningHandler.prototype.reset=function(){this.panningTrigger=!1,this.mouseDownEvent=null,this.active=!1,this.dy=this.dx=null},mxPanningHandler.prototype.panGraph=function(t,e){this.graph.getView().setTranslate(t,e)},mxPanningHandler.prototype.destroy=function(){this.graph.removeMouseListener(this),this.graph.removeListener(this.forcePanningHandler),this.graph.removeListener(this.gestureHandler),mxEvent.removeListener(document,"mouseup",this.mouseUpListener)},mxPopupMenuHandler.prototype=new mxPopupMenu,mxPopupMenuHandler.prototype.constructor=mxPopupMenuHandler,mxPopupMenuHandler.prototype.graph=null,mxPopupMenuHandler.prototype.selectOnPopup=!0,mxPopupMenuHandler.prototype.clearSelectionOnBackground=!0,mxPopupMenuHandler.prototype.triggerX=null,mxPopupMenuHandler.prototype.triggerY=null,mxPopupMenuHandler.prototype.screenX=null,mxPopupMenuHandler.prototype.screenY=null,mxPopupMenuHandler.prototype.init=function(){mxPopupMenu.prototype.init.apply(this),mxEvent.addGestureListeners(this.div,mxUtils.bind(this,(function(t){this.graph.tooltipHandler.hide()})))},mxPopupMenuHandler.prototype.isSelectOnPopup=function(t){return this.selectOnPopup},mxPopupMenuHandler.prototype.mouseDown=function(t,e){this.isEnabled()&&!mxEvent.isMultiTouchEvent(e.getEvent())&&(this.hideMenu(),this.triggerX=e.getGraphX(),this.triggerY=e.getGraphY(),this.screenX=mxEvent.getMainEvent(e.getEvent()).screenX,this.screenY=mxEvent.getMainEvent(e.getEvent()).screenY,this.popupTrigger=this.isPopupTrigger(e),this.inTolerance=!0)},mxPopupMenuHandler.prototype.mouseMove=function(t,e){this.inTolerance&&null!=this.screenX&&null!=this.screenY&&(Math.abs(mxEvent.getMainEvent(e.getEvent()).screenX-this.screenX)>this.graph.tolerance||Math.abs(mxEvent.getMainEvent(e.getEvent()).screenY-this.screenY)>this.graph.tolerance)&&(this.inTolerance=!1)},mxPopupMenuHandler.prototype.mouseUp=function(t,e){if(this.popupTrigger&&this.inTolerance&&null!=this.triggerX&&null!=this.triggerY){var n=this.getCellForPopupEvent(e);this.graph.isEnabled()&&this.isSelectOnPopup(e)&&null!=n&&!this.graph.isCellSelected(n)?this.graph.setSelectionCell(n):this.clearSelectionOnBackground&&null==n&&this.graph.clearSelection(),this.graph.tooltipHandler.hide();var i=mxUtils.getScrollOrigin();this.popup(e.getX()+i.x+1,e.getY()+i.y+1,n,e.getEvent()),e.consume()}this.inTolerance=this.popupTrigger=!1},mxPopupMenuHandler.prototype.getCellForPopupEvent=function(t){return t.getCell()},mxPopupMenuHandler.prototype.destroy=function(){this.graph.removeMouseListener(this),this.graph.removeListener(this.gestureHandler),mxPopupMenu.prototype.destroy.apply(this)},mxUtils.extend(mxCellMarker,mxEventSource),mxCellMarker.prototype.graph=null,mxCellMarker.prototype.enabled=!0,mxCellMarker.prototype.hotspot=mxConstants.DEFAULT_HOTSPOT,mxCellMarker.prototype.hotspotEnabled=!1,mxCellMarker.prototype.validColor=null,mxCellMarker.prototype.invalidColor=null,mxCellMarker.prototype.currentColor=null,mxCellMarker.prototype.validState=null,mxCellMarker.prototype.markedState=null,mxCellMarker.prototype.setEnabled=function(t){this.enabled=t},mxCellMarker.prototype.isEnabled=function(){return this.enabled},mxCellMarker.prototype.setHotspot=function(t){this.hotspot=t},mxCellMarker.prototype.getHotspot=function(){return this.hotspot},mxCellMarker.prototype.setHotspotEnabled=function(t){this.hotspotEnabled=t},mxCellMarker.prototype.isHotspotEnabled=function(){return this.hotspotEnabled},mxCellMarker.prototype.hasValidState=function(){return null!=this.validState},mxCellMarker.prototype.getValidState=function(){return this.validState},mxCellMarker.prototype.getMarkedState=function(){return this.markedState},mxCellMarker.prototype.reset=function(){this.validState=null,null!=this.markedState&&(this.markedState=null,this.unmark())},mxCellMarker.prototype.process=function(t){var e=null;return this.isEnabled()&&(e=this.getState(t),this.setCurrentState(e,t)),e},mxCellMarker.prototype.setCurrentState=function(t,e,n){var i=null!=t&&this.isValidState(t);n=null!=n?n:this.getMarkerColor(e.getEvent(),t,i),this.validState=i?t:null,t==this.markedState&&n==this.currentColor||(this.currentColor=n,null!=t&&null!=this.currentColor?(this.markedState=t,this.mark()):null!=this.markedState&&(this.markedState=null,this.unmark()))},mxCellMarker.prototype.markCell=function(t,e){var n=this.graph.getView().getState(t);null!=n&&(this.currentColor=null!=e?e:this.validColor,this.markedState=n,this.mark())},mxCellMarker.prototype.mark=function(){this.highlight.setHighlightColor(this.currentColor),this.highlight.highlight(this.markedState),this.fireEvent(new mxEventObject(mxEvent.MARK,"state",this.markedState))},mxCellMarker.prototype.unmark=function(){this.mark()},mxCellMarker.prototype.isValidState=function(t){return!0},mxCellMarker.prototype.getMarkerColor=function(t,e,n){return n?this.validColor:this.invalidColor},mxCellMarker.prototype.getState=function(t){var e=this.graph.getView(),n=this.getCell(t);return null!=(e=this.getStateToMark(e.getState(n)))&&this.intersects(e,t)?e:null},mxCellMarker.prototype.getCell=function(t){return t.getCell()},mxCellMarker.prototype.getStateToMark=function(t){return t},mxCellMarker.prototype.intersects=function(t,e){return!this.hotspotEnabled||mxUtils.intersectsHotspot(t,e.getGraphX(),e.getGraphY(),this.hotspot,mxConstants.MIN_HOTSPOT_SIZE,mxConstants.MAX_HOTSPOT_SIZE)},mxCellMarker.prototype.destroy=function(){this.graph.getView().removeListener(this.resetHandler),this.graph.getModel().removeListener(this.resetHandler),this.highlight.destroy()},mxUtils.extend(mxSelectionCellsHandler,mxEventSource),mxSelectionCellsHandler.prototype.graph=null,mxSelectionCellsHandler.prototype.enabled=!0,mxSelectionCellsHandler.prototype.refreshHandler=null,mxSelectionCellsHandler.prototype.maxHandlers=100,mxSelectionCellsHandler.prototype.handlers=null,mxSelectionCellsHandler.prototype.isEnabled=function(){return this.enabled},mxSelectionCellsHandler.prototype.setEnabled=function(t){this.enabled=t},mxSelectionCellsHandler.prototype.getHandler=function(t){return this.handlers.get(t)},mxSelectionCellsHandler.prototype.reset=function(){this.handlers.visit((function(t,e){e.reset.apply(e)}))},mxSelectionCellsHandler.prototype.refresh=function(){var t=this.handlers;this.handlers=new mxDictionary;for(var e=this.graph.getSelectionCells(),n=0;nthis.graph.tolerance||Math.abs(e.getGraphY()-this.first.y)>this.graph.tolerance)&&this.updateCurrentState(e,s),null!=this.first){var r=null;n=s;if(null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus&&null!=this.constraintHandler.currentPoint?(r=this.constraintHandler.currentConstraint,n=this.constraintHandler.currentPoint.clone()):null!=this.previous&&!this.graph.isIgnoreTerminalEvent(e.getEvent())&&mxEvent.isShiftDown(e.getEvent())&&(Math.abs(this.previous.getCenterX()-s.x)this.graph.tolerance||o>this.graph.tolerance)&&(this.shape=this.createShape(),null!=this.edgeState&&this.shape.apply(this.edgeState),this.updateCurrentState(e,s)),null!=this.shape&&(null!=this.edgeState?this.shape.points=this.edgeState.absolutePoints:(s=[i],null!=this.waypoints&&(s=s.concat(this.waypoints)),s.push(n),this.shape.points=s),this.drawPreview()),null!=this.cursor&&(this.graph.container.style.cursor=this.cursor),mxEvent.consume(e.getEvent()),e.consume()}else this.isEnabled()&&this.graph.isEnabled()?this.previous!=this.currentState&&null==this.edgeState?(this.destroyIcons(),null!=this.currentState&&null==this.error&&null==this.constraintHandler.currentConstraint&&(this.icons=this.createIcons(this.currentState),null==this.icons&&(this.currentState.setCursor(mxConstants.CURSOR_CONNECT),e.consume())),this.previous=this.currentState):this.previous!=this.currentState||null==this.currentState||null!=this.icons||this.graph.isMouseDown||e.consume():this.constraintHandler.reset();if(!this.graph.isMouseDown&&null!=this.currentState&&null!=this.icons){for(s=!1,n=e.getSource(),i=0;ithis.graph.tolerance||e>this.graph.tolerance))&&(null==this.waypoints&&(this.waypoints=[]),n=this.graph.view.scale,e=new mxPoint(this.graph.snap(t.getGraphX()/n)*n,this.graph.snap(t.getGraphY()/n)*n),this.waypoints.push(e))},mxConnectionHandler.prototype.checkConstraints=function(t,e){return null==t||null==e||null==t.point||null==e.point||!t.point.equals(e.point)||t.dx!=e.dx||t.dy!=e.dy||t.perimeter!=e.perimeter},mxConnectionHandler.prototype.mouseUp=function(t,e){if(!e.isConsumed()&&this.isConnecting()){if(this.waypointsEnabled&&!this.isStopEvent(e))return this.addWaypointForEvent(e),void e.consume();var n=this.sourceConstraint,i=this.constraintHandler.currentConstraint,s=null!=this.previous?this.previous.cell:null,r=null;null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus&&(r=this.constraintHandler.currentFocus.cell),null==r&&null!=this.currentState&&(r=this.currentState.cell),null!=this.error||null!=s&&null!=r&&s==r&&!this.checkConstraints(n,i)?(null!=this.previous&&null!=this.marker.validState&&this.previous.cell==this.marker.validState.cell&&this.graph.selectCellForEvent(this.marker.source,e.getEvent()),null!=this.error&&0o||Math.abs(r)>o)&&(null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(i,n),e.consume())}},mxRubberband.prototype.createShape=function(){null==this.sharedDiv&&(this.sharedDiv=document.createElement("div"),this.sharedDiv.className="mxRubberband",mxUtils.setOpacity(this.sharedDiv,this.defaultOpacity)),this.graph.container.appendChild(this.sharedDiv);var t=this.sharedDiv;return mxClient.IS_SVG&&(!mxClient.IS_IE||10<=document.documentMode)&&this.fadeOut&&(this.sharedDiv=null),t},mxRubberband.prototype.isActive=function(t,e){return null!=this.div&&"none"!=this.div.style.display},mxRubberband.prototype.mouseUp=function(t,e){var n=this.isActive();this.reset(),n&&(this.execute(e.getEvent()),e.consume())},mxRubberband.prototype.execute=function(t){var e=new mxRectangle(this.x,this.y,this.width,this.height);this.graph.selectRegion(e,t)},mxRubberband.prototype.reset=function(){if(null!=this.div)if(mxClient.IS_SVG&&(!mxClient.IS_IE||10<=document.documentMode)&&this.fadeOut){var t=this.div;mxUtils.setPrefixedStyle(t.style,"transition","all 0.2s linear"),t.style.pointerEvents="none",t.style.opacity=0,window.setTimeout((function(){t.parentNode.removeChild(t)}),200)}else this.div.parentNode.removeChild(this.div);mxEvent.removeGestureListeners(document,null,this.dragHandler,this.dropHandler),this.dropHandler=this.dragHandler=null,this.currentY=this.currentX=0,this.div=this.first=null},mxRubberband.prototype.update=function(t,e){this.currentX=t,this.currentY=e,this.repaint()},mxRubberband.prototype.repaint=function(){if(null!=this.div){var t=this.currentX-this.graph.panDx,e=this.currentY-this.graph.panDy;this.x=Math.min(this.first.x,t),this.y=Math.min(this.first.y,e),this.width=Math.max(this.first.x,t)-this.x,this.height=Math.max(this.first.y,e)-this.y,t=mxClient.IS_VML?this.graph.panDy:0,this.div.style.left=this.x+(mxClient.IS_VML?this.graph.panDx:0)+"px",this.div.style.top=this.y+t+"px",this.div.style.width=Math.max(1,this.width)+"px",this.div.style.height=Math.max(1,this.height)+"px"}},mxRubberband.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,this.graph.removeMouseListener(this),this.graph.removeListener(this.forceRubberbandHandler),this.graph.removeListener(this.panHandler),this.reset(),null!=this.sharedDiv&&(this.sharedDiv=null))},mxHandle.prototype.cursor="default",mxHandle.prototype.image=null,mxHandle.prototype.ignoreGrid=!1,mxHandle.prototype.getPosition=function(t){},mxHandle.prototype.setPosition=function(t,e,n){},mxHandle.prototype.execute=function(){},mxHandle.prototype.copyStyle=function(t){this.graph.setCellStyles(t,this.state.style[t],[this.state.cell])},mxHandle.prototype.processEvent=function(t){var e=this.graph.view.scale,n=this.graph.view.translate;n=new mxPoint(t.getGraphX()/e-n.x,t.getGraphY()/e-n.y);null!=this.shape&&null!=this.shape.bounds&&(n.x-=this.shape.bounds.width/e/4,n.y-=this.shape.bounds.height/e/4);e=-mxUtils.toRadians(this.getRotation());var i=-mxUtils.toRadians(this.getTotalRotation())-e;n=this.flipPoint(this.rotatePoint(this.snapPoint(this.rotatePoint(n,e),this.ignoreGrid||!this.graph.isGridEnabledEvent(t.getEvent())),i));this.setPosition(this.state.getPaintBounds(),n,t),this.positionChanged(),this.redraw()},mxHandle.prototype.positionChanged=function(){null!=this.state.text&&this.state.text.apply(this.state),null!=this.state.shape&&this.state.shape.apply(this.state),this.graph.cellRenderer.redraw(this.state,!0)},mxHandle.prototype.getRotation=function(){return null!=this.state.shape?this.state.shape.getRotation():0},mxHandle.prototype.getTotalRotation=function(){return null!=this.state.shape?this.state.shape.getShapeRotation():0},mxHandle.prototype.init=function(){var t=this.isHtmlRequired();null!=this.image?(this.shape=new mxImageShape(new mxRectangle(0,0,this.image.width,this.image.height),this.image.src),this.shape.preserveImageAspect=!1):this.shape=this.createShape(t),this.initShape(t)},mxHandle.prototype.createShape=function(t){return new mxRectangleShape(new mxRectangle(0,0,mxConstants.HANDLE_SIZE,mxConstants.HANDLE_SIZE),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)},mxHandle.prototype.initShape=function(t){t&&this.shape.isHtmlAllowed()?(this.shape.dialect=mxConstants.DIALECT_STRICTHTML,this.shape.init(this.graph.container)):(this.shape.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG,null!=this.cursor&&this.shape.init(this.graph.getView().getOverlayPane())),mxEvent.redirectMouseEvents(this.shape.node,this.graph,this.state),this.shape.node.style.cursor=this.cursor},mxHandle.prototype.redraw=function(){if(null!=this.shape&&null!=this.state.shape&&null!=(e=this.getPosition(this.state.getPaintBounds()))){var t=mxUtils.toRadians(this.getTotalRotation()),e=this.rotatePoint(this.flipPoint(e),t),n=(t=this.graph.view.scale,this.graph.view.translate);this.shape.bounds.x=Math.floor((e.x+n.x)*t-this.shape.bounds.width/2),this.shape.bounds.y=Math.floor((e.y+n.y)*t-this.shape.bounds.height/2),this.shape.redraw()}},mxHandle.prototype.isHtmlRequired=function(){return null!=this.state.text&&this.state.text.node.parentNode==this.graph.container},mxHandle.prototype.rotatePoint=function(t,e){var n=new mxPoint((n=this.state.getCellBounds()).getCenterX(),n.getCenterY());return mxUtils.getRotatedPoint(t,Math.cos(e),Math.sin(e),n)},mxHandle.prototype.flipPoint=function(t){if(null!=this.state.shape){var e=this.state.getCellBounds();this.state.shape.flipH&&(t.x=2*e.x+e.width-t.x),this.state.shape.flipV&&(t.y=2*e.y+e.height-t.y)}return t},mxHandle.prototype.snapPoint=function(t,e){return e||(t.x=this.graph.snap(t.x),t.y=this.graph.snap(t.y)),t},mxHandle.prototype.setVisible=function(t){null!=this.shape&&null!=this.shape.node&&(this.shape.node.style.display=t?"":"none")},mxHandle.prototype.reset=function(){this.setVisible(!0),this.state.style=this.graph.getCellStyle(this.state.cell),this.positionChanged()},mxHandle.prototype.destroy=function(){null!=this.shape&&(this.shape.destroy(),this.shape=null)},mxVertexHandler.prototype.graph=null,mxVertexHandler.prototype.state=null,mxVertexHandler.prototype.singleSizer=!1,mxVertexHandler.prototype.index=null,mxVertexHandler.prototype.allowHandleBoundsCheck=!0,mxVertexHandler.prototype.handleImage=null,mxVertexHandler.prototype.tolerance=0,mxVertexHandler.prototype.rotationEnabled=!1,mxVertexHandler.prototype.parentHighlightEnabled=!1,mxVertexHandler.prototype.rotationRaster=!0,mxVertexHandler.prototype.rotationCursor="crosshair",mxVertexHandler.prototype.livePreview=!1,mxVertexHandler.prototype.manageSizers=!1,mxVertexHandler.prototype.constrainGroupByChildren=!1,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxVertexHandler.prototype.horizontalOffset=0,mxVertexHandler.prototype.verticalOffset=0,mxVertexHandler.prototype.init=function(){if(this.graph=this.state.view.graph,this.selectionBounds=this.getSelectionBounds(this.state),this.bounds=new mxRectangle(this.selectionBounds.x,this.selectionBounds.y,this.selectionBounds.width,this.selectionBounds.height),this.selectionBorder=this.createSelectionShape(this.bounds),this.selectionBorder.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,this.selectionBorder.pointerEvents=!1,this.selectionBorder.rotation=Number(this.state.style[mxConstants.STYLE_ROTATION]||"0"),this.selectionBorder.init(this.graph.getView().getOverlayPane()),mxEvent.redirectMouseEvents(this.selectionBorder.node,this.graph,this.state),this.graph.isCellMovable(this.state.cell)&&this.selectionBorder.setCursor(mxConstants.CURSOR_MOVABLE_VERTEX),0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()this.state.width&&2>this.state.height&&(this.labelShape=this.createSizer(mxConstants.CURSOR_MOVABLE_VERTEX,mxEvent.LABEL_HANDLE,null,mxConstants.LABEL_HANDLE_FILLCOLOR),this.sizers.push(this.labelShape))}this.isRotationHandleVisible()&&(this.rotationShape=this.createSizer(this.rotationCursor,mxEvent.ROTATION_HANDLE,mxConstants.HANDLE_SIZE+3,mxConstants.HANDLE_FILLCOLOR),this.sizers.push(this.rotationShape)),this.customHandles=this.createCustomHandles(),this.redraw(),this.constrainGroupByChildren&&this.updateMinBounds()},mxVertexHandler.prototype.isRotationHandleVisible=function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()e?180:0,this.startDist=Math.sqrt(t*t+e*e)),this.livePreviewActive))for(this.hideSizers(),n==mxEvent.ROTATION_HANDLE?this.rotationShape.node.style.display="":n==mxEvent.LABEL_HANDLE?this.labelShape.node.style.display="":null!=this.sizers&&null!=this.sizers[n]?this.sizers[n].node.style.display="":n<=mxEvent.CUSTOM_HANDLE&&null!=this.customHandles&&this.customHandles[mxEvent.CUSTOM_HANDLE-n].setVisible(!0),n=this.graph.getEdges(this.state.cell),this.edgeHandlers=[],t=0;tthis.graph.tolerance||Math.abs(t.getGraphY()-this.startY)>this.graph.tolerance)&&(this.inTolerance=!1)},mxVertexHandler.prototype.updateHint=function(t){},mxVertexHandler.prototype.removeHint=function(){},mxVertexHandler.prototype.roundAngle=function(t){return Math.round(10*t)/10},mxVertexHandler.prototype.roundLength=function(t){return Math.round(100*t)/100},mxVertexHandler.prototype.mouseMove=function(t,e){e.isConsumed()||null==this.index?this.graph.isMouseDown||null==this.getHandleForEvent(e)||e.consume(!1):(this.checkTolerance(e),this.inTolerance||(this.index<=mxEvent.CUSTOM_HANDLE?null!=this.customHandles&&(this.customHandles[mxEvent.CUSTOM_HANDLE-this.index].processEvent(e),this.customHandles[mxEvent.CUSTOM_HANDLE-this.index].active=!0):this.index==mxEvent.LABEL_HANDLE?this.moveLabel(e):this.index==mxEvent.ROTATION_HANDLE?this.rotateVertex(e):this.resizeVertex(e),this.updateHint(e)),e.consume())},mxVertexHandler.prototype.moveLabel=function(t){var e=new mxPoint(t.getGraphX(),t.getGraphY()),n=this.graph.view.translate,i=this.graph.view.scale;this.graph.isGridEnabledEvent(t.getEvent())&&(e.x=(this.graph.snap(e.x/i-n.x)+n.x)*i,e.y=(this.graph.snap(e.y/i-n.y)+n.y)*i),this.moveSizerTo(this.sizers[null!=this.rotationShape?this.sizers.length-2:this.sizers.length-1],e.x,e.y)},mxVertexHandler.prototype.rotateVertex=function(t){var e=new mxPoint(t.getGraphX(),t.getGraphY()),n=this.state.x+this.state.width/2-e.x,i=this.state.y+this.state.height/2-e.y;this.currentAlpha=0!=n?180*Math.atan(i/n)/Math.PI+90:0>i?180:0,0t-this.startDist?15:25>t-this.startDist?5:1,this.currentAlpha=Math.round(this.currentAlpha/raster)*raster):this.currentAlpha=this.roundAngle(this.currentAlpha),this.selectionBorder.rotation=this.currentAlpha,this.selectionBorder.redraw(),this.livePreviewActive&&this.redrawHandles()},mxVertexHandler.prototype.resizeVertex=function(t){var e=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),n=mxUtils.toRadians(this.state.style[mxConstants.STYLE_ROTATION]||"0"),i=new mxPoint(t.getGraphX(),t.getGraphY()),s=this.graph.view.translate,r=this.graph.view.scale,o=Math.cos(-n),l=Math.sin(-n),a=(i=l*(a=i.x-this.startX)+o*(h=i.y-this.startY),o*a-l*h),h=i;o=this.graph.getCellGeometry(this.state.cell);this.unscaledBounds=this.union(o,a/r,h/r,this.index,this.graph.isGridEnabledEvent(t.getEvent()),1,new mxPoint(0,0),this.isConstrainedEvent(t),this.isCenteredEvent(this.state,t)),o.relative||(null!=(l=this.graph.getMaximumGraphBounds())&&null!=this.parentState&&((l=mxRectangle.fromRectangle(l)).x-=(this.parentState.x-s.x*r)/r,l.y-=(this.parentState.y-s.y*r)/r),this.graph.isConstrainChild(this.state.cell)&&(null!=(i=this.graph.getCellContainmentArea(this.state.cell))&&(0<(a=this.graph.getOverlap(this.state.cell))&&((i=mxRectangle.fromRectangle(i)).x-=i.width*a,i.y-=i.height*a,i.width+=2*i.width*a,i.height+=2*i.height*a),null==l?l=i:(l=mxRectangle.fromRectangle(l)).intersect(i))),null!=l&&(this.unscaledBounds.xl.x+l.width&&(this.unscaledBounds.width-=this.unscaledBounds.x+this.unscaledBounds.width-l.x-l.width),this.unscaledBounds.y+this.unscaledBounds.height>l.y+l.height&&(this.unscaledBounds.height-=this.unscaledBounds.y+this.unscaledBounds.height-l.y-l.height))),i=this.bounds,this.bounds=new mxRectangle((null!=this.parentState?this.parentState.x:s.x*r)+this.unscaledBounds.x*r,(null!=this.parentState?this.parentState.y:s.y*r)+this.unscaledBounds.y*r,this.unscaledBounds.width*r,this.unscaledBounds.height*r),o.relative&&null!=this.parentState&&(this.bounds.x+=this.state.x-this.parentState.x,this.bounds.y+=this.state.y-this.parentState.y),o=Math.cos(n),l=Math.sin(n),e=o*(a=(n=new mxPoint(this.bounds.getCenterX(),this.bounds.getCenterY())).x-e.x)-l*(h=n.y-e.y)-a,n=l*a+o*h-h,s=o*(a=this.bounds.x-this.state.x)-l*(h=this.bounds.y-this.state.y),o=l*a+o*h,this.bounds.x+=e,this.bounds.y+=n,this.unscaledBounds.x=this.roundLength(this.unscaledBounds.x+e/r),this.unscaledBounds.y=this.roundLength(this.unscaledBounds.y+n/r),this.unscaledBounds.width=this.roundLength(this.unscaledBounds.width),this.unscaledBounds.height=this.roundLength(this.unscaledBounds.height),this.graph.isCellCollapsed(this.state.cell)||0==e&&0==n?this.childOffsetY=this.childOffsetX=0:(this.childOffsetX=this.state.x-this.bounds.x+s,this.childOffsetY=this.state.y-this.bounds.y+o),i.equals(this.bounds)||(this.livePreviewActive&&this.updateLivePreview(t),null!=this.preview&&this.drawPreview())},mxVertexHandler.prototype.updateLivePreview=function(t){var e=this.graph.view.scale,n=this.graph.view.translate;t=this.state.clone(),this.state.x=this.bounds.x,this.state.y=this.bounds.y,this.state.origin=new mxPoint(this.state.x/e-n.x,this.state.y/e-n.y),this.state.width=this.bounds.width,this.state.height=this.bounds.height,new mxPoint((e=this.state.absoluteOffset).x,e.y),this.state.absoluteOffset.x=0,this.state.absoluteOffset.y=0,null!=(e=this.graph.getCellGeometry(this.state.cell))&&(null==(n=e.offset||this.EMPTY_POINT)||e.relative||(this.state.absoluteOffset.x=this.state.view.scale*n.x,this.state.absoluteOffset.y=this.state.view.scale*n.y),this.state.view.updateVertexLabelOffset(this.state)),this.state.view.graph.cellRenderer.redraw(this.state,!0),this.state.view.invalidate(this.state.cell),this.state.invalid=!1,this.state.view.validate(),this.redrawHandles(),null!=this.state.control&&null!=this.state.control.node&&(this.state.control.node.style.visibility="hidden"),this.state.setState(t)},mxVertexHandler.prototype.mouseUp=function(t,e){if(null!=this.index&&null!=this.state){var n=new mxPoint(e.getGraphX(),e.getGraphY()),i=this.index;this.index=null,this.graph.getModel().beginUpdate();try{if(i<=mxEvent.CUSTOM_HANDLE)null!=this.customHandles&&(this.customHandles[mxEvent.CUSTOM_HANDLE-i].active=!1,this.customHandles[mxEvent.CUSTOM_HANDLE-i].execute());else if(i==mxEvent.ROTATION_HANDLE)if(null!=this.currentAlpha){var s=this.currentAlpha-(this.state.style[mxConstants.STYLE_ROTATION]||0);0!=s&&this.rotateCell(this.state.cell,s)}else this.rotateClick();else{var r=this.graph.isGridEnabledEvent(e.getEvent()),o=mxUtils.toRadians(this.state.style[mxConstants.STYLE_ROTATION]||"0"),l=Math.cos(-o),a=Math.sin(-o),h=(n=a*(h=n.x-this.startX)+l*(u=n.y-this.startY),l*h-a*u),u=n,p=this.graph.view.scale,d=this.isRecursiveResize(this.state,e);this.resizeCell(this.state.cell,this.roundLength(h/p),this.roundLength(u/p),i,r,this.isConstrainedEvent(e),d)}}finally{this.graph.getModel().endUpdate()}e.consume(),this.reset()}},mxVertexHandler.prototype.isRecursiveResize=function(t,e){return this.graph.isRecursiveResize(this.state)},mxVertexHandler.prototype.rotateClick=function(){},mxVertexHandler.prototype.rotateCell=function(t,e,n){if(0!=e){var i=this.graph.getModel();if(i.isVertex(t)||i.isEdge(t)){var s;if(!i.isEdge(t))null!=(s=null!=(s=this.graph.view.getState(t))?s.style:this.graph.getCellStyle(t))&&this.graph.setCellStyles(mxConstants.STYLE_ROTATION,(s[mxConstants.STYLE_ROTATION]||0)+e,[t]);if(null!=(s=this.graph.getCellGeometry(t))){var r=this.graph.getCellGeometry(n);if(null==r||i.isEdge(n)||((s=s.clone()).rotate(e,new mxPoint(r.width/2,r.height/2)),i.setGeometry(t,s)),i.isVertex(t)&&!s.relative||i.isEdge(t))for(n=i.getChildCount(t),s=0;si&&(t+=n,t=s?this.graph.snap(t/r)*r:Math.round(t/r)*r),0==i||3==i||5==i?(p+=e,p=s?this.graph.snap(p/r)*r:Math.round(p/r)*r):2!=i&&4!=i&&7!=i||(d+=e,d=s?this.graph.snap(d/r)*r:Math.round(d/r)*r),s=d-p,n=c-t,l&&(null!=(l=this.graph.getCellGeometry(this.state.cell))&&(l=l.width/l.height,1==i||2==i||7==i||6==i?s=n*l:n=s/l,0==i&&(p=d-s,t=c-n))),a&&(p+=m-(p+(s+=s-h)/2),t+=g-(t+(n+=n-u)/2)),0>s&&(p+=s,s=Math.abs(s)),0>n&&(t+=n,n=Math.abs(n)),i=new mxRectangle(p+o.x*r,t+o.y*r,s,n),null!=this.minBounds&&(i.width=Math.max(i.width,this.minBounds.x*r+this.minBounds.width*r+Math.max(0,this.x0*r-i.x)),i.height=Math.max(i.height,this.minBounds.y*r+this.minBounds.height*r+Math.max(0,this.y0*r-i.y))),i},mxVertexHandler.prototype.redraw=function(t){this.selectionBounds=this.getSelectionBounds(this.state),this.bounds=new mxRectangle(this.selectionBounds.x,this.selectionBounds.y,this.selectionBounds.width,this.selectionBounds.height),this.drawPreview(),t||this.redrawHandles()},mxVertexHandler.prototype.getHandlePadding=function(){var t=new mxPoint(0,0),e=this.tolerance;return null!=this.sizers&&0=mxGraphHandler.prototype.maxCells)&&(this.bends=this.createBends(),this.isVirtualBendsEnabled()&&(this.virtualBends=this.createVirtualBends())),this.label=new mxPoint(this.state.absoluteOffset.x,this.state.absoluteOffset.y),this.labelShape=this.createLabelHandleShape(),this.initBend(this.labelShape),this.labelShape.setCursor(mxConstants.CURSOR_LABEL_HANDLE),this.customHandles=this.createCustomHandles(),this.redraw()},mxEdgeHandler.prototype.createCustomHandles=function(){return null},mxEdgeHandler.prototype.isVirtualBendsEnabled=function(t){return this.virtualBendsEnabled&&(null==this.state.style[mxConstants.STYLE_EDGE]||this.state.style[mxConstants.STYLE_EDGE]==mxConstants.NONE||1==this.state.style[mxConstants.STYLE_NOEDGESTYLE])&&"arrow"!=mxUtils.getValue(this.state.style,mxConstants.STYLE_SHAPE,null)},mxEdgeHandler.prototype.isCellEnabled=function(t){return!0},mxEdgeHandler.prototype.isAddPointEvent=function(t){return mxEvent.isShiftDown(t)},mxEdgeHandler.prototype.isRemovePointEvent=function(t){return mxEvent.isShiftDown(t)},mxEdgeHandler.prototype.getSelectionPoints=function(t){return t.absolutePoints},mxEdgeHandler.prototype.createParentHighlightShape=function(t){return(t=new mxRectangleShape(t,null,this.getSelectionColor())).strokewidth=this.getSelectionStrokeWidth(),t.isDashed=this.isSelectionDashed(),t},mxEdgeHandler.prototype.createSelectionShape=function(t){return(t=new this.state.shape.constructor).outline=!0,t.apply(this.state),t.isDashed=this.isSelectionDashed(),t.stroke=this.getSelectionColor(),t.isShadow=!1,t},mxEdgeHandler.prototype.getSelectionColor=function(){return mxConstants.EDGE_SELECTION_COLOR},mxEdgeHandler.prototype.getSelectionStrokeWidth=function(){return mxConstants.EDGE_SELECTION_STROKEWIDTH},mxEdgeHandler.prototype.isSelectionDashed=function(){return mxConstants.EDGE_SELECTION_DASHED},mxEdgeHandler.prototype.isConnectableCell=function(t){return!0},mxEdgeHandler.prototype.getCellAt=function(t,e){return this.outlineConnect?null:this.graph.getCellAt(t,e)},mxEdgeHandler.prototype.createMarker=function(){var t=new mxCellMarker(this.graph),e=this;return t.getCell=function(t){var n=mxCellMarker.prototype.getCell.apply(this,arguments);if(n!=e.state.cell&&null!=n||null==e.currentPoint||(n=e.graph.getCellAt(e.currentPoint.x,e.currentPoint.y)),null!=n&&!this.graph.isCellConnectable(n)){var i=this.graph.getModel().getParent(n);this.graph.getModel().isVertex(i)&&this.graph.isCellConnectable(i)&&(n=i)}return i=e.graph.getModel(),(this.graph.isSwimlane(n)&&null!=e.currentPoint&&this.graph.hitsSwimlaneContent(n,e.currentPoint.x,e.currentPoint.y)||!e.isConnectableCell(n)||n==e.state.cell||null!=n&&!e.graph.connectableEdges&&i.isEdge(n)||i.isAncestor(e.state.cell,n))&&(n=null),this.graph.isCellConnectable(n)||(n=null),n},t.isValidState=function(t){var n=e.graph.getModel();n=null!=(n=e.graph.view.getTerminalPort(t,e.graph.view.getState(n.getTerminal(e.state.cell,!e.isSource)),!e.isSource))?n.cell:null;return e.error=e.validateConnection(e.isSource?t.cell:n,e.isSource?n:t.cell),null==e.error},t},mxEdgeHandler.prototype.validateConnection=function(t,e){return this.graph.getEdgeValidationError(this.state.cell,t,e)},mxEdgeHandler.prototype.createBends=function(){for(var t=this.state.cell,e=[],n=0;nmxEvent.VIRTUAL_HANDLE&&null!=this.customHandles)for(n=0;nmxEvent.VIRTUAL_HANDLE&&(n[this.index-1]=i)}return null!=s?s:n},mxEdgeHandler.prototype.isOutlineConnectEvent=function(t){var e=mxUtils.getOffset(this.graph.container),n=t.getEvent(),i=mxEvent.getClientX(n),s=(n=mxEvent.getClientY(n),document.documentElement),r=this.currentPoint.x-this.graph.container.scrollLeft+e.x-((window.pageXOffset||s.scrollLeft)-(s.clientLeft||0));e=this.currentPoint.y-this.graph.container.scrollTop+e.y-((window.pageYOffset||s.scrollTop)-(s.clientTop||0));return this.outlineConnect&&!mxEvent.isShiftDown(t.getEvent())&&(t.isSource(this.marker.highlight.shape)||mxEvent.isAltDown(t.getEvent())&&null!=t.getState()||this.marker.highlight.isHighlightAt(i,n)||(r!=i||e!=n)&&null==t.getState()&&this.marker.highlight.isHighlightAt(r,e))},mxEdgeHandler.prototype.updatePreviewState=function(t,e,n,i,s){var r=this.isSource?n:this.state.getVisibleTerminalState(!0),o=this.isTarget?n:this.state.getVisibleTerminalState(!1),l=this.graph.getConnectionConstraint(t,r,!0),a=this.graph.getConnectionConstraint(t,o,!1),h=this.constraintHandler.currentConstraint;if(null==h&&s&&(null!=n?(i.isSource(this.marker.highlight.shape)&&(e=new mxPoint(i.getGraphX(),i.getGraphY())),h=this.graph.getOutlineConstraint(e,n,i),this.constraintHandler.setFocus(i,n,this.isSource),this.constraintHandler.currentConstraint=h,this.constraintHandler.currentPoint=e):h=new mxConnectionConstraint),this.outlineConnect&&null!=this.marker.highlight&&null!=this.marker.highlight.shape){var u=this.graph.view.scale;null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(this.marker.highlight.shape.stroke=s?mxConstants.OUTLINE_HIGHLIGHT_COLOR:"transparent",this.marker.highlight.shape.strokewidth=mxConstants.OUTLINE_HIGHLIGHT_STROKEWIDTH/u/u,this.marker.highlight.repaint()):this.marker.hasValidState()&&(this.marker.highlight.shape.stroke=this.marker.getValidState()==i.getState()?mxConstants.DEFAULT_VALID_COLOR:"transparent",this.marker.highlight.shape.strokewidth=mxConstants.HIGHLIGHT_STROKEWIDTH/u/u,this.marker.highlight.repaint())}this.isSource?l=h:this.isTarget&&(a=h),(this.isSource||this.isTarget)&&(null!=h&&null!=h.point?(t.style[this.isSource?mxConstants.STYLE_EXIT_X:mxConstants.STYLE_ENTRY_X]=h.point.x,t.style[this.isSource?mxConstants.STYLE_EXIT_Y:mxConstants.STYLE_ENTRY_Y]=h.point.y):(delete t.style[this.isSource?mxConstants.STYLE_EXIT_X:mxConstants.STYLE_ENTRY_X],delete t.style[this.isSource?mxConstants.STYLE_EXIT_Y:mxConstants.STYLE_ENTRY_Y])),t.setVisibleTerminalState(r,!0),t.setVisibleTerminalState(o,!1),this.isSource&&null==r||t.view.updateFixedTerminalPoint(t,r,!0,l),this.isTarget&&null==o||t.view.updateFixedTerminalPoint(t,o,!1,a),(this.isSource||this.isTarget)&&null==n&&(t.setAbsoluteTerminalPoint(e,this.isSource),null==this.marker.getMarkedState()&&(this.error=this.graph.allowDanglingEdges?null:"")),t.view.updatePoints(t,this.points,r,o),t.view.updateFloatingTerminalPoints(t,r,o)},mxEdgeHandler.prototype.mouseMove=function(t,e){if(null!=this.index&&null!=this.marker){if(this.currentPoint=this.getPointForEvent(e),this.error=null,!this.graph.isIgnoreTerminalEvent(e.getEvent())&&mxEvent.isShiftDown(e.getEvent())&&null!=this.snapPoint&&(Math.abs(this.snapPoint.x-this.currentPoint.x)mxEvent.VIRTUAL_HANDLE)null!=this.customHandles&&this.customHandles[mxEvent.CUSTOM_HANDLE-this.index].processEvent(e);else if(this.isLabel)this.label.x=this.currentPoint.x,this.label.y=this.currentPoint.y;else{this.points=this.getPreviewPoints(this.currentPoint,e);var n=this.isSource||this.isTarget?this.getPreviewTerminalState(e):null;if(null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus&&null!=this.constraintHandler.currentPoint)this.currentPoint=this.constraintHandler.currentPoint.clone();else if(this.outlineConnect){var i=!(!this.isSource&&!this.isTarget)&&this.isOutlineConnectEvent(e);i?n=this.marker.highlight.state:null!=n&&n!=e.getState()&&null!=this.marker.highlight.shape&&(this.marker.highlight.shape.stroke="transparent",this.marker.highlight.repaint(),n=null)}null==n||this.isCellEnabled(n.cell)||(n=null,this.marker.reset());var s=this.clonePreviewState(this.currentPoint,null!=n?n.cell:null);this.updatePreviewState(s,this.currentPoint,n,e,i),this.setPreviewColor(null==this.error?this.marker.validColor:this.marker.invalidColor),this.abspoints=s.absolutePoints,this.active=!0}this.updateHint(e,this.currentPoint),this.drawPreview(),mxEvent.consume(e.getEvent()),e.consume()}else mxClient.IS_IE&&null!=this.getHandleForEvent(e)&&e.consume(!1)},mxEdgeHandler.prototype.mouseUp=function(t,e){if(null!=this.index&&null!=this.marker){var n=this.state.cell,i=this.index;if(this.index=null,e.getX()!=this.startX||e.getY()!=this.startY){var s=!this.graph.isIgnoreTerminalEvent(e.getEvent())&&this.graph.isCloneEvent(e.getEvent())&&this.cloneEnabled&&this.graph.isCellsCloneable();if(null!=this.error)0mxEvent.VIRTUAL_HANDLE){if(null!=this.customHandles){(r=this.graph.getModel()).beginUpdate();try{this.customHandles[mxEvent.CUSTOM_HANDLE-i].execute()}finally{r.endUpdate()}}}else if(this.isLabel)this.moveLabel(this.state,this.label.x,this.label.y);else if(this.isSource||this.isTarget)if(i=null,null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus&&(i=this.constraintHandler.currentFocus.cell),null==i&&this.marker.hasValidState()&&null!=this.marker.highlight&&null!=this.marker.highlight.shape&&"transparent"!=this.marker.highlight.shape.stroke&&"white"!=this.marker.highlight.shape.stroke&&(i=this.marker.validState.cell),null!=i){var r,o=(r=this.graph.getModel()).getParent(n);r.beginUpdate();try{if(s){var l=r.getGeometry(n);s=this.graph.cloneCell(n);r.add(o,s,r.getChildCount(o)),null!=l&&(l=l.clone(),r.setGeometry(s,l));var a=r.getTerminal(n,!this.isSource);this.graph.connectCell(s,a,!this.isSource),n=s}n=this.connect(n,i,this.isSource,s,e)}finally{r.endUpdate()}}else this.graph.isAllowDanglingEdges()&&((r=this.abspoints[this.isSource?0:this.abspoints.length-1]).x=this.roundLength(r.x/this.graph.view.scale-this.graph.view.translate.x),r.y=this.roundLength(r.y/this.graph.view.scale-this.graph.view.translate.y),null!=(l=this.graph.getView().getState(this.graph.getModel().getParent(n)))&&(r.x-=l.origin.x,r.y-=l.origin.y),r.x-=this.graph.panDx/this.graph.view.scale,r.y-=this.graph.panDy/this.graph.view.scale,n=this.changeTerminalPoint(n,r,this.isSource,s));else this.active?n=this.changePoints(n,this.points,s):(this.graph.getView().invalidate(this.state.cell),this.graph.getView().validate(this.state.cell))}null!=this.marker&&(this.reset(),n!=this.state.cell&&this.graph.setSelectionCell(n)),e.consume()}},mxEdgeHandler.prototype.reset=function(){if(this.active&&this.refresh(),this.snapPoint=this.points=this.label=this.index=this.error=null,this.active=this.isTarget=this.isSource=this.isLabel=!1,this.livePreview&&null!=this.sizers)for(var t=0;t"),this.div.style.visibility="",mxUtils.fit(this.div)}},mxTooltipHandler.prototype.destroy=function(){this.destroyed||(this.graph.removeMouseListener(this),mxEvent.release(this.div),null!=this.div&&null!=this.div.parentNode&&this.div.parentNode.removeChild(this.div),this.destroyed=!0,this.div=null)},mxUtils.extend(mxCellTracker,mxCellMarker),mxCellTracker.prototype.mouseDown=function(t,e){},mxCellTracker.prototype.mouseMove=function(t,e){this.isEnabled()&&this.process(e)},mxCellTracker.prototype.mouseUp=function(t,e){},mxCellTracker.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,this.graph.removeMouseListener(this),mxCellMarker.prototype.destroy.apply(this))},mxCellHighlight.prototype.keepOnTop=!1,mxCellHighlight.prototype.graph=!0,mxCellHighlight.prototype.state=null,mxCellHighlight.prototype.spacing=2,mxCellHighlight.prototype.resetHandler=null,mxCellHighlight.prototype.setHighlightColor=function(t){this.highlightColor=t,null!=this.shape&&(this.shape.stroke=t)},mxCellHighlight.prototype.drawHighlight=function(){this.shape=this.createShape(),this.repaint(),this.keepOnTop||this.shape.node.parentNode.firstChild==this.shape.node||this.shape.node.parentNode.insertBefore(this.shape.node,this.shape.node.parentNode.firstChild)},mxCellHighlight.prototype.createShape=function(){var t=this.graph.cellRenderer.createShape(this.state);return t.svgStrokeTolerance=this.graph.tolerance,t.points=this.state.absolutePoints,t.apply(this.state),t.stroke=this.highlightColor,t.opacity=this.opacity,t.isDashed=this.dashed,t.isShadow=!1,t.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,t.init(this.graph.getView().getOverlayPane()),mxEvent.redirectMouseEvents(t.node,this.graph,this.state),this.graph.dialect!=mxConstants.DIALECT_SVG?t.pointerEvents=!1:t.svgPointerEvents="stroke",t},mxCellHighlight.prototype.getStrokeWidth=function(t){return this.strokeWidth},mxCellHighlight.prototype.repaint=function(){null!=this.state&&null!=this.shape&&(this.shape.scale=this.state.view.scale,this.graph.model.isEdge(this.state.cell)?(this.shape.strokewidth=this.getStrokeWidth(),this.shape.points=this.state.absolutePoints,this.shape.outline=!1):(this.shape.bounds=new mxRectangle(this.state.x-this.spacing,this.state.y-this.spacing,this.state.width+2*this.spacing,this.state.height+2*this.spacing),this.shape.rotation=Number(this.state.style[mxConstants.STYLE_ROTATION]||"0"),this.shape.strokewidth=this.getStrokeWidth()/this.state.view.scale,this.shape.outline=!0),null!=this.state.shape&&this.shape.setCursor(this.state.shape.getCursor()),(mxClient.IS_QUIRKS||8==document.documentMode)&&("transparent"==this.shape.stroke?(this.shape.stroke="white",this.shape.opacity=1):this.shape.opacity=this.opacity),this.shape.redraw())},mxCellHighlight.prototype.hide=function(){this.highlight(null)},mxCellHighlight.prototype.highlight=function(t){this.state!=t&&(null!=this.shape&&(this.shape.destroy(),this.shape=null),this.state=t,null!=this.state&&this.drawHighlight())},mxCellHighlight.prototype.isHighlightAt=function(t,e){var n=!1;if(null!=this.shape&&null!=document.elementFromPoint&&!mxClient.IS_QUIRKS)for(var i=document.elementFromPoint(t,e);null!=i;){if(i==this.shape.node){n=!0;break}i=i.parentNode}return n},mxCellHighlight.prototype.destroy=function(){this.graph.getView().removeListener(this.resetHandler),this.graph.getView().removeListener(this.repaintHandler),this.graph.getModel().removeListener(this.repaintHandler),null!=this.shape&&(this.shape.destroy(),this.shape=null)},mxDefaultKeyHandler.prototype.editor=null,mxDefaultKeyHandler.prototype.handler=null,mxDefaultKeyHandler.prototype.bindAction=function(t,e,n){var i=mxUtils.bind(this,(function(){this.editor.execute(e)}));n?this.handler.bindControlKey(t,i):this.handler.bindKey(t,i)},mxDefaultKeyHandler.prototype.destroy=function(){this.handler.destroy(),this.handler=null},mxDefaultPopupMenu.prototype.imageBasePath=null,mxDefaultPopupMenu.prototype.config=null,mxDefaultPopupMenu.prototype.createMenu=function(t,e,n,i){if(null!=this.config){var s=this.createConditions(t,n,i);this.addItems(t,e,n,i,s,this.config.firstChild,null)}},mxDefaultPopupMenu.prototype.addItems=function(t,e,n,i,s,r,o){for(var l=!1;null!=r;){if("add"==r.nodeName){if(null==(a=r.getAttribute("if"))||s[a]){var a=r.getAttribute("as"),h=(a=mxResources.get(a)||a,mxUtils.eval(mxUtils.getTextContent(r))),u=r.getAttribute("action"),p=r.getAttribute("icon"),d=r.getAttribute("iconCls"),c=null==(c=r.getAttribute("enabled-if"))||s[c];l&&(e.addSeparator(o),l=!1),null!=p&&this.imageBasePath&&(p=this.imageBasePath+p),a=this.addAction(e,t,a,p,h,u,n,o,d,c),this.addItems(t,e,n,i,s,r.firstChild,a)}}else"separator"==r.nodeName&&(l=!0);r=r.nextSibling}},mxDefaultPopupMenu.prototype.addAction=function(t,e,n,i,s,r,o,l,a,h){return t.addItem(n,i,(function(t){"function"==typeof s&&s.call(e,e,o,t),null!=r&&e.execute(r,o,t)}),l,a,h)},mxDefaultPopupMenu.prototype.createConditions=function(t,e,n){var i=t.graph.getModel(),s=i.getChildCount(e),r=[];for(r.nocell=null==e,r.ncells=1 "+e.convertValueToString(n)+t),n=e.getModel().getParent(n);return this.getRootTitle()+t},mxEditor.prototype.getRootTitle=function(){var t=this.graph.getModel().getRoot();return this.graph.convertValueToString(t)},mxEditor.prototype.undo=function(){this.undoManager.undo()},mxEditor.prototype.redo=function(){this.undoManager.redo()},mxEditor.prototype.groupCells=function(){var t=null!=this.groupBorderSize?this.groupBorderSize:this.graph.gridSize;return this.graph.groupCells(this.createGroup(),t)},mxEditor.prototype.createGroup=function(){return this.graph.getModel().cloneCell(this.defaultGroup)},mxEditor.prototype.open=function(t){if(null!=t){var e=mxUtils.load(t).getXml();this.readGraphModel(e.documentElement),this.filename=t,this.fireEvent(new mxEventObject(mxEvent.OPEN,"filename",t))}},mxEditor.prototype.readGraphModel=function(t){new mxCodec(t.ownerDocument).decode(t,this.graph.getModel()),this.resetHistory()},mxEditor.prototype.save=function(t,e){if(null!=(t=t||this.getUrlPost())&&0u&&(n-=n+l-u),i+h>(u=a.y+a.height)&&(i-=i+h-u)}}else null!=l&&(n-=l.x*r,i-=l.y*r)}}(o=o.clone()).x=this.graph.snap(n/r-this.graph.getView().translate.x-this.graph.gridSize/2),o.y=this.graph.snap(i/r-this.graph.getView().translate.y-this.graph.gridSize/2),e.setGeometry(o),null==t&&(t=this.graph.getDefaultParent()),this.cycleAttribute(e),this.fireEvent(new mxEventObject(mxEvent.BEFORE_ADD_VERTEX,"vertex",e,"parent",t)),s.beginUpdate();try{null!=(e=this.graph.addCell(e,t))&&(this.graph.constrainChild(e),this.fireEvent(new mxEventObject(mxEvent.ADD_VERTEX,"vertex",e)))}finally{s.endUpdate()}return null!=e&&(this.graph.setSelectionCell(e),this.graph.scrollCellToVisible(e),this.fireEvent(new mxEventObject(mxEvent.AFTER_ADD_VERTEX,"vertex",e))),e},mxEditor.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,null!=this.tasks&&this.tasks.destroy(),null!=this.outline&&this.outline.destroy(),null!=this.properties&&this.properties.destroy(),null!=this.keyHandler&&this.keyHandler.destroy(),null!=this.rubberband&&this.rubberband.destroy(),null!=this.toolbar&&this.toolbar.destroy(),null!=this.graph&&this.graph.destroy(),this.templates=this.status=null)};var mxCodecRegistry={codecs:[],aliases:[],register:function(t){if(null!=t){var e=t.getName();mxCodecRegistry.codecs[e]=t;var n=mxUtils.getFunctionName(t.template.constructor);n!=e&&mxCodecRegistry.addAlias(n,e)}return t},addAlias:function(t,e){mxCodecRegistry.aliases[t]=e},getCodec:function(t){var e=null;if(null!=t){e=mxUtils.getFunctionName(t);var n=mxCodecRegistry.aliases[e];if(null!=n&&(e=n),null==(e=mxCodecRegistry.codecs[e]))try{e=new mxObjectCodec(new t),mxCodecRegistry.register(e)}catch(t){}}return e}};function mxCodec(t){this.document=t||mxUtils.createXmlDocument(),this.objects=[]}function mxObjectCodec(t,e,n,i){for(var s in this.template=t,this.exclude=null!=e?e:[],this.idrefs=null!=n?n:[],this.mapping=null!=i?i:[],this.reverse={},this.mapping)this.reverse[this.mapping[s]]=s}mxCodec.prototype.document=null,mxCodec.prototype.objects=null,mxCodec.prototype.elements=null,mxCodec.prototype.encodeDefaults=!1,mxCodec.prototype.putObject=function(t,e){return this.objects[t]=e},mxCodec.prototype.getObject=function(t){var e=null;return null!=t&&(null==(e=this.objects[t])&&(null==(e=this.lookup(t))&&(null!=(t=this.getElementById(t))&&(e=this.decode(t))))),e},mxCodec.prototype.lookup=function(t){return null},mxCodec.prototype.getElementById=function(t){return this.updateElements(),this.elements[t]},mxCodec.prototype.updateElements=function(){null==this.elements&&(this.elements={},null!=this.document.documentElement&&this.addElement(this.document.documentElement))},mxCodec.prototype.addElement=function(t){if(t.nodeType==mxConstants.NODETYPE_ELEMENT){var e=t.getAttribute("id");if(null!=e)if(null==this.elements[e])this.elements[e]=t;else if(this.elements[e]!=t)throw Error(e+": Duplicate ID")}for(t=t.firstChild;null!=t;)this.addElement(t),t=t.nextSibling},mxCodec.prototype.getId=function(t){var e=null;return null!=t&&(null==(e=this.reference(t))&&t instanceof mxCell&&(null==(e=t.getId())&&(0==(e=mxCellPath.create(t)).length&&(e="root")))),e},mxCodec.prototype.reference=function(t){return null},mxCodec.prototype.encode=function(t){var e=null;if(null!=t&&null!=t.constructor){var n=mxCodecRegistry.getCodec(t.constructor);null!=n?e=n.encode(this,t):mxUtils.isNode(t)?e=mxUtils.importNode(this.document,t,!0):mxLog.warn("mxCodec.encode: No codec for "+mxUtils.getFunctionName(t.constructor))}return e},mxCodec.prototype.decode=function(t,e){this.updateElements();var n=null;if(null!=t&&t.nodeType==mxConstants.NODETYPE_ELEMENT){n=null;try{n=window[t.nodeName]}catch(t){}null!=(n=mxCodecRegistry.getCodec(n))?n=n.decode(this,t,e):(n=t.cloneNode(!0)).removeAttribute("as")}return n},mxCodec.prototype.encodeCell=function(t,e,n){if(e.appendChild(this.encode(t)),null==n||n){n=t.getChildCount();for(var i=0;ie!=t.ShapeBpmnEventKind.NONE),r=[t.ShapeBpmnEventKind.TERMINATE,t.ShapeBpmnEventKind.TIMER,t.ShapeBpmnEventKind.MESSAGE,t.ShapeBpmnEventKind.SIGNAL,t.ShapeBpmnEventKind.LINK,t.ShapeBpmnEventKind.ERROR,t.ShapeBpmnEventKind.COMPENSATION,t.ShapeBpmnEventKind.CANCEL,t.ShapeBpmnEventKind.CONDITIONAL,t.ShapeBpmnEventKind.ESCALATION];var o,l,a,h,u,p,d;(o=t.ShapeBpmnMarkerKind||(t.ShapeBpmnMarkerKind={})).ADHOC="adhoc",o.COMPENSATION="compensation",o.EXPAND="expand",o.LOOP="loop",o.MULTI_INSTANCE_PARALLEL="parallel multi instance",o.MULTI_INSTANCE_SEQUENTIAL="sequential multi instance",(l=t.ShapeBpmnSubProcessKind||(t.ShapeBpmnSubProcessKind={})).EMBEDDED="embedded",l.EVENT="event";class c{static filterKind(e,n=!1){return Object.values(t.ShapeBpmnElementKind).filter(t=>n?t.endsWith(e)||t.toLowerCase().endsWith(e.toLowerCase()):t.endsWith(e))}static isEvent(t){return this.EVENT_KINDS.includes(t)}static isCallActivity(e){return t.ShapeBpmnElementKind.CALL_ACTIVITY===e}static isSubProcess(e){return t.ShapeBpmnElementKind.SUB_PROCESS===e}static isBoundaryEvent(e){return t.ShapeBpmnElementKind.EVENT_BOUNDARY===e}static isStartEvent(e){return t.ShapeBpmnElementKind.EVENT_START===e}static canHaveNoneEvent(e){return t.ShapeBpmnElementKind.EVENT_INTERMEDIATE_THROW===e||t.ShapeBpmnElementKind.EVENT_END===e||t.ShapeBpmnElementKind.EVENT_START===e}static isActivity(t){return this.ACTIVITY_KINDS.includes(t)}static isWithDefaultSequenceFlow(t){return this.FLOWNODE_WITH_DEFAULT_SEQUENCE_FLOW_KINDS.includes(t)}static topLevelBpmnEventKinds(){return this.EVENT_KINDS}static activityKinds(){return this.ACTIVITY_KINDS}static taskKinds(){return this.TASK_KINDS}static gatewayKinds(){return this.GATEWAY_KINDS}static flowNodeKinds(){return Object.values(t.ShapeBpmnElementKind).filter(t=>!c.isPoolOrLane(t))}static isPoolOrLane(e){return e==t.ShapeBpmnElementKind.POOL||e==t.ShapeBpmnElementKind.LANE}}c.EVENT_KINDS=c.filterKind("Event"),c.GATEWAY_KINDS=c.filterKind("Gateway"),c.TASK_KINDS=c.filterKind("Task",!0),c.ACTIVITY_KINDS=[...c.TASK_KINDS,t.ShapeBpmnElementKind.CALL_ACTIVITY,t.ShapeBpmnElementKind.SUB_PROCESS],c.FLOWNODE_WITH_DEFAULT_SEQUENCE_FLOW_KINDS=[...c.ACTIVITY_KINDS,t.ShapeBpmnElementKind.GATEWAY_EXCLUSIVE,t.ShapeBpmnElementKind.GATEWAY_INCLUSIVE],function(t){t.NORMAL="normal",t.DEFAULT="default",t.CONDITIONAL_FROM_ACTIVITY="conditional_from_activity",t.CONDITIONAL_FROM_GATEWAY="conditional_from_gateway"}(a||(a={})),(t.MarkerIdentifier||(t.MarkerIdentifier={})).ARROW_DASH="bpmn.dash",(h=t.StyleDefault||(t.StyleDefault={}))[h.STROKE_WIDTH_THIN=2]="STROKE_WIDTH_THIN",h[h.STROKE_WIDTH_THICK=5]="STROKE_WIDTH_THICK",h[h.SHAPE_ACTIVITY_BOTTOM_MARGIN=7]="SHAPE_ACTIVITY_BOTTOM_MARGIN",h[h.SHAPE_ACTIVITY_TOP_MARGIN=7]="SHAPE_ACTIVITY_TOP_MARGIN",h[h.SHAPE_ACTIVITY_LEFT_MARGIN=7]="SHAPE_ACTIVITY_LEFT_MARGIN",h[h.SHAPE_ACTIVITY_FROM_CENTER_MARGIN=7]="SHAPE_ACTIVITY_FROM_CENTER_MARGIN",h[h.SHAPE_ACTIVITY_MARKER_ICON_MARGIN=5]="SHAPE_ACTIVITY_MARKER_ICON_MARGIN",h[h.SHAPE_ACTIVITY_MARKER_ICON_SIZE=20]="SHAPE_ACTIVITY_MARKER_ICON_SIZE",h[h.POOL_LABEL_SIZE=30]="POOL_LABEL_SIZE",h[h.LANE_LABEL_SIZE=30]="LANE_LABEL_SIZE",h.DEFAULT_FILL_COLOR="White",h.DEFAULT_STROKE_COLOR="Black",h.DEFAULT_FONT_FAMILY="Arial, Helvetica, sans-serif",h[h.DEFAULT_FONT_SIZE=11]="DEFAULT_FONT_SIZE",h.DEFAULT_FONT_COLOR="Black",h[h.DEFAULT_MARGIN=0]="DEFAULT_MARGIN",h[h.DEFAULT_DASHED=0]="DEFAULT_DASHED",h[h.DEFAULT_FIX_DASH=0]="DEFAULT_FIX_DASH",h.DEFAULT_DASH_PATTERN="3 3",(u=t.StyleIdentifier||(t.StyleIdentifier={})).BPMN_STYLE_EVENT_KIND="bpmn.eventKind",u.BPMN_STYLE_SUB_PROCESS_KIND="bpmn.subProcessKind",u.BPMN_STYLE_IS_INTERRUPTING="bpmn.isInterrupting",u.BPMN_STYLE_MARKERS="bpmn.markers",u.BPMN_STYLE_INSTANTIATING="bpmn.isInstantiating",u.BPMN_STYLE_IS_INITIATING="bpmn.isInitiating",u.BPMN_STYLE_MESSAGE_FLOW_ICON="bpmn.messageFlowIcon",u.BPMN_STYLE_EVENT_BASED_GATEWAY_KIND="bpmn.gatewayKind";class m{static getFillColor(e){return mxUtils.getValue(e,mxConstants.STYLE_FILLCOLOR,t.StyleDefault.DEFAULT_FILL_COLOR)}static getStrokeColor(e){return mxUtils.getValue(e,mxConstants.STYLE_STROKECOLOR,t.StyleDefault.DEFAULT_STROKE_COLOR)}static getStrokeWidth(e){return mxUtils.getValue(e,mxConstants.STYLE_STROKEWIDTH,t.StyleDefault.STROKE_WIDTH_THIN)}static getMargin(e){return mxUtils.getValue(e,mxConstants.STYLE_MARGIN,t.StyleDefault.DEFAULT_MARGIN)}static isDashed(e){return mxUtils.getValue(e,mxConstants.STYLE_DASHED,t.StyleDefault.DEFAULT_DASHED)}static isFixDash(e){return mxUtils.getValue(e,mxConstants.STYLE_FIX_DASH,t.StyleDefault.DEFAULT_FIX_DASH)}static getDashPattern(e){return mxUtils.getValue(e,mxConstants.STYLE_DASH_PATTERN,t.StyleDefault.DEFAULT_DASH_PATTERN)}static getBpmnEventKind(e){return mxUtils.getValue(e,t.StyleIdentifier.BPMN_STYLE_EVENT_KIND,t.ShapeBpmnEventKind.NONE)}static getBpmnSubProcessKind(e){return mxUtils.getValue(e,t.StyleIdentifier.BPMN_STYLE_SUB_PROCESS_KIND,void 0)}static getBpmnIsInterrupting(e){return mxUtils.getValue(e,t.StyleIdentifier.BPMN_STYLE_IS_INTERRUPTING,void 0)}static getBpmnMarkers(e){return mxUtils.getValue(e,t.StyleIdentifier.BPMN_STYLE_MARKERS,void 0)}static getBpmnIsInstantiating(e){return JSON.parse(mxUtils.getValue(e,t.StyleIdentifier.BPMN_STYLE_INSTANTIATING,!1))}static getBpmnIsInitiating(e){return mxUtils.getValue(e,t.StyleIdentifier.BPMN_STYLE_IS_INITIATING,void 0)}static getBpmnIsParallelEventBasedGateway(e){return mxUtils.getValue(e,t.StyleIdentifier.BPMN_STYLE_EVENT_BASED_GATEWAY_KIND,t.ShapeBpmnEventBasedGatewayKind.Exclusive)==t.ShapeBpmnEventBasedGatewayKind.Parallel}}class g{constructor(t,e,n,i,s){this.id=t,this.bpmnElement=e,this.bounds=n,this.label=i,this.isHorizontal=s}}class x{constructor(t,e,n,i,s=!1){this.id=t,this.name=e,this.kind=n,this.parentId=i,this.instantiate=s}}class y extends x{constructor(t,e,n,i,s,r=[]){super(t,e,n,i,s),this.markers=r}}class f extends y{constructor(e,n,i,s,r){super(e,n,t.ShapeBpmnElementKind.CALL_ACTIVITY,s,void 0,r),this.callActivityKind=i}}class v extends y{constructor(e,n,i,s,r){super(e,n,t.ShapeBpmnElementKind.SUB_PROCESS,s,void 0,r),this.subProcessKind=i}}class E extends x{constructor(t,e,n,i,s){super(t,e,n,s),this.eventKind=i}}class C extends E{constructor(e,n,i,s,r){super(e,n,t.ShapeBpmnElementKind.EVENT_START,i,s),this.isInterrupting=r}}class S extends E{constructor(e,n,i,s,r=!0){super(e,n,t.ShapeBpmnElementKind.EVENT_BOUNDARY,i,s),this.isInterrupting=r}}class T extends x{constructor(e,n,i,s,r=t.ShapeBpmnEventBasedGatewayKind.None){super(e,n,t.ShapeBpmnElementKind.GATEWAY_EVENT_BASED,i,s),this.gatewayKind=r}}class b{constructor(t,e,n){this.id=t,this.name=e,this.processRef=n}}!function(t){t.SEQUENCE_FLOW="sequenceFlow",t.MESSAGE_FLOW="messageFlow",t.ASSOCIATION_FLOW="association"}(p||(p={})),function(t){t.NONE="None",t.ONE="One",t.BOTH="Both"}(d||(d={}));class w{constructor(t,e,n,i,s){this.id=t,this.name=e,this.kind=n,this.sourceRefId=i,this.targetRefId=s}}class L extends w{constructor(t,e,n,i,s=a.NORMAL){super(t,e,p.SEQUENCE_FLOW,n,i),this.sequenceFlowKind=s}}class A extends w{constructor(t,e,n,i){super(t,e,p.MESSAGE_FLOW,n,i)}}class I extends w{constructor(t,e,n,i,s=d.NONE){super(t,e,p.ASSOCIATION_FLOW,n,i),this.associationDirectionKind=s}}class O{constructor(e){this.graph=e,this.specificFlowStyles=new Map([[p.SEQUENCE_FLOW,t=>{t[mxConstants.STYLE_ENDARROW]=mxConstants.ARROW_BLOCK_THIN}],[p.MESSAGE_FLOW,t=>{t[mxConstants.STYLE_DASHED]=!0,t[mxConstants.STYLE_DASH_PATTERN]="8 5",t[mxConstants.STYLE_STARTARROW]=mxConstants.ARROW_OVAL,t[mxConstants.STYLE_STARTSIZE]=8,t[mxConstants.STYLE_STARTFILL]=!1,t[mxConstants.STYLE_ENDARROW]=mxConstants.ARROW_BLOCK_THIN,t[mxConstants.STYLE_ENDFILL]=!1}],[p.ASSOCIATION_FLOW,t=>{t[mxConstants.STYLE_DASHED]=!0,t[mxConstants.STYLE_DASH_PATTERN]="1 2",t[mxConstants.STYLE_ENDARROW]=mxConstants.ARROW_OPEN_THIN,t[mxConstants.STYLE_STARTARROW]=mxConstants.ARROW_OPEN_THIN,t[mxConstants.STYLE_STARTSIZE]=12}]]),this.specificSequenceFlowStyles=new Map([[a.DEFAULT,e=>{e[mxConstants.STYLE_STARTARROW]=t.MarkerIdentifier.ARROW_DASH}],[a.CONDITIONAL_FROM_ACTIVITY,t=>{t[mxConstants.STYLE_STARTARROW]=mxConstants.ARROW_DIAMOND_THIN,t[mxConstants.STYLE_STARTSIZE]=18,t[mxConstants.STYLE_STARTFILL]=!1}]]),this.specificAssociationFlowStyles=new Map([[d.NONE,t=>{t[mxConstants.STYLE_STARTARROW]=void 0,t[mxConstants.STYLE_ENDARROW]=void 0,t[mxConstants.STYLE_EDGE]=void 0}],[d.ONE,t=>{t[mxConstants.STYLE_STARTARROW]=void 0,t[mxConstants.STYLE_EDGE]=void 0}],[d.BOTH,t=>{t[mxConstants.STYLE_EDGE]=void 0}]])}configureStyles(){mxConstants.RECTANGLE_ROUNDING_FACTOR=.1,this.configureDefaultVertexStyle(),this.configurePoolStyle(),this.configureLaneStyle(),this.configureTextAnnotationStyle(),this.configureActivityStyles(),this.configureEventStyles(),this.configureGatewayStyles(),this.configureDefaultEdgeStyle(),this.configureFlowStyles()}getStylesheet(){return this.graph.getStylesheet()}getDefaultVertexStyle(){return this.getStylesheet().getDefaultVertexStyle()}getDefaultEdgeStyle(){return this.getStylesheet().getDefaultEdgeStyle()}cloneDefaultVertexStyle(){const t=this.getDefaultVertexStyle();return mxUtils.clone(t)}cloneDefaultEdgeStyle(){const t=this.getDefaultEdgeStyle();return mxUtils.clone(t)}putCellStyle(t,e){this.getStylesheet().putCellStyle(t,e)}configureDefaultVertexStyle(){const t=this.getDefaultVertexStyle();this.configureCommonDefaultStyle(t)}configurePoolStyle(){const e=this.cloneDefaultVertexStyle();e[mxConstants.STYLE_SHAPE]=mxConstants.SHAPE_SWIMLANE,e[mxConstants.STYLE_VERTICAL_ALIGN]=mxConstants.ALIGN_MIDDLE,e[mxConstants.STYLE_ALIGN]=mxConstants.ALIGN_CENTER,e[mxConstants.STYLE_STARTSIZE]=t.StyleDefault.POOL_LABEL_SIZE,this.graph.getStylesheet().putCellStyle(t.ShapeBpmnElementKind.POOL,e)}configureLaneStyle(){const e=this.cloneDefaultVertexStyle();e[mxConstants.STYLE_SHAPE]=mxConstants.SHAPE_SWIMLANE,e[mxConstants.STYLE_VERTICAL_ALIGN]=mxConstants.ALIGN_MIDDLE,e[mxConstants.STYLE_ALIGN]=mxConstants.ALIGN_CENTER,e[mxConstants.STYLE_SWIMLANE_LINE]=0,e[mxConstants.STYLE_STARTSIZE]=t.StyleDefault.LANE_LABEL_SIZE,this.graph.getStylesheet().putCellStyle(t.ShapeBpmnElementKind.LANE,e)}configureEventStyles(){c.topLevelBpmnEventKinds().forEach(t=>{const e=this.cloneDefaultVertexStyle();e[mxConstants.STYLE_SHAPE]=t,e[mxConstants.STYLE_PERIMETER]=mxPerimeter.EllipsePerimeter,e[mxConstants.STYLE_VERTICAL_LABEL_POSITION]=mxConstants.ALIGN_BOTTOM,this.putCellStyle(t,e)})}configureTextAnnotationStyle(){const e=this.cloneDefaultVertexStyle();e[mxConstants.STYLE_SHAPE]=t.ShapeBpmnElementKind.TEXT_ANNOTATION,e[mxConstants.STYLE_VERTICAL_ALIGN]=mxConstants.ALIGN_MIDDLE,e[mxConstants.STYLE_ALIGN]=mxConstants.ALIGN_LEFT,e[mxConstants.STYLE_SPACING_LEFT]=5,this.putCellStyle(t.ShapeBpmnElementKind.TEXT_ANNOTATION,e)}configureActivityStyles(){c.activityKinds().forEach(t=>{const e=this.cloneDefaultVertexStyle();e[mxConstants.STYLE_SHAPE]=t,e[mxConstants.STYLE_VERTICAL_ALIGN]=mxConstants.ALIGN_MIDDLE,this.putCellStyle(t,e)})}configureGatewayStyles(){c.gatewayKinds().forEach(t=>{const e=this.cloneDefaultVertexStyle();e[mxConstants.STYLE_SHAPE]=t,e[mxConstants.STYLE_PERIMETER]=mxPerimeter.RhombusPerimeter,e[mxConstants.STYLE_VERTICAL_ALIGN]=mxConstants.ALIGN_TOP,e[mxConstants.STYLE_LABEL_POSITION]=mxConstants.ALIGN_LEFT,e[mxConstants.STYLE_VERTICAL_LABEL_POSITION]=mxConstants.ALIGN_TOP,this.putCellStyle(t,e)})}configureDefaultEdgeStyle(){const t=this.getDefaultEdgeStyle();t[mxConstants.STYLE_EDGE]=mxConstants.EDGESTYLE_SEGMENT,t[mxConstants.STYLE_ENDSIZE]=12,t[mxConstants.STYLE_STROKEWIDTH]=1.5,t[mxConstants.STYLE_ROUNDED]=1,t[mxConstants.STYLE_ARCSIZE]=5,t[mxConstants.STYLE_VERTICAL_ALIGN]=mxConstants.ALIGN_BOTTOM,delete t[mxConstants.STYLE_ENDARROW],this.configureCommonDefaultStyle(t)}configureCommonDefaultStyle(e){e[mxConstants.STYLE_FONTFAMILY]=t.StyleDefault.DEFAULT_FONT_FAMILY,e[mxConstants.STYLE_FONTSIZE]=t.StyleDefault.DEFAULT_FONT_SIZE,e[mxConstants.STYLE_FONTCOLOR]=t.StyleDefault.DEFAULT_FONT_COLOR,e[mxConstants.STYLE_FILLCOLOR]=t.StyleDefault.DEFAULT_FILL_COLOR,e[mxConstants.STYLE_STROKECOLOR]=t.StyleDefault.DEFAULT_STROKE_COLOR,e[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR]=mxConstants.NONE,e[mxConstants.STYLE_WHITE_SPACE]="wrap"}configureEdgeStyles(t,e){t.forEach(t=>{const n=this.cloneDefaultEdgeStyle();(e.get(t)||(()=>{}))(n),this.graph.getStylesheet().putCellStyle(t.toString(),n)})}configureSequenceFlowStyles(){this.configureEdgeStyles(Object.values(a),this.specificSequenceFlowStyles)}configureAssociationFlowStyles(){this.configureEdgeStyles(Object.values(d),this.specificAssociationFlowStyles)}configureFlowStyles(){this.configureEdgeStyles(Object.values(p),this.specificFlowStyles),this.configureSequenceFlowStyles(),this.configureAssociationFlowStyles()}computeStyle(e,n){var i,s;const r=new Map,o=[null===(i=e.bpmnElement)||void 0===i?void 0:i.kind],l=e.bpmnElement;if(e instanceof g)if(l instanceof E)r.set(t.StyleIdentifier.BPMN_STYLE_EVENT_KIND,l.eventKind),(l instanceof S||l instanceof C&&void 0!==l.isInterrupting)&&r.set(t.StyleIdentifier.BPMN_STYLE_IS_INTERRUPTING,String(l.isInterrupting));else if(l instanceof y){l instanceof v?r.set(t.StyleIdentifier.BPMN_STYLE_SUB_PROCESS_KIND,l.subProcessKind):l.kind===t.ShapeBpmnElementKind.TASK_RECEIVE&&r.set(t.StyleIdentifier.BPMN_STYLE_INSTANTIATING,String(l.instantiate));const e=l.markers;e.length>0&&r.set(t.StyleIdentifier.BPMN_STYLE_MARKERS,e.join(","))}else c.isPoolOrLane(l.kind)?r.set(mxConstants.STYLE_HORIZONTAL,e.isHorizontal?"0":"1"):l instanceof T&&(r.set(t.StyleIdentifier.BPMN_STYLE_INSTANTIATING,String(l.instantiate)),r.set(t.StyleIdentifier.BPMN_STYLE_EVENT_BASED_GATEWAY_KIND,String(l.gatewayKind)));else l instanceof L&&o.push(l.sequenceFlowKind),l instanceof I&&o.push(l.associationDirectionKind);const a=null===(s=e.label)||void 0===s?void 0:s.font;return a&&(r.set(mxConstants.STYLE_FONTFAMILY,a.name),r.set(mxConstants.STYLE_FONTSIZE,a.size),r.set(mxConstants.STYLE_FONTSTYLE,O.getFontStyleValue(a))),n?(r.set(mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_TOP),e.bpmnElement.kind!=t.ShapeBpmnElementKind.TEXT_ANNOTATION&&r.set(mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),e instanceof g&&(r.set(mxConstants.STYLE_LABEL_WIDTH,n.width+1),r.set(mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_TOP),r.set(mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_LEFT))):e instanceof g&&(l instanceof v||l instanceof f)&&!l.markers.includes(t.ShapeBpmnMarkerKind.EXPAND)&&r.set(mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_TOP),[].concat([...o]).concat([...r].filter(([,t])=>t&&"undefined"!=t).map(([t,e])=>t+"="+e)).join(";")}computeMessageFlowIconStyle(e){return`shape=${t.StyleIdentifier.BPMN_STYLE_MESSAGE_FLOW_ICON};${t.StyleIdentifier.BPMN_STYLE_IS_INITIATING}=${e.messageVisibleKind}`}static getFontStyleValue(t){let e=0;return t.isBold&&(e+=mxConstants.FONT_BOLD),t.isItalic&&(e+=mxConstants.FONT_ITALIC),t.isStrikeThrough&&(e+=mxConstants.FONT_STRIKETHROUGH),t.isUnderline&&(e+=mxConstants.FONT_UNDERLINE),e}}function R(t,e,n,i){let s,r;t.heightt.setIconOriginForIconCentered(),shape:{x:e,y:n,w:i,h:s,strokeWidth:r.strokewidth||m.getStrokeWidth(r.style)},icon:{isFilled:l,fillColor:r.fill||m.getFillColor(r.style),strokeColor:r.stroke||m.getStrokeColor(r.style),strokeWidth:a,margin:m.getMargin(r.style)}}}class P{paintEmptyIcon(){}newBpmnCanvas({c:t,ratioFromParent:e,setIconOrigin:n,shape:i,icon:s},r){return new M({mxCanvas:t,shapeConfiguration:i,iconConfiguration:{originalSize:r,style:s,ratioFromShape:e,setIconOrigin:n}})}paintEnvelopeIcon({c:t,ratioFromParent:e,setIconOrigin:n,shape:i,icon:s}){const r={width:485.41,height:321.76},o=this.newBpmnCanvas({c:t,ratioFromParent:e,setIconOrigin:n,shape:i,icon:s},r),l=r.width,a=r.height;o.rect(0,0,l,a),o.fillAndStroke(),s.isFilled&&o.setStrokeColor(s.fillColor),o.begin(),o.moveTo(0,0),o.lineTo(.5*l,.6*a),o.lineTo(l,0),o.moveTo(0,a),o.lineTo(l/3,.45*a),o.moveTo(l,a),o.lineTo(2*l/3,.45*a),o.stroke()}paintCircleIcon({c:t,ratioFromParent:e,setIconOrigin:n,shape:i,icon:s}){const r={width:i.w,height:i.h},o=this.newBpmnCanvas({c:t,ratioFromParent:e,setIconOrigin:n,shape:i,icon:s},r),l=r.width,a=r.height;l>0&&a>0&&o.ellipse(0,0,l,a),s.isFilled?o.fillAndStroke():o.stroke()}paintClockIcon({c:t,ratioFromParent:e,setIconOrigin:n,shape:i,icon:s}){const r=this.newBpmnCanvas({c:t,ratioFromParent:e,setIconOrigin:n,shape:i,icon:s},{height:152,width:152});r.begin(),r.moveTo(184,60),r.curveTo(188.4,60,192,56.4,192,52),r.lineTo(192,48),r.curveTo(192,40,188.4,40,184,40),r.curveTo(179.6,40,176,43.6,176,48),r.lineTo(176,52),r.curveTo(176,56.4,179.6,60,184,60),r.close(),r.moveTo(184,308),r.curveTo(179.6,308,176,311.6,176,316),r.lineTo(176,320),r.curveTo(176,324.4,179.6,328,184,328),r.curveTo(188.4,328,192,324.4,192,320),r.lineTo(192,316),r.curveTo(192,311.6,188.4,308,184,308),r.close(),r.moveTo(52,176),r.lineTo(48,176),r.curveTo(43.6,176,40,179.6,40,184),r.curveTo(40,188.4,43.6,192,48,192),r.lineTo(52,192),r.curveTo(56.4,192,69,188.4,60,184),r.curveTo(60,179.6,56.4,176,52,176),r.close(),r.moveTo(320,176),r.lineTo(316,176),r.curveTo(311.6,176,308,179.6,308,184),r.curveTo(308,188.4,311.6,192,316,192),r.lineTo(320,192),r.curveTo(324.4,192,328,188.4,328,184),r.curveTo(328,179.6,324.4,176,320,176),r.moveTo(93.6,82.4),r.curveTo(90.4,79.2,85.6,79.2,82.4,82.4),r.curveTo(79.2,85.6,79.2,90.4,82.4,93.6),r.lineTo(85.2,96.4),r.curveTo(86.8,98,88.8,98.8,90.8,98.8),r.curveTo(92.8,98.8,94.4,98,96.4,96.4),r.curveTo(99.6,93.2,99.6,88.4,96.4,85.2),r.lineTo(93.6,82.4),r.moveTo(85.2,271.6),r.lineTo(82.4,274.4),r.curveTo(79.2,277.6,79.2,282.4,82.4,285.6),r.curveTo(84,287.2,86,288,88,288),r.curveTo(90,288,92,287.2,93.6,285.6),r.lineTo(96.4,282.8),r.curveTo(99.6,279.6,99.6,274.8,96.4,271.6),r.curveTo(93.2,268.4,88.4,268.4,85.2,271.6),r.moveTo(274.4,82.4),r.lineTo(271.6,85.2),r.curveTo(268.4,88.4,268.4,93.2,271.6,96.4),r.curveTo(273.298,98,275.2,98.8,277.2,98.8),r.curveTo(279.2,98.8,281.2,98,282.8,96.4),r.lineTo(285.6,93.6),r.curveTo(288.8,90.4,288.8,85.6,285.6,82.4),r.curveTo(282.4,79.2,277.6,79.2,274.4,82.4),r.moveTo(192,180.8),r.lineTo(192,108),r.curveTo(192,103.6,188.4,100,184,100),r.curveTo(179.6,100,176,103.6,176,108),r.lineTo(176,184),r.curveTo(176,186,176.8,188,178.4,189.6),r.lineTo(266,277.2),r.curveTo(267.6,278.8,269.6,279.6,271.6,279.6),r.curveTo(273.6,279.6,275.6,278.8,277.2,277.2),r.curveTo(280.4,274,280.4,269.2,277.2,266),r.lineTo(192,180.8),r.moveTo(184,0),r.curveTo(82.4,0,0,82.4,0,184),r.curveTo(0,285.6,82.4,368,184,368),r.curveTo(285.6,368,368,285.6,368,184),r.curveTo(368,82.4,285.6,0,184,0),r.moveTo(184,352),r.curveTo(91.2,352,16,276.8,16,184),r.curveTo(16,91.2,91.2,16,184,16),r.curveTo(276.8,16,352,91.2,352,184),r.curveTo(352,276.8,276.8,352,184,352),r.fillAndStroke()}paintTriangleIcon({c:t,ratioFromParent:e,setIconOrigin:n,shape:i,icon:s}){const r=this.newBpmnCanvas({c:t,ratioFromParent:e,setIconOrigin:n,shape:i,icon:s},{height:735,width:849});r.begin(),r.moveTo(497,55),r.lineTo(817,609),r.curveTo(849,665,808,735,744,735),r.lineTo(105,735),r.curveTo(40,735,0,665,32,609),r.lineTo(352,55),r.curveTo(384,0,465,0,497,55),r.close(),r.fillAndStroke()}paintUpArrowheadIcon({c:t,ratioFromParent:e,setIconOrigin:n,shape:i,icon:s}){const r=this.newBpmnCanvas({c:t,ratioFromParent:e,setIconOrigin:n,shape:i,icon:s},{height:50,width:40});r.begin(),r.moveTo(0,49.5),r.lineTo(19.5,1),r.curveTo(19.75,.25,20,0,20.25,.25),r.lineTo(40,49.5),r.curveTo(40,49.5,39.75,50,39.6,49.75),r.lineTo(20,30),r.lineTo(.4,49.75),r.curveTo(.4,49.75,.25,50,0,49.5),r.close(),r.fillAndStroke()}paintDoubleLeftArrowheadsIcon({c:t,ratioFromParent:e,setIconOrigin:n,shape:i,icon:s}){const r=this.newBpmnCanvas({c:t,ratioFromParent:e,setIconOrigin:n,shape:i,icon:s},{height:53.5,width:105});r.begin(),r.moveTo(91.4,0),r.curveTo(91.4,0,91.2,0,91,.2),r.lineTo(50,25),r.curveTo(47.9,25.8,46.7,26.6,46.4,27.3),r.lineTo(46.4,0),r.curveTo(46.4,0,46.2,0,46,.2),r.lineTo(4.9,25),r.curveTo(2,26.2,0,27.3,4.9,28.5),r.lineTo(45.8,53),r.curveTo(46,53.3,46.2,53.5,46.4,53.5),r.lineTo(46.4,27),r.curveTo(46.6,27.3,47.8,28.1,49.9,29.9),r.lineTo(90.8,53.3),r.curveTo(91,53.3,91.2,53.5,91.4,53.5),r.lineTo(91.4,0),r.close(),r.fillAndStroke()}static drawCrossIcon(t){t.begin(),t.moveTo(.38,0),t.lineTo(.62,0),t.lineTo(.62,.38),t.lineTo(1,.38),t.lineTo(1,.62),t.lineTo(.62,.62),t.lineTo(.62,1),t.lineTo(.38,1),t.lineTo(.38,.62),t.lineTo(0,.62),t.lineTo(0,.38),t.lineTo(.38,.38),t.close()}paintListIcon({c:t,ratioFromParent:e,setIconOrigin:n,shape:i,icon:s}){const r=this.newBpmnCanvas({c:t,ratioFromParent:e,setIconOrigin:n,shape:i,icon:s},{height:60,width:60});r.begin(),r.moveTo(0,0),r.lineTo(60,0),r.lineTo(60,60),r.lineTo(0,60),r.lineTo(0,0),r.close(),r.moveTo(5,5),r.lineTo(55,5),r.close(),r.moveTo(5,21.6),r.lineTo(55,21.6),r.close(),r.moveTo(5,38.3),r.lineTo(55,38.3),r.close(),r.moveTo(5,55),r.lineTo(55,55),r.close(),r.fillAndStroke()}paintXCrossIcon(t){const e=this.newBpmnCanvas(t,{height:.5,width:.5});P.drawCrossIcon(e);const n=t.shape.w*t.ratioFromParent,i=t.shape.h*t.ratioFromParent;e.rotate(45,!1,!1,n,i),e.fillAndStroke()}paintPlusCrossIcon({c:t,ratioFromParent:e,setIconOrigin:n,shape:i,icon:s}){const r=this.newBpmnCanvas({c:t,ratioFromParent:e,setIconOrigin:n,shape:i,icon:Object.assign(Object.assign({},s),{isFilled:!0})},{height:.5,width:.5});P.drawCrossIcon(r),r.fillAndStroke()}paintPersonIcon({c:t,ratioFromParent:e,setIconOrigin:n,shape:i,icon:s}){const r=this.newBpmnCanvas({c:t,ratioFromParent:e,setIconOrigin:n,shape:i,icon:Object.assign(Object.assign({},s),{isFilled:!0})},{height:239.68,width:143.61});r.begin(),r.moveTo(124.31,150.29),r.lineTo(99.66,141.03),r.arcTo(6.43,6.43,0,0,1,95.51,135.03),r.lineTo(95.51,130.66),r.arcTo(47.75,47.75,0,0,0,119.51,89.25),r.lineTo(119.51,71.25),r.arcTo(47.62,47.62,0,0,0,101.18,33.64),r.arcTo(29.35,29.35,0,0,0,101.52,29.14),r.arcTo(29.68,29.68,0,0,0,42.17,29.14),r.arcTo(29.24,29.24,0,0,0,42.53,33.63),r.arcTo(47.65,47.65,0,0,0,24.14,71.23),r.lineTo(24.14,89.23),r.arcTo(47.7,47.7,0,0,0,48.19,130.63),r.lineTo(48.19,135.03),r.arcTo(6.43,6.43,0,0,1,44.03,141.03),r.lineTo(19.31,150.29),r.arcTo(29.81,29.81,0,0,0,.09,178.03),r.lineTo(.09,233.51),r.arcTo(5.63,5.63,0,1,0,11.34,233.51),r.lineTo(11.34,178.03),r.arcTo(18.19,18.19,0,0,1,11.57,175.17),r.lineTo(20.5,184.11),r.arcTo(12.32,12.32,0,0,1,24.14,192.89),r.lineTo(24.14,233.51),r.arcTo(5.63,5.63,0,1,0,35.39,233.51),r.lineTo(35.39,192.93),r.arcTo(23.5,23.5,0,0,0,28.46,176.2),r.lineTo(17.04,164.78),r.arcTo(18.34,18.34,0,0,1,23.29,160.78),r.lineTo(43.65,153.15),r.lineTo(66.22,175.72),r.lineTo(66.22,233.51),r.arcTo(5.63,5.63,0,1,0,77.47,233.51),r.lineTo(77.47,175.76),r.lineTo(100.04,153.19),r.lineTo(120.4,160.82),r.arcTo(18.39,18.39,0,0,1,126.65,164.82),r.lineTo(115.24,176.24),r.arcTo(23.5,23.5,0,0,0,108.31,192.93),r.lineTo(108.31,233.55),r.arcTo(5.63,5.63,0,1,0,119.56,233.55),r.lineTo(119.56,192.93),r.arcTo(12.35,12.35,0,0,1,123.19,184.15),r.lineTo(132.13,175.22),r.arcTo(18,18,0,0,1,132.36,178.08),r.lineTo(132.36,233.56),r.arcTo(5.63,5.63,0,0,0,143.61,233.56),r.lineTo(143.61,178.03),r.arcTo(29.81,29.81,0,0,0,124.31,150.29),r.close(),r.moveTo(71.85,10.72),r.arcTo(18.46,18.46,0,0,1,90.17,27.18),r.arcTo(47.68,47.68,0,0,0,53.53,27.18),r.arcTo(18.44,18.44,0,0,1,71.85,10.72),r.close(),r.moveTo(35.39,71.23),r.arcTo(36.46,36.46,0,0,1,108.31,71.23),r.lineTo(108.31,77.4),r.curveTo(82.12,75.4,56.97,60.55,56.71,60.4),r.arcTo(5.62,5.62,0,0,0,48.78,62.71),r.curveTo(46.24,67.79,40.45,71.89,35.39,74.62),r.close(),r.moveTo(35.39,89.23),r.lineTo(35.39,87.08),r.curveTo(40.55,84.85,49.73,80.08,55.67,72.66),r.curveTo(64.83,77.46,85.92,87.21,108.31,88.66),r.lineTo(108.31,89.24),r.arcTo(36.46,36.46,0,1,1,35.39,89.24),r.close(),r.moveTo(71.85,165.45),r.lineTo(54.06,147.69),r.arcTo(17.7,17.7,0,0,0,59.43,135.32),r.arcTo(47.57,47.57,0,0,0,84.27,135.32),r.arcTo(17.7,17.7,0,0,0,89.64,147.69),r.close(),r.fill()}paintGearIcon({c:t,ratioFromParent:e,setIconOrigin:n,shape:i,icon:s}){const r=this.newBpmnCanvas({c:t,ratioFromParent:e,setIconOrigin:n,shape:i,icon:s},{height:100,width:100});P.paintGearIconBackground(r),r.translateIconOrigin(14,14),P.paintGearIconForeground(r)}static paintGearIconBackground(t){t.begin(),t.moveTo(2.06,24.62),t.lineTo(10.17,30.95),t.lineTo(9.29,37.73),t.lineTo(0,41.42),t.lineTo(2.95,54.24),t.lineTo(13.41,52.92),t.lineTo(17.39,58.52),t.lineTo(13.56,67.66),t.lineTo(24.47,74.44),t.lineTo(30.81,66.33),t.lineTo(37.88,67.21),t.lineTo(41.57,76.5),t.lineTo(54.24,73.55),t.lineTo(53.06,62.94),t.lineTo(58.52,58.52),t.lineTo(67.21,63.09),t.lineTo(74.58,51.88),t.lineTo(66.03,45.25),t.lineTo(66.92,38.62),t.lineTo(76.5,34.93),t.lineTo(73.7,22.26),t.lineTo(62.64,23.44),t.lineTo(58.81,18.42),t.lineTo(62.79,8.7),t.lineTo(51.74,2.21),t.lineTo(44.81,10.47),t.lineTo(38.03,9.43),t.lineTo(33.75,0),t.lineTo(21.52,3.24),t.lineTo(22.7,13.56),t.lineTo(18.13,17.54),t.lineTo(8.7,13.56),t.close();P.paintGearInnerCircle(t,24.8,39)}static paintGearIconForeground(t){t.begin(),t.moveTo(16.46,41.42),t.lineTo(24.57,47.75),t.lineTo(23.69,54.53),t.lineTo(14.4,58.22),t.lineTo(17.35,71.04),t.lineTo(27.81,69.72),t.lineTo(31.79,75.32),t.lineTo(27.96,84.46),t.lineTo(38.87,91.24),t.lineTo(45.21,83.13),t.lineTo(52.28,84.01),t.lineTo(55.97,93.3),t.lineTo(68.64,90.35),t.lineTo(67.46,79.74),t.lineTo(72.92,75.32),t.lineTo(81.61,79.89),t.lineTo(88.98,68.68),t.lineTo(80.43,62.05),t.lineTo(81.32,55.42),t.lineTo(90.9,51.73),t.lineTo(88.1,39.06),t.lineTo(77.04,40.24),t.lineTo(73.21,35.22),t.lineTo(77.19,25.5),t.lineTo(66.14,19.01),t.lineTo(59.21,27.27),t.lineTo(52.43,26.23),t.lineTo(48.15,16.8),t.lineTo(35.92,20.04),t.lineTo(37.1,30.36),t.lineTo(32.53,34.34),t.lineTo(23.1,30.36),t.close();P.paintGearInnerCircle(t,39.2,55.8),t.begin(),P.paintGearInnerCircle(t,39.2,55.8)}static paintGearInnerCircle(t,e,n){const i=13.5;t.moveTo(e,n),t.arcTo(i,i,0,1,1,e+27,n),t.arcTo(i,i,0,0,1,e,n),t.close(),t.fillAndStroke()}paintExpandIcon({c:t,ratioFromParent:e,setIconOrigin:n,shape:i,icon:s}){const r={width:16,height:16},o=this.newBpmnCanvas({c:t,ratioFromParent:e,setIconOrigin:n,shape:i,icon:s},r),l=r.width,a=r.height;o.roundrect(0,0,l,a,2,2),o.stroke(),o.begin(),o.moveTo(l/2,a/4),o.lineTo(l/2,3*a/4),o.close(),o.moveTo(l/4,a/2),o.lineTo(3*l/4,a/2),o.close(),o.fillAndStroke()}paintLoopIcon({c:t,ratioFromParent:e,setIconOrigin:n,shape:i,icon:s}){s.fillColor=s.strokeColor;const r=this.newBpmnCanvas({c:t,ratioFromParent:e,setIconOrigin:n,shape:i,icon:s},{width:22.49,height:21.62});r.begin(),r.moveTo(5.5,19.08),r.arcTo(8,8,0,1,1,10.5,21.08),r.stroke(),r.begin(),r.moveTo(7.5,14.08),r.lineTo(5.75,19.08),r.lineTo(0,17.08),r.close(),r.fillAndStroke()}paintSequentialMultiInstanceIcon({c:t,ratioFromParent:e,setIconOrigin:n,shape:i,icon:s}){const r={width:16,height:16},o=this.newBpmnCanvas({c:t,ratioFromParent:e,setIconOrigin:n,shape:i,icon:s},r);t.setFillColor(s.strokeColor);const l=r.width,a=r.height/5;o.rect(0,0,l,a),o.fill(),o.rect(0,2*a,l,a),o.fill(),o.rect(0,4*a,l,a),o.fill()}paintParallelMultiInstanceIcon({c:t,ratioFromParent:e,setIconOrigin:n,shape:i,icon:s}){const r={width:16,height:16},o=this.newBpmnCanvas({c:t,ratioFromParent:e,setIconOrigin:n,shape:i,icon:s},r);t.setFillColor(s.strokeColor);const l=r.width/5,a=r.height;o.begin(),o.rect(0,0,l,a),o.fill(),o.rect(2*l,0,l,a),o.fill(),o.rect(4*l,0,l,a),o.fill()}paintRightArrowIcon({setIconOrigin:t,c:e,shape:n,ratioFromParent:i,icon:s}){const r=this.newBpmnCanvas({c:e,ratioFromParent:i,setIconOrigin:t,shape:n,icon:s},{width:512,height:415.23});r.setRoundLineJoin(),r.begin(),r.moveTo(512,207.61),r.lineTo(304.38,0),r.lineTo(304.38,135.39),r.lineTo(0,135.39),r.lineTo(0,279.84),r.lineTo(304.38,279.84),r.lineTo(304.38,415.23),r.lineTo(512,207.61),r.close(),r.fillAndStroke()}paintErrorIcon({setIconOrigin:t,c:e,shape:n,ratioFromParent:i,icon:s}){const r=this.newBpmnCanvas({c:e,ratioFromParent:i,setIconOrigin:t,shape:n,icon:s},{width:72.44,height:71.82});r.begin(),r.moveTo(0,53.32),r.lineTo(19.48,0),r.lineTo(19.48,0),r.lineTo(50.85,40.07),r.lineTo(72.44,18.21),r.lineTo(53.12,71.82),r.lineTo(22.5,31.37),r.close(),r.fillAndStroke()}paintHandIcon({setIconOrigin:t,c:e,shape:n,ratioFromParent:i,icon:s}){const r=this.newBpmnCanvas({c:e,ratioFromParent:i,setIconOrigin:t,shape:n,icon:s},{width:343.65,height:354.12});r.begin(),r.moveTo(231.66,336.39),r.curveTo(240.84,316.9,220.53,306.92,220.53,306.92),r.curveTo(215.2,303.67,188.58,287.43,140.67,258.19),r.lineTo(146.33,248.39),r.curveTo(223.98,269.38,267.12,281.04,275.75,283.38),r.curveTo(275.75,283.38,297.25,288,301.42,267.77),r.curveTo(306.34,245.29,288.32,238.63,288.32,238.63),r.curveTo(279.91,236.44,237.86,225.48,162.18,205.75),r.lineTo(165.2,194.8),r.curveTo(255.88,204.4,306.27,209.73,316.34,210.8),r.curveTo(316.34,210.8,339.89,212.16,341.76,189.55),r.curveTo(343.65,166.93,320.5,164.13,320.5,164.13),r.curveTo(310.43,163.1,260.04,157.99,169.35,148.77),r.lineTo(169.35,138.97),r.curveTo(253.41,132.12,300.11,128.32,309.45,127.56),r.curveTo(309.45,127.56,332.27,122.38,332.27,102.61),r.curveTo(332.27,82.85,305.48,81.87,305.48,81.87),r.curveTo(293.99,82.2,236.54,83.88,133.13,86.9),r.lineTo(127.61,81.87),r.curveTo(145.3,59.39,155.12,46.9,157.09,44.41),r.curveTo(157.09,44.41,171.12,26.8,156.78,12.72),r.curveTo(143.83,0,124.08,14.49,124.08,14.49),r.curveTo(116.45,19.41,78.35,44.06,9.77,88.43),r.lineTo(0,251.94),r.curveTo(122.84,308.79,191.09,340.37,204.74,346.69),r.curveTo(204.74,346.69,222.91,354.12,231.66,336.39),r.fillAndStroke(),r.begin(),r.moveTo(231.66,336.39),r.curveTo(240.84,316.9,220.53,306.92,220.53,306.92),r.curveTo(215.2,303.67,188.58,287.43,140.67,258.19),r.lineTo(146.33,248.39),r.curveTo(223.98,269.38,267.12,281.04,275.75,283.38),r.curveTo(275.75,283.38,297.25,288,301.42,267.77),r.curveTo(306.34,245.29,288.32,238.63,288.32,238.63),r.curveTo(279.91,236.44,237.86,225.48,162.18,205.75),r.lineTo(165.2,194.8),r.curveTo(255.88,204.4,306.27,209.73,316.34,210.8),r.curveTo(316.34,210.8,339.89,212.16,341.76,189.55),r.curveTo(343.65,166.93,320.5,164.13,320.5,164.13),r.curveTo(310.43,163.1,260.04,157.99,169.35,148.77),r.lineTo(169.35,138.97),r.curveTo(253.41,132.12,300.11,128.32,309.45,127.56),r.curveTo(309.45,127.56,332.27,122.38,332.27,102.61),r.curveTo(332.27,82.85,305.48,81.87,305.48,81.87),r.curveTo(293.99,82.2,236.54,83.88,133.13,86.9),r.lineTo(127.61,81.87),r.curveTo(145.3,59.39,155.12,46.9,157.09,44.41),r.curveTo(157.09,44.41,171.12,26.8,156.78,12.72),r.curveTo(143.83,0,124.08,14.49,124.08,14.49),r.curveTo(116.45,19.41,78.35,44.06,9.77,88.43),r.lineTo(0,251.94),r.curveTo(122.84,308.79,191.09,340.37,204.74,346.69),r.curveTo(204.74,346.69,222.91,354.12,231.66,336.39),r.fillAndStroke()}paintScriptIcon({setIconOrigin:t,c:e,shape:n,ratioFromParent:i,icon:s}){s.fillColor=s.strokeColor;const r=this.newBpmnCanvas({c:e,ratioFromParent:i,setIconOrigin:t,shape:n,icon:s},{width:458.75,height:461.64});r.begin(),r.moveTo(67.85,.57),r.curveTo(50.73,0,33.26,8.86,22.35,18.84),r.curveTo(8.11,32.15,0,50.77,0,70.26),r.curveTo(0,73.15,0,87.59,0,113.6),r.curveTo(55.4,113.6,86.18,113.6,92.33,113.6),r.curveTo(94.92,150.46,85.64,180.4,74.22,211.27),r.curveTo(40.16,298.07,30.77,339.83,55.56,410.87),r.curveTo(63.72,438.26,87.59,457.85,114.91,461.09),r.curveTo(216.96,460.85,294.9,461.64,388.41,461.2),r.curveTo(407.2,461.09,425.14,453.55,438.3,440.13),r.curveTo(451.46,426.71,458.75,403.06,458.46,384.26),r.curveTo(458.43,382.23,458.18,365.93,458.15,363.89),r.curveTo(432.12,364.24,406.09,364.04,380.06,364.04),r.curveTo(377.61,347.52,377.24,337.58,378.28,324.48),r.curveTo(380.5,296.47,389.08,273.36,398.59,247.1),r.curveTo(408.11,220.83,418.41,191.47,420.86,154.24),r.curveTo(422.11,135.34,421.4,110.24,417.77,86.75),r.curveTo(417.76,86.71,417.73,86.54,417.69,86.22),r.curveTo(417.64,85.95,417.61,85.79,417.6,85.76),r.curveTo(414.03,68.13,410.49,48.84,399.79,31.47),r.curveTo(389.09,14.11,366.95,.59,341.75,.59),r.curveTo(286.97,.59,122.63,.57,67.85,.57),r.close(),r.moveTo(85.04,72.68),r.curveTo(80.63,72.68,45.33,72.68,40.92,72.68),r.curveTo(40.46,58.4,47.15,51.87,50.27,48.75),r.curveTo(55.8,44.28,59.84,41,73.82,41),r.curveTo(78.45,52.13,82.23,62.71,85.04,72.68),r.close(),r.moveTo(364.94,52.9),r.curveTo(370,61.11,373.9,76.44,377.38,93.51),r.curveTo(380.35,113.1,381.01,136.42,380.02,151.57),r.curveTo(377.97,182.76,369.51,207.12,360.1,233.1),r.curveTo(350.69,259.09,340.27,286.77,337.53,321.27),r.curveTo(336.38,335.86,336.72,346.69,338.87,364.01),r.curveTo(326.35,364.01,263.75,364.01,151.06,364.01),r.curveTo(151.06,382.2,151.06,392.31,151.06,394.33),r.curveTo(147.77,404.8,138.9,418.2,127.43,419.94),r.curveTo(111.49,422.35,97.86,411.8,94.75,399.19),r.curveTo(65.14,321.99,94.93,275.54,112.57,225.47),r.curveTo(130.14,177.95,137.92,117.41,112.71,42.09),r.curveTo(192.88,41.9,274.33,42.21,342.89,41.98),r.curveTo(357.15,42.03,359.83,44.61,364.94,52.9),r.close(),r.moveTo(409.96,399.48),r.curveTo(409.96,408.42,398.54,425.67,392.02,425.67),r.curveTo(325.19,425.79,252.29,425.67,185.23,425.67),r.curveTo(189.88,424.43,194.66,405.64,194.66,399.48),r.curveTo(237.72,399.48,388.43,399.48,409.96,399.48),r.close(),r.fill(),r.begin(),r.moveTo(182.1,131.2),r.lineTo(182.1,151.68),r.lineTo(321.89,151.68),r.lineTo(321.89,131.2),r.lineTo(182.1,131.2),r.close(),r.moveTo(162.25,251.09),r.lineTo(162.25,271.49),r.lineTo(301.96,271.49),r.lineTo(301.96,251.09),r.lineTo(162.25,251.09),r.close(),r.fill()}paintTableIcon({setIconOrigin:t,c:e,shape:n,ratioFromParent:i,icon:s}){const r=this.newBpmnCanvas({c:e,ratioFromParent:i,setIconOrigin:t,shape:n,icon:s},{width:640,height:640});r.begin(),r.moveTo(.19,.1),r.lineTo(298.78,.1),r.lineTo(298.78,198.88),r.lineTo(.19,198.88),r.lineTo(.19,.1),r.close(),r.fillAndStroke(),r.begin(),r.moveTo(0,0),r.lineTo(298.78,0),r.lineTo(298.78,48.88),r.lineTo(0,48.88),r.lineTo(0,0),r.close(),r.fillAndStroke(),r.begin(),r.moveTo(0,48.88),r.lineTo(98.78,48.88),r.lineTo(98.78,198.88),r.lineTo(0,198.88),r.lineTo(0,48.88),r.close(),r.fillAndStroke(),r.begin(),r.moveTo(1.09,122.69),r.lineTo(298.78,122.69),r.close(),r.fillAndStroke(),r.setFillColor(s.strokeColor),r.begin(),r.moveTo(0,0),r.lineTo(298.78,0),r.lineTo(298.78,48.88),r.lineTo(0,48.88),r.lineTo(0,0),r.close(),r.fillAndStroke()}}class _{static get(){return this.instance}static set(t){this.instance=t}}_.instance=new P;class D extends mxEllipse{constructor(e,n,i,s){super(e,n,i,s),this.iconPainter=_.get(),this.iconPainters=new Map([[t.ShapeBpmnEventKind.MESSAGE,t=>this.iconPainter.paintEnvelopeIcon(Object.assign(Object.assign({},t),{ratioFromParent:.5}))],[t.ShapeBpmnEventKind.TERMINATE,t=>this.iconPainter.paintCircleIcon(Object.assign(Object.assign({},t),{ratioFromParent:.6}))],[t.ShapeBpmnEventKind.TIMER,t=>this.iconPainter.paintClockIcon(Object.assign(Object.assign({},t),{setIconOrigin:t=>t.setIconOriginToShapeTopLeftProportionally(5)}))],[t.ShapeBpmnEventKind.SIGNAL,e=>this.iconPainter.paintTriangleIcon(Object.assign(Object.assign({},e),{ratioFromParent:.55,icon:Object.assign(Object.assign({},e.icon),{strokeWidth:t.StyleDefault.STROKE_WIDTH_THIN.valueOf()}),setIconOrigin:t=>t.setIconOriginToShapeTopLeftProportionally(4)}))],[t.ShapeBpmnEventKind.LINK,t=>this.iconPainter.paintRightArrowIcon(Object.assign(Object.assign({},t),{ratioFromParent:.55,icon:Object.assign(Object.assign({},t.icon),{strokeWidth:1.5})}))],[t.ShapeBpmnEventKind.ERROR,t=>this.iconPainter.paintErrorIcon(Object.assign(Object.assign({},t),{ratioFromParent:.55,icon:Object.assign(Object.assign({},t.icon),{strokeWidth:1.5})}))],[t.ShapeBpmnEventKind.COMPENSATION,t=>this.iconPainter.paintDoubleLeftArrowheadsIcon(Object.assign(Object.assign({},t),{ratioFromParent:.7,icon:Object.assign(Object.assign({},t.icon),{strokeWidth:1.5})}))],[t.ShapeBpmnEventKind.CANCEL,t=>this.iconPainter.paintXCrossIcon(Object.assign(Object.assign({},t),{ratioFromParent:.39,setIconOrigin:t=>t.setIconOriginToShapeTopLeftProportionally(9)}))],[t.ShapeBpmnEventKind.ESCALATION,e=>this.iconPainter.paintUpArrowheadIcon(Object.assign(Object.assign({},e),{ratioFromParent:.55,icon:Object.assign(Object.assign({},e.icon),{strokeWidth:t.StyleDefault.STROKE_WIDTH_THIN.valueOf()})}))],[t.ShapeBpmnEventKind.CONDITIONAL,t=>this.iconPainter.paintListIcon(Object.assign(Object.assign({},t),{ratioFromParent:.6,icon:Object.assign(Object.assign({},t.icon),{strokeWidth:1.5})}))]]),this.withFilledIcon=!1}paintVertexShape(t,e,n,i,s){this.markNonFullyRenderedEvents(t);const r=N(t,e,n,i,s,this,.25,this.withFilledIcon);D.setDashedOuterShapePattern(r,m.getBpmnIsInterrupting(this.style)),this.paintOuterShape(r),D.restoreOriginalOuterShapePattern(r),this.paintInnerShape(r)}markNonFullyRenderedEvents(t){}paintOuterShape({c:t,shape:{x:e,y:n,w:i,h:s}}){super.paintVertexShape(t,e,n,i,s)}paintInnerShape(t){(this.iconPainters.get(m.getBpmnEventKind(this.style))||(()=>this.iconPainter.paintEmptyIcon()))(t)}static setDashedOuterShapePattern(t,e){t.c.save(),"false"===e&&(t.c.setDashed(!0,!1),t.c.setDashPattern("3 2"))}static restoreOriginalOuterShapePattern(t){t.c.restore()}}class H extends D{constructor(e,n,i,s=t.StyleDefault.STROKE_WIDTH_THIN){super(e,n,i,s)}}class G extends D{constructor(e,n,i,s=t.StyleDefault.STROKE_WIDTH_THICK){super(e,n,i,s),this.withFilledIcon=!0}}class V extends D{constructor(e,n,i,s=t.StyleDefault.STROKE_WIDTH_THIN){super(e,n,i,s)}paintOuterShape({c:t,shape:{x:e,y:n,w:i,h:s,strokeWidth:r}}){t.ellipse(e,n,i,s),t.fillAndStroke();const o=1.5*r;t.ellipse(.02*i+o+e,.02*s+o+n,.96*i-2*o,.96*s-2*o),t.stroke()}}class U extends V{constructor(t,e,n,i){super(t,e,n,i)}}class k extends V{constructor(t,e,n,i){super(t,e,n,i),this.withFilledIcon=!0}}class B extends V{constructor(t,e,n,i){super(t,e,n,i)}}class F extends mxRhombus{constructor(t,e,n,i){super(t,e,n,i),this.iconPainter=_.get()}paintVertexShape(t,e,n,i,s){const r=N(t,e,n,i,s,this);this.paintOuterShape(r),this.paintInnerShape(r)}paintOuterShape({c:t,shape:{x:e,y:n,w:i,h:s}}){super.paintVertexShape(t,e,n,i,s)}}class Y extends F{constructor(e,n,i,s=t.StyleDefault.STROKE_WIDTH_THIN){super(e,n,i,s)}paintInnerShape(t){this.iconPainter.paintXCrossIcon(Object.assign(Object.assign({},t),{icon:Object.assign(Object.assign({},t.icon),{isFilled:!0}),setIconOrigin:t=>t.setIconOriginToShapeTopLeftProportionally(4)}))}}class z extends F{constructor(e,n,i,s=t.StyleDefault.STROKE_WIDTH_THIN){super(e,n,i,s)}paintInnerShape(t){this.iconPainter.paintPlusCrossIcon(Object.assign(Object.assign({},t),{setIconOrigin:t=>t.setIconOriginToShapeTopLeftProportionally(4)}))}}class W extends F{constructor(e,n,i,s=t.StyleDefault.STROKE_WIDTH_THIN){super(e,n,i,s)}paintInnerShape(e){this.iconPainter.paintCircleIcon(Object.assign(Object.assign({},e),{ratioFromParent:.62,icon:Object.assign(Object.assign({},e.icon),{isFilled:!1,strokeWidth:t.StyleDefault.STROKE_WIDTH_THICK.valueOf()})}))}}class X extends F{constructor(e,n,i,s=t.StyleDefault.STROKE_WIDTH_THIN){super(e,n,i,s)}paintOuterShape(t){const e=m.getBpmnIsParallelEventBasedGateway(this.style),n=m.getBpmnIsInstantiating(this.style)?e?"lightBlue":"purple":"orange";t.c.setFillColor(n),t.c.setFillAlpha(.6),super.paintOuterShape(t)}paintInnerShape(t){}}const q=[t.ShapeBpmnMarkerKind.LOOP,t.ShapeBpmnMarkerKind.MULTI_INSTANCE_PARALLEL,t.ShapeBpmnMarkerKind.MULTI_INSTANCE_SEQUENTIAL,t.ShapeBpmnMarkerKind.COMPENSATION,t.ShapeBpmnMarkerKind.EXPAND,t.ShapeBpmnMarkerKind.ADHOC];function K(t,e){_.get().paintEnvelopeIcon(Object.assign(Object.assign({},t),{setIconOrigin:t=>t.setIconOriginToShapeTopLeft(),ratioFromParent:.2,icon:Object.assign(Object.assign({},t.icon),{isFilled:e})}))}class j extends mxRectangleShape{constructor(e,n,i,s=t.StyleDefault.STROKE_WIDTH_THIN){super(e,n,i,s),this.iconPainter=_.get(),this.isRounded=!0}paintForeground(t,e,n,i,s){super.paintForeground(t,e,n,i,s),this.paintMarkerIcons(N(t,e,n,i,s,this,0,!1,1.5))}paintMarkerIcons(e){const n=m.getBpmnMarkers(this.style);n&&function(t){const e=[];return q.forEach(n=>{t.includes(n)&&e.push(n)}),t.filter(t=>!e.includes(t)).forEach(t=>{e.push(t)}),e}(n.split(",")).forEach((n,i,s)=>{switch((e=Object.assign(Object.assign({},e),{setIconOrigin:this.getIconOriginForMarkerIcon(s.length,i+1)})).c.save(),n){case t.ShapeBpmnMarkerKind.LOOP:this.iconPainter.paintLoopIcon(e);break;case t.ShapeBpmnMarkerKind.MULTI_INSTANCE_SEQUENTIAL:this.iconPainter.paintSequentialMultiInstanceIcon(e);break;case t.ShapeBpmnMarkerKind.MULTI_INSTANCE_PARALLEL:this.iconPainter.paintParallelMultiInstanceIcon(e);break;case t.ShapeBpmnMarkerKind.EXPAND:this.iconPainter.paintExpandIcon(e)}e.c.restore()})}getIconOriginForMarkerIcon(e,n){let i;if(1===e)i=t=>t.setIconOriginForIconBottomCentered();else{if(2!==e)throw new Error("NOT_IMPLEMENTED - to have a group of >2 markers in a row, centered in the task, implement this piece of code");i=e=>{e.setIconOriginForIconBottomCentered();const i=Math.pow(-1,n)*(t.StyleDefault.SHAPE_ACTIVITY_MARKER_ICON_SIZE/2+t.StyleDefault.SHAPE_ACTIVITY_MARKER_ICON_MARGIN);e.translateIconOrigin(i,0)}}return i}}class Z extends j{constructor(t,e,n,i){super(t,e,n,i)}paintForeground(t,e,n,i,s){super.paintForeground(t,e,n,i,s),this.paintTaskIcon(N(t,e,n,i,s,this))}}class Q extends Z{constructor(t,e,n,i){super(t,e,n,i)}paintTaskIcon(t){this.iconPainter.paintEmptyIcon()}}class J extends Z{constructor(t,e,n,i){super(t,e,n,i)}paintTaskIcon(t){this.iconPainter.paintGearIcon(Object.assign(Object.assign({},t),{setIconOrigin:t=>t.setIconOriginToShapeTopLeftProportionally(20)}))}}class $ extends Z{constructor(t,e,n,i){super(t,e,n,i)}paintTaskIcon(t){this.iconPainter.paintPersonIcon(Object.assign(Object.assign({},t),{setIconOrigin:t=>t.setIconOriginToShapeTopLeftProportionally(20)}))}}class tt extends Z{constructor(t,e,n,i){super(t,e,n,i)}paintTaskIcon(t){if(!m.getBpmnIsInstantiating(this.style))return void K(t,!1);const e=Object.assign(Object.assign({},t.shape),{w:20,h:20});this.iconPainter.paintCircleIcon({c:t.c,shape:e,icon:Object.assign(Object.assign({},t.icon),{isFilled:!1}),ratioFromParent:void 0,setIconOrigin:t=>t.setIconOriginToShapeTopLeft(4,4)}),e.x+=4,e.y+=4,this.iconPainter.paintEnvelopeIcon(Object.assign(Object.assign({},t),{shape:e,ratioFromParent:.65,setIconOrigin:t=>t.setIconOriginForIconCentered()}))}}class et extends Z{constructor(t,e,n,i){super(t,e,n,i)}paintTaskIcon(t){K(t,!0)}}class nt extends Z{constructor(t,e,n,i){super(t,e,n,i)}paintTaskIcon(t){this.iconPainter.paintHandIcon(Object.assign(Object.assign({},t),{ratioFromParent:.18,setIconOrigin:t=>t.setIconOriginToShapeTopLeftProportionally(20)}))}}class it extends Z{constructor(t,e,n,i){super(t,e,n,i)}paintTaskIcon(t){this.iconPainter.paintScriptIcon(Object.assign(Object.assign({},t),{ratioFromParent:.22,setIconOrigin:t=>t.setIconOriginToShapeTopLeftProportionally(20)}))}}class st extends j{constructor(e,n,i,s=t.StyleDefault.STROKE_WIDTH_THICK){super(e,n,i,s)}}class rt extends j{constructor(t,e,n,i){super(t,e,n,i)}paintBackground(e,n,i,s,r){const o=m.getBpmnSubProcessKind(this.style);e.save(),o===t.ShapeBpmnSubProcessKind.EVENT&&(e.setDashed(!0,!1),e.setDashPattern("1 2")),super.paintBackground(e,n,i,s,r),e.restore()}}class ot extends Z{constructor(t,e,n,i){super(t,e,n,i)}paintTaskIcon(t){this.iconPainter.paintTableIcon(Object.assign(Object.assign({},t),{ratioFromParent:.6,setIconOrigin:t=>t.setIconOriginToShapeTopLeftProportionally(15)}))}}class lt extends mxRectangleShape{constructor(e,n,i,s=t.StyleDefault.STROKE_WIDTH_THIN){super(e,n,i,s),this.TEXT_ANNOTATION_BORDER_LENGTH=10}paintBackground(t,e,n,i,s){t.begin(),t.moveTo(e+this.TEXT_ANNOTATION_BORDER_LENGTH,n),t.lineTo(e,n),t.lineTo(e,n+s),t.lineTo(e+this.TEXT_ANNOTATION_BORDER_LENGTH,n+s),t.fillAndStroke()}}var at,ht;!function(t){t.NONE="none",t.INITIATING="initiating",t.NON_INITIATING="non_initiating"}(at||(at={}));class ut extends mxRectangleShape{constructor(t,e,n,i){super(t,e,n,i),this.iconPainter=_.get()}paintVertexShape(t,e,n,i,s){const r=N(t,e,n,i,s,this,1,m.getBpmnIsInitiating(this.style)===at.NON_INITIATING);this.iconPainter.paintEnvelopeIcon(r)}}class pt{configureShapes(){this.initMxShapePrototype(mxClient.IS_FF),this.registerShapes()}registerShapes(){mxCellRenderer.registerShape(t.ShapeBpmnElementKind.EVENT_END,G),mxCellRenderer.registerShape(t.ShapeBpmnElementKind.EVENT_START,H),mxCellRenderer.registerShape(t.ShapeBpmnElementKind.EVENT_INTERMEDIATE_THROW,k),mxCellRenderer.registerShape(t.ShapeBpmnElementKind.EVENT_INTERMEDIATE_CATCH,U),mxCellRenderer.registerShape(t.ShapeBpmnElementKind.EVENT_BOUNDARY,B),mxCellRenderer.registerShape(t.ShapeBpmnElementKind.GATEWAY_EVENT_BASED,X),mxCellRenderer.registerShape(t.ShapeBpmnElementKind.GATEWAY_EXCLUSIVE,Y),mxCellRenderer.registerShape(t.ShapeBpmnElementKind.GATEWAY_INCLUSIVE,W),mxCellRenderer.registerShape(t.ShapeBpmnElementKind.GATEWAY_PARALLEL,z),mxCellRenderer.registerShape(t.ShapeBpmnElementKind.SUB_PROCESS,rt),mxCellRenderer.registerShape(t.ShapeBpmnElementKind.CALL_ACTIVITY,st),mxCellRenderer.registerShape(t.ShapeBpmnElementKind.TASK,Q),mxCellRenderer.registerShape(t.ShapeBpmnElementKind.TASK_SERVICE,J),mxCellRenderer.registerShape(t.ShapeBpmnElementKind.TASK_USER,$),mxCellRenderer.registerShape(t.ShapeBpmnElementKind.TASK_RECEIVE,tt),mxCellRenderer.registerShape(t.ShapeBpmnElementKind.TASK_SEND,et),mxCellRenderer.registerShape(t.ShapeBpmnElementKind.TASK_MANUAL,nt),mxCellRenderer.registerShape(t.ShapeBpmnElementKind.TASK_SCRIPT,it),mxCellRenderer.registerShape(t.ShapeBpmnElementKind.TASK_BUSINESS_RULE,ot),mxCellRenderer.registerShape(t.ShapeBpmnElementKind.TEXT_ANNOTATION,lt),mxCellRenderer.registerShape(t.StyleIdentifier.BPMN_STYLE_MESSAGE_FLOW_ICON,ut)}initMxShapePrototype(t){mxShape.prototype.createSvgCanvas=function(){const e=new mxSvgCanvas2D(this.node,!1);e.strokeTolerance=this.pointerEvents?this.svgStrokeTolerance:0,e.pointerEventsValue=this.svgPointerEvents,e.blockImagePointerEvents=t;const n=this.getSvgScreenOffset();return 0!=n?this.node.setAttribute("transform","translate("+n+","+n+")"):this.node.removeAttribute("transform"),this.state&&this.state.cell&&(this.node.setAttribute("class","class-state-cell-style-"+this.state.cell.style.replace(";","-")),this.node.setAttribute("data-cell-id",this.state.cell.id)),e.minStrokeWidth=this.minSvgStrokeWidth,this.antiAlias||(e.format=function(t){return Math.round(parseFloat(t))}),e}}}class dt{configureMarkers(){this.registerArrowDashMarker()}registerArrowDashMarker(){mxMarker.addMarker(t.MarkerIdentifier.ARROW_DASH,(t,e,n,i,s,r,o,l,a)=>{const h=s*(o+a+4),u=r*(o+a+4);return function(){t.begin(),t.moveTo(i.x-h/2-u/2,i.y-u/2+h/2),t.lineTo(i.x+u/2-3*h/2,i.y-3*u/2-h/2),t.stroke()}})}}class ct{configureMxCodec(){mxCodec.prototype.decode=function(t,e){if(null!==t&&t.nodeType===mxConstants.NODETYPE_ELEMENT){const n=window[t.nodeName];if(!n)throw new Error("Missing constructor for "+t.nodeName);const i=mxCodecRegistry.getCodec(n);if(null!==i)return i.decode(this,t,e);const s=t.cloneNode(!0);return s.removeAttribute("as"),s}return null}}}function mt(t,e,n,i){let s=null==t?i:t;return s=Math.min(Math.max(s,e),n),s}(ht=t.FitType||(t.FitType={}))[ht.None=0]="None",ht[ht.HorizontalVertical=1]="HorizontalVertical",ht[ht.Horizontal=2]="Horizontal",ht[ht.Vertical=3]="Vertical",ht[ht.Center=4]="Center";var gt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function xt(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function yt(t,e){return t(e={exports:{}},e.exports),e.exports}function ft(t){return t&&t.default||t}var vt=/^\s+|\s+$/g,Et=/^[-+]0x[0-9a-f]+$/i,Ct=/^0b[01]+$/i,St=/^0o[0-7]+$/i,Tt=parseInt,bt="object"==typeof gt&>&>.Object===Object&>,wt="object"==typeof self&&self&&self.Object===Object&&self,Lt=bt||wt||Function("return this")(),At=Object.prototype.toString,It=Math.max,Ot=Math.min,Rt=function(){return Lt.Date.now()};function Mt(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function Nt(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&"[object Symbol]"==At.call(t)}(t))return NaN;if(Mt(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Mt(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(vt,"");var n=Ct.test(t);return n||St.test(t)?Tt(t.slice(2),n?2:8):Et.test(t)?NaN:+t}var Pt=function(t,e,n){var i,s,r,o,l,a,h=0,u=!1,p=!1,d=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function c(e){var n=i,r=s;return i=s=void 0,h=e,o=t.apply(r,n)}function m(t){return h=t,l=setTimeout(x,e),u?c(t):o}function g(t){var n=t-a;return void 0===a||n>=e||n<0||p&&t-h>=r}function x(){var t=Rt();if(g(t))return y(t);l=setTimeout(x,function(t){var n=e-(t-a);return p?Ot(n,r-(t-h)):n}(t))}function y(t){return l=void 0,d&&i?c(t):(i=s=void 0,o)}function f(){var t=Rt(),n=g(t);if(i=arguments,s=this,a=t,n){if(void 0===l)return m(a);if(p)return l=setTimeout(x,e),c(a)}return void 0===l&&(l=setTimeout(x,e)),o}return e=Nt(e)||0,Mt(n)&&(u=!!n.leading,r=(p="maxWait"in n)?It(Nt(n.maxWait)||0,e):r,d="trailing"in n?!!n.trailing:d),f.cancel=function(){void 0!==l&&clearTimeout(l),h=0,i=a=s=l=void 0},f.flush=function(){return void 0===l?o:y(Rt())},f},_t="Expected a function",Dt=/^\s+|\s+$/g,Ht=/^[-+]0x[0-9a-f]+$/i,Gt=/^0b[01]+$/i,Vt=/^0o[0-7]+$/i,Ut=parseInt,kt="object"==typeof gt&>&>.Object===Object&>,Bt="object"==typeof self&&self&&self.Object===Object&&self,Ft=kt||Bt||Function("return this")(),Yt=Object.prototype.toString,zt=Math.max,Wt=Math.min,Xt=function(){return Ft.Date.now()};function qt(t,e,n){var i,s,r,o,l,a,h=0,u=!1,p=!1,d=!0;if("function"!=typeof t)throw new TypeError(_t);function c(e){var n=i,r=s;return i=s=void 0,h=e,o=t.apply(r,n)}function m(t){return h=t,l=setTimeout(x,e),u?c(t):o}function g(t){var n=t-a;return void 0===a||n>=e||n<0||p&&t-h>=r}function x(){var t=Xt();if(g(t))return y(t);l=setTimeout(x,function(t){var n=e-(t-a);return p?Wt(n,r-(t-h)):n}(t))}function y(t){return l=void 0,d&&i?c(t):(i=s=void 0,o)}function f(){var t=Xt(),n=g(t);if(i=arguments,s=this,a=t,n){if(void 0===l)return m(a);if(p)return l=setTimeout(x,e),c(a)}return void 0===l&&(l=setTimeout(x,e)),o}return e=jt(e)||0,Kt(n)&&(u=!!n.leading,r=(p="maxWait"in n)?zt(jt(n.maxWait)||0,e):r,d="trailing"in n?!!n.trailing:d),f.cancel=function(){void 0!==l&&clearTimeout(l),h=0,i=a=s=l=void 0},f.flush=function(){return void 0===l?o:y(Xt())},f}function Kt(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function jt(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&"[object Symbol]"==Yt.call(t)}(t))return NaN;if(Kt(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Kt(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(Dt,"");var n=Gt.test(t);return n||Vt.test(t)?Ut(t.slice(2),n?2:8):Ht.test(t)?NaN:+t}var Zt=function(t,e,n){var i=!0,s=!0;if("function"!=typeof t)throw new TypeError(_t);return Kt(n)&&(i="leading"in n?!!n.leading:i,s="trailing"in n?!!n.trailing:s),qt(t,e,{leading:i,maxWait:e,trailing:s})};class Qt extends mxGraph{constructor(t){super(t),this.container=t,this.cumulativeZoomFactor=1}fit(t,e,n,i,s,r,o){const l=super.fit(t,e,n,i,s,r,o);return this.cumulativeZoomFactor=l,l}zoomActual(){super.zoomActual(),this.cumulativeZoomFactor=this.view.scale}customFit(e){this.zoomActual();const n=null==e?void 0:e.type;if(null==n||n==t.FitType.None)return;const i=Qt.enforcePositiveValue(null==e?void 0:e.margin);if(n!=t.FitType.Center){let e=!1,s=!1;switch(n){case t.FitType.Horizontal:s=!0;break;case t.FitType.Vertical:e=!0}this.fit(this.border,!1,i,!0,e,s)}else{const t=3,e=this.getGraphBounds(),n=this.container.clientWidth-i,s=this.container.clientHeight-i,r=e.width/this.view.scale,o=e.height/this.view.scale,l=Math.min(t,Math.min(n/r,s/o));this.cumulativeZoomFactor=l,this.view.scaleAndTranslate(l,(i+n-r*l)/(2*l)-e.x/this.view.scale,(i+s-o*l)/(2*l)-e.y/this.view.scale)}}static enforcePositiveValue(t){return Math.max(t||0,0)}zoomTo(t,e,n,i,s,r){if(null===t){const[t,e,o]=this.getScaleAndTranslationDeltas(n,i,s);r&&this.view.scaleAndTranslate(t,this.view.translate.x+e,this.view.translate.y+o)}else super.zoomTo(t,e)}createMouseWheelZoomExperience(t){t=function(t){const e=null!=t?t:{};return e.debounceDelay=mt(e.debounceDelay,0,100,50),e.throttleDelay=mt(e.throttleDelay,0,100,50),e}(t),mxEvent.addMouseWheelListener(Pt(this.getZoomHandler(!0),t.debounceDelay),this.container),mxEvent.addMouseWheelListener(Zt(this.getZoomHandler(!1),t.throttleDelay),this.container)}performZoom(t,e,n){const[i,s]=this.getRelativeEventCoordinates(e);this.zoomTo(null,null,t,i,s,n),n&&mxEvent.consume(e)}getZoomHandler(t){return(e,n)=>{const i=e;if(mxEvent.isConsumed(i))return;(i.ctrlKey||mxClient.IS_MAC&&i.metaKey)&&!i.altKey&&!i.shiftKey&&this.performZoom(n,i,t)}}getRelativeEventCoordinates(t){const e=this.container.getBoundingClientRect();return[t.clientX-e.left,t.clientY-e.top]}getScaleAndTranslationDeltas(t,e,n){let i=2*e,s=2*n;const[r,o]=this.calculateFactorAndScale(t);return[i,s]=this.calculateTranslationDeltas(r,o,i,s),[o,i,s]}calculateTranslationDeltas(t,e,n,i){if(t>1){const s=(t-1)/(2*e);n*=-s,i*=-s}else{const e=(1/t-1)/(2*this.view.scale);n*=e,i*=e}return[n,i]}calculateFactorAndScale(t){this.cumulativeZoomFactor*=t?Math.sqrt(1.25):Math.sqrt(.8);let e=this.cumulativeZoomFactor/this.view.scale;const n=Math.round(this.view.scale*e*100)/100;return e=n/this.view.scale,[e,n]}}class Jt{constructor(t){this.container=t,this.graph=new Qt(t)}configure(t){return this.configureGraph(),this.configureMouseNavigationSupport(t),new O(this.graph).configureStyles(),(new pt).configureShapes(),(new dt).configureMarkers(),(new ct).configureMxCodec(),this.graph}configureGraph(){this.graph.setCellsLocked(!0),this.graph.setCellsSelectable(!1),this.graph.setEdgeLabelsMovable(!1),this.graph.setHtmlLabels(!0),this.graph.setConstrainChildren(!1),this.graph.setExtendParents(!1),this.graph.foldingEnabled=!1}configureMouseNavigationSupport(t){(null==t?void 0:t.mouseNavigationSupport)?(this.graph.panningHandler.useLeftButtonForPanning=!0,this.graph.panningHandler.ignoreCell=!0,this.graph.panningHandler.addListener(mxEvent.PAN_START,this.getPanningHandler("grab")),this.graph.panningHandler.addListener(mxEvent.PAN_END,this.getPanningHandler("default")),this.graph.setPanning(!0),this.graph.createMouseWheelZoomExperience(t.zoomConfiguration)):(this.graph.setPanning(!1),this.graph.panningHandler.setPinchEnabled(!1))}getPanningHandler(t){return this.getPanningHandlerCallback(t).bind(this.graph)}getPanningHandlerCallback(t){return function(){this.isEnabled()&&(this.container.style.cursor=t)}}}class $t{constructor(t){this.graph=t}computeRelativeCoordinates(t,e){const n=this.getTranslateForRoot(t);return new mxPoint(e.x+n.x,e.y+n.y)}getTranslateForRoot(t){const e=this.graph.getModel(),n=new mxPoint(0,0);for(;null!=t;){const i=e.getGeometry(t);null!=i&&(n.x-=i.x,n.y-=i.y),t=e.getParent(t)}return n}computeEdgeCenter(t){const e=t.geometry.points,n=e[0],i=e[e.length-1];if(null!=n&&null!=i){const t=i.x-n.x,e=i.y-n.y;return new mxPoint(n.x+t/2,n.y+e/2)}}}class te{constructor(t,e,n){this.graph=t,this.coordinatesTranslator=e,this.styleConfigurator=n}render(t,e){this.insertShapesAndEdges(t),this.graph.customFit(null==e?void 0:e.fit)}insertShapesAndEdges(e){const n=function(e){const n=e.flowNodes.filter(e=>{var n;const i=e.bpmnElement;return c.isSubProcess(null==i?void 0:i.kind)&&(null===(n=i)||void 0===n?void 0:n.markers.includes(t.ShapeBpmnMarkerKind.EXPAND))}).map(t=>{var e;return null===(e=t.bpmnElement)||void 0===e?void 0:e.id}),i=[],s=[],r=[];return e.flowNodes.forEach(t=>{var e,o;const l=null===(e=t.bpmnElement)||void 0===e?void 0:e.kind;c.isSubProcess(l)?i.push(t):c.isBoundaryEvent(l)?s.push(t):n.includes(null===(o=t.bpmnElement)||void 0===o?void 0:o.parentId)||r.push(t)}),{boundaryEvents:s,edges:e.edges,lanes:e.lanes,otherFlowNodes:r,pools:e.pools,subprocesses:i}}(e),i=this.graph.getModel();i.clear(),i.beginUpdate();try{this.insertShapes(n.pools),this.insertShapes(n.lanes),this.insertShapes(n.subprocesses),this.insertShapes(n.otherFlowNodes),this.insertShapes(n.boundaryEvents),this.insertEdges(n.edges)}finally{i.endUpdate()}}insertShapes(t){t.forEach(t=>{this.insertShape(t)})}getParent(t){const e=this.getCell(t.parentId);return e||(c.isBoundaryEvent(t.kind)?void 0:this.graph.getDefaultParent())}insertShape(t){var e;const n=t.bpmnElement;if(n){const i=this.getParent(n);if(!i)return void console.warn("Not possible to insert shape %s: parent cell %s is not found",n.id,n.parentId);const s=t.bounds;let r=null===(e=t.label)||void 0===e?void 0:e.bounds;r=c.isPoolOrLane(n.kind)?void 0:r;const o=this.styleConfigurator.computeStyle(t,r);this.insertVertex(i,n.id,n.name,s,r,o)}}insertEdges(t){t.forEach(t=>{var e;const n=t.bpmnElement;if(n){const i=this.graph.getDefaultParent(),s=this.getCell(n.sourceRefId),r=this.getCell(n.targetRefId),o=null===(e=t.label)||void 0===e?void 0:e.bounds,l=this.styleConfigurator.computeStyle(t,o),a=this.graph.insertEdge(i,n.id,n.name,s,r,l);if(this.insertWaypoints(t.waypoints,a),o){a.geometry.width=o.width,a.geometry.height=o.height;const t=this.coordinatesTranslator.computeEdgeCenter(a);if(t){a.geometry.relative=!1;const e=this.coordinatesTranslator.computeRelativeCoordinates(a.parent,new mxPoint(o.x,o.y)),n=e.x+o.width/2-t.x,i=e.y-t.y;a.geometry.offset=new mxPoint(n,i)}}this.insertMessageFlowIconIfNeeded(t,a)}})}insertMessageFlowIconIfNeeded(t,e){if(t.bpmnElement instanceof A&&t.messageVisibleKind!==at.NONE){const n=this.graph.insertVertex(e,"messageFlowIcon_of_"+e.id,void 0,0,0,20,14,this.styleConfigurator.computeMessageFlowIconStyle(t));n.geometry.relative=!0,n.geometry.offset=new mxPoint(-10,-7)}}insertWaypoints(t,e){t&&(e.geometry.points=t.map(t=>this.coordinatesTranslator.computeRelativeCoordinates(e.parent,new mxPoint(t.x,t.y))))}getCell(t){return this.graph.getModel().getCell(t)}insertVertex(t,e,n,i,s,r){const o=this.coordinatesTranslator.computeRelativeCoordinates(t,new mxPoint(i.x,i.y)),l=this.graph.insertVertex(t,e,n,o.x,o.y,i.width,i.height,r);if(s){const t=s.x-i.x,e=s.y-i.y;l.geometry.offset=new mxPoint(t,e)}return l}}var ee=yt((function(t,e){const n=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",i="["+n+"][:A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",s=new RegExp("^"+i+"$");e.isExist=function(t){return void 0!==t},e.isEmptyObject=function(t){return 0===Object.keys(t).length},e.merge=function(t,e,n){if(e){const i=Object.keys(e),s=i.length;for(let r=0;r1)for(var r in n[s]=[],t.child[s])n[s].push(ne(t.child[s][r],e));else if(!0===e.arrayMode){const i=ne(t.child[s][0],e);n[s]="object"==typeof i?[i]:i}else"strict"===e.arrayMode?n[s]=[ne(t.child[s][0],e)]:n[s]=ne(t.child[s][0],e)}return n};var ie={convertToJson:ne},se=function(t,e,n){this.tagname=t,this.parent=e,this.child={},this.attrsMap={},this.val=n,this.addChild=function(t){Array.isArray(this.child[t.tagname])?this.child[t.tagname].push(t):this.child[t.tagname]=[t]}};const re=ee.buildOptions;"<((!\\[CDATA\\[([\\s\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\/)(NAME)\\s*>))([^<]*)".replace(/NAME/g,ee.nameRegexp);!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);const oe={attributeNamePrefix:"@_",attrNodeName:!1,textNodeName:"#text",ignoreAttributes:!0,ignoreNameSpace:!1,allowBooleanAttributes:!1,parseNodeValue:!0,parseAttributeValue:!1,arrayMode:!1,trimValues:!0,cdataTagName:!1,cdataPositionChar:"\\c",tagValueProcessor:function(t,e){return t},attrValueProcessor:function(t,e){return t},stopNodes:[]};var le=oe;const ae=["attributeNamePrefix","attrNodeName","textNodeName","ignoreAttributes","ignoreNameSpace","allowBooleanAttributes","parseNodeValue","parseAttributeValue","arrayMode","trimValues","cdataTagName","cdataPositionChar","tagValueProcessor","attrValueProcessor","parseTrueNumberOnly","stopNodes"];var he=ae;function ue(t,e,n){return e&&(n.trimValues&&(e=e.trim()),e=de(e=n.tagValueProcessor(e,t),n.parseNodeValue,n.parseTrueNumberOnly)),e}function pe(t,e){if(e.ignoreNameSpace){const e=t.split(":"),n="/"===t.charAt(0)?"/":"";if("xmlns"===e[0])return"";2===e.length&&(t=n+e[1])}return t}function de(t,e,n){if(e&&"string"==typeof t){let e;return""===t.trim()||isNaN(t)?e="true"===t||"false"!==t&&t:(-1!==t.indexOf("0x")?e=Number.parseInt(t,16):-1!==t.indexOf(".")?(e=Number.parseFloat(t),t=t.replace(/\.?0+$/,"")):e=Number.parseInt(t,10),n&&(e=String(e)===t?e:t)),e}return ee.isExist(t)?t:""}const ce=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])(.*?)\\3)?","g");function me(t,e){if(!e.ignoreAttributes&&"string"==typeof t){t=t.replace(/\r?\n/g," ");const n=ee.getAllMatches(t,ce),i=n.length,s={};for(let t=0;t"===e)return{data:i,index:s};"\t"===e&&(e=" ")}i+=e}}function xe(t,e,n,i){const s=t.indexOf(e,n);if(-1===s)throw new Error(i);return s+e.length-1}var ye={defaultOptions:le,props:he,getTraversalObj:function(t,e){t=t.replace(/(\r\n)|\n/," "),e=re(e,oe,ae);const n=new se("!xml");let i=n,s="";for(let n=0;n",n,"Closing Tag is not closed.");let o=t.substring(n+2,r).trim();if(e.ignoreNameSpace){const t=o.indexOf(":");-1!==t&&(o=o.substr(t+1))}i&&(i.val?i.val=ee.getValue(i.val)+""+ue(o,s,e):i.val=ue(o,s,e)),e.stopNodes.length&&e.stopNodes.includes(i.tagname)&&(i.child=[],null==i.attrsMap&&(i.attrsMap={}),i.val=t.substr(i.startIndex+1,n-i.startIndex-1)),i=i.parent,s="",n=r}else if("?"===t[n+1])n=xe(t,"?>",n,"Pi Tag is not closed.");else if("!--"===t.substr(n+1,3))n=xe(t,"--\x3e",n,"Comment is not closed.");else if("!D"===t.substr(n+1,2)){const e=xe(t,">",n,"DOCTYPE is not closed.");n=t.substring(n,e).indexOf("[")>=0?t.indexOf("]>",n)+1:e}else if("!["===t.substr(n+1,2)){const r=xe(t,"]]>",n,"CDATA is not closed.")-2,o=t.substring(n+9,r);if(s&&(i.val=ee.getValue(i.val)+""+ue(i.tagname,s,e),s=""),e.cdataTagName){const t=new se(e.cdataTagName,i,o);i.addChild(t),i.val=ee.getValue(i.val)+e.cdataPositionChar,o&&(t.val=o)}else i.val=(i.val||"")+(o||"");n=r+2}else{const r=ge(t,n+1);let o=r.data;const l=r.index,a=o.indexOf(" ");let h=o;if(-1!==a&&(h=o.substr(0,a).trimRight(),o=o.substr(a+1)),e.ignoreNameSpace){const t=h.indexOf(":");-1!==t&&(h=h.substr(t+1))}if(i&&s&&"!xml"!==i.tagname&&(i.val=ee.getValue(i.val)+""+ue(i.tagname,s,e)),o.length>0&&o.lastIndexOf("/")===o.length-1){"/"===h[h.length-1]?(h=h.substr(0,h.length-1),o=h):o=o.substr(0,o.length-1);const t=new se(h,i,"");h!==o&&(t.attrsMap=me(o,e)),i.addChild(t)}else{const t=new se(h,i);e.stopNodes.length&&e.stopNodes.includes(t.tagname)&&(t.startIndex=l),h!==o&&(t.attrsMap=me(o,e)),i.addChild(t),i=t}s="",n=l}else s+=t[n]}return n}};const fe={allowBooleanAttributes:!1},ve=["allowBooleanAttributes"];function Ee(t,e){for(var n=e;e5&&"xml"===i)return Le("InvalidXml","XML declaration allowed only at the start of the document.",Ie(t,e));if("?"==t[e]&&">"==t[e+1]){e++;break}}return e}function Ce(t,e){if(t.length>e+5&&"-"===t[e+1]&&"-"===t[e+2]){for(e+=3;e"===t[e+2]){e+=2;break}}else if(t.length>e+8&&"D"===t[e+1]&&"O"===t[e+2]&&"C"===t[e+3]&&"T"===t[e+4]&&"Y"===t[e+5]&&"P"===t[e+6]&&"E"===t[e+7]){let n=1;for(e+=8;e"===t[e]&&(n--,0===n))break}else if(t.length>e+9&&"["===t[e+1]&&"C"===t[e+2]&&"D"===t[e+3]&&"A"===t[e+4]&&"T"===t[e+5]&&"A"===t[e+6]&&"["===t[e+7])for(e+=8;e"===t[e+2]){e+=2;break}return e}function Se(t,e){let n="",i="",s=!1;for(;e"===t[e]&&""===i){s=!0;break}n+=t[e]}return""===i&&{value:n,index:e,tagClosed:s}}const Te=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function be(t,e){const n=ee.getAllMatches(t,Te),i={};for(let s=0;s"!==t[o]&&" "!==t[o]&&"\t"!==t[o]&&"\n"!==t[o]&&"\r"!==t[o];o++)a+=t[o];if(a=a.trim(),"/"===a[a.length-1]&&(a=a.substring(0,a.length-1),o--),r=a,!ee.isName(r)){let e;return e=0===a.trim().length?"There is an unnecessary space between tag name and backward slash '0)return Le("InvalidTag","Closing tag '"+a+"' can't have attributes or invalid starting.",Ie(t,o));{const e=n.pop();if(a!==e)return Le("InvalidTag","Closing tag '"+e+"' is expected inplace of '"+a+"'.",Ie(t,o));0==n.length&&(s=!0)}}else{const r=be(u,e);if(!0!==r)return Le(r.err.code,r.err.msg,Ie(t,o-u.length+r.err.line));if(!0===s)return Le("InvalidXml","Multiple possible root nodes found.",Ie(t,o));n.push(a),i=!0}for(o++;o0)||Le("InvalidXml","Invalid '"+JSON.stringify(n,null,4).replace(/\r?\n/g,"")+"' found.",1):Le("InvalidXml","Start tag expected.",1)};const Me=function(t){return String.fromCharCode(t)},Ne={nilChar:Me(176),missingChar:Me(201),nilPremitive:Me(175),missingPremitive:Me(200),emptyChar:Me(178),emptyValue:Me(177),boundryChar:Me(179),objStart:Me(198),arrStart:Me(204),arrayEnd:Me(185)},Pe=[Ne.nilChar,Ne.nilPremitive,Ne.missingChar,Ne.missingPremitive,Ne.boundryChar,Ne.emptyChar,Ne.emptyValue,Ne.arrayEnd,Ne.objStart,Ne.arrStart],_e=function(t,e,n){if("string"==typeof e)return t&&t[0]&&void 0!==t[0].val?De(t[0].val):De(t);{const s=void 0===(i=t)?Ne.missingChar:null===i?Ne.nilChar:!(i.child&&0===Object.keys(i.child).length&&(!i.attrsMap||0===Object.keys(i.attrsMap).length))||Ne.emptyChar;if(!0===s){let i="";if(Array.isArray(e)){i+=Ne.arrStart;const s=e[0],r=t.length;if("string"==typeof s)for(let e=0;e1){for(var o in i+='"'+r+'" : [ ',t.child[r])i+=Be(t.child[r][o],e)+" , ";i=i.substr(0,i.length-1)+" ] "}else i+='"'+r+'" : '+Be(t.child[r][0],e)+" ,"}return ee.merge(i,t.attrsMap),ee.isEmptyObject(i)?ee.isExist(t.val)?t.val:"":(ee.isExist(t.val)&&("string"!=typeof t.val||""!==t.val&&t.val!==e.cdataPositionChar)&&(i+='"'+e.textNodeName+'" : '+(!0!==(l=t.val)&&!1!==l&&isNaN(l)?'"'+l+'"':l)),","===i[i.length-1]&&(i=i.substr(0,i.length-2)),i+"}");var l};var Fe={convertToJsonString:function(t,e){return(e=ke(e,ye.defaultOptions,ye.props)).indentBy=e.indentBy||"",Be(t,e)}};const Ye=ee.buildOptions,ze={attributeNamePrefix:"@_",attrNodeName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataTagName:!1,cdataPositionChar:"\\c",format:!1,indentBy:" ",supressEmptyNode:!1,tagValueProcessor:function(t){return t},attrValueProcessor:function(t){return t}},We=["attributeNamePrefix","attrNodeName","textNodeName","ignoreAttributes","cdataTagName","cdataPositionChar","format","indentBy","supressEmptyNode","tagValueProcessor","attrValueProcessor"];function Xe(t){this.options=Ye(t,ze,We),this.options.ignoreAttributes||this.options.attrNodeName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=tn),this.options.cdataTagName?this.isCDATA=en:this.isCDATA=function(){return!1},this.replaceCDATAstr=qe,this.replaceCDATAarr=Ke,this.options.format?(this.indentate=$e,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine=""),this.options.supressEmptyNode?(this.buildTextNode=Je,this.buildObjNode=Ze):(this.buildTextNode=Qe,this.buildObjNode=je),this.buildTextValNode=Qe,this.buildObjectNode=je}function qe(t,e){return t=this.options.tagValueProcessor(""+t),""===this.options.cdataPositionChar||""===t?t+"");return t+this.newLine}function je(t,e,n,i){return n&&!t.includes("<")?this.indentate(i)+"<"+e+n+">"+t+""+this.options.tagValueProcessor(t)+"",GT:">",Gt:"≫",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",harrcir:"⥈",harr:"↔",hArr:"⇔",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",Im:"ℑ",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"℅",in:"∈",infin:"∞",infintie:"⧝",inodot:"ı",intcal:"⊺",int:"∫",Int:"∬",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larrb:"⇤",larrbfs:"⤟",larr:"←",Larr:"↞",lArr:"⇐",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",LeftArrowBar:"⇤",leftarrow:"←",LeftArrow:"←",Leftarrow:"⇐",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangleBar:"⧏",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoustache:"⎰",lmoust:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftrightarrow:"⟷",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longmapsto:"⟼",longrightarrow:"⟶",LongRightArrow:"⟶",Longrightarrow:"⟹",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",midast:"*",midcir:"⫰",mid:"∣",middot:"·",minusb:"⊟",minus:"−",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natural:"♮",naturals:"ℕ",natur:"♮",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nlE:"≦̸",nle:"≰",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangleBar:"⧏̸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangleBar:"⧐̸",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"⇏",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",orarr:"↻",Or:"⩔",or:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",para:"¶",parallel:"∥",par:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportional:"∝",Proportion:"∷",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",Re:"ℜ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"⧐",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoustache:"⎱",rmoust:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",scap:"⪸",Scaron:"Š",scaron:"š",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdotb:"⊡",sdot:"⋅",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",solbar:"⌿",solb:"⧄",sol:"/",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squ:"□",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"⋑",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",ThinSpace:" ",thinsp:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"⊤",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",uarr:"↑",Uarr:"↟",uArr:"⇑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTeeArrow:"↥",UpTee:"⊥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",Vcy:"В",vcy:"в",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",veebar:"⊻",vee:"∨",Vee:"⋁",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xharr:"⟷",xhArr:"⟺",Xi:"Ξ",xi:"ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",yuml:"ÿ",Yuml:"Ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",zfr:"𝔷",Zfr:"ℨ",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}),ln=Object.freeze({__proto__:null,Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",amp:"&",AMP:"&",andand:"⩕",And:"⩓",and:"∧",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angmsd:"∡",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",apacir:"⩯",ap:"≈",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxHd:"╤",boxhD:"╥",boxHD:"╦",boxhu:"┴",boxHu:"╧",boxhU:"╨",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsolb:"⧅",bsol:"\\",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",capand:"⩄",capbrcup:"⩉",capcap:"⩋",cap:"∩",Cap:"⋒",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cir:"○",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cup:"∪",Cup:"⋓",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",Darr:"↡",dArr:"⇓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",ddagger:"‡",ddarr:"⇊",DD:"ⅅ",dd:"ⅆ",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrowBar:"⤓",downarrow:"↓",DownArrow:"↓",Downarrow:"⇓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVectorBar:"⥖",DownLeftVector:"↽",DownRightTeeVector:"⥟",DownRightVectorBar:"⥗",DownRightVector:"⇁",DownTeeArrow:"↧",DownTee:"⊤",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",Ecirc:"Ê",ecirc:"ê",ecir:"≖",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",edot:"ė",eDot:"≑",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp13:" ",emsp14:" ",emsp:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",ge:"≥",gE:"≧",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",gescc:"⪩",ges:"⩾",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gla:"⪥",gl:"≷",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gt:">",GT:">",Gt:"≫",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",harrcir:"⥈",harr:"↔",hArr:"⇔",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",Im:"ℑ",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",intcal:"⊺",int:"∫",Int:"∬",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larrb:"⇤",larrbfs:"⤟",larr:"←",Larr:"↞",lArr:"⇐",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",LeftArrowBar:"⇤",leftarrow:"←",LeftArrow:"←",Leftarrow:"⇐",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangleBar:"⧏",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoustache:"⎰",lmoust:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftrightarrow:"⟷",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longmapsto:"⟼",longrightarrow:"⟶",LongRightArrow:"⟶",Longrightarrow:"⟹",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",midast:"*",midcir:"⫰",mid:"∣",middot:"·",minusb:"⊟",minus:"−",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natural:"♮",naturals:"ℕ",natur:"♮",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nlE:"≦̸",nle:"≰",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangleBar:"⧏̸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangleBar:"⧐̸",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"⇏",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",orarr:"↻",Or:"⩔",or:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",para:"¶",parallel:"∥",par:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportional:"∝",Proportion:"∷",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",Re:"ℜ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"⧐",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoustache:"⎱",rmoust:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",scap:"⪸",Scaron:"Š",scaron:"š",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdotb:"⊡",sdot:"⋅",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",solbar:"⌿",solb:"⧄",sol:"/",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squ:"□",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"⋑",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",ThinSpace:" ",thinsp:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"⊤",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",uarr:"↑",Uarr:"↟",uArr:"⇑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTeeArrow:"↥",UpTee:"⊥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",Vcy:"В",vcy:"в",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",veebar:"⊻",vee:"∨",Vee:"⋁",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xharr:"⟷",xhArr:"⟺",Xi:"Ξ",xi:"ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",yuml:"ÿ",Yuml:"Ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",zfr:"𝔷",Zfr:"ℨ",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌",default:on}),an={Aacute:"Á",aacute:"á",Acirc:"Â",acirc:"â",acute:"´",AElig:"Æ",aelig:"æ",Agrave:"À",agrave:"à",amp:"&",AMP:"&",Aring:"Å",aring:"å",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",brvbar:"¦",Ccedil:"Ç",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",COPY:"©",curren:"¤",deg:"°",divide:"÷",Eacute:"É",eacute:"é",Ecirc:"Ê",ecirc:"ê",Egrave:"È",egrave:"è",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",GT:">",Iacute:"Í",iacute:"í",Icirc:"Î",icirc:"î",iexcl:"¡",Igrave:"Ì",igrave:"ì",iquest:"¿",Iuml:"Ï",iuml:"ï",laquo:"«",lt:"<",LT:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",Ntilde:"Ñ",ntilde:"ñ",Oacute:"Ó",oacute:"ó",Ocirc:"Ô",ocirc:"ô",Ograve:"Ò",ograve:"ò",ordf:"ª",ordm:"º",Oslash:"Ø",oslash:"ø",Otilde:"Õ",otilde:"õ",Ouml:"Ö",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',QUOT:'"',raquo:"»",reg:"®",REG:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",THORN:"Þ",thorn:"þ",times:"×",Uacute:"Ú",uacute:"ú",Ucirc:"Û",ucirc:"û",Ugrave:"Ù",ugrave:"ù",uml:"¨",Uuml:"Ü",uuml:"ü",Yacute:"Ý",yacute:"ý",yen:"¥",yuml:"ÿ"},hn=Object.freeze({__proto__:null,Aacute:"Á",aacute:"á",Acirc:"Â",acirc:"â",acute:"´",AElig:"Æ",aelig:"æ",Agrave:"À",agrave:"à",amp:"&",AMP:"&",Aring:"Å",aring:"å",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",brvbar:"¦",Ccedil:"Ç",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",COPY:"©",curren:"¤",deg:"°",divide:"÷",Eacute:"É",eacute:"é",Ecirc:"Ê",ecirc:"ê",Egrave:"È",egrave:"è",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",GT:">",Iacute:"Í",iacute:"í",Icirc:"Î",icirc:"î",iexcl:"¡",Igrave:"Ì",igrave:"ì",iquest:"¿",Iuml:"Ï",iuml:"ï",laquo:"«",lt:"<",LT:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",Ntilde:"Ñ",ntilde:"ñ",Oacute:"Ó",oacute:"ó",Ocirc:"Ô",ocirc:"ô",Ograve:"Ò",ograve:"ò",ordf:"ª",ordm:"º",Oslash:"Ø",oslash:"ø",Otilde:"Õ",otilde:"õ",Ouml:"Ö",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',QUOT:'"',raquo:"»",reg:"®",REG:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",THORN:"Þ",thorn:"þ",times:"×",Uacute:"Ú",uacute:"ú",Ucirc:"Û",ucirc:"û",Ugrave:"Ù",ugrave:"ù",uml:"¨",Uuml:"Ü",uuml:"ü",Yacute:"Ý",yacute:"ý",yen:"¥",yuml:"ÿ",default:an}),un={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'},pn=Object.freeze({__proto__:null,amp:"&",apos:"'",gt:">",lt:"<",quot:'"',default:un}),dn=ft(Object.freeze({__proto__:null,default:{0:65533,128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376}})),cn=yt((function(t,e){var n=gt&>.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(dn);e.default=function(t){if(t>=55296&&t<=57343||t>1114111)return"�";t in i.default&&(t=i.default[t]);var e="";return t>65535&&(t-=65536,e+=String.fromCharCode(t>>>10&1023|55296),t=56320|1023&t),e+=String.fromCharCode(t)}}));xt(cn);var mn=ft(ln),gn=ft(hn),xn=ft(pn),yn=yt((function(t,e){var n=gt&>.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.decodeHTML=e.decodeHTMLStrict=e.decodeXML=void 0;var i=n(mn),s=n(gn),r=n(xn),o=n(cn);function l(t){var e=Object.keys(t).join("|"),n=h(t),i=new RegExp("&(?:"+(e+="|#[xX][\\da-fA-F]+|#\\d+")+");","g");return function(t){return String(t).replace(i,n)}}e.decodeXML=l(r.default),e.decodeHTMLStrict=l(i.default);var a=function(t,e){return tfn(t)}}parse(t){return rn(t,this.options)}}function En(t,e){return""===t?e?{}:void 0:t}function Cn(t,e=!1){if(null==t)return[];let n;return n=Array.isArray(t)?t.map(t=>En(t,e)):[En(t,e)],n.filter(t=>t)}class Sn{constructor(){this.participantsById=new Map,this.participantsByProcessRef=new Map,this.processes=new Map,this.messageFlows=new Map,this.flowNodes=new Map,this.lanes=new Map,this.sequenceFlows=new Map,this.associationFlows=new Map,this.eventDefinitionsOfDefinitions=new Map,this.globalTaskIds=[]}findParticipantById(t){return this.participantsById.get(t)}findParticipantByProcessRef(t){return this.participantsByProcessRef.get(t)}registerParticipant(t){this.participantsById.set(t.id,t),t.processRef&&this.participantsByProcessRef.set(t.processRef,t)}_findProcess(t){return this.processes.get(t)}registerProcess(t){this.processes.set(t.id,t)}findProcess(e){const n=this.findParticipantById(e);if(n){const e=this._findProcess(n.processRef);if(e){const t=n.name||e.name;return new x(n.id,t,e.kind,e.parentId)}return new x(n.id,n.name,t.ShapeBpmnElementKind.POOL)}}findMessageFlow(t){return this.messageFlows.get(t)}registerMessageFlow(t){this.messageFlows.set(t.id,t)}findFlowNode(t){return this.flowNodes.get(t)}registerFlowNode(t){this.flowNodes.set(t.id,t)}findLane(t){return this.lanes.get(t)}registerLane(t){this.lanes.set(t.id,t)}findSequenceFlow(t){return this.sequenceFlows.get(t)}registerSequenceFlow(t){this.sequenceFlows.set(t.id,t)}findAssociationFlow(t){return this.associationFlows.get(t)}registerAssociationFlow(t){this.associationFlows.set(t.id,t)}findEventDefinitionOfDefinitions(t){return this.eventDefinitionsOfDefinitions.get(t)}registerEventDefinitionsOfDefinitions(t,e){this.eventDefinitionsOfDefinitions.set(t,e)}isGlobalTask(t){return this.globalTaskIds.includes(t)}registerGlobalTask(t){this.globalTaskIds.push(t)}}class Tn{constructor(t){this.convertedElements=t}deserialize(t){try{Cn(t).forEach(t=>this.parseCollaboration(t))}catch(t){console.error(t)}}parseCollaboration(t){this.buildParticipant(t.participant),this.buildMessageFlows(t.messageFlow)}buildParticipant(t){Cn(t).forEach(t=>{this.convertedElements.registerParticipant(new b(t.id,t.name,t.processRef))})}buildMessageFlows(t){Cn(t).forEach(t=>{this.convertedElements.registerMessageFlow(new A(t.id,t.name,t.sourceRef,t.targetRef))})}}class bn{constructor(t){this.convertedElements=t,this.defaultSequenceFlowIds=[]}deserialize(t){try{Cn(t).forEach(t=>this.parseProcess(t))}catch(t){console.error(t)}}parseProcess(e){this.convertedElements.registerProcess(new x(e.id,e.name,t.ShapeBpmnElementKind.POOL)),this.buildProcessInnerElements(e)}buildProcessInnerElements(e){const n=e.id;c.flowNodeKinds().filter(e=>e!=t.ShapeBpmnElementKind.EVENT_BOUNDARY).forEach(t=>this.buildFlowNodeBpmnElements(n,e[t],t)),this.buildFlowNodeBpmnElements(n,e.boundaryEvent,t.ShapeBpmnElementKind.EVENT_BOUNDARY),this.buildLaneBpmnElements(n,e[t.ShapeBpmnElementKind.LANE]),this.buildLaneSetBpmnElements(n,e.laneSet),this.buildSequenceFlows(e[p.SEQUENCE_FLOW]),this.buildAssociationFlows(e[p.ASSOCIATION_FLOW])}buildFlowNodeBpmnElements(e,n,i){Cn(n).forEach(n=>{let s;if(c.isEvent(i))s=this.buildShapeBpmnEvent(n,i,e);else if(c.isActivity(i))s=this.buildShapeBpmnActivity(n,i,e);else if(i==t.ShapeBpmnElementKind.GATEWAY_EVENT_BASED){const i=n;s=new T(n.id,i.name,e,i.instantiate,t.ShapeBpmnEventBasedGatewayKind[i.eventGatewayType])}else{const r=i===t.ShapeBpmnElementKind.TEXT_ANNOTATION?n.text:n.name;s=new x(n.id,r,i,e,n.instantiate)}const r=n.default;c.isWithDefaultSequenceFlow(i)&&r&&this.defaultSequenceFlowIds.push(r),s&&this.convertedElements.registerFlowNode(s)})}buildShapeBpmnActivity(e,n,i){const s=this.buildMarkers(e);return c.isSubProcess(n)?this.buildShapeBpmnSubProcess(e,i,s):c.isCallActivity(n)?this.convertedElements.isGlobalTask(e.calledElement)?void 0:new f(e.id,e.name,t.ShapeBpmnCallActivityKind.CALLING_PROCESS,i,s):new y(e.id,e.name,n,i,e.instantiate,s)}buildMarkers(e){const n=[],i=e.standardLoopCharacteristics,s=Cn(e.multiInstanceLoopCharacteristics,!0)[0];return i||""===i?n.push(t.ShapeBpmnMarkerKind.LOOP):s&&s.isSequential?n.push(t.ShapeBpmnMarkerKind.MULTI_INSTANCE_SEQUENTIAL):(s&&!s.isSequential||""===s)&&n.push(t.ShapeBpmnMarkerKind.MULTI_INSTANCE_PARALLEL),n}buildShapeBpmnEvent(e,n,i){const s=this.getEventDefinitions(e),o=s.map(t=>t.counter).reduce((t,e)=>t+e,0);if(0==o&&c.canHaveNoneEvent(n))return new E(e.id,e.name,n,t.ShapeBpmnEventKind.NONE,i);if(1==o){const t=s[0].kind;if(r.includes(t))return c.isBoundaryEvent(n)?this.buildShapeBpmnBoundaryEvent(e,t):c.isStartEvent(n)?new C(e.id,e.name,t,i,e.isInterrupting):new E(e.id,e.name,n,t,i)}}buildShapeBpmnBoundaryEvent(t,e){const n=this.convertedElements.findFlowNode(t.attachedToRef);if(c.isActivity(null==n?void 0:n.kind))return new S(t.id,t.name,e,t.attachedToRef,t.cancelActivity);console.warn("The boundary event %s must be attach to an activity, and not to %s",t.id,null==n?void 0:n.kind)}getEventDefinitions(t){const e=new Map;return s.forEach(n=>{const i=Cn(t[n+"EventDefinition"],!0).length;e.set(n,i)}),Cn(t.eventDefinitionRef).forEach(t=>{const n=this.convertedElements.findEventDefinitionOfDefinitions(t);e.set(n,e.get(n)+1)}),Array.from(e.keys()).map(t=>({kind:t,counter:e.get(t)})).filter(t=>t.counter>0)}buildShapeBpmnSubProcess(e,n,i){return this.buildSubProcessInnerElements(e),e.triggeredByEvent?new v(e.id,e.name,t.ShapeBpmnSubProcessKind.EVENT,n,i):new v(e.id,e.name,t.ShapeBpmnSubProcessKind.EMBEDDED,n,i)}buildSubProcessInnerElements(t){this.buildProcessInnerElements(t)}buildLaneSetBpmnElements(t,e){Cn(e).forEach(e=>{this.buildLaneBpmnElements(t,e.lane)})}buildLaneBpmnElements(e,n){Cn(n).forEach(n=>{var i;this.convertedElements.registerLane(new x(n.id,n.name,t.ShapeBpmnElementKind.LANE,e)),this.assignParentOfLaneFlowNodes(n),(null===(i=n.childLaneSet)||void 0===i?void 0:i.lane)&&this.buildLaneBpmnElements(n.id,n.childLaneSet.lane)})}assignParentOfLaneFlowNodes(t){Cn(t.flowNodeRef).forEach(e=>{const n=this.convertedElements.findFlowNode(e),i=t.id;n?c.isBoundaryEvent(n.kind)||(n.parentId=i):console.warn("Unable to assign lane %s as parent: flow node %s is not found",i,e)})}buildSequenceFlows(t){Cn(t).forEach(t=>{const e=this.getSequenceFlowKind(t);this.convertedElements.registerSequenceFlow(new L(t.id,t.name,t.sourceRef,t.targetRef,e))})}buildAssociationFlows(t){Cn(t).forEach(t=>{const e=t.associationDirection;this.convertedElements.registerAssociationFlow(new I(t.id,void 0,t.sourceRef,t.targetRef,e))})}getSequenceFlowKind(t){if(this.defaultSequenceFlowIds.includes(t.id))return a.DEFAULT;{const e=this.convertedElements.findFlowNode(t.sourceRef);if(e&&c.isWithDefaultSequenceFlow(e.kind)&&t.conditionExpression)return c.isActivity(e.kind)?a.CONDITIONAL_FROM_ACTIVITY:a.CONDITIONAL_FROM_GATEWAY}return a.NORMAL}}class wn{constructor(t,e,n,i){this.x=t,this.y=e,this.width=n,this.height=i}}class Ln{constructor(t,e,n,i,s=at.NONE){this.id=t,this.bpmnElement=e,this.waypoints=n,this.label=i,this.messageVisibleKind=s}}class An{constructor(t,e){this.x=t,this.y=e}}class In{constructor(t,e){this.font=t,this.bounds=e}}class On{constructor(t,e,n,i,s,r){this.name=t,this.size=e,this.isBold=n,this.isItalic=i,this.isUnderline=s,this.isStrikeThrough=r}}class Rn{constructor(t){this.convertedElements=t,this.convertedFonts=new Map}deserialize(t){const e=[],n=[],i=[],s=[],r=Cn(t)[0];if(r)try{this.deserializeFonts(r.BPMNLabelStyle);const t=r.BPMNPlane,o=this.deserializeEdges(t.BPMNEdge),l=this.deserializeShapes(t.BPMNShape);e.push(...l.flowNodes),n.push(...l.lanes),i.push(...l.pools),s.push(...o)}catch(t){console.error(t)}return{flowNodes:e,lanes:n,pools:i,edges:s}}deserializeFonts(t){this.convertedFonts=new Map,Cn(t).forEach(t=>{Cn(t.Font).forEach(e=>{this.convertedFonts.set(t.id,new On(e.name,e.size,e.isBold,e.isItalic,e.isUnderline,e.isStrikeThrough))})})}deserializeShapes(t){const e={flowNodes:[],lanes:[],pools:[]};t=Cn(t);for(let n=0;nthis.convertedElements.findFlowNode(t));if(s){e.flowNodes.push(s);continue}const r=this.deserializeShape(i,t=>this.convertedElements.findLane(t));if(r){e.lanes.push(r);continue}const o=this.deserializeShape(i,t=>this.convertedElements.findProcess(t));o?e.pools.push(o):console.warn("Shape json deserialization: unable to find bpmn element with id %s",i.bpmnElement)}return e}deserializeShape(e,n){const i=n(e.bpmnElement);if(i){const n=this.deserializeBounds(e);if(i.parentId){const t=this.convertedElements.findParticipantByProcessRef(i.parentId);t&&(i.parentId=t.id)}let s;(i instanceof v||i instanceof f)&&!e.isExpanded&&i.markers.push(t.ShapeBpmnMarkerKind.EXPAND),c.isPoolOrLane(i.kind)&&(s=void 0===e.isHorizontal||e.isHorizontal);const r=this.deserializeLabel(e.BPMNLabel,e.id);return new g(e.id,i,n,r,s)}}deserializeBounds(t){const e=t.Bounds;if(e)return new wn(e.x,e.y,e.width,e.height)}deserializeEdges(t){return Cn(t).map(t=>{const e=this.convertedElements.findSequenceFlow(t.bpmnElement)||this.convertedElements.findMessageFlow(t.bpmnElement)||this.convertedElements.findAssociationFlow(t.bpmnElement),n=this.deserializeWaypoints(t.waypoint),i=this.deserializeLabel(t.BPMNLabel,t.id),s=t.messageVisibleKind?t.messageVisibleKind:at.NONE;return new Ln(t.id,e,n,i,s)})}deserializeWaypoints(t){return Cn(t).map(t=>new An(t.x,t.y))}deserializeLabel(t,e){if(t&&"object"==typeof t){const n=this.findFont(t.labelStyle,e),i=this.deserializeBounds(t);if(n||i)return new In(n,i)}}findFont(t,e){let n;return t&&(n=this.convertedFonts.get(t),n||console.warn("Unable to assign font from style %s to shape/edge %s",t,e)),n}}class Mn{constructor(t){this.convertedElements=t}deserialize(t){try{s.forEach(e=>{Cn(t[e+"EventDefinition"],!0).forEach(t=>{this.convertedElements.registerEventDefinitionsOfDefinitions(t.id,e)})})}catch(t){console.error(t)}}}class Nn{constructor(t){this.convertedElements=t}deserialize(t){try{this.parseGlobalTasks(t.globalTask),this.parseGlobalTasks(t.globalBusinessRuleTask),this.parseGlobalTasks(t.globalManualTask),this.parseGlobalTasks(t.globalScriptTask),this.parseGlobalTasks(t.globalUserTask)}catch(t){console.error(t)}}parseGlobalTasks(t){Cn(t).forEach(t=>{this.convertedElements.registerGlobalTask(t.id)})}}class Pn{constructor(t,e,n,i,s){this.collaborationConverter=t,this.eventDefinitionConverter=e,this.globalTaskConverter=n,this.processConverter=i,this.diagramConverter=s}parse(t){const e=t.definitions;return this.collaborationConverter.deserialize(e.collaboration),this.eventDefinitionConverter.deserialize(e),this.globalTaskConverter.deserialize(e),this.processConverter.deserialize(e.process),this.diagramConverter.deserialize(e.BPMNDiagram)}}class _n{constructor(t,e){this.jsonParser=t,this.xmlParser=e}parse(t){const e=this.xmlParser.parse(t);return this.jsonParser.parse(e)}}function Dn(){return new _n(function(){const t=new Sn;return new Pn(new Tn(t),new Mn(t),new Nn(t),new bn(t),new Rn(t))}(),new vn)}class Hn{constructor(t,e){this.container=t;try{mxClient.isBrowserSupported()||mxUtils.error("Browser is not supported!",200,!1);const t=new Jt(this.container);this.graph=t.configure(e)}catch(t){throw mxUtils.alert("Cannot start application: "+t.message),t}}load(t,e){try{const i=Dn().parse(t);(n=this.graph,new te(n,new $t(n),new O(n))).render(i,e)}catch(t){throw mxUtils.alert("Cannot load bpmn diagram: "+t.message),t}var n}fit(t){this.graph.customFit(t)}}function Gn(t,e,...n){console.info(t+" "+e,...n)}function Vn(t,...e){Gn("[DEMO STARTUP]",t,...e)}function Un(t,...e){Gn("[DEMO]",t,...e)}class kn{constructor(t,e,n,i){this.window=t,this.outerContainerId=e,this.containerToFadeId=n,this.dropCallback=i,this.document=t.document,this.head=document.head,this.body=document.body,this.initializeDragAndDrop()}initializeDragAndDrop(){this.addDomElements(),this.addStyle();const t=document.getElementById(this.outerContainerId),e=document.getElementById(this.containerToFadeId);this.preventDefaultsOnEvents(["dragover","drop"],this.window),this.preventDefaultsOnEvents(["dragover","dragleave","drop"],t),this.addEventsOnDropContainer(t,e),this.addEventsOnDocument(this.outerContainerId,e)}preventDefaults(t){t.preventDefault(),t.stopPropagation()}preventDefaultsOnEvents(t,e){t.forEach(t=>{e.addEventListener(t,this.preventDefaults,!1)})}addDomElements(){const t=this.document.createElement("p");t.textContent="open BPMN diagram";const e=this.document.createElement("div");e.classList.add("drop-here-text"),e.appendChild(t);const n=this.document.createElement("div");n.id=this.outerContainerId,n.appendChild(e),this.body.insertBefore(n,this.body.firstChild)}addStyle(){const t=`\n#${this.containerToFadeId} {\n opacity: 1;\n}\n#${this.containerToFadeId}.faded {\n opacity: 0.1;\n}\n#${this.outerContainerId} {\n overflow: hidden;\n position: absolute;\n top: 10px;\n right: 10px;\n bottom: 10px;\n left: 10px;\n font-weight: bold;\n text-align: center;\n color: #555;\n}\n#${this.outerContainerId} .drop-here-text {\n display: none;\n border: 2px solid transparent;\n width: 98%;\n height: 98%;\n margin: 1%;\n overflow: hidden;\n}\n#${this.outerContainerId} .drop-here-text p {\n margin-top: 45%;\n font-style: normal;\n font-family: monospace;\n font-size: 40px;\n color: rgba(1,1,1,.2);\n}\n#${this.outerContainerId}.dragging .drop-here-text {\n cursor: default;\n display: block;\n border: 2px dashed #555;\n border-radius: 7px;\n}`,e=document.createElement("style");e.appendChild(document.createTextNode(t)),this.head.appendChild(e)}addEventsOnDropContainer(t,e){t.addEventListener("dragover",this.getAddClassCallback(e,!1),!1),t.addEventListener("mousedown",this.getRemoveClassCallback(e,!1),!1),t.addEventListener("drop",this.getDropCallbackForElement(e,!1,this.dropCallback),!1)}addEventsOnDocument(t,e){this.document.addEventListener("dragover",this.getAddClassCallback(e,!0,t),!1),this.document.addEventListener("dragleave",this.getRemoveClassCallback(e,!0,t),!1),this.document.addEventListener("drop",this.getDropCallbackForElement(e,!0,this.dropCallback,t),!1)}getAddClassCallback(t,e,n){return function(){e?this.querySelector("#"+n).classList.add("dragging"):this.classList.add("dragging"),t.classList.add("faded")}}getRemoveClassCallback(t,e,n){return function(){e?this.querySelector("#"+n).classList.remove("dragging"):this.classList.remove("dragging"),t.classList.remove("faded")}}getDropCallbackForElement(t,e,n,i){return function(s){try{const r=s.dataTransfer.files;n(r[0])}catch(t){console.error(t)}finally{e?this.querySelector("#"+i).classList.remove("dragging"):this.classList.remove("dragging"),t.classList.remove("faded")}}}}let Bn,Fn={};function Yn(t){Un("Loading bpmn...."),Bn.load(t,Fn),Un("BPMN loaded with configuration",JSON.stringify(Fn,void 0,2))}function zn(t){const e=new FileReader;e.onload=()=>{Yn(e.result)},e.readAsText(t)}function Wn(t,e){(function(t){return Un("Fetching BPMN content from url "+t),fetch(t).then(t=>{if(!t.ok)throw Error(String(t.status));return t.text()})})(t).catch(n=>{const i=`Unable to fetch ${t}. ${n}`;throw e(i),new Error(i)}).then(t=>(Un("BPMN content fetched"),t)).then(e=>{Yn(e),Un("Bpmn loaded from url "+t)})}function Xn(t){console.error(t)}return t.BpmnVisualization=Hn,t.IconPainter=P,t.IconPainterProvider=_,t.ShapeUtil=c,t.StyleConfigurator=O,t.bpmnEventKinds=s,t.buildPaintParameter=N,t.computeScaledIconSize=R,t.documentReady=function(t){"complete"===document.readyState||"interactive"===document.readyState?setTimeout(t,1):document.addEventListener("DOMContentLoaded",t)},t.fit=function(t){Un("Fitting...."),Bn.fit(t),Un("Fit done with configuration",t)},t.getCurrentLoadOptions=function(){return Object.assign({},Fn)},t.handleFileSelect=function(t){zn(t.target.files[0])},t.log=Un,t.logStartup=Vn,t.startBpmnVisualization=function(e){const n=Vn,i=e.container;n(`Initializing BpmnVisualization with container '${i}'...`),Bn=new Hn(window.document.getElementById(i),e.globalOptions),n("Initialization completed"),new kn(window,"drop-container",i,zn),n("Drag&Drop support initialized");const s=new URLSearchParams(window.location.search);n("Configuring Load Options"),Fn=e.loadOptions||{},Fn.fit=function(e,n){var i;const s=(null===(i=e.loadOptions)||void 0===i?void 0:i.fit)||{},r=n.get("fitTypeOnLoad");r&&(s.type=t.FitType[r]);const o=n.get("fitMargin");return o&&(s.margin=Number(o)),s}(e,s),n("Checking if 'BPMN content' is provided as query parameter");const r=s.get("bpmn");if(r){const t=decodeURIComponent(r);return n("Received bpmn length: "+t.length),n("Received bpmn content: "+t),n("BPMN auto loading"),Yn(t),void n("BPMN content loading completed")}n("No 'BPMN content' provided"),n("Checking if an 'url to fetch BPMN content' is provided as query parameter");const o=s.get("url");if(o){Wn(decodeURIComponent(o),e.statusFetchKoNotifier||Xn)}else n("No 'url to fetch BPMN content' provided")},t.supportedBpmnEventKinds=r,t.updateLoadOptions=function(t){Un("Updating load options",t),Fn.fit=t,Un("Load options updated!",Fn)},Object.defineProperty(t,"__esModule",{value:!0}),t}({}); diff --git a/examples/diagram-fit-variants/index.html b/examples/diagram-fit-variants/index.html index 0764c611..719038f3 100644 --- a/examples/diagram-fit-variants/index.html +++ b/examples/diagram-fit-variants/index.html @@ -80,7 +80,7 @@

Various fit variants

- +
@@ -125,9 +128,12 @@

Various fit variants

- + + + + + + +