Socket
Socket
Sign inDemoInstall

mermaid

Package Overview
Dependencies
Maintainers
1
Versions
230
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mermaid - npm Package Compare versions

Comparing version 0.5.1 to 0.5.2

.tern-project

10

gulp/tasks/dist.js

@@ -27,3 +27,3 @@ var gulp = require('gulp');

.pipe(browserify())
/*.pipe(browserify({standalone: 'mermaid'}))
/*.pipe(browserify({standalone: 'mermaid'}))
.on('prebundle', function(bundle) {

@@ -72,3 +72,4 @@ // Keep these external for the slim version.

external: ['d3'],
entry:'src/mermaid.js'
entry:'src/mermaid.js',
standalone: 'mermaid'
}))

@@ -79,3 +80,3 @@ .pipe(rename('mermaid.slim.js'))

// if(external.expose){
// bundle.require(external.require, {expose: external.expose} )
// bundle.require(external.require, {expose: external.expose} )
// }

@@ -98,3 +99,4 @@ // else{

.pipe(browserify({
entry:'src/mermaid.js'
entry:'src/mermaid.js',
standalone: 'mermaid'
}))

@@ -101,0 +103,0 @@ .pipe(rename('mermaid.js'))

3

gulp/tasks/release.js
var gulp = require('gulp');
var bump = require('gulp-bump');

@@ -31,3 +32,3 @@ gulp.task('bump', function(){

// get all the files to bump version in
return gulp.src(['./package.json', './bower.json'])
return gulp.src(['./package.json'])
// bump the version number in those files

@@ -34,0 +35,0 @@ .pipe(bump({type: importance}))

@@ -17,2 +17,5 @@ var gulp = require('gulp');

var qunit = require('gulp-qunit');
var bower = require('gulp-bower');
// Using gulp-jshint and jshint-stylish

@@ -25,3 +28,3 @@ gulp.task('lint', function() {

gulp.task('test',['coverage','tape','jasmine']);
gulp.task('test',['coverage','tape','jasmine','qunit']);

@@ -49,2 +52,12 @@ gulp.task('jasmine',['jison','lint'], function () {

});
});
});
gulp.task('qunit', ['usageTestsBower'], function() {
return gulp.src('test/usageTests/requireTest.html')
.pipe(qunit());
});
gulp.task('usageTestsBower', function() {
return bower({cwd: 'test/usageTests'})
.pipe(gulp.dest('test/usageTests/bower_components'));
});

@@ -7,2 +7,3 @@ var fs = require('fs')

, semver = require('semver')
, path = require('path')

@@ -113,2 +114,4 @@ var PHANTOM_VERSION = "^1.9.0"

}
} else {
options.css = fs.readFileSync(path.join(__dirname, '..', 'dist', 'mermaid.css'))
}

@@ -115,0 +118,0 @@

@@ -213,2 +213,5 @@ /**

, svgValue
, boundingBox
, width
, height

@@ -228,9 +231,15 @@ toRemove = document.getElementsByClassName('mermaid')

document.body.appendChild(el)
mermaid.initialize({
sequenceDiagram:{useMaxWidth:false}
});
if(typeof sequenceConfig !== undefined && sequenceConfig !== 'undefined'){
sc = document.createElement("script")
scContent = document.createTextNode('mermaid.sequenceConfig = JSON.parse(' + JSON.stringify(sequenceConfig) + ');')
sc.appendChild(scContent)
//sc = document.createElement("script")
//scContent = document.createTextNode('mermaid.sequenceConfig = JSON.parse(' + JSON.stringify(sequenceConfig) + ');')
//sc.appendChild(scContent)
document.body.appendChild(sc)
//document.body.appendChild(sc)
mermaid.initialize({
sequenceDiagram:JSON.parse(sequenceConfig)
});
}

@@ -245,3 +254,2 @@

}else{
console.log('NO gantt config');
sc = document.createElement("script")

@@ -254,13 +262,35 @@ scContent = document.createTextNode('mermaid.ganttConfig = {useWidth:1200};')

mermaid.initialize({
sequenceDiagram:{useMaxWidth:false}
});
mermaid.init();
svg = document.querySelector('svg')
boundingBox = svg.getBoundingClientRect(); // the initial bonding box of the svg
width = boundingBox.width * 1.5; // adding the scale factor for consistency with output in chrome browser
height = boundingBox.height * 1.5; // adding the scale factor for consistency with output in chrome browser
// resizing the body to fit the svg
document.body.setAttribute(
'style'
, 'width: ' + width + '; height: ' + height + ';'
)
// resizing the svg via css for consistent display
svg.setAttribute(
'style'
, 'width: ' + width + '; height: ' + height + ';'
)
// set witdth and height attributes used to set the viewport when rending png image
svg.setAttribute(
'width'
, width
)
svg.setAttribute(
'height'
, height
)
svgValue = xmlSerializer.serializeToString(svg)
//console.log(document.body.outerHTML);
return svgValue
}
{
"name": "mermaid",
"version": "0.5.1",
"version": "0.5.2",
"description": "Markdownish syntax for generating flowcharts, sequence diagrams and gantt charts.",

@@ -17,3 +17,5 @@ "main": "src/mermaid.js",

"scripts": {
"test": "gulp test"
"watch": "watchify src/mermaid.js -o dist/mermaid.js",
"doc": "rm -r build;rm -r dist/www;gulp vartree;cp dist/www/all.html ../mermaid-pages/index.html;cp dist/mermaid.js ../mermaid-pages/javascripts/lib;cp dist/mermaid.forest.css ../mermaid-pages/stylesheets",
"test": "./node_modules/.bin/gulp dist && ./node_modules/.bin/gulp test"
},

@@ -45,2 +47,3 @@ "repository": {

"dateformat": "^1.0.11",
"dox": "^0.8.0",
"event-stream": "^3.2.0",

@@ -51,2 +54,3 @@ "express": "^4.12.4",

"gulp": "~3.8.9",
"gulp-bower": "0.0.10",
"gulp-browserify": "^0.5.0",

@@ -56,4 +60,6 @@ "gulp-bump": "^0.1.11",

"gulp-data": "^1.1.1",
"gulp-ext-replace": "~0.1.0",
"gulp-dox": "^0.1.6",
"gulp-ext-replace": "^0.2.0",
"gulp-filelog": "^0.4.1",
"gulp-front-matter": "^1.2.3",
"gulp-hogan": "^1.1.0",

@@ -68,2 +74,5 @@ "gulp-if": "^1.2.5",

"gulp-livereload": "^3.8.0",
"gulp-marked": "^1.0.0",
"gulp-mdvars": "^2.0.0",
"gulp-qunit": "~1.2.1",
"gulp-rename": "~1.2.0",

@@ -73,2 +82,3 @@ "gulp-shell": "^0.2.10",

"gulp-uglify": "~1.0.1",
"gulp-vartree": "^2.0.1",
"he": "^0.5.0",

@@ -91,2 +101,3 @@ "hogan.js": "^3.0.2",

"lodash.values": "^2.4.1",
"map-stream": "0.0.6",
"marked": "^0.3.2",

@@ -97,2 +108,4 @@ "mock-browser": "^0.90.27",

"proxyquire": "^1.3.1",
"readable-stream": "^2.0.2",
"replacestream": "^4.0.0",
"require-dir": "^0.3.0",

@@ -99,0 +112,0 @@ "rewire": "^2.1.3",

/* global window */
//console.log('Setting up d3');
//log.debug('Setting up d3');
var d3;

@@ -9,8 +9,8 @@

} catch (e) {
console.log('Exception ... but ok');
//console.log(e);
//log.debug('Exception ... but ok');
//log.debug(e);
}
}
//console.log(d3);
//log.debug(d3);

@@ -26,17 +26,17 @@ if (!d3) {

//}
//console.log('window');
//console.log(window);
//log.debug('window');
//log.debug(window);
module.exports = d3;
/* jshint ignore:start */
/*
D3 Text Wrap
By Vijith Assar
http://www.vijithassar.com
http://www.github.com/vijithassar
@vijithassar
D3 Text Wrap
By Vijith Assar
http://www.vijithassar.com
http://www.github.com/vijithassar
@vijithassar
Detailed instructions at http://www.github.com/vijithassar/d3textwrap
Detailed instructions at http://www.github.com/vijithassar/d3textwrap
*/
*/

@@ -91,3 +91,3 @@ (function() {

return false;
// if it's a rect, proceed to extracting the position attributes
// if it's a rect, proceed to extracting the position attributes
} else {

@@ -128,17 +128,17 @@ var bounds_extracted = {};

(typeof bounds.height !== 'undefined')
// if that's the case, then the bounds are fine
// if that's the case, then the bounds are fine
) {
// return the lightly modified bounds
return bounds;
// if it's a numerically indexed array, assume it's a
// d3-selected rect and try to extract the positions
// if it's a numerically indexed array, assume it's a
// d3-selected rect and try to extract the positions
} else if (
// first try to make sure it's an array using Array.isArray
(
(typeof Array.isArray == 'function') &&
(Array.isArray(bounds))
) ||
// but since Array.isArray isn't always supported, fall
// back to casting to the object to string when it's not
(Object.prototype.toString.call(bounds) === '[object Array]')
// first try to make sure it's an array using Array.isArray
(
(typeof Array.isArray == 'function') &&
(Array.isArray(bounds))
) ||
// but since Array.isArray isn't always supported, fall
// back to casting to the object to string when it's not
(Object.prototype.toString.call(bounds) === '[object Array]')
) {

@@ -150,5 +150,5 @@ // once you're sure it's an array, extract the boundaries

} else {
// but if the bounds are neither an object nor a numerical
// array, then the bounds argument is invalid and you'll
// need to fix it
// but if the bounds are neither an object nor a numerical
// array, then the bounds argument is invalid and you'll
// need to fix it
return false;

@@ -180,9 +180,9 @@ }

// selection it's operating on cannot be not empty
(selection.length == 0) ||
(selection.length == 0) ||
// d3 must be available
(!d3) ||
(!d3) ||
// desired wrapping bounds must be provided as an input argument
(!bounds) ||
(!bounds) ||
// input bounds must validate
(!verified_bounds)
(!verified_bounds)
) {

@@ -194,10 +194,10 @@ // try to return the calling selection if possible

return selection;
// if all else fails, just return false. if you hit this point then you're
// almost certainly trying to call the textwrap() method on something that
// doesn't make sense!
// if all else fails, just return false. if you hit this point then you're
// almost certainly trying to call the textwrap() method on something that
// doesn't make sense!
} else {
return false;
}
// if we've validated everything then we can finally proceed
// to the meat of this operation
// if we've validated everything then we can finally proceed
// to the meat of this operation
} else {

@@ -251,2 +251,3 @@

// wrap with tspans if foreignObject is undefined

@@ -366,2 +367,8 @@ var wrap_with_tspans = function(item) {

text_node_selected.text(word);
// Handle case where there is just one more word to be wrapped
if(i == text_to_wrap_array.length - 1) {
new_string = word;
text_node_selected.text(new_string);
new_width = text_node.getComputedTextLength();
}
}

@@ -372,3 +379,3 @@ }

// appending anything further to it
else if(i == text_to_wrap_array.length - 1) {
if(i == text_to_wrap_array.length - 1) {
text_node_selected.text('');

@@ -387,18 +394,2 @@ var final_string = new_string;

// position the overall text node
text_node_selected.attr('y', function() {
var y_offset = bounds.y;
// shift by line-height to move the baseline into
// the bounds – otherwise the text baseline would be
// at the top of the bounds
if(line_height) {y_offset += line_height;}
return y_offset;
});
// shift to the right by the padding value
if(padding) {
text_node_selected
.attr('x', bounds.x)
;
}
// append each substring as a tspan

@@ -431,15 +422,16 @@ var current_tspan;

current_tspan
// .attr('dx', function() {
// if(i == 0) {
// var render_offset = 0;
// } else if(i > 0) {
// render_offset = substrings[i - 1].width;
// render_offset = render_offset * -1;
// }
// return render_offset;
// })
.attr('x', function() {
return bounds.x;
var x_offset = bounds.x;
if(padding) {x_offset += padding;}
return x_offset;
});
// .attr('dx', function() {
// if(i == 0) {
// var render_offset = 0;
// } else if(i > 0) {
// render_offset = substrings[i - 1].width;
// render_offset = render_offset * -1;
// }
// return render_offset;
// });
}

@@ -449,2 +441,21 @@ }

}
// position the overall text node, whether wrapped or not
text_node_selected.attr('y', function() {
var y_offset = bounds.y;
// shift by line-height to move the baseline into
// the bounds – otherwise the text baseline would be
// at the top of the bounds
if(line_height) {y_offset += line_height;}
// shift by padding, if it's there
if(padding) {y_offset += padding;}
return y_offset;
});
// shift to the right by the padding value
text_node_selected.attr('x', function() {
var x_offset = bounds.x;
if(padding) {x_offset += padding;}
return x_offset;
});
// assign our modified text node with tspans

@@ -495,2 +506,3 @@ // to the return value

})();
})();
/* jshint ignore:end */

@@ -10,3 +10,3 @@ /**

parseError = function(err, hash) {
console.log('Syntax error:' + err);
log.debug('Syntax error:' + err);
};

@@ -13,0 +13,0 @@ //ex.yy.parseError = parseError;

/**
* Created by knut on 15-01-14.
*/
var log = require('../../logger').create();
var message = '';

@@ -25,3 +25,3 @@ var info = false;

exports.parseError = function(err,hash){
mermaid.parseError(err,hash);
mermaidAPI.parseError(err,hash);
};

@@ -7,3 +7,3 @@ /**

var d3 = require('../../d3');
var log = require('../../logger').create();
/**

@@ -10,0 +10,0 @@ * Draws a an info picture in the tag with id: id based on the graph definition in text.

@@ -756,3 +756,3 @@ /* parser generated by jison 0.4.15 */

break;
case 18:console.log('edia: '+yy_.yytext);return "DIAMOND";
case 18:log.debug('edia: '+yy_.yytext);return "DIAMOND";
break;

@@ -759,0 +759,0 @@ case 19:this.begin("diamondVertex");

/* global window */
var log = require('../../logger').create();
var dagreD3;
//console.log('setting up dagre-d3');
//log.debug('setting up dagre-d3');
if (require) {
try {
dagreD3 = require("dagre-d3");
//console.log('Got it (dagre-d3)');
} catch (e) {console.log('Could not load dagre-d3');}
//log.debug('Got it (dagre-d3)');
} catch (e) {log.debug('Could not load dagre-d3');}
}

@@ -11,0 +11,0 @@

@@ -9,2 +9,4 @@ /**

var dagreD3 = require('./dagre-d3');
var log = require('../../logger').create();
var conf = {

@@ -53,3 +55,3 @@ };

//console.log(vertice.classes);
//log.debug(vertice.classes);

@@ -108,2 +110,6 @@ if(vertice.classes.length >0){

break;
case 'group':
_shape = 'rect';
verticeText = '';
break;
default:

@@ -214,5 +220,2 @@ _shape = 'rect';

var classDefStylesObj = {};
var classDefStyleStr = '';
var classes = graph.getClasses();

@@ -223,3 +226,4 @@

classes.default = {id:'default'};
classes.default.styles = ['fill:#ffa','stroke:#666','stroke-width:3px'];
//classes.default.styles = ['fill:#ffa','stroke:#666','stroke-width:3px'];
classes.default.styles = [];
classes.default.clusterStyles = ['rx:4px','fill: rgb(255, 255, 222)','rx: 4px','stroke: rgb(170, 170, 51)','stroke-width: 1px'];

@@ -238,3 +242,3 @@ classes.default.nodeLabelStyles = ['fill:#000','stroke:none','font-weight:300','font-family:"Helvetica Neue",Helvetica,Arial,sans-serf','font-size:14px'];

exports.draw = function (text, id,isDot) {
log.debug('Drawing flowchart');
var parser;

@@ -286,3 +290,3 @@ graph.clear();

subG = subGraphs[i];
graph.addVertex(subG.id,undefined,undefined,undefined);
graph.addVertex(subG.id,subG.title,'group',undefined);
}

@@ -293,3 +297,3 @@

//console.log(vert);
//log.debug(vert);
var edges = graph.getEdges();

@@ -305,3 +309,3 @@

for(j=0;j<subG.nodes.length;j++){
//console.log('Setting node',subG.nodes[j],' to subgraph '+id);
//log.debug('Setting node',subG.nodes[j],' to subgraph '+id);
g.setParent(subG.nodes[j],subG.id);

@@ -406,3 +410,15 @@ }

// Run the renderer. This is what draws the final graph.
render(d3.select("#" + id + " g"), g);
var element = d3.select("#" + id + " g");
render(element, g);
//var tip = d3.tip().html(function(d) { return d; });
element.selectAll("g.node")
.attr("title", function(){
return graph.getTooltip(this.id);
});
//
//element.selectAll("g.node")
// .attr("title", function(v) { return styleTooltip(v, g.node(v).description) })
// .each(function(v) { $(this).tipsy({ gravity: "w", opacity: 1, html: true }); });
var svgb = document.querySelector("#" + id);

@@ -425,3 +441,3 @@

svg.attr("height", '100%');
svg.attr("width", '100%');
svg.attr("width", conf.width);
//svg.attr("viewBox", svgb.getBBox().x + ' 0 '+ g.graph().width+' '+ g.graph().height);

@@ -444,3 +460,3 @@ svg.attr("viewBox", '0 0 ' + (g.graph().width + 20) + ' ' + (g.graph().height + 20));

// Index nodes
graph.indexNodes('sunGraph'+i);
graph.indexNodes('subGraph'+i);

@@ -453,3 +469,3 @@ for(i=0;i<subGraphs.length;i++){

var clusterRects = document.querySelectorAll('#' + id + ' #' + subG.id + ' rect');
//console.log('looking up: #' + id + ' #' + subG.id)
//log.debug('looking up: #' + id + ' #' + subG.id)
var clusterEl = document.querySelectorAll('#' + id + ' #' + subG.id);

@@ -456,0 +472,0 @@

/**
* Created by knut on 14-11-03.
*/
var log = require('../../logger').create();
var vertices = {};

@@ -9,2 +9,3 @@ var edges = [];

var subGraphs = [];
var tooltips = {};
var subCount=0;

@@ -67,3 +68,3 @@ var direction;

exports.addLink = function (start, end, type, linktext) {
//console.log('Got edge', start, end);
//log.debug('Got edge', start, end);
var edge = {start: start, end: end, type: undefined, text: ''};

@@ -141,2 +142,43 @@ linktext = type.text;

};
var setTooltip = function(id,tooltip){
if(typeof tooltip !== 'undefined'){
tooltips[id]=tooltip;
}
};
var setClickFun = function(id, functionName){
if(typeof functionName === 'undefined'){
return;
}
if (typeof vertices[id] !== 'undefined') {
funs.push(function (element) {
var elem = d3.select(element).select('#'+id);
if (elem !== null) {
elem.on('click', function () {
eval(functionName + '(\'' + id + '\')'); // jshint ignore:line
});
}
});
}
};
var setLink = function(id, linkStr){
if(typeof linkStr === 'undefined'){
return;
}
if (typeof vertices[id] !== 'undefined') {
funs.push(function (element) {
var elem = d3.select(element).select('#'+id);
if (elem !== null) {
elem.on('click', function () {
window.open(linkStr,'newTab'); // jshint ignore:line
});
}
});
}
};
exports.getTooltip = function(id){
return tooltips[id];
};
var clickEvents = [];

@@ -147,39 +189,19 @@ /**

*/
exports.setClickEvent = function (id,functionName) {
exports.setClickEvent = function (id,functionName, link,tooltip) {
if(id.indexOf(',')>0){
id.split(',').forEach(function(id2) {
if (typeof vertices[id2] !== 'undefined') {
funs.push(function () {
var elem = document.getElementById(id2);
if (elem !== null) {
elem.onclick = function () {
eval(functionName + '(\'' + id2 + '\')'); // jshint ignore:line
};
}
});
}
setTooltip(id2,tooltip);
setClickFun(id2, functionName);
setLink(id2, link);
});
}else{
//console.log('Checking now for ::'+id);
if(typeof vertices[id] !== 'undefined'){
funs.push(function(){
var elem = document.getElementById(id);
if(elem !== null){
elem.onclick = function(){eval(functionName+'(\'' + id + '\')');}; // jshint ignore:line
}
else{
//console.log('id was null: '+id);
}
});
}
setTooltip(id,tooltip);
setClickFun(id, functionName);
setLink(id, link);
}
};
exports.bindFunctions = function(){
exports.bindFunctions = function(element){
funs.forEach(function(fun){
fun();
fun(element);
});

@@ -214,2 +236,44 @@ };

var setupToolTips = function(element){
var tooltipElem = d3.select('.mermaidTooltip');
if(tooltipElem[0][0] === null){
tooltipElem = d3.select("body")
.append("div")
.attr("class", "mermaidTooltip")
.style("opacity", 0);
}
var svg = d3.select(element).select('svg');
var nodes = svg.selectAll("g.node");
nodes
.on("mouseover", function(d) {
var el = d3.select(this);
var title = el.attr('title');
// Dont try to draw a tooltip if no data is provided
if(title === null){
return;
}
var rect = this.getBoundingClientRect();
tooltipElem.transition()
.duration(200)
.style("opacity", '.9');
tooltipElem.html(el.attr('title'))
.style("left", (rect.left+(rect.right-rect.left)/2) + "px")
.style("top", (rect.top-14+document.body.scrollTop) + "px");
el.classed('hover',true);
})
.on("mouseout", function(d) {
tooltipElem.transition()
.duration(500)
.style("opacity", 0);
var el = d3.select(this);
el.classed('hover',false);
});
};
funs.push(setupToolTips);
/**

@@ -222,5 +286,7 @@ * Clears the internal graph db so that a new graph can be parsed.

edges = [];
//funs = [];
funs = [];
funs.push(setupToolTips);
subGraphs = [];
subCount = 0;
tooltips = [];
};

@@ -260,4 +326,4 @@ /**

var subGraph = {id:'subGraph'+subCount, nodes:nodeList,title:title};
//console.log('subGraph:' + subGraph.title + subGraph.id);
//console.log(subGraph.nodes);
//log.debug('subGraph:' + subGraph.title + subGraph.id);
//log.debug(subGraph.nodes);
subGraphs.push(subGraph);

@@ -272,7 +338,7 @@ subCount = subCount + 1;

if(subGraphs[i].id===id){
//console.log('Found pos for ',id,' ',i);
//log.debug('Found pos for ',id,' ',i);
return i;
}
}
//console.log('No pos found for ',id,' ',i);
//log.debug('No pos found for ',id,' ',i);
return -1;

@@ -343,3 +409,3 @@ };

exports.parseError = function(err,hash){
mermaid.parseError(err,hash);
mermaidAPI.parseError(err,hash);
};

@@ -75,3 +75,3 @@ /* parser generated by jison 0.4.15 */

var parser = (function(){
var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,4],$V1=[1,3],$V2=[1,5],$V3=[1,8,9,10,11,13,30,69,70,71,72,73,79,83,85,86,88,89,91,92,93],$V4=[2,2],$V5=[1,12],$V6=[1,13],$V7=[1,14],$V8=[1,15],$V9=[1,31],$Va=[1,22],$Vb=[1,24],$Vc=[1,25],$Vd=[1,26],$Ve=[1,27],$Vf=[1,28],$Vg=[1,34],$Vh=[1,36],$Vi=[1,33],$Vj=[1,35],$Vk=[1,41],$Vl=[1,40],$Vm=[1,37],$Vn=[1,38],$Vo=[1,39],$Vp=[1,8,9,10,11,13,30,32,69,70,71,72,73,79,83,85,86,88,89,91,92,93],$Vq=[1,49],$Vr=[1,48],$Vs=[1,50],$Vt=[1,68],$Vu=[1,76],$Vv=[1,77],$Vw=[1,62],$Vx=[1,61],$Vy=[1,81],$Vz=[1,80],$VA=[1,78],$VB=[1,79],$VC=[1,69],$VD=[1,64],$VE=[1,63],$VF=[1,59],$VG=[1,71],$VH=[1,72],$VI=[1,73],$VJ=[1,74],$VK=[1,75],$VL=[1,66],$VM=[1,65],$VN=[8,9,11],$VO=[8,9,11,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62],$VP=[1,110],$VQ=[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],$VR=[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],$VS=[1,113],$VT=[1,114],$VU=[8,9,10,11,13,30,32,69,70,71,72,73,79,83,85,86,88,89,91,92,93],$VV=[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],$VW=[13,79,83,85,86,88,89,91,92,93],$VX=[13,47,63,79,83,85,86,88,89,91,92,93],$VY=[1,186],$VZ=[1,183],$V_=[1,190],$V$=[1,187],$V01=[1,184],$V11=[1,191],$V21=[1,181],$V31=[1,182],$V41=[1,185],$V51=[1,188],$V61=[1,189],$V71=[1,204],$V81=[8,9,11,83],$V91=[8,9,10,11,44,69,78,79,81,83,85,86,87,88,89];
var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,4],$V1=[1,3],$V2=[1,5],$V3=[1,8,9,10,11,13,18,30,44,69,70,71,72,73,79,83,85,86,88,89,91,92,93],$V4=[2,2],$V5=[1,12],$V6=[1,13],$V7=[1,14],$V8=[1,15],$V9=[1,31],$Va=[1,33],$Vb=[1,22],$Vc=[1,34],$Vd=[1,24],$Ve=[1,25],$Vf=[1,26],$Vg=[1,27],$Vh=[1,28],$Vi=[1,36],$Vj=[1,38],$Vk=[1,35],$Vl=[1,37],$Vm=[1,43],$Vn=[1,42],$Vo=[1,39],$Vp=[1,40],$Vq=[1,41],$Vr=[1,8,9,10,11,13,18,30,32,44,69,70,71,72,73,79,83,85,86,88,89,91,92,93],$Vs=[1,51],$Vt=[1,50],$Vu=[1,52],$Vv=[1,70],$Vw=[1,78],$Vx=[1,79],$Vy=[1,64],$Vz=[1,63],$VA=[1,83],$VB=[1,82],$VC=[1,80],$VD=[1,81],$VE=[1,71],$VF=[1,66],$VG=[1,65],$VH=[1,61],$VI=[1,73],$VJ=[1,74],$VK=[1,75],$VL=[1,76],$VM=[1,77],$VN=[1,68],$VO=[1,67],$VP=[8,9,11],$VQ=[8,9,11,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62],$VR=[1,112],$VS=[8,9,10,11,13,15,18,36,38,40,44,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,79,83,85,86,88,89,91,92,93],$VT=[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],$VU=[1,114],$VV=[1,115],$VW=[8,9,10,11,13,18,30,32,44,69,70,71,72,73,79,83,85,86,88,89,91,92,93],$VX=[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],$VY=[13,18,44,79,83,85,86,88,89,91,92,93],$VZ=[13,18,44,47,63,79,83,85,86,88,89,91,92,93],$V_=[1,186],$V$=[1,183],$V01=[1,190],$V11=[1,187],$V21=[1,184],$V31=[1,191],$V41=[1,181],$V51=[1,182],$V61=[1,185],$V71=[1,188],$V81=[1,189],$V91=[1,205],$Va1=[8,9,11,83],$Vb1=[8,9,10,11,44,69,78,79,81,83,85,86,87,88,89];
var parser = {trace: function trace() { },

@@ -81,3 +81,3 @@ yy: {},

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]],
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,1],[42,1],[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],[29,7],[29,5],[29,7],[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 anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {

@@ -98,3 +98,3 @@ /* this == yyval */

break;
case 4: case 55: case 57: case 58: case 89: case 91: case 92: case 105:
case 4: case 55: case 57: case 58: case 90: case 92: case 93: case 106:
this.$=$$[$0];

@@ -171,114 +171,126 @@ break;

break;
case 56: case 90: case 93: case 106:
case 56: case 91: case 94: case 107:
this.$=$$[$0-1]+''+$$[$0];
break;
case 59:
this.$=$$[$0-2]+'-'+$$[$0];
this.$='v';
break;
case 60:
this.$='-';
break;
case 61:
$$[$0-1].text = $$[$0];this.$ = $$[$0-1];
break;
case 61: case 62:
case 62: case 63:
$$[$0-2].text = $$[$0-1];this.$ = $$[$0-2];
break;
case 63:
case 64:
this.$ = $$[$0];
break;
case 64:
case 65:
this.$ = {"type":"arrow","stroke":"normal","text":$$[$0-1]};
break;
case 65:
case 66:
this.$ = {"type":"arrow_circle","stroke":"normal","text":$$[$0-1]};
break;
case 66:
case 67:
this.$ = {"type":"arrow_cross","stroke":"normal","text":$$[$0-1]};
break;
case 67:
case 68:
this.$ = {"type":"arrow_open","stroke":"normal","text":$$[$0-1]};
break;
case 68:
case 69:
this.$ = {"type":"arrow","stroke":"dotted","text":$$[$0-1]};
break;
case 69:
case 70:
this.$ = {"type":"arrow_circle","stroke":"dotted","text":$$[$0-1]};
break;
case 70:
case 71:
this.$ = {"type":"arrow_cross","stroke":"dotted","text":$$[$0-1]};
break;
case 71:
case 72:
this.$ = {"type":"arrow_open","stroke":"dotted","text":$$[$0-1]};
break;
case 72:
case 73:
this.$ = {"type":"arrow","stroke":"thick","text":$$[$0-1]};
break;
case 73:
case 74:
this.$ = {"type":"arrow_circle","stroke":"thick","text":$$[$0-1]};
break;
case 74:
case 75:
this.$ = {"type":"arrow_cross","stroke":"thick","text":$$[$0-1]};
break;
case 75:
case 76:
this.$ = {"type":"arrow_open","stroke":"thick","text":$$[$0-1]};
break;
case 76:
case 77:
this.$ = {"type":"arrow","stroke":"normal"};
break;
case 77:
case 78:
this.$ = {"type":"arrow_circle","stroke":"normal"};
break;
case 78:
case 79:
this.$ = {"type":"arrow_cross","stroke":"normal"};
break;
case 79:
case 80:
this.$ = {"type":"arrow_open","stroke":"normal"};
break;
case 80:
case 81:
this.$ = {"type":"arrow","stroke":"dotted"};
break;
case 81:
case 82:
this.$ = {"type":"arrow_circle","stroke":"dotted"};
break;
case 82:
case 83:
this.$ = {"type":"arrow_cross","stroke":"dotted"};
break;
case 83:
case 84:
this.$ = {"type":"arrow_open","stroke":"dotted"};
break;
case 84:
case 85:
this.$ = {"type":"arrow","stroke":"thick"};
break;
case 85:
case 86:
this.$ = {"type":"arrow_circle","stroke":"thick"};
break;
case 86:
case 87:
this.$ = {"type":"arrow_cross","stroke":"thick"};
break;
case 87:
case 88:
this.$ = {"type":"arrow_open","stroke":"thick"};
break;
case 88:
case 89:
this.$ = $$[$0-1];
break;
case 107: case 108:
case 108: case 109:
this.$ = $$[$0-4];yy.addClass($$[$0-2],$$[$0]);
break;
case 109:
case 110:
this.$ = $$[$0-4];yy.setClass($$[$0-2], $$[$0]);
break;
case 110:
this.$ = $$[$0-4];yy.setClickEvent($$[$0-2], $$[$0]);
case 111:
this.$ = $$[$0-4];yy.setClickEvent($$[$0-2], $$[$0], undefined, undefined);
break;
case 111:
case 112:
this.$ = $$[$0-6];yy.setClickEvent($$[$0-4], $$[$0-2], undefined, $$[$0]) ;
break;
case 113:
this.$ = $$[$0-4];yy.setClickEvent($$[$0-2], undefined, $$[$0], undefined);
break;
case 114:
this.$ = $$[$0-6];yy.setClickEvent($$[$0-4], undefined, $$[$0-2], $$[$0] );
break;
case 115:
this.$ = $$[$0-4];yy.addVertex($$[$0-2],undefined,undefined,$$[$0]);
break;
case 112: case 113: case 114:
case 116: case 117: case 118:
this.$ = $$[$0-4];yy.updateLink($$[$0-2],$$[$0]);
break;
case 116:
case 120:
this.$ = [$$[$0]]
break;
case 117:
case 121:
$$[$0-2].push($$[$0]);this.$ = $$[$0-2];
break;
case 119:
case 123:
this.$ = $$[$0-1] + $$[$0];

@@ -288,3 +300,3 @@ break;

},
table: [{3:1,4:2,9:$V0,10:$V1,12:$V2},{1:[3]},o($V3,$V4,{5:6}),{4:7,9:$V0,10:$V1,12:$V2},{4:8,9:$V0,10:$V1,12:$V2},{10:[1,9]},{1:[2,1],6:10,7:11,8:$V5,9:$V6,10:$V7,11:$V8,13:$V9,23:16,25:17,26:18,27:19,28:20,29:21,30:$Va,33:23,35:29,42:30,43:32,69:$Vb,70:$Vc,71:$Vd,72:$Ve,73:$Vf,79:$Vg,83:$Vh,85:$Vi,86:$Vj,88:$Vk,89:$Vl,91:$Vm,92:$Vn,93:$Vo},o($V3,[2,9]),o($V3,[2,10]),{13:[1,42],15:[1,43],16:[1,44],17:[1,45],18:[1,46]},o($Vp,[2,3]),o($Vp,[2,4]),o($Vp,[2,5]),o($Vp,[2,6]),o($Vp,[2,7]),o($Vp,[2,8]),{8:$Vq,9:$Vr,11:$Vs,24:47},{8:$Vq,9:$Vr,11:$Vs,24:51},{8:$Vq,9:$Vr,11:$Vs,24:52},{8:$Vq,9:$Vr,11:$Vs,24:53},{8:$Vq,9:$Vr,11:$Vs,24:54},{8:$Vq,9:$Vr,11:$Vs,24:55},{8:$Vq,9:$Vr,10:$Vt,11:$Vs,12:$Vu,13:$Vv,15:$Vw,16:$Vx,17:$Vy,18:$Vz,24:57,30:$VA,31:56,32:$VB,43:67,44:$VC,48:$VD,58:$VE,64:58,65:$VF,68:70,69:$VG,70:$VH,71:$VI,72:$VJ,73:$VK,75:60,76:$VL,79:$Vg,81:$VM,83:$Vh,85:$Vi,86:$Vj,88:$Vk,89:$Vl,91:$Vm,92:$Vn,93:$Vo},o($VN,[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]},o($VO,[2,53],{43:32,21:108,42:109,10:$VP,13:$V9,15:[1,107],36:[1,104],38:[1,105],40:[1,106],79:$Vg,83:$Vh,85:$Vi,86:$Vj,88:$Vk,89:$Vl,91:$Vm,92:$Vn,93:$Vo}),o($VQ,[2,55]),o($VQ,[2,57]),o($VQ,[2,58],{44:[1,111]}),o($VR,[2,144]),o($VR,[2,145]),o($VR,[2,146]),o($VR,[2,147]),o($VR,[2,148]),o($VR,[2,149]),o($VR,[2,150]),o($VR,[2,151]),o($VR,[2,152]),{8:$VS,9:$VT,10:$VP,14:112,21:115},{8:$VS,9:$VT,10:$VP,14:116,21:115},{8:$VS,9:$VT,10:$VP,14:117,21:115},{8:$VS,9:$VT,10:$VP,14:118,21:115},{8:$VS,9:$VT,10:$VP,14:119,21:115},o($Vp,[2,30]),o($Vp,[2,38]),o($Vp,[2,39]),o($Vp,[2,40]),o($Vp,[2,31]),o($Vp,[2,32]),o($Vp,[2,33]),o($Vp,[2,34]),o($Vp,[2,35]),{8:$Vq,9:$Vr,10:$Vt,11:$Vs,12:$Vu,13:$Vv,15:$Vw,16:$Vx,17:$Vy,18:$Vz,24:120,30:$VA,32:$VB,43:67,44:$VC,48:$VD,58:$VE,64:121,68:70,69:$VG,70:$VH,71:$VI,72:$VJ,73:$VK,75:60,76:$VL,79:$Vg,81:$VM,83:$Vh,85:$Vi,86:$Vj,88:$Vk,89:$Vl,91:$Vm,92:$Vn,93:$Vo},o($VU,$V4,{5:122}),o($VV,[2,89]),o($VV,[2,91]),o($VV,[2,133]),o($VV,[2,134]),o($VV,[2,135]),o($VV,[2,136]),o($VV,[2,137]),o($VV,[2,138]),o($VV,[2,139]),o($VV,[2,140]),o($VV,[2,141]),o($VV,[2,142]),o($VV,[2,143]),o($VV,[2,94]),o($VV,[2,95]),o($VV,[2,96]),o($VV,[2,97]),o($VV,[2,98]),o($VV,[2,99]),o($VV,[2,100]),o($VV,[2,101]),o($VV,[2,102]),o($VV,[2,103]),o($VV,[2,104]),{13:$V9,33:123,35:29,42:30,43:32,79:$Vg,83:$Vh,85:$Vi,86:$Vj,88:$Vk,89:$Vl,91:$Vm,92:$Vn,93:$Vo},o($VW,[2,63],{46:124,47:[1,125],63:[1,126]}),{10:$Vt,12:$Vu,13:$Vv,15:$Vw,16:$Vx,17:$Vy,18:$Vz,30:$VA,31:127,32:$VB,43:67,44:$VC,48:$VD,58:$VE,64:58,65:$VF,68:70,69:$VG,70:$VH,71:$VI,72:$VJ,73:$VK,75:60,76:$VL,79:$Vg,81:$VM,83:$Vh,85:$Vi,86:$Vj,88:$Vk,89:$Vl,91:$Vm,92:$Vn,93:$Vo},{10:$Vt,12:$Vu,13:$Vv,15:$Vw,16:$Vx,17:$Vy,18:$Vz,30:$VA,31:128,32:$VB,43:67,44:$VC,48:$VD,58:$VE,64:58,65:$VF,68:70,69:$VG,70:$VH,71:$VI,72:$VJ,73:$VK,75:60,76:$VL,79:$Vg,81:$VM,83:$Vh,85:$Vi,86:$Vj,88:$Vk,89:$Vl,91:$Vm,92:$Vn,93:$Vo},{10:$Vt,12:$Vu,13:$Vv,15:$Vw,16:$Vx,17:$Vy,18:$Vz,30:$VA,31:129,32:$VB,43:67,44:$VC,48:$VD,58:$VE,64:58,65:$VF,68:70,69:$VG,70:$VH,71:$VI,72:$VJ,73:$VK,75:60,76:$VL,79:$Vg,81:$VM,83:$Vh,85:$Vi,86:$Vj,88:$Vk,89:$Vl,91:$Vm,92:$Vn,93:$Vo},o($VX,[2,76]),o($VX,[2,77]),o($VX,[2,78]),o($VX,[2,79]),o($VX,[2,80]),o($VX,[2,81]),o($VX,[2,82]),o($VX,[2,83]),o($VX,[2,84]),o($VX,[2,85]),o($VX,[2,86]),o($VX,[2,87]),{13:$V9,35:130,42:30,43:32,78:[1,131],79:$Vg,83:$Vh,85:$Vi,86:$Vj,88:$Vk,89:$Vl,91:$Vm,92:$Vn,93:$Vo},{76:[1,132],79:[1,133]},{13:$V9,35:135,42:30,43:32,76:[1,134],79:$Vg,83:$Vh,85:$Vi,86:$Vj,88:$Vk,89:$Vl,91:$Vm,92:$Vn,93:$Vo},{13:$V9,35:136,42:30,43:32,79:$Vg,83:$Vh,85:$Vi,86:$Vj,88:$Vk,89:$Vl,91:$Vm,92:$Vn,93:$Vo},{13:$V9,35:137,42:30,43:32,79:$Vg,83:$Vh,85:$Vi,86:$Vj,88:$Vk,89:$Vl,91:$Vm,92:$Vn,93:$Vo},{10:$Vt,12:$Vu,13:$Vv,15:$Vw,16:$Vx,17:$Vy,18:$Vz,30:$VA,31:138,32:$VB,43:67,44:$VC,48:$VD,58:$VE,64:58,65:$VF,68:70,69:$VG,70:$VH,71:$VI,72:$VJ,73:$VK,75:60,76:$VL,79:$Vg,81:$VM,83:$Vh,85:$Vi,86:$Vj,88:$Vk,89:$Vl,91:$Vm,92:$Vn,93:$Vo},{10:$Vt,12:$Vu,13:$Vv,15:$Vw,16:$Vx,17:$Vy,18:$Vz,30:$VA,31:140,32:$VB,38:[1,139],43:67,44:$VC,48:$VD,58:$VE,64:58,65:$VF,68:70,69:$VG,70:$VH,71:$VI,72:$VJ,73:$VK,75:60,76:$VL,79:$Vg,81:$VM,83:$Vh,85:$Vi,86:$Vj,88:$Vk,89:$Vl,91:$Vm,92:$Vn,93:$Vo},{10:$Vt,12:$Vu,13:$Vv,15:$Vw,16:$Vx,17:$Vy,18:$Vz,30:$VA,31:141,32:$VB,43:67,44:$VC,48:$VD,58:$VE,64:58,65:$VF,68:70,69:$VG,70:$VH,71:$VI,72:$VJ,73:$VK,75:60,76:$VL,79:$Vg,81:$VM,83:$Vh,85:$Vi,86:$Vj,88:$Vk,89:$Vl,91:$Vm,92:$Vn,93:$Vo},{10:$Vt,12:$Vu,13:$Vv,15:$Vw,16:$Vx,17:$Vy,18:$Vz,30:$VA,31:142,32:$VB,43:67,44:$VC,48:$VD,58:$VE,64:58,65:$VF,68:70,69:$VG,70:$VH,71:$VI,72:$VJ,73:$VK,75:60,76:$VL,79:$Vg,81:$VM,83:$Vh,85:$Vi,86:$Vj,88:$Vk,89:$Vl,91:$Vm,92:$Vn,93:$Vo},o($VO,[2,54]),o($VQ,[2,56]),o($VO,[2,29],{21:143,10:$VP}),{43:144,79:$Vg,83:$Vh,85:$Vi,86:$Vj,88:$Vk,89:$Vl,91:$Vm,92:$Vn,93:$Vo},o($V3,[2,11]),o($V3,[2,21]),o($V3,[2,22]),{9:[1,145]},o($V3,[2,12]),o($V3,[2,13]),o($V3,[2,14]),o($V3,[2,15]),o($VU,$V4,{5:146}),o($VV,[2,90]),{6:10,7:11,8:$V5,9:$V6,10:$V7,11:$V8,13:$V9,23:16,25:17,26:18,27:19,28:20,29:21,30:$Va,32:[1,147],33:23,35:29,42:30,43:32,69:$Vb,70:$Vc,71:$Vd,72:$Ve,73:$Vf,79:$Vg,83:$Vh,85:$Vi,86:$Vj,88:$Vk,89:$Vl,91:$Vm,92:$Vn,93:$Vo},o($VN,[2,41]),o($VW,[2,60],{10:[1,148]}),{10:[1,149]},{10:$Vt,12:$Vu,13:$Vv,15:$Vw,16:$Vx,17:$Vy,18:$Vz,30:$VA,31:150,32:$VB,43:67,44:$VC,48:$VD,58:$VE,64:58,65:$VF,68:70,69:$VG,70:$VH,71:$VI,72:$VJ,73:$VK,75:60,76:$VL,79:$Vg,81:$VM,83:$Vh,85:$Vi,86:$Vj,88:$Vk,89:$Vl,91:$Vm,92:$Vn,93:$Vo},{10:$Vt,12:$Vu,13:$Vv,15:$Vw,16:$Vx,17:$Vy,18:$Vz,30:$VA,32:$VB,43:67,44:$VC,48:$VD,49:[1,151],50:[1,152],51:[1,153],52:[1,154],58:$VE,64:121,68:70,69:$VG,70:$VH,71:$VI,72:$VJ,73:$VK,75:60,76:$VL,79:$Vg,81:$VM,83:$Vh,85:$Vi,86:$Vj,88:$Vk,89:$Vl,91:$Vm,92:$Vn,93:$Vo},{10:$Vt,12:$Vu,13:$Vv,15:$Vw,16:$Vx,17:$Vy,18:$Vz,30:$VA,32:$VB,43:67,44:$VC,48:$VD,54:[1,155],55:[1,156],56:[1,157],57:[1,158],58:$VE,64:121,68:70,69:$VG,70:$VH,71:$VI,72:$VJ,73:$VK,75:60,76:$VL,79:$Vg,81:$VM,83:$Vh,85:$Vi,86:$Vj,88:$Vk,89:$Vl,91:$Vm,92:$Vn,93:$Vo},{10:$Vt,12:$Vu,13:$Vv,15:$Vw,16:$Vx,17:$Vy,18:$Vz,30:$VA,32:$VB,43:67,44:$VC,48:$VD,58:$VE,59:[1,159],60:[1,160],61:[1,161],62:[1,162],64:121,68:70,69:$VG,70:$VH,71:$VI,72:$VJ,73:$VK,75:60,76:$VL,79:$Vg,81:$VM,83:$Vh,85:$Vi,86:$Vj,88:$Vk,89:$Vl,91:$Vm,92:$Vn,93:$Vo},{10:[1,163],13:$V9,42:109,43:32,79:$Vg,83:$Vh,85:$Vi,86:$Vj,88:$Vk,89:$Vl,91:$Vm,92:$Vn,93:$Vo},{10:[1,164]},{10:[1,165]},{10:[1,166]},{10:[1,167]},{10:[1,168],13:$V9,42:109,43:32,79:$Vg,83:$Vh,85:$Vi,86:$Vj,88:$Vk,89:$Vl,91:$Vm,92:$Vn,93:$Vo},{10:[1,169],13:$V9,42:109,43:32,79:$Vg,83:$Vh,85:$Vi,86:$Vj,88:$Vk,89:$Vl,91:$Vm,92:$Vn,93:$Vo},{10:[1,170],13:$V9,42:109,43:32,79:$Vg,83:$Vh,85:$Vi,86:$Vj,88:$Vk,89:$Vl,91:$Vm,92:$Vn,93:$Vo},{10:$Vt,12:$Vu,13:$Vv,15:$Vw,16:$Vx,17:$Vy,18:$Vz,30:$VA,32:$VB,37:[1,171],43:67,44:$VC,48:$VD,58:$VE,64:121,68:70,69:$VG,70:$VH,71:$VI,72:$VJ,73:$VK,75:60,76:$VL,79:$Vg,81:$VM,83:$Vh,85:$Vi,86:$Vj,88:$Vk,89:$Vl,91:$Vm,92:$Vn,93:$Vo},{10:$Vt,12:$Vu,13:$Vv,15:$Vw,16:$Vx,17:$Vy,18:$Vz,30:$VA,31:172,32:$VB,43:67,44:$VC,48:$VD,58:$VE,64:58,65:$VF,68:70,69:$VG,70:$VH,71:$VI,72:$VJ,73:$VK,75:60,76:$VL,79:$Vg,81:$VM,83:$Vh,85:$Vi,86:$Vj,88:$Vk,89:$Vl,91:$Vm,92:$Vn,93:$Vo},{10:$Vt,12:$Vu,13:$Vv,15:$Vw,16:$Vx,17:$Vy,18:$Vz,30:$VA,32:$VB,39:[1,173],43:67,44:$VC,48:$VD,58:$VE,64:121,68:70,69:$VG,70:$VH,71:$VI,72:$VJ,73:$VK,75:60,76:$VL,79:$Vg,81:$VM,83:$Vh,85:$Vi,86:$Vj,88:$Vk,89:$Vl,91:$Vm,92:$Vn,93:$Vo},{10:$Vt,12:$Vu,13:$Vv,15:$Vw,16:$Vx,17:$Vy,18:$Vz,30:$VA,32:$VB,41:[1,174],43:67,44:$VC,48:$VD,58:$VE,64:121,68:70,69:$VG,70:$VH,71:$VI,72:$VJ,73:$VK,75:60,76:$VL,79:$Vg,81:$VM,83:$Vh,85:$Vi,86:$Vj,88:$Vk,89:$Vl,91:$Vm,92:$Vn,93:$Vo},{10:$Vt,12:$Vu,13:$Vv,15:$Vw,16:$Vx,17:$Vy,18:$Vz,30:$VA,32:$VB,37:[1,175],43:67,44:$VC,48:$VD,58:$VE,64:121,68:70,69:$VG,70:$VH,71:$VI,72:$VJ,73:$VK,75:60,76:$VL,79:$Vg,81:$VM,83:$Vh,85:$Vi,86:$Vj,88:$Vk,89:$Vl,91:$Vm,92:$Vn,93:$Vo},o($VO,[2,28]),o($VQ,[2,59]),o($V3,[2,23]),{6:10,7:11,8:$V5,9:$V6,10:$V7,11:$V8,13:$V9,23:16,25:17,26:18,27:19,28:20,29:21,30:$Va,32:[1,176],33:23,35:29,42:30,43:32,69:$Vb,70:$Vc,71:$Vd,72:$Ve,73:$Vf,79:$Vg,83:$Vh,85:$Vi,86:$Vj,88:$Vk,89:$Vl,91:$Vm,92:$Vn,93:$Vo},o($Vp,[2,37]),o($VW,[2,62]),o($VW,[2,61]),{10:$Vt,12:$Vu,13:$Vv,15:$Vw,16:$Vx,17:$Vy,18:$Vz,30:$VA,32:$VB,43:67,44:$VC,48:$VD,58:$VE,63:[1,177],64:121,68:70,69:$VG,70:$VH,71:$VI,72:$VJ,73:$VK,75:60,76:$VL,79:$Vg,81:$VM,83:$Vh,85:$Vi,86:$Vj,88:$Vk,89:$Vl,91:$Vm,92:$Vn,93:$Vo},o($VW,[2,64]),o($VW,[2,65]),o($VW,[2,66]),o($VW,[2,67]),o($VW,[2,68]),o($VW,[2,69]),o($VW,[2,70]),o($VW,[2,71]),o($VW,[2,72]),o($VW,[2,73]),o($VW,[2,74]),o($VW,[2,75]),{10:$VY,44:$VZ,69:$V_,77:178,78:$V$,79:$V01,81:$V11,82:179,84:180,85:$V21,86:$V31,87:$V41,88:$V51,89:$V61},{10:$VY,44:$VZ,69:$V_,77:192,78:$V$,79:$V01,81:$V11,82:179,84:180,85:$V21,86:$V31,87:$V41,88:$V51,89:$V61},{10:$VY,44:$VZ,69:$V_,77:193,78:$V$,79:$V01,81:$V11,82:179,84:180,85:$V21,86:$V31,87:$V41,88:$V51,89:$V61},{10:$VY,44:$VZ,69:$V_,77:194,78:$V$,79:$V01,81:$V11,82:179,84:180,85:$V21,86:$V31,87:$V41,88:$V51,89:$V61},{10:$VY,44:$VZ,69:$V_,77:195,78:$V$,79:$V01,81:$V11,82:179,84:180,85:$V21,86:$V31,87:$V41,88:$V51,89:$V61},{10:$VY,44:$VZ,69:$V_,77:196,78:$V$,79:$V01,81:$V11,82:179,84:180,85:$V21,86:$V31,87:$V41,88:$V51,89:$V61},{13:$V9,35:197,42:30,43:32,79:$Vg,83:$Vh,85:$Vi,86:$Vj,88:$Vk,89:$Vl,91:$Vm,92:$Vn,93:$Vo},{13:$V9,35:198,42:30,43:32,79:$Vg,83:$Vh,85:$Vi,86:$Vj,88:$Vk,89:$Vl,91:$Vm,92:$Vn,93:$Vo},o($VO,[2,43],{21:199,10:$VP}),{10:$Vt,12:$Vu,13:$Vv,15:$Vw,16:$Vx,17:$Vy,18:$Vz,30:$VA,32:$VB,39:[1,200],43:67,44:$VC,48:$VD,58:$VE,64:121,68:70,69:$VG,70:$VH,71:$VI,72:$VJ,73:$VK,75:60,76:$VL,79:$Vg,81:$VM,83:$Vh,85:$Vi,86:$Vj,88:$Vk,89:$Vl,91:$Vm,92:$Vn,93:$Vo},o($VO,[2,47],{21:201,10:$VP}),o($VO,[2,49],{21:202,10:$VP}),o($VO,[2,51],{21:203,10:$VP}),o($Vp,[2,36]),o([10,13,79,83,85,86,88,89,91,92,93],[2,88]),o($VN,[2,111],{83:$V71}),o($V81,[2,116],{84:205,10:$VY,44:$VZ,69:$V_,78:$V$,79:$V01,81:$V11,85:$V21,86:$V31,87:$V41,88:$V51,89:$V61}),o($V91,[2,118]),o($V91,[2,120]),o($V91,[2,121]),o($V91,[2,122]),o($V91,[2,123]),o($V91,[2,124]),o($V91,[2,125]),o($V91,[2,126]),o($V91,[2,127]),o($V91,[2,128]),o($V91,[2,129]),o($V91,[2,130]),o($VN,[2,112],{83:$V71}),o($VN,[2,113],{83:$V71}),o($VN,[2,114],{83:$V71}),o($VN,[2,107],{83:$V71}),o($VN,[2,108],{83:$V71}),o($VN,[2,109],{43:32,42:109,13:$V9,79:$Vg,83:$Vh,85:$Vi,86:$Vj,88:$Vk,89:$Vl,91:$Vm,92:$Vn,93:$Vo}),o($VN,[2,110],{43:32,42:109,13:$V9,79:$Vg,83:$Vh,85:$Vi,86:$Vj,88:$Vk,89:$Vl,91:$Vm,92:$Vn,93:$Vo}),o($VO,[2,44]),{39:[1,206]},o($VO,[2,48]),o($VO,[2,50]),o($VO,[2,52]),{10:$VY,44:$VZ,69:$V_,78:$V$,79:$V01,81:$V11,82:207,84:180,85:$V21,86:$V31,87:$V41,88:$V51,89:$V61},o($V91,[2,119]),o($VO,[2,45],{21:208,10:$VP}),o($V81,[2,117],{84:205,10:$VY,44:$VZ,69:$V_,78:$V$,79:$V01,81:$V11,85:$V21,86:$V31,87:$V41,88:$V51,89:$V61}),o($VO,[2,46])],
table: [{3:1,4:2,9:$V0,10:$V1,12:$V2},{1:[3]},o($V3,$V4,{5:6}),{4:7,9:$V0,10:$V1,12:$V2},{4:8,9:$V0,10:$V1,12:$V2},{10:[1,9]},{1:[2,1],6:10,7:11,8:$V5,9:$V6,10:$V7,11:$V8,13:$V9,18:$Va,23:16,25:17,26:18,27:19,28:20,29:21,30:$Vb,33:23,35:29,42:30,43:32,44:$Vc,69:$Vd,70:$Ve,71:$Vf,72:$Vg,73:$Vh,79:$Vi,83:$Vj,85:$Vk,86:$Vl,88:$Vm,89:$Vn,91:$Vo,92:$Vp,93:$Vq},o($V3,[2,9]),o($V3,[2,10]),{13:[1,44],15:[1,45],16:[1,46],17:[1,47],18:[1,48]},o($Vr,[2,3]),o($Vr,[2,4]),o($Vr,[2,5]),o($Vr,[2,6]),o($Vr,[2,7]),o($Vr,[2,8]),{8:$Vs,9:$Vt,11:$Vu,24:49},{8:$Vs,9:$Vt,11:$Vu,24:53},{8:$Vs,9:$Vt,11:$Vu,24:54},{8:$Vs,9:$Vt,11:$Vu,24:55},{8:$Vs,9:$Vt,11:$Vu,24:56},{8:$Vs,9:$Vt,11:$Vu,24:57},{8:$Vs,9:$Vt,10:$Vv,11:$Vu,12:$Vw,13:$Vx,15:$Vy,16:$Vz,17:$VA,18:$VB,24:59,30:$VC,31:58,32:$VD,43:69,44:$VE,48:$VF,58:$VG,64:60,65:$VH,68:72,69:$VI,70:$VJ,71:$VK,72:$VL,73:$VM,75:62,76:$VN,79:$Vi,81:$VO,83:$Vj,85:$Vk,86:$Vl,88:$Vm,89:$Vn,91:$Vo,92:$Vp,93:$Vq},o($VP,[2,42],{34:84,45:85,48:[1,86],49:[1,89],50:[1,90],51:[1,91],52:[1,92],53:[1,87],54:[1,93],55:[1,94],56:[1,95],57:[1,96],58:[1,88],59:[1,97],60:[1,98],61:[1,99],62:[1,100]}),{10:[1,101]},{10:[1,102]},{10:[1,103]},{10:[1,104]},{10:[1,105]},o($VQ,[2,53],{43:32,21:110,42:111,10:$VR,13:$V9,15:[1,109],18:$Va,36:[1,106],38:[1,107],40:[1,108],44:$Vc,79:$Vi,83:$Vj,85:$Vk,86:$Vl,88:$Vm,89:$Vn,91:$Vo,92:$Vp,93:$Vq}),o($VS,[2,55]),o($VS,[2,57]),o($VS,[2,58]),o($VS,[2,59]),o($VS,[2,60]),o($VT,[2,148]),o($VT,[2,149]),o($VT,[2,150]),o($VT,[2,151]),o($VT,[2,152]),o($VT,[2,153]),o($VT,[2,154]),o($VT,[2,155]),o($VT,[2,156]),{8:$VU,9:$VV,10:$VR,14:113,21:116},{8:$VU,9:$VV,10:$VR,14:117,21:116},{8:$VU,9:$VV,10:$VR,14:118,21:116},{8:$VU,9:$VV,10:$VR,14:119,21:116},{8:$VU,9:$VV,10:$VR,14:120,21:116},o($Vr,[2,30]),o($Vr,[2,38]),o($Vr,[2,39]),o($Vr,[2,40]),o($Vr,[2,31]),o($Vr,[2,32]),o($Vr,[2,33]),o($Vr,[2,34]),o($Vr,[2,35]),{8:$Vs,9:$Vt,10:$Vv,11:$Vu,12:$Vw,13:$Vx,15:$Vy,16:$Vz,17:$VA,18:$VB,24:121,30:$VC,32:$VD,43:69,44:$VE,48:$VF,58:$VG,64:122,68:72,69:$VI,70:$VJ,71:$VK,72:$VL,73:$VM,75:62,76:$VN,79:$Vi,81:$VO,83:$Vj,85:$Vk,86:$Vl,88:$Vm,89:$Vn,91:$Vo,92:$Vp,93:$Vq},o($VW,$V4,{5:123}),o($VX,[2,90]),o($VX,[2,92]),o($VX,[2,137]),o($VX,[2,138]),o($VX,[2,139]),o($VX,[2,140]),o($VX,[2,141]),o($VX,[2,142]),o($VX,[2,143]),o($VX,[2,144]),o($VX,[2,145]),o($VX,[2,146]),o($VX,[2,147]),o($VX,[2,95]),o($VX,[2,96]),o($VX,[2,97]),o($VX,[2,98]),o($VX,[2,99]),o($VX,[2,100]),o($VX,[2,101]),o($VX,[2,102]),o($VX,[2,103]),o($VX,[2,104]),o($VX,[2,105]),{13:$V9,18:$Va,33:124,35:29,42:30,43:32,44:$Vc,79:$Vi,83:$Vj,85:$Vk,86:$Vl,88:$Vm,89:$Vn,91:$Vo,92:$Vp,93:$Vq},o($VY,[2,64],{46:125,47:[1,126],63:[1,127]}),{10:$Vv,12:$Vw,13:$Vx,15:$Vy,16:$Vz,17:$VA,18:$VB,30:$VC,31:128,32:$VD,43:69,44:$VE,48:$VF,58:$VG,64:60,65:$VH,68:72,69:$VI,70:$VJ,71:$VK,72:$VL,73:$VM,75:62,76:$VN,79:$Vi,81:$VO,83:$Vj,85:$Vk,86:$Vl,88:$Vm,89:$Vn,91:$Vo,92:$Vp,93:$Vq},{10:$Vv,12:$Vw,13:$Vx,15:$Vy,16:$Vz,17:$VA,18:$VB,30:$VC,31:129,32:$VD,43:69,44:$VE,48:$VF,58:$VG,64:60,65:$VH,68:72,69:$VI,70:$VJ,71:$VK,72:$VL,73:$VM,75:62,76:$VN,79:$Vi,81:$VO,83:$Vj,85:$Vk,86:$Vl,88:$Vm,89:$Vn,91:$Vo,92:$Vp,93:$Vq},{10:$Vv,12:$Vw,13:$Vx,15:$Vy,16:$Vz,17:$VA,18:$VB,30:$VC,31:130,32:$VD,43:69,44:$VE,48:$VF,58:$VG,64:60,65:$VH,68:72,69:$VI,70:$VJ,71:$VK,72:$VL,73:$VM,75:62,76:$VN,79:$Vi,81:$VO,83:$Vj,85:$Vk,86:$Vl,88:$Vm,89:$Vn,91:$Vo,92:$Vp,93:$Vq},o($VZ,[2,77]),o($VZ,[2,78]),o($VZ,[2,79]),o($VZ,[2,80]),o($VZ,[2,81]),o($VZ,[2,82]),o($VZ,[2,83]),o($VZ,[2,84]),o($VZ,[2,85]),o($VZ,[2,86]),o($VZ,[2,87]),o($VZ,[2,88]),{13:$V9,18:$Va,35:131,42:30,43:32,44:$Vc,78:[1,132],79:$Vi,83:$Vj,85:$Vk,86:$Vl,88:$Vm,89:$Vn,91:$Vo,92:$Vp,93:$Vq},{76:[1,133],79:[1,134]},{13:$V9,18:$Va,35:136,42:30,43:32,44:$Vc,76:[1,135],79:$Vi,83:$Vj,85:$Vk,86:$Vl,88:$Vm,89:$Vn,91:$Vo,92:$Vp,93:$Vq},{13:$V9,18:$Va,35:137,42:30,43:32,44:$Vc,79:$Vi,83:$Vj,85:$Vk,86:$Vl,88:$Vm,89:$Vn,91:$Vo,92:$Vp,93:$Vq},{13:$V9,18:$Va,35:138,42:30,43:32,44:$Vc,79:$Vi,83:$Vj,85:$Vk,86:$Vl,88:$Vm,89:$Vn,91:$Vo,92:$Vp,93:$Vq},{10:$Vv,12:$Vw,13:$Vx,15:$Vy,16:$Vz,17:$VA,18:$VB,30:$VC,31:139,32:$VD,43:69,44:$VE,48:$VF,58:$VG,64:60,65:$VH,68:72,69:$VI,70:$VJ,71:$VK,72:$VL,73:$VM,75:62,76:$VN,79:$Vi,81:$VO,83:$Vj,85:$Vk,86:$Vl,88:$Vm,89:$Vn,91:$Vo,92:$Vp,93:$Vq},{10:$Vv,12:$Vw,13:$Vx,15:$Vy,16:$Vz,17:$VA,18:$VB,30:$VC,31:141,32:$VD,38:[1,140],43:69,44:$VE,48:$VF,58:$VG,64:60,65:$VH,68:72,69:$VI,70:$VJ,71:$VK,72:$VL,73:$VM,75:62,76:$VN,79:$Vi,81:$VO,83:$Vj,85:$Vk,86:$Vl,88:$Vm,89:$Vn,91:$Vo,92:$Vp,93:$Vq},{10:$Vv,12:$Vw,13:$Vx,15:$Vy,16:$Vz,17:$VA,18:$VB,30:$VC,31:142,32:$VD,43:69,44:$VE,48:$VF,58:$VG,64:60,65:$VH,68:72,69:$VI,70:$VJ,71:$VK,72:$VL,73:$VM,75:62,76:$VN,79:$Vi,81:$VO,83:$Vj,85:$Vk,86:$Vl,88:$Vm,89:$Vn,91:$Vo,92:$Vp,93:$Vq},{10:$Vv,12:$Vw,13:$Vx,15:$Vy,16:$Vz,17:$VA,18:$VB,30:$VC,31:143,32:$VD,43:69,44:$VE,48:$VF,58:$VG,64:60,65:$VH,68:72,69:$VI,70:$VJ,71:$VK,72:$VL,73:$VM,75:62,76:$VN,79:$Vi,81:$VO,83:$Vj,85:$Vk,86:$Vl,88:$Vm,89:$Vn,91:$Vo,92:$Vp,93:$Vq},o($VQ,[2,54]),o($VS,[2,56]),o($VQ,[2,29],{21:144,10:$VR}),o($V3,[2,11]),o($V3,[2,21]),o($V3,[2,22]),{9:[1,145]},o($V3,[2,12]),o($V3,[2,13]),o($V3,[2,14]),o($V3,[2,15]),o($VW,$V4,{5:146}),o($VX,[2,91]),{6:10,7:11,8:$V5,9:$V6,10:$V7,11:$V8,13:$V9,18:$Va,23:16,25:17,26:18,27:19,28:20,29:21,30:$Vb,32:[1,147],33:23,35:29,42:30,43:32,44:$Vc,69:$Vd,70:$Ve,71:$Vf,72:$Vg,73:$Vh,79:$Vi,83:$Vj,85:$Vk,86:$Vl,88:$Vm,89:$Vn,91:$Vo,92:$Vp,93:$Vq},o($VP,[2,41]),o($VY,[2,61],{10:[1,148]}),{10:[1,149]},{10:$Vv,12:$Vw,13:$Vx,15:$Vy,16:$Vz,17:$VA,18:$VB,30:$VC,31:150,32:$VD,43:69,44:$VE,48:$VF,58:$VG,64:60,65:$VH,68:72,69:$VI,70:$VJ,71:$VK,72:$VL,73:$VM,75:62,76:$VN,79:$Vi,81:$VO,83:$Vj,85:$Vk,86:$Vl,88:$Vm,89:$Vn,91:$Vo,92:$Vp,93:$Vq},{10:$Vv,12:$Vw,13:$Vx,15:$Vy,16:$Vz,17:$VA,18:$VB,30:$VC,32:$VD,43:69,44:$VE,48:$VF,49:[1,151],50:[1,152],51:[1,153],52:[1,154],58:$VG,64:122,68:72,69:$VI,70:$VJ,71:$VK,72:$VL,73:$VM,75:62,76:$VN,79:$Vi,81:$VO,83:$Vj,85:$Vk,86:$Vl,88:$Vm,89:$Vn,91:$Vo,92:$Vp,93:$Vq},{10:$Vv,12:$Vw,13:$Vx,15:$Vy,16:$Vz,17:$VA,18:$VB,30:$VC,32:$VD,43:69,44:$VE,48:$VF,54:[1,155],55:[1,156],56:[1,157],57:[1,158],58:$VG,64:122,68:72,69:$VI,70:$VJ,71:$VK,72:$VL,73:$VM,75:62,76:$VN,79:$Vi,81:$VO,83:$Vj,85:$Vk,86:$Vl,88:$Vm,89:$Vn,91:$Vo,92:$Vp,93:$Vq},{10:$Vv,12:$Vw,13:$Vx,15:$Vy,16:$Vz,17:$VA,18:$VB,30:$VC,32:$VD,43:69,44:$VE,48:$VF,58:$VG,59:[1,159],60:[1,160],61:[1,161],62:[1,162],64:122,68:72,69:$VI,70:$VJ,71:$VK,72:$VL,73:$VM,75:62,76:$VN,79:$Vi,81:$VO,83:$Vj,85:$Vk,86:$Vl,88:$Vm,89:$Vn,91:$Vo,92:$Vp,93:$Vq},{10:[1,163],13:$V9,18:$Va,42:111,43:32,44:$Vc,79:$Vi,83:$Vj,85:$Vk,86:$Vl,88:$Vm,89:$Vn,91:$Vo,92:$Vp,93:$Vq},{10:[1,164]},{10:[1,165]},{10:[1,166]},{10:[1,167]},{10:[1,168],13:$V9,18:$Va,42:111,43:32,44:$Vc,79:$Vi,83:$Vj,85:$Vk,86:$Vl,88:$Vm,89:$Vn,91:$Vo,92:$Vp,93:$Vq},{10:[1,169],13:$V9,18:$Va,42:111,43:32,44:$Vc,79:$Vi,83:$Vj,85:$Vk,86:$Vl,88:$Vm,89:$Vn,91:$Vo,92:$Vp,93:$Vq},{10:[1,170],13:$V9,18:$Va,42:111,43:32,44:$Vc,79:$Vi,83:$Vj,85:$Vk,86:$Vl,88:$Vm,89:$Vn,91:$Vo,92:$Vp,93:$Vq},{10:$Vv,12:$Vw,13:$Vx,15:$Vy,16:$Vz,17:$VA,18:$VB,30:$VC,32:$VD,37:[1,171],43:69,44:$VE,48:$VF,58:$VG,64:122,68:72,69:$VI,70:$VJ,71:$VK,72:$VL,73:$VM,75:62,76:$VN,79:$Vi,81:$VO,83:$Vj,85:$Vk,86:$Vl,88:$Vm,89:$Vn,91:$Vo,92:$Vp,93:$Vq},{10:$Vv,12:$Vw,13:$Vx,15:$Vy,16:$Vz,17:$VA,18:$VB,30:$VC,31:172,32:$VD,43:69,44:$VE,48:$VF,58:$VG,64:60,65:$VH,68:72,69:$VI,70:$VJ,71:$VK,72:$VL,73:$VM,75:62,76:$VN,79:$Vi,81:$VO,83:$Vj,85:$Vk,86:$Vl,88:$Vm,89:$Vn,91:$Vo,92:$Vp,93:$Vq},{10:$Vv,12:$Vw,13:$Vx,15:$Vy,16:$Vz,17:$VA,18:$VB,30:$VC,32:$VD,39:[1,173],43:69,44:$VE,48:$VF,58:$VG,64:122,68:72,69:$VI,70:$VJ,71:$VK,72:$VL,73:$VM,75:62,76:$VN,79:$Vi,81:$VO,83:$Vj,85:$Vk,86:$Vl,88:$Vm,89:$Vn,91:$Vo,92:$Vp,93:$Vq},{10:$Vv,12:$Vw,13:$Vx,15:$Vy,16:$Vz,17:$VA,18:$VB,30:$VC,32:$VD,41:[1,174],43:69,44:$VE,48:$VF,58:$VG,64:122,68:72,69:$VI,70:$VJ,71:$VK,72:$VL,73:$VM,75:62,76:$VN,79:$Vi,81:$VO,83:$Vj,85:$Vk,86:$Vl,88:$Vm,89:$Vn,91:$Vo,92:$Vp,93:$Vq},{10:$Vv,12:$Vw,13:$Vx,15:$Vy,16:$Vz,17:$VA,18:$VB,30:$VC,32:$VD,37:[1,175],43:69,44:$VE,48:$VF,58:$VG,64:122,68:72,69:$VI,70:$VJ,71:$VK,72:$VL,73:$VM,75:62,76:$VN,79:$Vi,81:$VO,83:$Vj,85:$Vk,86:$Vl,88:$Vm,89:$Vn,91:$Vo,92:$Vp,93:$Vq},o($VQ,[2,28]),o($V3,[2,23]),{6:10,7:11,8:$V5,9:$V6,10:$V7,11:$V8,13:$V9,18:$Va,23:16,25:17,26:18,27:19,28:20,29:21,30:$Vb,32:[1,176],33:23,35:29,42:30,43:32,44:$Vc,69:$Vd,70:$Ve,71:$Vf,72:$Vg,73:$Vh,79:$Vi,83:$Vj,85:$Vk,86:$Vl,88:$Vm,89:$Vn,91:$Vo,92:$Vp,93:$Vq},o($Vr,[2,37]),o($VY,[2,63]),o($VY,[2,62]),{10:$Vv,12:$Vw,13:$Vx,15:$Vy,16:$Vz,17:$VA,18:$VB,30:$VC,32:$VD,43:69,44:$VE,48:$VF,58:$VG,63:[1,177],64:122,68:72,69:$VI,70:$VJ,71:$VK,72:$VL,73:$VM,75:62,76:$VN,79:$Vi,81:$VO,83:$Vj,85:$Vk,86:$Vl,88:$Vm,89:$Vn,91:$Vo,92:$Vp,93:$Vq},o($VY,[2,65]),o($VY,[2,66]),o($VY,[2,67]),o($VY,[2,68]),o($VY,[2,69]),o($VY,[2,70]),o($VY,[2,71]),o($VY,[2,72]),o($VY,[2,73]),o($VY,[2,74]),o($VY,[2,75]),o($VY,[2,76]),{10:$V_,44:$V$,69:$V01,77:178,78:$V11,79:$V21,81:$V31,82:179,84:180,85:$V41,86:$V51,87:$V61,88:$V71,89:$V81},{10:$V_,44:$V$,69:$V01,77:192,78:$V11,79:$V21,81:$V31,82:179,84:180,85:$V41,86:$V51,87:$V61,88:$V71,89:$V81},{10:$V_,44:$V$,69:$V01,77:193,78:$V11,79:$V21,81:$V31,82:179,84:180,85:$V41,86:$V51,87:$V61,88:$V71,89:$V81},{10:$V_,44:$V$,69:$V01,77:194,78:$V11,79:$V21,81:$V31,82:179,84:180,85:$V41,86:$V51,87:$V61,88:$V71,89:$V81},{10:$V_,44:$V$,69:$V01,77:195,78:$V11,79:$V21,81:$V31,82:179,84:180,85:$V41,86:$V51,87:$V61,88:$V71,89:$V81},{10:$V_,44:$V$,69:$V01,77:196,78:$V11,79:$V21,81:$V31,82:179,84:180,85:$V41,86:$V51,87:$V61,88:$V71,89:$V81},{13:$V9,18:$Va,35:197,42:30,43:32,44:$Vc,79:$Vi,83:$Vj,85:$Vk,86:$Vl,88:$Vm,89:$Vn,91:$Vo,92:$Vp,93:$Vq},{13:$V9,18:$Va,35:198,42:30,43:32,44:$Vc,65:[1,199],79:$Vi,83:$Vj,85:$Vk,86:$Vl,88:$Vm,89:$Vn,91:$Vo,92:$Vp,93:$Vq},o($VQ,[2,43],{21:200,10:$VR}),{10:$Vv,12:$Vw,13:$Vx,15:$Vy,16:$Vz,17:$VA,18:$VB,30:$VC,32:$VD,39:[1,201],43:69,44:$VE,48:$VF,58:$VG,64:122,68:72,69:$VI,70:$VJ,71:$VK,72:$VL,73:$VM,75:62,76:$VN,79:$Vi,81:$VO,83:$Vj,85:$Vk,86:$Vl,88:$Vm,89:$Vn,91:$Vo,92:$Vp,93:$Vq},o($VQ,[2,47],{21:202,10:$VR}),o($VQ,[2,49],{21:203,10:$VR}),o($VQ,[2,51],{21:204,10:$VR}),o($Vr,[2,36]),o([10,13,18,44,79,83,85,86,88,89,91,92,93],[2,89]),o($VP,[2,115],{83:$V91}),o($Va1,[2,120],{84:206,10:$V_,44:$V$,69:$V01,78:$V11,79:$V21,81:$V31,85:$V41,86:$V51,87:$V61,88:$V71,89:$V81}),o($Vb1,[2,122]),o($Vb1,[2,124]),o($Vb1,[2,125]),o($Vb1,[2,126]),o($Vb1,[2,127]),o($Vb1,[2,128]),o($Vb1,[2,129]),o($Vb1,[2,130]),o($Vb1,[2,131]),o($Vb1,[2,132]),o($Vb1,[2,133]),o($Vb1,[2,134]),o($VP,[2,116],{83:$V91}),o($VP,[2,117],{83:$V91}),o($VP,[2,118],{83:$V91}),o($VP,[2,108],{83:$V91}),o($VP,[2,109],{83:$V91}),o($VP,[2,110],{43:32,42:111,13:$V9,18:$Va,44:$Vc,79:$Vi,83:$Vj,85:$Vk,86:$Vl,88:$Vm,89:$Vn,91:$Vo,92:$Vp,93:$Vq}),o($VP,[2,111],{43:32,42:111,10:[1,207],13:$V9,18:$Va,44:$Vc,79:$Vi,83:$Vj,85:$Vk,86:$Vl,88:$Vm,89:$Vn,91:$Vo,92:$Vp,93:$Vq}),o($VP,[2,113],{10:[1,208]}),o($VQ,[2,44]),{39:[1,209]},o($VQ,[2,48]),o($VQ,[2,50]),o($VQ,[2,52]),{10:$V_,44:$V$,69:$V01,78:$V11,79:$V21,81:$V31,82:210,84:180,85:$V41,86:$V51,87:$V61,88:$V71,89:$V81},o($Vb1,[2,123]),{65:[1,211]},{65:[1,212]},o($VQ,[2,45],{21:213,10:$VR}),o($Va1,[2,121],{84:206,10:$V_,44:$V$,69:$V01,78:$V11,79:$V21,81:$V31,85:$V41,86:$V51,87:$V61,88:$V71,89:$V81}),o($VP,[2,112]),o($VP,[2,114]),o($VQ,[2,46])],
defaultActions: {},

@@ -291,0 +303,0 @@ parseError: function parseError(str, hash) {

@@ -13,3 +13,3 @@ /**

/*flow.parser.parse.parseError= function parseError(str, hash) {
console.logconsole.log(str);
log.debugconsole.log(str);
}*/

@@ -435,2 +435,45 @@ });

describe("it should handle interaction, ",function(){
it('it should be possible to use click to a callback',function(){
spyOn(graph,'setClickEvent');
var res = flow.parser.parse('graph TD\nA-->B\nclick A callback');
var vert = flow.parser.yy.getVertices();
var edges = flow.parser.yy.getEdges();
expect(graph.setClickEvent).toHaveBeenCalledWith('A','callback',undefined,undefined);
});
it('it should be possible to use click to a callback with toolip',function(){
spyOn(graph,'setClickEvent');
var res = flow.parser.parse('graph TD\nA-->B\nclick A callback "tooltip"');
var vert = flow.parser.yy.getVertices();
var edges = flow.parser.yy.getEdges();
expect(graph.setClickEvent).toHaveBeenCalledWith('A','callback',undefined,'tooltip');
});
it('should handle interaction - click to a link',function(){
spyOn(graph,'setClickEvent');
var res = flow.parser.parse('graph TD\nA-->B\nclick A "click.html"');
var vert = flow.parser.yy.getVertices();
var edges = flow.parser.yy.getEdges();
expect(graph.setClickEvent).toHaveBeenCalledWith('A',undefined,'click.html',undefined);
});
it('should handle interaction - click to a link with tooltip',function(){
spyOn(graph,'setClickEvent');
var res = flow.parser.parse('graph TD\nA-->B\nclick A "click.html" "tooltip"');
var vert = flow.parser.yy.getVertices();
var edges = flow.parser.yy.getEdges();
expect(graph.setClickEvent).toHaveBeenCalledWith('A',undefined,'click.html','tooltip');
});
});
describe("it should handle text on edges",function(){

@@ -544,2 +587,50 @@ it('it should handle text without space',function(){

});
it('should handle v in node ids only v',function(){
// only v
var res = flow.parser.parse('graph TD;A--xv(my text);');
var vert = flow.parser.yy.getVertices();
var edges = flow.parser.yy.getEdges();
expect(edges[0].type).toBe('arrow_cross');
expect(vert['v'].text).toBe('my text');
});
it('should handle v in node ids v at end',function(){
// v at end
var res = flow.parser.parse('graph TD;A--xcsv(my text);');
var vert = flow.parser.yy.getVertices();
var edges = flow.parser.yy.getEdges();
expect(edges[0].type).toBe('arrow_cross');
expect(vert['csv'].text).toBe('my text');
});
it('should handle v in node ids v in middle',function(){
// v in middle
var res = flow.parser.parse('graph TD;A--xava(my text);');
var vert = flow.parser.yy.getVertices();
var edges = flow.parser.yy.getEdges();
expect(edges[0].type).toBe('arrow_cross');
expect(vert['ava'].text).toBe('my text');
});
it('should handle v in node ids, v at start',function(){
// v at start
var res = flow.parser.parse('graph TD;A--xva(my text);');
var vert = flow.parser.yy.getVertices();
var edges = flow.parser.yy.getEdges();
expect(edges[0].type).toBe('arrow_cross');
expect(vert['va'].text).toBe('my text');
});
it('should handle keywords',function(){

@@ -1060,3 +1151,3 @@ var res = flow.parser.parse('graph TD;A--x|text including graph space|B;');

});
//console.log(flow.parser.parse('graph TD;style Q background:#fff;'));
//log.debug(flow.parser.parse('graph TD;style Q background:#fff;'));
it('should handle styles for vertices',function(){

@@ -1074,3 +1165,3 @@ var res = flow.parser.parse('graph TD;style Q background:#fff;');

//console.log(flow.parser.parse('graph TD;style Q background:#fff;'));
//log.debug(flow.parser.parse('graph TD;style Q background:#fff;'));
it('should handle styles for edges',function(){

@@ -1077,0 +1168,0 @@ var res = flow.parser.parse('graph TD;a-->b;\nstyle #0 stroke: #f66;');

@@ -1,2 +0,2 @@

```mermaid
```
gantt

@@ -3,0 +3,0 @@ dateFormat yyyy-mm-dd

@@ -10,3 +10,3 @@ /**

parseError = function(err, hash) {
console.log('Syntax error:' + err);
log.debug('Syntax error:' + err);
};

@@ -36,2 +36,13 @@ //ex.yy.parseError = parseError;

});
/**
* Beslutsflöde inligt nedan. Obs bla bla bla
* ```
* graph TD
* A[Hard pledge] -- text on link -->B(Round edge)
* B --> C{to do or not to do}
* C -->|Too| D[Result one]
* C -->|Doo| E[Result two]
```
* params bapa - a unique bapap
*/
it('should handle a task definition', function () {

@@ -38,0 +49,0 @@ var str = 'gantt\n' +

@@ -5,2 +5,3 @@ /**

var moment = require('moment');
var log = require('../../logger').create();

@@ -63,4 +64,4 @@ var dateFormat = '';

var getStartDate = function(prevTime, dateFormat, str){
//console.log('Deciding start date:'+str);
//console.log('with dateformat:'+dateFormat);
//log.debug('Deciding start date:'+str);
//log.debug('with dateformat:'+dateFormat);

@@ -81,3 +82,3 @@ str = str.trim();

}
// Check for actual date set

@@ -87,7 +88,7 @@ if(moment(str,dateFormat.trim(),true).isValid()){

}else{
console.log('Invalid date:'+str);
console.log('With date format:'+dateFormat.trim());
//console.log('----');
log.debug('Invalid date:'+str);
log.debug('With date format:'+dateFormat.trim());
//log.debug('----');
}
// Default date - now

@@ -99,6 +100,6 @@ return new Date();

str = str.trim();
// Check for actual date
// Check for actual date
if(moment(str,dateFormat.trim(),true).isValid()){
return moment(str,dateFormat.trim()).toDate();

@@ -109,7 +110,13 @@ }

// Check for length
var re = /^([\d]+)([wdh])/;
var re = /^([\d]+)([wdhms])/;
var durationStatement = re.exec(str.trim());
if(durationStatement!== null){
switch(durationStatement[2]){
case 's':
d.add(durationStatement[1], 'seconds');
break;
case 'm':
d.add(durationStatement[1], 'minutes');
break;
case 'h':

@@ -152,3 +159,3 @@ d.add(durationStatement[1], 'hours');

var ds;
if(dataStr.substr(0,1) === ':'){

@@ -160,10 +167,10 @@ ds = dataStr.substr(1,dataStr.length);

}
var data = ds.split(',');
var task = {};
var df = exports.getDateFormat();
// Get tags like active, done cand crit

@@ -177,3 +184,3 @@ var matchFound = true;

matchFound = true;
}

@@ -195,4 +202,4 @@ if(data[0].match(/^\s*done\s*$/)){

}
switch(data.length){

@@ -215,3 +222,3 @@ case 1:

default:
}

@@ -244,3 +251,3 @@

exports.parseError = function(err,hash){
mermaid.parseError(err,hash);
};
mermaidAPI.parseError(err,hash);
};
/**
* Created by knut on 14-11-18.
*/
var log = require('../../logger').create();
describe('when using the ganttDb',function() {

@@ -14,3 +15,3 @@ var parseError, gantt;

parseError = function(err, hash) {
console.log('Syntax error:' + err);
log.debug('Syntax error:' + err);
};

@@ -30,3 +31,3 @@ //ex.yy.parseError = parseError;

});
it('should handle duration instead of fixed date to determine end date', function () {
it('should handle duration (days) instead of fixed date to determine end date', function () {
gDb.setDateFormat('YYYY-MM-DD');

@@ -41,3 +42,3 @@ gDb.addSection('testa1');

});
it('should handle duration instead of fixed date to determine end date', function () {
it('should handle duration (hours) instead of fixed date to determine end date', function () {
gDb.setDateFormat('YYYY-MM-DD');

@@ -52,5 +53,25 @@ gDb.addSection('testa1');

});
it('should handle ', function () {
it('should handle duration (minutes) instead of fixed date to determine end date', function () {
gDb.setDateFormat('YYYY-MM-DD');
gDb.addSection('testa1');
gDb.addTask('test1','id1,2013-01-01,2m');
var tasks = gDb.getTasks();
expect(tasks[0].startTime).toEqual(moment('2013-01-01', 'YYYY-MM-DD').toDate());
expect(tasks[0].endTime ).toEqual(moment('2013-01-01 00:02', 'YYYY-MM-DD hh:mm').toDate());
expect(tasks[0].id ).toEqual('id1');
expect(tasks[0].description).toEqual('test1');
});
it('should handle duration (seconds) instead of fixed date to determine end date', function () {
gDb.setDateFormat('YYYY-MM-DD');
gDb.addSection('testa1');
gDb.addTask('test1','id1,2013-01-01,2s');
var tasks = gDb.getTasks();
expect(tasks[0].startTime).toEqual(moment('2013-01-01', 'YYYY-MM-DD').toDate());
expect(tasks[0].endTime ).toEqual(moment('2013-01-01 00:00:02', 'YYYY-MM-DD hh:mm:ss').toDate());
expect(tasks[0].id ).toEqual('id1');
expect(tasks[0].description).toEqual('test1');
});
it('should handle duration (weeks) instead of fixed date to determine end date', function () {
gDb.setDateFormat('YYYY-MM-DD');
gDb.addSection('testa1');
gDb.addTask('test1','id1,2013-01-01,2w');

@@ -57,0 +78,0 @@ var tasks = gDb.getTasks();

@@ -5,4 +5,4 @@ var gantt = require('./parser/gantt').parser;

var moment = require('moment');
var log = require('../../logger').create();
var daysInChart;

@@ -369,3 +369,3 @@ var conf = {

prevGap += numOccurances[i - 1][1];
// console.log(prevGap);
// log.debug(prevGap);
return d[1] * theGap / 2 + prevGap * theGap + theTopPad;

@@ -372,0 +372,0 @@ }

@@ -8,5 +8,6 @@ /**

var notes = [];
var log = require('../../logger').create();
exports.addActor = function(id,name,description){
//console.log('Adding actor: '+id);
actors[id] = {name:name, description:description};

@@ -17,3 +18,2 @@ actorKeys.push(id);

exports.addMessage = function(idFrom, idTo, message, answer){
//console.log('Adding message from='+idFrom+' to='+idTo+' message='+message+' answer='+answer);
messages.push({from:idFrom, to:idTo, message:message, answer:answer});

@@ -26,3 +26,3 @@ };

exports.addSignal = function(idFrom, idTo, message, messageType){
//console.log('Adding message from='+idFrom+' to='+idTo+' message='+message+' answer='+answer);
log.debug('Adding message from='+idFrom+' to='+idTo+' message='+message+' type='+messageType);
messages.push({from:idFrom, to:idTo, message:message, type:messageType});

@@ -87,3 +87,3 @@ };

exports.parseError = function(err,hash){
mermaid.parseError(err,hash);
mermaidAPI.parseError(err,hash);
};

@@ -97,3 +97,3 @@

} else {
// console.log(param);
// log.debug(param);
switch(param.type){

@@ -110,3 +110,3 @@ case 'addActor':

case 'loopStart':
//console.log('Loop text: ',param.loopText);
//log.debug('Loop text: ',param.loopText);
exports.addSignal(undefined, undefined, param.loopText, param.signalType);

@@ -119,3 +119,3 @@ //yy.addSignal(undefined, undefined, $2, yy.LINETYPE.LOOP_START);

case 'optStart':
//console.log('Loop text: ',param.loopText);
//log.debug('Loop text: ',param.loopText);
exports.addSignal(undefined, undefined, param.optText, param.signalType);

@@ -128,3 +128,3 @@ //yy.addSignal(undefined, undefined, $2, yy.LINETYPE.LOOP_START);

case 'altStart':
//console.log('Loop text: ',param.loopText);
//log.debug('Loop text: ',param.loopText);
exports.addSignal(undefined, undefined, param.altText, param.signalType);

@@ -140,5 +140,3 @@ //yy.addSignal(undefined, undefined, $2, yy.LINETYPE.LOOP_START);

}
// console.log('xxx',param);
}
};

@@ -5,4 +5,4 @@ /**

var proxyquire = require('proxyquire');
var log = require('../../logger').create();
var sq = require('./parser/sequenceDiagram').parser;

@@ -26,4 +26,4 @@ var newD3;

parseError = function(err, hash) {
console.log('Syntax error:' + err);
console.log(hash);
log.debug('Syntax error:' + err);
log.debug(hash);
};

@@ -74,3 +74,3 @@ sq.yy.parseError = parseError;

var actors = sq.yy.getActors();
//console.log(actors);
//log.debug(actors);
expect(actors.Alice.description).toBe('Alice');

@@ -92,3 +92,3 @@ expect(actors.Bob.description).toBe('Bob');

var actors = sq.yy.getActors();
//console.log(actors);
//log.debug(actors);
expect(actors.Alice.description).toBe('Alice');

@@ -114,3 +114,3 @@ expect(actors.Bob.description).toBe('Bob');

var messages = sq.yy.getMessages();
//console.log(messages);
//log.debug(messages);

@@ -132,3 +132,3 @@

var messages = sq.yy.getMessages();
//console.log(messages);
//log.debug(messages);

@@ -255,3 +255,3 @@

var actors = sq.yy.getActors();
//console.log(actors);
//log.debug(actors);
expect(actors.Alice.description).toBe('Alice');

@@ -261,3 +261,3 @@ actors.Bob.description = 'Bob';

var messages = sq.yy.getMessages();
//console.log(messages);
//log.debug(messages);

@@ -282,3 +282,3 @@ expect(messages.length).toBe(5);

var actors = sq.yy.getActors();
//console.log(actors);
//log.debug(actors);
expect(actors.Alice.description).toBe('Alice');

@@ -288,3 +288,3 @@ actors.Bob.description = 'Bob';

var messages = sq.yy.getMessages();
//console.log(messages);
//log.debug(messages);

@@ -302,3 +302,3 @@ expect(messages.length).toBe(5);

var actors = sq.yy.getActors();
//console.log(actors);
//log.debug(actors);
expect(actors.Alice.description).toBe('Alice');

@@ -308,3 +308,3 @@ actors.Bob.description = 'Bob';

var messages = sq.yy.getMessages();
//console.log(messages);
//log.debug(messages);

@@ -337,3 +337,3 @@ expect(messages.length).toBe(4);

var messages = sq.yy.getMessages();
//console.log(messages);
//log.debug(messages);

@@ -353,4 +353,4 @@ expect(messages.length).toBe(7);

parseError = function(err, hash) {
console.log('Syntax error:' + err);
console.log(hash);
log.debug('Syntax error:' + err);
log.debug(hash);
};

@@ -504,4 +504,4 @@ sq.yy.parseError = parseError;

parseError = function(err, hash) {
console.log('Syntax error:' + err);
console.log(hash);
log.debug('Syntax error:' + err);
log.debug(hash);
};

@@ -700,4 +700,4 @@ sq.yy.parseError = parseError;

parseError = function(err, hash) {
console.log('Syntax error:' + err);
console.log(hash);
log.debug('Syntax error:' + err);
log.debug(hash);
};

@@ -704,0 +704,0 @@ sq.yy.parseError = parseError;

@@ -9,2 +9,4 @@ /**

var d3 = require('../../d3');
var log = require('../../logger').create();
var conf = {

@@ -140,4 +142,4 @@

var textObj = svgDraw.getTextObj();
textObj.x = startx;
textObj.y = verticalPos;
textObj.x = startx-4;
textObj.y = verticalPos-13;
textObj.textMargin = conf.noteMargin;

@@ -148,3 +150,3 @@ textObj.dy = '1em';

var textElem = svgDraw.drawText(g,textObj, conf.width);
var textElem = svgDraw.drawText(g,textObj, conf.width-conf.noteMargin);

@@ -155,4 +157,6 @@ var textHeight = textElem[0][0].getBBox().height;

g = elem.append("g");
textElem = svgDraw.drawText(g,textObj, 2*conf.width);
//textObj.x = textObj.x - conf.width;
//textElem = svgDraw.drawText(g,textObj, 2*conf.noteMargin);
textElem = svgDraw.drawText(g,textObj, 2*conf.width-conf.noteMargin);
textHeight = textElem[0][0].getBBox().height;

@@ -233,7 +237,7 @@ rectElem.attr('width',2*conf.width);

if (msg.type === sq.yy.LINETYPE.SOLID || msg.type === sq.yy.LINETYPE.DOTTED){
line.attr("marker-end", "url(#arrowhead)");
line.attr("marker-end", "url(" + window.location.protocol+'//'+window.location.host+window.location.pathname + "#arrowhead)");
}
if (msg.type === sq.yy.LINETYPE.SOLID_CROSS || msg.type === sq.yy.LINETYPE.DOTTED_CROSS){
line.attr("marker-end", "url(#crosshead)");
line.attr("marker-end", "url(" + window.location.protocol+'//'+window.location.host+window.location.pathname + "#crosshead)");
}

@@ -293,3 +297,2 @@

var messages = sq.yy.getMessages();
module.exports.drawActors(diagram, actors, actorKeys, 0);

@@ -379,2 +382,8 @@

// Adjust line height of actor lines now that the height of the diagram is known
log.debug('For line height fix Querying: #' + id + ' .actor-line');
var actorLines = d3.selectAll('#' + id + ' .actor-line');
actorLines.attr('y2',box.stopy);
var height = box.stopy - box.starty + 2*conf.diagramMarginY;

@@ -390,3 +399,3 @@

diagram.attr("width", '100%');
diagram.attr('style', 'max-width:' + (width) + 'px;')
diagram.attr('style', 'max-width:' + (width) + 'px;');
}else{

@@ -393,0 +402,0 @@ diagram.attr("height",height);

/**
* Created by knut on 14-12-20.
*/
var log = require('../../logger').create();
exports.drawRect = function(elem , rectData){

@@ -43,9 +44,10 @@ var rectElem = elem.append("rect");

var span = textElem.append('tspan');
span.attr('x', textData.x);
span.attr('dy', textData.dy);
//span.attr('x', textData.x);
span.attr('x', textData.x+textData.textMargin*2);
//span.attr('dy', textData.dy);
span.text(nText);
if(typeof textElem.textwrap !== 'undefined'){
textElem.textwrap({
x: textData.x+4, // bounding box is 300 pixels from the left
y: textData.y-2, // bounding box is 400 pixels from the top
x: textData.x, // bounding box is 300 pixels from the left
y: textData.y, // bounding box is 400 pixels from the top
width: width, // bounding box is 500 pixels across

@@ -79,3 +81,3 @@ height: 1800 // bounding box is 600 pixels tall

};
var actorCnt = -1;
/**

@@ -91,3 +93,5 @@ * Draws an actor in the diagram with the attaced line

if(verticalPos === 0) {
actorCnt++;
g.append("line")
.attr("id", 'actor'+actorCnt)
.attr("x1", center)

@@ -94,0 +98,0 @@ .attr("y1", 5)

@@ -1,7 +0,28 @@

var he = require('he');
//(function (root, factory) {
// if (typeof exports === 'object') {
// // CommonJS
// module.exports = factory(require('b'));
// } else if (typeof define === 'function' && define.amd) {
// // AMD
// define(['b'], function (b) {
// return (root.returnExportsGlobal = factory(b));
// });
// } else {
// // Global Variables
// root.returnExportsGlobal = factory(root.b);
// }
//}(this, function (b) {
/**
* Web page integration module for the mermaid framework. It uses the mermaidAPI for mermaid functionality and to render
* the diagrams to svg code.
*/
var mermaidAPI = require('./mermaidAPI');
var nextId = 0;
var log = require('./logger').create();
var utils = require('./utils');
module.exports.mermaidAPI = mermaidAPI;
/**
* ## init
* Function that goes through the document to find the chart definitions in there and render them.

@@ -11,3 +32,3 @@ *

* attribute already set. This way the init function can be triggered several times.
*
*
* Optionally, `init` can accept in the second argument one of the following:

@@ -17,20 +38,20 @@ * - a DOM Node

* - a W3C selector, a la `.mermaid`
*
* ```
*
* ```mermaid
* graph LR;
* a(Find elements)-->b{Processed};
* b-->|Yes|c(Leave element);
* c-->|No |d(Transform);
* a(Find elements)-->b{Processed}
* b-->|Yes|c(Leave element)
* b-->|No |d(Transform)
* ```
*/
/**
* Renders the mermaid diagrams
* @* param nodes- a css selector or an array of nodes
* @param nodes a css selector or an array of nodes
*/
var init = function () {
var conf= mermaidAPI.getConfig();
log.debug('Starting rendering diagrams');
var nodes;
if(arguments.length === 2){
// sequence config was passed as #1
if(arguments.length >= 2){
/*! sequence config was passed as #1 */
if(typeof arguments[0] !== 'undefined'){
mermaid.sequenceConfig = arguments[0];
mermaid.sequenceConfig = arguments[0];
}

@@ -43,9 +64,24 @@

}
// if last argument is a function this is the callback function
var callback;
if(typeof arguments[arguments.length-1] === 'function'){
callback = arguments[arguments.length-1];
log.debug('Callback function found');
}else{
if(typeof conf.mermaid !== 'undefined'){
if(typeof conf.mermaid.callback === 'function'){
callback = conf.mermaid.callback;
log.debug('Callback function found');
}else{
log.debug('No Callback function found');
}
}
}
nodes = nodes === undefined ? document.querySelectorAll('.mermaid')
: typeof nodes === "string" ? document.querySelectorAll(nodes)
: nodes instanceof Node ? [nodes]
// Last case - sequence config was passed pick next
/*! Last case - sequence config was passed pick next */
: nodes;
var i;

@@ -55,5 +91,11 @@

mermaidAPI.initialize(mermaid_config);
}
log.debug('Start On Load before: '+mermaid.startOnLoad);
if(typeof mermaid.startOnLoad !== 'undefined'){
log.debug('Start On Load inner: '+mermaid.startOnLoad);
mermaidAPI.initialize({startOnLoad:mermaid.startOnLoad});
}
if(typeof mermaid.ganttConfig !== 'undefined'){

@@ -63,10 +105,15 @@ mermaidAPI.initialize({gantt:mermaid.ganttConfig});

var insertSvg = function(svgCode){
var txt;
var insertSvg = function(svgCode, bindFunctions){
element.innerHTML = svgCode;
if(typeof callback !== 'undefined'){
callback(id);
}
bindFunctions(element);
};
for (i = 0; i < nodes.length; i++) {
var element = nodes[i];
// Check if previously processed
/*! Check if previously processed */
if(!element.getAttribute("data-processed")) {

@@ -80,8 +127,14 @@ element.setAttribute("data-processed", true);

var txt = element.innerHTML;
txt = txt.replace(/>/g,'&gt;');
txt = txt.replace(/</g,'&lt;');
var he = require('he');
// Fetch the graph definition including tags
txt = element.innerHTML;
//console.warn('delivererd from the browser: ');
//console.warn(txt);
// transforms the html to pure text
txt = he.decode(txt).trim();
//console.warn('he decode: ');
//console.warn(txt);
mermaidAPI.render(id,txt,insertSvg, element);

@@ -92,7 +145,6 @@ }

exports.tester = function(){};
exports.init = init;
exports.parse = mermaidAPI.parse;
/**
* ## version
* Function returning version information

@@ -105,6 +157,21 @@ * @returns {string} A string containing the version info

/**
* ## initialize
* This function overrides the default configuration.
* @param config
*/
exports.initialize = function(config){
log.debug('Initializing mermaid');
if(typeof config.mermaid !== 'undefined') {
if (typeof config.mermaid.startOnLoad !== 'undefined') {
global.mermaid.startOnLoad = config.mermaid.startOnLoad;
}
if (typeof config.mermaid.htmlLabels !== 'undefined') {
global.mermaid.htmlLabels = config.mermaid.htmlLabels;
}
}
mermaidAPI.initialize(config);
};
var equals = function (val, variable){

@@ -119,6 +186,15 @@ if(typeof variable === 'undefined'){

/**
* Global mermaid object. Contains the functions:
* * init
* * initialize
* * version
* * parse
* * parseError
* * render
*/
global.mermaid = {
startOnLoad: true,
htmlLabels: true,
init: function(sequenceConfig, nodes) {

@@ -128,3 +204,3 @@ init.apply(null, arguments);

initialize: function(config) {
mermaidAPI.initialize(config);
exports.initialize(config);
},

@@ -138,4 +214,4 @@ version: function() {

parseError: function(err, hash) {
console.log('Mermaid Syntax error:');
console.log(err);
log.debug('Mermaid Syntax error:');
log.debug(err);
},

@@ -147,2 +223,14 @@ render:function(id, text,callback, element){

/**
* ## parseError
* This function overrides the default configuration.
* @param config
*/
exports.parseError = global.mermaid.parseError;
/**
* ##contentLoaded
* Callback function that is called when page is loaded. This functions fetches configuration for mermaid rendering and
* calls init for rendering the mermaid diagrams on the page.
*/
exports.contentLoaded = function(){

@@ -158,3 +246,2 @@ var config;

if(global.mermaid.startOnLoad) {
// For backwards compatability reasons also check mermaid_config variable

@@ -175,7 +262,15 @@ if (typeof mermaid_config !== 'undefined') {

}else{
config = mermaidAPI.getConfig();
if(config.startOnLoad){
global.mermaid.init();
//if(typeof global.mermaid === 'undefined' ){
if(typeof global.mermaid.startOnLoad === 'undefined' ){
log.debug('In start, no config');
config = mermaidAPI.getConfig();
if(config.startOnLoad){
global.mermaid.init();
}
//}else{
//
//}
}
}

@@ -188,3 +283,3 @@

if(typeof document !== 'undefined'){
/**
/*!
* Wait for document loaded before starting the execution

@@ -196,1 +291,5 @@ */

}
// // Your actual module
// return module.exports;
//}));

@@ -0,1 +1,14 @@

/**
* ---
* title: mermaidAPI
* order: 5
* ---
* # mermaidAPI
* This is the api to be used when handling the integration with the web page instead of using the default integration
* (mermaid.js).
*
* The core of this api is the **render** function that given a graph definitionas text renders the graph/diagram and
* returns a svg element for the graph. It is is then up to the user of the API to make use of the svg, either insert it
* somewhere in the page or something completely different.
*/
var graph = require('./diagrams/flowchart/graphDb');

@@ -19,49 +32,174 @@ var flow = require('./diagrams/flowchart/parser/flow');

// Default options, can be overridden at initialization time
/**
* Object with the co0nfigurations
* @type {Object}
* ## Configuration
* These are the default options which can be overridden with the initialization call as in the example below:
* ```
* mermaid.initialize({
* flowchart:{
* htmlLabels: false
* }
* });
* ```
*/
var config = {
/**
* logLevel , decides the amount of logging to be used.
* * debug: 1
* * info: 2
* * warn: 3
* * error: 4
* * fatal: 5
*/
logLevel: 3,
/**
* **cloneCssStyles** - This options controls whether or not the css rules should be copied into the generated svg
*/
cloneCssStyles: true,
/**
* **startOnLoad** - This options controls whether or mermaid starts when the page loads
*/
startOnLoad: true,
/**
* ### flowchart
* *The object containing configurations specific for flowcharts*
*/
flowchart:{
// Default is to not set width
// width: 1200
/**
* **htmlLabels** - Flag for setting whether or not a html tag should be used for rendering labels
* on the edges
*/
htmlLabels:true,
/**
* **useMaxWidth** - Flag for setting whether or not a all available width should be used for
* the diagram.
*/
useMaxWidth:true
},
/**
* ### sequenceDiagram
* The object containing configurations specific for sequence diagrams
*/
sequenceDiagram:{
/**
* **diagramMarginX** - margin to the right and left of the sequence diagram
*/
diagramMarginX:50,
/**
* **diagramMarginY** - margin to the over and under the sequence diagram
*/
diagramMarginY:10,
// Margin between actors
/**
* **actorMargin** - Margin between actors
*/
actorMargin:50,
// Width of actor moxes
/**
* **width** - Width of actor boxes
*/
width:150,
// Height of actor boxes
/**
* **height** - Height of actor boxes
*/
height:65,
// Margin around loop boxes
/**
* **boxMargin** - Margin around loop boxes
*/
boxMargin:10,
/**
* **boxTextMargin** - margin around the text in loop/alt/opt boxes
*/
boxTextMargin:5,
/**
* **noteMargin** - margin around notes
*/
noteMargin:10,
// Space between messages
/**
* **messageMargin** - Space between messages
*/
messageMargin:35,
//mirror actors under diagram
/**
* **mirrorActors** - mirror actors under diagram
*/
mirrorActors:true,
// Depending on css styling this might need adjustment
// Prolongs the edge of the diagram downwards
/**
* **bottomMarginAdj** - Depending on css styling this might need adjustment.
* Prolongs the edge of the diagram downwards
*/
bottomMarginAdj:1,
/**
* **useMaxWidth** - when this flag is set the height and width is set to 100% and is then scaling with the
* available space if not the absolute space required is used
*/
useMaxWidth:true
},
/** ### gantt
* The object containing configurations specific for gantt diagrams*
*/
gantt:{
/**
* **titleTopMargin** - margin top for the text over the gantt diagram
*/
titleTopMargin: 25,
/**
* **barHeight** - the height of the bars in the graph
*/
barHeight: 20,
/**
* **barGap** - the margin between the different activities in the gantt diagram
*/
barGap: 4,
/**
* **topPadding** - margin between title and gantt diagram and between axis and gantt diagram.
*/
topPadding: 50,
/**
* **sidePadding** - the space allocated for the section name to the left of the activities.
*/
sidePadding: 75,
/**
* **gridLineStartPadding** - Vertical starting position of the grid lines
*/
gridLineStartPadding: 35,
/**
* **fontSize** - font size ...
*/
fontSize: 11,
/**
* **fontFamily** - font family ...
*/
fontFamily: '"Open-Sans", "sans-serif"',
/**
* **numberSectionStyles** - the number of alternating section styles
*/
numberSectionStyles:3,
/**
* **axisFormatter** - formatting of the axis, this might need adjustment to match your locale and preferences
*/
axisFormatter: [
// Within a day

@@ -87,7 +225,11 @@ ["%I:%M", function (d) {

}]
] }
]
}
};
var log = require('./logger').create({level:config.logLevel});
/**
* Function that parses a mermaid diagram defintion. If parsing fails the parseError callback is called and an error is
* ## parse
* Function that parses a mermaid diagram definition. If parsing fails the parseError callback is called and an error is
* thrown and

@@ -134,2 +276,3 @@ * @param text

/**
* ## version
* Function returning version information

@@ -142,2 +285,73 @@ * @returns {string} A string containing the version info

exports.encodeEntities = function(text){
var txt = text;
txt = txt.replace(/style.*:\S*#.*;/g,function(s,t,u){
var innerTxt = s.substring(0,s.length-1);
return innerTxt;
});
txt = txt.replace(/classDef.*:\S*#.*;/g,function(s,t,u){
var innerTxt = s.substring(0,s.length-1);
return innerTxt;
});
txt = txt.replace(/#\w+\;/g,function(s,t,u){
var innerTxt = s.substring(1,s.length-1);
var isInt = /^\+?\d+$/.test(innerTxt);
if(isInt){
return 'fl°°'+innerTxt+'¶ß';
}else{
return 'fl°'+innerTxt+'¶ß';
}
});
//txt = txt.replace(/fa:fa[\w\-]+/g,function(s,t,u){
// return 'fa:¢';
//});
return txt;
};
exports.decodeEntities = function(text){
var txt = text;
txt = txt.replace(/\fl\°\°/g,function(s,t,u){
return '&#';
});
txt = txt.replace(/\fl\°/g,function(s,t,u){
return '&';
});
txt = txt.replace(/¶ß/g,function(s,t,u){
return ';';
});
return txt;
};
/**
* ##render
* Function that renders an svg with a graph from a chart definition. Usage example below.
*
* ```
* mermaidAPI.initialize({
* startOnLoad:true
* });
* $(function(){
* var graphDefinition = 'graph TB\na-->b';
* var cb = function(svgGraph){
* console.log(svgGraph);
* };
* mermaidAPI.render('id1',graphDefinition,cb);
* });
*```
* @param id the id of the element to be rendered
* @param txt the graph definition
* @param cb callback which is called after rendering is finished with the svg code as inparam.
* @param container selector to element in which a div with the graph temporarily will be inserted. In one is
* provided a hidden div will be inserted in the body of the page instead. The element will be removed when rendering is
* completed.
*/
var render = function(id, txt, cb, container){

@@ -164,2 +378,7 @@

window.txt = txt;
txt = exports.encodeEntities(txt);
//console.warn('mermaid encode: ');
//console.warn(txt);
var element = d3.select('#d'+id).node();

@@ -170,2 +389,3 @@ var graphType = utils.detectType(txt);

case 'graph':
flowRenderer.setConf(config.flowchart);

@@ -177,3 +397,2 @@ flowRenderer.draw(txt, id, false);

}
graph.bindFunctions();
break;

@@ -189,5 +408,3 @@ case 'dotGraph':

case 'sequenceDiagram':
//if(typeof mermaid.sequenceConfig === 'object'){
seq.setConf(config.sequenceDiagram);
//}
seq.draw(txt,id);

@@ -213,4 +430,18 @@ if(config.cloneCssStyles) {

d3.select('#d'+id).selectAll('foreignobject div').attr('xmlns','http://www.w3.org/1999/xhtml');
// Fix for when the base tag is used
var svgCode = d3.select('#d'+id).node().innerHTML.replace(/url\(#arrowhead/g,'url('+ window.location.protocol+'//'+location.host+location.pathname +'#arrowhead','g');
svgCode = exports.decodeEntities(svgCode);
//console.warn('mermaid decode: ');
//console.warn(svgCode);
//var he = require('he');
//svgCode = he.decode(svgCode);
if(typeof cb !== 'undefined'){
cb(d3.select('#d'+id).node().innerHTML);
cb(svgCode,graph.bindFunctions);
}else{
log.warn('CB = undefined');
}

@@ -246,3 +477,3 @@

for(j=0;j<lvl2Keys.length;j++) {
//console.log('Setting conf ',lvl1Keys[i],'-',lvl2Keys[j]);
log.debug('Setting conf ',lvl1Keys[i],'-',lvl2Keys[j]);
if(typeof config[lvl1Keys[i]] === 'undefined'){

@@ -252,2 +483,3 @@

}
log.debug('Setting config: '+lvl1Keys[i]+' '+lvl2Keys[j]+' to '+cnf[lvl1Keys[i]][lvl2Keys[j]]);
config[lvl1Keys[i]][lvl2Keys[j]] = cnf[lvl1Keys[i]][lvl2Keys[j]];

@@ -261,2 +493,3 @@ }

exports.initialize = function(options){
log.debug('Initializing mermaidAPI');
// Update default config with options supplied at initialization

@@ -271,2 +504,11 @@ if(typeof options === 'object'){

};
exports.parseError = function(err, hash) {
if(typeof mermaid !== 'undefined') {
mermaid.parseError(err,hash);
}else{
log.debug('Mermaid Syntax error:');
log.debug(err);
}
};
global.mermaidAPI = {

@@ -276,3 +518,5 @@ render : exports.render,

initialize : exports.initialize,
detectType : utils.detectType
detectType : utils.detectType,
parseError : exports.parseError,
getConfig : exports.getConfig
};

@@ -8,2 +8,3 @@ /**

var api = require('./mermaidAPI.js');
var log = require('./logger').create();

@@ -56,2 +57,18 @@ describe('when using mermaidAPI and ',function() {

});
describe('checking validity of input ', function(){
it('it should return false for an invalid definiton',function(){
spyOn(global.mermaidAPI,'parseError');
var res = api.parse('this is not a mermaid diagram definition');
expect(res).toBe(false);
expect(global.mermaidAPI.parseError).toHaveBeenCalled();
});
it('it should return true for a valid definiton',function(){
spyOn(global.mermaidAPI,'parseError');
var res = mermaid.parse('graph TD;A--x|text including URL space|B;');
expect(res).toBe(true);
expect(global.mermaidAPI.parseError).not.toHaveBeenCalled();
});
});
});

@@ -621,3 +621,3 @@ /* parser generated by jison 0.4.15 */

if (!args[1]) {
console.log('Usage: '+args[0]+' FILE');
log.debug('Usage: '+args[0]+' FILE');
process.exit(1);

@@ -624,0 +624,0 @@ }

/**
* Created by knut on 14-11-23.
*/
var log = require('./logger').create();
/**
* @function detectType
* Detects the type of the graph text.
* ```mermaid
* graph LR
* a-->b
* b-->c
* c-->d
* d-->e
* e-->f
* f-->g
* g-->h
* ```
*
* @param {string} text The text defining the graph

@@ -11,2 +24,3 @@ * @param {string} text The second text defining the graph

module.exports.detectType = function(text,a){
text = text.replace(/^\s*%%.*\n/g,'\n');
if(text.match(/^\s*sequenceDiagram/)){

@@ -16,9 +30,4 @@ return "sequenceDiagram";

if(text.match(/^\s*sequence/)){
//console.log('Detected sequence syntax');
return "sequence";
}
if(text.match(/^\s*digraph/)) {
//console.log('Detected dot syntax');
//log.debug('Detected dot syntax');
return "dotGraph";

@@ -28,3 +37,3 @@ }

if(text.match(/^\s*info/)) {
//console.log('Detected info syntax');
//log.debug('Detected info syntax');
return "info";

@@ -34,3 +43,3 @@ }

if(text.match(/^\s*gantt/)) {
//console.log('Detected info syntax');
//log.debug('Detected info syntax');
return "gantt";

@@ -89,3 +98,3 @@ }

if (classes.default.styles instanceof Array) {
defaultStyles += "#" + svg.id.trim() + ' .node' + ' { ' + classes[className].styles.join("; ") + '; }\n';
defaultStyles += "#" + svg.id.trim() + ' .node' + '>rect { ' + classes[className].styles.join("; ") + '; }\n';
}

@@ -103,3 +112,3 @@ if (classes.default.nodeLabelStyles instanceof Array) {

if (classes[className].styles instanceof Array) {
embeddedStyles += "#" + svg.id.trim() + ' .' + className + ' { ' + classes[className].styles.join("; ") + '; }\n';
embeddedStyles += "#" + svg.id.trim() + ' .' + className + '>rect { ' + classes[className].styles.join("; ") + '; }\n';
}

@@ -106,0 +115,0 @@ }

/**
* Created by knut on 14-11-23.
*/
var log = require('./logger').create();
describe('when detecting chart type ',function() {

@@ -11,15 +11,2 @@ var utils = require('./utils');

it('should handle a sequence defintion', function () {
str = 'sequence TB\nbfs1:queue';
var type = utils.detectType(str);
expect(type).toBe('sequence');
});
it('should handle a sequence defintion with leading spaces', function () {
str = ' sequence TB\nbfs1:queue';
var type = utils.detectType(str);
expect(type).toBe('sequence');
});
it('should handle a graph defintion', function () {

@@ -44,8 +31,2 @@ str = 'graph TB\nbfs1:queue';

});
it('should handle a sequence defintion with leading spaces and newline', function () {
str = ' \n sequence TB\nbfs1:queue';
var type = utils.detectType(str);
expect(type).toBe('sequence');
});
});

@@ -142,5 +123,5 @@

utils.cloneCssStyles(svg, { "default": { "styles": ["stroke:#fff","stroke-width:1.5px"] } });
expect(stylesToArray(svg)).toEqual([ '#mermaid-01 .node { stroke:#fff; stroke-width:1.5px; }' ]);
expect(stylesToArray(svg)).toEqual([ '#mermaid-01 .node>rect { stroke:#fff; stroke-width:1.5px; }' ]);
// Also verify the elements around the styling
expect(svg.innerHTML).toBe('<style type="text/css" title="mermaid-svg-internal-css">/* <![CDATA[ */\n#mermaid-01 .node { stroke:#fff; stroke-width:1.5px; }\n/* ]]> */\n</style>');
expect(svg.innerHTML).toBe('<style type="text/css" title="mermaid-svg-internal-css">/* <![CDATA[ */\n#mermaid-01 .node>rect { stroke:#fff; stroke-width:1.5px; }\n/* ]]> */\n</style>');
});

@@ -186,3 +167,3 @@

utils.cloneCssStyles(svg, { "default": { "styles": ["stroke:#fff","stroke-width:1.5px"] } });
expect(stylesToArray(svg)).toEqual([ '#mermaid-01 .node { stroke:#fff; stroke-width:1.5px; }', '.node { stroke: #eee; }', '.node-square { stroke: #bbb; }']);
expect(stylesToArray(svg)).toEqual([ '#mermaid-01 .node>rect { stroke:#fff; stroke-width:1.5px; }', '.node { stroke: #eee; }', '.node-square { stroke: #bbb; }']);
});

@@ -196,7 +177,7 @@

"node-circle": { "styles": ["fill:#444", "stroke:#111"] } });
expect(stylesToArray(svg)).toEqual([ '#mermaid-01 .node { stroke:#fff; stroke-width:1.5px; }',
expect(stylesToArray(svg)).toEqual([ '#mermaid-01 .node>rect { stroke:#fff; stroke-width:1.5px; }',
'.node { stroke: #eee; }',
'.node-square { stroke: #bbb; }',
'#mermaid-01 .node-square { fill:#eee; stroke:#aaa; }',
'#mermaid-01 .node-circle { fill:#444; stroke:#111; }'
'#mermaid-01 .node-square>rect { fill:#eee; stroke:#aaa; }',
'#mermaid-01 .node-circle>rect { fill:#444; stroke:#111; }'
]);

@@ -203,0 +184,0 @@ });

@@ -74,2 +74,13 @@ var test = require('tape')

test('not setting a css source file uses a default style', function(t) {
t.plan(1)
var cli = require(cliPath)
cli.parse([], function(err, msg, opt) {
t.ok(opt.css, 'css file is populated')
t.end()
})
})
test('setting a css source file succeeds', function(t) {

@@ -76,0 +87,0 @@ t.plan(1)

@@ -6,7 +6,8 @@ {

"width": 150,
"height": 165,
"height": 15,
"boxMargin": 10,
"boxTextMargin": 5,
"noteMargin": 10,
"messageMargin": 35
"messageMargin": 35,
"mirrorActors":false
}

@@ -18,4 +18,5 @@ {

"requirejs": "~2.1.16",
"mermaid": "~0.4.0"
"mermaid": "~0.4.0",
"qunit": "~1.18.0"
}
}
require.config({
baseUrl: '.',
paths: {
// the left side is the module ID,
// the right side is the path to
// the jQuery file, relative to baseUrl.
// Also, the path should NOT include
// the '.js' file extension. This example
// is using jQuery 1.9.0 located at
// js/lib/jquery-1.9.0.js, relative to
// the HTML page.
mermaid: 'bower_components/mermaid/dist/mermaid.full'
mermaid: '../../dist/mermaid'
},
shim: {
mermaid: {
exports: 'mermaid'
}
}
});
// Start the main app logic.
requirejs(['simple','mermaid'],
function (simple) {
//jQuery, canvas and the app/sub module are all
//loaded and can be used here now.
mermaid.init();
});
require([], function (){
QUnit.module('requireTest.html');
QUnit.test('using mermaid in requirejs', function (assert){
var done = assert.async();
require(['mermaid'], function (mermaid) {
assert.ok(mermaid, 'mermaid is not null');
console.log(mermaid);
mermaid.init();
assert.equal(window.d3.selectAll('path')[0].length, 8,
'drew 8 paths');
done();
});
});
QUnit.load();
QUnit.start();
});

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc