mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-28 07:03:17 +08:00
6f96b5dd14
Added markdown files for the documentation. parseError exposed from the mermaidAPI
8 lines
243 KiB
JavaScript
8 lines
243 KiB
JavaScript
!function t(e,n,r){function i(s,o){if(!n[s]){if(!e[s]){var u="function"==typeof require&&require;if(!o&&u)return u(s,!0);if(a)return a(s,!0);throw new Error("Cannot find module '"+s+"'")}var c=n[s]={exports:{}};e[s][0].call(c.exports,function(t){var n=e[s][1][t];return i(n?n:t)},c,c.exports,t,e,n,r)}return n[s].exports}for(var a="function"==typeof require&&require,s=0;s<r.length;s++)i(r[s]);return i}({1:[function(t,e){e.exports={graphlib:t("./lib/graphlib"),dagre:t("./lib/dagre"),intersect:t("./lib/intersect"),render:t("./lib/render"),util:t("./lib/util"),version:t("./lib/version")}},{"./lib/dagre":8,"./lib/graphlib":9,"./lib/intersect":10,"./lib/render":25,"./lib/util":27,"./lib/version":28}],2:[function(t,e){function n(t,e,n,r){var i=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),s=i.append("path").attr("d","M 0 0 L 10 5 L 0 10 z").style("stroke-width",1).style("stroke-dasharray","1,0");a.applyStyle(s,n[r+"Style"])}function r(t,e,n,r){var i=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),s=i.append("path").attr("d","M 0 0 L 10 5 L 0 10 L 4 5 z").style("stroke-width",1).style("stroke-dasharray","1,0");a.applyStyle(s,n[r+"Style"])}function i(t,e,n,r){var i=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),s=i.append("path").attr("d","M 0 5 L 10 5").style("stroke-width",1).style("stroke-dasharray","1,0");a.applyStyle(s,n[r+"Style"])}var a=t("./util");e.exports={"default":n,normal:n,vee:r,undirected:i}},{"./util":27}],3:[function(t,e){function n(t,e){var n=e.nodes().filter(function(t){return r.isSubgraph(e,t)}),a=t.selectAll("g.cluster").data(n,function(t){return t});return a.selectAll("*").remove(),a.enter().append("g").attr("class","cluster").attr("id",function(t){var n=e.node(t);return n.id}).style("opacity",0),r.applyTransition(a,e).style("opacity",1),a.each(function(t){var n=e.node(t),r=d3.select(this),a=r.append("g").attr("class","label");d3.select(this).append("rect"),i(a,n,n.clusterLabelPos)}),a.selectAll("rect").each(function(t){var n=e.node(t),i=d3.select(this);r.applyStyle(i,n.style)}),r.applyTransition(a.exit(),e).style("opacity",0).remove(),a}var r=t("./util"),i=t("./label/add-label");e.exports=n},{"./label/add-label":18,"./util":27}],4:[function(t,e){"use strict";function n(t,e){var n=t.selectAll("g.edgeLabel").data(e.edges(),function(t){return a.edgeToId(t)}).classed("update",!0);return n.selectAll("*").remove(),n.enter().append("g").classed("edgeLabel",!0).style("opacity",0),n.each(function(t){var n=e.edge(t),a=i(s.select(this),e.edge(t),0,0).classed("label",!0),o=a.node().getBBox();n.labelId&&a.attr("id",n.labelId),r.has(n,"width")||(n.width=o.width),r.has(n,"height")||(n.height=o.height)}),a.applyTransition(n.exit(),e).style("opacity",0).remove(),n}var r=t("./lodash"),i=t("./label/add-label"),a=t("./util"),s=t("./d3");e.exports=n},{"./d3":7,"./label/add-label":18,"./lodash":21,"./util":27}],5:[function(t,e){"use strict";function n(t,e,n){var i=t.selectAll("g.edgePath").data(e.edges(),function(t){return l.edgeToId(t)}).classed("update",!0);return s(i,e),o(i,e),l.applyTransition(i,e).style("opacity",1),i.each(function(t){var n=h.select(this),r=e.edge(t);r.elem=this,r.id&&n.attr("id",r.id),l.applyClass(n,r["class"],(n.classed("update")?"update ":"")+"edgePath")}),i.selectAll("path.path").each(function(t){var n=e.edge(t);n.arrowheadId=u.uniqueId("arrowhead");var i=h.select(this).attr("marker-end",function(){return"url(#"+n.arrowheadId+")"}).style("fill","none");l.applyTransition(i,e).attr("d",function(t){return r(e,t)}),l.applyStyle(i,n.style)}),i.selectAll("defs *").remove(),i.selectAll("defs").each(function(t){var r=e.edge(t),i=n[r.arrowhead];i(h.select(this),r.arrowheadId,r,"arrowhead")}),i}function r(t,e){var n=t.edge(e),r=t.node(e.v),a=t.node(e.w),s=n.points.slice(1,n.points.length-1);return s.unshift(c(r,s[0])),s.push(c(a,s[s.length-1])),i(n,s)}function i(t,e){var n=h.svg.line().x(function(t){return t.x}).y(function(t){return t.y});return u.has(t,"lineInterpolate")&&n.interpolate(t.lineInterpolate),u.has(t,"lineTension")&&n.tension(Number(t.lineTension)),n(e)}function a(t){var e=t.getBBox(),n=t.getTransformToElement(t.ownerSVGElement).translate(e.width/2,e.height/2);return{x:n.e,y:n.f}}function s(t,e){var n=t.enter().append("g").attr("class","edgePath").style("opacity",0);n.append("path").attr("class","path").attr("d",function(t){var n=e.edge(t),r=e.node(t.v).elem,s=u.range(n.points.length).map(function(){return a(r)});return i(n,s)}),n.append("defs")}function o(t,e){var n=t.exit();l.applyTransition(n,e).style("opacity",0).remove(),l.applyTransition(n.select("path.path"),e).attr("d",function(t){var n=e.node(t.v);if(n){var r=u.range(this.pathSegList.length).map(function(){return n});return i({},r)}return h.select(this).attr("d")})}var u=t("./lodash"),c=t("./intersect/intersect-node"),l=t("./util"),h=t("./d3");e.exports=n},{"./d3":7,"./intersect/intersect-node":14,"./lodash":21,"./util":27}],6:[function(t,e){"use strict";function n(t,e,n){var o=e.nodes().filter(function(t){return!a.isSubgraph(e,t)}),u=t.selectAll("g.node").data(o,function(t){return t}).classed("update",!0);return u.selectAll("*").remove(),u.enter().append("g").attr("class","node").style("opacity",0),u.each(function(t){var o=e.node(t),u=s.select(this),c=u.append("g").attr("class","label"),l=i(c,o),h=n[o.shape],d=r.pick(l.node().getBBox(),"width","height");o.elem=this,o.id&&u.attr("id",o.id),o.labelId&&c.attr("id",o.labelId),a.applyClass(u,o["class"],(u.classed("update")?"update ":"")+"node"),r.has(o,"width")&&(d.width=o.width),r.has(o,"height")&&(d.height=o.height),d.width+=o.paddingLeft+o.paddingRight,d.height+=o.paddingTop+o.paddingBottom,c.attr("transform","translate("+(o.paddingLeft-o.paddingRight)/2+","+(o.paddingTop-o.paddingBottom)/2+")");var f=h(s.select(this),d,o);a.applyStyle(f,o.style);var p=f.node().getBBox();o.width=p.width,o.height=p.height}),a.applyTransition(u.exit(),e).style("opacity",0).remove(),u}var r=t("./lodash"),i=t("./label/add-label"),a=t("./util"),s=t("./d3");e.exports=n},{"./d3":7,"./label/add-label":18,"./lodash":21,"./util":27}],7:[function(t,e){e.exports=window.d3},{}],8:[function(t,e){var n;if(t)try{n=t("dagre")}catch(r){}n||(n=window.dagre),e.exports=n},{dagre:29}],9:[function(t,e){var n;if(t)try{n=t("graphlib")}catch(r){}n||(n=window.graphlib),e.exports=n},{graphlib:59}],10:[function(t,e){e.exports={node:t("./intersect-node"),circle:t("./intersect-circle"),ellipse:t("./intersect-ellipse"),polygon:t("./intersect-polygon"),rect:t("./intersect-rect")}},{"./intersect-circle":11,"./intersect-ellipse":12,"./intersect-node":14,"./intersect-polygon":15,"./intersect-rect":16}],11:[function(t,e){function n(t,e,n){return r(t,e,e,n)}var r=t("./intersect-ellipse");e.exports=n},{"./intersect-ellipse":12}],12:[function(t,e){function n(t,e,n,r){var i=t.x,a=t.y,s=i-r.x,o=a-r.y,u=Math.sqrt(e*e*o*o+n*n*s*s),c=Math.abs(e*n*s/u);r.x<i&&(c=-c);var l=Math.abs(e*n*o/u);return r.y<a&&(l=-l),{x:i+c,y:a+l}}e.exports=n},{}],13:[function(t,e){function n(t,e,n,i){var a,s,o,u,c,l,h,d,f,p,y,g,m,v,_;return a=e.y-t.y,o=t.x-e.x,c=e.x*t.y-t.x*e.y,f=a*n.x+o*n.y+c,p=a*i.x+o*i.y+c,0!==f&&0!==p&&r(f,p)||(s=i.y-n.y,u=n.x-i.x,l=i.x*n.y-n.x*i.y,h=s*t.x+u*t.yy+l,d=s*e.x+u*e.y+l,0!==h&&0!==d&&r(h,d)||(y=a*u-s*o,0===y))?void 0:(g=Math.abs(y/2),m=o*l-u*c,v=0>m?(m-g)/y:(m+g)/y,m=s*c-a*l,_=0>m?(m-g)/y:(m+g)/y,{x:v,y:_})}function r(t,e){return t*e>0}e.exports=n},{}],14:[function(t,e){function n(t,e){return t.intersect(e)}e.exports=n},{}],15:[function(t,e){function n(t,e,n){var i=t.x,a=t.y,s=[],o=Number.POSITIVE_INFINITY,u=Number.POSITIVE_INFINITY;e.forEach(function(t){o=Math.min(o,t.x),u=Math.min(u,t.y)});for(var c=i-t.width/2-o,l=a-t.height/2-u,h=0;h<e.length;h++){var d=e[h],f=e[h<e.length-1?h+1:0],p=r(t,n,{x:c+d.x,y:l+d.y},{x:c+f.x,y:l+f.y});p&&s.push(p)}return s.length?(s.length>1&&s.sort(function(t,e){var r=t.x-n.x,i=t.y-n.y,a=Math.sqrt(r*r+i*i),s=e.x-n.x,o=e.y-n.y,u=Math.sqrt(s*s+o*o);return u>a?-1:a===u?0:1}),s[0]):(console.log("NO INTERSECTION FOUND, RETURN NODE CENTER",t),t)}var r=t("./intersect-line");e.exports=n},{"./intersect-line":13}],16:[function(t,e){function n(t,e){var n,r,i=t.x,a=t.y,s=e.x-i,o=e.y-a,u=t.width/2,c=t.height/2;return Math.abs(o)*u>Math.abs(s)*c?(0>o&&(c=-c),n=0===o?0:c*s/o,r=c):(0>s&&(u=-u),n=u,r=0===s?0:u*o/s),{x:i+n,y:a+r}}e.exports=n},{}],17:[function(t,e){function n(t,e){var n=t.append("foreignObject").attr("width","100000"),i=n.append("xhtml:div"),a=e.label;switch(typeof a){case"function":i.insert(a);break;case"object":i.insert(function(){return a});break;default:i.html(a)}r.applyStyle(i,e.labelStyle),i.style("display","inline-block"),i.style("white-space","nowrap");var s,o;return i.each(function(){s=this.clientWidth,o=this.clientHeight}),n.attr("width",s).attr("height",o),n}var r=t("../util");e.exports=n},{"../util":27}],18:[function(t,e){function n(t,e,n){var s=e.label,o=t.append("g");"svg"===e.labelType?a(o,e):"string"!=typeof s||"html"===e.labelType?i(o,e):r(o,e);var u=o.node().getBBox();switch(n){case"top":y=-e.height/2;break;case"bottom":y=e.height/2-u.height;break;default:y=-u.height/2}return o.attr("transform","translate("+-u.width/2+","+y+")"),o}var r=t("./add-text-label"),i=t("./add-html-label"),a=t("./add-svg-label");e.exports=n},{"./add-html-label":17,"./add-svg-label":19,"./add-text-label":20}],19:[function(t,e){function n(t,e){var n=t;return n.node().appendChild(e.label),r.applyStyle(n,e.labelStyle),n}var r=t("../util");e.exports=n},{"../util":27}],20:[function(t,e){function n(t,e){for(var n=t.append("text"),a=r(e.label).split("\n"),s=0;s<a.length;s++)n.append("tspan").attr("xml:space","preserve").attr("dy","1em").attr("x","1").text(a[s]);return i.applyStyle(n,e.labelStyle),n}function r(t){for(var e,n="",r=!1,i=0;i<t.length;++i)if(e=t[i],r){switch(e){case"n":n+="\n";break;default:n+=e}r=!1}else"\\"===e?r=!0:n+=e;return n}var i=t("../util");e.exports=n},{"../util":27}],21:[function(t,e){var n;if(t)try{n=t("lodash")}catch(r){}n||(n=window._),e.exports=n},{lodash:82}],22:[function(t,e){"use strict";function n(t,e){function n(t){var n=e.node(t);return"translate("+n.x+","+n.y+")"}var a=t.filter(function(){return!i.select(this).classed("update")});a.attr("transform",n),r.applyTransition(t,e).style("opacity",1).attr("transform",n),r.applyTransition(a.selectAll("rect"),e).attr("width",function(t){return e.node(t).width}).attr("height",function(t){return e.node(t).height}).attr("x",function(t){var n=e.node(t);return-n.width/2}).attr("y",function(t){var n=e.node(t);return-n.height/2})}var r=t("./util"),i=t("./d3");e.exports=n},{"./d3":7,"./util":27}],23:[function(t,e){"use strict";function n(t,e){function n(t){var n=e.edge(t);return a.has(n,"x")?"translate("+n.x+","+n.y+")":""}var s=t.filter(function(){return!i.select(this).classed("update")});s.attr("transform",n),r.applyTransition(t,e).style("opacity",1).attr("transform",n)}var r=t("./util"),i=t("./d3"),a=t("./lodash");e.exports=n},{"./d3":7,"./lodash":21,"./util":27}],24:[function(t,e){"use strict";function n(t,e){function n(t){var n=e.node(t);return"translate("+n.x+","+n.y+")"}var a=t.filter(function(){return!i.select(this).classed("update")});a.attr("transform",n),r.applyTransition(t,e).style("opacity",1).attr("transform",n)}var r=t("./util"),i=t("./d3");e.exports=n},{"./d3":7,"./util":27}],25:[function(t,e){function n(){var e=t("./create-nodes"),n=t("./create-clusters"),s=t("./create-edge-labels"),u=t("./create-edge-paths"),c=t("./position-nodes"),l=t("./position-edge-labels"),h=t("./position-clusters"),d=t("./shapes"),f=t("./arrows"),p=function(t,p){r(p);var y=a(t,"output"),g=a(y,"clusters"),m=a(y,"edgePaths"),v=s(a(y,"edgeLabels"),p),_=e(a(y,"nodes"),p,d);o(p),c(_,p),l(v,p),u(m,p,f);var b=n(g,p);h(b,p),i(p)};return p.createNodes=function(t){return arguments.length?(e=t,p):e},p.createClusters=function(t){return arguments.length?(n=t,p):n},p.createEdgeLabels=function(t){return arguments.length?(s=t,p):s},p.createEdgePaths=function(t){return arguments.length?(u=t,p):u},p.shapes=function(t){return arguments.length?(d=t,p):d},p.arrows=function(t){return arguments.length?(f=t,p):f},p}function r(t){t.nodes().forEach(function(e){var n=t.node(e);s.has(n,"label")||t.children(e).length||(n.label=e),s.has(n,"paddingX")&&s.defaults(n,{paddingLeft:n.paddingX,paddingRight:n.paddingX}),s.has(n,"paddingY")&&s.defaults(n,{paddingTop:n.paddingY,paddingBottom:n.paddingY}),s.has(n,"padding")&&s.defaults(n,{paddingLeft:n.padding,paddingRight:n.padding,paddingTop:n.padding,paddingBottom:n.padding}),s.defaults(n,u),s.each(["paddingLeft","paddingRight","paddingTop","paddingBottom"],function(t){n[t]=Number(n[t])}),s.has(n,"width")&&(n._prevWidth=n.width),s.has(n,"height")&&(n._prevHeight=n.height)}),t.edges().forEach(function(e){var n=t.edge(e);s.has(n,"label")||(n.label=""),s.defaults(n,c)})}function i(t){s.each(t.nodes(),function(e){var n=t.node(e);s.has(n,"_prevWidth")?n.width=n._prevWidth:delete n.width,s.has(n,"_prevHeight")?n.height=n._prevHeight:delete n.height,delete n._prevWidth,delete n._prevHeight})}function a(t,e){var n=t.select("g."+e);return n.empty()&&(n=t.append("g").attr("class",e)),n}var s=t("./lodash"),o=t("./dagre").layout;e.exports=n;var u={paddingLeft:10,paddingRight:10,paddingTop:10,paddingBottom:10,rx:0,ry:0,shape:"rect"},c={arrowhead:"normal",lineInterpolate:"linear"}},{"./arrows":2,"./create-clusters":3,"./create-edge-labels":4,"./create-edge-paths":5,"./create-nodes":6,"./dagre":8,"./lodash":21,"./position-clusters":22,"./position-edge-labels":23,"./position-nodes":24,"./shapes":26}],26:[function(t,e){"use strict";function n(t,e,n){var r=t.insert("rect",":first-child").attr("rx",n.rx).attr("ry",n.ry).attr("x",-e.width/2).attr("y",-e.height/2).attr("width",e.width).attr("height",e.height);return n.intersect=function(t){return s(n,t)},r}function r(t,e,n){var r=e.width/2,i=e.height/2,a=t.insert("ellipse",":first-child").attr("x",-e.width/2).attr("y",-e.height/2).attr("rx",r).attr("ry",i);return n.intersect=function(t){return o(n,r,i,t)},a}function i(t,e,n){var r=Math.max(e.width,e.height)/2,i=t.insert("circle",":first-child").attr("x",-e.width/2).attr("y",-e.height/2).attr("r",r);return n.intersect=function(t){return u(n,r,t)},i}function a(t,e,n){var r=e.width*Math.SQRT2/2,i=e.height*Math.SQRT2/2,a=[{x:0,y:-i},{x:-r,y:0},{x:0,y:i},{x:r,y:0}],s=t.insert("polygon",":first-child").attr("points",a.map(function(t){return t.x+","+t.y}).join(" "));return n.intersect=function(t){return c(n,a,t)},s}var s=t("./intersect/intersect-rect"),o=t("./intersect/intersect-ellipse"),u=t("./intersect/intersect-circle"),c=t("./intersect/intersect-polygon");e.exports={rect:n,ellipse:r,circle:i,diamond:a}},{"./intersect/intersect-circle":11,"./intersect/intersect-ellipse":12,"./intersect/intersect-polygon":15,"./intersect/intersect-rect":16}],27:[function(t,e){function n(t,e){return!!t.children(e).length}function r(t){return i(t.v)+":"+i(t.w)+":"+i(t.name)}function i(t){return t?String(t).replace(c,"\\:"):""}function a(t,e){e&&t.attr("style",e)}function s(t,e,n){e&&t.attr("class",e).attr("class",n+" "+t.attr("class"))}function o(t,e){var n=e.graph();if(u.isPlainObject(n)){var r=n.transition;if(u.isFunction(r))return r(t)}return t}var u=t("./lodash");e.exports={isSubgraph:n,edgeToId:r,applyStyle:a,applyClass:s,applyTransition:o};var c=/:/g},{"./lodash":21}],28:[function(t,e){e.exports="0.4.8"},{}],29:[function(t,e){e.exports={graphlib:t("./lib/graphlib"),layout:t("./lib/layout"),debug:t("./lib/debug"),util:{time:t("./lib/util").time,notime:t("./lib/util").notime},version:t("./lib/version")}},{"./lib/debug":34,"./lib/graphlib":35,"./lib/layout":37,"./lib/util":57,"./lib/version":58}],30:[function(t,e){"use strict";function n(t){function e(t){return function(e){return t.edge(e).weight}}var n="greedy"===t.graph().acyclicer?s(t,e(t)):r(t);a.each(n,function(e){var n=t.edge(e);t.removeEdge(e),n.forwardName=e.name,n.reversed=!0,t.setEdge(e.w,e.v,n,a.uniqueId("rev"))})}function r(t){function e(s){a.has(i,s)||(i[s]=!0,r[s]=!0,a.each(t.outEdges(s),function(t){a.has(r,t.w)?n.push(t):e(t.w)}),delete r[s])}var n=[],r={},i={};return a.each(t.nodes(),e),n}function i(t){a.each(t.edges(),function(e){var n=t.edge(e);if(n.reversed){t.removeEdge(e);var r=n.forwardName;delete n.reversed,delete n.forwardName,t.setEdge(e.w,e.v,n,r)}})}var a=t("./lodash"),s=t("./greedy-fas");e.exports={run:n,undo:i}},{"./greedy-fas":36,"./lodash":38}],31:[function(t,e){function n(t){function e(n){var a=t.children(n),s=t.node(n);if(a.length&&i.each(a,e),i.has(s,"minRank")){s.borderLeft=[],s.borderRight=[];for(var o=s.minRank,u=s.maxRank+1;u>o;++o)r(t,"borderLeft","_bl",n,s,o),r(t,"borderRight","_br",n,s,o)}}i.each(t.children(),e)}function r(t,e,n,r,i,s){var o={width:0,height:0,rank:s,borderType:e},u=i[e][s-1],c=a.addDummyNode(t,"border",o,n);i[e][s]=c,t.setParent(c,r),u&&t.setEdge(u,c,{weight:1})}var i=t("./lodash"),a=t("./util");e.exports=n},{"./lodash":38,"./util":57}],32:[function(t,e){"use strict";function n(t){var e=t.graph().rankdir.toLowerCase();("lr"===e||"rl"===e)&&i(t)}function r(t){var e=t.graph().rankdir.toLowerCase();("bt"===e||"rl"===e)&&s(t),("lr"===e||"rl"===e)&&(u(t),i(t))}function i(t){l.each(t.nodes(),function(e){a(t.node(e))}),l.each(t.edges(),function(e){a(t.edge(e))})}function a(t){var e=t.width;t.width=t.height,t.height=e}function s(t){l.each(t.nodes(),function(e){o(t.node(e))}),l.each(t.edges(),function(e){var n=t.edge(e);l.each(n.points,o),l.has(n,"y")&&o(n)})}function o(t){t.y=-t.y}function u(t){l.each(t.nodes(),function(e){c(t.node(e))}),l.each(t.edges(),function(e){var n=t.edge(e);l.each(n.points,c),l.has(n,"x")&&c(n)})}function c(t){var e=t.x;t.x=t.y,t.y=e}var l=t("./lodash");e.exports={adjust:n,undo:r}},{"./lodash":38}],33:[function(t,e){function n(){var t={};t._next=t._prev=t,this._sentinel=t}function r(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function i(t,e){return"_next"!==t&&"_prev"!==t?e:void 0}e.exports=n,n.prototype.dequeue=function(){var t=this._sentinel,e=t._prev;return e!==t?(r(e),e):void 0},n.prototype.enqueue=function(t){var e=this._sentinel;t._prev&&t._next&&r(t),t._next=e._next,e._next._prev=t,e._next=t,t._prev=e},n.prototype.toString=function(){for(var t=[],e=this._sentinel,n=e._prev;n!==e;)t.push(JSON.stringify(n,i)),n=n._prev;return"["+t.join(", ")+"]"}},{}],34:[function(t,e){function n(t){var e=i.buildLayerMatrix(t),n=new a({compound:!0,multigraph:!0}).setGraph({});return r.each(t.nodes(),function(e){n.setNode(e,{label:e}),n.setParent(e,"layer"+t.node(e).rank)}),r.each(t.edges(),function(t){n.setEdge(t.v,t.w,{},t.name)}),r.each(e,function(t,e){var i="layer"+e;n.setNode(i,{rank:"same"}),r.reduce(t,function(t,e){return n.setEdge(t,e,{style:"invis"}),e})}),n}var r=t("./lodash"),i=t("./util"),a=t("./graphlib").Graph;e.exports={debugOrdering:n}},{"./graphlib":35,"./lodash":38,"./util":57}],35:[function(t,e){e.exports=t(9)},{graphlib:59}],36:[function(t,e){function n(t,e){if(t.nodeCount()<=1)return[];var n=a(t,e||l),i=r(n.graph,n.buckets,n.zeroIdx);return o.flatten(o.map(i,function(e){return t.outEdges(e.v,e.w)}),!0)}function r(t,e,n){for(var r,a=[],s=e[e.length-1],o=e[0];t.nodeCount();){for(;r=o.dequeue();)i(t,e,n,r);for(;r=s.dequeue();)i(t,e,n,r);if(t.nodeCount())for(var u=e.length-2;u>0;--u)if(r=e[u].dequeue()){a=a.concat(i(t,e,n,r,!0));break}}return a}function i(t,e,n,r,i){var a=i?[]:void 0;return o.each(t.inEdges(r.v),function(r){var o=t.edge(r),u=t.node(r.v);i&&a.push({v:r.v,w:r.w}),u.out-=o,s(e,n,u)}),o.each(t.outEdges(r.v),function(r){var i=t.edge(r),a=r.w,o=t.node(a);o["in"]-=i,s(e,n,o)}),t.removeNode(r.v),a}function a(t,e){var n=new u,r=0,i=0;o.each(t.nodes(),function(t){n.setNode(t,{v:t,"in":0,out:0})}),o.each(t.edges(),function(t){var a=n.edge(t.v,t.w)||0,s=e(t),o=a+s;n.setEdge(t.v,t.w,o),i=Math.max(i,n.node(t.v).out+=s),r=Math.max(r,n.node(t.w)["in"]+=s)});var a=o.range(i+r+3).map(function(){return new c}),l=r+1;return o.each(n.nodes(),function(t){s(a,l,n.node(t))}),{graph:n,buckets:a,zeroIdx:l}}function s(t,e,n){n.out?n["in"]?t[n.out-n["in"]+e].enqueue(n):t[t.length-1].enqueue(n):t[0].enqueue(n)}var o=t("./lodash"),u=t("./graphlib").Graph,c=t("./data/list");e.exports=n;var l=o.constant(1)},{"./data/list":33,"./graphlib":35,"./lodash":38}],37:[function(t,e){"use strict";function n(t,e){var n=e&&e.debugTiming?O.time:O.notime;n("layout",function(){var e=n(" buildLayoutGraph",function(){return a(t)});n(" runLayout",function(){r(e,n)}),n(" updateInputGraph",function(){i(t,e)})})}function r(t,e){e(" makeSpaceForEdgeLabels",function(){s(t)}),e(" removeSelfEdges",function(){y(t)}),e(" acyclic",function(){x.run(t)}),e(" nestingGraph.run",function(){T.run(t)}),e(" rank",function(){k(O.asNonCompoundGraph(t))}),e(" injectEdgeLabelProxies",function(){o(t)}),e(" removeEmptyRanks",function(){D(t)}),e(" nestingGraph.cleanup",function(){T.cleanup(t)}),e(" normalizeRanks",function(){A(t)}),e(" assignRankMinMax",function(){u(t)}),e(" removeEdgeLabelProxies",function(){c(t)}),e(" normalize.run",function(){w.run(t)}),e(" parentDummyChains",function(){E(t)}),e(" addBorderSegments",function(){C(t)}),e(" order",function(){S(t)}),e(" insertSelfEdges",function(){g(t)}),e(" adjustCoordinateSystem",function(){F.adjust(t)}),e(" position",function(){B(t)}),e(" positionSelfEdges",function(){m(t)}),e(" removeBorderNodes",function(){p(t)}),e(" normalize.undo",function(){w.undo(t)}),e(" fixupEdgeLabelCoords",function(){d(t)}),e(" undoCoordinateSystem",function(){F.undo(t)}),e(" translateGraph",function(){l(t)}),e(" assignNodeIntersects",function(){h(t)}),e(" reversePoints",function(){f(t)}),e(" acyclic.undo",function(){x.undo(t)})}function i(t,e){b.each(t.nodes(),function(n){var r=t.node(n),i=e.node(n);r&&(r.x=i.x,r.y=i.y,e.children(n).length&&(r.width=i.width,r.height=i.height))}),b.each(t.edges(),function(n){var r=t.edge(n),i=e.edge(n);r.points=i.points,b.has(i,"x")&&(r.x=i.x,r.y=i.y)}),t.graph().width=e.graph().width,t.graph().height=e.graph().height}function a(t){var e=new M({multigraph:!0,compound:!0}),n=_(t.graph());return e.setGraph(b.merge({},L,v(n,I),b.pick(n,P))),b.each(t.nodes(),function(n){var r=_(t.node(n));e.setNode(n,b.defaults(v(r,N),R)),e.setParent(n,t.parent(n))}),b.each(t.edges(),function(n){var r=_(t.edge(n));e.setEdge(n,b.merge({},j,v(r,Y),b.pick(r,$)))}),e}function s(t){var e=t.graph();e.ranksep/=2,b.each(t.edges(),function(n){var r=t.edge(n);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===e.rankdir||"BT"===e.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)})}function o(t){b.each(t.edges(),function(e){var n=t.edge(e);if(n.width&&n.height){var r=t.node(e.v),i=t.node(e.w),a={rank:(i.rank-r.rank)/2+r.rank,e:e};O.addDummyNode(t,"edge-proxy",a,"_ep")}})}function u(t){var e=0;b.each(t.nodes(),function(n){var r=t.node(n);r.borderTop&&(r.minRank=t.node(r.borderTop).rank,r.maxRank=t.node(r.borderBottom).rank,e=b.max(e,r.maxRank))}),t.graph().maxRank=e}function c(t){b.each(t.nodes(),function(e){var n=t.node(e);"edge-proxy"===n.dummy&&(t.edge(n.e).labelRank=n.rank,t.removeNode(e))})}function l(t){function e(t){var e=t.x,s=t.y,o=t.width,u=t.height;n=Math.min(n,e-o/2),r=Math.max(r,e+o/2),i=Math.min(i,s-u/2),a=Math.max(a,s+u/2)}var n=Number.POSITIVE_INFINITY,r=0,i=Number.POSITIVE_INFINITY,a=0,s=t.graph(),o=s.marginx||0,u=s.marginy||0;b.each(t.nodes(),function(n){e(t.node(n))}),b.each(t.edges(),function(n){var r=t.edge(n);b.has(r,"x")&&e(r)}),n-=o,i-=u,b.each(t.nodes(),function(e){var r=t.node(e);r.x-=n,r.y-=i}),b.each(t.edges(),function(e){var r=t.edge(e);b.each(r.points,function(t){t.x-=n,t.y-=i}),b.has(r,"x")&&(r.x-=n),b.has(r,"y")&&(r.y-=i)}),s.width=r-n+o,s.height=a-i+u}function h(t){b.each(t.edges(),function(e){var n,r,i=t.edge(e),a=t.node(e.v),s=t.node(e.w);i.points?(n=i.points[0],r=i.points[i.points.length-1]):(i.points=[],n=s,r=a),i.points.unshift(O.intersectRect(a,n)),i.points.push(O.intersectRect(s,r))})}function d(t){b.each(t.edges(),function(e){var n=t.edge(e);if(b.has(n,"x"))switch(("l"===n.labelpos||"r"===n.labelpos)&&(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}})}function f(t){b.each(t.edges(),function(e){var n=t.edge(e);n.reversed&&n.points.reverse()})}function p(t){b.each(t.nodes(),function(e){if(t.children(e).length){var n=t.node(e),r=t.node(n.borderTop),i=t.node(n.borderBottom),a=t.node(b.last(n.borderLeft)),s=t.node(b.last(n.borderRight));n.width=Math.abs(s.x-a.x),n.height=Math.abs(i.y-r.y),n.x=a.x+n.width/2,n.y=r.y+n.height/2}}),b.each(t.nodes(),function(e){"border"===t.node(e).dummy&&t.removeNode(e)})}function y(t){b.each(t.edges(),function(e){if(e.v===e.w){var n=t.node(e.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:e,label:t.edge(e)}),t.removeEdge(e)}})}function g(t){var e=O.buildLayerMatrix(t);b.each(e,function(e){var n=0;b.each(e,function(e,r){var i=t.node(e);i.order=r+n,b.each(i.selfEdges,function(e){O.addDummyNode(t,"selfedge",{width:e.label.width,height:e.label.height,rank:i.rank,order:r+ ++n,e:e.e,label:e.label},"_se")}),delete i.selfEdges})})}function m(t){b.each(t.nodes(),function(e){var n=t.node(e);if("selfedge"===n.dummy){var r=t.node(n.e.v),i=r.x+r.width/2,a=r.y,s=n.x-i,o=r.height/2;t.setEdge(n.e,n.label),t.removeNode(e),n.label.points=[{x:i+2*s/3,y:a-o},{x:i+5*s/6,y:a-o},{x:i+s,y:a},{x:i+5*s/6,y:a+o},{x:i+2*s/3,y:a+o}],n.label.x=n.x,n.label.y=n.y}})}function v(t,e){return b.mapValues(b.pick(t,e),Number)}function _(t){var e={};return b.each(t,function(t,n){e[n.toLowerCase()]=t}),e}var b=t("./lodash"),x=t("./acyclic"),w=t("./normalize"),k=t("./rank"),A=t("./util").normalizeRanks,E=t("./parent-dummy-chains"),D=t("./util").removeEmptyRanks,T=t("./nesting-graph"),C=t("./add-border-segments"),F=t("./coordinate-system"),S=t("./order"),B=t("./position"),O=t("./util"),M=t("./graphlib").Graph;e.exports=n;var I=["nodesep","edgesep","ranksep","marginx","marginy"],L={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},P=["acyclicer","ranker","rankdir","align"],N=["width","height"],R={width:0,height:0},Y=["minlen","weight","width","height","labeloffset"],j={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},$=["labelpos"]},{"./acyclic":30,"./add-border-segments":31,"./coordinate-system":32,"./graphlib":35,"./lodash":38,"./nesting-graph":39,"./normalize":40,"./order":45,"./parent-dummy-chains":50,"./position":52,"./rank":54,"./util":57}],38:[function(t,e){e.exports=t(21)},{lodash:82}],39:[function(t,e){function n(t){var e=u.addDummyNode(t,"root",{},"_root"),n=i(t),s=o.max(n)-1,c=2*s+1;t.graph().nestingRoot=e,o.each(t.edges(),function(e){t.edge(e).minlen*=c});var l=a(t)+1;o.each(t.children(),function(i){r(t,e,c,l,s,n,i)}),t.graph().nodeRankFactor=c}function r(t,e,n,i,a,s,c){var l=t.children(c);if(!l.length)return void(c!==e&&t.setEdge(e,c,{weight:0,minlen:n}));var h=u.addBorderNode(t,"_bt"),d=u.addBorderNode(t,"_bb"),f=t.node(c);t.setParent(h,c),f.borderTop=h,t.setParent(d,c),f.borderBottom=d,o.each(l,function(o){r(t,e,n,i,a,s,o);var u=t.node(o),l=u.borderTop?u.borderTop:o,f=u.borderBottom?u.borderBottom:o,p=u.borderTop?i:2*i,y=l!==f?1:a-s[c]+1;t.setEdge(h,l,{weight:p,minlen:y,nestingEdge:!0}),t.setEdge(f,d,{weight:p,minlen:y,nestingEdge:!0})}),t.parent(c)||t.setEdge(e,h,{weight:0,minlen:a+s[c]})}function i(t){function e(r,i){var a=t.children(r);a&&a.length&&o.each(a,function(t){e(t,i+1)}),n[r]=i}var n={};return o.each(t.children(),function(t){e(t,1)}),n}function a(t){return o.reduce(t.edges(),function(e,n){return e+t.edge(n).weight},0)}function s(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,o.each(t.edges(),function(e){var n=t.edge(e);n.nestingEdge&&t.removeEdge(e)})}var o=t("./lodash"),u=t("./util");e.exports={run:n,cleanup:s}},{"./lodash":38,"./util":57}],40:[function(t,e){"use strict";function n(t){t.graph().dummyChains=[],a.each(t.edges(),function(e){r(t,e)})}function r(t,e){var n=e.v,r=t.node(n).rank,i=e.w,a=t.node(i).rank,o=e.name,u=t.edge(e),c=u.labelRank;if(a!==r+1){t.removeEdge(e);var l,h,d;for(d=0,++r;a>r;++d,++r)u.points=[],h={width:0,height:0,edgeLabel:u,edgeObj:e,rank:r},l=s.addDummyNode(t,"edge",h,"_d"),r===c&&(h.width=u.width,h.height=u.height,h.dummy="edge-label",h.labelpos=u.labelpos),t.setEdge(n,l,{weight:u.weight},o),0===d&&t.graph().dummyChains.push(l),n=l;t.setEdge(n,i,{weight:u.weight},o)}}function i(t){a.each(t.graph().dummyChains,function(e){var n,r=t.node(e),i=r.edgeLabel;for(t.setEdge(r.edgeObj,i);r.dummy;)n=t.successors(e)[0],t.removeNode(e),i.points.push({x:r.x,y:r.y}),"edge-label"===r.dummy&&(i.x=r.x,i.y=r.y,i.width=r.width,i.height=r.height),e=n,r=t.node(e)})}var a=t("./lodash"),s=t("./util");e.exports={run:n,undo:i}},{"./lodash":38,"./util":57}],41:[function(t,e){function n(t,e,n){var i,a={};r.each(n,function(n){for(var r,s,o=t.parent(n);o;){if(r=t.parent(o),r?(s=a[r],a[r]=o):(s=i,i=o),s&&s!==o)return void e.setEdge(s,o);o=r}})}var r=t("../lodash");e.exports=n},{"../lodash":38}],42:[function(t,e){function n(t,e){return r.map(e,function(e){var n=t.inEdges(e);if(n.length){var i=r.reduce(n,function(e,n){var r=t.edge(n),i=t.node(n.v);return{sum:e.sum+r.weight*i.order,weight:e.weight+r.weight}},{sum:0,weight:0});return{v:e,barycenter:i.sum/i.weight,weight:i.weight}}return{v:e}})}var r=t("../lodash");e.exports=n},{"../lodash":38}],43:[function(t,e){function n(t,e,n){var s=r(t),o=new a({compound:!0}).setGraph({root:s}).setDefaultNodeLabel(function(e){return t.node(e)});return i.each(t.nodes(),function(r){var a=t.node(r),u=t.parent(r);(a.rank===e||a.minRank<=e&&e<=a.maxRank)&&(o.setNode(r),o.setParent(r,u||s),i.each(t[n](r),function(e){var n=e.v===r?e.w:e.v,a=o.edge(n,r),s=i.isUndefined(a)?0:a.weight;o.setEdge(n,r,{weight:t.edge(e).weight+s})}),i.has(a,"minRank")&&o.setNode(r,{borderLeft:a.borderLeft[e],borderRight:a.borderRight[e]}))}),o}function r(t){for(var e;t.hasNode(e=i.uniqueId("_root")););return e}var i=t("../lodash"),a=t("../graphlib").Graph;e.exports=n},{"../graphlib":35,"../lodash":38}],44:[function(t,e){"use strict";function n(t,e){for(var n=0,i=1;i<e.length;++i)n+=r(t,e[i-1],e[i]);return n}function r(t,e,n){for(var r=i.zipObject(n,i.map(n,function(t,e){return e})),a=i.flatten(i.map(e,function(e){return i.chain(t.outEdges(e)).map(function(e){return{pos:r[e.w],weight:t.edge(e).weight}}).sortBy("pos").value()}),!0),s=1;s<n.length;)s<<=1;var o=2*s-1;s-=1;var u=i.map(new Array(o),function(){return 0}),c=0;return i.each(a.forEach(function(t){var e=t.pos+s;u[e]+=t.weight;for(var n=0;e>0;)e%2&&(n+=u[e+1]),e=e-1>>1,u[e]+=t.weight;c+=t.weight*n})),c}var i=t("../lodash");e.exports=n},{"../lodash":38}],45:[function(t,e){"use strict";function n(t){var e=f.maxRank(t),n=r(t,s.range(1,e+1),"inEdges"),c=r(t,s.range(e-1,-1,-1),"outEdges"),l=o(t);a(t,l);for(var h,d=Number.POSITIVE_INFINITY,p=0,y=0;4>y;++p,++y){i(p%2?n:c,p%4>=2),l=f.buildLayerMatrix(t);var g=u(t,l);d>g&&(y=0,h=s.cloneDeep(l),d=g)}a(t,h)}function r(t,e,n){return s.map(e,function(e){return l(t,e,n)})}function i(t,e){var n=new d;s.each(t,function(t){var r=t.graph().root,i=c(t,r,n,e);s.each(i.vs,function(e,n){t.node(e).order=n}),h(t,n,i.vs)})}function a(t,e){s.each(e,function(e){s.each(e,function(e,n){t.node(e).order=n})})}var s=t("../lodash"),o=t("./init-order"),u=t("./cross-count"),c=t("./sort-subgraph"),l=t("./build-layer-graph"),h=t("./add-subgraph-constraints"),d=t("../graphlib").Graph,f=t("../util");e.exports=n},{"../graphlib":35,"../lodash":38,"../util":57,"./add-subgraph-constraints":41,"./build-layer-graph":43,"./cross-count":44,"./init-order":46,"./sort-subgraph":48}],46:[function(t,e){"use strict";
|
||
function n(t){function e(i){if(!r.has(n,i)){n[i]=!0;var a=t.node(i);s[a.rank].push(i),r.each(t.successors(i),e)}}var n={},i=r.filter(t.nodes(),function(e){return!t.children(e).length}),a=r.max(r.map(i,function(e){return t.node(e).rank})),s=r.map(r.range(a+1),function(){return[]}),o=r.sortBy(i,function(e){return t.node(e).rank});return r.each(o,e),s}var r=t("../lodash");e.exports=n},{"../lodash":38}],47:[function(t,e){"use strict";function n(t,e){var n={};a.each(t,function(t,e){var r=n[t.v]={indegree:0,"in":[],out:[],vs:[t.v],i:e};a.isUndefined(t.barycenter)||(r.barycenter=t.barycenter,r.weight=t.weight)}),a.each(e.edges(),function(t){var e=n[t.v],r=n[t.w];a.isUndefined(e)||a.isUndefined(r)||(r.indegree++,e.out.push(n[t.w]))});var i=a.filter(n,function(t){return!t.indegree});return r(i)}function r(t){function e(t){return function(e){e.merged||(a.isUndefined(e.barycenter)||a.isUndefined(t.barycenter)||e.barycenter>=t.barycenter)&&i(t,e)}}function n(e){return function(n){n["in"].push(e),0===--n.indegree&&t.push(n)}}for(var r=[];t.length;){var s=t.pop();r.push(s),a.each(s["in"].reverse(),e(s)),a.each(s.out,n(s))}return a.chain(r).filter(function(t){return!t.merged}).map(function(t){return a.pick(t,["vs","i","barycenter","weight"])}).value()}function i(t,e){var n=0,r=0;t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.vs=e.vs.concat(t.vs),t.barycenter=n/r,t.weight=r,t.i=Math.min(e.i,t.i),e.merged=!0}var a=t("../lodash");e.exports=n},{"../lodash":38}],48:[function(t,e){function n(t,e,c,l){var h=t.children(e),d=t.node(e),f=d?d.borderLeft:void 0,p=d?d.borderRight:void 0,y={};f&&(h=a.filter(h,function(t){return t!==f&&t!==p}));var g=s(t,h);a.each(g,function(e){if(t.children(e.v).length){var r=n(t,e.v,c,l);y[e.v]=r,a.has(r,"barycenter")&&i(e,r)}});var m=o(g,c);r(m,y);var v=u(m,l);if(f&&(v.vs=a.flatten([f,v.vs,p],!0),t.predecessors(f).length)){var _=t.node(t.predecessors(f)[0]),b=t.node(t.predecessors(p)[0]);a.has(v,"barycenter")||(v.barycenter=0,v.weight=0),v.barycenter=(v.barycenter*v.weight+_.order+b.order)/(v.weight+2),v.weight+=2}return v}function r(t,e){a.each(t,function(t){t.vs=a.flatten(t.vs.map(function(t){return e[t]?e[t].vs:t}),!0)})}function i(t,e){a.isUndefined(t.barycenter)?(t.barycenter=e.barycenter,t.weight=e.weight):(t.barycenter=(t.barycenter*t.weight+e.barycenter*e.weight)/(t.weight+e.weight),t.weight+=e.weight)}var a=t("../lodash"),s=t("./barycenter"),o=t("./resolve-conflicts"),u=t("./sort");e.exports=n},{"../lodash":38,"./barycenter":42,"./resolve-conflicts":47,"./sort":49}],49:[function(t,e){function n(t,e){var n=s.partition(t,function(t){return a.has(t,"barycenter")}),o=n.lhs,u=a.sortBy(n.rhs,function(t){return-t.i}),c=[],l=0,h=0,d=0;o.sort(i(!!e)),d=r(c,u,d),a.each(o,function(t){d+=t.vs.length,c.push(t.vs),l+=t.barycenter*t.weight,h+=t.weight,d=r(c,u,d)});var f={vs:a.flatten(c,!0)};return h&&(f.barycenter=l/h,f.weight=h),f}function r(t,e,n){for(var r;e.length&&(r=a.last(e)).i<=n;)e.pop(),t.push(r.vs),n++;return n}function i(t){return function(e,n){return e.barycenter<n.barycenter?-1:e.barycenter>n.barycenter?1:t?n.i-e.i:e.i-n.i}}var a=t("../lodash"),s=t("../util");e.exports=n},{"../lodash":38,"../util":57}],50:[function(t,e){function n(t){var e=i(t);a.each(t.graph().dummyChains,function(n){for(var i=t.node(n),a=i.edgeObj,s=r(t,e,a.v,a.w),o=s.path,u=s.lca,c=0,l=o[c],h=!0;n!==a.w;){if(i=t.node(n),h){for(;(l=o[c])!==u&&t.node(l).maxRank<i.rank;)c++;l===u&&(h=!1)}if(!h){for(;c<o.length-1&&t.node(l=o[c+1]).minRank<=i.rank;)c++;l=o[c]}t.setParent(n,l),n=t.successors(n)[0]}})}function r(t,e,n,r){var i,a,s=[],o=[],u=Math.min(e[n].low,e[r].low),c=Math.max(e[n].lim,e[r].lim);i=n;do i=t.parent(i),s.push(i);while(i&&(e[i].low>u||c>e[i].lim));for(a=i,i=r;(i=t.parent(i))!==a;)o.push(i);return{path:s.concat(o.reverse()),lca:a}}function i(t){function e(i){var s=r;a.each(t.children(i),e),n[i]={low:s,lim:r++}}var n={},r=0;return a.each(t.children(),e),n}var a=t("./lodash");e.exports=n},{"./lodash":38}],51:[function(t,e){"use strict";function n(t,e){function n(e,n){var s=0,o=0,u=e.length,c=g.last(n);return g.each(n,function(e,l){var h=i(t,e),d=h?t.node(h).order:u;(h||e===c)&&(g.each(n.slice(o,l+1),function(e){g.each(t.predecessors(e),function(n){var i=t.node(n),o=i.order;!(s>o||o>d)||i.dummy&&t.node(e).dummy||a(r,n,e)})}),o=l+1,s=d)}),n}var r={};return g.reduce(e,n),r}function r(t,e){function n(e,n,r,s,o){var u;g.each(g.range(n,r),function(n){u=e[n],t.node(u).dummy&&g.each(t.predecessors(u),function(e){var n=t.node(e);n.dummy&&(n.order<s||n.order>o)&&a(i,e,u)})})}function r(e,r){var i,a=-1,s=0;return g.each(r,function(o,u){if("border"===t.node(o).dummy){var c=t.predecessors(o);c.length&&(i=t.node(c[0]).order,n(r,s,u,a,i),s=u,a=i)}n(r,s,r.length,i,e.length)}),r}var i={};return g.reduce(e,r),i}function i(t,e){return t.node(e).dummy?g.find(t.predecessors(e),function(e){return t.node(e).dummy}):void 0}function a(t,e,n){if(e>n){var r=e;e=n,n=r}var i=t[e];i||(t[e]=i={}),i[n]=!0}function s(t,e,n){if(e>n){var r=e;e=n,n=r}return g.has(t[e],n)}function o(t,e,n,r){var i={},a={},o={};return g.each(e,function(t){g.each(t,function(t,e){i[t]=t,a[t]=t,o[t]=e})}),g.each(e,function(t){var e=-1;g.each(t,function(t){var u=r(t);if(u.length){u=g.sortBy(u,function(t){return o[t]});for(var c=(u.length-1)/2,l=Math.floor(c),h=Math.ceil(c);h>=l;++l){var d=u[l];a[t]===t&&e<o[d]&&!s(n,t,d)&&(a[d]=t,a[t]=i[t]=i[d],e=o[d])}}})}),{root:i,align:a}}function u(t,e,n,r,i){function a(t){g.has(l,t)||(l[t]=!0,o[t]=g.reduce(u.inEdges(t),function(t,e){return a(e.v),Math.max(t,o[e.v]+u.edge(e))},0))}function s(e){if(2!==l[e]){l[e]++;var n=t.node(e),r=g.reduce(u.outEdges(e),function(t,e){return s(e.w),Math.min(t,o[e.w]-u.edge(e))},Number.POSITIVE_INFINITY);r!==Number.POSITIVE_INFINITY&&n.borderType!==h&&(o[e]=Math.max(o[e],r))}}var o={},u=c(t,e,n,i),l={};g.each(u.nodes(),a);var h=i?"borderLeft":"borderRight";return g.each(u.nodes(),s),g.each(r,function(t){o[t]=o[n[t]]}),o}function c(t,e,n,r){var i=new m,a=t.graph(),s=p(a.nodesep,a.edgesep,r);return g.each(e,function(e){var r;g.each(e,function(e){var a=n[e];if(i.setNode(a),r){var o=n[r],u=i.edge(o,a);i.setEdge(o,a,Math.max(s(t,e,r),u||0))}r=e})}),i}function l(t,e){return g.min(e,function(e){var n=g.min(e,function(e,n){return e-y(t,n)/2}),r=g.max(e,function(e,n){return e+y(t,n)/2});return r-n})}function h(t,e){var n=g.min(e),r=g.max(e);g.each(["u","d"],function(i){g.each(["l","r"],function(a){var s,o=i+a,u=t[o];u!==e&&(s="l"===a?n-g.min(u):r-g.max(u),s&&(t[o]=g.mapValues(u,function(t){return t+s})))})})}function d(t,e){return g.mapValues(t.ul,function(n,r){if(e)return t[e.toLowerCase()][r];var i=g.sortBy(g.pluck(t,r));return(i[1]+i[2])/2})}function f(t){var e,i=v.buildLayerMatrix(t),a=g.merge(n(t,i),r(t,i)),s={};g.each(["u","d"],function(n){e="u"===n?i:g.values(i).reverse(),g.each(["l","r"],function(r){"r"===r&&(e=g.map(e,function(t){return g.values(t).reverse()}));var i=g.bind("u"===n?t.predecessors:t.successors,t),c=o(t,e,a,i),l=u(t,e,c.root,c.align,"r"===r);"r"===r&&(l=g.mapValues(l,function(t){return-t})),s[n+r]=l})});var c=l(t,s);return h(s,c),d(s,t.graph().align)}function p(t,e,n){return function(r,i,a){var s,o=r.node(i),u=r.node(a),c=0;if(c+=o.width/2,g.has(o,"labelpos"))switch(o.labelpos.toLowerCase()){case"l":s=-o.width/2;break;case"r":s=o.width/2}if(s&&(c+=n?s:-s),s=0,c+=(o.dummy?e:t)/2,c+=(u.dummy?e:t)/2,c+=u.width/2,g.has(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":s=u.width/2;break;case"r":s=-u.width/2}return s&&(c+=n?s:-s),s=0,c}}function y(t,e){return t.node(e).width}var g=t("../lodash"),m=t("../graphlib").Graph,v=t("../util");e.exports={positionX:f,findType1Conflicts:n,findType2Conflicts:r,addConflict:a,hasConflict:s,verticalAlignment:o,horizontalCompaction:u,alignCoordinates:h,findSmallestWidthAlignment:l,balance:d}},{"../graphlib":35,"../lodash":38,"../util":57}],52:[function(t,e){"use strict";function n(t){t=a.asNonCompoundGraph(t),r(t),i.each(s(t),function(e,n){t.node(n).x=e})}function r(t){var e=a.buildLayerMatrix(t),n=t.graph().ranksep,r=0;i.each(e,function(e){var a=i.max(i.map(e,function(e){return t.node(e).height}));i.each(e,function(e){t.node(e).y=r+a/2}),r+=a+n})}var i=t("../lodash"),a=t("../util"),s=t("./bk").positionX;e.exports=n},{"../lodash":38,"../util":57,"./bk":51}],53:[function(t,e){"use strict";function n(t){var e=new o({directed:!1}),n=t.nodes()[0],s=t.nodeCount();e.setNode(n,{});for(var c,l;r(e,t)<s;)c=i(e,t),l=e.hasNode(c.v)?u(t,c):-u(t,c),a(e,t,l);return e}function r(t,e){function n(r){s.each(e.nodeEdges(r),function(i){var a=i.v,s=r===a?i.w:a;t.hasNode(s)||u(e,i)||(t.setNode(s,{}),t.setEdge(r,s,{}),n(s))})}return s.each(t.nodes(),n),t.nodeCount()}function i(t,e){return s.min(e.edges(),function(n){return t.hasNode(n.v)!==t.hasNode(n.w)?u(e,n):void 0})}function a(t,e,n){s.each(t.nodes(),function(t){e.node(t).rank+=n})}var s=t("../lodash"),o=t("../graphlib").Graph,u=t("./util").slack;e.exports=n},{"../graphlib":35,"../lodash":38,"./util":56}],54:[function(t,e){"use strict";function n(t){switch(t.graph().ranker){case"network-simplex":i(t);break;case"tight-tree":r(t);break;case"longest-path":c(t);break;default:i(t)}}function r(t){s(t),o(t)}function i(t){u(t)}var a=t("./util"),s=a.longestPath,o=t("./feasible-tree"),u=t("./network-simplex");e.exports=n;var c=s},{"./feasible-tree":53,"./network-simplex":55,"./util":56}],55:[function(t,e){"use strict";function n(t){t=b(t),m(t);var e=y(t);s(e),r(e,t);for(var n,i;n=u(e);)i=c(e,t,n),l(e,t,n,i)}function r(t,e){var n=_(t,t.nodes());n=n.slice(0,n.length-1),p.each(n,function(n){i(t,e,n)})}function i(t,e,n){var r=t.node(n),i=r.parent;t.edge(n,i).cutvalue=a(t,e,n)}function a(t,e,n){var r=t.node(n),i=r.parent,a=!0,s=e.edge(n,i),o=0;return s||(a=!1,s=e.edge(i,n)),o=s.weight,p.each(e.nodeEdges(n),function(r){var s=r.v===n,u=s?r.w:r.v;if(u!==i){var c=s===a,l=e.edge(r).weight;if(o+=c?l:-l,d(t,n,u)){var h=t.edge(n,u).cutvalue;o+=c?-h:h}}}),o}function s(t,e){arguments.length<2&&(e=t.nodes()[0]),o(t,{},1,e)}function o(t,e,n,r,i){var a=n,s=t.node(r);return e[r]=!0,p.each(t.neighbors(r),function(i){p.has(e,i)||(n=o(t,e,n,i,r))}),s.low=a,s.lim=n++,i?s.parent=i:delete s.parent,n}function u(t){return p.find(t.edges(),function(e){return t.edge(e).cutvalue<0})}function c(t,e,n){var r=n.v,i=n.w;e.hasEdge(r,i)||(r=n.w,i=n.v);var a=t.node(r),s=t.node(i),o=a,u=!1;a.lim>s.lim&&(o=s,u=!0);var c=p.filter(e.edges(),function(e){return u===f(t,t.node(e.v),o)&&u!==f(t,t.node(e.w),o)});return p.min(c,function(t){return g(e,t)})}function l(t,e,n,i){var a=n.v,o=n.w;t.removeEdge(a,o),t.setEdge(i.v,i.w,{}),s(t),r(t,e),h(t,e)}function h(t,e){var n=p.find(t.nodes(),function(t){return!e.node(t).parent}),r=v(t,n);r=r.slice(1),p.each(r,function(n){var r=t.node(n).parent,i=e.edge(n,r),a=!1;i||(i=e.edge(r,n),a=!0),e.node(n).rank=e.node(r).rank+(a?i.minlen:-i.minlen)})}function d(t,e,n){return t.hasEdge(e,n)}function f(t,e,n){return n.low<=e.lim&&e.lim<=n.lim}var p=t("../lodash"),y=t("./feasible-tree"),g=t("./util").slack,m=t("./util").longestPath,v=t("../graphlib").alg.preorder,_=t("../graphlib").alg.postorder,b=t("../util").simplify;e.exports=n,n.initLowLimValues=s,n.initCutValues=r,n.calcCutValue=a,n.leaveEdge=u,n.enterEdge=c,n.exchangeEdges=l},{"../graphlib":35,"../lodash":38,"../util":57,"./feasible-tree":53,"./util":56}],56:[function(t,e){"use strict";function n(t){function e(r){var a=t.node(r);if(i.has(n,r))return a.rank;n[r]=!0;var s=i.min(i.map(t.outEdges(r),function(n){return e(n.w)-t.edge(n).minlen}));return s===Number.POSITIVE_INFINITY&&(s=0),a.rank=s}var n={};i.each(t.sources(),e)}function r(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}var i=t("../lodash");e.exports={longestPath:n,slack:r}},{"../lodash":38}],57:[function(t,e){"use strict";function n(t,e,n,r){var i;do i=g.uniqueId(r);while(t.hasNode(i));return n.dummy=e,t.setNode(i,n),i}function r(t){var e=(new m).setGraph(t.graph());return g.each(t.nodes(),function(n){e.setNode(n,t.node(n))}),g.each(t.edges(),function(n){var r=e.edge(n.v,n.w)||{weight:0,minlen:1},i=t.edge(n);e.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})}),e}function i(t){var e=new m({multigraph:t.isMultigraph()}).setGraph(t.graph());return g.each(t.nodes(),function(n){t.children(n).length||e.setNode(n,t.node(n))}),g.each(t.edges(),function(n){e.setEdge(n,t.edge(n))}),e}function a(t){var e=g.map(t.nodes(),function(e){var n={};return g.each(t.outEdges(e),function(e){n[e.w]=(n[e.w]||0)+t.edge(e).weight}),n});return g.zipObject(t.nodes(),e)}function s(t){var e=g.map(t.nodes(),function(e){var n={};return g.each(t.inEdges(e),function(e){n[e.v]=(n[e.v]||0)+t.edge(e).weight}),n});return g.zipObject(t.nodes(),e)}function o(t,e){var n=t.x,r=t.y,i=e.x-n,a=e.y-r,s=t.width/2,o=t.height/2;if(!i&&!a)throw new Error("Not possible to find intersection inside of the rectangle");var u,c;return Math.abs(a)*s>Math.abs(i)*o?(0>a&&(o=-o),u=o*i/a,c=o):(0>i&&(s=-s),u=s,c=s*a/i),{x:n+u,y:r+c}}function u(t){var e=g.map(g.range(d(t)+1),function(){return[]});return g.each(t.nodes(),function(n){var r=t.node(n),i=r.rank;g.isUndefined(i)||(e[i][r.order]=n)}),e}function c(t){var e=g.min(g.map(t.nodes(),function(e){return t.node(e).rank}));g.each(t.nodes(),function(n){var r=t.node(n);g.has(r,"rank")&&(r.rank-=e)})}function l(t){var e=g.min(g.map(t.nodes(),function(e){return t.node(e).rank})),n=[];g.each(t.nodes(),function(r){var i=t.node(r).rank-e;g.has(n,i)||(n[i]=[]),n[i].push(r)});var r=0,i=t.graph().nodeRankFactor;g.each(n,function(e,n){g.isUndefined(e)&&n%i!==0?--r:r&&g.each(e,function(e){t.node(e).rank+=r})})}function h(t,e,r,i){var a={width:0,height:0};return arguments.length>=4&&(a.rank=r,a.order=i),n(t,"border",a,e)}function d(t){return g.max(g.map(t.nodes(),function(e){var n=t.node(e).rank;return g.isUndefined(n)?void 0:n}))}function f(t,e){var n={lhs:[],rhs:[]};return g.each(t,function(t){e(t)?n.lhs.push(t):n.rhs.push(t)}),n}function p(t,e){var n=g.now();try{return e()}finally{console.log(t+" time: "+(g.now()-n)+"ms")}}function y(t,e){return e()}var g=t("./lodash"),m=t("./graphlib").Graph;e.exports={addDummyNode:n,simplify:r,asNonCompoundGraph:i,successorWeights:a,predecessorWeights:s,intersectRect:o,buildLayerMatrix:u,normalizeRanks:c,removeEmptyRanks:l,addBorderNode:h,maxRank:d,partition:f,time:p,notime:y}},{"./graphlib":35,"./lodash":38}],58:[function(t,e){e.exports="0.7.2"},{}],59:[function(t,e){var n=t("./lib");e.exports={Graph:n.Graph,json:t("./lib/json"),alg:t("./lib/alg"),version:n.version}},{"./lib":75,"./lib/alg":66,"./lib/json":76}],60:[function(t,e){function n(t){function e(a){r.has(i,a)||(i[a]=!0,n.push(a),r.each(t.successors(a),e),r.each(t.predecessors(a),e))}var n,i={},a=[];return r.each(t.nodes(),function(t){n=[],e(t),n.length&&a.push(n)}),a}var r=t("../lodash");e.exports=n},{"../lodash":77}],61:[function(t,e){function n(t,e,n){i.isArray(e)||(e=[e]);var a=[],s={};return i.each(e,function(e){if(!t.hasNode(e))throw new Error("Graph does not have node: "+e);r(t,e,"post"===n,s,a)}),a}function r(t,e,n,a,s){i.has(a,e)||(a[e]=!0,n||s.push(e),i.each(t.neighbors(e),function(e){r(t,e,n,a,s)}),n&&s.push(e))}var i=t("../lodash");e.exports=n},{"../lodash":77}],62:[function(t,e){function n(t,e,n){return i.transform(t.nodes(),function(i,a){i[a]=r(t,a,e,n)},{})}var r=t("./dijkstra"),i=t("../lodash");e.exports=n},{"../lodash":77,"./dijkstra":63}],63:[function(t,e){function n(t,e,n,i){return r(t,String(e),n||s,i||function(e){return t.outEdges(e)})}function r(t,e,n,r){var i,s,o={},u=new a,c=function(t){var e=t.v!==i?t.v:t.w,r=o[e],a=n(t),c=s.distance+a;if(0>a)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+t+" Weight: "+a);c<r.distance&&(r.distance=c,r.predecessor=i,u.decrease(e,c))};for(t.nodes().forEach(function(t){var n=t===e?0:Number.POSITIVE_INFINITY;o[t]={distance:n},u.add(t,n)});u.size()>0&&(i=u.removeMin(),s=o[i],s.distance!==Number.POSITIVE_INFINITY);)r(i).forEach(c);return o}var i=t("../lodash"),a=t("../data/priority-queue");e.exports=n;var s=i.constant(1)},{"../data/priority-queue":73,"../lodash":77}],64:[function(t,e){function n(t){return r.filter(i(t),function(e){return e.length>1||1===e.length&&t.hasEdge(e[0],e[0])})}var r=t("../lodash"),i=t("./tarjan");e.exports=n},{"../lodash":77,"./tarjan":71}],65:[function(t,e){function n(t,e,n){return r(t,e||a,n||function(e){return t.outEdges(e)})}function r(t,e,n){var r={},i=t.nodes();return i.forEach(function(t){r[t]={},r[t][t]={distance:0},i.forEach(function(e){t!==e&&(r[t][e]={distance:Number.POSITIVE_INFINITY})}),n(t).forEach(function(n){var i=n.v===t?n.w:n.v,a=e(n);r[t][i]={distance:a,predecessor:t}})}),i.forEach(function(t){var e=r[t];i.forEach(function(n){var a=r[n];i.forEach(function(n){var r=a[t],i=e[n],s=a[n],o=r.distance+i.distance;o<s.distance&&(s.distance=o,s.predecessor=i.predecessor)})})}),r}var i=t("../lodash");e.exports=n;var a=i.constant(1)},{"../lodash":77}],66:[function(t,e){e.exports={components:t("./components"),dijkstra:t("./dijkstra"),dijkstraAll:t("./dijkstra-all"),findCycles:t("./find-cycles"),floydWarshall:t("./floyd-warshall"),isAcyclic:t("./is-acyclic"),postorder:t("./postorder"),preorder:t("./preorder"),prim:t("./prim"),tarjan:t("./tarjan"),topsort:t("./topsort")}},{"./components":60,"./dijkstra":63,"./dijkstra-all":62,"./find-cycles":64,"./floyd-warshall":65,"./is-acyclic":67,"./postorder":68,"./preorder":69,"./prim":70,"./tarjan":71,"./topsort":72}],67:[function(t,e){function n(t){try{r(t)}catch(e){if(e instanceof r.CycleException)return!1;throw e}return!0}var r=t("./topsort");e.exports=n},{"./topsort":72}],68:[function(t,e){function n(t,e){return r(t,e,"post")}var r=t("./dfs");e.exports=n},{"./dfs":61}],69:[function(t,e){function n(t,e){return r(t,e,"pre")}var r=t("./dfs");e.exports=n},{"./dfs":61}],70:[function(t,e){function n(t,e){function n(t){var n=t.v===s?t.w:t.v,r=c.priority(n);if(void 0!==r){var i=e(t);r>i&&(u[n]=s,c.decrease(n,i))}}var s,o=new i,u={},c=new a;if(0===t.nodeCount())return o;r.each(t.nodes(),function(t){c.add(t,Number.POSITIVE_INFINITY),o.setNode(t)}),c.decrease(t.nodes()[0],0);for(var l=!1;c.size()>0;){if(s=c.removeMin(),r.has(u,s))o.setEdge(s,u[s]);else{if(l)throw new Error("Input graph is not connected: "+t);l=!0}t.nodeEdges(s).forEach(n)}return o}var r=t("../lodash"),i=t("../graph"),a=t("../data/priority-queue");e.exports=n},{"../data/priority-queue":73,"../graph":74,"../lodash":77}],71:[function(t,e){function n(t){function e(o){var u=a[o]={onStack:!0,lowlink:n,index:n++};if(i.push(o),t.successors(o).forEach(function(t){r.has(a,t)?a[t].onStack&&(u.lowlink=Math.min(u.lowlink,a[t].index)):(e(t),u.lowlink=Math.min(u.lowlink,a[t].lowlink))}),u.lowlink===u.index){var c,l=[];do c=i.pop(),a[c].onStack=!1,l.push(c);while(o!==c);s.push(l)}}var n=0,i=[],a={},s=[];return t.nodes().forEach(function(t){r.has(a,t)||e(t)}),s}var r=t("../lodash");e.exports=n},{"../lodash":77}],72:[function(t,e){function n(t){function e(o){if(i.has(a,o))throw new r;i.has(n,o)||(a[o]=!0,n[o]=!0,i.each(t.predecessors(o),e),delete a[o],s.push(o))}var n={},a={},s=[];if(i.each(t.sinks(),e),i.size(n)!==t.nodeCount())throw new r;return s}function r(){}var i=t("../lodash");e.exports=n,n.CycleException=r},{"../lodash":77}],73:[function(t,e){function n(){this._arr=[],this._keyIndices={}}var r=t("../lodash");e.exports=n,n.prototype.size=function(){return this._arr.length},n.prototype.keys=function(){return this._arr.map(function(t){return t.key})},n.prototype.has=function(t){return r.has(this._keyIndices,t)},n.prototype.priority=function(t){var e=this._keyIndices[t];return void 0!==e?this._arr[e].priority:void 0},n.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},n.prototype.add=function(t,e){var n=this._keyIndices;if(t=String(t),!r.has(n,t)){var i=this._arr,a=i.length;return n[t]=a,i.push({key:t,priority:e}),this._decrease(a),!0}return!1},n.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var t=this._arr.pop();return delete this._keyIndices[t.key],this._heapify(0),t.key},n.prototype.decrease=function(t,e){var n=this._keyIndices[t];if(e>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[n].priority+" New: "+e);this._arr[n].priority=e,this._decrease(n)},n.prototype._heapify=function(t){var e=this._arr,n=2*t,r=n+1,i=t;n<e.length&&(i=e[n].priority<e[i].priority?n:i,r<e.length&&(i=e[r].priority<e[i].priority?r:i),i!==t&&(this._swap(t,i),this._heapify(i)))},n.prototype._decrease=function(t){for(var e,n=this._arr,r=n[t].priority;0!==t&&(e=t>>1,!(n[e].priority<r));)this._swap(t,e),t=e},n.prototype._swap=function(t,e){var n=this._arr,r=this._keyIndices,i=n[t],a=n[e];n[t]=a,n[e]=i,r[a.key]=t,r[i.key]=e}},{"../lodash":77}],74:[function(t,e){"use strict";function n(t){this._isDirected=u.has(t,"directed")?t.directed:!0,this._isMultigraph=u.has(t,"multigraph")?t.multigraph:!1,this._isCompound=u.has(t,"compound")?t.compound:!1,this._label=void 0,this._defaultNodeLabelFn=u.constant(void 0),this._defaultEdgeLabelFn=u.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[l]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function r(t,e){u.has(t,e)?t[e]++:t[e]=1}function i(t,e){--t[e]||delete t[e]}function a(t,e,n,r){if(!t&&e>n){var i=e;e=n,n=i}return e+h+n+h+(u.isUndefined(r)?c:r)}function s(t,e,n,r){if(!t&&e>n){var i=e;e=n,n=i}var a={v:e,w:n};return r&&(a.name=r),a}function o(t,e){return a(t,e.v,e.w,e.name)}var u=t("./lodash");e.exports=n;var c="\x00",l="\x00",h="";n.prototype._nodeCount=0,n.prototype._edgeCount=0,n.prototype.isDirected=function(){return this._isDirected},n.prototype.isMultigraph=function(){return this._isMultigraph},n.prototype.isCompound=function(){return this._isCompound},n.prototype.setGraph=function(t){return this._label=t,this},n.prototype.graph=function(){return this._label},n.prototype.setDefaultNodeLabel=function(t){return u.isFunction(t)||(t=u.constant(t)),this._defaultNodeLabelFn=t,this},n.prototype.nodeCount=function(){return this._nodeCount},n.prototype.nodes=function(){return u.keys(this._nodes)},n.prototype.sources=function(){return u.filter(this.nodes(),function(t){return u.isEmpty(this._in[t])},this)},n.prototype.sinks=function(){return u.filter(this.nodes(),function(t){return u.isEmpty(this._out[t])},this)},n.prototype.setNodes=function(t,e){var n=arguments;return u.each(t,function(t){n.length>1?this.setNode(t,e):this.setNode(t)},this),this},n.prototype.setNode=function(t,e){return u.has(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=e),this):(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=l,this._children[t]={},this._children[l][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)},n.prototype.node=function(t){return this._nodes[t]},n.prototype.hasNode=function(t){return u.has(this._nodes,t)},n.prototype.removeNode=function(t){var e=this;if(u.has(this._nodes,t)){var n=function(t){e.removeEdge(e._edgeObjs[t])};delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],u.each(this.children(t),function(t){this.setParent(t)},this),delete this._children[t]),u.each(u.keys(this._in[t]),n),delete this._in[t],delete this._preds[t],u.each(u.keys(this._out[t]),n),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this},n.prototype.setParent=function(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(u.isUndefined(e))e=l;else{e+="";for(var n=e;!u.isUndefined(n);n=this.parent(n))if(n===t)throw new Error("Setting "+e+" as parent of "+t+" would create create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this},n.prototype._removeFromParentsChildList=function(t){delete this._children[this._parent[t]][t]},n.prototype.parent=function(t){if(this._isCompound){var e=this._parent[t];if(e!==l)return e}},n.prototype.children=function(t){if(u.isUndefined(t)&&(t=l),this._isCompound){var e=this._children[t];if(e)return u.keys(e)}else{if(t===l)return this.nodes();if(this.hasNode(t))return[]}},n.prototype.predecessors=function(t){var e=this._preds[t];return e?u.keys(e):void 0},n.prototype.successors=function(t){var e=this._sucs[t];return e?u.keys(e):void 0},n.prototype.neighbors=function(t){var e=this.predecessors(t);return e?u.union(e,this.successors(t)):void 0},n.prototype.setDefaultEdgeLabel=function(t){return u.isFunction(t)||(t=u.constant(t)),this._defaultEdgeLabelFn=t,this},n.prototype.edgeCount=function(){return this._edgeCount},n.prototype.edges=function(){return u.values(this._edgeObjs)},n.prototype.setPath=function(t,e){var n=this,r=arguments;return u.reduce(t,function(t,i){return r.length>1?n.setEdge(t,i,e):n.setEdge(t,i),i}),this},n.prototype.setEdge=function(){var t,e,n,i,o=!1;u.isPlainObject(arguments[0])?(t=arguments[0].v,e=arguments[0].w,n=arguments[0].name,2===arguments.length&&(i=arguments[1],o=!0)):(t=arguments[0],e=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],o=!0)),t=""+t,e=""+e,u.isUndefined(n)||(n=""+n);var c=a(this._isDirected,t,e,n);if(u.has(this._edgeLabels,c))return o&&(this._edgeLabels[c]=i),this;if(!u.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[c]=o?i:this._defaultEdgeLabelFn(t,e,n);var l=s(this._isDirected,t,e,n);return t=l.v,e=l.w,Object.freeze(l),this._edgeObjs[c]=l,r(this._preds[e],t),r(this._sucs[t],e),this._in[e][c]=l,this._out[t][c]=l,this._edgeCount++,this},n.prototype.edge=function(t,e,n){var r=1===arguments.length?o(this._isDirected,arguments[0]):a(this._isDirected,t,e,n);return this._edgeLabels[r]},n.prototype.hasEdge=function(t,e,n){var r=1===arguments.length?o(this._isDirected,arguments[0]):a(this._isDirected,t,e,n);return u.has(this._edgeLabels,r)},n.prototype.removeEdge=function(t,e,n){var r=1===arguments.length?o(this._isDirected,arguments[0]):a(this._isDirected,t,e,n),s=this._edgeObjs[r];return s&&(t=s.v,e=s.w,delete this._edgeLabels[r],delete this._edgeObjs[r],i(this._preds[e],t),i(this._sucs[t],e),delete this._in[e][r],delete this._out[t][r],this._edgeCount--),this},n.prototype.inEdges=function(t,e){var n=this._in[t];if(n){var r=u.values(n);return e?u.filter(r,function(t){return t.v===e}):r}},n.prototype.outEdges=function(t,e){var n=this._out[t];if(n){var r=u.values(n);return e?u.filter(r,function(t){return t.w===e}):r}},n.prototype.nodeEdges=function(t,e){var n=this.inEdges(t,e);return n?n.concat(this.outEdges(t,e)):void 0}},{"./lodash":77}],75:[function(t,e){e.exports={Graph:t("./graph"),version:t("./version")}},{"./graph":74,"./version":78}],76:[function(t,e){function n(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:r(t),edges:i(t)};return s.isUndefined(t.graph())||(e.value=s.clone(t.graph())),e}function r(t){return s.map(t.nodes(),function(e){var n=t.node(e),r=t.parent(e),i={v:e};return s.isUndefined(n)||(i.value=n),s.isUndefined(r)||(i.parent=r),i})}function i(t){return s.map(t.edges(),function(e){var n=t.edge(e),r={v:e.v,w:e.w};return s.isUndefined(e.name)||(r.name=e.name),s.isUndefined(n)||(r.value=n),r})}function a(t){var e=new o(t.options).setGraph(t.value);return s.each(t.nodes,function(t){e.setNode(t.v,t.value),t.parent&&e.setParent(t.v,t.parent)}),s.each(t.edges,function(t){e.setEdge({v:t.v,w:t.w,name:t.name},t.value)}),e}var s=t("./lodash"),o=t("./graph");e.exports={write:n,read:a}},{"./graph":74,"./lodash":77}],77:[function(t,e){var n;if("function"==typeof t)try{n=t("lodash")}catch(r){}n||(n=window._),e.exports=n},{lodash:82}],78:[function(t,e){e.exports="1.0.4"},{}],79:[function(){},{}],80:[function(t,e,n){(function(t){function e(t,e){for(var n=0,r=t.length-1;r>=0;r--){var i=t[r];"."===i?t.splice(r,1):".."===i?(t.splice(r,1),n++):n&&(t.splice(r,1),n--)}if(e)for(;n--;n)t.unshift("..");return t}function r(t,e){if(t.filter)return t.filter(e);for(var n=[],r=0;r<t.length;r++)e(t[r],r,t)&&n.push(t[r]);return n}var i=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,a=function(t){return i.exec(t).slice(1)};n.resolve=function(){for(var n="",i=!1,a=arguments.length-1;a>=-1&&!i;a--){var s=a>=0?arguments[a]:t.cwd();if("string"!=typeof s)throw new TypeError("Arguments to path.resolve must be strings");s&&(n=s+"/"+n,i="/"===s.charAt(0))}return n=e(r(n.split("/"),function(t){return!!t}),!i).join("/"),(i?"/":"")+n||"."},n.normalize=function(t){var i=n.isAbsolute(t),a="/"===s(t,-1);return t=e(r(t.split("/"),function(t){return!!t}),!i).join("/"),t||i||(t="."),t&&a&&(t+="/"),(i?"/":"")+t},n.isAbsolute=function(t){return"/"===t.charAt(0)},n.join=function(){var t=Array.prototype.slice.call(arguments,0);return n.normalize(r(t,function(t){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t}).join("/"))},n.relative=function(t,e){function r(t){for(var e=0;e<t.length&&""===t[e];e++);for(var n=t.length-1;n>=0&&""===t[n];n--);return e>n?[]:t.slice(e,n-e+1)}t=n.resolve(t).substr(1),e=n.resolve(e).substr(1);for(var i=r(t.split("/")),a=r(e.split("/")),s=Math.min(i.length,a.length),o=s,u=0;s>u;u++)if(i[u]!==a[u]){o=u;break}for(var c=[],u=o;u<i.length;u++)c.push("..");return c=c.concat(a.slice(o)),c.join("/")},n.sep="/",n.delimiter=":",n.dirname=function(t){var e=a(t),n=e[0],r=e[1];return n||r?(r&&(r=r.substr(0,r.length-1)),n+r):"."},n.basename=function(t,e){var n=a(t)[2];return e&&n.substr(-1*e.length)===e&&(n=n.substr(0,n.length-e.length)),n},n.extname=function(t){return a(t)[3]};var s="b"==="ab".substr(-1)?function(t,e,n){return t.substr(e,n)}:function(t,e,n){return 0>e&&(e=t.length+e),t.substr(e,n)}}).call(this,t("1YiZ5S"))},{"1YiZ5S":81}],81:[function(t,e){function n(){}var r=e.exports={};r.nextTick=function(){var t="undefined"!=typeof window&&window.setImmediate,e="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(t)return function(t){return window.setImmediate(t)};if(e){var n=[];return window.addEventListener("message",function(t){var e=t.source;if((e===window||null===e)&&"process-tick"===t.data&&(t.stopPropagation(),n.length>0)){var r=n.shift();r()}},!0),function(t){n.push(t),window.postMessage("process-tick","*")}}return function(t){setTimeout(t,0)}}(),r.title="browser",r.browser=!0,r.env={},r.argv=[],r.on=n,r.addListener=n,r.once=n,r.off=n,r.removeListener=n,r.removeAllListeners=n,r.emit=n,r.binding=function(){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(){throw new Error("process.chdir is not supported")}},{}],82:[function(t,e,n){(function(t){(function(){function r(t,e,n){for(var r=(n||0)-1,i=t?t.length:0;++r<i;)if(t[r]===e)return r;return-1}function i(t,e){var n=typeof e;if(t=t.cache,"boolean"==n||null==e)return t[e]?0:-1;"number"!=n&&"string"!=n&&(n="object");var i="number"==n?e:b+e;return t=(t=t[n])&&t[i],"object"==n?t&&r(t,e)>-1?0:-1:t?0:-1}function a(t){var e=this.cache,n=typeof t;if("boolean"==n||null==t)e[t]=!0;else{"number"!=n&&"string"!=n&&(n="object");var r="number"==n?t:b+t,i=e[n]||(e[n]={});"object"==n?(i[r]||(i[r]=[])).push(t):i[r]=!0}}function s(t){return t.charCodeAt(0)}function o(t,e){for(var n=t.criteria,r=e.criteria,i=-1,a=n.length;++i<a;){var s=n[i],o=r[i];if(s!==o){if(s>o||"undefined"==typeof s)return 1;if(o>s||"undefined"==typeof o)return-1}}return t.index-e.index}function u(t){var e=-1,n=t.length,r=t[0],i=t[n/2|0],s=t[n-1];if(r&&"object"==typeof r&&i&&"object"==typeof i&&s&&"object"==typeof s)return!1;var o=h();o["false"]=o["null"]=o["true"]=o.undefined=!1;var u=h();for(u.array=t,u.cache=o,u.push=a;++e<n;)u.push(t[e]);return u}function c(t){return"\\"+K[t]}function l(){return m.pop()||[]}function h(){return v.pop()||{array:null,cache:null,criteria:null,"false":!1,index:0,"null":!1,number:null,object:null,push:null,string:null,"true":!1,undefined:!1,value:null}
|
||
}function d(t){t.length=0,m.length<w&&m.push(t)}function f(t){var e=t.cache;e&&f(e),t.array=t.cache=t.criteria=t.object=t.number=t.string=t.value=null,v.length<w&&v.push(t)}function p(t,e,n){e||(e=0),"undefined"==typeof n&&(n=t?t.length:0);for(var r=-1,i=n-e||0,a=Array(0>i?0:i);++r<i;)a[r]=t[e+r];return a}function y(t){function e(t){return t&&"object"==typeof t&&!Qr(t)&&Ir.call(t,"__wrapped__")?t:new n(t)}function n(t,e){this.__chain__=!!e,this.__wrapped__=t}function a(t){function e(){if(r){var t=p(r);Lr.apply(t,arguments)}if(this instanceof e){var a=v(n.prototype),s=n.apply(a,t||arguments);return Se(s)?s:a}return n.apply(i,t||arguments)}var n=t[0],r=t[2],i=t[4];return Xr(e,t),e}function m(t,e,n,r,i){if(n){var a=n(t);if("undefined"!=typeof a)return a}var s=Se(t);if(!s)return t;var o=Tr.call(t);if(!H[o])return t;var u=Zr[o];switch(o){case Y:case j:return new u(+t);case U:case V:return new u(t);case G:return a=u(t.source,C.exec(t)),a.lastIndex=t.lastIndex,a}var c=Qr(t);if(e){var h=!r;r||(r=l()),i||(i=l());for(var f=r.length;f--;)if(r[f]==t)return i[f];a=c?u(t.length):{}}else a=c?p(t):ai({},t);return c&&(Ir.call(t,"index")&&(a.index=t.index),Ir.call(t,"input")&&(a.input=t.input)),e?(r.push(t),i.push(a),(c?Ke:ui)(t,function(t,s){a[s]=m(t,e,n,r,i)}),h&&(d(r),d(i)),a):a}function v(t){return Se(t)?jr(t):{}}function w(t,e,n){if("function"!=typeof t)return Qn;if("undefined"==typeof e||!("prototype"in t))return t;var r=t.__bindData__;if("undefined"==typeof r&&(Kr.funcNames&&(r=!t.name),r=r||!Kr.funcDecomp,!r)){var i=Or.call(t);Kr.funcNames||(r=!F.test(i)),r||(r=M.test(i),Xr(t,r))}if(r===!1||r!==!0&&1&r[1])return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)};case 4:return function(n,r,i,a){return t.call(e,n,r,i,a)}}return Ln(t,e)}function K(t){function e(){var t=u?s:this;if(i){var f=p(i);Lr.apply(f,arguments)}if((a||l)&&(f||(f=p(arguments)),a&&Lr.apply(f,a),l&&f.length<o))return r|=16,K([n,h?r:-4&r,f,null,s,o]);if(f||(f=arguments),c&&(n=t[d]),this instanceof e){t=v(n.prototype);var y=n.apply(t,f);return Se(y)?y:t}return n.apply(t,f)}var n=t[0],r=t[1],i=t[2],a=t[3],s=t[4],o=t[5],u=1&r,c=2&r,l=4&r,h=8&r,d=n;return Xr(e,t),e}function Q(t,e){var n=-1,a=ue(),s=t?t.length:0,o=s>=x&&a===r,c=[];if(o){var l=u(e);l?(a=i,e=l):o=!1}for(;++n<s;){var h=t[n];a(e,h)<0&&c.push(h)}return o&&f(e),c}function J(t,e,n,r){for(var i=(r||0)-1,a=t?t.length:0,s=[];++i<a;){var o=t[i];if(o&&"object"==typeof o&&"number"==typeof o.length&&(Qr(o)||de(o))){e||(o=J(o,e,n));var u=-1,c=o.length,l=s.length;for(s.length+=c;++u<c;)s[l++]=o[u]}else n||s.push(o)}return s}function te(t,e,n,r,i,a){if(n){var s=n(t,e);if("undefined"!=typeof s)return!!s}if(t===e)return 0!==t||1/t==1/e;var o=typeof t,u=typeof e;if(!(t!==t||t&&Z[o]||e&&Z[u]))return!1;if(null==t||null==e)return t===e;var c=Tr.call(t),h=Tr.call(e);if(c==N&&(c=W),h==N&&(h=W),c!=h)return!1;switch(c){case Y:case j:return+t==+e;case U:return t!=+t?e!=+e:0==t?1/t==1/e:t==+e;case G:case V:return t==wr(e)}var f=c==R;if(!f){var p=Ir.call(t,"__wrapped__"),y=Ir.call(e,"__wrapped__");if(p||y)return te(p?t.__wrapped__:t,y?e.__wrapped__:e,n,r,i,a);if(c!=W)return!1;var g=t.constructor,m=e.constructor;if(g!=m&&!(Fe(g)&&g instanceof g&&Fe(m)&&m instanceof m)&&"constructor"in t&&"constructor"in e)return!1}var v=!i;i||(i=l()),a||(a=l());for(var _=i.length;_--;)if(i[_]==t)return a[_]==e;var b=0;if(s=!0,i.push(t),a.push(e),f){if(_=t.length,b=e.length,s=b==_,s||r)for(;b--;){var x=_,w=e[b];if(r)for(;x--&&!(s=te(t[x],w,n,r,i,a)););else if(!(s=te(t[b],w,n,r,i,a)))break}}else oi(e,function(e,o,u){return Ir.call(u,o)?(b++,s=Ir.call(t,o)&&te(t[o],e,n,r,i,a)):void 0}),s&&!r&&oi(t,function(t,e,n){return Ir.call(n,e)?s=--b>-1:void 0});return i.pop(),a.pop(),v&&(d(i),d(a)),s}function ee(t,e,n,r,i){(Qr(e)?Ke:ui)(e,function(e,a){var s,o,u=e,c=t[a];if(e&&((o=Qr(e))||ci(e))){for(var l=r.length;l--;)if(s=r[l]==e){c=i[l];break}if(!s){var h;n&&(u=n(c,e),(h="undefined"!=typeof u)&&(c=u)),h||(c=o?Qr(c)?c:[]:ci(c)?c:{}),r.push(e),i.push(c),h||ee(c,e,n,r,i)}}else n&&(u=n(c,e),"undefined"==typeof u&&(u=e)),"undefined"!=typeof u&&(c=u);t[a]=c})}function re(t,e){return t+Br(qr()*(e-t+1))}function ie(t,e,n){var a=-1,s=ue(),o=t?t.length:0,c=[],h=!e&&o>=x&&s===r,p=n||h?l():c;if(h){var y=u(p);s=i,p=y}for(;++a<o;){var g=t[a],m=n?n(g,a,t):g;(e?!a||p[p.length-1]!==m:s(p,m)<0)&&((n||h)&&p.push(m),c.push(g))}return h?(d(p.array),f(p)):n&&d(p),c}function ae(t){return function(n,r,i){var a={};r=e.createCallback(r,i,3);var s=-1,o=n?n.length:0;if("number"==typeof o)for(;++s<o;){var u=n[s];t(a,u,r(u,s,n),n)}else ui(n,function(e,n,i){t(a,e,r(e,n,i),i)});return a}}function se(t,e,n,r,i,s){var o=1&e,u=2&e,c=4&e,l=16&e,h=32&e;if(!u&&!Fe(t))throw new kr;l&&!n.length&&(e&=-17,l=n=!1),h&&!r.length&&(e&=-33,h=r=!1);var d=t&&t.__bindData__;if(d&&d!==!0)return d=p(d),d[2]&&(d[2]=p(d[2])),d[3]&&(d[3]=p(d[3])),!o||1&d[1]||(d[4]=i),!o&&1&d[1]&&(e|=8),!c||4&d[1]||(d[5]=s),l&&Lr.apply(d[2]||(d[2]=[]),n),h&&Rr.apply(d[3]||(d[3]=[]),r),d[1]|=e,se.apply(null,d);var f=1==e||17===e?a:K;return f([t,e,n,r,i,s])}function oe(t){return ei[t]}function ue(){var t=(t=e.indexOf)===vn?r:t;return t}function ce(t){return"function"==typeof t&&Cr.test(t)}function le(t){var e,n;return t&&Tr.call(t)==W&&(e=t.constructor,!Fe(e)||e instanceof e)?(oi(t,function(t,e){n=e}),"undefined"==typeof n||Ir.call(t,n)):!1}function he(t){return ni[t]}function de(t){return t&&"object"==typeof t&&"number"==typeof t.length&&Tr.call(t)==N||!1}function fe(t,e,n,r){return"boolean"!=typeof e&&null!=e&&(r=n,n=e,e=!1),m(t,e,"function"==typeof n&&w(n,r,1))}function pe(t,e,n){return m(t,!0,"function"==typeof e&&w(e,n,1))}function ye(t,e){var n=v(t);return e?ai(n,e):n}function ge(t,n,r){var i;return n=e.createCallback(n,r,3),ui(t,function(t,e,r){return n(t,e,r)?(i=e,!1):void 0}),i}function me(t,n,r){var i;return n=e.createCallback(n,r,3),_e(t,function(t,e,r){return n(t,e,r)?(i=e,!1):void 0}),i}function ve(t,e,n){var r=[];oi(t,function(t,e){r.push(e,t)});var i=r.length;for(e=w(e,n,3);i--&&e(r[i--],r[i],t)!==!1;);return t}function _e(t,e,n){var r=ti(t),i=r.length;for(e=w(e,n,3);i--;){var a=r[i];if(e(t[a],a,t)===!1)break}return t}function be(t){var e=[];return oi(t,function(t,n){Fe(t)&&e.push(n)}),e.sort()}function xe(t,e){return t?Ir.call(t,e):!1}function we(t){for(var e=-1,n=ti(t),r=n.length,i={};++e<r;){var a=n[e];i[t[a]]=a}return i}function ke(t){return t===!0||t===!1||t&&"object"==typeof t&&Tr.call(t)==Y||!1}function Ae(t){return t&&"object"==typeof t&&Tr.call(t)==j||!1}function Ee(t){return t&&1===t.nodeType||!1}function De(t){var e=!0;if(!t)return e;var n=Tr.call(t),r=t.length;return n==R||n==V||n==N||n==W&&"number"==typeof r&&Fe(t.splice)?!r:(ui(t,function(){return e=!1}),e)}function Te(t,e,n,r){return te(t,e,"function"==typeof n&&w(n,r,2))}function Ce(t){return Ur(t)&&!Wr(parseFloat(t))}function Fe(t){return"function"==typeof t}function Se(t){return!(!t||!Z[typeof t])}function Be(t){return Me(t)&&t!=+t}function Oe(t){return null===t}function Me(t){return"number"==typeof t||t&&"object"==typeof t&&Tr.call(t)==U||!1}function Ie(t){return t&&"object"==typeof t&&Tr.call(t)==G||!1}function Le(t){return"string"==typeof t||t&&"object"==typeof t&&Tr.call(t)==V||!1}function Pe(t){return"undefined"==typeof t}function Ne(t,n,r){var i={};return n=e.createCallback(n,r,3),ui(t,function(t,e,r){i[e]=n(t,e,r)}),i}function Re(t){var e=arguments,n=2;if(!Se(t))return t;if("number"!=typeof e[2]&&(n=e.length),n>3&&"function"==typeof e[n-2])var r=w(e[--n-1],e[n--],2);else n>2&&"function"==typeof e[n-1]&&(r=e[--n]);for(var i=p(arguments,1,n),a=-1,s=l(),o=l();++a<n;)ee(t,i[a],r,s,o);return d(s),d(o),t}function Ye(t,n,r){var i={};if("function"!=typeof n){var a=[];oi(t,function(t,e){a.push(e)}),a=Q(a,J(arguments,!0,!1,1));for(var s=-1,o=a.length;++s<o;){var u=a[s];i[u]=t[u]}}else n=e.createCallback(n,r,3),oi(t,function(t,e,r){n(t,e,r)||(i[e]=t)});return i}function je(t){for(var e=-1,n=ti(t),r=n.length,i=pr(r);++e<r;){var a=n[e];i[e]=[a,t[a]]}return i}function $e(t,n,r){var i={};if("function"!=typeof n)for(var a=-1,s=J(arguments,!0,!1,1),o=Se(t)?s.length:0;++a<o;){var u=s[a];u in t&&(i[u]=t[u])}else n=e.createCallback(n,r,3),oi(t,function(t,e,r){n(t,e,r)&&(i[e]=t)});return i}function Ue(t,n,r,i){var a=Qr(t);if(null==r)if(a)r=[];else{var s=t&&t.constructor,o=s&&s.prototype;r=v(o)}return n&&(n=e.createCallback(n,i,4),(a?Ke:ui)(t,function(t,e,i){return n(r,t,e,i)})),r}function We(t){for(var e=-1,n=ti(t),r=n.length,i=pr(r);++e<r;)i[e]=t[n[e]];return i}function Ge(t){for(var e=arguments,n=-1,r=J(e,!0,!1,1),i=e[2]&&e[2][e[1]]===t?1:r.length,a=pr(i);++n<i;)a[n]=t[r[n]];return a}function Ve(t,e,n){var r=-1,i=ue(),a=t?t.length:0,s=!1;return n=(0>n?Vr(0,a+n):n)||0,Qr(t)?s=i(t,e,n)>-1:"number"==typeof a?s=(Le(t)?t.indexOf(e,n):i(t,e,n))>-1:ui(t,function(t){return++r>=n?!(s=t===e):void 0}),s}function He(t,n,r){var i=!0;n=e.createCallback(n,r,3);var a=-1,s=t?t.length:0;if("number"==typeof s)for(;++a<s&&(i=!!n(t[a],a,t)););else ui(t,function(t,e,r){return i=!!n(t,e,r)});return i}function ze(t,n,r){var i=[];n=e.createCallback(n,r,3);var a=-1,s=t?t.length:0;if("number"==typeof s)for(;++a<s;){var o=t[a];n(o,a,t)&&i.push(o)}else ui(t,function(t,e,r){n(t,e,r)&&i.push(t)});return i}function qe(t,n,r){n=e.createCallback(n,r,3);var i=-1,a=t?t.length:0;if("number"!=typeof a){var s;return ui(t,function(t,e,r){return n(t,e,r)?(s=t,!1):void 0}),s}for(;++i<a;){var o=t[i];if(n(o,i,t))return o}}function Ze(t,n,r){var i;return n=e.createCallback(n,r,3),Xe(t,function(t,e,r){return n(t,e,r)?(i=t,!1):void 0}),i}function Ke(t,e,n){var r=-1,i=t?t.length:0;if(e=e&&"undefined"==typeof n?e:w(e,n,3),"number"==typeof i)for(;++r<i&&e(t[r],r,t)!==!1;);else ui(t,e);return t}function Xe(t,e,n){var r=t?t.length:0;if(e=e&&"undefined"==typeof n?e:w(e,n,3),"number"==typeof r)for(;r--&&e(t[r],r,t)!==!1;);else{var i=ti(t);r=i.length,ui(t,function(t,n,a){return n=i?i[--r]:--r,e(a[n],n,a)})}return t}function Qe(t,e){var n=p(arguments,2),r=-1,i="function"==typeof e,a=t?t.length:0,s=pr("number"==typeof a?a:0);return Ke(t,function(t){s[++r]=(i?e:t[e]).apply(t,n)}),s}function Je(t,n,r){var i=-1,a=t?t.length:0;if(n=e.createCallback(n,r,3),"number"==typeof a)for(var s=pr(a);++i<a;)s[i]=n(t[i],i,t);else s=[],ui(t,function(t,e,r){s[++i]=n(t,e,r)});return s}function tn(t,n,r){var i=-1/0,a=i;if("function"!=typeof n&&r&&r[n]===t&&(n=null),null==n&&Qr(t))for(var o=-1,u=t.length;++o<u;){var c=t[o];c>a&&(a=c)}else n=null==n&&Le(t)?s:e.createCallback(n,r,3),Ke(t,function(t,e,r){var s=n(t,e,r);s>i&&(i=s,a=t)});return a}function en(t,n,r){var i=1/0,a=i;if("function"!=typeof n&&r&&r[n]===t&&(n=null),null==n&&Qr(t))for(var o=-1,u=t.length;++o<u;){var c=t[o];a>c&&(a=c)}else n=null==n&&Le(t)?s:e.createCallback(n,r,3),Ke(t,function(t,e,r){var s=n(t,e,r);i>s&&(i=s,a=t)});return a}function nn(t,n,r,i){if(!t)return r;var a=arguments.length<3;n=e.createCallback(n,i,4);var s=-1,o=t.length;if("number"==typeof o)for(a&&(r=t[++s]);++s<o;)r=n(r,t[s],s,t);else ui(t,function(t,e,i){r=a?(a=!1,t):n(r,t,e,i)});return r}function rn(t,n,r,i){var a=arguments.length<3;return n=e.createCallback(n,i,4),Xe(t,function(t,e,i){r=a?(a=!1,t):n(r,t,e,i)}),r}function an(t,n,r){return n=e.createCallback(n,r,3),ze(t,function(t,e,r){return!n(t,e,r)})}function sn(t,e,n){if(t&&"number"!=typeof t.length&&(t=We(t)),null==e||n)return t?t[re(0,t.length-1)]:g;var r=on(t);return r.length=Hr(Vr(0,e),r.length),r}function on(t){var e=-1,n=t?t.length:0,r=pr("number"==typeof n?n:0);return Ke(t,function(t){var n=re(0,++e);r[e]=r[n],r[n]=t}),r}function un(t){var e=t?t.length:0;return"number"==typeof e?e:ti(t).length}function cn(t,n,r){var i;n=e.createCallback(n,r,3);var a=-1,s=t?t.length:0;if("number"==typeof s)for(;++a<s&&!(i=n(t[a],a,t)););else ui(t,function(t,e,r){return!(i=n(t,e,r))});return!!i}function ln(t,n,r){var i=-1,a=Qr(n),s=t?t.length:0,u=pr("number"==typeof s?s:0);for(a||(n=e.createCallback(n,r,3)),Ke(t,function(t,e,r){var s=u[++i]=h();a?s.criteria=Je(n,function(e){return t[e]}):(s.criteria=l())[0]=n(t,e,r),s.index=i,s.value=t}),s=u.length,u.sort(o);s--;){var c=u[s];u[s]=c.value,a||d(c.criteria),f(c)}return u}function hn(t){return t&&"number"==typeof t.length?p(t):We(t)}function dn(t){for(var e=-1,n=t?t.length:0,r=[];++e<n;){var i=t[e];i&&r.push(i)}return r}function fn(t){return Q(t,J(arguments,!0,!0,1))}function pn(t,n,r){var i=-1,a=t?t.length:0;for(n=e.createCallback(n,r,3);++i<a;)if(n(t[i],i,t))return i;return-1}function yn(t,n,r){var i=t?t.length:0;for(n=e.createCallback(n,r,3);i--;)if(n(t[i],i,t))return i;return-1}function gn(t,n,r){var i=0,a=t?t.length:0;if("number"!=typeof n&&null!=n){var s=-1;for(n=e.createCallback(n,r,3);++s<a&&n(t[s],s,t);)i++}else if(i=n,null==i||r)return t?t[0]:g;return p(t,0,Hr(Vr(0,i),a))}function mn(t,e,n,r){return"boolean"!=typeof e&&null!=e&&(r=n,n="function"!=typeof e&&r&&r[e]===t?null:e,e=!1),null!=n&&(t=Je(t,n,r)),J(t,e)}function vn(t,e,n){if("number"==typeof n){var i=t?t.length:0;n=0>n?Vr(0,i+n):n||0}else if(n){var a=Tn(t,e);return t[a]===e?a:-1}return r(t,e,n)}function _n(t,n,r){var i=0,a=t?t.length:0;if("number"!=typeof n&&null!=n){var s=a;for(n=e.createCallback(n,r,3);s--&&n(t[s],s,t);)i++}else i=null==n||r?1:n||i;return p(t,0,Hr(Vr(0,a-i),a))}function bn(){for(var t=[],e=-1,n=arguments.length,a=l(),s=ue(),o=s===r,c=l();++e<n;){var h=arguments[e];(Qr(h)||de(h))&&(t.push(h),a.push(o&&h.length>=x&&u(e?t[e]:c)))}var p=t[0],y=-1,g=p?p.length:0,m=[];t:for(;++y<g;){var v=a[0];if(h=p[y],(v?i(v,h):s(c,h))<0){for(e=n,(v||c).push(h);--e;)if(v=a[e],(v?i(v,h):s(t[e],h))<0)continue t;m.push(h)}}for(;n--;)v=a[n],v&&f(v);return d(a),d(c),m}function xn(t,n,r){var i=0,a=t?t.length:0;if("number"!=typeof n&&null!=n){var s=a;for(n=e.createCallback(n,r,3);s--&&n(t[s],s,t);)i++}else if(i=n,null==i||r)return t?t[a-1]:g;return p(t,Vr(0,a-i))}function wn(t,e,n){var r=t?t.length:0;for("number"==typeof n&&(r=(0>n?Vr(0,r+n):Hr(n,r-1))+1);r--;)if(t[r]===e)return r;return-1}function kn(t){for(var e=arguments,n=0,r=e.length,i=t?t.length:0;++n<r;)for(var a=-1,s=e[n];++a<i;)t[a]===s&&(Nr.call(t,a--,1),i--);return t}function An(t,e,n){t=+t||0,n="number"==typeof n?n:+n||1,null==e&&(e=t,t=0);for(var r=-1,i=Vr(0,Fr((e-t)/(n||1))),a=pr(i);++r<i;)a[r]=t,t+=n;return a}function En(t,n,r){var i=-1,a=t?t.length:0,s=[];for(n=e.createCallback(n,r,3);++i<a;){var o=t[i];n(o,i,t)&&(s.push(o),Nr.call(t,i--,1),a--)}return s}function Dn(t,n,r){if("number"!=typeof n&&null!=n){var i=0,a=-1,s=t?t.length:0;for(n=e.createCallback(n,r,3);++a<s&&n(t[a],a,t);)i++}else i=null==n||r?1:Vr(0,n);return p(t,i)}function Tn(t,n,r,i){var a=0,s=t?t.length:a;for(r=r?e.createCallback(r,i,1):Qn,n=r(n);s>a;){var o=a+s>>>1;r(t[o])<n?a=o+1:s=o}return a}function Cn(){return ie(J(arguments,!0,!0))}function Fn(t,n,r,i){return"boolean"!=typeof n&&null!=n&&(i=r,r="function"!=typeof n&&i&&i[n]===t?null:n,n=!1),null!=r&&(r=e.createCallback(r,i,3)),ie(t,n,r)}function Sn(t){return Q(t,p(arguments,1))}function Bn(){for(var t=-1,e=arguments.length;++t<e;){var n=arguments[t];if(Qr(n)||de(n))var r=r?ie(Q(r,n).concat(Q(n,r))):n}return r||[]}function On(){for(var t=arguments.length>1?arguments:arguments[0],e=-1,n=t?tn(fi(t,"length")):0,r=pr(0>n?0:n);++e<n;)r[e]=fi(t,e);return r}function Mn(t,e){var n=-1,r=t?t.length:0,i={};for(e||!r||Qr(t[0])||(e=[]);++n<r;){var a=t[n];e?i[a]=e[n]:a&&(i[a[0]]=a[1])}return i}function In(t,e){if(!Fe(e))throw new kr;return function(){return--t<1?e.apply(this,arguments):void 0}}function Ln(t,e){return arguments.length>2?se(t,17,p(arguments,2),null,e):se(t,1,null,null,e)}function Pn(t){for(var e=arguments.length>1?J(arguments,!0,!1,1):be(t),n=-1,r=e.length;++n<r;){var i=e[n];t[i]=se(t[i],1,null,null,t)}return t}function Nn(t,e){return arguments.length>2?se(e,19,p(arguments,2),null,t):se(e,3,null,null,t)}function Rn(){for(var t=arguments,e=t.length;e--;)if(!Fe(t[e]))throw new kr;return function(){for(var e=arguments,n=t.length;n--;)e=[t[n].apply(this,e)];return e[0]}}function Yn(t,e){return e="number"==typeof e?e:+e||t.length,se(t,4,null,null,null,e)}function jn(t,e,n){var r,i,a,s,o,u,c,l=0,h=!1,d=!0;if(!Fe(t))throw new kr;if(e=Vr(0,e)||0,n===!0){var f=!0;d=!1}else Se(n)&&(f=n.leading,h="maxWait"in n&&(Vr(e,n.maxWait)||0),d="trailing"in n?n.trailing:d);var p=function(){var n=e-(yi()-s);if(0>=n){i&&Sr(i);var h=c;i=u=c=g,h&&(l=yi(),a=t.apply(o,r),u||i||(r=o=null))}else u=Pr(p,n)},y=function(){u&&Sr(u),i=u=c=g,(d||h!==e)&&(l=yi(),a=t.apply(o,r),u||i||(r=o=null))};return function(){if(r=arguments,s=yi(),o=this,c=d&&(u||!f),h===!1)var n=f&&!u;else{i||f||(l=s);var g=h-(s-l),m=0>=g;m?(i&&(i=Sr(i)),l=s,a=t.apply(o,r)):i||(i=Pr(y,g))}return m&&u?u=Sr(u):u||e===h||(u=Pr(p,e)),n&&(m=!0,a=t.apply(o,r)),!m||u||i||(r=o=null),a}}function $n(t){if(!Fe(t))throw new kr;var e=p(arguments,1);return Pr(function(){t.apply(g,e)},1)}function Un(t,e){if(!Fe(t))throw new kr;var n=p(arguments,2);return Pr(function(){t.apply(g,n)},e)}function Wn(t,e){if(!Fe(t))throw new kr;var n=function(){var r=n.cache,i=e?e.apply(this,arguments):b+arguments[0];return Ir.call(r,i)?r[i]:r[i]=t.apply(this,arguments)};return n.cache={},n}function Gn(t){var e,n;if(!Fe(t))throw new kr;return function(){return e?n:(e=!0,n=t.apply(this,arguments),t=null,n)}}function Vn(t){return se(t,16,p(arguments,1))}function Hn(t){return se(t,32,null,p(arguments,1))}function zn(t,e,n){var r=!0,i=!0;if(!Fe(t))throw new kr;return n===!1?r=!1:Se(n)&&(r="leading"in n?n.leading:r,i="trailing"in n?n.trailing:i),z.leading=r,z.maxWait=e,z.trailing=i,jn(t,e,z)}function qn(t,e){return se(e,16,[t])}function Zn(t){return function(){return t}}function Kn(t,e,n){var r=typeof t;if(null==t||"function"==r)return w(t,e,n);if("object"!=r)return nr(t);var i=ti(t),a=i[0],s=t[a];return 1!=i.length||s!==s||Se(s)?function(e){for(var n=i.length,r=!1;n--&&(r=te(e[i[n]],t[i[n]],null,!0)););return r}:function(t){var e=t[a];return s===e&&(0!==s||1/s==1/e)}}function Xn(t){return null==t?"":wr(t).replace(ii,oe)}function Qn(t){return t}function Jn(t,r,i){var a=!0,s=r&&be(r);r&&(i||s.length)||(null==i&&(i=r),o=n,r=t,t=e,s=be(r)),i===!1?a=!1:Se(i)&&"chain"in i&&(a=i.chain);var o=t,u=Fe(o);Ke(s,function(e){var n=t[e]=r[e];u&&(o.prototype[e]=function(){var e=this.__chain__,r=this.__wrapped__,i=[r];Lr.apply(i,arguments);var s=n.apply(t,i);if(a||e){if(r===s&&Se(s))return this;s=new o(s),s.__chain__=e}return s})})}function tr(){return t._=Dr,this}function er(){}function nr(t){return function(e){return e[t]}}function rr(t,e,n){var r=null==t,i=null==e;if(null==n&&("boolean"==typeof t&&i?(n=t,t=1):i||"boolean"!=typeof e||(n=e,i=!0)),r&&i&&(e=1),t=+t||0,i?(e=t,t=0):e=+e||0,n||t%1||e%1){var a=qr();return Hr(t+a*(e-t+parseFloat("1e-"+((a+"").length-1))),e)}return re(t,e)}function ir(t,e){if(t){var n=t[e];return Fe(n)?t[e]():n}}function ar(t,n,r){var i=e.templateSettings;t=wr(t||""),r=si({},r,i);var a,s=si({},r.imports,i.imports),o=ti(s),u=We(s),l=0,h=r.interpolate||O,d="__p += '",f=xr((r.escape||O).source+"|"+h.source+"|"+(h===S?T:O).source+"|"+(r.evaluate||O).source+"|$","g");t.replace(f,function(e,n,r,i,s,o){return r||(r=i),d+=t.slice(l,o).replace(I,c),n&&(d+="' +\n__e("+n+") +\n'"),s&&(a=!0,d+="';\n"+s+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=o+e.length,e}),d+="';\n";var p=r.variable,y=p;y||(p="obj",d="with ("+p+") {\n"+d+"\n}\n"),d=(a?d.replace(A,""):d).replace(E,"$1").replace(D,"$1;"),d="function("+p+") {\n"+(y?"":p+" || ("+p+" = {});\n")+"var __t, __p = '', __e = _.escape"+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var m="\n/*\n//# sourceURL="+(r.sourceURL||"/lodash/template/source["+P++ +"]")+"\n*/";try{var v=mr(o,"return "+d+m).apply(g,u)}catch(_){throw _.source=d,_}return n?v(n):(v.source=d,v)}function sr(t,e,n){t=(t=+t)>-1?t:0;var r=-1,i=pr(t);for(e=w(e,n,1);++r<t;)i[r]=e(r);return i}function or(t){return null==t?"":wr(t).replace(ri,he)}function ur(t){var e=++_;return wr(null==t?"":t)+e}function cr(t){return t=new n(t),t.__chain__=!0,t}function lr(t,e){return e(t),t}function hr(){return this.__chain__=!0,this}function dr(){return wr(this.__wrapped__)}function fr(){return this.__wrapped__}t=t?ne.defaults(X.Object(),t,ne.pick(X,L)):X;var pr=t.Array,yr=t.Boolean,gr=t.Date,mr=t.Function,vr=t.Math,_r=t.Number,br=t.Object,xr=t.RegExp,wr=t.String,kr=t.TypeError,Ar=[],Er=br.prototype,Dr=t._,Tr=Er.toString,Cr=xr("^"+wr(Tr).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),Fr=vr.ceil,Sr=t.clearTimeout,Br=vr.floor,Or=mr.prototype.toString,Mr=ce(Mr=br.getPrototypeOf)&&Mr,Ir=Er.hasOwnProperty,Lr=Ar.push,Pr=t.setTimeout,Nr=Ar.splice,Rr=Ar.unshift,Yr=function(){try{var t={},e=ce(e=br.defineProperty)&&e,n=e(t,t,t)&&e}catch(r){}return n}(),jr=ce(jr=br.create)&&jr,$r=ce($r=pr.isArray)&&$r,Ur=t.isFinite,Wr=t.isNaN,Gr=ce(Gr=br.keys)&&Gr,Vr=vr.max,Hr=vr.min,zr=t.parseInt,qr=vr.random,Zr={};Zr[R]=pr,Zr[Y]=yr,Zr[j]=gr,Zr[$]=mr,Zr[W]=br,Zr[U]=_r,Zr[G]=xr,Zr[V]=wr,n.prototype=e.prototype;var Kr=e.support={};Kr.funcDecomp=!ce(t.WinRTError)&&M.test(y),Kr.funcNames="string"==typeof mr.name,e.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:S,variable:"",imports:{_:e}},jr||(v=function(){function e(){}return function(n){if(Se(n)){e.prototype=n;var r=new e;e.prototype=null}return r||t.Object()}}());var Xr=Yr?function(t,e){q.value=e,Yr(t,"__bindData__",q),q.value=null}:er,Qr=$r||function(t){return t&&"object"==typeof t&&"number"==typeof t.length&&Tr.call(t)==R||!1},Jr=function(t){var e,n=t,r=[];if(!n)return r;if(!Z[typeof t])return r;for(e in n)Ir.call(n,e)&&r.push(e);return r},ti=Gr?function(t){return Se(t)?Gr(t):[]}:Jr,ei={"&":"&","<":"<",">":">",'"':""","'":"'"},ni=we(ei),ri=xr("("+ti(ni).join("|")+")","g"),ii=xr("["+ti(ei).join("")+"]","g"),ai=function(t,e,n){var r,i=t,a=i;if(!i)return a;var s=arguments,o=0,u="number"==typeof n?2:s.length;if(u>3&&"function"==typeof s[u-2])var c=w(s[--u-1],s[u--],2);else u>2&&"function"==typeof s[u-1]&&(c=s[--u]);for(;++o<u;)if(i=s[o],i&&Z[typeof i])for(var l=-1,h=Z[typeof i]&&ti(i),d=h?h.length:0;++l<d;)r=h[l],a[r]=c?c(a[r],i[r]):i[r];return a},si=function(t,e,n){var r,i=t,a=i;if(!i)return a;for(var s=arguments,o=0,u="number"==typeof n?2:s.length;++o<u;)if(i=s[o],i&&Z[typeof i])for(var c=-1,l=Z[typeof i]&&ti(i),h=l?l.length:0;++c<h;)r=l[c],"undefined"==typeof a[r]&&(a[r]=i[r]);return a},oi=function(t,e,n){var r,i=t,a=i;if(!i)return a;if(!Z[typeof i])return a;e=e&&"undefined"==typeof n?e:w(e,n,3);for(r in i)if(e(i[r],r,t)===!1)return a;return a},ui=function(t,e,n){var r,i=t,a=i;if(!i)return a;if(!Z[typeof i])return a;e=e&&"undefined"==typeof n?e:w(e,n,3);for(var s=-1,o=Z[typeof i]&&ti(i),u=o?o.length:0;++s<u;)if(r=o[s],e(i[r],r,t)===!1)return a;return a},ci=Mr?function(t){if(!t||Tr.call(t)!=W)return!1;var e=t.valueOf,n=ce(e)&&(n=Mr(e))&&Mr(n);return n?t==n||Mr(t)==n:le(t)}:le,li=ae(function(t,e,n){Ir.call(t,n)?t[n]++:t[n]=1}),hi=ae(function(t,e,n){(Ir.call(t,n)?t[n]:t[n]=[]).push(e)}),di=ae(function(t,e,n){t[n]=e}),fi=Je,pi=ze,yi=ce(yi=gr.now)&&yi||function(){return(new gr).getTime()},gi=8==zr(k+"08")?zr:function(t,e){return zr(Le(t)?t.replace(B,""):t,e||0)};return e.after=In,e.assign=ai,e.at=Ge,e.bind=Ln,e.bindAll=Pn,e.bindKey=Nn,e.chain=cr,e.compact=dn,e.compose=Rn,e.constant=Zn,e.countBy=li,e.create=ye,e.createCallback=Kn,e.curry=Yn,e.debounce=jn,e.defaults=si,e.defer=$n,e.delay=Un,e.difference=fn,e.filter=ze,e.flatten=mn,e.forEach=Ke,e.forEachRight=Xe,e.forIn=oi,e.forInRight=ve,e.forOwn=ui,e.forOwnRight=_e,e.functions=be,e.groupBy=hi,e.indexBy=di,e.initial=_n,e.intersection=bn,e.invert=we,e.invoke=Qe,e.keys=ti,e.map=Je,e.mapValues=Ne,e.max=tn,e.memoize=Wn,e.merge=Re,e.min=en,e.omit=Ye,e.once=Gn,e.pairs=je,e.partial=Vn,e.partialRight=Hn,e.pick=$e,e.pluck=fi,e.property=nr,e.pull=kn,e.range=An,e.reject=an,e.remove=En,e.rest=Dn,e.shuffle=on,e.sortBy=ln,e.tap=lr,e.throttle=zn,e.times=sr,e.toArray=hn,e.transform=Ue,e.union=Cn,e.uniq=Fn,e.values=We,e.where=pi,e.without=Sn,e.wrap=qn,e.xor=Bn,e.zip=On,e.zipObject=Mn,e.collect=Je,e.drop=Dn,e.each=Ke,e.eachRight=Xe,e.extend=ai,e.methods=be,e.object=Mn,e.select=ze,e.tail=Dn,e.unique=Fn,e.unzip=On,Jn(e),e.clone=fe,e.cloneDeep=pe,e.contains=Ve,e.escape=Xn,e.every=He,e.find=qe,e.findIndex=pn,e.findKey=ge,e.findLast=Ze,e.findLastIndex=yn,e.findLastKey=me,e.has=xe,e.identity=Qn,e.indexOf=vn,e.isArguments=de,e.isArray=Qr,e.isBoolean=ke,e.isDate=Ae,e.isElement=Ee,e.isEmpty=De,e.isEqual=Te,e.isFinite=Ce,e.isFunction=Fe,e.isNaN=Be,e.isNull=Oe,e.isNumber=Me,e.isObject=Se,e.isPlainObject=ci,e.isRegExp=Ie,e.isString=Le,e.isUndefined=Pe,e.lastIndexOf=wn,e.mixin=Jn,e.noConflict=tr,e.noop=er,e.now=yi,e.parseInt=gi,e.random=rr,e.reduce=nn,e.reduceRight=rn,e.result=ir,e.runInContext=y,e.size=un,e.some=cn,e.sortedIndex=Tn,e.template=ar,e.unescape=or,e.uniqueId=ur,e.all=He,e.any=cn,e.detect=qe,e.findWhere=qe,e.foldl=nn,e.foldr=rn,e.include=Ve,e.inject=nn,Jn(function(){var t={};return ui(e,function(n,r){e.prototype[r]||(t[r]=n)}),t}(),!1),e.first=gn,e.last=xn,e.sample=sn,e.take=gn,e.head=gn,ui(e,function(t,r){var i="sample"!==r;e.prototype[r]||(e.prototype[r]=function(e,r){var a=this.__chain__,s=t(this.__wrapped__,e,r);return a||null!=e&&(!r||i&&"function"==typeof e)?new n(s,a):s})}),e.VERSION="2.4.2",e.prototype.chain=hr,e.prototype.toString=dr,e.prototype.value=fr,e.prototype.valueOf=fr,Ke(["join","pop","shift"],function(t){var r=Ar[t];e.prototype[t]=function(){var t=this.__chain__,e=r.apply(this.__wrapped__,arguments);return t?new n(e,t):e}}),Ke(["push","reverse","sort","unshift"],function(t){var n=Ar[t];e.prototype[t]=function(){return n.apply(this.__wrapped__,arguments),this}}),Ke(["concat","slice","splice"],function(t){var r=Ar[t];e.prototype[t]=function(){return new n(r.apply(this.__wrapped__,arguments),this.__chain__)}}),e}var g,m=[],v=[],_=0,b=+new Date+"",x=75,w=40,k=" \f \n\r\u2028\u2029 ",A=/\b__p \+= '';/g,E=/\b(__p \+=) '' \+/g,D=/(__e\(.*?\)|\b__t\)) \+\n'';/g,T=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,C=/\w*$/,F=/^\s*function[ \n\r\t]+\w/,S=/<%=([\s\S]+?)%>/g,B=RegExp("^["+k+"]*0+(?=.$)"),O=/($^)/,M=/\bthis\b/,I=/['\n\r\t\u2028\u2029\\]/g,L=["Array","Boolean","Date","Function","Math","Number","Object","RegExp","String","_","attachEvent","clearTimeout","isFinite","isNaN","parseInt","setTimeout"],P=0,N="[object Arguments]",R="[object Array]",Y="[object Boolean]",j="[object Date]",$="[object Function]",U="[object Number]",W="[object Object]",G="[object RegExp]",V="[object String]",H={};H[$]=!1,H[N]=H[R]=H[Y]=H[j]=H[U]=H[W]=H[G]=H[V]=!0;var z={leading:!1,maxWait:0,trailing:!1},q={configurable:!1,enumerable:!1,value:null,writable:!1},Z={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},K={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"},X=Z[typeof window]&&window||this,Q=Z[typeof n]&&n&&!n.nodeType&&n,J=Z[typeof e]&&e&&!e.nodeType&&e,te=J&&J.exports===Q&&Q,ee=Z[typeof t]&&t;!ee||ee.global!==ee&&ee.window!==ee||(X=ee);var ne=y();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(X._=ne,define(function(){return ne})):Q&&J?te?(J.exports=ne)._=ne:Q._=ne:X._=ne}).call(this)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],83:[function(t,e,n){!function(t,r){"object"==typeof n&&"undefined"!=typeof e?e.exports=r():"function"==typeof define&&define.amd?define(r):t.moment=r()}(this,function(){"use strict";function n(){return Or.apply(null,arguments)}function r(t){Or=t}function i(t){return"[object Array]"===Object.prototype.toString.call(t)}function a(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function s(t,e){var n,r=[];for(n=0;n<t.length;++n)r.push(e(t[n],n));return r}function o(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function u(t,e){for(var n in e)o(e,n)&&(t[n]=e[n]);return o(e,"toString")&&(t.toString=e.toString),o(e,"valueOf")&&(t.valueOf=e.valueOf),t}function c(t,e,n,r){return Te(t,e,n,r,!0).utc()}function l(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function h(t){return null==t._pf&&(t._pf=l()),t._pf}function d(t){if(null==t._isValid){var e=h(t);t._isValid=!isNaN(t._d.getTime())&&e.overflow<0&&!e.empty&&!e.invalidMonth&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated,t._strict&&(t._isValid=t._isValid&&0===e.charsLeftOver&&0===e.unusedTokens.length&&void 0===e.bigHour)}return t._isValid}function f(t){var e=c(0/0);return null!=t?u(h(e),t):h(e).userInvalidated=!0,e}function p(t,e){var n,r,i;if("undefined"!=typeof e._isAMomentObject&&(t._isAMomentObject=e._isAMomentObject),"undefined"!=typeof e._i&&(t._i=e._i),"undefined"!=typeof e._f&&(t._f=e._f),"undefined"!=typeof e._l&&(t._l=e._l),"undefined"!=typeof e._strict&&(t._strict=e._strict),"undefined"!=typeof e._tzm&&(t._tzm=e._tzm),"undefined"!=typeof e._isUTC&&(t._isUTC=e._isUTC),"undefined"!=typeof e._offset&&(t._offset=e._offset),"undefined"!=typeof e._pf&&(t._pf=h(e)),"undefined"!=typeof e._locale&&(t._locale=e._locale),Ir.length>0)for(n in Ir)r=Ir[n],i=e[r],"undefined"!=typeof i&&(t[r]=i);return t}function y(t){p(this,t),this._d=new Date(+t._d),Lr===!1&&(Lr=!0,n.updateOffset(this),Lr=!1)}function g(t){return t instanceof y||null!=t&&null!=t._isAMomentObject}function m(t){var e=+t,n=0;return 0!==e&&isFinite(e)&&(n=e>=0?Math.floor(e):Math.ceil(e)),n}function v(t,e,n){var r,i=Math.min(t.length,e.length),a=Math.abs(t.length-e.length),s=0;for(r=0;i>r;r++)(n&&t[r]!==e[r]||!n&&m(t[r])!==m(e[r]))&&s++;return s+a}function _(){}function b(t){return t?t.toLowerCase().replace("_","-"):t}function x(t){for(var e,n,r,i,a=0;a<t.length;){for(i=b(t[a]).split("-"),e=i.length,n=b(t[a+1]),n=n?n.split("-"):null;e>0;){if(r=w(i.slice(0,e).join("-")))return r;if(n&&n.length>=e&&v(i,n,!0)>=e-1)break;e--}a++}return null}function w(n){var r=null;if(!Pr[n]&&"undefined"!=typeof e&&e&&e.exports)try{r=Mr._abbr,t("./locale/"+n),k(r)}catch(i){}return Pr[n]}function k(t,e){var n;return t&&(n="undefined"==typeof e?E(t):A(t,e),n&&(Mr=n)),Mr._abbr}function A(t,e){return null!==e?(e.abbr=t,Pr[t]||(Pr[t]=new _),Pr[t].set(e),k(t),Pr[t]):(delete Pr[t],null)}function E(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return Mr;if(!i(t)){if(e=w(t))return e;t=[t]}return x(t)}function D(t,e){var n=t.toLowerCase();Nr[n]=Nr[n+"s"]=Nr[e]=t}function T(t){return"string"==typeof t?Nr[t]||Nr[t.toLowerCase()]:void 0}function C(t){var e,n,r={};for(n in t)o(t,n)&&(e=T(n),e&&(r[e]=t[n]));return r}function F(t,e){return function(r){return null!=r?(B(this,t,r),n.updateOffset(this,e),this):S(this,t)}}function S(t,e){return t._d["get"+(t._isUTC?"UTC":"")+e]()}function B(t,e,n){return t._d["set"+(t._isUTC?"UTC":"")+e](n)}function O(t,e){var n;if("object"==typeof t)for(n in t)this.set(n,t[n]);else if(t=T(t),"function"==typeof this[t])return this[t](e);return this}function M(t,e,n){for(var r=""+Math.abs(t),i=t>=0;r.length<e;)r="0"+r;return(i?n?"+":"":"-")+r}function I(t,e,n,r){var i=r;"string"==typeof r&&(i=function(){return this[r]()}),t&&($r[t]=i),e&&($r[e[0]]=function(){return M(i.apply(this,arguments),e[1],e[2])}),n&&($r[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),t)})}function L(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function P(t){var e,n,r=t.match(Rr);for(e=0,n=r.length;n>e;e++)r[e]=$r[r[e]]?$r[r[e]]:L(r[e]);return function(i){var a="";for(e=0;n>e;e++)a+=r[e]instanceof Function?r[e].call(i,t):r[e];return a}}function N(t,e){return t.isValid()?(e=R(e,t.localeData()),jr[e]||(jr[e]=P(e)),jr[e](t)):t.localeData().invalidDate()}function R(t,e){function n(t){return e.longDateFormat(t)||t}var r=5;for(Yr.lastIndex=0;r>=0&&Yr.test(t);)t=t.replace(Yr,n),Yr.lastIndex=0,r-=1;return t}function Y(t,e,n){ni[t]="function"==typeof e?e:function(t){return t&&n?n:e}}function j(t,e){return o(ni,t)?ni[t](e._strict,e._locale):new RegExp($(t))
|
||
}function $(t){return t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,n,r,i){return e||n||r||i}).replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function U(t,e){var n,r=e;for("string"==typeof t&&(t=[t]),"number"==typeof e&&(r=function(t,n){n[e]=m(t)}),n=0;n<t.length;n++)ri[t[n]]=r}function W(t,e){U(t,function(t,n,r,i){r._w=r._w||{},e(t,r._w,r,i)})}function G(t,e,n){null!=e&&o(ri,t)&&ri[t](e,n._a,n,t)}function V(t,e){return new Date(Date.UTC(t,e+1,0)).getUTCDate()}function H(t){return this._months[t.month()]}function z(t){return this._monthsShort[t.month()]}function q(t,e,n){var r,i,a;for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;12>r;r++){if(i=c([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(a="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(a.replace(".",""),"i")),n&&"MMMM"===e&&this._longMonthsParse[r].test(t))return r;if(n&&"MMM"===e&&this._shortMonthsParse[r].test(t))return r;if(!n&&this._monthsParse[r].test(t))return r}}function Z(t,e){var n;return"string"==typeof e&&(e=t.localeData().monthsParse(e),"number"!=typeof e)?t:(n=Math.min(t.date(),V(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,n),t)}function K(t){return null!=t?(Z(this,t),n.updateOffset(this,!0),this):S(this,"Month")}function X(){return V(this.year(),this.month())}function Q(t){var e,n=t._a;return n&&-2===h(t).overflow&&(e=n[ai]<0||n[ai]>11?ai:n[si]<1||n[si]>V(n[ii],n[ai])?si:n[oi]<0||n[oi]>24||24===n[oi]&&(0!==n[ui]||0!==n[ci]||0!==n[li])?oi:n[ui]<0||n[ui]>59?ui:n[ci]<0||n[ci]>59?ci:n[li]<0||n[li]>999?li:-1,h(t)._overflowDayOfYear&&(ii>e||e>si)&&(e=si),h(t).overflow=e),t}function J(t){n.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function te(t,e){var n=!0,r=t+"\n"+(new Error).stack;return u(function(){return n&&(J(r),n=!1),e.apply(this,arguments)},e)}function ee(t,e){fi[t]||(J(e),fi[t]=!0)}function ne(t){var e,n,r=t._i,i=pi.exec(r);if(i){for(h(t).iso=!0,e=0,n=yi.length;n>e;e++)if(yi[e][1].exec(r)){t._f=yi[e][0]+(i[6]||" ");break}for(e=0,n=gi.length;n>e;e++)if(gi[e][1].exec(r)){t._f+=gi[e][0];break}r.match(Jr)&&(t._f+="Z"),xe(t)}else t._isValid=!1}function re(t){var e=mi.exec(t._i);return null!==e?void(t._d=new Date(+e[1])):(ne(t),void(t._isValid===!1&&(delete t._isValid,n.createFromInputFallback(t))))}function ie(t,e,n,r,i,a,s){var o=new Date(t,e,n,r,i,a,s);return 1970>t&&o.setFullYear(t),o}function ae(t){var e=new Date(Date.UTC.apply(null,arguments));return 1970>t&&e.setUTCFullYear(t),e}function se(t){return oe(t)?366:365}function oe(t){return t%4===0&&t%100!==0||t%400===0}function ue(){return oe(this.year())}function ce(t,e,n){var r,i=n-e,a=n-t.day();return a>i&&(a-=7),i-7>a&&(a+=7),r=Ce(t).add(a,"d"),{week:Math.ceil(r.dayOfYear()/7),year:r.year()}}function le(t){return ce(t,this._week.dow,this._week.doy).week}function he(){return this._week.dow}function de(){return this._week.doy}function fe(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")}function pe(t){var e=ce(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")}function ye(t,e,n,r,i){var a,s,o=ae(t,0,1).getUTCDay();return o=0===o?7:o,n=null!=n?n:i,a=i-o+(o>r?7:0)-(i>o?7:0),s=7*(e-1)+(n-i)+a+1,{year:s>0?t:t-1,dayOfYear:s>0?s:se(t-1)+s}}function ge(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")}function me(t,e,n){return null!=t?t:null!=e?e:n}function ve(t){var e=new Date;return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}function _e(t){var e,n,r,i,a=[];if(!t._d){for(r=ve(t),t._w&&null==t._a[si]&&null==t._a[ai]&&be(t),t._dayOfYear&&(i=me(t._a[ii],r[ii]),t._dayOfYear>se(i)&&(h(t)._overflowDayOfYear=!0),n=ae(i,0,t._dayOfYear),t._a[ai]=n.getUTCMonth(),t._a[si]=n.getUTCDate()),e=0;3>e&&null==t._a[e];++e)t._a[e]=a[e]=r[e];for(;7>e;e++)t._a[e]=a[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[oi]&&0===t._a[ui]&&0===t._a[ci]&&0===t._a[li]&&(t._nextDay=!0,t._a[oi]=0),t._d=(t._useUTC?ae:ie).apply(null,a),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[oi]=24)}}function be(t){var e,n,r,i,a,s,o;e=t._w,null!=e.GG||null!=e.W||null!=e.E?(a=1,s=4,n=me(e.GG,t._a[ii],ce(Ce(),1,4).year),r=me(e.W,1),i=me(e.E,1)):(a=t._locale._week.dow,s=t._locale._week.doy,n=me(e.gg,t._a[ii],ce(Ce(),a,s).year),r=me(e.w,1),null!=e.d?(i=e.d,a>i&&++r):i=null!=e.e?e.e+a:a),o=ye(n,r,i,s,a),t._a[ii]=o.year,t._dayOfYear=o.dayOfYear}function xe(t){if(t._f===n.ISO_8601)return void ne(t);t._a=[],h(t).empty=!0;var e,r,i,a,s,o=""+t._i,u=o.length,c=0;for(i=R(t._f,t._locale).match(Rr)||[],e=0;e<i.length;e++)a=i[e],r=(o.match(j(a,t))||[])[0],r&&(s=o.substr(0,o.indexOf(r)),s.length>0&&h(t).unusedInput.push(s),o=o.slice(o.indexOf(r)+r.length),c+=r.length),$r[a]?(r?h(t).empty=!1:h(t).unusedTokens.push(a),G(a,r,t)):t._strict&&!r&&h(t).unusedTokens.push(a);h(t).charsLeftOver=u-c,o.length>0&&h(t).unusedInput.push(o),h(t).bigHour===!0&&t._a[oi]<=12&&t._a[oi]>0&&(h(t).bigHour=void 0),t._a[oi]=we(t._locale,t._a[oi],t._meridiem),_e(t),Q(t)}function we(t,e,n){var r;return null==n?e:null!=t.meridiemHour?t.meridiemHour(e,n):null!=t.isPM?(r=t.isPM(n),r&&12>e&&(e+=12),r||12!==e||(e=0),e):e}function ke(t){var e,n,r,i,a;if(0===t._f.length)return h(t).invalidFormat=!0,void(t._d=new Date(0/0));for(i=0;i<t._f.length;i++)a=0,e=p({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._f=t._f[i],xe(e),d(e)&&(a+=h(e).charsLeftOver,a+=10*h(e).unusedTokens.length,h(e).score=a,(null==r||r>a)&&(r=a,n=e));u(t,n||e)}function Ae(t){if(!t._d){var e=C(t._i);t._a=[e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],_e(t)}}function Ee(t){var e,n=t._i,r=t._f;return t._locale=t._locale||E(t._l),null===n||void 0===r&&""===n?f({nullInput:!0}):("string"==typeof n&&(t._i=n=t._locale.preparse(n)),g(n)?new y(Q(n)):(i(r)?ke(t):r?xe(t):a(n)?t._d=n:De(t),e=new y(Q(t)),e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e))}function De(t){var e=t._i;void 0===e?t._d=new Date:a(e)?t._d=new Date(+e):"string"==typeof e?re(t):i(e)?(t._a=s(e.slice(0),function(t){return parseInt(t,10)}),_e(t)):"object"==typeof e?Ae(t):"number"==typeof e?t._d=new Date(e):n.createFromInputFallback(t)}function Te(t,e,n,r,i){var a={};return"boolean"==typeof n&&(r=n,n=void 0),a._isAMomentObject=!0,a._useUTC=a._isUTC=i,a._l=n,a._i=t,a._f=e,a._strict=r,Ee(a)}function Ce(t,e,n,r){return Te(t,e,n,r,!1)}function Fe(t,e){var n,r;if(1===e.length&&i(e[0])&&(e=e[0]),!e.length)return Ce();for(n=e[0],r=1;r<e.length;++r)e[r][t](n)&&(n=e[r]);return n}function Se(){var t=[].slice.call(arguments,0);return Fe("isBefore",t)}function Be(){var t=[].slice.call(arguments,0);return Fe("isAfter",t)}function Oe(t){var e=C(t),n=e.year||0,r=e.quarter||0,i=e.month||0,a=e.week||0,s=e.day||0,o=e.hour||0,u=e.minute||0,c=e.second||0,l=e.millisecond||0;this._milliseconds=+l+1e3*c+6e4*u+36e5*o,this._days=+s+7*a,this._months=+i+3*r+12*n,this._data={},this._locale=E(),this._bubble()}function Me(t){return t instanceof Oe}function Ie(t,e){I(t,0,0,function(){var t=this.utcOffset(),n="+";return 0>t&&(t=-t,n="-"),n+M(~~(t/60),2)+e+M(~~t%60,2)})}function Le(t){var e=(t||"").match(Jr)||[],n=e[e.length-1]||[],r=(n+"").match(wi)||["-",0,0],i=+(60*r[1])+m(r[2]);return"+"===r[0]?i:-i}function Pe(t,e){var r,i;return e._isUTC?(r=e.clone(),i=(g(t)||a(t)?+t:+Ce(t))-+r,r._d.setTime(+r._d+i),n.updateOffset(r,!1),r):Ce(t).local()}function Ne(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function Re(t,e){var r,i=this._offset||0;return null!=t?("string"==typeof t&&(t=Le(t)),Math.abs(t)<16&&(t=60*t),!this._isUTC&&e&&(r=Ne(this)),this._offset=t,this._isUTC=!0,null!=r&&this.add(r,"m"),i!==t&&(!e||this._changeInProgress?tn(this,Ze(t-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,n.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?i:Ne(this)}function Ye(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}function je(t){return this.utcOffset(0,t)}function $e(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(Ne(this),"m")),this}function Ue(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(Le(this._i)),this}function We(t){return t=t?Ce(t).utcOffset():0,(this.utcOffset()-t)%60===0}function Ge(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Ve(){if(this._a){var t=this._isUTC?c(this._a):Ce(this._a);return this.isValid()&&v(this._a,t.toArray())>0}return!1}function He(){return!this._isUTC}function ze(){return this._isUTC}function qe(){return this._isUTC&&0===this._offset}function Ze(t,e){var n,r,i,a=t,s=null;return Me(t)?a={ms:t._milliseconds,d:t._days,M:t._months}:"number"==typeof t?(a={},e?a[e]=t:a.milliseconds=t):(s=ki.exec(t))?(n="-"===s[1]?-1:1,a={y:0,d:m(s[si])*n,h:m(s[oi])*n,m:m(s[ui])*n,s:m(s[ci])*n,ms:m(s[li])*n}):(s=Ai.exec(t))?(n="-"===s[1]?-1:1,a={y:Ke(s[2],n),M:Ke(s[3],n),d:Ke(s[4],n),h:Ke(s[5],n),m:Ke(s[6],n),s:Ke(s[7],n),w:Ke(s[8],n)}):null==a?a={}:"object"==typeof a&&("from"in a||"to"in a)&&(i=Qe(Ce(a.from),Ce(a.to)),a={},a.ms=i.milliseconds,a.M=i.months),r=new Oe(a),Me(t)&&o(t,"_locale")&&(r._locale=t._locale),r}function Ke(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function Xe(t,e){var n={milliseconds:0,months:0};return n.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function Qe(t,e){var n;return e=Pe(e,t),t.isBefore(e)?n=Xe(t,e):(n=Xe(e,t),n.milliseconds=-n.milliseconds,n.months=-n.months),n}function Je(t,e){return function(n,r){var i,a;return null===r||isNaN(+r)||(ee(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period)."),a=n,n=r,r=a),n="string"==typeof n?+n:n,i=Ze(n,r),tn(this,i,t),this}}function tn(t,e,r,i){var a=e._milliseconds,s=e._days,o=e._months;i=null==i?!0:i,a&&t._d.setTime(+t._d+a*r),s&&B(t,"Date",S(t,"Date")+s*r),o&&Z(t,S(t,"Month")+o*r),i&&n.updateOffset(t,s||o)}function en(t){var e=t||Ce(),n=Pe(e,this).startOf("day"),r=this.diff(n,"days",!0),i=-6>r?"sameElse":-1>r?"lastWeek":0>r?"lastDay":1>r?"sameDay":2>r?"nextDay":7>r?"nextWeek":"sameElse";return this.format(this.localeData().calendar(i,this,Ce(e)))}function nn(){return new y(this)}function rn(t,e){var n;return e=T("undefined"!=typeof e?e:"millisecond"),"millisecond"===e?(t=g(t)?t:Ce(t),+this>+t):(n=g(t)?+t:+Ce(t),n<+this.clone().startOf(e))}function an(t,e){var n;return e=T("undefined"!=typeof e?e:"millisecond"),"millisecond"===e?(t=g(t)?t:Ce(t),+t>+this):(n=g(t)?+t:+Ce(t),+this.clone().endOf(e)<n)}function sn(t,e,n){return this.isAfter(t,n)&&this.isBefore(e,n)}function on(t,e){var n;return e=T(e||"millisecond"),"millisecond"===e?(t=g(t)?t:Ce(t),+this===+t):(n=+Ce(t),+this.clone().startOf(e)<=n&&n<=+this.clone().endOf(e))}function un(t){return 0>t?Math.ceil(t):Math.floor(t)}function cn(t,e,n){var r,i,a=Pe(t,this),s=6e4*(a.utcOffset()-this.utcOffset());return e=T(e),"year"===e||"month"===e||"quarter"===e?(i=ln(this,a),"quarter"===e?i/=3:"year"===e&&(i/=12)):(r=this-a,i="second"===e?r/1e3:"minute"===e?r/6e4:"hour"===e?r/36e5:"day"===e?(r-s)/864e5:"week"===e?(r-s)/6048e5:r),n?i:un(i)}function ln(t,e){var n,r,i=12*(e.year()-t.year())+(e.month()-t.month()),a=t.clone().add(i,"months");return 0>e-a?(n=t.clone().add(i-1,"months"),r=(e-a)/(a-n)):(n=t.clone().add(i+1,"months"),r=(e-a)/(n-a)),-(i+r)}function hn(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function dn(){var t=this.clone().utc();return 0<t.year()&&t.year()<=9999?"function"==typeof Date.prototype.toISOString?this.toDate().toISOString():N(t,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):N(t,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")}function fn(t){var e=N(this,t||n.defaultFormat);return this.localeData().postformat(e)}function pn(t,e){return this.isValid()?Ze({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function yn(t){return this.from(Ce(),t)}function gn(t,e){return this.isValid()?Ze({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function mn(t){return this.to(Ce(),t)}function vn(t){var e;return void 0===t?this._locale._abbr:(e=E(t),null!=e&&(this._locale=e),this)}function _n(){return this._locale}function bn(t){switch(t=T(t)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===t&&this.weekday(0),"isoWeek"===t&&this.isoWeekday(1),"quarter"===t&&this.month(3*Math.floor(this.month()/3)),this}function xn(t){return t=T(t),void 0===t||"millisecond"===t?this:this.startOf(t).add(1,"isoWeek"===t?"week":t).subtract(1,"ms")}function wn(){return+this._d-6e4*(this._offset||0)}function kn(){return Math.floor(+this/1e3)}function An(){return this._offset?new Date(+this):this._d}function En(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]}function Dn(){return d(this)}function Tn(){return u({},h(this))}function Cn(){return h(this).overflow}function Fn(t,e){I(0,[t,t.length],0,e)}function Sn(t,e,n){return ce(Ce([t,11,31+e-n]),e,n).week}function Bn(t){var e=ce(this,this.localeData()._week.dow,this.localeData()._week.doy).year;return null==t?e:this.add(t-e,"y")}function On(t){var e=ce(this,1,4).year;return null==t?e:this.add(t-e,"y")}function Mn(){return Sn(this.year(),1,4)}function In(){var t=this.localeData()._week;return Sn(this.year(),t.dow,t.doy)}function Ln(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)}function Pn(t,e){if("string"==typeof t)if(isNaN(t)){if(t=e.weekdaysParse(t),"number"!=typeof t)return null}else t=parseInt(t,10);return t}function Nn(t){return this._weekdays[t.day()]}function Rn(t){return this._weekdaysShort[t.day()]}function Yn(t){return this._weekdaysMin[t.day()]}function jn(t){var e,n,r;for(this._weekdaysParse||(this._weekdaysParse=[]),e=0;7>e;e++)if(this._weekdaysParse[e]||(n=Ce([2e3,1]).day(e),r="^"+this.weekdays(n,"")+"|^"+this.weekdaysShort(n,"")+"|^"+this.weekdaysMin(n,""),this._weekdaysParse[e]=new RegExp(r.replace(".",""),"i")),this._weekdaysParse[e].test(t))return e}function $n(t){var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=Pn(t,this.localeData()),this.add(t-e,"d")):e}function Un(t){var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")}function Wn(t){return null==t?this.day()||7:this.day(this.day()%7?t:t-7)}function Gn(t,e){I(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function Vn(t,e){return e._meridiemParse}function Hn(t){return"p"===(t+"").toLowerCase().charAt(0)}function zn(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"}function qn(t){I(0,[t,3],0,"millisecond")}function Zn(){return this._isUTC?"UTC":""}function Kn(){return this._isUTC?"Coordinated Universal Time":""}function Xn(t){return Ce(1e3*t)}function Qn(){return Ce.apply(null,arguments).parseZone()}function Jn(t,e,n){var r=this._calendar[t];return"function"==typeof r?r.call(e,n):r}function tr(t){var e=this._longDateFormat[t];return!e&&this._longDateFormat[t.toUpperCase()]&&(e=this._longDateFormat[t.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(t){return t.slice(1)}),this._longDateFormat[t]=e),e}function er(){return this._invalidDate}function nr(t){return this._ordinal.replace("%d",t)}function rr(t){return t}function ir(t,e,n,r){var i=this._relativeTime[n];return"function"==typeof i?i(t,e,n,r):i.replace(/%d/i,t)}function ar(t,e){var n=this._relativeTime[t>0?"future":"past"];return"function"==typeof n?n(e):n.replace(/%s/i,e)}function sr(t){var e,n;for(n in t)e=t[n],"function"==typeof e?this[n]=e:this["_"+n]=e;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function or(t,e,n,r){var i=E(),a=c().set(r,e);return i[n](a,t)}function ur(t,e,n,r,i){if("number"==typeof t&&(e=t,t=void 0),t=t||"",null!=e)return or(t,e,n,i);var a,s=[];for(a=0;r>a;a++)s[a]=or(t,a,n,i);return s}function cr(t,e){return ur(t,e,"months",12,"month")}function lr(t,e){return ur(t,e,"monthsShort",12,"month")}function hr(t,e){return ur(t,e,"weekdays",7,"day")}function dr(t,e){return ur(t,e,"weekdaysShort",7,"day")}function fr(t,e){return ur(t,e,"weekdaysMin",7,"day")}function pr(){var t=this._data;return this._milliseconds=Hi(this._milliseconds),this._days=Hi(this._days),this._months=Hi(this._months),t.milliseconds=Hi(t.milliseconds),t.seconds=Hi(t.seconds),t.minutes=Hi(t.minutes),t.hours=Hi(t.hours),t.months=Hi(t.months),t.years=Hi(t.years),this}function yr(t,e,n,r){var i=Ze(e,n);return t._milliseconds+=r*i._milliseconds,t._days+=r*i._days,t._months+=r*i._months,t._bubble()}function gr(t,e){return yr(this,t,e,1)}function mr(t,e){return yr(this,t,e,-1)}function vr(){var t,e,n,r=this._milliseconds,i=this._days,a=this._months,s=this._data,o=0;return s.milliseconds=r%1e3,t=un(r/1e3),s.seconds=t%60,e=un(t/60),s.minutes=e%60,n=un(e/60),s.hours=n%24,i+=un(n/24),o=un(_r(i)),i-=un(br(o)),a+=un(i/30),i%=30,o+=un(a/12),a%=12,s.days=i,s.months=a,s.years=o,this}function _r(t){return 400*t/146097}function br(t){return 146097*t/400}function xr(t){var e,n,r=this._milliseconds;if(t=T(t),"month"===t||"year"===t)return e=this._days+r/864e5,n=this._months+12*_r(e),"month"===t?n:n/12;switch(e=this._days+Math.round(br(this._months/12)),t){case"week":return e/7+r/6048e5;case"day":return e+r/864e5;case"hour":return 24*e+r/36e5;case"minute":return 1440*e+r/6e4;case"second":return 86400*e+r/1e3;case"millisecond":return Math.floor(864e5*e)+r;default:throw new Error("Unknown unit "+t)}}function wr(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*m(this._months/12)}function kr(t){return function(){return this.as(t)}}function Ar(t){return t=T(t),this[t+"s"]()}function Er(t){return function(){return this._data[t]}}function Dr(){return un(this.days()/7)}function Tr(t,e,n,r,i){return i.relativeTime(e||1,!!n,t,r)}function Cr(t,e,n){var r=Ze(t).abs(),i=ua(r.as("s")),a=ua(r.as("m")),s=ua(r.as("h")),o=ua(r.as("d")),u=ua(r.as("M")),c=ua(r.as("y")),l=i<ca.s&&["s",i]||1===a&&["m"]||a<ca.m&&["mm",a]||1===s&&["h"]||s<ca.h&&["hh",s]||1===o&&["d"]||o<ca.d&&["dd",o]||1===u&&["M"]||u<ca.M&&["MM",u]||1===c&&["y"]||["yy",c];return l[2]=e,l[3]=+t>0,l[4]=n,Tr.apply(null,l)}function Fr(t,e){return void 0===ca[t]?!1:void 0===e?ca[t]:(ca[t]=e,!0)}function Sr(t){var e=this.localeData(),n=Cr(this,!t,e);return t&&(n=e.pastFuture(+this,n)),e.postformat(n)}function Br(){var t=la(this.years()),e=la(this.months()),n=la(this.days()),r=la(this.hours()),i=la(this.minutes()),a=la(this.seconds()+this.milliseconds()/1e3),s=this.asSeconds();return s?(0>s?"-":"")+"P"+(t?t+"Y":"")+(e?e+"M":"")+(n?n+"D":"")+(r||i||a?"T":"")+(r?r+"H":"")+(i?i+"M":"")+(a?a+"S":""):"P0D"}var Or,Mr,Ir=n.momentProperties=[],Lr=!1,Pr={},Nr={},Rr=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,4}|x|X|zz?|ZZ?|.)/g,Yr=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,jr={},$r={},Ur=/\d/,Wr=/\d\d/,Gr=/\d{3}/,Vr=/\d{4}/,Hr=/[+-]?\d{6}/,zr=/\d\d?/,qr=/\d{1,3}/,Zr=/\d{1,4}/,Kr=/[+-]?\d{1,6}/,Xr=/\d+/,Qr=/[+-]?\d+/,Jr=/Z|[+-]\d\d:?\d\d/gi,ti=/[+-]?\d+(\.\d{1,3})?/,ei=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,ni={},ri={},ii=0,ai=1,si=2,oi=3,ui=4,ci=5,li=6;I("M",["MM",2],"Mo",function(){return this.month()+1}),I("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)}),I("MMMM",0,0,function(t){return this.localeData().months(this,t)}),D("month","M"),Y("M",zr),Y("MM",zr,Wr),Y("MMM",ei),Y("MMMM",ei),U(["M","MM"],function(t,e){e[ai]=m(t)-1}),U(["MMM","MMMM"],function(t,e,n,r){var i=n._locale.monthsParse(t,r,n._strict);null!=i?e[ai]=i:h(n).invalidMonth=t});var hi="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),di="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),fi={};n.suppressDeprecationWarnings=!1;var pi=/^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,yi=[["YYYYYY-MM-DD",/[+-]\d{6}-\d{2}-\d{2}/],["YYYY-MM-DD",/\d{4}-\d{2}-\d{2}/],["GGGG-[W]WW-E",/\d{4}-W\d{2}-\d/],["GGGG-[W]WW",/\d{4}-W\d{2}/],["YYYY-DDD",/\d{4}-\d{3}/]],gi=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],mi=/^\/?Date\((\-?\d+)/i;n.createFromInputFallback=te("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))}),I(0,["YY",2],0,function(){return this.year()%100}),I(0,["YYYY",4],0,"year"),I(0,["YYYYY",5],0,"year"),I(0,["YYYYYY",6,!0],0,"year"),D("year","y"),Y("Y",Qr),Y("YY",zr,Wr),Y("YYYY",Zr,Vr),Y("YYYYY",Kr,Hr),Y("YYYYYY",Kr,Hr),U(["YYYY","YYYYY","YYYYYY"],ii),U("YY",function(t,e){e[ii]=n.parseTwoDigitYear(t)}),n.parseTwoDigitYear=function(t){return m(t)+(m(t)>68?1900:2e3)};var vi=F("FullYear",!1);I("w",["ww",2],"wo","week"),I("W",["WW",2],"Wo","isoWeek"),D("week","w"),D("isoWeek","W"),Y("w",zr),Y("ww",zr,Wr),Y("W",zr),Y("WW",zr,Wr),W(["w","ww","W","WW"],function(t,e,n,r){e[r.substr(0,1)]=m(t)});var _i={dow:0,doy:6};I("DDD",["DDDD",3],"DDDo","dayOfYear"),D("dayOfYear","DDD"),Y("DDD",qr),Y("DDDD",Gr),U(["DDD","DDDD"],function(t,e,n){n._dayOfYear=m(t)}),n.ISO_8601=function(){};var bi=te("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(){var t=Ce.apply(null,arguments);return this>t?this:t}),xi=te("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(){var t=Ce.apply(null,arguments);return t>this?this:t});Ie("Z",":"),Ie("ZZ",""),Y("Z",Jr),Y("ZZ",Jr),U(["Z","ZZ"],function(t,e,n){n._useUTC=!0,n._tzm=Le(t)});var wi=/([\+\-]|\d\d)/gi;n.updateOffset=function(){};var ki=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,Ai=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/;Ze.fn=Oe.prototype;var Ei=Je(1,"add"),Di=Je(-1,"subtract");n.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";var Ti=te("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return void 0===t?this.localeData():this.locale(t)});I(0,["gg",2],0,function(){return this.weekYear()%100}),I(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Fn("gggg","weekYear"),Fn("ggggg","weekYear"),Fn("GGGG","isoWeekYear"),Fn("GGGGG","isoWeekYear"),D("weekYear","gg"),D("isoWeekYear","GG"),Y("G",Qr),Y("g",Qr),Y("GG",zr,Wr),Y("gg",zr,Wr),Y("GGGG",Zr,Vr),Y("gggg",Zr,Vr),Y("GGGGG",Kr,Hr),Y("ggggg",Kr,Hr),W(["gggg","ggggg","GGGG","GGGGG"],function(t,e,n,r){e[r.substr(0,2)]=m(t)}),W(["gg","GG"],function(t,e,r,i){e[i]=n.parseTwoDigitYear(t)}),I("Q",0,0,"quarter"),D("quarter","Q"),Y("Q",Ur),U("Q",function(t,e){e[ai]=3*(m(t)-1)}),I("D",["DD",2],"Do","date"),D("date","D"),Y("D",zr),Y("DD",zr,Wr),Y("Do",function(t,e){return t?e._ordinalParse:e._ordinalParseLenient}),U(["D","DD"],si),U("Do",function(t,e){e[si]=m(t.match(zr)[0],10)});var Ci=F("Date",!0);I("d",0,"do","day"),I("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),I("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),I("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),I("e",0,0,"weekday"),I("E",0,0,"isoWeekday"),D("day","d"),D("weekday","e"),D("isoWeekday","E"),Y("d",zr),Y("e",zr),Y("E",zr),Y("dd",ei),Y("ddd",ei),Y("dddd",ei),W(["dd","ddd","dddd"],function(t,e,n){var r=n._locale.weekdaysParse(t);null!=r?e.d=r:h(n).invalidWeekday=t}),W(["d","e","E"],function(t,e,n,r){e[r]=m(t)});var Fi="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Si="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Bi="Su_Mo_Tu_We_Th_Fr_Sa".split("_");I("H",["HH",2],0,"hour"),I("h",["hh",2],0,function(){return this.hours()%12||12}),Gn("a",!0),Gn("A",!1),D("hour","h"),Y("a",Vn),Y("A",Vn),Y("H",zr),Y("h",zr),Y("HH",zr,Wr),Y("hh",zr,Wr),U(["H","HH"],oi),U(["a","A"],function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t}),U(["h","hh"],function(t,e,n){e[oi]=m(t),h(n).bigHour=!0});var Oi=/[ap]\.?m?\.?/i,Mi=F("Hours",!0);I("m",["mm",2],0,"minute"),D("minute","m"),Y("m",zr),Y("mm",zr,Wr),U(["m","mm"],ui);var Ii=F("Minutes",!1);I("s",["ss",2],0,"second"),D("second","s"),Y("s",zr),Y("ss",zr,Wr),U(["s","ss"],ci);var Li=F("Seconds",!1);I("S",0,0,function(){return~~(this.millisecond()/100)}),I(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),qn("SSS"),qn("SSSS"),D("millisecond","ms"),Y("S",qr,Ur),Y("SS",qr,Wr),Y("SSS",qr,Gr),Y("SSSS",Xr),U(["S","SS","SSS","SSSS"],function(t,e){e[li]=m(1e3*("0."+t))});var Pi=F("Milliseconds",!1);I("z",0,0,"zoneAbbr"),I("zz",0,0,"zoneName");var Ni=y.prototype;Ni.add=Ei,Ni.calendar=en,Ni.clone=nn,Ni.diff=cn,Ni.endOf=xn,Ni.format=fn,Ni.from=pn,Ni.fromNow=yn,Ni.to=gn,Ni.toNow=mn,Ni.get=O,Ni.invalidAt=Cn,Ni.isAfter=rn,Ni.isBefore=an,Ni.isBetween=sn,Ni.isSame=on,Ni.isValid=Dn,Ni.lang=Ti,Ni.locale=vn,Ni.localeData=_n,Ni.max=xi,Ni.min=bi,Ni.parsingFlags=Tn,Ni.set=O,Ni.startOf=bn,Ni.subtract=Di,Ni.toArray=En,Ni.toDate=An,Ni.toISOString=dn,Ni.toJSON=dn,Ni.toString=hn,Ni.unix=kn,Ni.valueOf=wn,Ni.year=vi,Ni.isLeapYear=ue,Ni.weekYear=Bn,Ni.isoWeekYear=On,Ni.quarter=Ni.quarters=Ln,Ni.month=K,Ni.daysInMonth=X,Ni.week=Ni.weeks=fe,Ni.isoWeek=Ni.isoWeeks=pe,Ni.weeksInYear=In,Ni.isoWeeksInYear=Mn,Ni.date=Ci,Ni.day=Ni.days=$n,Ni.weekday=Un,Ni.isoWeekday=Wn,Ni.dayOfYear=ge,Ni.hour=Ni.hours=Mi,Ni.minute=Ni.minutes=Ii,Ni.second=Ni.seconds=Li,Ni.millisecond=Ni.milliseconds=Pi,Ni.utcOffset=Re,Ni.utc=je,Ni.local=$e,Ni.parseZone=Ue,Ni.hasAlignedHourOffset=We,Ni.isDST=Ge,Ni.isDSTShifted=Ve,Ni.isLocal=He,Ni.isUtcOffset=ze,Ni.isUtc=qe,Ni.isUTC=qe,Ni.zoneAbbr=Zn,Ni.zoneName=Kn,Ni.dates=te("dates accessor is deprecated. Use date instead.",Ci),Ni.months=te("months accessor is deprecated. Use month instead",K),Ni.years=te("years accessor is deprecated. Use year instead",vi),Ni.zone=te("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",Ye);var Ri=Ni,Yi={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},ji={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY LT",LLLL:"dddd, MMMM D, YYYY LT"},$i="Invalid date",Ui="%d",Wi=/\d{1,2}/,Gi={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},Vi=_.prototype;Vi._calendar=Yi,Vi.calendar=Jn,Vi._longDateFormat=ji,Vi.longDateFormat=tr,Vi._invalidDate=$i,Vi.invalidDate=er,Vi._ordinal=Ui,Vi.ordinal=nr,Vi._ordinalParse=Wi,Vi.preparse=rr,Vi.postformat=rr,Vi._relativeTime=Gi,Vi.relativeTime=ir,Vi.pastFuture=ar,Vi.set=sr,Vi.months=H,Vi._months=hi,Vi.monthsShort=z,Vi._monthsShort=di,Vi.monthsParse=q,Vi.week=le,Vi._week=_i,Vi.firstDayOfYear=de,Vi.firstDayOfWeek=he,Vi.weekdays=Nn,Vi._weekdays=Fi,Vi.weekdaysMin=Yn,Vi._weekdaysMin=Bi,Vi.weekdaysShort=Rn,Vi._weekdaysShort=Si,Vi.weekdaysParse=jn,Vi.isPM=Hn,Vi._meridiemParse=Oi,Vi.meridiem=zn,k("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,n=1===m(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th";return t+n}}),n.lang=te("moment.lang is deprecated. Use moment.locale instead.",k),n.langData=te("moment.langData is deprecated. Use moment.localeData instead.",E);var Hi=Math.abs,zi=kr("ms"),qi=kr("s"),Zi=kr("m"),Ki=kr("h"),Xi=kr("d"),Qi=kr("w"),Ji=kr("M"),ta=kr("y"),ea=Er("milliseconds"),na=Er("seconds"),ra=Er("minutes"),ia=Er("hours"),aa=Er("days"),sa=Er("months"),oa=Er("years"),ua=Math.round,ca={s:45,m:45,h:22,d:26,M:11},la=Math.abs,ha=Oe.prototype;ha.abs=pr,ha.add=gr,ha.subtract=mr,ha.as=xr,ha.asMilliseconds=zi,ha.asSeconds=qi,ha.asMinutes=Zi,ha.asHours=Ki,ha.asDays=Xi,ha.asWeeks=Qi,ha.asMonths=Ji,ha.asYears=ta,ha.valueOf=wr,ha._bubble=vr,ha.get=Ar,ha.milliseconds=ea,ha.seconds=na,ha.minutes=ra,ha.hours=ia,ha.days=aa,ha.weeks=Dr,ha.months=sa,ha.years=oa,ha.humanize=Sr,ha.toISOString=Br,ha.toString=Br,ha.toJSON=Br,ha.locale=vn,ha.localeData=_n,ha.toIsoString=te("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Br),ha.lang=Ti,I("X",0,0,"unix"),I("x",0,0,"valueOf"),Y("x",Qr),Y("X",ti),U("X",function(t,e,n){n._d=new Date(1e3*parseFloat(t,10))}),U("x",function(t,e,n){n._d=new Date(m(t))}),n.version="2.10.3",r(Ce),n.fn=Ri,n.min=Se,n.max=Be,n.utc=c,n.unix=Xn,n.months=cr,n.isDate=a,n.locale=k,n.invalid=f,n.duration=Ze,n.isMoment=g,n.weekdays=hr,n.parseZone=Qn,n.localeData=E,n.isDuration=Me,n.monthsShort=lr,n.weekdaysMin=fr,n.defineLocale=A,n.weekdaysShort=dr,n.normalizeUnits=T,n.relativeTimeThreshold=Fr;var da=n;return da})},{}],84:[function(t,e){e.exports={name:"mermaid",version:"0.5.1",description:"Markdownish syntax for generating flowcharts, sequence diagrams and gantt charts.",main:"src/mermaid.js",keywords:["diagram","markdown","flowchart","sequence diagram","gantt"],bin:{mermaid:"./bin/mermaid.js"},scripts:{test:"gulp test"},repository:{type:"git",url:"https://github.com/knsv/mermaid"},author:"Knut Sveidqvist",license:"MIT",dependencies:{chalk:"^0.5.1",d3:"~3.4.13","dagre-d3":"~0.4.8",he:"^0.5.0",minimist:"^1.1.0",mkdirp:"^0.5.0",moment:"^2.9.0",semver:"^4.1.1",which:"^1.0.8"},devDependencies:{async:"^0.9.0",browserify:"~6.2.0",clone:"^0.2.0","codeclimate-test-reporter":"0.0.4","connect-livereload":"^0.5.3",d3:"~3.4.13",dateformat:"^1.0.11","event-stream":"^3.2.0",express:"^4.12.4",foundation:"^4.2.1-1","front-matter":"^0.2.0",gulp:"~3.8.9","gulp-browserify":"^0.5.0","gulp-bump":"^0.1.11","gulp-concat":"~2.4.1","gulp-data":"^1.1.1","gulp-ext-replace":"~0.1.0","gulp-filelog":"^0.4.1","gulp-hogan":"^1.1.0","gulp-if":"^1.2.5","gulp-insert":"^0.4.0","gulp-istanbul":"^0.4.0","gulp-jasmine":"~1.0.1","gulp-jison":"~1.2.0","gulp-jshint":"^1.9.0","gulp-less":"^3.0.1","gulp-livereload":"^3.8.0","gulp-rename":"~1.2.0","gulp-shell":"^0.2.10","gulp-tag-version":"^1.2.1","gulp-uglify":"~1.0.1",he:"^0.5.0","hogan.js":"^3.0.2",jasmine:"~2.0.1",jison:"~0.4.15","jshint-stylish":"^1.0.0",karma:"~0.12.20","karma-chrome-launcher":"~0.1.5","karma-jasmine":"~0.2.1","karma-requirejs":"~0.2.2",lodash:"^2.4.1","lodash._escapestringchar":"^2.4.1","lodash._objecttypes":"^2.4.1","lodash._reinterpolate":"^2.4.1","lodash._reunescapedhtml":"^2.4.1","lodash.defaults":"^2.4.1","lodash.templatesettings":"^2.4.1","lodash.values":"^2.4.1",marked:"^0.3.2","mock-browser":"^0.90.27",path:"^0.4.9",phantomjs:"^1.9.17",proxyquire:"^1.3.1","require-dir":"^0.3.0",rewire:"^2.1.3",rimraf:"^2.2.8",tape:"^3.0.3","tiny-lr":"^0.1.6","vinyl-source-stream":"^1.1.0",watchify:"^3.2.2"}}},{}],85:[function(t,e){var n;if(t)try{n=t("d3")}catch(r){}n||(n=window.d3),e.exports=n,function(){var t=!1;if(t="tspans",n.selection.prototype.textwrap)return!1;if("undefined"==typeof t)var t=!1;n.selection.prototype.textwrap=n.selection.enter.prototype.textwrap=function(e,r){var i,r=parseInt(r)||0,a=this,s=function(t){var e=t[0][0],r=e.tagName.toString();if("rect"!==r)return!1;var i={};return i.x=n.select(e).attr("x")||0,i.y=n.select(e).attr("y")||0,i.width=n.select(e).attr("width")||0,i.height=n.select(e).attr("height")||0,i.attr=t.attr,i
|
||
},o=function(t){if(t.attr||(t.attr=function(t){return this[t]?this[t]:void 0}),"object"==typeof t&&"undefined"!=typeof t.x&&"undefined"!=typeof t.y&&"undefined"!=typeof t.width&&"undefined"!=typeof t.height)return t;if("function"==typeof Array.isArray&&Array.isArray(t)||"[object Array]"===Object.prototype.toString.call(t)){var e=s(t);return e}return!1},u=function(t,e){var n=t;return 0!==e&&(n.x=parseInt(n.x)+e,n.y=parseInt(n.y)+e,n.width-=2*e,n.height-=2*e),n},c=o(e);if(r&&(c=u(c,r)),0!=a.length&&n&&e&&c){e=c;var l,h=function(t){var r=n.select(t[0].parentNode),a=r.select("text"),s=a.style("line-height"),o=a.text();a.remove();var u=r.append("foreignObject");u.attr("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility").attr("x",e.x).attr("y",e.y).attr("width",e.width).attr("height",e.height);var c=u.append("xhtml:div").attr("class","wrapped");c.style("height",e.height).style("width",e.width).html(o),s&&c.style("line-height",s),i=r.select("foreignObject")},d=function(t){var a,s=t[0],o=s.parentNode,u=n.select(s),c=s.getBBox().height,l=s.getBBox().width,h=c,d=u.style("line-height");if(a=d&&parseInt(d)?parseInt(d.replace("px","")):h,l>e.width){var f=u.text();if(u.text(""),f){var p,y;if(-1!==f.indexOf(" ")){var p=" ";y=f.split(" ")}else{p="";var g=f.length,m=Math.ceil(l/e.width),v=Math.floor(g/m);v*m>=g||m++;for(var _,b,y=[],x=0;m>x;x++)b=x*v,_=f.substr(b,v),y.push(_)}for(var w=[],k=0,A={},x=0;x<y.length;x++){var E,D=y[x],T=u.text(),C=s.getComputedTextLength();E=T?T+p+D:D,u.text(E);var F=s.getComputedTextLength();if(F>e.width)T&&""!==T&&(k+=C,A={string:T,width:C,offset:k},w.push(A),u.text(""),u.text(D));else if(x==y.length-1){u.text("");var S=E;S&&""!==S&&(F-k>0&&(F-=k),A={string:S,width:F,offset:k},w.push(A))}}u.attr("y",function(){var t=e.y;return a&&(t+=a),t}),r&&u.attr("x",e.x);var B;u.text("");for(var x=0;x<w.length;x++){var _=w[x].string;if(x>0){w[x-1]}x*a<e.height-1.5*a&&(B=u.append("tspan").text(_),B.attr("dy",function(){return x>0?a:void 0}),B.attr("x",function(){return e.x}))}}}i=n.select(o).selectAll("text")};t&&("foreignobjects"==t?l=h:"tspans"==t&&(l=d)),t||(l="undefined"!=typeof SVGForeignObjectElement?h:d);for(var f=0;f<a.length;f++){var p=a[f];l(p)}return i}return a?a:!1}}()},{d3:"tokjIE"}],86:[function(t,e,n){var r=(t("../../logger").create(),""),i=!1;n.setMessage=function(t){r=t},n.getMessage=function(){return r},n.setInfo=function(t){i=t},n.getInfo=function(){return i},n.parseError=function(t,e){mermaidAPI.parseError(t,e)}},{"../../logger":102}],87:[function(t,e,n){{var r=t("./exampleDb"),i=t("./parser/example.js"),a=t("../../d3");t("../../logger").create()}n.draw=function(t,e,n){var s;s=i.parser,s.yy=r,s.parse(t);var o=a.select("#"+e),u=o.append("g");u.append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size","32px").style("text-anchor","middle").text("mermaid "+n),o.attr("height",100),o.attr("width",400)}},{"../../d3":85,"../../logger":102,"./exampleDb":86,"./parser/example.js":88}],88:[function(t,e,n){(function(r){var i=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[6,9,10,12],r={trace:function(){},yy:{},symbols_:{error:2,start:3,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,message:11,say:12,TXT:13,$accept:0,$end:1},terminals_:{2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo",12:"say",13:"TXT"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1],[8,1],[11,2]],performAction:function(t,e,n,r,i,a){var s=a.length-1;switch(i){case 1:return r;case 4:break;case 6:r.setInfo(!0);break;case 7:r.setMessage(a[s]);break;case 8:this.$=a[s-1].substring(1).trim().replace(/\\n/gm,"\n")}},table:[{3:1,4:[1,2]},{1:[3]},e(n,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8],11:9,12:[1,10]},{1:[2,1]},e(n,[2,3]),e(n,[2,4]),e(n,[2,5]),e(n,[2,6]),e(n,[2,7]),{13:[1,11]},e(n,[2,8])],defaultActions:{4:[2,1]},parseError:function(t,e){if(!e.recoverable)throw new Error(t);this.trace(t)},parse:function(t){function e(){var t;return t=p.lex()||d,"number"!=typeof t&&(t=n.symbols_[t]||t),t}var n=this,r=[0],i=[null],a=[],s=this.table,o="",u=0,c=0,l=0,h=2,d=1,f=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,"undefined"==typeof p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;this.parseError="function"==typeof y.yy.parseError?y.yy.parseError:Object.getPrototypeOf(this).parseError;for(var _,b,x,w,k,A,E,D,T,C={};;){if(x=r[r.length-1],this.defaultActions[x]?w=this.defaultActions[x]:((null===_||"undefined"==typeof _)&&(_=e()),w=s[x]&&s[x][_]),"undefined"==typeof w||!w.length||!w[0]){var F="";T=[];for(A in s[x])this.terminals_[A]&&A>h&&T.push("'"+this.terminals_[A]+"'");F=p.showPosition?"Parse error on line "+(u+1)+":\n"+p.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(u+1)+": Unexpected "+(_==d?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(F,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:m,expected:T})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+_);switch(w[0]){case 1:r.push(_),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),_=null,b?(_=b,b=null):(c=p.yyleng,o=p.yytext,u=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[w[1]][1],C.$=i[i.length-E],C._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(C._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),k=this.performAction.apply(C,[o,c,u,y.yy,w[1],i,a].concat(f)),"undefined"!=typeof k)return k;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(C.$),a.push(C._$),D=s[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0}},i=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,e,n,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(t=this.test_match(n,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[r]),t!==!1?t:!1):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 9;case 1:return 10;case 2:return 4;case 3:return 12;case 4:return 13;case 5:return 6;case 6:return"INVALID"}},rules:[/^(?:[\n]+)/i,/^(?:showInfo\b)/i,/^(?:info\b)/i,/^(?:say\b)/i,/^(?::[^#\n;]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6],inclusive:!0}}};return t}();return r.lexer=i,t.prototype=r,r.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":81,fs:79,path:80}],89:[function(t,e){var n,r=t("../../logger").create();if(t)try{n=t("dagre-d3")}catch(i){r.debug("Could not load dagre-d3")}n||(n=window.dagreD3),e.exports=n},{"../../logger":102,"dagre-d3":1}],90:[function(t,e,n){var r=t("./graphDb"),i=t("./parser/flow"),a=t("./parser/dot"),s=t("../../d3"),o=t("./dagre-d3"),u=t("../../logger").create(),c={};e.exports.setConf=function(t){var e,n=Object.keys(t);for(e=0;e<n.length;e++)c[n[e]]=t[n[e]]},n.addVertices=function(t,e){var n=Object.keys(t),r=function(t,e){var n;for(n=0;n<e.length;n++)"undefined"!=typeof e[n]&&(t=t+e[n]+";");return t};n.forEach(function(n){var i,a=t[n],s="";a.classes.length>0&&(s=a.classes.join(" "));var o="";o=r(o,a.styles),i="undefined"==typeof a.text?a.id:a.text;var u="";c.htmlLabels?u="html":(i=i.replace(/<br>/g,"\n"),u="text");var l=0,h="";switch(a.type){case"round":l=5,h="rect";break;case"square":h="rect";break;case"diamond":h="question";break;case"odd":h="rect_left_inv_arrow";break;case"odd_right":h="rect_left_inv_arrow";break;case"circle":h="circle";break;default:h="rect"}e.setNode(a.id,{labelType:u,shape:h,label:i,rx:l,ry:l,"class":s,style:o,id:a.id})})},n.addEdges=function(t,e){var n,r,i=0;"undefined"!=typeof t.defaultStyle&&(r=t.defaultStyle.toString().replace(/,/g,";")),t.forEach(function(t){i++,n="arrow_open"===t.type?"none":"normal";var a="";if("undefined"!=typeof t.style)t.style.forEach(function(t){a=a+t+";"});else switch(t.stroke){case"normal":a="fill:none","undefined"!=typeof r&&(a=r);break;case"dotted":a="stroke: #333; fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":a="stroke: #333; stroke-width: 3.5px;fill:none"}if("undefined"==typeof t.text)"undefined"==typeof t.style?e.setEdge(t.start,t.end,{style:a,arrowhead:n},i):e.setEdge(t.start,t.end,{style:a,arrowheadStyle:"fill: #333",arrowhead:n},i);else{var s=t.text.replace(/<br>/g,"\n");"undefined"==typeof t.style?c.htmlLabels?e.setEdge(t.start,t.end,{labelType:"html",style:a,labelpos:"c",label:'<span style="background:#e8e8e8">'+t.text+"</span>",arrowheadStyle:"fill: #333",arrowhead:n},i):e.setEdge(t.start,t.end,{labelType:"text",style:"stroke: #333; stroke-width: 1.5px;fill:none",labelpos:"c",label:s,arrowheadStyle:"fill: #333",arrowhead:n},i):e.setEdge(t.start,t.end,{labelType:"text",style:a,arrowheadStyle:"fill: #333",label:s,arrowhead:n},i)}})},n.getClasses=function(t,e){var n;r.clear(),n=e?a.parser:i.parser,n.yy=r,n.parse(t);var s=r.getClasses();return"undefined"==typeof s.default&&(s.default={id:"default"},s.default.styles=["fill:#ffa","stroke:#666","stroke-width:3px"],s.default.clusterStyles=["rx:4px","fill: rgb(255, 255, 222)","rx: 4px","stroke: rgb(170, 170, 51)","stroke-width: 1px"],s.default.nodeLabelStyles=["fill:#000","stroke:none","font-weight:300",'font-family:"Helvetica Neue",Helvetica,Arial,sans-serf',"font-size:14px"],s.default.edgeLabelStyles=["fill:#000","stroke:none","font-weight:300",'font-family:"Helvetica Neue",Helvetica,Arial,sans-serf',"font-size:14px"]),s},n.draw=function(t,e,l){u.debug("Drawing flowchart");var h;r.clear(),h=l?a.parser:i.parser,h.yy=r;try{h.parse(t)}catch(d){}var f;f=r.getDirection(),"undefined"==typeof f&&(f="TD");var p,y=new o.graphlib.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:f,marginx:20,marginy:20}).setDefaultEdgeLabel(function(){return{}}),g=r.getSubGraphs(),m=0;for(m=g.length-1;m>=0;m--)p=g[m],r.addVertex(p.id,void 0,void 0,void 0);var v=r.getVertices(),_=r.getEdges();m=0;var b;for(m=g.length-1;m>=0;m--)for(p=g[m],s.selectAll("cluster").append("text"),b=0;b<p.nodes.length;b++)y.setParent(p.nodes[b],p.id);n.addVertices(v,y),n.addEdges(_,y);var x=new o.render;x.shapes().question=function(t,e,n){var r=e.width,i=e.height,a=.8*(r+i),s=[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}],u=t.insert("polygon",":first-child").attr("points",s.map(function(t){return t.x+","+t.y}).join(" ")).attr("rx",5).attr("ry",5).attr("transform","translate("+-a/2+","+2*a/4+")");return n.intersect=function(t){return o.intersect.polygon(n,s,t)},u},x.shapes().rect_left_inv_arrow=function(t,e,n){var r=e.width,i=e.height,a=[{x:-i/2,y:0},{x:r,y:0},{x:r,y:-i},{x:-i/2,y:-i},{x:0,y:-i/2}],s=t.insert("polygon",":first-child").attr("points",a.map(function(t){return t.x+","+t.y}).join(" ")).attr("transform","translate("+-r/2+","+2*i/4+")");return n.intersect=function(t){return o.intersect.polygon(n,a,t)},s},x.shapes().rect_right_inv_arrow=function(t,e,n){var r=e.width,i=e.height,a=[{x:0,y:0},{x:r+i/2,y:0},{x:r,y:-i/2},{x:r+i/2,y:-i},{x:0,y:-i}],s=t.insert("polygon",":first-child").attr("points",a.map(function(t){return t.x+","+t.y}).join(" ")).attr("transform","translate("+-r/2+","+2*i/4+")");return n.intersect=function(t){return o.intersect.polygon(n,a,t)},s},x.arrows().none=function(t,e,n,r){var i=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),a=i.append("path").attr("d","M 0 0 L 0 0 L 0 0 z");o.util.applyStyle(a,n[r+"Style"])};var w=s.select("#"+e);svgGroup=s.select("#"+e+" g"),x(s.select("#"+e+" g"),y);document.querySelector("#"+e);for(c.useMaxWidth?(w.attr("height","100%"),w.attr("width","100%"),w.attr("viewBox","0 0 "+(y.graph().width+20)+" "+(y.graph().height+20)),w.attr("style","max-width:"+(y.graph().width+20)+"px;")):(w.attr("height",y.graph().height),"undefined"==typeof c.width?w.attr("width",y.graph().width):w.attr("width",c.width),w.attr("viewBox","0 0 "+(y.graph().width+20)+" "+(y.graph().height+20))),r.indexNodes("sunGraph"+m),m=0;m<g.length;m++){{r.getDepthFirstPos(m)}if(p=g[m],"undefined"!==p.title){var k=document.querySelectorAll("#"+e+" #"+p.id+" rect"),A=document.querySelectorAll("#"+e+" #"+p.id),E=k[0].x.baseVal.value,D=k[0].y.baseVal.value,T=k[0].width.baseVal.value,C=s.select(A[0]),F=C.append("text");F.attr("x",E+T/2),F.attr("y",D+14),F.attr("fill","black"),F.attr("stroke","none"),F.attr("id",e+"Text"),F.style("text-anchor","middle"),F.text("undefined"==typeof p.title?"Undef":p.title)}}}},{"../../d3":85,"../../logger":102,"./dagre-d3":89,"./graphDb":91,"./parser/dot":92,"./parser/flow":93}],91:[function(require,module,exports){var log=require("../../logger").create(),vertices={},edges=[],classes=[],subGraphs=[],subCount=0,direction,funs=[];exports.addVertex=function(t,e,n,r){var i;"undefined"!=typeof t&&0!==t.trim().length&&("undefined"==typeof vertices[t]&&(vertices[t]={id:t,styles:[],classes:[]}),"undefined"!=typeof e&&(i=e.trim(),'"'===i[0]&&'"'===i[i.length-1]&&(i=i.substring(1,i.length-1)),vertices[t].text=i),"undefined"!=typeof n&&(vertices[t].type=n),"undefined"!=typeof n&&(vertices[t].type=n),"undefined"!=typeof r&&null!==r&&r.forEach(function(e){vertices[t].styles.push(e)}))},exports.addLink=function(t,e,n,r){var i={start:t,end:e,type:void 0,text:""};r=n.text,"undefined"!=typeof r&&(i.text=r.trim(),'"'===i.text[0]&&'"'===i.text[i.text.length-1]&&(i.text=i.text.substring(1,i.text.length-1))),"undefined"!=typeof n&&(i.type=n.type,i.stroke=n.stroke),edges.push(i)},exports.updateLink=function(t,e){t.substr(1);"default"===t?edges.defaultStyle=e:edges[t].style=e},exports.addClass=function(t,e){"undefined"==typeof classes[t]&&(classes[t]={id:t,styles:[]}),"undefined"!=typeof e&&null!==e&&e.forEach(function(e){classes[t].styles.push(e)})},exports.setDirection=function(t){direction=t},exports.setClass=function(t,e){t.indexOf(",")>0?t.split(",").forEach(function(t){"undefined"!=typeof vertices[t]&&vertices[t].classes.push(e)}):"undefined"!=typeof vertices[t]&&vertices[t].classes.push(e)};var clickEvents=[];exports.setClickEvent=function(id,functionName){id.indexOf(",")>0?id.split(",").forEach(function(id2){"undefined"!=typeof vertices[id2]&&funs.push(function(){var elem=document.getElementById(id2);null!==elem&&(elem.onclick=function(){eval(functionName+"('"+id2+"')")})})}):"undefined"!=typeof vertices[id]&&funs.push(function(){var elem=document.getElementById(id);null!==elem&&(elem.onclick=function(){eval(functionName+"('"+id+"')")})})},exports.bindFunctions=function(){funs.forEach(function(t){t()})},exports.getDirection=function(){return direction},exports.getVertices=function(){return vertices},exports.getEdges=function(){return edges},exports.getClasses=function(){return classes},exports.clear=function(){vertices={},classes={},edges=[],subGraphs=[],subCount=0},exports.defaultStyle=function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},exports.addSubGraph=function(t,e){function n(t){var e={"boolean":{},number:{},string:{}},n=[];return t.filter(function(t){var r=typeof t;return" "===t?!1:r in e?e[r].hasOwnProperty(t)?!1:e[r][t]=!0:n.indexOf(t)>=0?!1:n.push(t)})}var r=[];r=n(r.concat.apply(r,t));var i={id:"subGraph"+subCount,nodes:r,title:e};return subGraphs.push(i),subCount+=1,i.id};var getPosForId=function(t){var e;for(e=0;e<subGraphs.length;e++)if(subGraphs[e].id===t)return e;return-1},secCount=-1,posCrossRef=[],indexNodes=function(t,e){var n=subGraphs[e].nodes;if(secCount+=1,!(secCount>2e3)){if(posCrossRef[secCount]=e,subGraphs[e].id===t)return{result:!0,count:0};for(var r=0,i=1;r<n.length;){var a=getPosForId(n[r]);if(a>=0){var s=indexNodes(t,a);if(s.result)return{result:!0,count:i+s.count};i+=s.count}r+=1}return{result:!1,count:i}}};exports.getDepthFirstPos=function(t){return posCrossRef[t]},exports.indexNodes=function(){secCount=-1,subGraphs.length>0&&indexNodes("none",subGraphs.length-1,0)},exports.getSubGraphs=function(){return subGraphs},exports.parseError=function(t,e){mermaidAPI.parseError(t,e)}},{"../../logger":102}],92:[function(t,e,n){(function(r){var i=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[1,5],r=[1,6],i=[1,12],a=[1,13],s=[1,14],o=[1,15],u=[1,16],c=[1,17],l=[1,18],h=[1,19],d=[1,20],f=[1,21],p=[1,22],y=[8,16,17,18,19,20,21,22,23,24,25,26],g=[1,37],m=[1,33],v=[1,34],_=[1,35],b=[1,36],x=[8,10,16,17,18,19,20,21,22,23,24,25,26,28,32,37,39,40,45,57,58],w=[10,28],k=[10,28,37,57,58],A=[2,49],E=[1,45],D=[1,48],T=[1,49],C=[1,52],F=[2,65],S=[1,65],B=[1,66],O=[1,67],M=[1,68],I=[1,69],L=[1,70],P=[1,71],N=[1,72],R=[1,73],Y=[8,16,17,18,19,20,21,22,23,24,25,26,47],j=[10,28,37],$={trace:function(){},yy:{},symbols_:{error:2,expressions:3,graph:4,EOF:5,graphStatement:6,idStatement:7,"{":8,stmt_list:9,"}":10,strict:11,GRAPH:12,DIGRAPH:13,textNoTags:14,textNoTagsToken:15,ALPHA:16,NUM:17,COLON:18,PLUS:19,EQUALS:20,MULT:21,DOT:22,BRKT:23,SPACE:24,MINUS:25,keywords:26,stmt:27,";":28,node_stmt:29,edge_stmt:30,attr_stmt:31,"=":32,subgraph:33,attr_list:34,NODE:35,EDGE:36,"[":37,a_list:38,"]":39,",":40,edgeRHS:41,node_id:42,edgeop:43,port:44,":":45,compass_pt:46,SUBGRAPH:47,n:48,ne:49,e:50,se:51,s:52,sw:53,w:54,nw:55,c:56,ARROW_POINT:57,ARROW_OPEN:58,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",8:"{",10:"}",11:"strict",12:"GRAPH",13:"DIGRAPH",16:"ALPHA",17:"NUM",18:"COLON",19:"PLUS",20:"EQUALS",21:"MULT",22:"DOT",23:"BRKT",24:"SPACE",25:"MINUS",26:"keywords",28:";",32:"=",35:"NODE",36:"EDGE",37:"[",39:"]",40:",",45:":",47:"SUBGRAPH",48:"n",49:"ne",50:"e",51:"se",52:"s",53:"sw",54:"w",55:"nw",56:"c",57:"ARROW_POINT",58:"ARROW_OPEN"},productions_:[0,[3,2],[4,5],[4,6],[4,4],[6,1],[6,1],[7,1],[14,1],[14,2],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[9,1],[9,3],[27,1],[27,1],[27,1],[27,3],[27,1],[31,2],[31,2],[31,2],[34,4],[34,3],[34,3],[34,2],[38,5],[38,5],[38,3],[30,3],[30,3],[30,2],[30,2],[41,3],[41,3],[41,2],[41,2],[29,2],[29,1],[42,2],[42,1],[44,4],[44,2],[44,2],[33,5],[33,4],[33,3],[46,1],[46,1],[46,1],[46,1],[46,1],[46,1],[46,1],[46,1],[46,1],[46,0],[43,1],[43,1]],performAction:function(t,e,n,r,i,a){var s=a.length-1;switch(i){case 1:this.$=a[s-1];break;case 2:this.$=a[s-4];break;case 3:this.$=a[s-5];break;case 4:this.$=a[s-3];break;case 8:case 10:case 11:this.$=a[s];break;case 9:this.$=a[s-1]+""+a[s];break;case 12:case 13:case 14:case 15:case 16:case 18:case 19:case 20:this.$=a[s];break;case 17:this.$="<br>";break;case 39:this.$="oy";break;case 40:r.addLink(a[s-1],a[s].id,a[s].op),this.$="oy";break;case 42:r.addLink(a[s-1],a[s].id,a[s].op),this.$={op:a[s-2],id:a[s-1]};break;case 44:this.$={op:a[s-1],id:a[s]};break;case 48:r.addVertex(a[s-1]),this.$=a[s-1];break;case 49:r.addVertex(a[s]),this.$=a[s];break;case 66:this.$="arrow";break;case 67:this.$="arrow_open"}},table:[{3:1,4:2,6:3,11:[1,4],12:n,13:r},{1:[3]},{5:[1,7]},{7:8,8:[1,9],14:10,15:11,16:i,17:a,18:s,19:o,20:u,21:c,22:l,23:h,24:d,25:f,26:p},{6:23,12:n,13:r},e(y,[2,5]),e(y,[2,6]),{1:[2,1]},{8:[1,24]},{7:30,8:g,9:25,12:m,14:10,15:11,16:i,17:a,18:s,19:o,20:u,21:c,22:l,23:h,24:d,25:f,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:_,42:32,47:b},e([8,10,28,32,37,39,40,45,57,58],[2,7],{15:38,16:i,17:a,18:s,19:o,20:u,21:c,22:l,23:h,24:d,25:f,26:p}),e(x,[2,8]),e(x,[2,10]),e(x,[2,11]),e(x,[2,12]),e(x,[2,13]),e(x,[2,14]),e(x,[2,15]),e(x,[2,16]),e(x,[2,17]),e(x,[2,18]),e(x,[2,19]),e(x,[2,20]),{7:39,14:10,15:11,16:i,17:a,18:s,19:o,20:u,21:c,22:l,23:h,24:d,25:f,26:p},{7:30,8:g,9:40,12:m,14:10,15:11,16:i,17:a,18:s,19:o,20:u,21:c,22:l,23:h,24:d,25:f,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:_,42:32,47:b},{10:[1,41]},{10:[2,21],28:[1,42]},e(w,[2,23]),e(w,[2,24]),e(w,[2,25]),e(k,A,{44:44,32:[1,43],45:E}),e(w,[2,27],{41:46,43:47,57:D,58:T}),e(w,[2,47],{43:47,34:50,41:51,37:C,57:D,58:T}),{34:53,37:C},{34:54,37:C},{34:55,37:C},{7:56,8:[1,57],14:10,15:11,16:i,17:a,18:s,19:o,20:u,21:c,22:l,23:h,24:d,25:f,26:p},{7:30,8:g,9:58,12:m,14:10,15:11,16:i,17:a,18:s,19:o,20:u,21:c,22:l,23:h,24:d,25:f,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:_,42:32,47:b},e(x,[2,9]),{8:[1,59]},{10:[1,60]},{5:[2,4]},{7:30,8:g,9:61,12:m,14:10,15:11,16:i,17:a,18:s,19:o,20:u,21:c,22:l,23:h,24:d,25:f,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:_,42:32,47:b},{7:62,14:10,15:11,16:i,17:a,18:s,19:o,20:u,21:c,22:l,23:h,24:d,25:f,26:p},e(k,[2,48]),e(k,F,{14:10,15:11,7:63,46:64,16:i,17:a,18:s,19:o,20:u,21:c,22:l,23:h,24:d,25:f,26:p,48:S,49:B,50:O,51:M,52:I,53:L,54:P,55:N,56:R}),e(w,[2,41],{34:74,37:C}),{7:77,8:g,14:10,15:11,16:i,17:a,18:s,19:o,20:u,21:c,22:l,23:h,24:d,25:f,26:p,33:76,42:75,47:b},e(Y,[2,66]),e(Y,[2,67]),e(w,[2,46]),e(w,[2,40],{34:78,37:C}),{7:81,14:10,15:11,16:i,17:a,18:s,19:o,20:u,21:c,22:l,23:h,24:d,25:f,26:p,38:79,39:[1,80]},e(w,[2,28]),e(w,[2,29]),e(w,[2,30]),{8:[1,82]},{7:30,8:g,9:83,12:m,14:10,15:11,16:i,17:a,18:s,19:o,20:u,21:c,22:l,23:h,24:d,25:f,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:_,42:32,47:b},{10:[1,84]},{7:30,8:g,9:85,12:m,14:10,15:11,16:i,17:a,18:s,19:o,20:u,21:c,22:l,23:h,24:d,25:f,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:_,42:32,47:b},{5:[2,2]},{10:[2,22]},e(w,[2,26]),e(k,[2,51],{45:[1,86]}),e(k,[2,52]),e(k,[2,56]),e(k,[2,57]),e(k,[2,58]),e(k,[2,59]),e(k,[2,60]),e(k,[2,61]),e(k,[2,62]),e(k,[2,63]),e(k,[2,64]),e(w,[2,38]),e(j,[2,44],{43:47,41:87,57:D,58:T}),e(j,[2,45],{43:47,41:88,57:D,58:T}),e(k,A,{44:44,45:E}),e(w,[2,39]),{39:[1,89]},e(w,[2,34],{34:90,37:C}),{32:[1,91]},{7:30,8:g,9:92,12:m,14:10,15:11,16:i,17:a,18:s,19:o,20:u,21:c,22:l,23:h,24:d,25:f,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:_,42:32,47:b},{10:[1,93]},e(k,[2,55]),{10:[1,94]},e(k,F,{46:95,48:S,49:B,50:O,51:M,52:I,53:L,54:P,55:N,56:R}),e(j,[2,42]),e(j,[2,43]),e(w,[2,33],{34:96,37:C}),e(w,[2,32]),{7:97,14:10,15:11,16:i,17:a,18:s,19:o,20:u,21:c,22:l,23:h,24:d,25:f,26:p},{10:[1,98]},e(k,[2,54]),{5:[2,3]},e(k,[2,50]),e(w,[2,31]),{28:[1,99],39:[2,37],40:[1,100]},e(k,[2,53]),{7:81,14:10,15:11,16:i,17:a,18:s,19:o,20:u,21:c,22:l,23:h,24:d,25:f,26:p,38:101},{7:81,14:10,15:11,16:i,17:a,18:s,19:o,20:u,21:c,22:l,23:h,24:d,25:f,26:p,38:102},{39:[2,35]},{39:[2,36]}],defaultActions:{7:[2,1],41:[2,4],60:[2,2],61:[2,22],94:[2,3],101:[2,35],102:[2,36]},parseError:function(t,e){if(!e.recoverable)throw new Error(t);this.trace(t)},parse:function(t){function e(){var t;return t=p.lex()||d,"number"!=typeof t&&(t=n.symbols_[t]||t),t}var n=this,r=[0],i=[null],a=[],s=this.table,o="",u=0,c=0,l=0,h=2,d=1,f=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,"undefined"==typeof p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;this.parseError="function"==typeof y.yy.parseError?y.yy.parseError:Object.getPrototypeOf(this).parseError;for(var _,b,x,w,k,A,E,D,T,C={};;){if(x=r[r.length-1],this.defaultActions[x]?w=this.defaultActions[x]:((null===_||"undefined"==typeof _)&&(_=e()),w=s[x]&&s[x][_]),"undefined"==typeof w||!w.length||!w[0]){var F="";T=[];for(A in s[x])this.terminals_[A]&&A>h&&T.push("'"+this.terminals_[A]+"'");F=p.showPosition?"Parse error on line "+(u+1)+":\n"+p.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(u+1)+": Unexpected "+(_==d?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(F,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:m,expected:T})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+_);switch(w[0]){case 1:r.push(_),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),_=null,b?(_=b,b=null):(c=p.yyleng,o=p.yytext,u=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[w[1]][1],C.$=i[i.length-E],C._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(C._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),k=this.performAction.apply(C,[o,c,u,y.yy,w[1],i,a].concat(f)),"undefined"!=typeof k)return k;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(C.$),a.push(C._$),D=s[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0}},U=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;
|
||
if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,e,n,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(t=this.test_match(n,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[r]),t!==!1?t:!1):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,r){switch(n){case 0:return"STYLE";case 1:return"LINKSTYLE";case 2:return"CLASSDEF";case 3:return"CLASS";case 4:return"CLICK";case 5:return 12;case 6:return 13;case 7:return 47;case 8:return 35;case 9:return 36;case 10:return"DIR";case 11:return"DIR";case 12:return"DIR";case 13:return"DIR";case 14:return"DIR";case 15:return"DIR";case 16:return 17;case 17:return 23;case 18:return 18;case 19:return 28;case 20:return 40;case 21:return 32;case 22:return 21;case 23:return 22;case 24:return"ARROW_CROSS";case 25:return 57;case 26:return"ARROW_CIRCLE";case 27:return 58;case 28:return 25;case 29:return 19;case 30:return 20;case 31:return 16;case 32:return"PIPE";case 33:return"PS";case 34:return"PE";case 35:return 37;case 36:return 39;case 37:return 8;case 38:return 10;case 39:return"QUOTE";case 40:return 24;case 41:return"NEWLINE";case 42:return 5}},rules:[/^(?:style\b)/,/^(?:linkStyle\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:click\b)/,/^(?:graph\b)/,/^(?:digraph\b)/,/^(?:subgraph\b)/,/^(?:node\b)/,/^(?:edge\b)/,/^(?:LR\b)/,/^(?:RL\b)/,/^(?:TB\b)/,/^(?:BT\b)/,/^(?:TD\b)/,/^(?:BR\b)/,/^(?:[0-9])/,/^(?:#)/,/^(?::)/,/^(?:;)/,/^(?:,)/,/^(?:=)/,/^(?:\*)/,/^(?:\.)/,/^(?:--[x])/,/^(?:->)/,/^(?:--[o])/,/^(?:--)/,/^(?:-)/,/^(?:\+)/,/^(?:=)/,/^(?:[\u0021-\u0027\u002A-\u002E\u003F\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC_])/,/^(?:\|)/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:\{)/,/^(?:\})/,/^(?:")/,/^(?:\s)/,/^(?:\n)/,/^(?:$)/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42],inclusive:!0}}};return t}();return $.lexer=U,t.prototype=$,$.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":81,fs:79,path:80}],93:[function(t,e,n){(function(r){var i=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[1,4],r=[1,3],i=[1,5],a=[1,8,9,10,11,13,30,69,70,71,72,73,79,83,85,86,88,89,91,92,93],s=[2,2],o=[1,12],u=[1,13],c=[1,14],l=[1,15],h=[1,31],d=[1,22],f=[1,24],p=[1,25],y=[1,26],g=[1,27],m=[1,28],v=[1,34],_=[1,36],b=[1,33],x=[1,35],w=[1,41],k=[1,40],A=[1,37],E=[1,38],D=[1,39],T=[1,8,9,10,11,13,30,32,69,70,71,72,73,79,83,85,86,88,89,91,92,93],C=[1,49],F=[1,48],S=[1,50],B=[1,68],O=[1,76],M=[1,77],I=[1,62],L=[1,61],P=[1,81],N=[1,80],R=[1,78],Y=[1,79],j=[1,69],$=[1,64],U=[1,63],W=[1,59],G=[1,71],V=[1,72],H=[1,73],z=[1,74],q=[1,75],Z=[1,66],K=[1,65],X=[8,9,11],Q=[8,9,11,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62],J=[1,110],te=[8,9,10,11,13,15,36,38,40,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,79,83,85,86,88,89,91,92,93],ee=[8,9,10,11,12,13,15,16,17,18,30,32,36,37,38,39,40,41,44,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,69,70,71,72,73,76,79,81,83,85,86,88,89,91,92,93],ne=[1,113],re=[1,114],ie=[8,9,10,11,13,30,32,69,70,71,72,73,79,83,85,86,88,89,91,92,93],ae=[8,9,10,11,12,13,15,16,17,18,30,32,37,39,41,44,48,49,50,51,52,54,55,56,57,58,59,60,61,62,63,69,70,71,72,73,76,79,81,83,85,86,88,89,91,92,93],se=[13,79,83,85,86,88,89,91,92,93],oe=[13,47,63,79,83,85,86,88,89,91,92,93],ue=[1,186],ce=[1,183],le=[1,190],he=[1,187],de=[1,184],fe=[1,191],pe=[1,181],ye=[1,182],ge=[1,185],me=[1,188],ve=[1,189],_e=[1,204],be=[8,9,11,83],xe=[8,9,10,11,44,69,78,79,81,83,85,86,87,88,89],we={trace:function(){},yy:{},symbols_:{error:2,mermaidDoc:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,DIR:13,FirstStmtSeperator:14,TAGEND:15,TAGSTART:16,UP:17,DOWN:18,ending:19,endToken:20,spaceList:21,spaceListNewline:22,verticeStatement:23,separator:24,styleStatement:25,linkStyleStatement:26,classDefStatement:27,classStatement:28,clickStatement:29,subgraph:30,text:31,end:32,vertex:33,link:34,alphaNum:35,SQS:36,SQE:37,PS:38,PE:39,DIAMOND_START:40,DIAMOND_STOP:41,alphaNumStatement:42,alphaNumToken:43,MINUS:44,linkStatement:45,arrowText:46,TESTSTR:47,"--":48,ARROW_POINT:49,ARROW_CIRCLE:50,ARROW_CROSS:51,ARROW_OPEN:52,"-.":53,DOTTED_ARROW_POINT:54,DOTTED_ARROW_CIRCLE:55,DOTTED_ARROW_CROSS:56,DOTTED_ARROW_OPEN:57,"==":58,THICK_ARROW_POINT:59,THICK_ARROW_CIRCLE:60,THICK_ARROW_CROSS:61,THICK_ARROW_OPEN:62,PIPE:63,textToken:64,STR:65,commentText:66,commentToken:67,keywords:68,STYLE:69,LINKSTYLE:70,CLASSDEF:71,CLASS:72,CLICK:73,textNoTags:74,textNoTagsToken:75,DEFAULT:76,stylesOpt:77,HEX:78,NUM:79,commentStatement:80,PCT:81,style:82,COMMA:83,styleComponent:84,ALPHA:85,COLON:86,UNIT:87,BRKT:88,DOT:89,graphCodeTokens:90,PLUS:91,EQUALS:92,MULT:93,TAG_START:94,TAG_END:95,QUOTE:96,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"DIR",15:"TAGEND",16:"TAGSTART",17:"UP",18:"DOWN",30:"subgraph",32:"end",36:"SQS",37:"SQE",38:"PS",39:"PE",40:"DIAMOND_START",41:"DIAMOND_STOP",44:"MINUS",47:"TESTSTR",48:"--",49:"ARROW_POINT",50:"ARROW_CIRCLE",51:"ARROW_CROSS",52:"ARROW_OPEN",53:"-.",54:"DOTTED_ARROW_POINT",55:"DOTTED_ARROW_CIRCLE",56:"DOTTED_ARROW_CROSS",57:"DOTTED_ARROW_OPEN",58:"==",59:"THICK_ARROW_POINT",60:"THICK_ARROW_CIRCLE",61:"THICK_ARROW_CROSS",62:"THICK_ARROW_OPEN",63:"PIPE",65:"STR",69:"STYLE",70:"LINKSTYLE",71:"CLASSDEF",72:"CLASS",73:"CLICK",76:"DEFAULT",78:"HEX",79:"NUM",81:"PCT",83:"COMMA",85:"ALPHA",86:"COLON",87:"UNIT",88:"BRKT",89:"DOT",91:"PLUS",92:"EQUALS",93:"MULT",94:"TAG_START",95:"TAG_END",96:"QUOTE"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,4],[4,4],[4,4],[4,4],[4,4],[19,2],[19,1],[20,1],[20,1],[20,1],[14,1],[14,1],[14,2],[22,2],[22,2],[22,1],[22,1],[21,2],[21,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,5],[7,4],[24,1],[24,1],[24,1],[23,3],[23,1],[33,4],[33,5],[33,6],[33,7],[33,4],[33,5],[33,4],[33,5],[33,4],[33,5],[33,1],[33,2],[35,1],[35,2],[42,1],[42,1],[42,3],[34,2],[34,3],[34,3],[34,1],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[46,3],[31,1],[31,2],[31,1],[66,1],[66,2],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[74,1],[74,2],[27,5],[27,5],[28,5],[29,5],[25,5],[25,5],[26,5],[26,5],[80,3],[77,1],[77,3],[82,1],[82,2],[84,1],[84,1],[84,1],[84,1],[84,1],[84,1],[84,1],[84,1],[84,1],[84,1],[84,1],[67,1],[67,1],[64,1],[64,1],[64,1],[64,1],[64,1],[64,1],[64,1],[75,1],[75,1],[75,1],[75,1],[43,1],[43,1],[43,1],[43,1],[43,1],[43,1],[43,1],[43,1],[43,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1]],performAction:function(t,e,n,r,i,a){var s=a.length-1;switch(i){case 2:this.$=[];break;case 3:a[s]!==[]&&a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 55:case 57:case 58:case 89:case 91:case 92:case 105:this.$=a[s];break;case 11:r.setDirection(a[s-1]),this.$=a[s-1];break;case 12:r.setDirection("LR"),this.$=a[s-1];break;case 13:r.setDirection("RL"),this.$=a[s-1];break;case 14:r.setDirection("BT"),this.$=a[s-1];break;case 15:r.setDirection("TB"),this.$=a[s-1];break;case 30:this.$=a[s-1];break;case 31:case 32:case 33:case 34:case 35:this.$=[];break;case 36:this.$=r.addSubGraph(a[s-1],a[s-3]);break;case 37:this.$=r.addSubGraph(a[s-1],void 0);break;case 41:r.addLink(a[s-2],a[s],a[s-1]),this.$=[a[s-2],a[s]];break;case 42:this.$=[a[s]];break;case 43:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"square");break;case 44:this.$=a[s-4],r.addVertex(a[s-4],a[s-2],"square");break;case 45:this.$=a[s-5],r.addVertex(a[s-5],a[s-2],"circle");break;case 46:this.$=a[s-6],r.addVertex(a[s-6],a[s-3],"circle");break;case 47:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"round");break;case 48:this.$=a[s-4],r.addVertex(a[s-4],a[s-2],"round");break;case 49:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"diamond");break;case 50:this.$=a[s-4],r.addVertex(a[s-4],a[s-2],"diamond");break;case 51:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"odd");break;case 52:this.$=a[s-4],r.addVertex(a[s-4],a[s-2],"odd");break;case 53:this.$=a[s],r.addVertex(a[s]);break;case 54:this.$=a[s-1],r.addVertex(a[s-1]);break;case 56:case 90:case 93:case 106:this.$=a[s-1]+""+a[s];break;case 59:this.$=a[s-2]+"-"+a[s];break;case 60:a[s-1].text=a[s],this.$=a[s-1];break;case 61:case 62:a[s-2].text=a[s-1],this.$=a[s-2];break;case 63:this.$=a[s];break;case 64:this.$={type:"arrow",stroke:"normal",text:a[s-1]};break;case 65:this.$={type:"arrow_circle",stroke:"normal",text:a[s-1]};break;case 66:this.$={type:"arrow_cross",stroke:"normal",text:a[s-1]};break;case 67:this.$={type:"arrow_open",stroke:"normal",text:a[s-1]};break;case 68:this.$={type:"arrow",stroke:"dotted",text:a[s-1]};break;case 69:this.$={type:"arrow_circle",stroke:"dotted",text:a[s-1]};break;case 70:this.$={type:"arrow_cross",stroke:"dotted",text:a[s-1]};break;case 71:this.$={type:"arrow_open",stroke:"dotted",text:a[s-1]};break;case 72:this.$={type:"arrow",stroke:"thick",text:a[s-1]};break;case 73:this.$={type:"arrow_circle",stroke:"thick",text:a[s-1]};break;case 74:this.$={type:"arrow_cross",stroke:"thick",text:a[s-1]};break;case 75:this.$={type:"arrow_open",stroke:"thick",text:a[s-1]};break;case 76:this.$={type:"arrow",stroke:"normal"};break;case 77:this.$={type:"arrow_circle",stroke:"normal"};break;case 78:this.$={type:"arrow_cross",stroke:"normal"};break;case 79:this.$={type:"arrow_open",stroke:"normal"};break;case 80:this.$={type:"arrow",stroke:"dotted"};break;case 81:this.$={type:"arrow_circle",stroke:"dotted"};break;case 82:this.$={type:"arrow_cross",stroke:"dotted"};break;case 83:this.$={type:"arrow_open",stroke:"dotted"};break;case 84:this.$={type:"arrow",stroke:"thick"};break;case 85:this.$={type:"arrow_circle",stroke:"thick"};break;case 86:this.$={type:"arrow_cross",stroke:"thick"};break;case 87:this.$={type:"arrow_open",stroke:"thick"};break;case 88:this.$=a[s-1];break;case 107:case 108:this.$=a[s-4],r.addClass(a[s-2],a[s]);break;case 109:this.$=a[s-4],r.setClass(a[s-2],a[s]);break;case 110:this.$=a[s-4],r.setClickEvent(a[s-2],a[s]);break;case 111:this.$=a[s-4],r.addVertex(a[s-2],void 0,void 0,a[s]);break;case 112:case 113:case 114:this.$=a[s-4],r.updateLink(a[s-2],a[s]);break;case 116:this.$=[a[s]];break;case 117:a[s-2].push(a[s]),this.$=a[s-2];break;case 119:this.$=a[s-1]+a[s]}},table:[{3:1,4:2,9:n,10:r,12:i},{1:[3]},e(a,s,{5:6}),{4:7,9:n,10:r,12:i},{4:8,9:n,10:r,12:i},{10:[1,9]},{1:[2,1],6:10,7:11,8:o,9:u,10:c,11:l,13:h,23:16,25:17,26:18,27:19,28:20,29:21,30:d,33:23,35:29,42:30,43:32,69:f,70:p,71:y,72:g,73:m,79:v,83:_,85:b,86:x,88:w,89:k,91:A,92:E,93:D},e(a,[2,9]),e(a,[2,10]),{13:[1,42],15:[1,43],16:[1,44],17:[1,45],18:[1,46]},e(T,[2,3]),e(T,[2,4]),e(T,[2,5]),e(T,[2,6]),e(T,[2,7]),e(T,[2,8]),{8:C,9:F,11:S,24:47},{8:C,9:F,11:S,24:51},{8:C,9:F,11:S,24:52},{8:C,9:F,11:S,24:53},{8:C,9:F,11:S,24:54},{8:C,9:F,11:S,24:55},{8:C,9:F,10:B,11:S,12:O,13:M,15:I,16:L,17:P,18:N,24:57,30:R,31:56,32:Y,43:67,44:j,48:$,58:U,64:58,65:W,68:70,69:G,70:V,71:H,72:z,73:q,75:60,76:Z,79:v,81:K,83:_,85:b,86:x,88:w,89:k,91:A,92:E,93:D},e(X,[2,42],{34:82,45:83,48:[1,84],49:[1,87],50:[1,88],51:[1,89],52:[1,90],53:[1,85],54:[1,91],55:[1,92],56:[1,93],57:[1,94],58:[1,86],59:[1,95],60:[1,96],61:[1,97],62:[1,98]}),{10:[1,99]},{10:[1,100]},{10:[1,101]},{10:[1,102]},{10:[1,103]},e(Q,[2,53],{43:32,21:108,42:109,10:J,13:h,15:[1,107],36:[1,104],38:[1,105],40:[1,106],79:v,83:_,85:b,86:x,88:w,89:k,91:A,92:E,93:D}),e(te,[2,55]),e(te,[2,57]),e(te,[2,58],{44:[1,111]}),e(ee,[2,144]),e(ee,[2,145]),e(ee,[2,146]),e(ee,[2,147]),e(ee,[2,148]),e(ee,[2,149]),e(ee,[2,150]),e(ee,[2,151]),e(ee,[2,152]),{8:ne,9:re,10:J,14:112,21:115},{8:ne,9:re,10:J,14:116,21:115},{8:ne,9:re,10:J,14:117,21:115},{8:ne,9:re,10:J,14:118,21:115},{8:ne,9:re,10:J,14:119,21:115},e(T,[2,30]),e(T,[2,38]),e(T,[2,39]),e(T,[2,40]),e(T,[2,31]),e(T,[2,32]),e(T,[2,33]),e(T,[2,34]),e(T,[2,35]),{8:C,9:F,10:B,11:S,12:O,13:M,15:I,16:L,17:P,18:N,24:120,30:R,32:Y,43:67,44:j,48:$,58:U,64:121,68:70,69:G,70:V,71:H,72:z,73:q,75:60,76:Z,79:v,81:K,83:_,85:b,86:x,88:w,89:k,91:A,92:E,93:D},e(ie,s,{5:122}),e(ae,[2,89]),e(ae,[2,91]),e(ae,[2,133]),e(ae,[2,134]),e(ae,[2,135]),e(ae,[2,136]),e(ae,[2,137]),e(ae,[2,138]),e(ae,[2,139]),e(ae,[2,140]),e(ae,[2,141]),e(ae,[2,142]),e(ae,[2,143]),e(ae,[2,94]),e(ae,[2,95]),e(ae,[2,96]),e(ae,[2,97]),e(ae,[2,98]),e(ae,[2,99]),e(ae,[2,100]),e(ae,[2,101]),e(ae,[2,102]),e(ae,[2,103]),e(ae,[2,104]),{13:h,33:123,35:29,42:30,43:32,79:v,83:_,85:b,86:x,88:w,89:k,91:A,92:E,93:D},e(se,[2,63],{46:124,47:[1,125],63:[1,126]}),{10:B,12:O,13:M,15:I,16:L,17:P,18:N,30:R,31:127,32:Y,43:67,44:j,48:$,58:U,64:58,65:W,68:70,69:G,70:V,71:H,72:z,73:q,75:60,76:Z,79:v,81:K,83:_,85:b,86:x,88:w,89:k,91:A,92:E,93:D},{10:B,12:O,13:M,15:I,16:L,17:P,18:N,30:R,31:128,32:Y,43:67,44:j,48:$,58:U,64:58,65:W,68:70,69:G,70:V,71:H,72:z,73:q,75:60,76:Z,79:v,81:K,83:_,85:b,86:x,88:w,89:k,91:A,92:E,93:D},{10:B,12:O,13:M,15:I,16:L,17:P,18:N,30:R,31:129,32:Y,43:67,44:j,48:$,58:U,64:58,65:W,68:70,69:G,70:V,71:H,72:z,73:q,75:60,76:Z,79:v,81:K,83:_,85:b,86:x,88:w,89:k,91:A,92:E,93:D},e(oe,[2,76]),e(oe,[2,77]),e(oe,[2,78]),e(oe,[2,79]),e(oe,[2,80]),e(oe,[2,81]),e(oe,[2,82]),e(oe,[2,83]),e(oe,[2,84]),e(oe,[2,85]),e(oe,[2,86]),e(oe,[2,87]),{13:h,35:130,42:30,43:32,78:[1,131],79:v,83:_,85:b,86:x,88:w,89:k,91:A,92:E,93:D},{76:[1,132],79:[1,133]},{13:h,35:135,42:30,43:32,76:[1,134],79:v,83:_,85:b,86:x,88:w,89:k,91:A,92:E,93:D},{13:h,35:136,42:30,43:32,79:v,83:_,85:b,86:x,88:w,89:k,91:A,92:E,93:D},{13:h,35:137,42:30,43:32,79:v,83:_,85:b,86:x,88:w,89:k,91:A,92:E,93:D},{10:B,12:O,13:M,15:I,16:L,17:P,18:N,30:R,31:138,32:Y,43:67,44:j,48:$,58:U,64:58,65:W,68:70,69:G,70:V,71:H,72:z,73:q,75:60,76:Z,79:v,81:K,83:_,85:b,86:x,88:w,89:k,91:A,92:E,93:D},{10:B,12:O,13:M,15:I,16:L,17:P,18:N,30:R,31:140,32:Y,38:[1,139],43:67,44:j,48:$,58:U,64:58,65:W,68:70,69:G,70:V,71:H,72:z,73:q,75:60,76:Z,79:v,81:K,83:_,85:b,86:x,88:w,89:k,91:A,92:E,93:D},{10:B,12:O,13:M,15:I,16:L,17:P,18:N,30:R,31:141,32:Y,43:67,44:j,48:$,58:U,64:58,65:W,68:70,69:G,70:V,71:H,72:z,73:q,75:60,76:Z,79:v,81:K,83:_,85:b,86:x,88:w,89:k,91:A,92:E,93:D},{10:B,12:O,13:M,15:I,16:L,17:P,18:N,30:R,31:142,32:Y,43:67,44:j,48:$,58:U,64:58,65:W,68:70,69:G,70:V,71:H,72:z,73:q,75:60,76:Z,79:v,81:K,83:_,85:b,86:x,88:w,89:k,91:A,92:E,93:D},e(Q,[2,54]),e(te,[2,56]),e(Q,[2,29],{21:143,10:J}),{43:144,79:v,83:_,85:b,86:x,88:w,89:k,91:A,92:E,93:D},e(a,[2,11]),e(a,[2,21]),e(a,[2,22]),{9:[1,145]},e(a,[2,12]),e(a,[2,13]),e(a,[2,14]),e(a,[2,15]),e(ie,s,{5:146}),e(ae,[2,90]),{6:10,7:11,8:o,9:u,10:c,11:l,13:h,23:16,25:17,26:18,27:19,28:20,29:21,30:d,32:[1,147],33:23,35:29,42:30,43:32,69:f,70:p,71:y,72:g,73:m,79:v,83:_,85:b,86:x,88:w,89:k,91:A,92:E,93:D},e(X,[2,41]),e(se,[2,60],{10:[1,148]}),{10:[1,149]},{10:B,12:O,13:M,15:I,16:L,17:P,18:N,30:R,31:150,32:Y,43:67,44:j,48:$,58:U,64:58,65:W,68:70,69:G,70:V,71:H,72:z,73:q,75:60,76:Z,79:v,81:K,83:_,85:b,86:x,88:w,89:k,91:A,92:E,93:D},{10:B,12:O,13:M,15:I,16:L,17:P,18:N,30:R,32:Y,43:67,44:j,48:$,49:[1,151],50:[1,152],51:[1,153],52:[1,154],58:U,64:121,68:70,69:G,70:V,71:H,72:z,73:q,75:60,76:Z,79:v,81:K,83:_,85:b,86:x,88:w,89:k,91:A,92:E,93:D},{10:B,12:O,13:M,15:I,16:L,17:P,18:N,30:R,32:Y,43:67,44:j,48:$,54:[1,155],55:[1,156],56:[1,157],57:[1,158],58:U,64:121,68:70,69:G,70:V,71:H,72:z,73:q,75:60,76:Z,79:v,81:K,83:_,85:b,86:x,88:w,89:k,91:A,92:E,93:D},{10:B,12:O,13:M,15:I,16:L,17:P,18:N,30:R,32:Y,43:67,44:j,48:$,58:U,59:[1,159],60:[1,160],61:[1,161],62:[1,162],64:121,68:70,69:G,70:V,71:H,72:z,73:q,75:60,76:Z,79:v,81:K,83:_,85:b,86:x,88:w,89:k,91:A,92:E,93:D},{10:[1,163],13:h,42:109,43:32,79:v,83:_,85:b,86:x,88:w,89:k,91:A,92:E,93:D},{10:[1,164]},{10:[1,165]},{10:[1,166]},{10:[1,167]},{10:[1,168],13:h,42:109,43:32,79:v,83:_,85:b,86:x,88:w,89:k,91:A,92:E,93:D},{10:[1,169],13:h,42:109,43:32,79:v,83:_,85:b,86:x,88:w,89:k,91:A,92:E,93:D},{10:[1,170],13:h,42:109,43:32,79:v,83:_,85:b,86:x,88:w,89:k,91:A,92:E,93:D},{10:B,12:O,13:M,15:I,16:L,17:P,18:N,30:R,32:Y,37:[1,171],43:67,44:j,48:$,58:U,64:121,68:70,69:G,70:V,71:H,72:z,73:q,75:60,76:Z,79:v,81:K,83:_,85:b,86:x,88:w,89:k,91:A,92:E,93:D},{10:B,12:O,13:M,15:I,16:L,17:P,18:N,30:R,31:172,32:Y,43:67,44:j,48:$,58:U,64:58,65:W,68:70,69:G,70:V,71:H,72:z,73:q,75:60,76:Z,79:v,81:K,83:_,85:b,86:x,88:w,89:k,91:A,92:E,93:D},{10:B,12:O,13:M,15:I,16:L,17:P,18:N,30:R,32:Y,39:[1,173],43:67,44:j,48:$,58:U,64:121,68:70,69:G,70:V,71:H,72:z,73:q,75:60,76:Z,79:v,81:K,83:_,85:b,86:x,88:w,89:k,91:A,92:E,93:D},{10:B,12:O,13:M,15:I,16:L,17:P,18:N,30:R,32:Y,41:[1,174],43:67,44:j,48:$,58:U,64:121,68:70,69:G,70:V,71:H,72:z,73:q,75:60,76:Z,79:v,81:K,83:_,85:b,86:x,88:w,89:k,91:A,92:E,93:D},{10:B,12:O,13:M,15:I,16:L,17:P,18:N,30:R,32:Y,37:[1,175],43:67,44:j,48:$,58:U,64:121,68:70,69:G,70:V,71:H,72:z,73:q,75:60,76:Z,79:v,81:K,83:_,85:b,86:x,88:w,89:k,91:A,92:E,93:D},e(Q,[2,28]),e(te,[2,59]),e(a,[2,23]),{6:10,7:11,8:o,9:u,10:c,11:l,13:h,23:16,25:17,26:18,27:19,28:20,29:21,30:d,32:[1,176],33:23,35:29,42:30,43:32,69:f,70:p,71:y,72:g,73:m,79:v,83:_,85:b,86:x,88:w,89:k,91:A,92:E,93:D},e(T,[2,37]),e(se,[2,62]),e(se,[2,61]),{10:B,12:O,13:M,15:I,16:L,17:P,18:N,30:R,32:Y,43:67,44:j,48:$,58:U,63:[1,177],64:121,68:70,69:G,70:V,71:H,72:z,73:q,75:60,76:Z,79:v,81:K,83:_,85:b,86:x,88:w,89:k,91:A,92:E,93:D},e(se,[2,64]),e(se,[2,65]),e(se,[2,66]),e(se,[2,67]),e(se,[2,68]),e(se,[2,69]),e(se,[2,70]),e(se,[2,71]),e(se,[2,72]),e(se,[2,73]),e(se,[2,74]),e(se,[2,75]),{10:ue,44:ce,69:le,77:178,78:he,79:de,81:fe,82:179,84:180,85:pe,86:ye,87:ge,88:me,89:ve},{10:ue,44:ce,69:le,77:192,78:he,79:de,81:fe,82:179,84:180,85:pe,86:ye,87:ge,88:me,89:ve},{10:ue,44:ce,69:le,77:193,78:he,79:de,81:fe,82:179,84:180,85:pe,86:ye,87:ge,88:me,89:ve},{10:ue,44:ce,69:le,77:194,78:he,79:de,81:fe,82:179,84:180,85:pe,86:ye,87:ge,88:me,89:ve},{10:ue,44:ce,69:le,77:195,78:he,79:de,81:fe,82:179,84:180,85:pe,86:ye,87:ge,88:me,89:ve},{10:ue,44:ce,69:le,77:196,78:he,79:de,81:fe,82:179,84:180,85:pe,86:ye,87:ge,88:me,89:ve},{13:h,35:197,42:30,43:32,79:v,83:_,85:b,86:x,88:w,89:k,91:A,92:E,93:D},{13:h,35:198,42:30,43:32,79:v,83:_,85:b,86:x,88:w,89:k,91:A,92:E,93:D},e(Q,[2,43],{21:199,10:J}),{10:B,12:O,13:M,15:I,16:L,17:P,18:N,30:R,32:Y,39:[1,200],43:67,44:j,48:$,58:U,64:121,68:70,69:G,70:V,71:H,72:z,73:q,75:60,76:Z,79:v,81:K,83:_,85:b,86:x,88:w,89:k,91:A,92:E,93:D},e(Q,[2,47],{21:201,10:J}),e(Q,[2,49],{21:202,10:J}),e(Q,[2,51],{21:203,10:J}),e(T,[2,36]),e([10,13,79,83,85,86,88,89,91,92,93],[2,88]),e(X,[2,111],{83:_e}),e(be,[2,116],{84:205,10:ue,44:ce,69:le,78:he,79:de,81:fe,85:pe,86:ye,87:ge,88:me,89:ve}),e(xe,[2,118]),e(xe,[2,120]),e(xe,[2,121]),e(xe,[2,122]),e(xe,[2,123]),e(xe,[2,124]),e(xe,[2,125]),e(xe,[2,126]),e(xe,[2,127]),e(xe,[2,128]),e(xe,[2,129]),e(xe,[2,130]),e(X,[2,112],{83:_e}),e(X,[2,113],{83:_e}),e(X,[2,114],{83:_e}),e(X,[2,107],{83:_e}),e(X,[2,108],{83:_e}),e(X,[2,109],{43:32,42:109,13:h,79:v,83:_,85:b,86:x,88:w,89:k,91:A,92:E,93:D}),e(X,[2,110],{43:32,42:109,13:h,79:v,83:_,85:b,86:x,88:w,89:k,91:A,92:E,93:D}),e(Q,[2,44]),{39:[1,206]},e(Q,[2,48]),e(Q,[2,50]),e(Q,[2,52]),{10:ue,44:ce,69:le,78:he,79:de,81:fe,82:207,84:180,85:pe,86:ye,87:ge,88:me,89:ve},e(xe,[2,119]),e(Q,[2,45],{21:208,10:J}),e(be,[2,117],{84:205,10:ue,44:ce,69:le,78:he,79:de,81:fe,85:pe,86:ye,87:ge,88:me,89:ve}),e(Q,[2,46])],defaultActions:{},parseError:function(t,e){if(!e.recoverable)throw new Error(t);this.trace(t)},parse:function(t){function e(){var t;return t=p.lex()||d,"number"!=typeof t&&(t=n.symbols_[t]||t),t}var n=this,r=[0],i=[null],a=[],s=this.table,o="",u=0,c=0,l=0,h=2,d=1,f=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,"undefined"==typeof p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;this.parseError="function"==typeof y.yy.parseError?y.yy.parseError:Object.getPrototypeOf(this).parseError;for(var _,b,x,w,k,A,E,D,T,C={};;){if(x=r[r.length-1],this.defaultActions[x]?w=this.defaultActions[x]:((null===_||"undefined"==typeof _)&&(_=e()),w=s[x]&&s[x][_]),"undefined"==typeof w||!w.length||!w[0]){var F="";T=[];for(A in s[x])this.terminals_[A]&&A>h&&T.push("'"+this.terminals_[A]+"'");F=p.showPosition?"Parse error on line "+(u+1)+":\n"+p.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(u+1)+": Unexpected "+(_==d?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(F,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:m,expected:T})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+_);switch(w[0]){case 1:r.push(_),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),_=null,b?(_=b,b=null):(c=p.yyleng,o=p.yytext,u=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[w[1]][1],C.$=i[i.length-E],C._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(C._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),k=this.performAction.apply(C,[o,c,u,y.yy,w[1],i,a].concat(f)),"undefined"!=typeof k)return k;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(C.$),a.push(C._$),D=s[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0}},ke=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,e,n,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(t=this.test_match(n,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[r]),t!==!1?t:!1):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"
|
||
},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,r){switch(n){case 0:break;case 1:this.begin("string");break;case 2:this.popState();break;case 3:return"STR";case 4:return 69;case 5:return 76;case 6:return 70;case 7:return 71;case 8:return 72;case 9:return 73;case 10:return 12;case 11:return 30;case 12:return 32;case 13:return 13;case 14:return 13;case 15:return 13;case 16:return 13;case 17:return 13;case 18:return 13;case 19:return 79;case 20:return 88;case 21:return 86;case 22:return 8;case 23:return 83;case 24:return 93;case 25:return 16;case 26:return 15;case 27:return 17;case 28:return 18;case 29:return 51;case 30:return 49;case 31:return 50;case 32:return 52;case 33:return 56;case 34:return 54;case 35:return 55;case 36:return 57;case 37:return 56;case 38:return 54;case 39:return 55;case 40:return 57;case 41:return 61;case 42:return 59;case 43:return 60;case 44:return 62;case 45:return 48;case 46:return 53;case 47:return 58;case 48:return 44;case 49:return 89;case 50:return 91;case 51:return 81;case 52:return 92;case 53:return 92;case 54:return 85;case 55:return 63;case 56:return 38;case 57:return 39;case 58:return 36;case 59:return 37;case 60:return 40;case 61:return 41;case 62:return 96;case 63:return 9;case 64:return 10;case 65:return 11}},rules:[/^(?:%%[^\n]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:click\b)/,/^(?:graph\b)/,/^(?:subgraph\b)/,/^(?:end\s*)/,/^(?:LR\b)/,/^(?:RL\b)/,/^(?:TB\b)/,/^(?:BT\b)/,/^(?:TD\b)/,/^(?:BR\b)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:v\b)/,/^(?:\s*--[x]\s*)/,/^(?:\s*-->\s*)/,/^(?:\s*--[o]\s*)/,/^(?:\s*---\s*)/,/^(?:\s*-\.-[x]\s*)/,/^(?:\s*-\.->\s*)/,/^(?:\s*-\.-[o]\s*)/,/^(?:\s*-\.-\s*)/,/^(?:\s*.-[x]\s*)/,/^(?:\s*\.->\s*)/,/^(?:\s*\.-[o]\s*)/,/^(?:\s*\.-\s*)/,/^(?:\s*==[x]\s*)/,/^(?:\s*==>\s*)/,/^(?:\s*==[o]\s*)/,/^(?:\s*==[\=]\s*)/,/^(?:\s*--\s*)/,/^(?:\s*-\.\s*)/,/^(?:\s*==\s*)/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:[\u0021-\u0027\u002A-\u002E\u003F\u0041-\u005A\u005C\u005F-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC_\/])/,/^(?:\|)/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:\{)/,/^(?:\})/,/^(?:")/,/^(?:\n+)/,/^(?:\s)/,/^(?:$)/],conditions:{string:{rules:[2,3],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65],inclusive:!0}}};return t}();return we.lexer=ke,t.prototype=we,we.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":81,fs:79,path:80}],94:[function(t,e,n){var r=t("moment"),i=t("../../logger").create(),a="",s="",o=[],u=[],c="";n.clear=function(){o=[],u=[],c="",s="",f=0,l=void 0},n.setDateFormat=function(t){a=t},n.getDateFormat=function(){return a},n.setTitle=function(t){s=t},n.getTitle=function(){return s},n.addSection=function(t){c=t,o.push(t)},n.findTaskById=function(t){var e;for(e=0;e<u.length;e++)if(u[e].id===t)return u[e]},n.getTasks=function(){var t;for(t=1e4;t<u.length;t++)u[t].startTime=r(u[t].startTime).format(a),u[t].endTime=r(u[t].endTime).format(a);return u};var l,h=function(t,e,a){a=a.trim();var s=/^after\s+([\d\w\-]+)/,o=s.exec(a.trim());if(null!==o){var u=n.findTaskById(o[1]);if("undefined"==typeof u){var c=new Date;return c.setHours(0,0,0,0),c}return u.endTime}return r(a,e.trim(),!0).isValid()?r(a,e.trim(),!0).toDate():(i.debug("Invalid date:"+a),i.debug("With date format:"+e.trim()),new Date)},d=function(t,e,n){if(n=n.trim(),r(n,e.trim(),!0).isValid())return r(n,e.trim()).toDate();var i=r(t),a=/^([\d]+)([wdh])/,s=a.exec(n.trim());if(null!==s){switch(s[2]){case"h":i.add(s[1],"hours");break;case"d":i.add(s[1],"days");break;case"w":i.add(s[1],"weeks")}return i.toDate()}return i.toDate()},f=0,p=function(t){return"undefined"==typeof t?(f+=1,"task"+f):t},y=function(t,e){var r;r=":"===e.substr(0,1)?e.substr(1,e.length):e;for(var i=r.split(","),a={},s=n.getDateFormat(),o=!0;o;)o=!1,i[0].match(/^\s*active\s*$/)&&(a.active=!0,i.shift(1),o=!0),i[0].match(/^\s*done\s*$/)&&(a.done=!0,i.shift(1),o=!0),i[0].match(/^\s*crit\s*$/)&&(a.crit=!0,i.shift(1),o=!0);var u;for(u=0;u<i.length;u++)i[u]=i[u].trim();switch(i.length){case 1:a.id=p(),a.startTime=t.endTime,a.endTime=d(a.startTime,s,i[0]);break;case 2:a.id=p(),a.startTime=h(void 0,s,i[0]),a.endTime=d(a.startTime,s,i[1]);break;case 3:a.id=p(i[0]),a.startTime=h(void 0,s,i[1]),a.endTime=d(a.startTime,s,i[2])}return a};n.addTask=function(t,e){var n={section:c,type:c,description:t,task:t},r=y(l,e);n.startTime=r.startTime,n.endTime=r.endTime,n.id=r.id,n.active=r.active,n.done=r.done,n.crit=r.crit,l=n,u.push(n)},n.parseError=function(t,e){mermaidAPI.parseError(t,e)}},{"../../logger":102,moment:83}],95:[function(t,e){var n=t("./parser/gantt").parser;n.yy=t("./ganttDb");var r,i=t("../../d3"),a=t("moment"),s=(t("../../logger").create(),{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,sidePadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"'});e.exports.setConf=function(t){var e=Object.keys(t);e.forEach(function(e){s[e]=t[e]})};var o;e.exports.draw=function(t,e){function u(t,e,n){var r=s.barHeight,a=r+s.barGap,o=s.topPadding,u=s.sidePadding,f=i.scale.linear().domain([0,k.length]).range(["#00B9FA","#F95002"]).interpolate(i.interpolateHcl);l(u,o,e,n),c(t,a,o,u,r,f,e,n),h(a,o,u,r,f),d(u,o,e,n)}function c(t,e,n,r,i,a,o){{var u=(_.append("g").selectAll("rect").data(t).enter().append("rect").attr("x",0).attr("y",function(t,r){return r*e+n-2}).attr("width",function(){return o-r/2}).attr("height",e).attr("class",function(t){for(var e=0;e<k.length;e++)if(t.type===k[e])return"section section"+e%s.numberSectionStyles;return"section section0"}),_.append("g").selectAll("rect").data(t).enter());u.append("rect").attr("rx",3).attr("ry",3).attr("x",function(t){return w(t.startTime)+r}).attr("y",function(t,r){return r*e+n}).attr("width",function(t){return w(t.endTime)-w(t.startTime)}).attr("height",i).attr("class",function(t){for(var e="task ",n=0,r=0;r<k.length;r++)t.type===k[r]&&(n=r%s.numberSectionStyles);return t.active?t.crit?e+" activeCrit"+n:e+" active"+n:t.done?t.crit?e+" doneCrit"+n:e+" done"+n:t.crit?e+" crit"+n:e+" task"+n}),u.append("text").text(function(t){return t.task}).attr("font-size",s.fontSize).attr("x",function(t){var e=w(t.startTime),n=w(t.endTime),i=this.getBBox().width;return i>n-e?n+i+1.5*s.sidePadding>o?e+r-5:n+r+5:(n-e)/2+e+r}).attr("y",function(t,r){return r*e+s.barHeight/2+(s.fontSize/2-2)+n}).attr("text-height",i).attr("class",function(t){for(var e=w(t.startTime),n=w(t.endTime),r=this.getBBox().width,i=0,a=0;a<k.length;a++)t.type===k[a]&&(i=a%s.numberSectionStyles);var u="";return t.active&&(u=t.crit?"activeCritText"+i:"activeText"+i),t.done?u=t.crit?u+" doneCritText"+i:u+" doneText"+i:t.crit&&(u=u+" critText"+i),r>n-e?n+r+1.5*s.sidePadding>o?"taskTextOutsideLeft taskTextOutside"+i+" "+u:"taskTextOutsideRight taskTextOutside"+i+" "+u:"taskText taskText"+i+" "+u})}}function l(t,e,n,a){var o,u=[[".%L",function(t){return t.getMilliseconds()}],[":%S",function(t){return t.getSeconds()}],["h1 %I:%M",function(t){return t.getMinutes()}]],c=[["%Y",function(){return!0}]],l=[["%I:%M",function(t){return t.getHours()}],["%a %d",function(t){return t.getDay()&&1!=t.getDate()}],["%b %d",function(t){return 1!=t.getDate()}],["%B",function(t){return t.getMonth()}]];"undefined"!=typeof s.axisFormatter&&(l=[],s.axisFormatter.forEach(function(t){var e=[];e[0]=t[0],e[1]=t[1],l.push(e)})),o=u.concat(l).concat(c);var h=i.svg.axis().scale(w).orient("bottom").tickSize(-a+e+s.gridLineStartPadding,0,0).tickFormat(i.time.format.multi(o));r>7&&230>r&&(h=h.ticks(i.time.monday.range));_.append("g").attr("class","grid").attr("transform","translate("+t+", "+(a-50)+")").call(h).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em")}function h(t,e){for(var n=[],r=0,i=0;i<k.length;i++)n[i]=[k[i],y(k[i],E)];_.append("g").selectAll("text").data(n).enter().append("text").text(function(t){return t[0]}).attr("x",10).attr("y",function(i,a){if(!(a>0))return i[1]*t/2+e;for(var s=0;a>s;s++)return r+=n[a-1][1],i[1]*t/2+r*t+e}).attr("class",function(t){for(var e=0;e<k.length;e++)if(t[0]===k[e])return"sectionTitle sectionTitle"+e%s.numberSectionStyles;return"sectionTitle"})}function d(t,e,n,r){{var i=_.append("g").attr("class","today"),a=new Date;i.append("line").attr("x1",w(a)+t).attr("x2",w(a)+t).attr("y1",s.titleTopMargin).attr("y2",r-s.titleTopMargin).attr("class","today")}}function f(t){for(var e={},n=[],r=0,i=t.length;i>r;++r)e.hasOwnProperty(t[r])||(e[t[r]]=!0,n.push(t[r]));return n}function p(t){for(var e=t.length,n={};e;)n[t[--e]]=(n[t[e]]||0)+1;return n}function y(t,e){return p(e)[t]||0}n.yy.clear(),n.parse(t);var g=document.getElementById(e);o=g.parentElement.offsetWidth,"undefined"==typeof o&&(o=1200),"undefined"!=typeof s.useWidth&&(o=s.useWidth);var m=n.yy.getTasks(),v=m.length*(s.barHeight+s.barGap)+2*s.topPadding;g.setAttribute("height","100%"),g.setAttribute("viewBox","0 0 "+o+" "+v);var _=i.select("#"+e),b=(i.time.format("%Y-%m-%d"),i.min(m,function(t){return t.startTime})),x=i.max(m,function(t){return t.endTime}),w=i.time.scale().domain([i.min(m,function(t){return t.startTime}),i.max(m,function(t){return t.endTime})]).rangeRound([0,o-150]),k=[];r=a.duration(x-b).asDays();for(var A=0;A<m.length;A++)k.push(m[A].type);var E=k;k=f(k),u(m,o,v),"undefined"!=typeof s.useWidth&&g.setAttribute("width",o);_.append("text").text(n.yy.getTitle()).attr("x",o/2).attr("y",s.titleTopMargin).attr("class","titleText")}},{"../../d3":85,"../../logger":102,"./ganttDb":94,"./parser/gantt":96,moment:83}],96:[function(t,e,n){(function(r){var i=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[6,8,10,11,12,13,14],r=[1,9],i=[1,10],a=[1,11],s=[1,12],o={trace:function(){},yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,dateFormat:11,title:12,section:13,taskTxt:14,taskData:15,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",11:"dateFormat",12:"title",13:"section",14:"taskTxt",15:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,1],[9,1],[9,2]],performAction:function(t,e,n,r,i,a){var s=a.length-1;switch(i){case 1:return a[s-1];case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:r.setDateFormat(a[s].substr(11)),this.$=a[s].substr(11);break;case 9:r.setTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 10:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 11:r.addTask(a[s-1],a[s]),this.$="task"}},table:[{3:1,4:[1,2]},{1:[3]},e(n,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:r,12:i,13:a,14:s},e(n,[2,7],{1:[2,1]}),e(n,[2,3]),{9:13,11:r,12:i,13:a,14:s},e(n,[2,5]),e(n,[2,6]),e(n,[2,8]),e(n,[2,9]),e(n,[2,10]),{15:[1,14]},e(n,[2,4]),e(n,[2,11])],defaultActions:{},parseError:function(t,e){if(!e.recoverable)throw new Error(t);this.trace(t)},parse:function(t){function e(){var t;return t=p.lex()||d,"number"!=typeof t&&(t=n.symbols_[t]||t),t}var n=this,r=[0],i=[null],a=[],s=this.table,o="",u=0,c=0,l=0,h=2,d=1,f=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,"undefined"==typeof p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;this.parseError="function"==typeof y.yy.parseError?y.yy.parseError:Object.getPrototypeOf(this).parseError;for(var _,b,x,w,k,A,E,D,T,C={};;){if(x=r[r.length-1],this.defaultActions[x]?w=this.defaultActions[x]:((null===_||"undefined"==typeof _)&&(_=e()),w=s[x]&&s[x][_]),"undefined"==typeof w||!w.length||!w[0]){var F="";T=[];for(A in s[x])this.terminals_[A]&&A>h&&T.push("'"+this.terminals_[A]+"'");F=p.showPosition?"Parse error on line "+(u+1)+":\n"+p.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(u+1)+": Unexpected "+(_==d?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(F,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:m,expected:T})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+_);switch(w[0]){case 1:r.push(_),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),_=null,b?(_=b,b=null):(c=p.yyleng,o=p.yytext,u=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[w[1]][1],C.$=i[i.length-E],C._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(C._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),k=this.performAction.apply(C,[o,c,u,y.yy,w[1],i,a].concat(f)),"undefined"!=typeof k)return k;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(C.$),a.push(C._$),D=s[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0}},u=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,e,n,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(t=this.test_match(n,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[r]),t!==!1?t:!1):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 10;case 1:break;case 2:break;case 3:break;case 4:return 4;case 5:return 11;case 6:return"date";case 7:return 12;case 8:return 13;case 9:return 14;case 10:return 15;case 11:return":";case 12:return 6;case 13:return"INVALID"}},rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}};return t}();return o.lexer=u,t.prototype=o,o.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":81,fs:79,path:80}],97:[function(t,e,n){(function(r){var i=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[6,8,10,11,15,17,19,20,22,33],r=[2,2],i=[1,6],a=[1,8],s=[1,9],o=[1,12],u=[1,13],c=[1,14],l=[1,15],h=[1,17],d=[1,18],f=[2,7],p=[6,8,10,11,15,17,18,19,20,21,22,33],y=[6,8,10,11,15,17,18,19,20,22,33],g=[1,46],m=[1,49],v=[1,53],_={trace:function(){},yy:{},symbols_:{error:2,start:3,SD:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,participant:11,actor:12,signal:13,note_statement:14,title:15,text:16,loop:17,end:18,opt:19,alt:20,"else":21,note:22,placement:23,text2:24,over:25,spaceList:26,actor_pair:27,",":28,left_of:29,right_of:30,signaltype:31,actors:32,ACTOR:33,SOLID_OPEN_ARROW:34,DOTTED_OPEN_ARROW:35,SOLID_ARROW:36,DOTTED_ARROW:37,SOLID_CROSS:38,DOTTED_CROSS:39,TXT:40,$accept:0,$end:1},terminals_:{2:"error",4:"SD",6:"EOF",8:"SPACE",10:"NL",11:"participant",15:"title",16:"text",17:"loop",18:"end",19:"opt",20:"alt",21:"else",22:"note",25:"over",28:",",29:"left_of",30:"right_of",33:"ACTOR",34:"SOLID_OPEN_ARROW",35:"DOTTED_OPEN_ARROW",36:"SOLID_ARROW",37:"DOTTED_ARROW",38:"SOLID_CROSS",39:"DOTTED_CROSS",40:"TXT"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,3],[9,2],[9,2],[9,4],[9,4],[9,4],[9,7],[14,4],[14,5],[26,2],[26,1],[27,1],[27,3],[23,1],[23,1],[13,4],[32,2],[32,1],[12,1],[31,1],[31,1],[31,1],[31,1],[31,1],[31,1],[24,1]],performAction:function(t,e,n,r,i,a){var s=a.length-1;switch(i){case 1:return r.apply(a[s-1]),a[s-1];case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:this.$=a[s-1];break;case 12:a[s-1].unshift({type:"loopStart",loopText:a[s-2].actor,signalType:r.LINETYPE.LOOP_START}),a[s-1].push({type:"loopEnd",loopText:a[s-2],signalType:r.LINETYPE.LOOP_END}),this.$=a[s-1];break;case 13:a[s-1].unshift({type:"optStart",optText:a[s-2].actor,signalType:r.LINETYPE.OPT_START}),a[s-1].push({type:"optEnd",optText:a[s-2].actor,signalType:r.LINETYPE.OPT_END}),this.$=a[s-1];break;case 14:a[s-4].unshift({type:"altStart",altText:a[s-5].actor,signalType:r.LINETYPE.ALT_START}),a[s-4].push({type:"else",altText:a[s-2].actor,signalType:r.LINETYPE.ALT_ELSE}),a[s-4]=a[s-4].concat(a[s-1]),a[s-4].push({type:"altEnd",signalType:r.LINETYPE.ALT_END}),this.$=a[s-4];break;case 15:this.$=[a[s-1],{type:"addNote",placement:a[s-2],actor:a[s-1].actor,text:a[s]}];break;case 19:this.$=a[s];break;case 20:this.$=[a[s-2],a[s]];break;case 21:this.$=r.PLACEMENT.LEFTOF;break;case 22:this.$=r.PLACEMENT.RIGHTOF;break;case 23:this.$=[a[s-3],a[s-1],{type:"addMessage",from:a[s-3].actor,to:a[s-1].actor,signalType:a[s-2],msg:a[s]}];break;case 26:this.$={type:"addActor",actor:a[s]};break;case 27:this.$=r.LINETYPE.SOLID_OPEN;break;case 28:this.$=r.LINETYPE.DOTTED_OPEN;break;case 29:this.$=r.LINETYPE.SOLID;break;case 30:this.$=r.LINETYPE.DOTTED;break;case 31:this.$=r.LINETYPE.SOLID_CROSS;break;case 32:this.$=r.LINETYPE.DOTTED_CROSS;break;case 33:this.$=a[s].substring(1).trim().replace(/\\n/gm,"\n")}},table:[{3:1,4:[1,2]},{1:[3]},e(n,r,{5:3}),{6:[1,4],7:5,8:i,9:7,10:a,11:s,12:16,13:10,14:11,15:o,17:u,19:c,20:l,22:h,33:d},e(n,f,{1:[2,1]}),e(p,[2,3]),{9:19,11:s,12:16,13:10,14:11,15:o,17:u,19:c,20:l,22:h,33:d},e(p,[2,5]),e(p,[2,6]),{12:20,33:d},{10:[1,21]},{10:[1,22]},{8:[1,23]},{12:24,33:d},{12:25,33:d},{12:26,33:d},{31:27,34:[1,28],35:[1,29],36:[1,30],37:[1,31],38:[1,32],39:[1,33]},{23:34,25:[1,35],29:[1,36],30:[1,37]},e([6,8,10,11,15,17,18,19,20,21,22,28,33,34,35,36,37,38,39,40],[2,26]),e(p,[2,4]),{10:[1,38]},e(p,[2,9]),e(p,[2,10]),{16:[1,39]},e(y,r,{5:40}),e(y,r,{5:41}),e([6,8,10,11,15,17,19,20,21,22,33],r,{5:42}),{12:43,33:d},{33:[2,27]},{33:[2,28]},{33:[2,29]},{33:[2,30]},{33:[2,31]},{33:[2,32]},{12:44,33:d},{8:g,26:45},{33:[2,21]},{33:[2,22]},e(p,[2,8]),{10:[1,47]},{6:m,7:5,8:i,9:7,10:a,11:s,12:16,13:10,14:11,15:o,17:u,18:[1,48],19:c,20:l,22:h,33:d},{6:m,7:5,8:i,9:7,10:a,11:s,12:16,13:10,14:11,15:o,17:u,18:[1,50],19:c,20:l,22:h,33:d},{6:m,7:5,8:i,9:7,10:a,11:s,12:16,13:10,14:11,15:o,17:u,19:c,20:l,21:[1,51],22:h,33:d},{24:52,40:v},{24:54,40:v},{12:56,27:55,33:d},{8:g,26:57,33:[2,18]},e(p,[2,11]),e(p,[2,12]),e(p,f),e(p,[2,13]),{12:58,33:d},{10:[2,23]},{10:[2,33]},{10:[2,15]},{12:59,33:d},{28:[1,60],33:[2,19]},{33:[2,17]},e(y,r,{5:61}),{10:[2,16]},{12:62,33:d},{6:m,7:5,8:i,9:7,10:a,11:s,12:16,13:10,14:11,15:o,17:u,18:[1,63],19:c,20:l,22:h,33:d},{33:[2,20]},e(p,[2,14])],defaultActions:{28:[2,27],29:[2,28],30:[2,29],31:[2,30],32:[2,31],33:[2,32],36:[2,21],37:[2,22],52:[2,23],53:[2,33],54:[2,15],57:[2,17],59:[2,16],62:[2,20]},parseError:function(t,e){if(!e.recoverable)throw new Error(t);this.trace(t)},parse:function(t){function e(){var t;return t=p.lex()||d,"number"!=typeof t&&(t=n.symbols_[t]||t),t}var n=this,r=[0],i=[null],a=[],s=this.table,o="",u=0,c=0,l=0,h=2,d=1,f=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,"undefined"==typeof p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;this.parseError="function"==typeof y.yy.parseError?y.yy.parseError:Object.getPrototypeOf(this).parseError;for(var _,b,x,w,k,A,E,D,T,C={};;){if(x=r[r.length-1],this.defaultActions[x]?w=this.defaultActions[x]:((null===_||"undefined"==typeof _)&&(_=e()),w=s[x]&&s[x][_]),"undefined"==typeof w||!w.length||!w[0]){var F="";T=[];for(A in s[x])this.terminals_[A]&&A>h&&T.push("'"+this.terminals_[A]+"'");F=p.showPosition?"Parse error on line "+(u+1)+":\n"+p.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(u+1)+": Unexpected "+(_==d?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(F,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:m,expected:T})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+_);switch(w[0]){case 1:r.push(_),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),_=null,b?(_=b,b=null):(c=p.yyleng,o=p.yytext,u=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[w[1]][1],C.$=i[i.length-E],C._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(C._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),k=this.performAction.apply(C,[o,c,u,y.yy,w[1],i,a].concat(f)),"undefined"!=typeof k)return k;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(C.$),a.push(C._$),D=s[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0}},b=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this
|
||
},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,e,n,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(t=this.test_match(n,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[r]),t!==!1?t:!1):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 10;case 1:return 38;case 2:return 39;case 3:return 36;case 4:return 37;case 5:break;case 6:break;case 7:break;case 8:return 11;case 9:return 19;case 10:return 17;case 11:return 20;case 12:return 21;case 13:return 18;case 14:return 29;case 15:return 30;case 16:return 25;case 17:return 22;case 18:return 15;case 19:return 4;case 20:return 28;case 21:return 10;case 22:return 33;case 23:return 34;case 24:return 35;case 25:return 36;case 26:return 37;case 27:return 40;case 28:return 6;case 29:return"INVALID"}},rules:[/^(?:[\n]+)/i,/^(?:[\-][x])/i,/^(?:[\-][\-][x])/i,/^(?:[\-][>][>])/i,/^(?:[\-][\-][>][>])/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:participant\b)/i,/^(?:opt\b)/i,/^(?:loop\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:title\b)/i,/^(?:sequenceDiagram\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\->:\n,;]+)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:->>)/i,/^(?:-->>)/i,/^(?::[^#\n;]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29],inclusive:!0}}};return t}();return _.lexer=b,t.prototype=_,_.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":81,fs:79,path:80}],98:[function(t,e,n){var r={},i=[],a=[],s=[],o=t("../../logger").create();n.addActor=function(t,e,n){r[t]={name:e,description:n},i.push(t)},n.addMessage=function(t,e,n,r){a.push({from:t,to:e,message:n,answer:r})},n.addSignal=function(t,e,n,r){o.debug("Adding message from="+t+" to="+e+" message="+n+" type="+r),a.push({from:t,to:e,message:n,type:r})},n.getMessages=function(){return a},n.getActors=function(){return r},n.getActor=function(t){return r[t]},n.getActorKeys=function(){return Object.keys(r)},n.clear=function(){r={},a=[]},n.LINETYPE={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16},n.ARROWTYPE={FILLED:0,OPEN:1},n.PLACEMENT={LEFTOF:0,RIGHTOF:1,OVER:2},n.addNote=function(t,e,r){var i={actor:t,placement:e,message:r};s.push(i),a.push({from:t,to:t,message:r,type:n.LINETYPE.NOTE,placement:e})},n.parseError=function(t,e){mermaidAPI.parseError(t,e)},n.apply=function(t){if(t instanceof Array)t.forEach(function(t){n.apply(t)});else switch(t.type){case"addActor":n.addActor(t.actor,t.actor,t.actor);break;case"addNote":n.addNote(t.actor,t.placement,t.text);break;case"addMessage":n.addSignal(t.from,t.to,t.msg,t.signalType);break;case"loopStart":n.addSignal(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":n.addSignal(void 0,void 0,void 0,t.signalType);break;case"optStart":n.addSignal(void 0,void 0,t.optText,t.signalType);break;case"optEnd":n.addSignal(void 0,void 0,void 0,t.signalType);break;case"altStart":n.addSignal(void 0,void 0,t.altText,t.signalType);break;case"else":n.addSignal(void 0,void 0,t.altText,t.signalType);break;case"altEnd":n.addSignal(void 0,void 0,void 0,t.signalType)}}},{"../../logger":102}],99:[function(t,e,n){var r=t("./parser/sequenceDiagram").parser;r.yy=t("./sequenceDb");var i=t("./svgDraw"),a=t("../../d3"),s=(t("../../logger").create(),{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!1,bottomMarginAdj:1});n.bounds={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,list:[],init:function(){this.list=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},updateVal:function(t,e,n,r){t[e]="undefined"==typeof t[e]?n:r(n,t[e])},updateLoops:function(t,e,r,i){var a=this,o=0;this.list.forEach(function(u){o++;var c=a.list.length-o+1;a.updateVal(u,"startx",t-c*s.boxMargin,Math.min),a.updateVal(u,"starty",e-c*s.boxMargin,Math.min),a.updateVal(u,"stopx",r+c*s.boxMargin,Math.max),a.updateVal(u,"stopy",i+c*s.boxMargin,Math.max),a.updateVal(n.bounds.data,"startx",t-c*s.boxMargin,Math.min),a.updateVal(n.bounds.data,"starty",e-c*s.boxMargin,Math.min),a.updateVal(n.bounds.data,"stopx",r+c*s.boxMargin,Math.max),a.updateVal(n.bounds.data,"stopy",i+c*s.boxMargin,Math.max)})},insert:function(t,e,r,i){var a,s,o,u;a=Math.min(t,r),o=Math.max(t,r),s=Math.min(e,i),u=Math.max(e,i),this.updateVal(n.bounds.data,"startx",a,Math.min),this.updateVal(n.bounds.data,"starty",s,Math.min),this.updateVal(n.bounds.data,"stopx",o,Math.max),this.updateVal(n.bounds.data,"stopy",u,Math.max),this.updateLoops(a,s,o,u)},newLoop:function(t){this.list.push({startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t})},endLoop:function(){var t=this.list.pop();return t},addElseToLoop:function(t){var e=this.list.pop();e.elsey=n.bounds.getVerticalPos(),e.elseText=t,this.list.push(e)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return this.data}};var o=function(t,e,r,a){var o=i.getNoteRect();o.x=e,o.y=r,o.width=s.width,o.class="note";var u=t.append("g"),c=i.drawRect(u,o),l=i.getTextObj();l.x=e,l.y=r,l.textMargin=s.noteMargin,l.dy="1em",l.text=a.message,l.class="noteText";var h=i.drawText(u,l,s.width),d=h[0][0].getBBox().height;d>s.width?(h.remove(),u=t.append("g"),h=i.drawText(u,l,2*s.width),d=h[0][0].getBBox().height,c.attr("width",2*s.width),n.bounds.insert(e,r,e+2*s.width,r+2*s.noteMargin+d)):n.bounds.insert(e,r,e+s.width,r+2*s.noteMargin+d),c.attr("height",d+2*s.noteMargin),n.bounds.bumpVerticalPos(d+2*s.noteMargin)},u=function(t,e,i,a,s){var o,u=t.append("g"),c=e+(i-e)/2,l=u.append("text").attr("x",c).attr("y",a-7).style("text-anchor","middle").attr("class","messageText").text(s.message);o="undefined"!=typeof l[0][0].getBBox?l[0][0].getBBox().width:l[0][0].getBoundingClientRect();var h;if(e===i){h=u.append("path").attr("d","M "+e+","+a+" C "+(e+60)+","+(a-10)+" "+(e+60)+","+(a+30)+" "+e+","+(a+20)),n.bounds.bumpVerticalPos(30);var d=Math.max(o/2,100);n.bounds.insert(e-d,n.bounds.getVerticalPos()-10,i+d,n.bounds.getVerticalPos())}else h=u.append("line"),h.attr("x1",e),h.attr("y1",a),h.attr("x2",i),h.attr("y2",a),n.bounds.insert(e,n.bounds.getVerticalPos()-10,i,n.bounds.getVerticalPos());s.type===r.yy.LINETYPE.DOTTED||s.type===r.yy.LINETYPE.DOTTED_CROSS||s.type===r.yy.LINETYPE.DOTTED_OPEN?(h.style("stroke-dasharray","3, 3"),h.attr("class","messageLine1")):h.attr("class","messageLine0"),h.attr("stroke-width",2),h.attr("stroke","black"),h.style("fill","none"),(s.type===r.yy.LINETYPE.SOLID||s.type===r.yy.LINETYPE.DOTTED)&&h.attr("marker-end","url(#arrowhead)"),(s.type===r.yy.LINETYPE.SOLID_CROSS||s.type===r.yy.LINETYPE.DOTTED_CROSS)&&h.attr("marker-end","url(#crosshead)")};e.exports.drawActors=function(t,e,r,a){var o;for(o=0;o<r.length;o++){var u=r[o];e[u].x=o*s.actorMargin+o*s.width,e[u].y=a,e[u].width=s.diagramMarginY,e[u].height=s.diagramMarginY,i.drawActor(t,e[u].x,a,e[u].description,s),n.bounds.insert(e[u].x,a,e[u].x+s.width,s.height)}n.bounds.bumpVerticalPos(s.height)},e.exports.setConf=function(t){var e=Object.keys(t);e.forEach(function(e){s[e]=t[e]})},e.exports.draw=function(t,c){r.yy.clear(),r.parse(t+"\n"),n.bounds.init();var l,h,d=a.select("#"+c),f=r.yy.getActors(),p=r.yy.getActorKeys(),y=r.yy.getMessages();e.exports.drawActors(d,f,p,0),i.insertArrowHead(d),i.insertArrowCrossHead(d),y.forEach(function(t){var e;switch(t.type){case r.yy.LINETYPE.NOTE:n.bounds.bumpVerticalPos(s.boxMargin),l=f[t.from].x,h=f[t.to].x,0!==t.placement?o(d,l+(s.width+s.actorMargin)/2,n.bounds.getVerticalPos(),t):o(d,l-(s.width+s.actorMargin)/2,n.bounds.getVerticalPos(),t);break;case r.yy.LINETYPE.LOOP_START:n.bounds.bumpVerticalPos(s.boxMargin),n.bounds.newLoop(t.message),n.bounds.bumpVerticalPos(s.boxMargin+s.boxTextMargin);break;case r.yy.LINETYPE.LOOP_END:e=n.bounds.endLoop(),i.drawLoop(d,e,"loop",s),n.bounds.bumpVerticalPos(s.boxMargin);break;case r.yy.LINETYPE.OPT_START:n.bounds.bumpVerticalPos(s.boxMargin),n.bounds.newLoop(t.message),n.bounds.bumpVerticalPos(s.boxMargin+s.boxTextMargin);break;case r.yy.LINETYPE.OPT_END:e=n.bounds.endLoop(),i.drawLoop(d,e,"opt",s),n.bounds.bumpVerticalPos(s.boxMargin);break;case r.yy.LINETYPE.ALT_START:n.bounds.bumpVerticalPos(s.boxMargin),n.bounds.newLoop(t.message),n.bounds.bumpVerticalPos(s.boxMargin+s.boxTextMargin);break;case r.yy.LINETYPE.ALT_ELSE:n.bounds.bumpVerticalPos(s.boxMargin),e=n.bounds.addElseToLoop(t.message),n.bounds.bumpVerticalPos(s.boxMargin);break;case r.yy.LINETYPE.ALT_END:e=n.bounds.endLoop(),i.drawLoop(d,e,"alt",s),n.bounds.bumpVerticalPos(s.boxMargin);break;default:n.bounds.bumpVerticalPos(s.messageMargin),l=f[t.from].x+s.width/2,h=f[t.to].x+s.width/2,u(d,l,h,n.bounds.getVerticalPos(),t)}}),s.mirrorActors&&(n.bounds.bumpVerticalPos(2*s.boxMargin),e.exports.drawActors(d,f,p,n.bounds.getVerticalPos()));var g=n.bounds.getBounds(),m=g.stopy-g.starty+2*s.diagramMarginY;s.mirrorActors&&(m=m-s.boxMargin+s.bottomMarginAdj);var v=g.stopx-g.startx+2*s.diagramMarginX;s.useMaxWidth?(d.attr("height","100%"),d.attr("width","100%"),d.attr("style","max-width:"+v+"px;")):(d.attr("height",m),d.attr("width",v)),d.attr("viewBox",g.startx-s.diagramMarginX+" -"+s.diagramMarginY+" "+v+" "+m)}},{"../../d3":85,"../../logger":102,"./parser/sequenceDiagram":97,"./sequenceDb":98,"./svgDraw":100}],100:[function(t,e,n){t("../../logger").create();n.drawRect=function(t,e){var n=t.append("rect");return n.attr("x",e.x),n.attr("y",e.y),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("width",e.width),n.attr("height",e.height),n.attr("rx",e.rx),n.attr("ry",e.ry),"undefined"!=typeof e.class&&n.attr("class",e.class),n},n.drawText=function(t,e,n){var r=e.text.replace(/<br\/?>/gi," "),i=t.append("text");i.attr("x",e.x),i.attr("y",e.y),i.style("text-anchor",e.anchor),i.attr("fill",e.fill),"undefined"!=typeof e.class&&i.attr("class",e.class);var a=i.append("tspan");return a.attr("x",e.x),a.attr("dy",e.dy),a.text(r),"undefined"!=typeof i.textwrap&&i.textwrap({x:e.x+4,y:e.y-2,width:n,height:1800},e.textMargin),i},n.drawLabel=function(t,e){var r=n.getNoteRect();r.x=e.x,r.y=e.y,r.width=50,r.height=20,r.fill="#526e52",r.stroke="none",r.class="labelBox",n.drawRect(t,r),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,e.fill="white",n.drawText(t,e)},n.drawActor=function(t,e,r,i,a){var s=e+a.width/2,o=t.append("g");0===r&&o.append("line").attr("x1",s).attr("y1",5).attr("x2",s).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999");var u=n.getNoteRect();u.x=e,u.y=r,u.fill="#eaeaea",u.width=a.width,u.height=a.height,u.class="actor",u.rx=3,u.ry=3,n.drawRect(o,u),o.append("text").attr("x",s).attr("y",r+a.height/2+5).attr("class","actor").style("text-anchor","middle").text(i)},n.drawLoop=function(t,e,r,i){var a=t.append("g"),s=function(t,e,n,r){a.append("line").attr("x1",t).attr("y1",e).attr("x2",n).attr("y2",r).attr("stroke-width",2).attr("stroke","#526e52").attr("class","loopLine")};s(e.startx,e.starty,e.stopx,e.starty),s(e.stopx,e.starty,e.stopx,e.stopy),s(e.startx,e.stopy,e.stopx,e.stopy),s(e.startx,e.starty,e.startx,e.stopy),"undefined"!=typeof e.elsey&&s(e.startx,e.elsey,e.stopx,e.elsey);var o=n.getTextObj();o.text=r,o.x=e.startx,o.y=e.starty,o.labelMargin=1.5*i.boxMargin,o.class="labelText",o.fill="white",n.drawLabel(a,o),o=n.getTextObj(),o.text="[ "+e.title+" ]",o.x=e.startx+(e.stopx-e.startx)/2,o.y=e.starty+1.5*i.boxMargin,o.anchor="middle",o.class="loopText",n.drawText(a,o),"undefined"!=typeof e.elseText&&(o.text="[ "+e.elseText+" ]",o.y=e.elsey+1.5*i.boxMargin,n.drawText(a,o))},n.insertArrowHead=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},n.insertArrowCrossHead=function(t){var e=t.append("defs"),n=e.append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);n.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),n.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},n.getTextObj=function(){var t={x:0,y:0,fill:"black","text-anchor":"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0};return t},n.getNoteRect=function(){var t={x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0};return t}},{"../../logger":102}],101:[function(t,e,n){(function(e){var r=t("./diagrams/flowchart/graphDb"),i=(t("./diagrams/flowchart/parser/flow"),t("./utils")),a=t("./diagrams/flowchart/flowRenderer"),s=t("./diagrams/sequenceDiagram/sequenceRenderer"),o=t("./diagrams/example/exampleRenderer"),u=t("./diagrams/example/parser/example"),c=t("./diagrams/flowchart/parser/flow"),l=t("./diagrams/flowchart/parser/dot"),h=t("./diagrams/sequenceDiagram/parser/sequenceDiagram"),d=t("./diagrams/sequenceDiagram/sequenceDb"),f=t("./diagrams/example/exampleDb"),p=t("./diagrams/gantt/ganttRenderer"),y=t("./diagrams/gantt/parser/gantt"),g=t("./diagrams/gantt/ganttDb"),m=t("./d3"),v=t("./logger").create(),_={cloneCssStyles:!0,flowchart:{htmlLabels:!0,useMaxWidth:!0},sequenceDiagram:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,sidePadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:3,axisFormatter:[["%I:%M",function(t){return t.getHours()}],["w. %U",function(t){return 1==t.getDay()}],["%a %d",function(t){return t.getDay()&&1!=t.getDate()}],["%b %d",function(t){return 1!=t.getDate()}],["%m-%y",function(t){return t.getMonth()}]]}},b=function(t){var e,n=i.detectType(t);switch(n){case"graph":e=c,e.parser.yy=r;break;case"dotGraph":e=l,e.parser.yy=r;break;case"sequenceDiagram":e=h,e.parser.yy=d;break;case"info":e=u,e.parser.yy=f;break;case"gantt":e=y,e.parser.yy=g}try{return e.parse(t),!0}catch(a){return!1}};n.parse=b,n.version=function(){return t("../package.json").version};var x=function(t,e,u,c){"undefined"!=typeof c?m.select(c).append("div").attr("id","d"+t).append("svg").attr("id",t).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg").append("g"):m.select("body").append("div").attr("id","d"+t).append("svg").attr("id",t).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg").append("g");var l=m.select("#d"+t).node(),h=i.detectType(e),d={};switch(h){case"graph":a.setConf(_.flowchart),a.draw(e,t,!1),_.cloneCssStyles&&(d=a.getClasses(e,!1),i.cloneCssStyles(l.firstChild,d)),r.bindFunctions();break;case"dotGraph":a.setConf(_.flowchart),a.draw(e,t,!0),_.cloneCssStyles&&(d=a.getClasses(e,!0),i.cloneCssStyles(l.firstChild,d));break;case"sequenceDiagram":s.setConf(_.sequenceDiagram),s.draw(e,t),_.cloneCssStyles&&i.cloneCssStyles(l.firstChild,[]);break;case"gantt":p.setConf(_.gantt),p.draw(e,t),_.cloneCssStyles&&i.cloneCssStyles(l.firstChild,[]);break;case"info":o.draw(e,t,n.version()),_.cloneCssStyles&&i.cloneCssStyles(l.firstChild,[])}"undefined"!=typeof u&&u(m.select("#d"+t).node().innerHTML);var f=m.select("#d"+t).node();null!==f&&"function"==typeof f.remove&&m.select("#d"+t).node().remove()};n.render=function(t,e,n,r){"undefined"==typeof document||x(t,e,n,r)};var w=function(t){var e,n=Object.keys(t);for(e=0;e<n.length;e++)if("object"==typeof t[n[e]]){var r,i=Object.keys(t[n[e]]);for(r=0;r<i.length;r++)"undefined"==typeof _[n[e]]&&(_[n[e]]={}),_[n[e]][i[r]]=t[n[e]][i[r]]}else _[n[e]]=t[n[e]]};n.initialize=function(t){"object"==typeof t&&w(t)},n.getConfig=function(){return _},n.parseError=function(t,e){"undefined"!=typeof mermaid?mermaid.parseError(t,e):(v.debug("Mermaid Syntax error:"),v.debug(t))},e.mermaidAPI={render:n.render,parse:n.parse,initialize:n.initialize,detectType:i.detectType,parseError:n.parseError}}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../package.json":84,"./d3":85,"./diagrams/example/exampleDb":86,"./diagrams/example/exampleRenderer":87,"./diagrams/example/parser/example":88,"./diagrams/flowchart/flowRenderer":90,"./diagrams/flowchart/graphDb":91,"./diagrams/flowchart/parser/dot":92,"./diagrams/flowchart/parser/flow":93,"./diagrams/gantt/ganttDb":94,"./diagrams/gantt/ganttRenderer":95,"./diagrams/gantt/parser/gantt":96,"./diagrams/sequenceDiagram/parser/sequenceDiagram":97,"./diagrams/sequenceDiagram/sequenceDb":98,"./diagrams/sequenceDiagram/sequenceRenderer":99,"./logger":102,"./utils":103}],102:[function(t,e,n){(function(t){var e;e=function(){function e(t){var n,r,i;this.options=t||{},this.level=this.options.level||e.levels.default,i=e.levels;for(n in i)r=i[n],e.define(this,n)}function n(t){var e=t.getUTCHours(),n=t.getUTCMinutes(),r=t.getSeconds(),i=t.getMilliseconds();10>e&&(e="0"+e),10>n&&(n="0"+n),10>r&&(r="0"+r),100>i&&(i="0"+i),10>i&&(i="00"+i);var a=e+":"+n+":"+r+" ("+i+")";return a}return e.prototype.add=function(n,r,i){return this.level>(e.levels[n]||5)?void 0:(i?r=i():"function"==typeof r&&(r=r()),this.write({timestamp:new Date,severity:n,message:r,pid:t.pid}))},e.prototype.write=function(t){return"undefined"!=typeof console&&"undefined"!=typeof log.debug?log.debug(this.build_message(t)):void 0},e.prototype.build_message=function(t){return"["+n(t.timestamp)+"] "+t.message},e}(),e.define=function(t,e){return t[e]=function(t,n){return this.add(e,t,n)}},e.levels={debug:1,info:2,warn:3,error:4,fatal:5,"default":3},n.create=function(t,n){return new e(n)}}).call(this,t("1YiZ5S"))},{"1YiZ5S":81}],103:[function(t,e){t("./logger").create();e.exports.detectType=function(t){return t.match(/^\s*sequenceDiagram/)?"sequenceDiagram":t.match(/^\s*sequence/)?"sequence":t.match(/^\s*digraph/)?"dotGraph":t.match(/^\s*info/)?"info":t.match(/^\s*gantt/)?"gantt":"graph"},e.exports.cloneCssStyles=function(t,e){for(var n="",r=document.styleSheets,i=0;i<r.length;i++)if("mermaid-svg-internal-css"!==r[i].title)try{var a=r[i].cssRules;if(null!==a)for(var s=0;s<a.length;s++){var o=a[s];if("undefined"!=typeof o.style){var u;u=t.querySelectorAll(o.selectorText),u.length>0&&(n+=o.selectorText+" { "+o.style.cssText+" }\n")}}}catch(c){"undefined"!=typeof console&&"undefined"!==console.warn&&"undefined"!==o&&console.warn('Invalid CSS selector "'+o.selectorText+'"',c)}var l="",h="";for(var d in e)e.hasOwnProperty(d)&&"undefined"!=typeof d&&("default"===d?(e.default.styles instanceof Array&&(l+="#"+t.id.trim()+" .node { "+e[d].styles.join("; ")+"; }\n"),e.default.nodeLabelStyles instanceof Array&&(l+="#"+t.id.trim()+" .node text { "+e[d].nodeLabelStyles.join("; ")+"; }\n"),e.default.edgeLabelStyles instanceof Array&&(l+="#"+t.id.trim()+" .edgeLabel text { "+e[d].edgeLabelStyles.join("; ")+"; }\n"),e.default.clusterStyles instanceof Array&&(l+="#"+t.id.trim()+" .cluster rect { "+e[d].clusterStyles.join("; ")+"; }\n")):e[d].styles instanceof Array&&(h+="#"+t.id.trim()+" ."+d+" { "+e[d].styles.join("; ")+"; }\n"));if(""!==n||""!==l||""!==h){var f=document.createElement("style");f.setAttribute("type","text/css"),f.setAttribute("title","mermaid-svg-internal-css"),f.innerHTML="/* <![CDATA[ */\n",""!==l&&(f.innerHTML+=l),""!==n&&(f.innerHTML+=n),""!==h&&(f.innerHTML+=h),f.innerHTML+="/* ]]> */\n",t.insertBefore(f,t.firstChild)}}},{"./logger":102}]},{},[101]); |