mermaid/dist/mermaid.slim.min.js

11 lines
385 KiB
JavaScript
Raw Normal View History

2015-02-15 18:11:46 +01:00
!function t(e,n,r){function i(u,o){if(!n[u]){if(!e[u]){var s="function"==typeof require&&require;if(!o&&s)return s(u,!0);if(a)return a(u,!0);throw new Error("Cannot find module '"+u+"'")}var c=n[u]={exports:{}};e[u][0].call(c.exports,function(t){var n=e[u][1][t];return i(n?n:t)},c,c.exports,t,e,n,r)}return n[u].exports}for(var a="function"==typeof require&&require,u=0;u<r.length;u++)i(r[u]);return i}({1:[function(t,e){!function(){function t(t,e){return e>t?-1:t>e?1:t>=e?0:0/0}function n(t){return null===t?0/0:+t}function r(t){return!isNaN(t)}function i(t){return{left:function(e,n,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=e.length);i>r;){var a=r+i>>>1;t(e[a],n)<0?r=a+1:i=a}return r},right:function(e,n,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=e.length);i>r;){var a=r+i>>>1;t(e[a],n)>0?i=a:r=a+1}return r}}}function a(t){return t.length}function u(t){for(var e=1;t*e%1;)e*=10;return e}function o(t,e){for(var n in e)Object.defineProperty(t.prototype,n,{value:e[n],enumerable:!1})}function s(){this._=Object.create(null)}function c(t){return(t+="")===lo||t[0]===ho?ho+t:t}function l(t){return(t+="")[0]===ho?t.slice(1):t}function h(t){return c(t)in this._}function f(t){return(t=c(t))in this._&&delete this._[t]}function p(){var t=[];for(var e in this._)t.push(l(e));return t}function d(){var t=0;for(var e in this._)++t;return t}function g(){for(var t in this._)return!1;return!0}function y(){this._=Object.create(null)}function m(t,e,n){return function(){var r=n.apply(e,arguments);return r===e?t:r}}function v(t,e){if(e in t)return e;e=e.charAt(0).toUpperCase()+e.slice(1);for(var n=0,r=fo.length;r>n;++n){var i=fo[n]+e;if(i in t)return i}}function b(){}function x(){}function w(t){function e(){for(var e,r=n,i=-1,a=r.length;++i<a;)(e=r[i].on)&&e.apply(this,arguments);return t}var n=[],r=new s;return e.on=function(e,i){var a,u=r.get(e);return arguments.length<2?u&&u.on:(u&&(u.on=null,n=n.slice(0,a=n.indexOf(u)).concat(n.slice(a+1)),r.remove(e)),i&&n.push(r.set(e,{on:i})),t)},e}function _(){Zu.event.preventDefault()}function A(){for(var t,e=Zu.event;t=e.sourceEvent;)e=t;return e}function E(t){for(var e=new x,n=0,r=arguments.length;++n<r;)e[arguments[n]]=w(e);return e.of=function(n,r){return function(i){try{var a=i.sourceEvent=Zu.event;i.target=t,Zu.event=i,e[i.type].apply(n,r)}finally{Zu.event=a}}},e}function k(t){return go(t,xo),t}function D(t){return"function"==typeof t?t:function(){return yo(t,this)}}function C(t){return"function"==typeof t?t:function(){return mo(t,this)}}function M(t,e){function n(){this.removeAttribute(t)}function r(){this.removeAttributeNS(t.space,t.local)}function i(){this.setAttribute(t,e)}function a(){this.setAttributeNS(t.space,t.local,e)}function u(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}function o(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}return t=Zu.ns.qualify(t),null==e?t.local?r:n:"function"==typeof e?t.local?o:u:t.local?a:i}function S(t){return t.trim().replace(/\s+/g," ")}function F(t){return new RegExp("(?:^|\\s+)"+Zu.requote(t)+"(?:\\s+|$)","g")}function T(t){return(t+"").trim().split(/^|\s+/)}function B(t,e){function n(){for(var n=-1;++n<i;)t[n](this,e)}function r(){for(var n=-1,r=e.apply(this,arguments);++n<i;)t[n](this,r)}t=T(t).map(L);var i=t.length;return"function"==typeof e?r:n}function L(t){var e=F(t);return function(n,r){if(i=n.classList)return r?i.add(t):i.remove(t);var i=n.getAttribute("class")||"";r?(e.lastIndex=0,e.test(i)||n.setAttribute("class",S(i+" "+t))):n.setAttribute("class",S(i.replace(e," ")))}}function N(t,e,n){function r(){this.style.removeProperty(t)}function i(){this.style.setProperty(t,e,n)}function a(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}return null==e?r:"function"==typeof e?a:i}function q(t,e){function n(){delete this[t]}function r(){this[t]=e}function i(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}return null==e?n:"function"==typeof e?i:r}funct
}function l(){i(b,x,v,w,_,A,p,d,h,g,y,m,o,e),E.lineEnd=u,u()}var h,f,p,d,g,y,m,v,b,x,w,_,A,E={point:n,lineStart:r,lineEnd:u,polygonStart:function(){e.polygonStart(),E.lineStart=s},polygonEnd:function(){e.polygonEnd(),E.lineStart=r}};return E}function i(e,n,r,o,s,c,l,h,f,p,d,g,y,m){var v=l-e,b=h-n,x=v*v+b*b;if(x>4*a&&y--){var w=o+p,_=s+d,A=c+g,E=Math.sqrt(w*w+_*_+A*A),k=Math.asin(A/=E),D=co(co(A)-1)<To||co(r-f)<To?(r+f)/2:Math.atan2(_,w),C=t(D,k),M=C[0],S=C[1],F=M-e,T=S-n,B=b*F-v*T;(B*B/x>a||co((v*F+b*T)/x-.5)>.3||u>o*p+s*d+c*g)&&(i(e,n,r,o,s,c,M,S,D,w/=E,_/=E,A,y,m),m.point(M,S),i(M,S,D,w,_,A,l,h,f,p,d,g,y,m))}}var a=.5,u=Math.cos(30*Lo),o=16;return e.precision=function(t){return arguments.length?(o=(a=t*t)>0&&16,e):Math.sqrt(a)},e}function rr(t){var e=nr(function(e,n){return t([e*No,n*No])});return function(t){return sr(e(t))}}function ir(t){this.stream=t}function ar(t,e){return{point:e,sphere:function(){t.sphere()},lineStart:function(){t.lineStart()},lineEnd:function(){t.lineEnd()},polygonStart:function(){t.polygonStart()},polygonEnd:function(){t.polygonEnd()}}}function ur(t){return or(function(){return t})()}function or(t){function e(t){return t=o(t[0]*Lo,t[1]*Lo),[t[0]*f+s,c-t[1]*f]}function n(t){return t=o.invert((t[0]-s)/f,(c-t[1])/f),t&&[t[0]*No,t[1]*No]}function r(){o=$n(u=hr(m,v,b),a);var t=a(g,y);return s=p-t[0]*f,c=d+t[1]*f,i()}function i(){return l&&(l.valid=!1,l=null),e}var a,u,o,s,c,l,h=nr(function(t,e){return t=a(t,e),[t[0]*f+s,c-t[1]*f]}),f=150,p=480,d=250,g=0,y=0,m=0,v=0,b=0,x=Fs,w=Ce,_=null,A=null;return e.stream=function(t){return l&&(l.valid=!1),l=sr(x(u,h(w(t)))),l.valid=!0,l},e.clipAngle=function(t){return arguments.length?(x=null==t?(_=t,Fs):Un((_=+t)*Lo),i()):_},e.clipExtent=function(t){return arguments.length?(A=t,w=t?zn(t[0][0],t[0][1],t[1][0],t[1][1]):Ce,i()):A},e.scale=function(t){return arguments.length?(f=+t,r()):f},e.translate=function(t){return arguments.length?(p=+t[0],d=+t[1],r()):[p,d]},e.center=function(t){return arguments.length?(g=t[0]%360*Lo,y=t[1]%360*Lo,r()):[g*No,y*No]},e.rotate=function(t){return arguments.length?(m=t[0]%360*Lo,v=t[1]%360*Lo,b=t.length>2?t[2]%360*Lo:0,r()):[m*No,v*No,b*No]},Zu.rebind(e,h,"precision"),function(){return a=t.apply(this,arguments),e.invert=a.invert&&n,r()}}function sr(t){return ar(t,function(e,n){t.point(e*Lo,n*Lo)})}function cr(t,e){return[t,e]}function lr(t,e){return[t>Mo?t-So:-Mo>t?t+So:t,e]}function hr(t,e,n){return t?e||n?$n(pr(t),dr(e,n)):pr(t):e||n?dr(e,n):lr}function fr(t){return function(e,n){return e+=t,[e>Mo?e-So:-Mo>e?e+So:e,n]}}function pr(t){var e=fr(t);return e.invert=fr(-t),e}function dr(t,e){function n(t,e){var n=Math.cos(e),o=Math.cos(t)*n,s=Math.sin(t)*n,c=Math.sin(e),l=c*r+o*i;return[Math.atan2(s*a-l*u,o*r-c*i),ee(l*a+s*u)]}var r=Math.cos(t),i=Math.sin(t),a=Math.cos(e),u=Math.sin(e);return n.invert=function(t,e){var n=Math.cos(e),o=Math.cos(t)*n,s=Math.sin(t)*n,c=Math.sin(e),l=c*a-s*u;return[Math.atan2(s*a+c*u,o*r+l*i),ee(l*r-o*i)]},n}function gr(t,e){var n=Math.cos(t),r=Math.sin(t);return function(i,a,u,o){var s=u*e;null!=i?(i=yr(n,i),a=yr(n,a),(u>0?a>i:i>a)&&(i+=u*So)):(i=t+u*So,a=t-.5*s);for(var c,l=i;u>0?l>a:a>l;l-=s)o.point((c=_n([n,-r*Math.cos(l),-r*Math.sin(l)]))[0],c[1])}}function yr(t,e){var n=yn(e);n[0]-=t,wn(n);var r=te(-n[1]);return((-n[2]<0?-r:r)+2*Math.PI-To)%(2*Math.PI)}function mr(t,e,n){var r=Zu.range(t,e-To,n).concat(e);return function(t){return r.map(function(e){return[t,e]})}}function vr(t,e,n){var r=Zu.range(t,e-To,n).concat(e);return function(t){return r.map(function(e){return[e,t]})}}function br(t){return t.source}function xr(t){return t.target}function wr(t,e,n,r){var i=Math.cos(e),a=Math.sin(e),u=Math.cos(r),o=Math.sin(r),s=i*Math.cos(t),c=i*Math.sin(t),l=u*Math.cos(n),h=u*Math.sin(n),f=2*Math.asin(Math.sqrt(ae(r-e)+i*u*ae(n-t))),p=1/Math.sin(f),d=f?function(t){var e=Math.sin(t*=f)*p,n=Math.sin(f-t)*p,r=n*s+e*l,i=n*c+e*h,u=n*a+e*o;return[Math.atan2(i,r)*No,Math.atan2(u,Math.sqrt(r*r+i*i))*No]}:function(){return[t*No,e*No]};return d.distance=f,d}function _r(){function t(t,i){var a=Math.sin(i*=Lo),u=Math.c
}:(n=r(n),function(t){t.__transition__[i].tween.set(e,n)}))}function ju(t){return null==t&&(t=""),function(){this.textContent=t}}function Uu(t,e,n,r){var i=t.__transition__||(t.__transition__={active:0,count:0}),a=i[n];if(!a){var u=r.time;a=i[n]={tween:new s,time:u,ease:r.ease,delay:r.delay,duration:r.duration},++i.count,Zu.timer(function(r){function o(r){return i.active>n?c():(i.active=n,a.event&&a.event.start.call(t,l,e),a.tween.forEach(function(n,r){(r=r.call(t,l,e))&&g.push(r)}),void Zu.timer(function(){return d.c=s(r||1)?Sn:s,1},0,u))}function s(r){if(i.active!==n)return c();for(var u=r/p,o=h(u),s=g.length;s>0;)g[--s].call(t,o);return u>=1?(a.event&&a.event.end.call(t,l,e),c()):void 0}function c(){return--i.count?delete i[n]:delete t.__transition__,1}var l=t.__data__,h=a.ease,f=a.delay,p=a.duration,d=ts,g=[];return d.t=f+u,r>=f?o(r-f):void(d.c=o)},0,u)}}function Vu(t,e,n){t.attr("transform",function(t){var r=e(t);return"translate("+(isFinite(r)?r:n(t))+",0)"})}function zu(t,e,n){t.attr("transform",function(t){var r=e(t);return"translate(0,"+(isFinite(r)?r:n(t))+")"})}function $u(t){return t.toISOString()}function Hu(t,e,n){function r(e){return t(e)}function i(t,n){var r=t[1]-t[0],i=r/n,a=Zu.bisect(zc,i);return a==zc.length?[e.year,Ya(t.map(function(t){return t/31536e6}),n)[2]]:a?e[i/zc[a-1]<zc[a]/i?a-1:a]:[Yc,Ya(t,n)[2]]}return r.invert=function(e){return Yu(t.invert(e))},r.domain=function(e){return arguments.length?(t.domain(e),r):t.domain().map(Yu)},r.nice=function(t,e){function n(n){return!isNaN(n)&&!t.range(n,Yu(+n+1),e).length}var a=r.domain(),u=Ia(a),o=null==t?i(u,10):"number"==typeof t&&i(u,t);return o&&(t=o[0],e=o[1]),r.domain(ja(a,e>1?{floor:function(e){for(;n(e=t.floor(e));)e=Yu(e-1);return e},ceil:function(e){for(;n(e=t.ceil(e));)e=Yu(+e+1);return e}}:t))},r.ticks=function(t,e){var n=Ia(r.domain()),a=null==t?i(n,10):"number"==typeof t?i(n,t):!t.range&&[{range:t},e];return a&&(t=a[0],e=a[1]),t.range(n[0],Yu(+n[1]+1),1>e?1:e)},r.tickFormat=function(){return n},r.copy=function(){return Hu(t.copy(),e,n)},$a(r,t)}function Yu(t){return new Date(t)}function Gu(t){return JSON.parse(t.responseText)}function Wu(t){var e=Ju.createRange();return e.selectNode(Ju.body),e.createContextualFragment(t.responseText)}var Zu={version:"3.4.13"};Date.now||(Date.now=function(){return+new Date});var Xu=[].slice,Ku=function(t){return Xu.call(t)},Ju=document,Qu=Ju.documentElement,to=window;try{Ku(Qu.childNodes)[0].nodeType}catch(eo){Ku=function(t){for(var e=t.length,n=new Array(e);e--;)n[e]=t[e];return n}}try{Ju.createElement("div").style.setProperty("opacity",0,"")}catch(no){var ro=to.Element.prototype,io=ro.setAttribute,ao=ro.setAttributeNS,uo=to.CSSStyleDeclaration.prototype,oo=uo.setProperty;ro.setAttribute=function(t,e){io.call(this,t,e+"")},ro.setAttributeNS=function(t,e,n){ao.call(this,t,e,n+"")},uo.setProperty=function(t,e,n){oo.call(this,t,e+"",n)}}Zu.ascending=t,Zu.descending=function(t,e){return t>e?-1:e>t?1:e>=t?0:0/0},Zu.min=function(t,e){var n,r,i=-1,a=t.length;if(1===arguments.length){for(;++i<a&&!(null!=(n=t[i])&&n>=n);)n=void 0;for(;++i<a;)null!=(r=t[i])&&n>r&&(n=r)}else{for(;++i<a&&!(null!=(n=e.call(t,t[i],i))&&n>=n);)n=void 0;for(;++i<a;)null!=(r=e.call(t,t[i],i))&&n>r&&(n=r)}return n},Zu.max=function(t,e){var n,r,i=-1,a=t.length;if(1===arguments.length){for(;++i<a&&!(null!=(n=t[i])&&n>=n);)n=void 0;for(;++i<a;)null!=(r=t[i])&&r>n&&(n=r)}else{for(;++i<a&&!(null!=(n=e.call(t,t[i],i))&&n>=n);)n=void 0;for(;++i<a;)null!=(r=e.call(t,t[i],i))&&r>n&&(n=r)}return n},Zu.extent=function(t,e){var n,r,i,a=-1,u=t.length;if(1===arguments.length){for(;++a<u&&!(null!=(n=i=t[a])&&n>=n);)n=i=void 0;for(;++a<u;)null!=(r=t[a])&&(n>r&&(n=r),r>i&&(i=r))}else{for(;++a<u&&!(null!=(n=i=e.call(t,t[a],a))&&n>=n);)n=void 0;for(;++a<u;)null!=(r=e.call(t,t[a],a))&&(n>r&&(n=r),r>i&&(i=r))}return[n,i]},Zu.sum=function(t,e){var n,i=0,a=t.length,u=-1;if(1===arguments.length)for(;++u<a;)r(n=+t[u])&&(i+=n);else for(;++u<a;)r(n=+e.call(t,t[u],u))&&(i+=n);return i},Zu.mean=function(t,e){var i,a=0,u=t.length,o=-1,s=u;if(1===arguments.length)for(;++o
}function o(t,e){return(e-=t)<0?e+360:e}function s(t,e){return t[0]-e[0]}function c(t,e){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:t<e[0]||e[1]<t}var l,h,f,p,d,g,y,m,v,b,x,w={point:t,lineStart:n,lineEnd:r,polygonStart:function(){w.point=i,w.lineStart=a,w.lineEnd=u,v=0,ms.polygonStart()},polygonEnd:function(){ms.polygonEnd(),w.point=t,w.lineStart=n,w.lineEnd=r,0>ys?(l=-(f=180),h=-(p=90)):v>To?p=90:-To>v&&(h=-90),x[0]=l,x[1]=f}};return function(t){p=f=-(l=h=1/0),b=[],Zu.geo.stream(t,w);var e=b.length;if(e){b.sort(s);for(var n,r=1,i=b[0],a=[i];e>r;++r)n=b[r],c(n[0],i)||c(n[1],i)?(o(i[0],n[1])>o(i[0],i[1])&&(i[1]=n[1]),o(n[0],i[1])>o(i[0],i[1])&&(i[0]=n[0])):a.push(i=n);for(var u,n,d=-1/0,e=a.length-1,r=0,i=a[e];e>=r;i=n,++r)n=a[r],(u=o(i[1],n[0]))>d&&(d=u,l=n[0],f=i[1])}return b=x=null,1/0===l||1/0===h?[[0/0,0/0],[0/0,0/0]]:[[l,h],[f,p]]}}(),Zu.geo.centroid=function(t){vs=bs=xs=ws=_s=As=Es=ks=Ds=Cs=Ms=0,Zu.geo.stream(t,Ss);var e=Ds,n=Cs,r=Ms,i=e*e+n*n+r*r;return Bo>i&&(e=As,n=Es,r=ks,To>bs&&(e=xs,n=ws,r=_s),i=e*e+n*n+r*r,Bo>i)?[0/0,0/0]:[Math.atan2(n,e)*No,ee(r/Math.sqrt(i))*No]};var vs,bs,xs,ws,_s,As,Es,ks,Ds,Cs,Ms,Ss={sphere:b,point:En,lineStart:Dn,lineEnd:Cn,polygonStart:function(){Ss.lineStart=Mn},polygonEnd:function(){Ss.lineStart=Dn}},Fs=Ln(Sn,In,Pn,[-Mo,-Mo/2]),Ts=1e9;Zu.geo.clipExtent=function(){var t,e,n,r,i,a,u={stream:function(t){return i&&(i.valid=!1),i=a(t),i.valid=!0,i},extent:function(o){return arguments.length?(a=zn(t=+o[0][0],e=+o[0][1],n=+o[1][0],r=+o[1][1]),i&&(i.valid=!1,i=null),u):[[t,e],[n,r]]}};return u.extent([[0,0],[960,500]])},(Zu.geo.conicEqualArea=function(){return Hn(Yn)}).raw=Yn,Zu.geo.albers=function(){return Zu.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},Zu.geo.albersUsa=function(){function t(t){var a=t[0],u=t[1];return e=null,n(a,u),e||(r(a,u),e)||i(a,u),e}var e,n,r,i,a=Zu.geo.albers(),u=Zu.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),o=Zu.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),s={point:function(t,n){e=[t,n]}};return t.invert=function(t){var e=a.scale(),n=a.translate(),r=(t[0]-n[0])/e,i=(t[1]-n[1])/e;return(i>=.12&&.234>i&&r>=-.425&&-.214>r?u:i>=.166&&.234>i&&r>=-.214&&-.115>r?o:a).invert(t)},t.stream=function(t){var e=a.stream(t),n=u.stream(t),r=o.stream(t);return{point:function(t,i){e.point(t,i),n.point(t,i),r.point(t,i)},sphere:function(){e.sphere(),n.sphere(),r.sphere()},lineStart:function(){e.lineStart(),n.lineStart(),r.lineStart()},lineEnd:function(){e.lineEnd(),n.lineEnd(),r.lineEnd()},polygonStart:function(){e.polygonStart(),n.polygonStart(),r.polygonStart()},polygonEnd:function(){e.polygonEnd(),n.polygonEnd(),r.polygonEnd()}}},t.precision=function(e){return arguments.length?(a.precision(e),u.precision(e),o.precision(e),t):a.precision()},t.scale=function(e){return arguments.length?(a.scale(e),u.scale(.35*e),o.scale(e),t.translate(a.translate())):a.scale()},t.translate=function(e){if(!arguments.length)return a.translate();var c=a.scale(),l=+e[0],h=+e[1];return n=a.translate(e).clipExtent([[l-.455*c,h-.238*c],[l+.455*c,h+.238*c]]).stream(s).point,r=u.translate([l-.307*c,h+.201*c]).clipExtent([[l-.425*c+To,h+.12*c+To],[l-.214*c-To,h+.234*c-To]]).stream(s).point,i=o.translate([l-.205*c,h+.212*c]).clipExtent([[l-.214*c+To,h+.166*c+To],[l-.115*c-To,h+.234*c-To]]).stream(s).point,t},t.scale(1070)};var Bs,Ls,Ns,qs,Rs,Is,Os={point:b,lineStart:b,lineEnd:b,polygonStart:function(){Ls=0,Os.lineStart=Gn},polygonEnd:function(){Os.lineStart=Os.lineEnd=Os.point=b,Bs+=co(Ls/2)}},Ps={point:Wn,lineStart:b,lineEnd:b,polygonStart:b,polygonEnd:b},js={point:Kn,lineStart:Jn,lineEnd:Qn,polygonStart:function(){js.lineStart=tr},polygonEnd:function(){js.point=Kn,js.lineStart=Jn,js.lineEnd=Qn}};Zu.geo.path=function(){function t(t){return t&&("function"==typeof o&&a.pointRadius(+o.apply(this,arguments)),u&&u.valid||(u=i(a)),Zu.geo.stream(t,u)),a.result()}function e(){return u=null,t}var n,r,i,a,u,o=4.5;return t.area=function(t){return Bs=0,Zu.geo.stream(t,i(Os)),Bs},t.centroid=function(t){return xs=ws=_s=As=Es=k
Zu.scale.quantile=function(){return eu([],[])},Zu.scale.quantize=function(){return nu(0,1,[0,1])},Zu.scale.threshold=function(){return ru([.5],[0,1])},Zu.scale.identity=function(){return iu([0,1])},Zu.svg={},Zu.svg.arc=function(){function t(){var t=e.apply(this,arguments),a=n.apply(this,arguments),u=r.apply(this,arguments)+Ac,o=i.apply(this,arguments)+Ac,s=(u>o&&(s=u,u=o,o=s),o-u),c=Mo>s?"0":"1",l=Math.cos(u),h=Math.sin(u),f=Math.cos(o),p=Math.sin(o);return s>=Ec?t?"M0,"+a+"A"+a+","+a+" 0 1,1 0,"+-a+"A"+a+","+a+" 0 1,1 0,"+a+"M0,"+t+"A"+t+","+t+" 0 1,0 0,"+-t+"A"+t+","+t+" 0 1,0 0,"+t+"Z":"M0,"+a+"A"+a+","+a+" 0 1,1 0,"+-a+"A"+a+","+a+" 0 1,1 0,"+a+"Z":t?"M"+a*l+","+a*h+"A"+a+","+a+" 0 "+c+",1 "+a*f+","+a*p+"L"+t*f+","+t*p+"A"+t+","+t+" 0 "+c+",0 "+t*l+","+t*h+"Z":"M"+a*l+","+a*h+"A"+a+","+a+" 0 "+c+",1 "+a*f+","+a*p+"L0,0Z"}var e=au,n=uu,r=ou,i=su;return t.innerRadius=function(n){return arguments.length?(e=De(n),t):e},t.outerRadius=function(e){return arguments.length?(n=De(e),t):n},t.startAngle=function(e){return arguments.length?(r=De(e),t):r},t.endAngle=function(e){return arguments.length?(i=De(e),t):i},t.centroid=function(){var t=(e.apply(this,arguments)+n.apply(this,arguments))/2,a=(r.apply(this,arguments)+i.apply(this,arguments))/2+Ac;return[Math.cos(a)*t,Math.sin(a)*t]},t};var Ac=-Fo,Ec=So-To;Zu.svg.line=function(){return cu(Ce)};var kc=Zu.map({linear:lu,"linear-closed":hu,step:fu,"step-before":pu,"step-after":du,basis:xu,"basis-open":wu,"basis-closed":_u,bundle:Au,cardinal:mu,"cardinal-open":gu,"cardinal-closed":yu,monotone:Su});kc.forEach(function(t,e){e.key=t,e.closed=/-closed$/.test(t)});var Dc=[0,2/3,1/3,0],Cc=[0,1/3,2/3,0],Mc=[0,1/6,2/3,1/6];Zu.svg.line.radial=function(){var t=cu(Fu);return t.radius=t.x,delete t.x,t.angle=t.y,delete t.y,t},pu.reverse=du,du.reverse=pu,Zu.svg.area=function(){return Tu(Ce)},Zu.svg.area.radial=function(){var t=Tu(Fu);return t.radius=t.x,delete t.x,t.innerRadius=t.x0,delete t.x0,t.outerRadius=t.x1,delete t.x1,t.angle=t.y,delete t.y,t.startAngle=t.y0,delete t.y0,t.endAngle=t.y1,delete t.y1,t},Zu.svg.chord=function(){function t(t,o){var s=e(this,a,t,o),c=e(this,u,t,o);return"M"+s.p0+r(s.r,s.p1,s.a1-s.a0)+(n(s,c)?i(s.r,s.p1,s.r,s.p0):i(s.r,s.p1,c.r,c.p0)+r(c.r,c.p1,c.a1-c.a0)+i(c.r,c.p1,s.r,s.p0))+"Z"}function e(t,e,n,r){var i=e.call(t,n,r),a=o.call(t,i,r),u=s.call(t,i,r)+Ac,l=c.call(t,i,r)+Ac;return{r:a,a0:u,a1:l,p0:[a*Math.cos(u),a*Math.sin(u)],p1:[a*Math.cos(l),a*Math.sin(l)]}}function n(t,e){return t.a0==e.a0&&t.a1==e.a1}function r(t,e,n){return"A"+t+","+t+" 0 "+ +(n>Mo)+",1 "+e}function i(t,e,n,r){return"Q 0,0 "+r}var a=br,u=xr,o=Bu,s=ou,c=su;return t.radius=function(e){return arguments.length?(o=De(e),t):o},t.source=function(e){return arguments.length?(a=De(e),t):a},t.target=function(e){return arguments.length?(u=De(e),t):u},t.startAngle=function(e){return arguments.length?(s=De(e),t):s},t.endAngle=function(e){return arguments.length?(c=De(e),t):c},t},Zu.svg.diagonal=function(){function t(t,i){var a=e.call(this,t,i),u=n.call(this,t,i),o=(a.y+u.y)/2,s=[a,{x:a.x,y:o},{x:u.x,y:o},u];return s=s.map(r),"M"+s[0]+"C"+s[1]+" "+s[2]+" "+s[3]}var e=br,n=xr,r=Lu;return t.source=function(n){return arguments.length?(e=De(n),t):e},t.target=function(e){return arguments.length?(n=De(e),t):n},t.projection=function(e){return arguments.length?(r=e,t):r},t},Zu.svg.diagonal.radial=function(){var t=Zu.svg.diagonal(),e=Lu,n=t.projection;return t.projection=function(t){return arguments.length?n(Nu(e=t)):e},t},Zu.svg.symbol=function(){function t(t,r){return(Sc.get(e.call(this,t,r))||Iu)(n.call(this,t,r))}var e=Ru,n=qu;return t.type=function(n){return arguments.length?(e=De(n),t):e},t.size=function(e){return arguments.length?(n=De(e),t):n},t};var Sc=Zu.map({circle:Iu,cross:function(t){var e=Math.sqrt(t/5)/2;return"M"+-3*e+","+-e+"H"+-e+"V"+-3*e+"H"+e+"V"+-e+"H"+3*e+"V"+e+"H"+e+"V"+3*e+"H"+-e+"V"+e+"H"+-3*e+"Z"},diamond:function(t){var e=Math.sqrt(t/(2*Lc)),n=e*Lc;return"M0,"+-e+"L"+n+",0 0,"+e+" "+-n+",0Z"},square:function(t){var e=Math.sqrt(t)/2;return"M"+-e+","+-e+"L"+e+","+-e+" "+e+","+e+" "+-e+","
function n(t){function e(t){return function(e){return t.edge(e).weight}}var n="greedy"===t.graph().acyclicer?u(t,e(t)):r(t);a.each(n,function(e){var n=t.edge(e);t.removeEdge(e),n.forwardName=e.name,n.reversed=!0,t.setEdge(e.w,e.v,n,a.uniqueId("rev"))})}function r(t){function e(u){a.has(i,u)||(i[u]=!0,r[u]=!0,a.each(t.outEdges(u),function(t){a.has(r,t.w)?n.push(t):e(t.w)}),delete r[u])}var n=[],r={},i={};return a.each(t.nodes(),e),n}function i(t){a.each(t.edges(),function(e){var n=t.edge(e);if(n.reversed){t.removeEdge(e);var r=n.forwardName;delete n.reversed,delete n.forwardName,t.setEdge(e.w,e.v,n,r)}})}var a=t("./lodash"),u=t("./greedy-fas");e.exports={run:n,undo:i}},{"./greedy-fas":35,"./lodash":37}],30:[function(t,e){function n(t){function e(n){var a=t.children(n),u=t.node(n);if(a.length&&i.each(a,e),i.has(u,"minRank")){u.borderLeft=[],u.borderRight=[];for(var o=u.minRank,s=u.maxRank+1;s>o;++o)r(t,"borderLeft","_bl",n,u,o),r(t,"borderRight","_br",n,u,o)}}i.each(t.children(),e)}function r(t,e,n,r,i,u){var o={width:0,height:0,rank:u},s=i[e][u-1],c=a.addDummyNode(t,"border",o,n);i[e][u]=c,t.setParent(c,r),s&&t.setEdge(s,c,{weight:1})}var i=t("./lodash"),a=t("./util");e.exports=n},{"./lodash":37,"./util":56}],31:[function(t,e){"use strict";function n(t){var e=t.graph().rankdir.toLowerCase();("lr"===e||"rl"===e)&&i(t)}function r(t){var e=t.graph().rankdir.toLowerCase();("bt"===e||"rl"===e)&&u(t),("lr"===e||"rl"===e)&&(s(t),i(t))}function i(t){l.each(t.nodes(),function(e){a(t.node(e))}),l.each(t.edges(),function(e){a(t.edge(e))})}function a(t){var e=t.width;t.width=t.height,t.height=e}function u(t){l.each(t.nodes(),function(e){o(t.node(e))}),l.each(t.edges(),function(e){var n=t.edge(e);l.each(n.points,o),l.has(n,"y")&&o(n)})}function o(t){t.y=-t.y}function s(t){l.each(t.nodes(),function(e){c(t.node(e))}),l.each(t.edges(),function(e){var n=t.edge(e);l.each(n.points,c),l.has(n,"x")&&c(n)})}function c(t){var e=t.x;t.x=t.y,t.y=e}var l=t("./lodash");e.exports={adjust:n,undo:r}},{"./lodash":37}],32:[function(t,e){function n(){var t={};t._next=t._prev=t,this._sentinel=t}function r(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function i(t,e){return"_next"!==t&&"_prev"!==t?e:void 0}e.exports=n,n.prototype.dequeue=function(){var t=this._sentinel,e=t._prev;return e!==t?(r(e),e):void 0},n.prototype.enqueue=function(t){var e=this._sentinel;t._prev&&t._next&&r(t),t._next=e._next,e._next._prev=t,e._next=t,t._prev=e},n.prototype.toString=function(){for(var t=[],e=this._sentinel,n=e._prev;n!==e;)t.push(JSON.stringify(n,i)),n=n._prev;return"["+t.join(", ")+"]"}},{}],33:[function(t,e){function n(t){var e=i.buildLayerMatrix(t),n=new a({compound:!0,multigraph:!0}).setGraph({});return r.each(t.nodes(),function(e){n.setNode(e,{label:e}),n.setParent(e,"layer"+t.node(e).rank)}),r.each(t.edges(),function(t){n.setEdge(t.v,t.w,{},t.name)}),r.each(e,function(t,e){var i="layer"+e;n.setNode(i,{rank:"same"}),r.reduce(t,function(t,e){return n.setEdge(t,e,{style:"invis"}),e})}),n}var r=t("./lodash"),i=t("./util"),a=t("./graphlib").Graph;e.exports={debugOrdering:n}},{"./graphlib":34,"./lodash":37,"./util":56}],34:[function(t,e){e.exports=t(10)},{graphlib:58}],35:[function(t,e){function n(t,e){if(t.nodeCount()<=1)return[];var n=a(t,e||l),i=r(n.graph,n.buckets,n.zeroIdx);return o.flatten(o.map(i,function(e){return t.outEdges(e.v,e.w)}),!0)}function r(t,e,n){for(var r,a=[],u=e[e.length-1],o=e[0];t.nodeCount();){for(;r=o.dequeue();)i(t,e,n,r);for(;r=u.dequeue();)i(t,e,n,r);if(t.nodeCount())for(var s=e.length-2;s>0;--s)if(r=e[s].dequeue()){a=a.concat(i(t,e,n,r,!0));break}}return a}function i(t,e,n,r,i){var a=i?[]:void 0;return o.each(t.inEdges(r.v),function(r){var o=t.edge(r),s=t.node(r.v);i&&a.push({v:r.v,w:r.w}),s.out-=o,u(e,n,s)}),o.each(t.outEdges(r.v),function(r){var i=t.edge(r),a=r.w,o=t.node(a);o.in-=i,u(e,n,o)}),t.removeNode(r.v),a}function a(t,e){var n=new s,r=0,i=0;o.each(t.nodes(),function(t){n.setNode(t,{v:t,"in":0,out:0})}),o.each(t.edges(),function(t){var a=n.edge(t.v,t.w)||0,u=e(t),o=a+u;n.setEdge(t.v,t.w,o),i=Math.
})}var r=t("../lodash"),i=t("./tarjan");e.exports=n},{"../lodash":76,"./tarjan":70}],64:[function(t,e){function n(t,e,n){return r(t,e||a,n||function(e){return t.outEdges(e)})}function r(t,e,n){var r={},i=t.nodes();return i.forEach(function(t){r[t]={},r[t][t]={distance:0},i.forEach(function(e){t!==e&&(r[t][e]={distance:Number.POSITIVE_INFINITY})}),n(t).forEach(function(n){var i=n.v===t?n.w:n.v,a=e(n);r[t][i]={distance:a,predecessor:t}})}),i.forEach(function(t){var e=r[t];i.forEach(function(n){var a=r[n];i.forEach(function(n){var r=a[t],i=e[n],u=a[n],o=r.distance+i.distance;o<u.distance&&(u.distance=o,u.predecessor=i.predecessor)})})}),r}var i=t("../lodash");e.exports=n;var a=i.constant(1)},{"../lodash":76}],65:[function(t,e){e.exports={components:t("./components"),dijkstra:t("./dijkstra"),dijkstraAll:t("./dijkstra-all"),findCycles:t("./find-cycles"),floydWarshall:t("./floyd-warshall"),isAcyclic:t("./is-acyclic"),postorder:t("./postorder"),preorder:t("./preorder"),prim:t("./prim"),tarjan:t("./tarjan"),topsort:t("./topsort")}},{"./components":59,"./dijkstra":62,"./dijkstra-all":61,"./find-cycles":63,"./floyd-warshall":64,"./is-acyclic":66,"./postorder":67,"./preorder":68,"./prim":69,"./tarjan":70,"./topsort":71}],66:[function(t,e){function n(t){try{r(t)}catch(e){if(e instanceof r.CycleException)return!1;throw e}return!0}var r=t("./topsort");e.exports=n},{"./topsort":71}],67:[function(t,e){function n(t,e){return r(t,e,"post")}var r=t("./dfs");e.exports=n},{"./dfs":60}],68:[function(t,e){function n(t,e){return r(t,e,"pre")}var r=t("./dfs");e.exports=n},{"./dfs":60}],69:[function(t,e){function n(t,e){function n(t){var n=t.v===u?t.w:t.v,r=c.priority(n);if(void 0!==r){var i=e(t);r>i&&(s[n]=u,c.decrease(n,i))}}var u,o=new i,s={},c=new a;if(0===t.nodeCount())return o;r.each(t.nodes(),function(t){c.add(t,Number.POSITIVE_INFINITY),o.setNode(t)}),c.decrease(t.nodes()[0],0);for(var l=!1;c.size()>0;){if(u=c.removeMin(),r.has(s,u))o.setEdge(u,s[u]);else{if(l)throw new Error("Input graph is not connected: "+t);l=!0}t.nodeEdges(u).forEach(n)}return o}var r=t("../lodash"),i=t("../graph"),a=t("../data/priority-queue");e.exports=n},{"../data/priority-queue":72,"../graph":73,"../lodash":76}],70:[function(t,e){function n(t){function e(o){var s=a[o]={onStack:!0,lowlink:n,index:n++};if(i.push(o),t.successors(o).forEach(function(t){r.has(a,t)?a[t].onStack&&(s.lowlink=Math.min(s.lowlink,a[t].index)):(e(t),s.lowlink=Math.min(s.lowlink,a[t].lowlink))}),s.lowlink===s.index){var c,l=[];do c=i.pop(),a[c].onStack=!1,l.push(c);while(o!==c);u.push(l)}}var n=0,i=[],a={},u=[];return t.nodes().forEach(function(t){r.has(a,t)||e(t)}),u}var r=t("../lodash");e.exports=n},{"../lodash":76}],71:[function(t,e){function n(t){function e(o){if(i.has(a,o))throw new r;i.has(n,o)||(a[o]=!0,n[o]=!0,i.each(t.predecessors(o),e),delete a[o],u.push(o))}var n={},a={},u=[];if(i.each(t.sinks(),e),i.size(n)!==t.nodeCount())throw new r;return u}function r(){}var i=t("../lodash");e.exports=n,n.CycleException=r},{"../lodash":76}],72:[function(t,e){function n(){this._arr=[],this._keyIndices={}}var r=t("../lodash");e.exports=n,n.prototype.size=function(){return this._arr.length},n.prototype.keys=function(){return this._arr.map(function(t){return t.key})},n.prototype.has=function(t){return r.has(this._keyIndices,t)},n.prototype.priority=function(t){var e=this._keyIndices[t];return void 0!==e?this._arr[e].priority:void 0},n.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},n.prototype.add=function(t,e){var n=this._keyIndices;if(t=String(t),!r.has(n,t)){var i=this._arr,a=i.length;return n[t]=a,i.push({key:t,priority:e}),this._decrease(a),!0}return!1},n.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var t=this._arr.pop();return delete this._keyIndices[t.key],this._heapify(0),t.key},n.prototype.decrease=function(t,e){var n=this._keyIndices[t];if(e>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[n].priority+" New: "+e);this._arr[n].priority=e,this._decreas
2015-02-15 19:34:18 +01:00
},k=function(t,e){for(var n=-1,r=t.length;++n<r;)if(t[n]==e)return!0;return!1},D=function(t,e){if(!t)return e;var n,r={};for(n in e)r[n]=E(t,n)?t[n]:e[n];return r},C=function(t,e){var n="";return t>=55296&&57343>=t||t>1114111?(e&&S("character reference outside the permissible Unicode range"),"<22>"):E(b,t)?(e&&S("disallowed character reference"),b[t]):(e&&k(x,t)&&S("disallowed character reference"),t>65535&&(t-=65536,n+=w(t>>>10&1023|55296),t=56320|1023&t),n+=w(t))},M=function(t){return"&#x"+t.charCodeAt(0).toString(16).toUpperCase()+";"},S=function(t){throw Error("Parse error: "+t)},F=function(t,e){e=D(e,F.options);var n=e.strict;n&&g.test(t)&&S("forbidden code point");var r=e.encodeEverything,i=e.useNamedReferences,a=e.allowUnsafeSymbols;return r?(t=t.replace(s,function(t){return i&&E(h,t)?"&"+h[t]+";":M(t)}),i&&(t=t.replace(/&gt;\u20D2/g,"&nvgt;").replace(/&lt;\u20D2/g,"&nvlt;").replace(/&#x66;&#x6A;/g,"&fjlig;")),i&&(t=t.replace(l,function(t){return"&"+h[t]+";"}))):i?(a||(t=t.replace(f,function(t){return"&"+h[t]+";"})),t=t.replace(/&gt;\u20D2/g,"&nvgt;").replace(/&lt;\u20D2/g,"&nvlt;"),t=t.replace(l,function(t){return"&"+h[t]+";"})):a||(t=t.replace(f,M)),t.replace(o,function(t){var e=t.charCodeAt(0),n=t.charCodeAt(1),r=1024*(e-55296)+n-56320+65536;return"&#x"+r.toString(16).toUpperCase()+";"}).replace(c,M)};F.options={allowUnsafeSymbols:!1,encodeEverything:!1,strict:!1,useNamedReferences:!1};var T=function(t,e){e=D(e,T.options);var n=e.strict;return n&&d.test(t)&&S("malformed character reference"),t.replace(y,function(t,r,i,a,u,o,s,c){var l,h,f,p,d;return r?(l=r,h=i,n&&!h&&S("character reference was not terminated by a semicolon"),C(l,n)):a?(f=a,h=u,n&&!h&&S("character reference was not terminated by a semicolon"),l=parseInt(f,16),C(l,n)):o?(p=o,E(m,p)?m[p]:(n&&S("named character reference was not terminated by a semicolon"),t)):(p=s,d=c,d&&e.isAttributeValue?(n&&"="==d&&S("`&` did not start a character reference"),t):(n&&S("named character reference was not terminated by a semicolon"),v[p]+(d||"")))})};T.options={isAttributeValue:!1,strict:!1};var B=function(t){return t.replace(f,function(t){return p[t]})},L={version:"0.5.0",encode:F,decode:T,escape:B,unescape:T};if("function"==typeof define&&"object"==typeof define.amd&&define.amd)define(function(){return L});else if(i&&!i.nodeType)if(a)a.exports=L;else for(var N in L)E(L,N)&&(i[N]=L[N]);else r.he=L}(this)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],82:[function(t,e,n){(function(t){(function(){function r(t,e,n){for(var r=(n||0)-1,i=t?t.length:0;++r<i;)if(t[r]===e)return r;return-1}function i(t,e){var n=typeof e;if(t=t.cache,"boolean"==n||null==e)return t[e]?0:-1;"number"!=n&&"string"!=n&&(n="object");var i="number"==n?e:x+e;return t=(t=t[n])&&t[i],"object"==n?t&&r(t,e)>-1?0:-1:t?0:-1}function a(t){var e=this.cache,n=typeof t;if("boolean"==n||null==t)e[t]=!0;else{"number"!=n&&"string"!=n&&(n="object");var r="number"==n?t:x+t,i=e[n]||(e[n]={});"object"==n?(i[r]||(i[r]=[])).push(t):i[r]=!0}}function u(t){return t.charCodeAt(0)}function o(t,e){for(var n=t.criteria,r=e.criteria,i=-1,a=n.length;++i<a;){var u=n[i],o=r[i];if(u!==o){if(u>o||"undefined"==typeof u)return 1;if(o>u||"undefined"==typeof o)return-1}}return t.index-e.index}function s(t){var e=-1,n=t.length,r=t[0],i=t[n/2|0],u=t[n-1];if(r&&"object"==typeof r&&i&&"object"==typeof i&&u&&"object"==typeof u)return!1;var o=h();o["false"]=o["null"]=o["true"]=o.undefined=!1;var s=h();for(s.array=t,s.cache=o,s.push=a;++e<n;)s.push(t[e]);return s}function c(t){return"\\"+X[t]}function l(){return m.pop()||[]}function h(){return v.pop()||{array:null,cache:null,criteria:null,"false":!1,index:0,"null":!1,number:null,object:null,push:null,string:null,"true":!1,undefined:!1,value:null}}function f(t){t.length=0,m.length<_&&m.push(t)}function p(t){var e=t.cache;e&&p(e),t.array=t.cache=t.criteria=t.object=t.number=t.string=t.value=null,v.length<_&&v.push(t)}function d(t,e,n){e||(e=0),"undefined"==typeof n&&(n=t?t.length:0);for(var r=-1,i=n-e||0,a=Array(0>i?0:i);++r<i;)a[r]=t[e+r];return a}fun
2015-02-15 18:11:46 +01:00
},{}],84:[function(t,e,n){var r="",i=!1;n.setMessage=function(t){r=t},n.getMessage=function(){return r},n.setInfo=function(t){i=t},n.getInfo=function(){return i},n.parseError=function(t,e){mermaid.parseError(t,e)}},{}],85:[function(t,e,n){var r=t("./exampleDb"),i=t("./parser/example.js");n.draw=function(t,e,n){var a;a=i.parser,a.yy=r,a.parse(t);var u=d3.select("#"+e),o=u.append("g");o.append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size","32px").style("text-anchor","middle").text("mermaid "+n),u.attr("height",100),u.attr("width",400)}},{"./exampleDb":84,"./parser/example.js":86}],86:[function(t,e,n){(function(r){var i=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[6,9,10,12],r={trace:function(){},yy:{},symbols_:{error:2,start:3,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,message:11,say:12,TXT:13,$accept:0,$end:1},terminals_:{2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo",12:"say",13:"TXT"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1],[8,1],[11,2]],performAction:function(t,e,n,r,i,a){var u=a.length-1;switch(i){case 1:return r;case 4:break;case 6:r.setInfo(!0);break;case 7:r.setMessage(a[u]);break;case 8:this.$=a[u-1].substring(1).trim().replace(/\\n/gm,"\n")}},table:[{3:1,4:[1,2]},{1:[3]},e(n,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8],11:9,12:[1,10]},{1:[2,1]},e(n,[2,3]),e(n,[2,4]),e(n,[2,5]),e(n,[2,6]),e(n,[2,7]),{13:[1,11]},e(n,[2,8])],defaultActions:{4:[2,1]},parseError:function(t,e){if(!e.recoverable)throw new Error(t);this.trace(t)},parse:function(t){function e(){var t;return t=d.lex()||f,"number"!=typeof t&&(t=n.symbols_[t]||t),t}var n=this,r=[0],i=[null],a=[],u=this.table,o="",s=0,c=0,l=0,h=2,f=1,p=a.slice.call(arguments,1),d=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);d.setInput(t,g.yy),g.yy.lexer=d,g.yy.parser=this,"undefined"==typeof d.yylloc&&(d.yylloc={});var m=d.yylloc;a.push(m);var v=d.options&&d.options.ranges;this.parseError="function"==typeof g.yy.parseError?g.yy.parseError:Object.getPrototypeOf(this).parseError;for(var b,x,w,_,A,E,k,D,C,M={};;){if(w=r[r.length-1],this.defaultActions[w]?_=this.defaultActions[w]:((null===b||"undefined"==typeof b)&&(b=e()),_=u[w]&&u[w][b]),"undefined"==typeof _||!_.length||!_[0]){var S="";C=[];for(E in u[w])this.terminals_[E]&&E>h&&C.push("'"+this.terminals_[E]+"'");S=d.showPosition?"Parse error on line "+(s+1)+":\n"+d.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==f?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(S,{text:d.match,token:this.terminals_[b]||b,line:d.yylineno,loc:m,expected:C})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+b);switch(_[0]){case 1:r.push(b),i.push(d.yytext),a.push(d.yylloc),r.push(_[1]),b=null,x?(b=x,x=null):(c=d.yyleng,o=d.yytext,s=d.yylineno,m=d.yylloc,l>0&&l--);break;case 2:if(k=this.productions_[_[1]][1],M.$=i[i.length-k],M._$={first_line:a[a.length-(k||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(k||1)].first_column,last_column:a[a.length-1].last_column},v&&(M._$.range=[a[a.length-(k||1)].range[0],a[a.length-1].range[1]]),A=this.performAction.apply(M,[o,c,s,g.yy,_[1],i,a].concat(p)),"undefined"!=typeof A)return A;k&&(r=r.slice(0,-1*k*2),i=i.slice(0,-1*k),a=a.slice(0,-1*k)),r.push(this.productions_[_[1]][0]),i.push(M.$),a.push(M._$),D=u[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0}},i=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),th
2015-02-15 19:34:18 +01:00
return t}();return U.lexer=V,t.prototype=U,U.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":80,fs:78,path:79}],91:[function(t,e,n){(function(r){var i=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[1,9,10,12,13,19,29,68,69,70,71,72,77,78,80,82,83,85,86,88,89,90],r=[2,2],i=[1,9],a=[1,10],u=[1,11],o=[1,30],s=[1,12],c=[1,20],l=[1,23],h=[1,24],f=[1,25],p=[1,26],d=[1,27],g=[1,33],y=[1,21],m=[1,35],v=[1,32],b=[1,34],x=[1,40],w=[1,39],_=[1,36],A=[1,37],E=[1,38],k=[1,9,10,12,13,19,29,32,68,69,70,71,72,77,78,80,82,83,85,86,88,89,90],D=[13,29,68,69,70,71,72,77,78,80,82,83,85,86,88,89,90],C=[2,19],M=[1,52],S=[1,53],F=[1,51],T=[1,77],B=[1,69],L=[1,78],N=[1,64],q=[1,63],R=[1,82],I=[1,81],O=[1,79],P=[1,80],j=[1,70],U=[1,66],V=[1,65],z=[1,72],$=[1,73],H=[1,74],Y=[1,75],G=[1,76],W=[1,67],Z=[9,10,19],X=[9,10,19,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62],K=[9,10,12,13,15,19,36,38,40,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,77,80,82,83,85,86,88,89,90],J=[9,10,11,12,13,15,16,17,18,19,29,32,36,37,38,39,40,41,44,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,68,69,70,71,72,77,78,80,82,83,85,86,88,89,90,91,92,93],Q=[1,114],te=[1,117],ee=[1,115],ne=[9,10,12,13,19,29,32,68,69,70,71,72,77,78,80,82,83,85,86,88,89,90],re=[9,10,11,12,13,15,16,17,18,19,29,32,37,39,41,44,48,50,51,52,53,54,55,56,57,58,59,60,61,62,63,68,69,70,71,72,77,78,80,82,83,85,86,88,89,90],ie=[9,10,11,12,13,15,16,17,18,19,29,32,36,37,38,39,40,41,44,48,50,51,52,53,54,55,56,57,58,59,60,61,62,63,68,69,70,71,72,77,78,80,82,83,85,86,88,89,90,91,92,93],ae=[1,143],ue=[1,132],oe=[1,133],se=[1,130],ce=[1,131],le=[1,134],he=[1,135],fe=[1,139],pe=[1,140],de=[1,138],ge=[1,141],ye=[1,129],me=[1,136],ve=[1,137],be=[1,142],xe=[13,77,80,82,83,85,86,88,89,90],we=[13,63,77,80,82,83,85,86,88,89,90],_e=[1,167],Ae=[1,166],Ee=[9,11,12,13,15,16,17,18,19,29,32,36,37,38,39,40,41,44,48,50,51,52,53,54,63,68,69,70,71,72,77,78,80,82,83,85,86,88,89,90,91,92,93],ke=[1,206],De=[1,203],Ce=[1,210],Me=[1,207],Se=[1,204],Fe=[1,211],Te=[1,201],Be=[1,202],Le=[1,205],Ne=[1,208],qe=[1,209],Re=[1,223],Ie=[9,10,19,80],Oe=[9,10,12,19,44,68,76,77,78,80,82,83,84,85,86],Pe={trace:function(){},yy:{},symbols_:{error:2,mermaidDoc:3,graphConfig:4,document:5,line:6,spaceListNewline:7,statement:8,SEMI:9,EOF:10,GRAPH:11,SPACE:12,DIR:13,FirstStmtSeperator:14,TAGEND:15,TAGSTART:16,UP:17,DOWN:18,NEWLINE:19,spaceList:20,commentStatement:21,verticeStatement:22,separator:23,styleStatement:24,linkStyleStatement:25,classDefStatement:26,classStatement:27,clickStatement:28,subgraph:29,text:30,endStatement:31,end:32,vertex:33,link:34,alphaNum:35,SQS:36,SQE:37,PS:38,PE:39,DIAMOND_START:40,DIAMOND_STOP:41,alphaNumStatement:42,alphaNumToken:43,MINUS:44,linkOld:45,linkStatement:46,arrowText:47,"--":48,"-.":49,"==":50,ARROW_POINT:51,ARROW_CIRCLE:52,ARROW_CROSS:53,ARROW_OPEN:54,DOTTED_ARROW_POINT:55,DOTTED_ARROW_CIRCLE:56,DOTTED_ARROW_CROSS:57,DOTTED_ARROW_OPEN:58,THICK_ARROW_POINT:59,THICK_ARROW_CIRCLE:60,THICK_ARROW_CROSS:61,THICK_ARROW_OPEN:62,PIPE:63,textToken:64,commentText:65,commentToken:66,keywords:67,STYLE:68,LINKSTYLE:69,CLASSDEF:70,CLASS:71,CLICK:72,textNoTags:73,textNoTagsToken:74,stylesOpt:75,HEX:76,NUM:77,PCT:78,style:79,COMMA:80,styleComponent:81,ALPHA:82,COLON:83,UNIT:84,BRKT:85,DOT:86,graphCodeTokens:87,PLUS:88,EQUALS:89,MULT:90,TAG_START:91,TAG_END:92,QUOTE:93,$accept:0,$end:1},terminals_:{2:"error",9:"SEMI",10:"EOF",11:"GRAPH",12:"SPACE",13:"DIR",15:"TAGEND",16:"TAGSTART",17:"UP",18:"DOWN",19:"NEWLINE",29:"subgraph",32:"end",36:"SQS",37:"SQE",38:"PS",39:"PE",40:"DIAMOND_START",41:"DIAMOND_STOP",44:"MINUS",48:"--",49:"-.",50:"==",51:"ARROW_POINT",52:"ARROW_CIRCLE",53:"ARROW_CROSS",54:"ARROW_OPEN",55:"DOTTED_ARRO
2015-02-15 18:11:46 +01:00
return t}();return Pe.lexer=je,t.prototype=Pe,Pe.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":80,fs:78,path:79}],92:[function(t,e){var n;if(t)try{n=t("d3")}catch(r){}n||(n=window.d3),e.exports=n},{d3:1}],93:[function(t,e,n){(function(r){var i=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[6,8,10,11,15,17,19,20,22,33],r=[2,2],i=[1,6],a=[1,8],u=[1,9],o=[1,12],s=[1,13],c=[1,14],l=[1,15],h=[1,17],f=[1,18],p=[2,7],d=[6,8,10,11,15,17,18,19,20,21,22,33],g=[6,8,10,11,15,17,18,19,20,22,33],y=[1,46],m=[1,49],v=[1,53],b={trace:function(){},yy:{},symbols_:{error:2,start:3,SD:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,participant:11,actor:12,signal:13,note_statement:14,title:15,text:16,loop:17,end:18,opt:19,alt:20,"else":21,note:22,placement:23,text2:24,over:25,spaceList:26,actor_pair:27,",":28,left_of:29,right_of:30,signaltype:31,actors:32,ACTOR:33,SOLID_OPEN_ARROW:34,DOTTED_OPEN_ARROW:35,SOLID_ARROW:36,DOTTED_ARROW:37,SOLID_CROSS:38,DOTTED_CROSS:39,TXT:40,$accept:0,$end:1},terminals_:{2:"error",4:"SD",6:"EOF",8:"SPACE",10:"NL",11:"participant",15:"title",16:"text",17:"loop",18:"end",19:"opt",20:"alt",21:"else",22:"note",25:"over",28:",",29:"left_of",30:"right_of",33:"ACTOR",34:"SOLID_OPEN_ARROW",35:"DOTTED_OPEN_ARROW",36:"SOLID_ARROW",37:"DOTTED_ARROW",38:"SOLID_CROSS",39:"DOTTED_CROSS",40:"TXT"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,3],[9,2],[9,2],[9,4],[9,4],[9,4],[9,7],[14,4],[14,5],[26,2],[26,1],[27,1],[27,3],[23,1],[23,1],[13,4],[32,2],[32,1],[12,1],[31,1],[31,1],[31,1],[31,1],[31,1],[31,1],[24,1]],performAction:function(t,e,n,r,i,a){var u=a.length-1;switch(i){case 1:return r.apply(a[u-1]),a[u-1];case 2:this.$=[];break;case 3:a[u-1].push(a[u]),this.$=a[u-1];break;case 4:case 5:this.$=a[u];break;case 6:case 7:this.$=[];break;case 8:this.$=a[u-1];break;case 12:a[u-1].unshift({type:"loopStart",loopText:a[u-2].actor,signalType:r.LINETYPE.LOOP_START}),a[u-1].push({type:"loopEnd",loopText:a[u-2],signalType:r.LINETYPE.LOOP_END}),this.$=a[u-1];break;case 13:a[u-1].unshift({type:"optStart",optText:a[u-2].actor,signalType:r.LINETYPE.OPT_START}),a[u-1].push({type:"optEnd",optText:a[u-2].actor,signalType:r.LINETYPE.OPT_END}),this.$=a[u-1];break;case 14:a[u-4].unshift({type:"altStart",altText:a[u-5].actor,signalType:r.LINETYPE.ALT_START}),a[u-4].push({type:"else",altText:a[u-2].actor,signalType:r.LINETYPE.ALT_ELSE}),a[u-4]=a[u-4].concat(a[u-1]),a[u-4].push({type:"altEnd",signalType:r.LINETYPE.ALT_END}),this.$=a[u-4];break;case 15:this.$=[a[u-1],{type:"addNote",placement:a[u-2],actor:a[u-1].actor,text:a[u]}];break;case 19:this.$=a[u];break;case 20:this.$=[a[u-2],a[u]];break;case 21:this.$=r.PLACEMENT.LEFTOF;break;case 22:this.$=r.PLACEMENT.RIGHTOF;break;case 23:this.$=[a[u-3],a[u-1],{type:"addMessage",from:a[u-3].actor,to:a[u-1].actor,signalType:a[u-2],msg:a[u]}];break;case 26:this.$={type:"addActor",actor:a[u]};break;case 27:this.$=r.LINETYPE.SOLID_OPEN;break;case 28:this.$=r.LINETYPE.DOTTED_OPEN;break;case 29:this.$=r.LINETYPE.SOLID;break;case 30:this.$=r.LINETYPE.DOTTED;break;case 31:this.$=r.LINETYPE.SOLID_CROSS;break;case 32:this.$=r.LINETYPE.DOTTED_CROSS;break;case 33:this.$=a[u].substring(1).trim().replace(/\\n/gm,"\n")}},table:[{3:1,4:[1,2]},{1:[3]},e(n,r,{5:3}),{6:[1,4],7:5,8:i,9:7,10:a,11:u,12:16,13:10,14:11,15:o,17:s,19:c,20:l,22:h,33:f},e(n,p,{1:[2,1]}),e(d,[2,3]),{9:19,11:u,12:16,13:10,14:11,15:o,17:s,19:c,20:l,22:h,33:f},e(d,[2,5]),e(d,[2,6]),{12:20,33:f},{10:[1,21]},{10:[1,22]},{8:[1,23]},{12:24,33:f},{12:25,33:f},{12:26,33:f},{31:27,34:[1,28],35:[1,29],36:[1,30],37:[1,31],38:[1,32],39:[1,33]},{23:34,25:[1,35],29:[1,36],30:[1,37]},e([6,8,10,11,15,17,18,19,20,21,22,28,33,34,35,36,