(window.webpackJsonp=window.webpackJsonp||[]).push([[5],Array(263).concat([function(t,e,n){var r;try{r={cloneDeep:n(792),constant:n(430),defaults:n(616),each:n(431),filter:n(591),find:n(793),flatten:n(618),forEach:n(589),forIn:n(798),has:n(436),isUndefined:n(602),last:n(799),map:n(603),mapValues:n(800),max:n(801),merge:n(803),min:n(808),minBy:n(809),now:n(810),pick:n(623),range:n(624),reduce:n(605),sortBy:n(817),uniqueId:n(625),values:n(610),zipObject:n(822)}}catch(t){}r||(r=window._),t.exports=r},,,,,,function(t,e){var n=Array.isArray;t.exports=n},,,,,,,function(t,e,n){"use strict";var r=n(263),i=n(293).Graph;function a(t,e,n,i){var a;do{a=r.uniqueId(i)}while(t.hasNode(a));return n.dummy=e,t.setNode(a,n),a}function o(t){return r.max(r.map(t.nodes(),(function(e){var n=t.node(e).rank;if(!r.isUndefined(n))return n})))}t.exports={addDummyNode:a,simplify:function(t){var e=(new i).setGraph(t.graph());return r.forEach(t.nodes(),(function(n){e.setNode(n,t.node(n))})),r.forEach(t.edges(),(function(n){var r=e.edge(n.v,n.w)||{weight:0,minlen:1},i=t.edge(n);e.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})})),e},asNonCompoundGraph:function(t){var e=new i({multigraph:t.isMultigraph()}).setGraph(t.graph());return r.forEach(t.nodes(),(function(n){t.children(n).length||e.setNode(n,t.node(n))})),r.forEach(t.edges(),(function(n){e.setEdge(n,t.edge(n))})),e},successorWeights:function(t){var e=r.map(t.nodes(),(function(e){var n={};return r.forEach(t.outEdges(e),(function(e){n[e.w]=(n[e.w]||0)+t.edge(e).weight})),n}));return r.zipObject(t.nodes(),e)},predecessorWeights:function(t){var e=r.map(t.nodes(),(function(e){var n={};return r.forEach(t.inEdges(e),(function(e){n[e.v]=(n[e.v]||0)+t.edge(e).weight})),n}));return r.zipObject(t.nodes(),e)},intersectRect:function(t,e){var n,r,i=t.x,a=t.y,o=e.x-i,s=e.y-a,c=t.width/2,u=t.height/2;if(!o&&!s)throw new Error("Not possible to find intersection inside of the rectangle");Math.abs(s)*c>Math.abs(o)*u?(s<0&&(u=-u),n=u*o/s,r=u):(o<0&&(c=-c),n=c,r=c*s/o);return{x:i+n,y:a+r}},buildLayerMatrix:function(t){var e=r.map(r.range(o(t)+1),(function(){return[]}));return r.forEach(t.nodes(),(function(n){var i=t.node(n),a=i.rank;r.isUndefined(a)||(e[a][i.order]=n)})),e},normalizeRanks:function(t){var e=r.min(r.map(t.nodes(),(function(e){return t.node(e).rank})));r.forEach(t.nodes(),(function(n){var i=t.node(n);r.has(i,"rank")&&(i.rank-=e)}))},removeEmptyRanks:function(t){var e=r.min(r.map(t.nodes(),(function(e){return t.node(e).rank}))),n=[];r.forEach(t.nodes(),(function(r){var i=t.node(r).rank-e;n[i]||(n[i]=[]),n[i].push(r)}));var i=0,a=t.graph().nodeRankFactor;r.forEach(n,(function(e,n){r.isUndefined(e)&&n%a!=0?--i:i&&r.forEach(e,(function(e){t.node(e).rank+=i}))}))},addBorderNode:function(t,e,n,r){var i={width:0,height:0};arguments.length>=4&&(i.rank=n,i.order=r);return a(t,"border",i,e)},maxRank:o,partition:function(t,e){var n={lhs:[],rhs:[]};return r.forEach(t,(function(t){e(t)?n.lhs.push(t):n.rhs.push(t)})),n},time:function(t,e){var n=r.now();try{return e()}finally{console.log(t+" time: "+(r.now()-n)+"ms")}},notime:function(t,e){return e()}}},,,,,,,,function(t,e,n){var r;try{r={clone:n(680),constant:n(430),each:n(431),filter:n(591),has:n(436),isArray:n(269),isEmpty:n(756),isFunction:n(334),isUndefined:n(602),keys:n(310),map:n(603),reduce:n(605),size:n(759),transform:n(765),union:n(766),values:n(610)}}catch(t){}r||(r=window._),t.exports=r},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,n){var r=n(340);t.exports={isSubgraph:function(t,e){return!!t.children(e).length},edgeToId:function(t){return a(t.v)+":"+a(t.w)+":"+a(t.name)},applyStyle:function(t,e){e&&t.attr("style",e)},applyClass:function(t,e,n){e&&t.attr("class",e).attr("class",n+" "+t.attr("class"))},applyTransition:function(t,e){var n=e.graph();if(r.isPlainObject(n)){var i=n.transition;if(r.isFunction(i))return i(t)}return t}};var i=/:/g;function a(t){return t?String(t).replace(i,"\\:"):""}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(867),i=n(868),a=n(869),o={channel:r.default,lang:i.default,unit:a.default};e.default=o},,,,,,function(t,e,n){var r;try{r=n(419)}catch(t){}r||(r=window.graphlib),t.exports=r},function(t,e,n){var r=n(572),i="object"==typeof self&&self&&self.Object===Object&&self,a=r||i||Function("return this")();t.exports=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(441),i=n(633),a=n(873),o=n(874),s=n(875),c={format:{keyword:a.default,hex:i.default,rgb:o.default,rgba:o.default,hsl:s.default,hsla:s.default},parse:function(t){if("string"!=typeof t)return t;var e=i.default.parse(t)||o.default.parse(t)||s.default.parse(t)||a.default.parse(t);if(e)return e;throw new Error('Unsupported color format: "'+t+'"')},stringify:function(t){return!t.changed&&t.color?t.color:t.type.is(r.TYPE.HSL)||void 0===t.data.r?s.default.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?o.default.stringify(t):i.default.stringify(t)}};e.default=c},,,function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},,,function(t,e,n){var r=n(334),i=n(424);t.exports=function(t){return null!=t&&i(t.length)&&!r(t)}},function(t,e,n){var r=n(736),i=n(746),a=n(323),o=n(269),s=n(753);t.exports=function(t){return"function"==typeof t?t:null==t?a:"object"==typeof t?o(t)?i(t[0],t[1]):r(t):s(t)}},,,,,,,,function(t,e,n){var r=n(575),i=n(426),a=n(301);t.exports=function(t){return a(t)?r(t):i(t)}},function(t,e,n){var r;if(!r)try{r=n(674)}catch(t){}r||(r=window.d3),t.exports=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(287),i=n(295);e.default=function(t,e){return r.default.lang.round(i.default.parse(t)[e])}},,,,,,,,function(t,e,n){var r=n(691),i=n(696);t.exports=function(t,e){var n=i(t,e);return r(n)?n:void 0}},function(t,e,n){var r=n(335),i=n(692),a=n(693),o=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":o&&o in Object(t)?i(t):a(t)}},function(t,e,n){var r=n(575),i=n(716),a=n(301);t.exports=function(t){return a(t)?r(t,!0):i(t)}},function(t,e){t.exports=function(t){return t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(287),i=n(295);e.default=function(t,e,n){var a=i.default.parse(t),o=a[e],s=r.default.channel.clamp[e](o+n);return o!==s&&(a[e]=s),i.default.stringify(a)}},,,,,,,,,function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,n){var r=n(321),i=n(285);t.exports=function(t){if(!i(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},function(t,e,n){var r=n(294).Symbol;t.exports=r},function(t,e,n){(function(t){var r=n(294),i=n(712),a=e&&!e.nodeType&&e,o=a&&"object"==typeof t&&t&&!t.nodeType&&t,s=o&&o.exports===a?r.Buffer:void 0,c=(s?s.isBuffer:void 0)||i;t.exports=c}).call(this,n(337)(t))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){var r=n(721),i=n(421),a=n(722),o=n(584),s=n(723),c=n(321),u=n(573),l="[object Map]",f="[object Promise]",h="[object Set]",d="[object WeakMap]",p="[object DataView]",g=u(r),y=u(i),v=u(a),m=u(o),b=u(s),x=c;(r&&x(new r(new ArrayBuffer(1)))!=p||i&&x(new i)!=l||a&&x(a.resolve())!=f||o&&x(new o)!=h||s&&x(new s)!=d)&&(x=function(t){var e=c(t),n="[object Object]"==e?t.constructor:void 0,r=n?u(n):"";if(r)switch(r){case g:return p;case y:return l;case v:return f;case m:return h;case b:return d}return e}),t.exports=x},function(t,e,n){var r=n(321),i=n(298);t.exports=function(t){return"symbol"==typeof t||i(t)&&"[object Symbol]"==r(t)}},function(t,e,n){var r;try{r={defaults:n(616),each:n(431),isFunction:n(334),isPlainObject:n(620),pick:n(623),has:n(436),range:n(624),uniqueId:n(625)}}catch(t){}r||(r=window._),t.exports=r},,,,,,,,,,,function(t,e,n){var r=n(372),i=n(373);t.exports=function(t,e,n,a){var o=!n;n||(n={});for(var s=-1,c=e.length;++s-1&&t%1==0&&to){var s=a;a=o,o=s}return a+""+o+""+(r.isUndefined(i)?"\0":i)}function u(t,e,n,r){var i=""+e,a=""+n;if(!t&&i>a){var o=i;i=a,a=o}var s={v:i,w:a};return r&&(s.name=r),s}function l(t,e){return c(t,e.v,e.w,e.name)}a.prototype._nodeCount=0,a.prototype._edgeCount=0,a.prototype.isDirected=function(){return this._isDirected},a.prototype.isMultigraph=function(){return this._isMultigraph},a.prototype.isCompound=function(){return this._isCompound},a.prototype.setGraph=function(t){return this._label=t,this},a.prototype.graph=function(){return this._label},a.prototype.setDefaultNodeLabel=function(t){return r.isFunction(t)||(t=r.constant(t)),this._defaultNodeLabelFn=t,this},a.prototype.nodeCount=function(){return this._nodeCount},a.prototype.nodes=function(){return r.keys(this._nodes)},a.prototype.sources=function(){var t=this;return r.filter(this.nodes(),(function(e){return r.isEmpty(t._in[e])}))},a.prototype.sinks=function(){var t=this;return r.filter(this.nodes(),(function(e){return r.isEmpty(t._out[e])}))},a.prototype.setNodes=function(t,e){var n=arguments,i=this;return r.each(t,(function(t){n.length>1?i.setNode(t,e):i.setNode(t)})),this},a.prototype.setNode=function(t,e){return r.has(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=e),this):(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=i,this._children[t]={},this._children["\0"][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)},a.prototype.node=function(t){return this._nodes[t]},a.prototype.hasNode=function(t){return r.has(this._nodes,t)},a.prototype.removeNode=function(t){var e=this;if(r.has(this._nodes,t)){var n=function(t){e.removeEdge(e._edgeObjs[t])};delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],r.each(this.children(t),(function(t){e.setParent(t)})),delete this._children[t]),r.each(r.keys(this._in[t]),n),delete this._in[t],delete this._preds[t],r.each(r.keys(this._out[t]),n),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this},a.prototype.setParent=function(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(r.isUndefined(e))e=i;else{for(var n=e+="";!r.isUndefined(n);n=this.parent(n))if(n===t)throw new Error("Setting "+e+" as parent of "+t+" would create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this},a.prototype._removeFromParentsChildList=function(t){delete this._children[this._parent[t]][t]},a.prototype.parent=function(t){if(this._isCompound){var e=this._parent[t];if(e!==i)return e}},a.prototype.children=function(t){if(r.isUndefined(t)&&(t=i),this._isCompound){var e=this._children[t];if(e)return r.keys(e)}else{if(t===i)return this.nodes();if(this.hasNode(t))return[]}},a.prototype.predecessors=function(t){var e=this._preds[t];if(e)return r.keys(e)},a.prototype.successors=function(t){var e=this._sucs[t];if(e)return r.keys(e)},a.prototype.neighbors=function(t){var e=this.predecessors(t);if(e)return r.union(e,this.successors(t))},a.prototype.isLeaf=function(t){return 0===(this.isDirected()?this.successors(t):this.neighbors(t)).length},a.prototype.filterNodes=function(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var n=this;r.each(this._nodes,(function(n,r){t(r)&&e.setNode(r,n)})),r.each(this._edgeObjs,(function(t){e.hasNode(t.v)&&e.hasNode(t.w)&&e.setEdge(t,n.edge(t))}));var i={};return this._isCompound&&r.each(e.nodes(),(function(t){e.setParent(t,function t(r){var a=n.parent(r);return void 0===a||e.hasNode(a)?(i[r]=a,a):a in i?i[a]:t(a)}(t))})),e},a.prototype.setDefaultEdgeLabel=function(t){return r.isFunction(t)||(t=r.constant(t)),this._defaultEdgeLabelFn=t,this},a.prototype.edgeCount=function(){return this._edgeCount},a.prototype.edges=function(){return r.values(this._edgeObjs)},a.prototype.setPath=function(t,e){var n=this,i=arguments;return r.reduce(t,(function(t,r){return i.length>1?n.setEdge(t,r,e):n.setEdge(t,r),r})),this},a.prototype.setEdge=function(){var t,e,n,i,a=!1,s=arguments[0];"object"==typeof s&&null!==s&&"v"in s?(t=s.v,e=s.w,n=s.name,2===arguments.length&&(i=arguments[1],a=!0)):(t=s,e=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],a=!0)),t=""+t,e=""+e,r.isUndefined(n)||(n=""+n);var l=c(this._isDirected,t,e,n);if(r.has(this._edgeLabels,l))return a&&(this._edgeLabels[l]=i),this;if(!r.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[l]=a?i:this._defaultEdgeLabelFn(t,e,n);var f=u(this._isDirected,t,e,n);return t=f.v,e=f.w,Object.freeze(f),this._edgeObjs[l]=f,o(this._preds[e],t),o(this._sucs[t],e),this._in[e][l]=f,this._out[t][l]=f,this._edgeCount++,this},a.prototype.edge=function(t,e,n){var r=1===arguments.length?l(this._isDirected,arguments[0]):c(this._isDirected,t,e,n);return this._edgeLabels[r]},a.prototype.hasEdge=function(t,e,n){var i=1===arguments.length?l(this._isDirected,arguments[0]):c(this._isDirected,t,e,n);return r.has(this._edgeLabels,i)},a.prototype.removeEdge=function(t,e,n){var r=1===arguments.length?l(this._isDirected,arguments[0]):c(this._isDirected,t,e,n),i=this._edgeObjs[r];return i&&(t=i.v,e=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],s(this._preds[e],t),s(this._sucs[t],e),delete this._in[e][r],delete this._out[t][r],this._edgeCount--),this},a.prototype.inEdges=function(t,e){var n=this._in[t];if(n){var i=r.values(n);return e?r.filter(i,(function(t){return t.v===e})):i}},a.prototype.outEdges=function(t,e){var n=this._out[t];if(n){var i=r.values(n);return e?r.filter(i,(function(t){return t.w===e})):i}},a.prototype.nodeEdges=function(t,e){var n=this.inEdges(t,e);if(n)return n.concat(this.outEdges(t,e))}},function(t,e,n){var r=n(320)(n(294),"Map");t.exports=r},function(t,e,n){var r=n(697),i=n(704),a=n(706),o=n(707),s=n(708);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e-1&&t%1==0&&t<=9007199254740991}},function(t,e,n){(function(t){var r=n(572),i=e&&!e.nodeType&&e,a=i&&"object"==typeof t&&t&&!t.nodeType&&t,o=a&&a.exports===i&&r.process,s=function(){try{var t=a&&a.require&&a.require("util").types;return t||o&&o.binding&&o.binding("util")}catch(t){}}();t.exports=s}).call(this,n(337)(t))},function(t,e,n){var r=n(376),i=n(714),a=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return i(t);var e=[];for(var n in Object(t))a.call(t,n)&&"constructor"!=n&&e.push(n);return e}},function(t,e,n){var r=n(579),i=n(580),a=Object.prototype.propertyIsEnumerable,o=Object.getOwnPropertySymbols,s=o?function(t){return null==t?[]:(t=Object(t),r(o(t),(function(e){return a.call(t,e)})))}:i;t.exports=s},function(t,e){t.exports=function(t,e){for(var n=-1,r=e.length,i=t.length;++n0&&a(l)?n>1?t(l,n-1,a,o,s):r(s,l):o||(s[s.length]=l)}return s}},function(t,e,n){var r=n(339);t.exports=function(t,e,n){for(var i=-1,a=t.length;++il))return!1;var h=c.get(t),d=c.get(e);if(h&&d)return h==e&&d==t;var p=-1,g=!0,y=2&n?new r:void 0;for(c.set(t,e),c.set(e,t);++p0&&(a=c.removeMin(),(o=s[a]).distance!==Number.POSITIVE_INFINITY);)r(a).forEach(u);return s}(t,String(e),n||a,r||function(e){return t.outEdges(e)})};var a=r.constant(1)},function(t,e,n){var r=n(284);function i(){this._arr=[],this._keyIndices={}}t.exports=i,i.prototype.size=function(){return this._arr.length},i.prototype.keys=function(){return this._arr.map((function(t){return t.key}))},i.prototype.has=function(t){return r.has(this._keyIndices,t)},i.prototype.priority=function(t){var e=this._keyIndices[t];if(void 0!==e)return this._arr[e].priority},i.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},i.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},i.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},i.prototype.decrease=function(t,e){var n=this._keyIndices[t];if(e>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[n].priority+" New: "+e);this._arr[n].priority=e,this._decrease(n)},i.prototype._heapify=function(t){var e=this._arr,n=2*t,r=n+1,i=t;n>1].priority2?e[2]:void 0;for(u&&a(e[0],e[1],u)&&(r=1);++n1&&o.sort((function(t,e){var r=t.x-n.x,i=t.y-n.y,a=Math.sqrt(r*r+i*i),o=e.x-n.x,s=e.y-n.y,c=Math.sqrt(o*o+s*s);return aMath.abs(o)*u?(s<0&&(u=-u),n=0===s?0:u*o/s,r=u):(o<0&&(c=-c),n=c,r=0===o?0:c*s/o);return{x:i+n,y:a+r}}},function(t,e,n){var r=n(286);t.exports=function(t,e){var n=t.append("foreignObject").attr("width","100000"),i=n.append("xhtml:div");i.attr("xmlns","http://www.w3.org/1999/xhtml");var a=e.label;switch(typeof a){case"function":i.insert(a);break;case"object":i.insert((function(){return a}));break;default:i.html(a)}r.applyStyle(i,e.labelStyle),i.style("display","inline-block"),i.style("white-space","nowrap");var o=i.node().getBoundingClientRect();return n.attr("width",o.width).attr("height",o.height),n}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(287),i=n(355),a=n(872),o={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:function(t){if(35===t.charCodeAt(0)){var e=t.match(o.re);if(e){var n=e[1],r=parseInt(n,16),a=n.length,s=a%4==0,c=a>4,u=c?1:17,l=c?8:4,f=s?0:-1,h=c?255:15;return i.default.set({r:(r>>l*(f+3)&h)*u,g:(r>>l*(f+2)&h)*u,b:(r>>l*(f+1)&h)*u,a:s?(r&h)*u/255:1},t)}}},stringify:function(t){return t.a<1?"#"+a.DEC2HEX[Math.round(t.r)]+a.DEC2HEX[Math.round(t.g)]+a.DEC2HEX[Math.round(t.b)]+r.default.unit.frac2hex(t.a):"#"+a.DEC2HEX[Math.round(t.r)]+a.DEC2HEX[Math.round(t.g)]+a.DEC2HEX[Math.round(t.b)]}};e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(287),i=n(355),a=n(295);e.default=function(t,e,n,o){void 0===o&&(o=1);var s=i.default.set({h:r.default.channel.clamp.h(t),s:r.default.channel.clamp.s(e),l:r.default.channel.clamp.l(n),a:r.default.channel.clamp.a(o)});return a.default.stringify(s)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(312);e.default=function(t){return r.default(t,"a")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(287),i=n(295);e.default=function(t){var e=i.default.parse(t),n=e.r,a=e.g,o=e.b,s=.2126*r.default.channel.toLinear(n)+.7152*r.default.channel.toLinear(a)+.0722*r.default.channel.toLinear(o);return r.default.lang.round(s)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(636);e.default=function(t){return r.default(t)>=.5}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(324);e.default=function(t,e){return r.default(t,"a",e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(324);e.default=function(t,e){return r.default(t,"a",-e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(295),i=n(386);e.default=function(t,e){var n=r.default.parse(t),a={};for(var o in e)e[o]&&(a[o]=n[o]+e[o]);return i.default(t,a)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(295),i=n(385);e.default=function(t,e,n){void 0===n&&(n=50);var a=r.default.parse(t),o=a.r,s=a.g,c=a.b,u=a.a,l=r.default.parse(e),f=l.r,h=l.g,d=l.b,p=l.a,g=n/100,y=2*g-1,v=u-p,m=((y*v==-1?y:(y+v)/(1+y*v))+1)/2,b=1-m,x=o*m+f*b,_=s*m+h*b,w=c*m+d*b,k=u*g+p*(1-g);return i.default(x,_,w,k)}},function(t,e){},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){"use strict";n.r(e),n.d(e,"version",(function(){return r})),n.d(e,"bisect",(function(){return u})),n.d(e,"bisectRight",(function(){return s})),n.d(e,"bisectLeft",(function(){return c})),n.d(e,"ascending",(function(){return i})),n.d(e,"bisector",(function(){return a})),n.d(e,"cross",(function(){return h})),n.d(e,"descending",(function(){return d})),n.d(e,"deviation",(function(){return y})),n.d(e,"extent",(function(){return v})),n.d(e,"histogram",(function(){return j})),n.d(e,"thresholdFreedmanDiaconis",(function(){return N})),n.d(e,"thresholdScott",(function(){return B})),n.d(e,"thresholdSturges",(function(){return O})),n.d(e,"max",(function(){return L})),n.d(e,"mean",(function(){return F})),n.d(e,"median",(function(){return P})),n.d(e,"merge",(function(){return I})),n.d(e,"min",(function(){return R})),n.d(e,"pairs",(function(){return l})),n.d(e,"permute",(function(){return Y})),n.d(e,"quantile",(function(){return D})),n.d(e,"range",(function(){return k})),n.d(e,"scan",(function(){return z})),n.d(e,"shuffle",(function(){return U})),n.d(e,"sum",(function(){return W})),n.d(e,"ticks",(function(){return S})),n.d(e,"tickIncrement",(function(){return A})),n.d(e,"tickStep",(function(){return M})),n.d(e,"transpose",(function(){return $})),n.d(e,"variance",(function(){return g})),n.d(e,"zip",(function(){return H})),n.d(e,"axisTop",(function(){return nt})),n.d(e,"axisRight",(function(){return rt})),n.d(e,"axisBottom",(function(){return it})),n.d(e,"axisLeft",(function(){return at})),n.d(e,"brush",(function(){return Mi})),n.d(e,"brushX",(function(){return Si})),n.d(e,"brushY",(function(){return Ai})),n.d(e,"brushSelection",(function(){return Ti})),n.d(e,"chord",(function(){return Ii})),n.d(e,"ribbon",(function(){return Ki})),n.d(e,"nest",(function(){return ia})),n.d(e,"set",(function(){return ha})),n.d(e,"map",(function(){return ra})),n.d(e,"keys",(function(){return da})),n.d(e,"values",(function(){return pa})),n.d(e,"entries",(function(){return ga})),n.d(e,"color",(function(){return Ge})),n.d(e,"rgb",(function(){return Je})),n.d(e,"hsl",(function(){return an})),n.d(e,"lab",(function(){return Ea})),n.d(e,"hcl",(function(){return Na})),n.d(e,"lch",(function(){return Da})),n.d(e,"gray",(function(){return Ca})),n.d(e,"cubehelix",(function(){return Va})),n.d(e,"contours",(function(){return eo})),n.d(e,"contourDensity",(function(){return so})),n.d(e,"dispatch",(function(){return ht})),n.d(e,"drag",(function(){return go})),n.d(e,"dragDisable",(function(){return Se})),n.d(e,"dragEnable",(function(){return Ae})),n.d(e,"dsvFormat",(function(){return wo})),n.d(e,"csvParse",(function(){return Co})),n.d(e,"csvParseRows",(function(){return Eo})),n.d(e,"csvFormat",(function(){return To})),n.d(e,"csvFormatBody",(function(){return So})),n.d(e,"csvFormatRows",(function(){return Ao})),n.d(e,"csvFormatRow",(function(){return Mo})),n.d(e,"csvFormatValue",(function(){return Oo})),n.d(e,"tsvParse",(function(){return Do})),n.d(e,"tsvParseRows",(function(){return No})),n.d(e,"tsvFormat",(function(){return Bo})),n.d(e,"tsvFormatBody",(function(){return Lo})),n.d(e,"tsvFormatRows",(function(){return Fo})),n.d(e,"tsvFormatRow",(function(){return Po})),n.d(e,"tsvFormatValue",(function(){return Io})),n.d(e,"autoType",(function(){return Ro})),n.d(e,"easeLinear",(function(){return zo})),n.d(e,"easeQuad",(function(){return $o})),n.d(e,"easeQuadIn",(function(){return Uo})),n.d(e,"easeQuadOut",(function(){return Wo})),n.d(e,"easeQuadInOut",(function(){return $o})),n.d(e,"easeCubic",(function(){return Zr})),n.d(e,"easeCubicIn",(function(){return qr})),n.d(e,"easeCubicOut",(function(){return Xr})),n.d(e,"easeCubicInOut",(function(){return Zr})),n.d(e,"easePoly",(function(){return Go})),n.d(e,"easePolyIn",(function(){return Vo})),n.d(e,"easePolyOut",(function(){return Ho})),n.d(e,"easePolyInOut",(function(){return Go})),n.d(e,"easeSin",(function(){return Qo})),n.d(e,"easeSinIn",(function(){return Zo})),n.d(e,"easeSinOut",(function(){return Jo})),n.d(e,"easeSinInOut",(function(){return Qo})),n.d(e,"easeExp",(function(){return ns})),n.d(e,"easeExpIn",(function(){return ts})),n.d(e,"easeExpOut",(function(){return es})),n.d(e,"easeExpInOut",(function(){return ns})),n.d(e,"easeCircle",(function(){return as})),n.d(e,"easeCircleIn",(function(){return rs})),n.d(e,"easeCircleOut",(function(){return is})),n.d(e,"easeCircleInOut",(function(){return as})),n.d(e,"easeBounce",(function(){return us})),n.d(e,"easeBounceIn",(function(){return cs})),n.d(e,"easeBounceOut",(function(){return us})),n.d(e,"easeBounceInOut",(function(){return ls})),n.d(e,"easeBack",(function(){return ps})),n.d(e,"easeBackIn",(function(){return hs})),n.d(e,"easeBackOut",(function(){return ds})),n.d(e,"easeBackInOut",(function(){return ps})),n.d(e,"easeElastic",(function(){return vs})),n.d(e,"easeElasticIn",(function(){return ys})),n.d(e,"easeElasticOut",(function(){return vs})),n.d(e,"easeElasticInOut",(function(){return ms})),n.d(e,"blob",(function(){return xs})),n.d(e,"buffer",(function(){return ws})),n.d(e,"dsv",(function(){return Ts})),n.d(e,"csv",(function(){return Ss})),n.d(e,"tsv",(function(){return As})),n.d(e,"image",(function(){return Ms})),n.d(e,"json",(function(){return js})),n.d(e,"text",(function(){return Cs})),n.d(e,"xml",(function(){return Ns})),n.d(e,"html",(function(){return Bs})),n.d(e,"svg",(function(){return Ls})),n.d(e,"forceCenter",(function(){return Fs})),n.d(e,"forceCollide",(function(){return Xs})),n.d(e,"forceLink",(function(){return Qs})),n.d(e,"forceManyBody",(function(){return rc})),n.d(e,"forceRadial",(function(){return ic})),n.d(e,"forceSimulation",(function(){return nc})),n.d(e,"forceX",(function(){return ac})),n.d(e,"forceY",(function(){return oc})),n.d(e,"formatDefaultLocale",(function(){return wc})),n.d(e,"format",(function(){return pc})),n.d(e,"formatPrefix",(function(){return gc})),n.d(e,"formatLocale",(function(){return _c})),n.d(e,"formatSpecifier",(function(){return lc})),n.d(e,"FormatSpecifier",(function(){return fc})),n.d(e,"precisionFixed",(function(){return kc})),n.d(e,"precisionPrefix",(function(){return Cc})),n.d(e,"precisionRound",(function(){return Ec})),n.d(e,"geoArea",(function(){return mu})),n.d(e,"geoBounds",(function(){return ll})),n.d(e,"geoCentroid",(function(){return wl})),n.d(e,"geoCircle",(function(){return Nl})),n.d(e,"geoClipAntimeridian",(function(){return Vl})),n.d(e,"geoClipCircle",(function(){return Hl})),n.d(e,"geoClipExtent",(function(){return Kl})),n.d(e,"geoClipRectangle",(function(){return Xl})),n.d(e,"geoContains",(function(){return mf})),n.d(e,"geoDistance",(function(){return uf})),n.d(e,"geoGraticule",(function(){return _f})),n.d(e,"geoGraticule10",(function(){return wf})),n.d(e,"geoInterpolate",(function(){return Sf})),n.d(e,"geoLength",(function(){return of})),n.d(e,"geoPath",(function(){return Eh})),n.d(e,"geoAlbers",(function(){return $h})),n.d(e,"geoAlbersUsa",(function(){return Vh})),n.d(e,"geoAzimuthalEqualArea",(function(){return Xh})),n.d(e,"geoAzimuthalEqualAreaRaw",(function(){return qh})),n.d(e,"geoAzimuthalEquidistant",(function(){return Jh})),n.d(e,"geoAzimuthalEquidistantRaw",(function(){return Zh})),n.d(e,"geoConicConformal",(function(){return rd})),n.d(e,"geoConicConformalRaw",(function(){return nd})),n.d(e,"geoConicEqualArea",(function(){return Wh})),n.d(e,"geoConicEqualAreaRaw",(function(){return Uh})),n.d(e,"geoConicEquidistant",(function(){return sd})),n.d(e,"geoConicEquidistantRaw",(function(){return od})),n.d(e,"geoEqualEarth",(function(){return pd})),n.d(e,"geoEqualEarthRaw",(function(){return dd})),n.d(e,"geoEquirectangular",(function(){return ad})),n.d(e,"geoEquirectangularRaw",(function(){return id})),n.d(e,"geoGnomonic",(function(){return yd})),n.d(e,"geoGnomonicRaw",(function(){return gd})),n.d(e,"geoIdentity",(function(){return vd})),n.d(e,"geoProjection",(function(){return Rh})),n.d(e,"geoProjectionMutator",(function(){return Yh})),n.d(e,"geoMercator",(function(){return Kh})),n.d(e,"geoMercatorRaw",(function(){return Qh})),n.d(e,"geoNaturalEarth1",(function(){return bd})),n.d(e,"geoNaturalEarth1Raw",(function(){return md})),n.d(e,"geoOrthographic",(function(){return _d})),n.d(e,"geoOrthographicRaw",(function(){return xd})),n.d(e,"geoStereographic",(function(){return kd})),n.d(e,"geoStereographicRaw",(function(){return wd})),n.d(e,"geoTransverseMercator",(function(){return Ed})),n.d(e,"geoTransverseMercatorRaw",(function(){return Cd})),n.d(e,"geoRotation",(function(){return Ol})),n.d(e,"geoStream",(function(){return lu})),n.d(e,"geoTransform",(function(){return Th})),n.d(e,"cluster",(function(){return Md})),n.d(e,"hierarchy",(function(){return jd})),n.d(e,"pack",(function(){return np})),n.d(e,"packSiblings",(function(){return Zd})),n.d(e,"packEnclose",(function(){return Pd})),n.d(e,"partition",(function(){return cp})),n.d(e,"stratify",(function(){return dp})),n.d(e,"tree",(function(){return xp})),n.d(e,"treemap",(function(){return Ep})),n.d(e,"treemapBinary",(function(){return Tp})),n.d(e,"treemapDice",(function(){return sp})),n.d(e,"treemapSlice",(function(){return _p})),n.d(e,"treemapSliceDice",(function(){return Sp})),n.d(e,"treemapSquarify",(function(){return Cp})),n.d(e,"treemapResquarify",(function(){return Ap})),n.d(e,"interpolate",(function(){return Dn})),n.d(e,"interpolateArray",(function(){return wn})),n.d(e,"interpolateBasis",(function(){return un})),n.d(e,"interpolateBasisClosed",(function(){return ln})),n.d(e,"interpolateDate",(function(){return Cn})),n.d(e,"interpolateDiscrete",(function(){return Mp})),n.d(e,"interpolateHue",(function(){return Op})),n.d(e,"interpolateNumber",(function(){return En})),n.d(e,"interpolateNumberArray",(function(){return xn})),n.d(e,"interpolateObject",(function(){return Tn})),n.d(e,"interpolateRound",(function(){return jp})),n.d(e,"interpolateString",(function(){return jn})),n.d(e,"interpolateTransformCss",(function(){return gr})),n.d(e,"interpolateTransformSvg",(function(){return yr})),n.d(e,"interpolateZoom",(function(){return Bp})),n.d(e,"interpolateRgb",(function(){return yn})),n.d(e,"interpolateRgbBasis",(function(){return mn})),n.d(e,"interpolateRgbBasisClosed",(function(){return bn})),n.d(e,"interpolateHsl",(function(){return Fp})),n.d(e,"interpolateHslLong",(function(){return Pp})),n.d(e,"interpolateLab",(function(){return Ip})),n.d(e,"interpolateHcl",(function(){return Yp})),n.d(e,"interpolateHclLong",(function(){return zp})),n.d(e,"interpolateCubehelix",(function(){return Wp})),n.d(e,"interpolateCubehelixLong",(function(){return $p})),n.d(e,"piecewise",(function(){return Vp})),n.d(e,"quantize",(function(){return Hp})),n.d(e,"path",(function(){return Gi})),n.d(e,"polygonArea",(function(){return Gp})),n.d(e,"polygonCentroid",(function(){return qp})),n.d(e,"polygonHull",(function(){return Jp})),n.d(e,"polygonContains",(function(){return Qp})),n.d(e,"polygonLength",(function(){return Kp})),n.d(e,"quadtree",(function(){return Ws})),n.d(e,"randomUniform",(function(){return eg})),n.d(e,"randomNormal",(function(){return ng})),n.d(e,"randomLogNormal",(function(){return rg})),n.d(e,"randomBates",(function(){return ag})),n.d(e,"randomIrwinHall",(function(){return ig})),n.d(e,"randomExponential",(function(){return og})),n.d(e,"scaleBand",(function(){return pg})),n.d(e,"scalePoint",(function(){return yg})),n.d(e,"scaleIdentity",(function(){return Og})),n.d(e,"scaleLinear",(function(){return Mg})),n.d(e,"scaleLog",(function(){return Rg})),n.d(e,"scaleSymlog",(function(){return Wg})),n.d(e,"scaleOrdinal",(function(){return dg})),n.d(e,"scaleImplicit",(function(){return hg})),n.d(e,"scalePow",(function(){return qg})),n.d(e,"scaleSqrt",(function(){return Xg})),n.d(e,"scaleQuantile",(function(){return Zg})),n.d(e,"scaleQuantize",(function(){return Jg})),n.d(e,"scaleThreshold",(function(){return Qg})),n.d(e,"scaleTime",(function(){return Hm})),n.d(e,"scaleUtc",(function(){return nb})),n.d(e,"scaleSequential",(function(){return ab})),n.d(e,"scaleSequentialLog",(function(){return ob})),n.d(e,"scaleSequentialPow",(function(){return cb})),n.d(e,"scaleSequentialSqrt",(function(){return ub})),n.d(e,"scaleSequentialSymlog",(function(){return sb})),n.d(e,"scaleSequentialQuantile",(function(){return lb})),n.d(e,"scaleDiverging",(function(){return hb})),n.d(e,"scaleDivergingLog",(function(){return db})),n.d(e,"scaleDivergingPow",(function(){return gb})),n.d(e,"scaleDivergingSqrt",(function(){return yb})),n.d(e,"scaleDivergingSymlog",(function(){return pb})),n.d(e,"tickFormat",(function(){return Sg})),n.d(e,"schemeCategory10",(function(){return mb})),n.d(e,"schemeAccent",(function(){return bb})),n.d(e,"schemeDark2",(function(){return xb})),n.d(e,"schemePaired",(function(){return _b})),n.d(e,"schemePastel1",(function(){return wb})),n.d(e,"schemePastel2",(function(){return kb})),n.d(e,"schemeSet1",(function(){return Cb})),n.d(e,"schemeSet2",(function(){return Eb})),n.d(e,"schemeSet3",(function(){return Tb})),n.d(e,"schemeTableau10",(function(){return Sb})),n.d(e,"interpolateBrBG",(function(){return Ob})),n.d(e,"schemeBrBG",(function(){return Mb})),n.d(e,"interpolatePRGn",(function(){return Db})),n.d(e,"schemePRGn",(function(){return jb})),n.d(e,"interpolatePiYG",(function(){return Bb})),n.d(e,"schemePiYG",(function(){return Nb})),n.d(e,"interpolatePuOr",(function(){return Fb})),n.d(e,"schemePuOr",(function(){return Lb})),n.d(e,"interpolateRdBu",(function(){return Ib})),n.d(e,"schemeRdBu",(function(){return Pb})),n.d(e,"interpolateRdGy",(function(){return Yb})),n.d(e,"schemeRdGy",(function(){return Rb})),n.d(e,"interpolateRdYlBu",(function(){return Ub})),n.d(e,"schemeRdYlBu",(function(){return zb})),n.d(e,"interpolateRdYlGn",(function(){return $b})),n.d(e,"schemeRdYlGn",(function(){return Wb})),n.d(e,"interpolateSpectral",(function(){return Hb})),n.d(e,"schemeSpectral",(function(){return Vb})),n.d(e,"interpolateBuGn",(function(){return qb})),n.d(e,"schemeBuGn",(function(){return Gb})),n.d(e,"interpolateBuPu",(function(){return Zb})),n.d(e,"schemeBuPu",(function(){return Xb})),n.d(e,"interpolateGnBu",(function(){return Qb})),n.d(e,"schemeGnBu",(function(){return Jb})),n.d(e,"interpolateOrRd",(function(){return tx})),n.d(e,"schemeOrRd",(function(){return Kb})),n.d(e,"interpolatePuBuGn",(function(){return nx})),n.d(e,"schemePuBuGn",(function(){return ex})),n.d(e,"interpolatePuBu",(function(){return ix})),n.d(e,"schemePuBu",(function(){return rx})),n.d(e,"interpolatePuRd",(function(){return ox})),n.d(e,"schemePuRd",(function(){return ax})),n.d(e,"interpolateRdPu",(function(){return cx})),n.d(e,"schemeRdPu",(function(){return sx})),n.d(e,"interpolateYlGnBu",(function(){return lx})),n.d(e,"schemeYlGnBu",(function(){return ux})),n.d(e,"interpolateYlGn",(function(){return hx})),n.d(e,"schemeYlGn",(function(){return fx})),n.d(e,"interpolateYlOrBr",(function(){return px})),n.d(e,"schemeYlOrBr",(function(){return dx})),n.d(e,"interpolateYlOrRd",(function(){return yx})),n.d(e,"schemeYlOrRd",(function(){return gx})),n.d(e,"interpolateBlues",(function(){return mx})),n.d(e,"schemeBlues",(function(){return vx})),n.d(e,"interpolateGreens",(function(){return xx})),n.d(e,"schemeGreens",(function(){return bx})),n.d(e,"interpolateGreys",(function(){return wx})),n.d(e,"schemeGreys",(function(){return _x})),n.d(e,"interpolatePurples",(function(){return Cx})),n.d(e,"schemePurples",(function(){return kx})),n.d(e,"interpolateReds",(function(){return Tx})),n.d(e,"schemeReds",(function(){return Ex})),n.d(e,"interpolateOranges",(function(){return Ax})),n.d(e,"schemeOranges",(function(){return Sx})),n.d(e,"interpolateCividis",(function(){return Mx})),n.d(e,"interpolateCubehelixDefault",(function(){return Ox})),n.d(e,"interpolateRainbow",(function(){return Bx})),n.d(e,"interpolateWarm",(function(){return jx})),n.d(e,"interpolateCool",(function(){return Dx})),n.d(e,"interpolateSinebow",(function(){return Ix})),n.d(e,"interpolateTurbo",(function(){return Rx})),n.d(e,"interpolateViridis",(function(){return zx})),n.d(e,"interpolateMagma",(function(){return Ux})),n.d(e,"interpolateInferno",(function(){return Wx})),n.d(e,"interpolatePlasma",(function(){return $x})),n.d(e,"create",(function(){return Vx})),n.d(e,"creator",(function(){return ie})),n.d(e,"local",(function(){return Gx})),n.d(e,"matcher",(function(){return vt})),n.d(e,"mouse",(function(){return Fn})),n.d(e,"namespace",(function(){return Et})),n.d(e,"namespaces",(function(){return Ct})),n.d(e,"clientPoint",(function(){return Bn})),n.d(e,"select",(function(){return Ce})),n.d(e,"selectAll",(function(){return Xx})),n.d(e,"selection",(function(){return ke})),n.d(e,"selector",(function(){return pt})),n.d(e,"selectorAll",(function(){return yt})),n.d(e,"style",(function(){return Ft})),n.d(e,"touch",(function(){return Ln})),n.d(e,"touches",(function(){return Zx})),n.d(e,"window",(function(){return Dt})),n.d(e,"event",(function(){return le})),n.d(e,"customEvent",(function(){return ye})),n.d(e,"arc",(function(){return m_})),n.d(e,"area",(function(){return C_})),n.d(e,"line",(function(){return k_})),n.d(e,"pie",(function(){return S_})),n.d(e,"areaRadial",(function(){return N_})),n.d(e,"radialArea",(function(){return N_})),n.d(e,"lineRadial",(function(){return D_})),n.d(e,"radialLine",(function(){return D_})),n.d(e,"pointRadial",(function(){return B_})),n.d(e,"linkHorizontal",(function(){return U_})),n.d(e,"linkVertical",(function(){return W_})),n.d(e,"linkRadial",(function(){return $_})),n.d(e,"symbol",(function(){return uw})),n.d(e,"symbols",(function(){return cw})),n.d(e,"symbolCircle",(function(){return V_})),n.d(e,"symbolCross",(function(){return H_})),n.d(e,"symbolDiamond",(function(){return X_})),n.d(e,"symbolSquare",(function(){return tw})),n.d(e,"symbolStar",(function(){return K_})),n.d(e,"symbolTriangle",(function(){return nw})),n.d(e,"symbolWye",(function(){return sw})),n.d(e,"curveBasisClosed",(function(){return gw})),n.d(e,"curveBasisOpen",(function(){return vw})),n.d(e,"curveBasis",(function(){return dw})),n.d(e,"curveBundle",(function(){return bw})),n.d(e,"curveCardinalClosed",(function(){return Cw})),n.d(e,"curveCardinalOpen",(function(){return Tw})),n.d(e,"curveCardinal",(function(){return ww})),n.d(e,"curveCatmullRomClosed",(function(){return jw})),n.d(e,"curveCatmullRomOpen",(function(){return Nw})),n.d(e,"curveCatmullRom",(function(){return Mw})),n.d(e,"curveLinearClosed",(function(){return Lw})),n.d(e,"curveLinear",(function(){return x_})),n.d(e,"curveMonotoneX",(function(){return Ww})),n.d(e,"curveMonotoneY",(function(){return $w})),n.d(e,"curveNatural",(function(){return Gw})),n.d(e,"curveStep",(function(){return Xw})),n.d(e,"curveStepAfter",(function(){return Jw})),n.d(e,"curveStepBefore",(function(){return Zw})),n.d(e,"stack",(function(){return ek})),n.d(e,"stackOffsetExpand",(function(){return nk})),n.d(e,"stackOffsetDiverging",(function(){return rk})),n.d(e,"stackOffsetNone",(function(){return Qw})),n.d(e,"stackOffsetSilhouette",(function(){return ik})),n.d(e,"stackOffsetWiggle",(function(){return ak})),n.d(e,"stackOrderAppearance",(function(){return ok})),n.d(e,"stackOrderAscending",(function(){return ck})),n.d(e,"stackOrderDescending",(function(){return lk})),n.d(e,"stackOrderInsideOut",(function(){return fk})),n.d(e,"stackOrderNone",(function(){return Kw})),n.d(e,"stackOrderReverse",(function(){return hk})),n.d(e,"timeInterval",(function(){return ey})),n.d(e,"timeMillisecond",(function(){return zy})),n.d(e,"timeMilliseconds",(function(){return Uy})),n.d(e,"utcMillisecond",(function(){return zy})),n.d(e,"utcMilliseconds",(function(){return Uy})),n.d(e,"timeSecond",(function(){return Iy})),n.d(e,"timeSeconds",(function(){return Ry})),n.d(e,"utcSecond",(function(){return Iy})),n.d(e,"utcSeconds",(function(){return Ry})),n.d(e,"timeMinute",(function(){return Ly})),n.d(e,"timeMinutes",(function(){return Fy})),n.d(e,"timeHour",(function(){return Dy})),n.d(e,"timeHours",(function(){return Ny})),n.d(e,"timeDay",(function(){return My})),n.d(e,"timeDays",(function(){return Oy})),n.d(e,"timeWeek",(function(){return py})),n.d(e,"timeWeeks",(function(){return _y})),n.d(e,"timeSunday",(function(){return py})),n.d(e,"timeSundays",(function(){return _y})),n.d(e,"timeMonday",(function(){return gy})),n.d(e,"timeMondays",(function(){return wy})),n.d(e,"timeTuesday",(function(){return yy})),n.d(e,"timeTuesdays",(function(){return ky})),n.d(e,"timeWednesday",(function(){return vy})),n.d(e,"timeWednesdays",(function(){return Cy})),n.d(e,"timeThursday",(function(){return my})),n.d(e,"timeThursdays",(function(){return Ey})),n.d(e,"timeFriday",(function(){return by})),n.d(e,"timeFridays",(function(){return Ty})),n.d(e,"timeSaturday",(function(){return xy})),n.d(e,"timeSaturdays",(function(){return Sy})),n.d(e,"timeMonth",(function(){return oy})),n.d(e,"timeMonths",(function(){return sy})),n.d(e,"timeYear",(function(){return ry})),n.d(e,"timeYears",(function(){return iy})),n.d(e,"utcMinute",(function(){return tb})),n.d(e,"utcMinutes",(function(){return eb})),n.d(e,"utcHour",(function(){return Jm})),n.d(e,"utcHours",(function(){return Qm})),n.d(e,"utcDay",(function(){return av})),n.d(e,"utcDays",(function(){return ov})),n.d(e,"utcWeek",(function(){return $y})),n.d(e,"utcWeeks",(function(){return Jy})),n.d(e,"utcSunday",(function(){return $y})),n.d(e,"utcSundays",(function(){return Jy})),n.d(e,"utcMonday",(function(){return Vy})),n.d(e,"utcMondays",(function(){return Qy})),n.d(e,"utcTuesday",(function(){return Hy})),n.d(e,"utcTuesdays",(function(){return Ky})),n.d(e,"utcWednesday",(function(){return Gy})),n.d(e,"utcWednesdays",(function(){return tv})),n.d(e,"utcThursday",(function(){return qy})),n.d(e,"utcThursdays",(function(){return ev})),n.d(e,"utcFriday",(function(){return Xy})),n.d(e,"utcFridays",(function(){return nv})),n.d(e,"utcSaturday",(function(){return Zy})),n.d(e,"utcSaturdays",(function(){return rv})),n.d(e,"utcMonth",(function(){return qm})),n.d(e,"utcMonths",(function(){return Xm})),n.d(e,"utcYear",(function(){return cv})),n.d(e,"utcYears",(function(){return uv})),n.d(e,"timeFormatDefaultLocale",(function(){return Fm})),n.d(e,"timeFormat",(function(){return gv})),n.d(e,"timeParse",(function(){return yv})),n.d(e,"utcFormat",(function(){return vv})),n.d(e,"utcParse",(function(){return mv})),n.d(e,"timeFormatLocale",(function(){return dv})),n.d(e,"isoFormat",(function(){return pk})),n.d(e,"isoParse",(function(){return gk})),n.d(e,"now",(function(){return Vn})),n.d(e,"timer",(function(){return qn})),n.d(e,"timerFlush",(function(){return Xn})),n.d(e,"timeout",(function(){return Kn})),n.d(e,"interval",(function(){return yk})),n.d(e,"transition",(function(){return Vr})),n.d(e,"active",(function(){return ti})),n.d(e,"interrupt",(function(){return lr})),n.d(e,"voronoi",(function(){return eC})),n.d(e,"zoom",(function(){return gC})),n.d(e,"zoomTransform",(function(){return oC})),n.d(e,"zoomIdentity",(function(){return aC}));var r="5.16.0",i=function(t,e){return te?1:t>=e?0:NaN},a=function(t){var e;return 1===t.length&&(e=t,t=function(t,n){return i(e(t),n)}),{left:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r>>1;t(e[a],n)<0?r=a+1:i=a}return r},right:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r>>1;t(e[a],n)>0?i=a:r=a+1}return r}}};var o=a(i),s=o.right,c=o.left,u=s,l=function(t,e){null==e&&(e=f);for(var n=0,r=t.length-1,i=t[0],a=new Array(r<0?0:r);nt?1:e>=t?0:NaN},p=function(t){return null===t?NaN:+t},g=function(t,e){var n,r,i=t.length,a=0,o=-1,s=0,c=0;if(null==e)for(;++o1)return c/(a-1)},y=function(t,e){var n=g(t,e);return n?Math.sqrt(n):n},v=function(t,e){var n,r,i,a=t.length,o=-1;if(null==e){for(;++o=n)for(r=i=n;++on&&(r=n),i=n)for(r=i=n;++on&&(r=n),i0)return[t];if((r=e0)for(t=Math.ceil(t/o),e=Math.floor(e/o),a=new Array(i=Math.ceil(e-t+1));++s=0?(a>=C?10:a>=E?5:a>=T?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=C?10:a>=E?5:a>=T?2:1)}function M(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),a=r/i;return a>=C?i*=10:a>=E?i*=5:a>=T&&(i*=2),ef;)h.pop(),--d;var p,g=new Array(d+1);for(i=0;i<=d;++i)(p=g[i]=[]).x0=i>0?h[i-1]:l,p.x1=i=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,a=Math.floor(i),o=+n(t[a],a,t);return o+(+n(t[a+1],a+1,t)-o)*(i-a)}},N=function(t,e,n){return t=x.call(t,p).sort(i),Math.ceil((n-e)/(2*(D(t,.75)-D(t,.25))*Math.pow(t.length,-1/3)))},B=function(t,e,n){return Math.ceil((n-e)/(3.5*y(t)*Math.pow(t.length,-1/3)))},L=function(t,e){var n,r,i=t.length,a=-1;if(null==e){for(;++a=n)for(r=n;++ar&&(r=n)}else for(;++a=n)for(r=n;++ar&&(r=n);return r},F=function(t,e){var n,r=t.length,i=r,a=-1,o=0;if(null==e)for(;++a=0;)for(e=(r=t[i]).length;--e>=0;)n[--o]=r[e];return n},R=function(t,e){var n,r,i=t.length,a=-1;if(null==e){for(;++a=n)for(r=n;++an&&(r=n)}else for(;++a=n)for(r=n;++an&&(r=n);return r},Y=function(t,e){for(var n=e.length,r=new Array(n);n--;)r[n]=t[e[n]];return r},z=function(t,e){if(n=t.length){var n,r,a=0,o=0,s=t[o];for(null==e&&(e=i);++a=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function lt(t,e){for(var n,r=0,i=t.length;r0)for(var n,r,i=new Array(n),a=0;ae?1:t>=e?0:NaN}var kt="http://www.w3.org/1999/xhtml",Ct={svg:"http://www.w3.org/2000/svg",xhtml:kt,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},Et=function(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),Ct.hasOwnProperty(e)?{space:Ct[e],local:t}:t};function Tt(t){return function(){this.removeAttribute(t)}}function St(t){return function(){this.removeAttributeNS(t.space,t.local)}}function At(t,e){return function(){this.setAttribute(t,e)}}function Mt(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Ot(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function jt(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}var Dt=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function Nt(t){return function(){this.style.removeProperty(t)}}function Bt(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Lt(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Ft(t,e){return t.style.getPropertyValue(e)||Dt(t).getComputedStyle(t,null).getPropertyValue(e)}function Pt(t){return function(){delete this[t]}}function It(t,e){return function(){this[t]=e}}function Rt(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function Yt(t){return t.trim().split(/^|\s+/)}function zt(t){return t.classList||new Ut(t)}function Ut(t){this._node=t,this._names=Yt(t.getAttribute("class")||"")}function Wt(t,e){for(var n=zt(t),r=-1,i=e.length;++r=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function qt(){this.textContent=""}function Xt(t){return function(){this.textContent=t}}function Zt(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function Jt(){this.innerHTML=""}function Qt(t){return function(){this.innerHTML=t}}function Kt(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function te(){this.nextSibling&&this.parentNode.appendChild(this)}function ee(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function ne(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===kt&&e.documentElement.namespaceURI===kt?e.createElement(t):e.createElementNS(n,t)}}function re(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}var ie=function(t){var e=Et(t);return(e.local?re:ne)(e)};function ae(){return null}function oe(){var t=this.parentNode;t&&t.removeChild(this)}function se(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function ce(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}var ue={},le=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(ue={mouseenter:"mouseover",mouseleave:"mouseout"}));function fe(t,e,n){return t=he(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function he(t,e,n){return function(r){var i=le;le=r;try{t.call(this,this.__data__,e,n)}finally{le=i}}}function de(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function pe(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r=_&&(_=x+1);!(b=v[_])&&++_=0;)(r=i[a])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=wt);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a1?this.each((null==e?Nt:"function"==typeof e?Lt:Bt)(t,e,null==n?"":n)):Ft(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Pt:"function"==typeof e?Rt:It)(t,e)):this.node()[t]},classed:function(t,e){var n=Yt(t+"");if(arguments.length<2){for(var r=zt(this.node()),i=-1,a=n.length;++i>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?Xe(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?Xe(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Ie.exec(t))?new Qe(e[1],e[2],e[3],1):(e=Re.exec(t))?new Qe(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Ye.exec(t))?Xe(e[1],e[2],e[3],e[4]):(e=ze.exec(t))?Xe(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Ue.exec(t))?nn(e[1],e[2]/100,e[3]/100,1):(e=We.exec(t))?nn(e[1],e[2]/100,e[3]/100,e[4]):$e.hasOwnProperty(t)?qe($e[t]):"transparent"===t?new Qe(NaN,NaN,NaN,0):null}function qe(t){return new Qe(t>>16&255,t>>8&255,255&t,1)}function Xe(t,e,n,r){return r<=0&&(t=e=n=NaN),new Qe(t,e,n,r)}function Ze(t){return t instanceof je||(t=Ge(t)),t?new Qe((t=t.rgb()).r,t.g,t.b,t.opacity):new Qe}function Je(t,e,n,r){return 1===arguments.length?Ze(t):new Qe(t,e,n,null==r?1:r)}function Qe(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Ke(){return"#"+en(this.r)+en(this.g)+en(this.b)}function tn(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function en(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function nn(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new on(t,e,n,r)}function rn(t){if(t instanceof on)return new on(t.h,t.s,t.l,t.opacity);if(t instanceof je||(t=Ge(t)),!t)return new on;if(t instanceof on)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=e===a?(n-r)/s+6*(n0&&c<1?0:o,new on(o,s,c,t.opacity)}function an(t,e,n,r){return 1===arguments.length?rn(t):new on(t,e,n,null==r?1:r)}function on(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function sn(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function cn(t,e,n,r,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*r+o*i)/6}Me(je,Ge,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Ve,formatHex:Ve,formatHsl:function(){return rn(this).formatHsl()},formatRgb:He,toString:He}),Me(Qe,Je,Oe(je,{brighter:function(t){return t=null==t?Ne:Math.pow(Ne,t),new Qe(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?De:Math.pow(De,t),new Qe(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Ke,formatHex:Ke,formatRgb:tn,toString:tn})),Me(on,an,Oe(je,{brighter:function(t){return t=null==t?Ne:Math.pow(Ne,t),new on(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?De:Math.pow(De,t),new on(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new Qe(sn(t>=240?t-240:t+120,i,r),sn(t,i,r),sn(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var un=function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],o=r>0?t[r-1]:2*i-a,s=r180||n<-180?n-360*Math.round(n/360):n):fn(isNaN(t)?e:t)}function pn(t){return 1==(t=+t)?gn:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):fn(isNaN(e)?n:e)}}function gn(t,e){var n=e-t;return n?hn(t,n):fn(isNaN(t)?e:t)}var yn=function t(e){var n=pn(e);function r(t,e){var r=n((t=Je(t)).r,(e=Je(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=gn(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}return r.gamma=t,r}(1);function vn(t){return function(e){var n,r,i=e.length,a=new Array(i),o=new Array(i),s=new Array(i);for(n=0;na&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,c.push({i:o,x:En(n,r)})),a=An.lastIndex;return a=0&&e._call.call(null,t),e=e._next;--Pn}function Zn(){zn=(Yn=Wn.now())+Un,Pn=In=0;try{Xn()}finally{Pn=0,function(){var t,e,n=Mn,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Mn=e);On=t,Qn(r)}(),zn=0}}function Jn(){var t=Wn.now(),e=t-Yn;e>1e3&&(Un-=e,Yn=t)}function Qn(t){Pn||(In&&(In=clearTimeout(In)),t-zn>24?(t<1/0&&(In=setTimeout(Zn,t-Wn.now()-Un)),Rn&&(Rn=clearInterval(Rn))):(Rn||(Yn=Wn.now(),Rn=setInterval(Jn,1e3)),Pn=1,$n(Zn)))}Gn.prototype=qn.prototype={constructor:Gn,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Vn():+n)+(null==e?0:+e),this._next||On===this||(On?On._next=this:Mn=this,On=this),this._call=t,this._time=n,Qn()},stop:function(){this._call&&(this._call=null,this._time=1/0,Qn())}};var Kn=function(t,e,n){var r=new Gn;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r},tr=ht("start","end","cancel","interrupt"),er=[],nr=function(t,e,n,r,i,a){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function a(t){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=t&&o(t-n.delay)}function o(a){var u,l,f,h;if(1!==n.state)return c();for(u in i)if((h=i[u]).name===n.name){if(3===h.state)return Kn(o);4===h.state?(h.state=6,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[u]):+u0)throw new Error("too late; already scheduled");return n}function ir(t,e){var n=ar(t,e);if(n.state>3)throw new Error("too late; already running");return n}function ar(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}var or,sr,cr,ur,lr=function(t,e){var n,r,i,a=t.__transition,o=!0;if(a){for(i in e=null==e?null:e+"",a)(n=a[i]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete a[i]):o=!1;o&&delete t.__transition}},fr=180/Math.PI,hr={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},dr=function(t,e,n,r,i,a){var o,s,c;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(c=t*n+e*r)&&(n-=t*c,r-=e*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),t*r180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:En(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(a.rotate,o.rotate,s,c),function(t,e,n,a){t!==e?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:En(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(a.skewX,o.skewX,s,c),function(t,e,n,r,a,o){if(t!==n||e!==r){var s=a.push(i(a)+"scale(",null,",",null,")");o.push({i:s-4,x:En(t,n)},{i:s-2,x:En(e,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,c),a=o=null,function(t){for(var e,n=-1,r=c.length;++n=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?rr:ir;return function(){var o=a(this,t),s=o.on;s!==r&&(i=(r=s).copy()).on(e,n),o.on=i}}var Pr=ke.prototype.constructor;function Ir(t){return function(){this.style.removeProperty(t)}}function Rr(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function Yr(t,e,n){var r,i;function a(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&Rr(t,a,n)),r}return a._value=e,a}function zr(t){return function(e){this.textContent=t.call(this,e)}}function Ur(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&zr(r)),e}return r._value=t,r}var Wr=0;function $r(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Vr(t){return ke().transition(t)}function Hr(){return++Wr}var Gr=ke.prototype;function qr(t){return t*t*t}function Xr(t){return--t*t*t+1}function Zr(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}$r.prototype=Vr.prototype={constructor:$r,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=pt(t));for(var r=this._groups,i=r.length,a=new Array(i),o=0;o1&&n.name===e)return new $r([[t]],Kr,e,+r);return null},ei=function(t){return function(){return t}},ni=function(t,e,n){this.target=t,this.type=e,this.selection=n};function ri(){le.stopImmediatePropagation()}var ii=function(){le.preventDefault(),le.stopImmediatePropagation()},ai={name:"drag"},oi={name:"space"},si={name:"handle"},ci={name:"center"};function ui(t){return[+t[0],+t[1]]}function li(t){return[ui(t[0]),ui(t[1])]}function fi(t){return function(e){return Ln(e,le.touches,t)}}var hi={name:"x",handles:["w","e"].map(xi),input:function(t,e){return null==t?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},di={name:"y",handles:["n","s"].map(xi),input:function(t,e){return null==t?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},pi={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(xi),input:function(t){return null==t?null:li(t)},output:function(t){return t}},gi={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},yi={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},vi={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},mi={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},bi={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function xi(t){return{type:t}}function _i(){return!le.ctrlKey&&!le.button}function wi(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function ki(){return navigator.maxTouchPoints||"ontouchstart"in this}function Ci(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function Ei(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function Ti(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function Si(){return Oi(hi)}function Ai(){return Oi(di)}var Mi=function(){return Oi(pi)};function Oi(t){var e,n=wi,r=_i,i=ki,a=!0,o=ht("start","brush","end"),s=6;function c(e){var n=e.property("__brush",g).selectAll(".overlay").data([xi("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",gi.overlay).merge(n).each((function(){var t=Ci(this).extent;Ce(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])})),e.selectAll(".selection").data([xi("selection")]).enter().append("rect").attr("class","selection").attr("cursor",gi.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=e.selectAll(".handle").data(t.handles,(function(t){return t.type}));r.exit().remove(),r.enter().append("rect").attr("class",(function(t){return"handle handle--"+t.type})).attr("cursor",(function(t){return gi[t.type]})),e.each(u).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",h).filter(i).on("touchstart.brush",h).on("touchmove.brush",d).on("touchend.brush touchcancel.brush",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function u(){var t=Ce(this),e=Ci(this).selection;e?(t.selectAll(".selection").style("display",null).attr("x",e[0][0]).attr("y",e[0][1]).attr("width",e[1][0]-e[0][0]).attr("height",e[1][1]-e[0][1]),t.selectAll(".handle").style("display",null).attr("x",(function(t){return"e"===t.type[t.type.length-1]?e[1][0]-s/2:e[0][0]-s/2})).attr("y",(function(t){return"s"===t.type[0]?e[1][1]-s/2:e[0][1]-s/2})).attr("width",(function(t){return"n"===t.type||"s"===t.type?e[1][0]-e[0][0]+s:s})).attr("height",(function(t){return"e"===t.type||"w"===t.type?e[1][1]-e[0][1]+s:s}))):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function l(t,e,n){var r=t.__brush.emitter;return!r||n&&r.clean?new f(t,e,n):r}function f(t,e,n){this.that=t,this.args=e,this.state=t.__brush,this.active=0,this.clean=n}function h(){if((!e||le.touches)&&r.apply(this,arguments)){var n,i,o,s,c,f,h,d,p,g,y,v=this,m=le.target.__data__.type,b="selection"===(a&&le.metaKey?m="overlay":m)?ai:a&&le.altKey?ci:si,x=t===di?null:mi[m],_=t===hi?null:bi[m],w=Ci(v),k=w.extent,C=w.selection,E=k[0][0],T=k[0][1],S=k[1][0],A=k[1][1],M=0,O=0,j=x&&_&&a&&le.shiftKey,D=le.touches?fi(le.changedTouches[0].identifier):Fn,N=D(v),B=N,L=l(v,arguments,!0).beforestart();"overlay"===m?(C&&(p=!0),w.selection=C=[[n=t===di?E:N[0],o=t===hi?T:N[1]],[c=t===di?S:n,h=t===hi?A:o]]):(n=C[0][0],o=C[0][1],c=C[1][0],h=C[1][1]),i=n,s=o,f=c,d=h;var F=Ce(v).attr("pointer-events","none"),P=F.selectAll(".overlay").attr("cursor",gi[m]);if(le.touches)L.moved=R,L.ended=z;else{var I=Ce(le.view).on("mousemove.brush",R,!0).on("mouseup.brush",z,!0);a&&I.on("keydown.brush",U,!0).on("keyup.brush",W,!0),Se(le.view)}ri(),lr(v),u.call(v),L.start()}function R(){var t=D(v);!j||g||y||(Math.abs(t[0]-B[0])>Math.abs(t[1]-B[1])?y=!0:g=!0),B=t,p=!0,ii(),Y()}function Y(){var t;switch(M=B[0]-N[0],O=B[1]-N[1],b){case oi:case ai:x&&(M=Math.max(E-n,Math.min(S-c,M)),i=n+M,f=c+M),_&&(O=Math.max(T-o,Math.min(A-h,O)),s=o+O,d=h+O);break;case si:x<0?(M=Math.max(E-n,Math.min(S-n,M)),i=n+M,f=c):x>0&&(M=Math.max(E-c,Math.min(S-c,M)),i=n,f=c+M),_<0?(O=Math.max(T-o,Math.min(A-o,O)),s=o+O,d=h):_>0&&(O=Math.max(T-h,Math.min(A-h,O)),s=o,d=h+O);break;case ci:x&&(i=Math.max(E,Math.min(S,n-M*x)),f=Math.max(E,Math.min(S,c+M*x))),_&&(s=Math.max(T,Math.min(A,o-O*_)),d=Math.max(T,Math.min(A,h+O*_)))}f0&&(n=i-M),_<0?h=d-O:_>0&&(o=s-O),b=oi,P.attr("cursor",gi.selection),Y());break;default:return}ii()}function W(){switch(le.keyCode){case 16:j&&(g=y=j=!1,Y());break;case 18:b===ci&&(x<0?c=f:x>0&&(n=i),_<0?h=d:_>0&&(o=s),b=si,Y());break;case 32:b===oi&&(le.altKey?(x&&(c=f-M*x,n=i+M*x),_&&(h=d-O*_,o=s+O*_),b=ci):(x<0?c=f:x>0&&(n=i),_<0?h=d:_>0&&(o=s),b=si),P.attr("cursor",gi[m]),Y());break;default:return}ii()}}function d(){l(this,arguments).moved()}function p(){l(this,arguments).ended()}function g(){var e=this.__brush||{selection:null};return e.extent=li(n.apply(this,arguments)),e.dim=t,e}return c.move=function(e,n){e.selection?e.on("start.brush",(function(){l(this,arguments).beforestart().start()})).on("interrupt.brush end.brush",(function(){l(this,arguments).end()})).tween("brush",(function(){var e=this,r=e.__brush,i=l(e,arguments),a=r.selection,o=t.input("function"==typeof n?n.apply(this,arguments):n,r.extent),s=Dn(a,o);function c(t){r.selection=1===t&&null===o?null:s(t),u.call(e),i.brush()}return null!==a&&null!==o?c:c(1)})):e.each((function(){var e=this,r=arguments,i=e.__brush,a=t.input("function"==typeof n?n.apply(e,r):n,i.extent),o=l(e,r).beforestart();lr(e),i.selection=null===a?null:a,u.call(e),o.start().brush().end()}))},c.clear=function(t){c.move(t,null)},f.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(){return this.starting?(this.starting=!1,this.emit("start")):this.emit("brush"),this},brush:function(){return this.emit("brush"),this},end:function(){return 0==--this.active&&(delete this.state.emitter,this.emit("end")),this},emit:function(e){ye(new ni(c,e,t.output(this.state.selection)),o.apply,o,[e,this.that,this.args])}},c.extent=function(t){return arguments.length?(n="function"==typeof t?t:ei(li(t)),c):n},c.filter=function(t){return arguments.length?(r="function"==typeof t?t:ei(!!t),c):r},c.touchable=function(t){return arguments.length?(i="function"==typeof t?t:ei(!!t),c):i},c.handleSize=function(t){return arguments.length?(s=+t,c):s},c.keyModifiers=function(t){return arguments.length?(a=!!t,c):a},c.on=function(){var t=o.on.apply(o,arguments);return t===o?c:t},c}var ji=Math.cos,Di=Math.sin,Ni=Math.PI,Bi=Ni/2,Li=2*Ni,Fi=Math.max;function Pi(t){return function(e,n){return t(e.source.value+e.target.value,n.source.value+n.target.value)}}var Ii=function(){var t=0,e=null,n=null,r=null;function i(i){var a,o,s,c,u,l,f=i.length,h=[],d=k(f),p=[],g=[],y=g.groups=new Array(f),v=new Array(f*f);for(a=0,u=-1;++uWi)if(Math.abs(l*s-c*u)>Wi&&i){var h=n-a,d=r-o,p=s*s+c*c,g=h*h+d*d,y=Math.sqrt(p),v=Math.sqrt(f),m=i*Math.tan((zi-Math.acos((p+f-g)/(2*y*v)))/2),b=m/v,x=m/y;Math.abs(b-1)>Wi&&(this._+="L"+(t+b*u)+","+(e+b*l)),this._+="A"+i+","+i+",0,0,"+ +(l*h>u*d)+","+(this._x1=t+x*s)+","+(this._y1=e+x*c)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,r,i,a){t=+t,e=+e,a=!!a;var o=(n=+n)*Math.cos(r),s=n*Math.sin(r),c=t+o,u=e+s,l=1^a,f=a?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+c+","+u:(Math.abs(this._x1-c)>Wi||Math.abs(this._y1-u)>Wi)&&(this._+="L"+c+","+u),n&&(f<0&&(f=f%Ui+Ui),f>$i?this._+="A"+n+","+n+",0,1,"+l+","+(t-o)+","+(e-s)+"A"+n+","+n+",0,1,"+l+","+(this._x1=c)+","+(this._y1=u):f>Wi&&(this._+="A"+n+","+n+",0,"+ +(f>=zi)+","+l+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var Gi=Hi;function qi(t){return t.source}function Xi(t){return t.target}function Zi(t){return t.radius}function Ji(t){return t.startAngle}function Qi(t){return t.endAngle}var Ki=function(){var t=qi,e=Xi,n=Zi,r=Ji,i=Qi,a=null;function o(){var o,s=Ri.call(arguments),c=t.apply(this,s),u=e.apply(this,s),l=+n.apply(this,(s[0]=c,s)),f=r.apply(this,s)-Bi,h=i.apply(this,s)-Bi,d=l*ji(f),p=l*Di(f),g=+n.apply(this,(s[0]=u,s)),y=r.apply(this,s)-Bi,v=i.apply(this,s)-Bi;if(a||(a=o=Gi()),a.moveTo(d,p),a.arc(0,0,l,f,h),f===y&&h===v||(a.quadraticCurveTo(0,0,g*ji(y),g*Di(y)),a.arc(0,0,g,y,v)),a.quadraticCurveTo(0,0,d,p),a.closePath(),o)return a=null,o+""||null}return o.radius=function(t){return arguments.length?(n="function"==typeof t?t:Yi(+t),o):n},o.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:Yi(+t),o):r},o.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:Yi(+t),o):i},o.source=function(e){return arguments.length?(t=e,o):t},o.target=function(t){return arguments.length?(e=t,o):e},o.context=function(t){return arguments.length?(a=null==t?null:t,o):a},o},ta="$";function ea(){}function na(t,e){var n=new ea;if(t instanceof ea)t.each((function(t,e){n.set(e,t)}));else if(Array.isArray(t)){var r,i=-1,a=t.length;if(null==e)for(;++i=r.length)return null!=t&&n.sort(t),null!=e?e(n):n;for(var c,u,l,f=-1,h=n.length,d=r[i++],p=ra(),g=o();++fr.length)return n;var o,s=i[a-1];return null!=e&&a>=r.length?o=n.entries():(o=[],n.each((function(e,n){o.push({key:n,values:t(e,a)})}))),null!=s?o.sort((function(t,e){return s(t.key,e.key)})):o}(a(t,0,sa,ca),0)},key:function(t){return r.push(t),n},sortKeys:function(t){return i[r.length-1]=t,n},sortValues:function(e){return t=e,n},rollup:function(t){return e=t,n}}};function aa(){return{}}function oa(t,e,n){t[e]=n}function sa(){return ra()}function ca(t,e,n){t.set(e,n)}function ua(){}var la=ra.prototype;function fa(t,e){var n=new ua;if(t instanceof ua)t.each((function(t){n.add(t)}));else if(t){var r=-1,i=t.length;if(null==e)for(;++r.008856451679035631?Math.pow(t,1/3):t/wa+xa}function Aa(t){return t>_a?t*t*t:wa*(t-xa)}function Ma(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Oa(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function ja(t){if(t instanceof Ba)return new Ba(t.h,t.c,t.l,t.opacity);if(t instanceof Ta||(t=ka(t)),0===t.a&&0===t.b)return new Ba(NaN,0r!=d>r&&n<(h-u)*(r-l)/(d-l)+u&&(i=-i)}return i}function Qa(t,e,n){var r,i,a,o;return function(t,e,n){return(e[0]-t[0])*(n[1]-t[1])==(n[0]-t[0])*(e[1]-t[1])}(t,e,n)&&(i=t[r=+(t[0]===e[0])],a=n[r],o=e[r],i<=a&&a<=o||o<=a&&a<=i)}var Ka=function(){},to=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]],eo=function(){var t=1,e=1,n=O,r=s;function i(t){var e=n(t);if(Array.isArray(e))e=e.slice().sort(qa);else{var r=v(t),i=r[0],o=r[1];e=M(i,o,e),e=k(Math.floor(i/e)*e,Math.floor(o/e)*e,e)}return e.map((function(e){return a(t,e)}))}function a(n,i){var a=[],s=[];return function(n,r,i){var a,s,c,u,l,f,h=new Array,d=new Array;a=s=-1,u=n[0]>=r,to[u<<1].forEach(p);for(;++a=r,to[c|u<<1].forEach(p);to[u<<0].forEach(p);for(;++s=r,l=n[s*t]>=r,to[u<<1|l<<2].forEach(p);++a=r,f=l,l=n[s*t+a+1]>=r,to[c|u<<1|l<<2|f<<3].forEach(p);to[u|l<<3].forEach(p)}a=-1,l=n[s*t]>=r,to[l<<2].forEach(p);for(;++a=r,to[l<<2|f<<3].forEach(p);function p(t){var e,n,r=[t[0][0]+a,t[0][1]+s],c=[t[1][0]+a,t[1][1]+s],u=o(r),l=o(c);(e=d[u])?(n=h[l])?(delete d[e.end],delete h[n.start],e===n?(e.ring.push(c),i(e.ring)):h[e.start]=d[n.end]={start:e.start,end:n.end,ring:e.ring.concat(n.ring)}):(delete d[e.end],e.ring.push(c),d[e.end=l]=e):(e=h[l])?(n=d[u])?(delete h[e.start],delete d[n.end],e===n?(e.ring.push(c),i(e.ring)):h[n.start]=d[e.end]={start:n.start,end:e.end,ring:n.ring.concat(e.ring)}):(delete h[e.start],e.ring.unshift(r),h[e.start=u]=e):h[u]=d[l]={start:u,end:l,ring:[r,c]}}to[l<<3].forEach(p)}(n,i,(function(t){r(t,n,i),function(t){for(var e=0,n=t.length,r=t[n-1][1]*t[0][0]-t[n-1][0]*t[0][1];++e0?a.push([t]):s.push(t)})),s.forEach((function(t){for(var e,n=0,r=a.length;n0&&o0&&s0&&a>0))throw new Error("invalid size");return t=r,e=a,i},i.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?Xa(Ga.call(t)):Xa(t),i):n},i.smooth=function(t){return arguments.length?(r=t?s:Ka,i):r===s},i};function no(t,e,n){for(var r=t.width,i=t.height,a=1+(n<<1),o=0;o=n&&(s>=a&&(c-=t.data[s-a+o*r]),e.data[s-n+o*r]=c/Math.min(s+1,r-1+a-s,a))}function ro(t,e,n){for(var r=t.width,i=t.height,a=1+(n<<1),o=0;o=n&&(s>=a&&(c-=t.data[o+(s-a)*r]),e.data[o+(s-n)*r]=c/Math.min(s+1,i-1+a-s,a))}function io(t){return t[0]}function ao(t){return t[1]}function oo(){return 1}var so=function(){var t=io,e=ao,n=oo,r=960,i=500,a=20,o=2,s=3*a,c=r+2*s>>o,u=i+2*s>>o,l=Xa(20);function f(r){var i=new Float32Array(c*u),f=new Float32Array(c*u);r.forEach((function(r,a,l){var f=+t(r,a,l)+s>>o,h=+e(r,a,l)+s>>o,d=+n(r,a,l);f>=0&&f=0&&h>o),ro({width:c,height:u,data:f},{width:c,height:u,data:i},a>>o),no({width:c,height:u,data:i},{width:c,height:u,data:f},a>>o),ro({width:c,height:u,data:f},{width:c,height:u,data:i},a>>o),no({width:c,height:u,data:i},{width:c,height:u,data:f},a>>o),ro({width:c,height:u,data:f},{width:c,height:u,data:i},a>>o);var d=l(i);if(!Array.isArray(d)){var p=L(i);d=M(0,p,d),(d=k(0,Math.floor(p/d)*d,d)).shift()}return eo().thresholds(d).size([c,u])(i).map(h)}function h(t){return t.value*=Math.pow(2,-2*o),t.coordinates.forEach(d),t}function d(t){t.forEach(p)}function p(t){t.forEach(g)}function g(t){t[0]=t[0]*Math.pow(2,o)-s,t[1]=t[1]*Math.pow(2,o)-s}function y(){return c=r+2*(s=3*a)>>o,u=i+2*s>>o,f}return f.x=function(e){return arguments.length?(t="function"==typeof e?e:Xa(+e),f):t},f.y=function(t){return arguments.length?(e="function"==typeof t?t:Xa(+t),f):e},f.weight=function(t){return arguments.length?(n="function"==typeof t?t:Xa(+t),f):n},f.size=function(t){if(!arguments.length)return[r,i];var e=Math.ceil(t[0]),n=Math.ceil(t[1]);if(!(e>=0||e>=0))throw new Error("invalid size");return r=e,i=n,y()},f.cellSize=function(t){if(!arguments.length)return 1<=1))throw new Error("invalid cell size");return o=Math.floor(Math.log(t)/Math.LN2),y()},f.thresholds=function(t){return arguments.length?(l="function"==typeof t?t:Array.isArray(t)?Xa(Ga.call(t)):Xa(t),f):l},f.bandwidth=function(t){if(!arguments.length)return Math.sqrt(a*(a+1));if(!((t=+t)>=0))throw new Error("invalid bandwidth");return a=Math.round((Math.sqrt(4*t*t+1)-1)/2),y()},f},co=function(t){return function(){return t}};function uo(t,e,n,r,i,a,o,s,c,u){this.target=t,this.type=e,this.subject=n,this.identifier=r,this.active=i,this.x=a,this.y=o,this.dx=s,this.dy=c,this._=u}function lo(){return!le.ctrlKey&&!le.button}function fo(){return this.parentNode}function ho(t){return null==t?{x:le.x,y:le.y}:t}function po(){return navigator.maxTouchPoints||"ontouchstart"in this}uo.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var go=function(){var t,e,n,r,i=lo,a=fo,o=ho,s=po,c={},u=ht("start","drag","end"),l=0,f=0;function h(t){t.on("mousedown.drag",d).filter(s).on("touchstart.drag",y).on("touchmove.drag",v).on("touchend.drag touchcancel.drag",m).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function d(){if(!r&&i.apply(this,arguments)){var o=b("mouse",a.apply(this,arguments),Fn,this,arguments);o&&(Ce(le.view).on("mousemove.drag",p,!0).on("mouseup.drag",g,!0),Se(le.view),Ee(),n=!1,t=le.clientX,e=le.clientY,o("start"))}}function p(){if(Te(),!n){var r=le.clientX-t,i=le.clientY-e;n=r*r+i*i>f}c.mouse("drag")}function g(){Ce(le.view).on("mousemove.drag mouseup.drag",null),Ae(le.view,n),Te(),c.mouse("end")}function y(){if(i.apply(this,arguments)){var t,e,n=le.changedTouches,r=a.apply(this,arguments),o=n.length;for(t=0;t9999?"+"+xo(e,6):xo(e,4))+"-"+xo(t.getUTCMonth()+1,2)+"-"+xo(t.getUTCDate(),2)+(a?"T"+xo(n,2)+":"+xo(r,2)+":"+xo(i,2)+"."+xo(a,3)+"Z":i?"T"+xo(n,2)+":"+xo(r,2)+":"+xo(i,2)+"Z":r||n?"T"+xo(n,2)+":"+xo(r,2)+"Z":"")}var wo=function(t){var e=new RegExp('["'+t+"\n\r]"),n=t.charCodeAt(0);function r(t,e){var r,i=[],a=t.length,o=0,s=0,c=a<=0,u=!1;function l(){if(c)return vo;if(u)return u=!1,yo;var e,r,i=o;if(34===t.charCodeAt(i)){for(;o++=a?c=!0:10===(r=t.charCodeAt(o++))?u=!0:13===r&&(u=!0,10===t.charCodeAt(o)&&++o),t.slice(i+1,e-1).replace(/""/g,'"')}for(;o=(a=(g+v)/2))?g=a:v=a,(l=n>=(o=(y+m)/2))?y=o:m=o,i=d,!(d=d[f=l<<1|u]))return i[f]=p,t;if(s=+t._x.call(null,d.data),c=+t._y.call(null,d.data),e===s&&n===c)return p.next=d,i?i[f]=p:t._root=p,t;do{i=i?i[f]=new Array(4):t._root=new Array(4),(u=e>=(a=(g+v)/2))?g=a:v=a,(l=n>=(o=(y+m)/2))?y=o:m=o}while((f=l<<1|u)==(h=(c>=o)<<1|s>=a));return i[h]=d,i[f]=p,t}var Ys=function(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i};function zs(t){return t[0]}function Us(t){return t[1]}function Ws(t,e,n){var r=new $s(null==e?zs:e,null==n?Us:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function $s(t,e,n,r,i,a){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function Vs(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var Hs=Ws.prototype=$s.prototype;function Gs(t){return t.x+t.vx}function qs(t){return t.y+t.vy}Hs.copy=function(){var t,e,n=new $s(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=Vs(r),n;for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=Vs(e));return n},Hs.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return Rs(this.cover(e,n),e,n,t)},Hs.addAll=function(t){var e,n,r,i,a=t.length,o=new Array(a),s=new Array(a),c=1/0,u=1/0,l=-1/0,f=-1/0;for(n=0;nl&&(l=r),if&&(f=i));if(c>l||u>f)return this;for(this.cover(c,u).cover(l,f),n=0;nt||t>=i||r>e||e>=a;)switch(s=(eh||(a=c.y0)>d||(o=c.x1)=v)<<1|t>=y)&&(c=p[p.length-1],p[p.length-1]=p[p.length-1-u],p[p.length-1-u]=c)}else{var m=t-+this._x.call(null,g.data),b=e-+this._y.call(null,g.data),x=m*m+b*b;if(x=(s=(p+y)/2))?p=s:y=s,(l=o>=(c=(g+v)/2))?g=c:v=c,e=d,!(d=d[f=l<<1|u]))return this;if(!d.length)break;(e[f+1&3]||e[f+2&3]||e[f+3&3])&&(n=e,h=f)}for(;d.data!==t;)if(r=d,!(d=d.next))return this;return(i=d.next)&&delete d.next,r?(i?r.next=i:delete r.next,this):e?(i?e[f]=i:delete e[f],(d=e[0]||e[1]||e[2]||e[3])&&d===(e[3]||e[2]||e[1]||e[0])&&!d.length&&(n?n[h]=d:this._root=d),this):(this._root=i,this)},Hs.removeAll=function(t){for(var e=0,n=t.length;ec+d||iu+d||as.index){var p=c-o.x-o.vx,g=u-o.y-o.vy,y=p*p+g*g;yt.r&&(t.r=t[e].r)}function s(){if(e){var r,i,a=e.length;for(n=new Array(a),r=0;r1?(null==n?s.remove(t):s.set(t,d(n)),e):s.get(t)},find:function(e,n,r){var i,a,o,s,c,u=0,l=t.length;for(null==r?r=1/0:r*=r,u=0;u1?(u.on(t,n),e):u.on(t)}}},rc=function(){var t,e,n,r,i=Ps(-30),a=1,o=1/0,s=.81;function c(r){var i,a=t.length,o=Ws(t,Ks,tc).visitAfter(l);for(n=r,i=0;i=o)){(t.data!==e||t.next)&&(0===l&&(d+=(l=Is())*l),0===f&&(d+=(f=Is())*f),d1?r[0]+r.slice(2):r,+t.slice(n+1)]}var cc=function(t){return(t=sc(Math.abs(t)))?t[1]:NaN},uc=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function lc(t){if(!(e=uc.exec(t)))throw new Error("invalid format: "+t);var e;return new fc({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function fc(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}lc.prototype=fc.prototype,fc.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var hc,dc,pc,gc,yc=function(t,e){var n=sc(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")},vc={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return yc(100*t,e)},r:yc,s:function(t,e){var n=sc(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(hc=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+sc(t,Math.max(0,e+a-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}},mc=function(t){return t},bc=Array.prototype.map,xc=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"],_c=function(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?mc:(e=bc.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(t.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?mc:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(bc.call(t.numerals,String)),c=void 0===t.percent?"%":t.percent+"",u=void 0===t.minus?"-":t.minus+"",l=void 0===t.nan?"NaN":t.nan+"";function f(t){var e=(t=lc(t)).fill,n=t.align,f=t.sign,h=t.symbol,d=t.zero,p=t.width,g=t.comma,y=t.precision,v=t.trim,m=t.type;"n"===m?(g=!0,m="g"):vc[m]||(void 0===y&&(y=12),v=!0,m="g"),(d||"0"===e&&"="===n)&&(d=!0,e="0",n="=");var b="$"===h?i:"#"===h&&/[boxX]/.test(m)?"0"+m.toLowerCase():"",x="$"===h?a:/[%p]/.test(m)?c:"",_=vc[m],w=/[defgprs%]/.test(m);function k(t){var i,a,c,h=b,k=x;if("c"===m)k=_(t)+k,t="";else{var C=(t=+t)<0||1/t<0;if(t=isNaN(t)?l:_(Math.abs(t),y),v&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),C&&0==+t&&"+"!==f&&(C=!1),h=(C?"("===f?f:u:"-"===f||"("===f?"":f)+h,k=("s"===m?xc[8+hc/3]:"")+k+(C&&"("===f?")":""),w)for(i=-1,a=t.length;++i(c=t.charCodeAt(i))||c>57){k=(46===c?o+t.slice(i+1):t.slice(i))+k,t=t.slice(0,i);break}}g&&!d&&(t=r(t,1/0));var E=h.length+t.length+k.length,T=E>1)+h+t+k+T.slice(E);break;default:t=T+h+t+k}return s(t)}return y=void 0===y?6:/[gprs]/.test(m)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),k.toString=function(){return t+""},k}return{format:f,formatPrefix:function(t,e){var n=f(((t=lc(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(cc(e)/3))),i=Math.pow(10,-r),a=xc[8+r/3];return function(t){return n(i*t)+a}}}};function wc(t){return dc=_c(t),pc=dc.format,gc=dc.formatPrefix,dc}wc({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});var kc=function(t){return Math.max(0,-cc(Math.abs(t)))},Cc=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(cc(e)/3)))-cc(Math.abs(t)))},Ec=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,cc(e)-cc(t))+1},Tc=function(){return new Sc};function Sc(){this.reset()}Sc.prototype={constructor:Sc,reset:function(){this.s=this.t=0},add:function(t){Mc(Ac,t,this.t),Mc(this,Ac.s,this.s),this.s?this.t+=Ac.t:this.s=Ac.t},valueOf:function(){return this.s}};var Ac=new Sc;function Mc(t,e,n){var r=t.s=e+n,i=r-e,a=r-i;t.t=e-a+(n-i)}var Oc=1e-6,jc=1e-12,Dc=Math.PI,Nc=Dc/2,Bc=Dc/4,Lc=2*Dc,Fc=180/Dc,Pc=Dc/180,Ic=Math.abs,Rc=Math.atan,Yc=Math.atan2,zc=Math.cos,Uc=Math.ceil,Wc=Math.exp,$c=(Math.floor,Math.log),Vc=Math.pow,Hc=Math.sin,Gc=Math.sign||function(t){return t>0?1:t<0?-1:0},qc=Math.sqrt,Xc=Math.tan;function Zc(t){return t>1?0:t<-1?Dc:Math.acos(t)}function Jc(t){return t>1?Nc:t<-1?-Nc:Math.asin(t)}function Qc(t){return(t=Hc(t/2))*t}function Kc(){}function tu(t,e){t&&nu.hasOwnProperty(t.type)&&nu[t.type](t,e)}var eu={Feature:function(t,e){tu(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r=0?1:-1,i=r*n,a=zc(e=(e*=Pc)/2+Bc),o=Hc(e),s=uu*o,c=cu*a+s*zc(i),u=s*r*Hc(i);fu.add(Yc(u,c)),su=t,cu=a,uu=o}var mu=function(t){return hu.reset(),lu(t,du),2*hu};function bu(t){return[Yc(t[1],t[0]),Jc(t[2])]}function xu(t){var e=t[0],n=t[1],r=zc(n);return[r*zc(e),r*Hc(e),Hc(n)]}function _u(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function wu(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function ku(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function Cu(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function Eu(t){var e=qc(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var Tu,Su,Au,Mu,Ou,ju,Du,Nu,Bu,Lu,Fu=Tc(),Pu={point:Iu,lineStart:Yu,lineEnd:zu,polygonStart:function(){Pu.point=Uu,Pu.lineStart=Wu,Pu.lineEnd=$u,Fu.reset(),du.polygonStart()},polygonEnd:function(){du.polygonEnd(),Pu.point=Iu,Pu.lineStart=Yu,Pu.lineEnd=zu,fu<0?(Tu=-(Au=180),Su=-(Mu=90)):Fu>Oc?Mu=90:Fu<-1e-6&&(Su=-90),Lu[0]=Tu,Lu[1]=Au},sphere:function(){Tu=-(Au=180),Su=-(Mu=90)}};function Iu(t,e){Bu.push(Lu=[Tu=t,Au=t]),eMu&&(Mu=e)}function Ru(t,e){var n=xu([t*Pc,e*Pc]);if(Nu){var r=wu(Nu,n),i=wu([r[1],-r[0],0],r);Eu(i),i=bu(i);var a,o=t-Ou,s=o>0?1:-1,c=i[0]*Fc*s,u=Ic(o)>180;u^(s*OuMu&&(Mu=a):u^(s*Ou<(c=(c+360)%360-180)&&cMu&&(Mu=e)),u?tVu(Tu,Au)&&(Au=t):Vu(t,Au)>Vu(Tu,Au)&&(Tu=t):Au>=Tu?(tAu&&(Au=t)):t>Ou?Vu(Tu,t)>Vu(Tu,Au)&&(Au=t):Vu(t,Au)>Vu(Tu,Au)&&(Tu=t)}else Bu.push(Lu=[Tu=t,Au=t]);eMu&&(Mu=e),Nu=n,Ou=t}function Yu(){Pu.point=Ru}function zu(){Lu[0]=Tu,Lu[1]=Au,Pu.point=Iu,Nu=null}function Uu(t,e){if(Nu){var n=t-Ou;Fu.add(Ic(n)>180?n+(n>0?360:-360):n)}else ju=t,Du=e;du.point(t,e),Ru(t,e)}function Wu(){du.lineStart()}function $u(){Uu(ju,Du),du.lineEnd(),Ic(Fu)>Oc&&(Tu=-(Au=180)),Lu[0]=Tu,Lu[1]=Au,Nu=null}function Vu(t,e){return(e-=t)<0?e+360:e}function Hu(t,e){return t[0]-e[0]}function Gu(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:eVu(r[0],r[1])&&(r[1]=i[1]),Vu(i[0],r[1])>Vu(r[0],r[1])&&(r[0]=i[0])):a.push(r=i);for(o=-1/0,e=0,r=a[n=a.length-1];e<=n;r=i,++e)i=a[e],(s=Vu(r[1],i[0]))>o&&(o=s,Tu=i[0],Au=r[1])}return Bu=Lu=null,Tu===1/0||Su===1/0?[[NaN,NaN],[NaN,NaN]]:[[Tu,Su],[Au,Mu]]},fl={sphere:Kc,point:hl,lineStart:pl,lineEnd:vl,polygonStart:function(){fl.lineStart=ml,fl.lineEnd=bl},polygonEnd:function(){fl.lineStart=pl,fl.lineEnd=vl}};function hl(t,e){t*=Pc;var n=zc(e*=Pc);dl(n*zc(t),n*Hc(t),Hc(e))}function dl(t,e,n){++qu,Zu+=(t-Zu)/qu,Ju+=(e-Ju)/qu,Qu+=(n-Qu)/qu}function pl(){fl.point=gl}function gl(t,e){t*=Pc;var n=zc(e*=Pc);sl=n*zc(t),cl=n*Hc(t),ul=Hc(e),fl.point=yl,dl(sl,cl,ul)}function yl(t,e){t*=Pc;var n=zc(e*=Pc),r=n*zc(t),i=n*Hc(t),a=Hc(e),o=Yc(qc((o=cl*a-ul*i)*o+(o=ul*r-sl*a)*o+(o=sl*i-cl*r)*o),sl*r+cl*i+ul*a);Xu+=o,Ku+=o*(sl+(sl=r)),tl+=o*(cl+(cl=i)),el+=o*(ul+(ul=a)),dl(sl,cl,ul)}function vl(){fl.point=hl}function ml(){fl.point=xl}function bl(){_l(al,ol),fl.point=hl}function xl(t,e){al=t,ol=e,t*=Pc,e*=Pc,fl.point=_l;var n=zc(e);sl=n*zc(t),cl=n*Hc(t),ul=Hc(e),dl(sl,cl,ul)}function _l(t,e){t*=Pc;var n=zc(e*=Pc),r=n*zc(t),i=n*Hc(t),a=Hc(e),o=cl*a-ul*i,s=ul*r-sl*a,c=sl*i-cl*r,u=qc(o*o+s*s+c*c),l=Jc(u),f=u&&-l/u;nl+=f*o,rl+=f*s,il+=f*c,Xu+=l,Ku+=l*(sl+(sl=r)),tl+=l*(cl+(cl=i)),el+=l*(ul+(ul=a)),dl(sl,cl,ul)}var wl=function(t){qu=Xu=Zu=Ju=Qu=Ku=tl=el=nl=rl=il=0,lu(t,fl);var e=nl,n=rl,r=il,i=e*e+n*n+r*r;return iDc?t+Math.round(-t/Lc)*Lc:t,e]}function Tl(t,e,n){return(t%=Lc)?e||n?Cl(Al(t),Ml(e,n)):Al(t):e||n?Ml(e,n):El}function Sl(t){return function(e,n){return[(e+=t)>Dc?e-Lc:e<-Dc?e+Lc:e,n]}}function Al(t){var e=Sl(t);return e.invert=Sl(-t),e}function Ml(t,e){var n=zc(t),r=Hc(t),i=zc(e),a=Hc(e);function o(t,e){var o=zc(e),s=zc(t)*o,c=Hc(t)*o,u=Hc(e),l=u*n+s*r;return[Yc(c*i-l*a,s*n-u*r),Jc(l*i+c*a)]}return o.invert=function(t,e){var o=zc(e),s=zc(t)*o,c=Hc(t)*o,u=Hc(e),l=u*i-c*a;return[Yc(c*i+u*a,s*n+l*r),Jc(l*n-s*r)]},o}El.invert=El;var Ol=function(t){function e(e){return(e=t(e[0]*Pc,e[1]*Pc))[0]*=Fc,e[1]*=Fc,e}return t=Tl(t[0]*Pc,t[1]*Pc,t.length>2?t[2]*Pc:0),e.invert=function(e){return(e=t.invert(e[0]*Pc,e[1]*Pc))[0]*=Fc,e[1]*=Fc,e},e};function jl(t,e,n,r,i,a){if(n){var o=zc(e),s=Hc(e),c=r*n;null==i?(i=e+r*Lc,a=e-c/2):(i=Dl(o,i),a=Dl(o,a),(r>0?ia)&&(i+=r*Lc));for(var u,l=i;r>0?l>a:l1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}},Ll=function(t,e){return Ic(t[0]-e[0])=0;--a)i.point((l=u[a])[0],l[1]);else r(h.x,h.p.x,-1,i);h=h.p}u=(h=h.o).z,d=!d}while(!h.v);i.lineEnd()}}};function Il(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r=0?1:-1,E=C*k,T=E>Dc,S=g*_;if(Rl.add(Yc(S*C*Hc(E),y*w+S*zc(E))),o+=T?k+C*Lc:k,T^d>=n^b>=n){var A=wu(xu(h),xu(m));Eu(A);var M=wu(a,A);Eu(M);var O=(T^k>=0?-1:1)*Jc(M[2]);(r>O||r===O&&(A[0]||A[1]))&&(s+=T^k>=0?1:-1)}}return(o<-1e-6||o0){for(f||(i.polygonStart(),f=!0),i.lineStart(),t=0;t1&&2&c&&h.push(h.pop().concat(h.shift())),o.push(h.filter(Wl))}return h}};function Wl(t){return t.length>1}function $l(t,e){return((t=t.x)[0]<0?t[1]-Nc-Oc:Nc-t[1])-((e=e.x)[0]<0?e[1]-Nc-Oc:Nc-e[1])}var Vl=Ul((function(){return!0}),(function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(a,o){var s=a>0?Dc:-Dc,c=Ic(a-n);Ic(c-Dc)0?Nc:-Nc),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),t.point(a,r),e=0):i!==s&&c>=Dc&&(Ic(n-i)Oc?Rc((Hc(e)*(a=zc(r))*Hc(n)-Hc(r)*(i=zc(e))*Hc(t))/(i*a*o)):(e+r)/2}(n,r,a,o),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),e=0),t.point(n=a,r=o),i=s},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}}),(function(t,e,n,r){var i;if(null==t)i=n*Nc,r.point(-Dc,i),r.point(0,i),r.point(Dc,i),r.point(Dc,0),r.point(Dc,-i),r.point(0,-i),r.point(-Dc,-i),r.point(-Dc,0),r.point(-Dc,i);else if(Ic(t[0]-e[0])>Oc){var a=t[0]0,i=Ic(e)>Oc;function a(t,n){return zc(t)*zc(n)>e}function o(t,n,r){var i=[1,0,0],a=wu(xu(t),xu(n)),o=_u(a,a),s=a[0],c=o-s*s;if(!c)return!r&&t;var u=e*o/c,l=-e*s/c,f=wu(i,a),h=Cu(i,u);ku(h,Cu(a,l));var d=f,p=_u(h,d),g=_u(d,d),y=p*p-g*(_u(h,h)-1);if(!(y<0)){var v=qc(y),m=Cu(d,(-p-v)/g);if(ku(m,h),m=bu(m),!r)return m;var b,x=t[0],_=n[0],w=t[1],k=n[1];_0^m[1]<(Ic(m[0]-x)Dc^(x<=m[0]&&m[0]<=_)){var T=Cu(d,(-p+v)/g);return ku(T,h),[m,bu(T)]}}}function s(e,n){var i=r?t:Dc-t,a=0;return e<-i?a|=1:e>i&&(a|=2),n<-i?a|=4:n>i&&(a|=8),a}return Ul(a,(function(t){var e,n,c,u,l;return{lineStart:function(){u=c=!1,l=1},point:function(f,h){var d,p=[f,h],g=a(f,h),y=r?g?0:s(f,h):g?s(f+(f<0?Dc:-Dc),h):0;if(!e&&(u=c=g)&&t.lineStart(),g!==c&&(!(d=o(e,p))||Ll(e,d)||Ll(p,d))&&(p[2]=1),g!==c)l=0,g?(t.lineStart(),d=o(p,e),t.point(d[0],d[1])):(d=o(e,p),t.point(d[0],d[1],2),t.lineEnd()),e=d;else if(i&&e&&r^g){var v;y&n||!(v=o(p,e,!0))||(l=0,r?(t.lineStart(),t.point(v[0][0],v[0][1]),t.point(v[1][0],v[1][1]),t.lineEnd()):(t.point(v[1][0],v[1][1]),t.lineEnd(),t.lineStart(),t.point(v[0][0],v[0][1],3)))}!g||e&&Ll(e,p)||t.point(p[0],p[1]),e=p,c=g,n=y},lineEnd:function(){c&&t.lineEnd(),e=null},clean:function(){return l|(u&&c)<<1}}}),(function(e,r,i,a){jl(a,t,n,i,e,r)}),r?[0,-t]:[-Dc,t-Dc])},Gl=1e9,ql=-Gl;function Xl(t,e,n,r){function i(i,a){return t<=i&&i<=n&&e<=a&&a<=r}function a(i,a,s,u){var l=0,f=0;if(null==i||(l=o(i,s))!==(f=o(a,s))||c(i,a)<0^s>0)do{u.point(0===l||3===l?t:n,l>1?r:e)}while((l=(l+s+4)%4)!==f);else u.point(a[0],a[1])}function o(r,i){return Ic(r[0]-t)0?0:3:Ic(r[0]-n)0?2:1:Ic(r[1]-e)0?1:0:i>0?3:2}function s(t,e){return c(t.x,e.x)}function c(t,e){var n=o(t,1),r=o(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(o){var c,u,l,f,h,d,p,g,y,v,m,b=o,x=Bl(),_={point:w,lineStart:function(){_.point=k,u&&u.push(l=[]);v=!0,y=!1,p=g=NaN},lineEnd:function(){c&&(k(f,h),d&&y&&x.rejoin(),c.push(x.result()));_.point=w,y&&b.lineEnd()},polygonStart:function(){b=x,c=[],u=[],m=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,i=u.length;nr&&(h-a)*(r-o)>(d-o)*(t-a)&&++e:d<=r&&(h-a)*(r-o)<(d-o)*(t-a)&&--e;return e}(),n=m&&e,i=(c=I(c)).length;(n||i)&&(o.polygonStart(),n&&(o.lineStart(),a(null,null,1,o),o.lineEnd()),i&&Pl(c,s,e,a,o),o.polygonEnd());b=o,c=u=l=null}};function w(t,e){i(t,e)&&b.point(t,e)}function k(a,o){var s=i(a,o);if(u&&l.push([a,o]),v)f=a,h=o,d=s,v=!1,s&&(b.lineStart(),b.point(a,o));else if(s&&y)b.point(a,o);else{var c=[p=Math.max(ql,Math.min(Gl,p)),g=Math.max(ql,Math.min(Gl,g))],x=[a=Math.max(ql,Math.min(Gl,a)),o=Math.max(ql,Math.min(Gl,o))];!function(t,e,n,r,i,a){var o,s=t[0],c=t[1],u=0,l=1,f=e[0]-s,h=e[1]-c;if(o=n-s,f||!(o>0)){if(o/=f,f<0){if(o0){if(o>l)return;o>u&&(u=o)}if(o=i-s,f||!(o<0)){if(o/=f,f<0){if(o>l)return;o>u&&(u=o)}else if(f>0){if(o0)){if(o/=h,h<0){if(o0){if(o>l)return;o>u&&(u=o)}if(o=a-c,h||!(o<0)){if(o/=h,h<0){if(o>l)return;o>u&&(u=o)}else if(h>0){if(o0&&(t[0]=s+u*f,t[1]=c+u*h),l<1&&(e[0]=s+l*f,e[1]=c+l*h),!0}}}}}(c,x,t,e,n,r)?s&&(b.lineStart(),b.point(a,o),m=!1):(y||(b.lineStart(),b.point(c[0],c[1])),b.point(x[0],x[1]),s||b.lineEnd(),m=!1)}p=a,g=o,y=s}return _}}var Zl,Jl,Ql,Kl=function(){var t,e,n,r=0,i=0,a=960,o=500;return n={stream:function(n){return t&&e===n?t:t=Xl(r,i,a,o)(e=n)},extent:function(s){return arguments.length?(r=+s[0][0],i=+s[0][1],a=+s[1][0],o=+s[1][1],t=e=null,n):[[r,i],[a,o]]}}},tf=Tc(),ef={sphere:Kc,point:Kc,lineStart:function(){ef.point=rf,ef.lineEnd=nf},lineEnd:Kc,polygonStart:Kc,polygonEnd:Kc};function nf(){ef.point=ef.lineEnd=Kc}function rf(t,e){Zl=t*=Pc,Jl=Hc(e*=Pc),Ql=zc(e),ef.point=af}function af(t,e){t*=Pc;var n=Hc(e*=Pc),r=zc(e),i=Ic(t-Zl),a=zc(i),o=r*Hc(i),s=Ql*n-Jl*r*a,c=Jl*n+Ql*r*a;tf.add(Yc(qc(o*o+s*s),c)),Zl=t,Jl=n,Ql=r}var of=function(t){return tf.reset(),lu(t,ef),+tf},sf=[null,null],cf={type:"LineString",coordinates:sf},uf=function(t,e){return sf[0]=t,sf[1]=e,of(cf)},lf={Feature:function(t,e){return hf(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r0&&(i=uf(t[a],t[a-1]))>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))Oc})).map(c)).concat(k(Uc(a/d)*d,i,d).filter((function(t){return Ic(t%g)>Oc})).map(u))}return v.lines=function(){return m().map((function(t){return{type:"LineString",coordinates:t}}))},v.outline=function(){return{type:"Polygon",coordinates:[l(r).concat(f(o).slice(1),l(n).reverse().slice(1),f(s).reverse().slice(1))]}},v.extent=function(t){return arguments.length?v.extentMajor(t).extentMinor(t):v.extentMinor()},v.extentMajor=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],s=+t[0][1],o=+t[1][1],r>n&&(t=r,r=n,n=t),s>o&&(t=s,s=o,o=t),v.precision(y)):[[r,s],[n,o]]},v.extentMinor=function(n){return arguments.length?(e=+n[0][0],t=+n[1][0],a=+n[0][1],i=+n[1][1],e>t&&(n=e,e=t,t=n),a>i&&(n=a,a=i,i=n),v.precision(y)):[[e,a],[t,i]]},v.step=function(t){return arguments.length?v.stepMajor(t).stepMinor(t):v.stepMinor()},v.stepMajor=function(t){return arguments.length?(p=+t[0],g=+t[1],v):[p,g]},v.stepMinor=function(t){return arguments.length?(h=+t[0],d=+t[1],v):[h,d]},v.precision=function(h){return arguments.length?(y=+h,c=bf(a,i,90),u=xf(e,t,y),l=bf(s,o,90),f=xf(r,n,y),v):y},v.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])}function wf(){return _f()()}var kf,Cf,Ef,Tf,Sf=function(t,e){var n=t[0]*Pc,r=t[1]*Pc,i=e[0]*Pc,a=e[1]*Pc,o=zc(r),s=Hc(r),c=zc(a),u=Hc(a),l=o*zc(n),f=o*Hc(n),h=c*zc(i),d=c*Hc(i),p=2*Jc(qc(Qc(a-r)+o*c*Qc(i-n))),g=Hc(p),y=p?function(t){var e=Hc(t*=p)/g,n=Hc(p-t)/g,r=n*l+e*h,i=n*f+e*d,a=n*s+e*u;return[Yc(i,r)*Fc,Yc(a,qc(r*r+i*i))*Fc]}:function(){return[n*Fc,r*Fc]};return y.distance=p,y},Af=function(t){return t},Mf=Tc(),Of=Tc(),jf={point:Kc,lineStart:Kc,lineEnd:Kc,polygonStart:function(){jf.lineStart=Df,jf.lineEnd=Lf},polygonEnd:function(){jf.lineStart=jf.lineEnd=jf.point=Kc,Mf.add(Ic(Of)),Of.reset()},result:function(){var t=Mf/2;return Mf.reset(),t}};function Df(){jf.point=Nf}function Nf(t,e){jf.point=Bf,kf=Ef=t,Cf=Tf=e}function Bf(t,e){Of.add(Tf*t-Ef*e),Ef=t,Tf=e}function Lf(){Bf(kf,Cf)}var Ff=jf,Pf=1/0,If=Pf,Rf=-Pf,Yf=Rf;var zf,Uf,Wf,$f,Vf={point:function(t,e){tRf&&(Rf=t);eYf&&(Yf=e)},lineStart:Kc,lineEnd:Kc,polygonStart:Kc,polygonEnd:Kc,result:function(){var t=[[Pf,If],[Rf,Yf]];return Rf=Yf=-(If=Pf=1/0),t}},Hf=0,Gf=0,qf=0,Xf=0,Zf=0,Jf=0,Qf=0,Kf=0,th=0,eh={point:nh,lineStart:rh,lineEnd:oh,polygonStart:function(){eh.lineStart=sh,eh.lineEnd=ch},polygonEnd:function(){eh.point=nh,eh.lineStart=rh,eh.lineEnd=oh},result:function(){var t=th?[Qf/th,Kf/th]:Jf?[Xf/Jf,Zf/Jf]:qf?[Hf/qf,Gf/qf]:[NaN,NaN];return Hf=Gf=qf=Xf=Zf=Jf=Qf=Kf=th=0,t}};function nh(t,e){Hf+=t,Gf+=e,++qf}function rh(){eh.point=ih}function ih(t,e){eh.point=ah,nh(Wf=t,$f=e)}function ah(t,e){var n=t-Wf,r=e-$f,i=qc(n*n+r*r);Xf+=i*(Wf+t)/2,Zf+=i*($f+e)/2,Jf+=i,nh(Wf=t,$f=e)}function oh(){eh.point=nh}function sh(){eh.point=uh}function ch(){lh(zf,Uf)}function uh(t,e){eh.point=lh,nh(zf=Wf=t,Uf=$f=e)}function lh(t,e){var n=t-Wf,r=e-$f,i=qc(n*n+r*r);Xf+=i*(Wf+t)/2,Zf+=i*($f+e)/2,Jf+=i,Qf+=(i=$f*t-Wf*e)*(Wf+t),Kf+=i*($f+e),th+=3*i,nh(Wf=t,$f=e)}var fh=eh;function hh(t){this._context=t}hh.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,Lc)}},result:Kc};var dh,ph,gh,yh,vh,mh=Tc(),bh={point:Kc,lineStart:function(){bh.point=xh},lineEnd:function(){dh&&_h(ph,gh),bh.point=Kc},polygonStart:function(){dh=!0},polygonEnd:function(){dh=null},result:function(){var t=+mh;return mh.reset(),t}};function xh(t,e){bh.point=_h,ph=yh=t,gh=vh=e}function _h(t,e){yh-=t,vh-=e,mh.add(qc(yh*yh+vh*vh)),yh=t,vh=e}var wh=bh;function kh(){this._string=[]}function Ch(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}kh.prototype={_radius:4.5,_circle:Ch(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=Ch(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}};var Eh=function(t,e){var n,r,i=4.5;function a(t){return t&&("function"==typeof i&&r.pointRadius(+i.apply(this,arguments)),lu(t,n(r))),r.result()}return a.area=function(t){return lu(t,n(Ff)),Ff.result()},a.measure=function(t){return lu(t,n(wh)),wh.result()},a.bounds=function(t){return lu(t,n(Vf)),Vf.result()},a.centroid=function(t){return lu(t,n(fh)),fh.result()},a.projection=function(e){return arguments.length?(n=null==e?(t=null,Af):(t=e).stream,a):t},a.context=function(t){return arguments.length?(r=null==t?(e=null,new kh):new hh(e=t),"function"!=typeof i&&r.pointRadius(i),a):e},a.pointRadius=function(t){return arguments.length?(i="function"==typeof t?t:(r.pointRadius(+t),+t),a):i},a.projection(t).context(e)},Th=function(t){return{stream:Sh(t)}};function Sh(t){return function(e){var n=new Ah;for(var r in t)n[r]=t[r];return n.stream=e,n}}function Ah(){}function Mh(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),lu(n,t.stream(Vf)),e(Vf.result()),null!=r&&t.clipExtent(r),t}function Oh(t,e,n){return Mh(t,(function(n){var r=e[1][0]-e[0][0],i=e[1][1]-e[0][1],a=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),o=+e[0][0]+(r-a*(n[1][0]+n[0][0]))/2,s=+e[0][1]+(i-a*(n[1][1]+n[0][1]))/2;t.scale(150*a).translate([o,s])}),n)}function jh(t,e,n){return Oh(t,[[0,0],e],n)}function Dh(t,e,n){return Mh(t,(function(n){var r=+e,i=r/(n[1][0]-n[0][0]),a=(r-i*(n[1][0]+n[0][0]))/2,o=-i*n[0][1];t.scale(150*i).translate([a,o])}),n)}function Nh(t,e,n){return Mh(t,(function(n){var r=+e,i=r/(n[1][1]-n[0][1]),a=-i*n[0][0],o=(r-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([a,o])}),n)}Ah.prototype={constructor:Ah,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var Bh=zc(30*Pc),Lh=function(t,e){return+e?function(t,e){function n(r,i,a,o,s,c,u,l,f,h,d,p,g,y){var v=u-r,m=l-i,b=v*v+m*m;if(b>4*e&&g--){var x=o+h,_=s+d,w=c+p,k=qc(x*x+_*_+w*w),C=Jc(w/=k),E=Ic(Ic(w)-1)e||Ic((v*M+m*O)/b-.5)>.3||o*h+s*d+c*p2?t[2]%360*Pc:0,M()):[y*Fc,v*Fc,m*Fc]},S.angle=function(t){return arguments.length?(b=t%360*Pc,M()):b*Fc},S.reflectX=function(t){return arguments.length?(x=t?-1:1,M()):x<0},S.reflectY=function(t){return arguments.length?(_=t?-1:1,M()):_<0},S.precision=function(t){return arguments.length?(o=Lh(s,T=t*t),O()):qc(T)},S.fitExtent=function(t,e){return Oh(S,t,e)},S.fitSize=function(t,e){return jh(S,t,e)},S.fitWidth=function(t,e){return Dh(S,t,e)},S.fitHeight=function(t,e){return Nh(S,t,e)},function(){return e=t.apply(this,arguments),S.invert=e.invert&&A,M()}}function zh(t){var e=0,n=Dc/3,r=Yh(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*Pc,n=t[1]*Pc):[e*Fc,n*Fc]},i}function Uh(t,e){var n=Hc(t),r=(n+Hc(e))/2;if(Ic(r)=.12&&i<.234&&r>=-.425&&r<-.214?s:i>=.166&&i<.234&&r>=-.214&&r<-.115?c:o).invert(t)},l.stream=function(n){return t&&e===n?t:(r=[o.stream(e=n),s.stream(n),c.stream(n)],i=r.length,t={point:function(t,e){for(var n=-1;++n0?e<-Nc+Oc&&(e=-Nc+Oc):e>Nc-Oc&&(e=Nc-Oc);var n=i/Vc(ed(e),r);return[n*Hc(r*t),i-n*zc(r*t)]}return a.invert=function(t,e){var n=i-e,a=Gc(r)*qc(t*t+n*n),o=Yc(t,Ic(n))*Gc(n);return n*r<0&&(o-=Dc*Gc(t)*Gc(n)),[o/r,2*Rc(Vc(i/a,1/r))-Nc]},a}var rd=function(){return zh(nd).scale(109.5).parallels([30,30])};function id(t,e){return[t,e]}id.invert=id;var ad=function(){return Rh(id).scale(152.63)};function od(t,e){var n=zc(t),r=t===e?Hc(t):(n-zc(e))/(e-t),i=n/r+t;if(Ic(r)Oc&&--i>0);return[t/(.8707+(a=r*r)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),r]};var bd=function(){return Rh(md).scale(175.295)};function xd(t,e){return[zc(e)*Hc(t),Hc(e)]}xd.invert=Gh(Jc);var _d=function(){return Rh(xd).scale(249.5).clipAngle(90.000001)};function wd(t,e){var n=zc(e),r=1+zc(t)*n;return[n*Hc(t)/r,Hc(e)/r]}wd.invert=Gh((function(t){return 2*Rc(t)}));var kd=function(){return Rh(wd).scale(250).clipAngle(142)};function Cd(t,e){return[$c(Xc((Nc+e)/2)),-t]}Cd.invert=function(t,e){return[-e,2*Rc(Wc(t))-Nc]};var Ed=function(){var t=td(Cd),e=t.center,n=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?n([t[0],t[1],t.length>2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)};function Td(t,e){return t.parent===e.parent?1:2}function Sd(t,e){return t+e.x}function Ad(t,e){return Math.max(t,e.y)}var Md=function(){var t=Td,e=1,n=1,r=!1;function i(i){var a,o=0;i.eachAfter((function(e){var n=e.children;n?(e.x=function(t){return t.reduce(Sd,0)/t.length}(n),e.y=function(t){return 1+t.reduce(Ad,0)}(n)):(e.x=a?o+=t(e,a):0,e.y=0,a=e)}));var s=function(t){for(var e;e=t.children;)t=e[0];return t}(i),c=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(i),u=s.x-t(s,c)/2,l=c.x+t(c,s)/2;return i.eachAfter(r?function(t){t.x=(t.x-i.x)*e,t.y=(i.y-t.y)*n}:function(t){t.x=(t.x-u)/(l-u)*e,t.y=(1-(i.y?t.y/i.y:1))*n})}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i};function Od(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e}function jd(t,e){var n,r,i,a,o,s=new Ld(t),c=+t.value&&(s.value=t.value),u=[s];for(null==e&&(e=Dd);n=u.pop();)if(c&&(n.value=+n.data.value),(i=e(n.data))&&(o=i.length))for(n.children=new Array(o),a=o-1;a>=0;--a)u.push(r=n.children[a]=new Ld(i[a])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(Bd)}function Dd(t){return t.children}function Nd(t){t.data=t.data.data}function Bd(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function Ld(t){this.data=t,this.depth=this.height=0,this.parent=null}Ld.prototype=jd.prototype={constructor:Ld,count:function(){return this.eachAfter(Od)},each:function(t){var e,n,r,i,a=this,o=[a];do{for(e=o.reverse(),o=[];a=e.pop();)if(t(a),n=a.children)for(r=0,i=n.length;r=0;--n)i.push(e[n]);return this},sum:function(t){return this.eachAfter((function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;t=n.pop(),e=r.pop();for(;t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){var t=[];return this.each((function(e){t.push(e)})),t},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(n){n!==t&&e.push({source:n.parent,target:n})})),e},copy:function(){return jd(this).eachBefore(Nd)}};var Fd=Array.prototype.slice;var Pd=function(t){for(var e,n,r=0,i=(t=function(t){for(var e,n,r=t.length;r;)n=Math.random()*r--|0,e=t[r],t[r]=t[n],t[n]=e;return t}(Fd.call(t))).length,a=[];r0&&n*n>r*r+i*i}function zd(t,e){for(var n=0;n(o*=o)?(r=(u+o-i)/(2*u),a=Math.sqrt(Math.max(0,o/u-r*r)),n.x=t.x-r*s-a*c,n.y=t.y-r*c+a*s):(r=(u+i-o)/(2*u),a=Math.sqrt(Math.max(0,i/u-r*r)),n.x=e.x+r*s-a*c,n.y=e.y+r*c+a*s)):(n.x=e.x+n.r,n.y=e.y)}function Hd(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function Gd(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,a=(e.y*n.r+n.y*e.r)/r;return i*i+a*a}function qd(t){this._=t,this.next=null,this.previous=null}function Xd(t){if(!(i=t.length))return 0;var e,n,r,i,a,o,s,c,u,l,f;if((e=t[0]).x=0,e.y=0,!(i>1))return e.r;if(n=t[1],e.x=-n.r,n.x=e.r,n.y=0,!(i>2))return e.r+n.r;Vd(n,e,r=t[2]),e=new qd(e),n=new qd(n),r=new qd(r),e.next=r.previous=n,n.next=e.previous=r,r.next=n.previous=e;t:for(s=3;s0)throw new Error("cycle");return a}return n.id=function(e){return arguments.length?(t=Qd(e),n):t},n.parentId=function(t){return arguments.length?(e=Qd(t),n):e},n};function pp(t,e){return t.parent===e.parent?1:2}function gp(t){var e=t.children;return e?e[0]:t.t}function yp(t){var e=t.children;return e?e[e.length-1]:t.t}function vp(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function mp(t,e,n){return t.a.parent===e.parent?t.a:n}function bp(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}bp.prototype=Object.create(Ld.prototype);var xp=function(){var t=pp,e=1,n=1,r=null;function i(i){var c=function(t){for(var e,n,r,i,a,o=new bp(t,0),s=[o];e=s.pop();)if(r=e._.children)for(e.children=new Array(a=r.length),i=a-1;i>=0;--i)s.push(n=e.children[i]=new bp(r[i],i)),n.parent=e;return(o.parent=new bp(null,0)).children=[o],o}(i);if(c.eachAfter(a),c.parent.m=-c.z,c.eachBefore(o),r)i.eachBefore(s);else{var u=i,l=i,f=i;i.eachBefore((function(t){t.xl.x&&(l=t),t.depth>f.depth&&(f=t)}));var h=u===l?1:t(u,l)/2,d=h-u.x,p=e/(l.x+h+d),g=n/(f.depth||1);i.eachBefore((function(t){t.x=(t.x+d)*p,t.y=t.depth*g}))}return i}function a(e){var n=e.children,r=e.parent.children,i=e.i?r[e.i-1]:null;if(n){!function(t){for(var e,n=0,r=0,i=t.children,a=i.length;--a>=0;)(e=i[a]).z+=n,e.m+=n,n+=e.s+(r+=e.c)}(e);var a=(n[0].z+n[n.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-a):e.z=a}else i&&(e.z=i.z+t(e._,i._));e.parent.A=function(e,n,r){if(n){for(var i,a=e,o=e,s=n,c=a.parent.children[0],u=a.m,l=o.m,f=s.m,h=c.m;s=yp(s),a=gp(a),s&&a;)c=gp(c),(o=yp(o)).a=e,(i=s.z+f-a.z-u+t(s._,a._))>0&&(vp(mp(s,e,r),e,i),u+=i,l+=i),f+=s.m,u+=a.m,h+=c.m,l+=o.m;s&&!yp(o)&&(o.t=s,o.m+=f-l),a&&!gp(c)&&(c.t=a,c.m+=u-h,r=e)}return r}(e,i,e.parent.A||r[0])}function o(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function s(t){t.x*=e,t.y=t.depth*n}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i},_p=function(t,e,n,r,i){for(var a,o=t.children,s=-1,c=o.length,u=t.value&&(i-n)/t.value;++sh&&(h=s),y=l*l*g,(d=Math.max(h/y,y/f))>p){l-=s;break}p=d}v.push(o={value:l,dice:c1?e:1)},n}(wp),Ep=function(){var t=Cp,e=!1,n=1,r=1,i=[0],a=Kd,o=Kd,s=Kd,c=Kd,u=Kd;function l(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(f),i=[0],e&&t.eachBefore(op),t}function f(e){var n=i[e.depth],r=e.x0+n,l=e.y0+n,f=e.x1-n,h=e.y1-n;f=n-1){var l=s[e];return l.x0=i,l.y0=a,l.x1=o,void(l.y1=c)}var f=u[e],h=r/2+f,d=e+1,p=n-1;for(;d>>1;u[g]c-a){var m=(i*v+o*y)/r;t(e,d,y,i,a,m,c),t(d,n,v,m,a,o,c)}else{var b=(a*v+c*y)/r;t(e,d,y,i,a,o,b),t(d,n,v,i,b,o,c)}}(0,c,t.value,e,n,r,i)},Sp=function(t,e,n,r,i){(1&t.depth?_p:sp)(t,e,n,r,i)},Ap=function t(e){function n(t,n,r,i,a){if((o=t._squarify)&&o.ratio===e)for(var o,s,c,u,l,f=-1,h=o.length,d=t.value;++f1?e:1)},n}(wp),Mp=function(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}},Op=function(t,e){var n=dn(+t,+e);return function(t){var e=n(t);return e-360*Math.floor(e/360)}},jp=function(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}},Dp=Math.SQRT2;function Np(t){return((t=Math.exp(t))+1/t)/2}var Bp=function(t,e){var n,r,i=t[0],a=t[1],o=t[2],s=e[0],c=e[1],u=e[2],l=s-i,f=c-a,h=l*l+f*f;if(h<1e-12)r=Math.log(u/o)/Dp,n=function(t){return[i+t*l,a+t*f,o*Math.exp(Dp*t*r)]};else{var d=Math.sqrt(h),p=(u*u-o*o+4*h)/(2*o*2*d),g=(u*u-o*o-4*h)/(2*u*2*d),y=Math.log(Math.sqrt(p*p+1)-p),v=Math.log(Math.sqrt(g*g+1)-g);r=(v-y)/Dp,n=function(t){var e,n=t*r,s=Np(y),c=o/(2*d)*(s*(e=Dp*n+y,((e=Math.exp(2*e))-1)/(e+1))-function(t){return((t=Math.exp(t))-1/t)/2}(y));return[i+c*l,a+c*f,o*s/Np(Dp*n+y)]}}return n.duration=1e3*r,n};function Lp(t){return function(e,n){var r=t((e=an(e)).h,(n=an(n)).h),i=gn(e.s,n.s),a=gn(e.l,n.l),o=gn(e.opacity,n.opacity);return function(t){return e.h=r(t),e.s=i(t),e.l=a(t),e.opacity=o(t),e+""}}}var Fp=Lp(dn),Pp=Lp(gn);function Ip(t,e){var n=gn((t=Ea(t)).l,(e=Ea(e)).l),r=gn(t.a,e.a),i=gn(t.b,e.b),a=gn(t.opacity,e.opacity);return function(e){return t.l=n(e),t.a=r(e),t.b=i(e),t.opacity=a(e),t+""}}function Rp(t){return function(e,n){var r=t((e=Na(e)).h,(n=Na(n)).h),i=gn(e.c,n.c),a=gn(e.l,n.l),o=gn(e.opacity,n.opacity);return function(t){return e.h=r(t),e.c=i(t),e.l=a(t),e.opacity=o(t),e+""}}}var Yp=Rp(dn),zp=Rp(gn);function Up(t){return function e(n){function r(e,r){var i=t((e=Va(e)).h,(r=Va(r)).h),a=gn(e.s,r.s),o=gn(e.l,r.l),s=gn(e.opacity,r.opacity);return function(t){return e.h=i(t),e.s=a(t),e.l=o(Math.pow(t,n)),e.opacity=s(t),e+""}}return n=+n,r.gamma=e,r}(1)}var Wp=Up(dn),$p=Up(gn);function Vp(t,e){for(var n=0,r=e.length-1,i=e[0],a=new Array(r<0?0:r);n1&&(e=t[a[o-2]],n=t[a[o-1]],r=t[s],(n[0]-e[0])*(r[1]-e[1])-(n[1]-e[1])*(r[0]-e[0])<=0);)--o;a[o++]=s}return a.slice(0,o)}var Jp=function(t){if((n=t.length)<3)return null;var e,n,r=new Array(n),i=new Array(n);for(e=0;e=0;--e)u.push(t[r[a[e]][2]]);for(e=+s;es!=u>s&&o<(c-n)*(s-r)/(u-r)+n&&(l=!l),c=n,u=r;return l},Kp=function(t){for(var e,n,r=-1,i=t.length,a=t[i-1],o=a[0],s=a[1],c=0;++r1);return t+n*a*Math.sqrt(-2*Math.log(i)/i)}}return n.source=t,n}(tg),rg=function t(e){function n(){var t=ng.source(e).apply(this,arguments);return function(){return Math.exp(t())}}return n.source=t,n}(tg),ig=function t(e){function n(t){return function(){for(var n=0,r=0;rr&&(e=n,n=r,r=e),function(t){return Math.max(n,Math.min(r,t))}}function wg(t,e,n){var r=t[0],i=t[1],a=e[0],o=e[1];return i2?kg:wg,i=a=null,f}function f(e){return isNaN(e=+e)?n:(i||(i=r(o.map(t),s,c)))(t(u(e)))}return f.invert=function(n){return u(e((a||(a=r(s,o.map(t),En)))(n)))},f.domain=function(t){return arguments.length?(o=lg.call(t,vg),u===bg||(u=_g(o)),l()):o.slice()},f.range=function(t){return arguments.length?(s=fg.call(t),l()):s.slice()},f.rangeRound=function(t){return s=fg.call(t),c=jp,l()},f.clamp=function(t){return arguments.length?(u=t?_g(o):bg,f):u!==bg},f.interpolate=function(t){return arguments.length?(c=t,l()):c},f.unknown=function(t){return arguments.length?(n=t,f):n},function(n,r){return t=n,e=r,l()}}function Tg(t,e){return Eg()(t,e)}var Sg=function(t,e,n,r){var i,a=M(t,e,n);switch((r=lc(null==r?",f":r)).type){case"s":var o=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=Cc(a,o))||(r.precision=i),gc(r,o);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=Ec(a,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=kc(a))||(r.precision=i-2*("%"===r.type))}return pc(r)};function Ag(t){var e=t.domain;return t.ticks=function(t){var n=e();return S(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return Sg(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i=e(),a=0,o=i.length-1,s=i[a],c=i[o];return c0?r=A(s=Math.floor(s/r)*r,c=Math.ceil(c/r)*r,n):r<0&&(r=A(s=Math.ceil(s*r)/r,c=Math.floor(c*r)/r,n)),r>0?(i[a]=Math.floor(s/r)*r,i[o]=Math.ceil(c/r)*r,e(i)):r<0&&(i[a]=Math.ceil(s*r)/r,i[o]=Math.floor(c*r)/r,e(i)),t},t}function Mg(){var t=Tg(bg,bg);return t.copy=function(){return Cg(t,Mg())},sg.apply(t,arguments),Ag(t)}function Og(t){var e;function n(t){return isNaN(t=+t)?e:t}return n.invert=n,n.domain=n.range=function(e){return arguments.length?(t=lg.call(e,vg),n):t.slice()},n.unknown=function(t){return arguments.length?(e=t,n):e},n.copy=function(){return Og(t).unknown(e)},t=arguments.length?lg.call(t,vg):[0,1],Ag(n)}var jg=function(t,e){var n,r=0,i=(t=t.slice()).length-1,a=t[r],o=t[i];return o0){for(;hc)break;g.push(f)}}else for(;h=1;--l)if(!((f=u*l)c)break;g.push(f)}}else g=S(h,d,Math.min(d-h,p)).map(n);return r?g.reverse():g},r.tickFormat=function(t,i){if(null==i&&(i=10===a?".0e":","),"function"!=typeof i&&(i=pc(i)),t===1/0)return i;null==t&&(t=10);var o=Math.max(1,a*t/r.ticks().length);return function(t){var r=t/n(Math.round(e(t)));return r*a0?r[i-1]:e[0],i=r?[i[r-1],n]:[i[o-1],i[o]]},o.unknown=function(e){return arguments.length?(t=e,o):o},o.thresholds=function(){return i.slice()},o.copy=function(){return Jg().domain([e,n]).range(a).unknown(t)},sg.apply(Ag(o),arguments)}function Qg(){var t,e=[.5],n=[0,1],r=1;function i(i){return i<=i?n[u(e,i,0,r)]:t}return i.domain=function(t){return arguments.length?(e=fg.call(t),r=Math.min(e.length,n.length-1),i):e.slice()},i.range=function(t){return arguments.length?(n=fg.call(t),r=Math.min(e.length,n.length-1),i):n.slice()},i.invertExtent=function(t){var r=n.indexOf(t);return[e[r-1],e[r]]},i.unknown=function(e){return arguments.length?(t=e,i):t},i.copy=function(){return Qg().domain(e).range(n).unknown(t)},sg.apply(i,arguments)}var Kg=new Date,ty=new Date;function ey(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=function(e){return t(e=new Date(+e)),e},i.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},i.round=function(t){var e=i(t),n=i.ceil(t);return t-e0))return s;do{s.push(o=new Date(+n)),e(n,a),t(n)}while(o=e)for(;t(e),!n(e);)e.setTime(e-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););}))},n&&(i.count=function(e,r){return Kg.setTime(+e),ty.setTime(+r),t(Kg),t(ty),Math.floor(n(Kg,ty))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(e){return r(e)%t==0}:function(e){return i.count(0,e)%t==0}):i:null}),i}var ny=ey((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));ny.every=function(t){return isFinite(t=Math.floor(t))&&t>0?ey((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,n){e.setFullYear(e.getFullYear()+n*t)})):null};var ry=ny,iy=ny.range,ay=ey((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()})),oy=ay,sy=ay.range,cy=1e3,uy=6e4,ly=36e5,fy=864e5,hy=6048e5;function dy(t){return ey((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*uy)/hy}))}var py=dy(0),gy=dy(1),yy=dy(2),vy=dy(3),my=dy(4),by=dy(5),xy=dy(6),_y=py.range,wy=gy.range,ky=yy.range,Cy=vy.range,Ey=my.range,Ty=by.range,Sy=xy.range,Ay=ey((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*uy)/fy}),(function(t){return t.getDate()-1})),My=Ay,Oy=Ay.range,jy=ey((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*cy-t.getMinutes()*uy)}),(function(t,e){t.setTime(+t+e*ly)}),(function(t,e){return(e-t)/ly}),(function(t){return t.getHours()})),Dy=jy,Ny=jy.range,By=ey((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*cy)}),(function(t,e){t.setTime(+t+e*uy)}),(function(t,e){return(e-t)/uy}),(function(t){return t.getMinutes()})),Ly=By,Fy=By.range,Py=ey((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,e){t.setTime(+t+e*cy)}),(function(t,e){return(e-t)/cy}),(function(t){return t.getUTCSeconds()})),Iy=Py,Ry=Py.range,Yy=ey((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));Yy.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?ey((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):Yy:null};var zy=Yy,Uy=Yy.range;function Wy(t){return ey((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/hy}))}var $y=Wy(0),Vy=Wy(1),Hy=Wy(2),Gy=Wy(3),qy=Wy(4),Xy=Wy(5),Zy=Wy(6),Jy=$y.range,Qy=Vy.range,Ky=Hy.range,tv=Gy.range,ev=qy.range,nv=Xy.range,rv=Zy.range,iv=ey((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/fy}),(function(t){return t.getUTCDate()-1})),av=iv,ov=iv.range,sv=ey((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));sv.every=function(t){return isFinite(t=Math.floor(t))&&t>0?ey((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null};var cv=sv,uv=sv.range;function lv(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function fv(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function hv(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function dv(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,a=t.days,o=t.shortDays,s=t.months,c=t.shortMonths,u=Ev(i),l=Tv(i),f=Ev(a),h=Tv(a),d=Ev(o),p=Tv(o),g=Ev(s),y=Tv(s),v=Ev(c),m=Tv(c),b={a:function(t){return o[t.getDay()]},A:function(t){return a[t.getDay()]},b:function(t){return c[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:Gv,e:Gv,f:Qv,g:um,G:fm,H:qv,I:Xv,j:Zv,L:Jv,m:Kv,M:tm,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Bm,s:Lm,S:em,u:nm,U:rm,V:am,w:om,W:sm,x:null,X:null,y:cm,Y:lm,Z:hm,"%":Nm},x={a:function(t){return o[t.getUTCDay()]},A:function(t){return a[t.getUTCDay()]},b:function(t){return c[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:dm,e:dm,f:mm,g:Mm,G:jm,H:pm,I:gm,j:ym,L:vm,m:bm,M:xm,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Bm,s:Lm,S:_m,u:wm,U:km,V:Em,w:Tm,W:Sm,x:null,X:null,y:Am,Y:Om,Z:Dm,"%":Nm},_={a:function(t,e,n){var r=d.exec(e.slice(n));return r?(t.w=p[r[0].toLowerCase()],n+r[0].length):-1},A:function(t,e,n){var r=f.exec(e.slice(n));return r?(t.w=h[r[0].toLowerCase()],n+r[0].length):-1},b:function(t,e,n){var r=v.exec(e.slice(n));return r?(t.m=m[r[0].toLowerCase()],n+r[0].length):-1},B:function(t,e,n){var r=g.exec(e.slice(n));return r?(t.m=y[r[0].toLowerCase()],n+r[0].length):-1},c:function(t,n,r){return C(t,e,n,r)},d:Pv,e:Pv,f:Wv,g:Nv,G:Dv,H:Rv,I:Rv,j:Iv,L:Uv,m:Fv,M:Yv,p:function(t,e,n){var r=u.exec(e.slice(n));return r?(t.p=l[r[0].toLowerCase()],n+r[0].length):-1},q:Lv,Q:Vv,s:Hv,S:zv,u:Av,U:Mv,V:Ov,w:Sv,W:jv,x:function(t,e,r){return C(t,n,e,r)},X:function(t,e,n){return C(t,r,e,n)},y:Nv,Y:Dv,Z:Bv,"%":$v};function w(t,e){return function(n){var r,i,a,o=[],s=-1,c=0,u=t.length;for(n instanceof Date||(n=new Date(+n));++s53)return null;"w"in a||(a.w=1),"Z"in a?(i=(r=fv(hv(a.y,0,1))).getUTCDay(),r=i>4||0===i?Vy.ceil(r):Vy(r),r=av.offset(r,7*(a.V-1)),a.y=r.getUTCFullYear(),a.m=r.getUTCMonth(),a.d=r.getUTCDate()+(a.w+6)%7):(i=(r=lv(hv(a.y,0,1))).getDay(),r=i>4||0===i?gy.ceil(r):gy(r),r=My.offset(r,7*(a.V-1)),a.y=r.getFullYear(),a.m=r.getMonth(),a.d=r.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),i="Z"in a?fv(hv(a.y,0,1)).getUTCDay():lv(hv(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(i+5)%7:a.w+7*a.U-(i+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,fv(a)):lv(a)}}function C(t,e,n,r){for(var i,a,o=0,s=e.length,c=n.length;o=c)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=_[i in bv?e.charAt(o++):i])||(r=a(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return b.x=w(n,b),b.X=w(r,b),b.c=w(e,b),x.x=w(n,x),x.X=w(r,x),x.c=w(e,x),{format:function(t){var e=w(t+="",b);return e.toString=function(){return t},e},parse:function(t){var e=k(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=w(t+="",x);return e.toString=function(){return t},e},utcParse:function(t){var e=k(t+="",!0);return e.toString=function(){return t},e}}}var pv,gv,yv,vv,mv,bv={"-":"",_:" ",0:"0"},xv=/^\s*\d+/,_v=/^%/,wv=/[\\^$*+?|[\]().{}]/g;function kv(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",a=i.length;return r+(a68?1900:2e3),n+r[0].length):-1}function Bv(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Lv(t,e,n){var r=xv.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function Fv(t,e,n){var r=xv.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Pv(t,e,n){var r=xv.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Iv(t,e,n){var r=xv.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Rv(t,e,n){var r=xv.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Yv(t,e,n){var r=xv.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function zv(t,e,n){var r=xv.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Uv(t,e,n){var r=xv.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Wv(t,e,n){var r=xv.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function $v(t,e,n){var r=_v.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Vv(t,e,n){var r=xv.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Hv(t,e,n){var r=xv.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Gv(t,e){return kv(t.getDate(),e,2)}function qv(t,e){return kv(t.getHours(),e,2)}function Xv(t,e){return kv(t.getHours()%12||12,e,2)}function Zv(t,e){return kv(1+My.count(ry(t),t),e,3)}function Jv(t,e){return kv(t.getMilliseconds(),e,3)}function Qv(t,e){return Jv(t,e)+"000"}function Kv(t,e){return kv(t.getMonth()+1,e,2)}function tm(t,e){return kv(t.getMinutes(),e,2)}function em(t,e){return kv(t.getSeconds(),e,2)}function nm(t){var e=t.getDay();return 0===e?7:e}function rm(t,e){return kv(py.count(ry(t)-1,t),e,2)}function im(t){var e=t.getDay();return e>=4||0===e?my(t):my.ceil(t)}function am(t,e){return t=im(t),kv(my.count(ry(t),t)+(4===ry(t).getDay()),e,2)}function om(t){return t.getDay()}function sm(t,e){return kv(gy.count(ry(t)-1,t),e,2)}function cm(t,e){return kv(t.getFullYear()%100,e,2)}function um(t,e){return kv((t=im(t)).getFullYear()%100,e,2)}function lm(t,e){return kv(t.getFullYear()%1e4,e,4)}function fm(t,e){var n=t.getDay();return kv((t=n>=4||0===n?my(t):my.ceil(t)).getFullYear()%1e4,e,4)}function hm(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+kv(e/60|0,"0",2)+kv(e%60,"0",2)}function dm(t,e){return kv(t.getUTCDate(),e,2)}function pm(t,e){return kv(t.getUTCHours(),e,2)}function gm(t,e){return kv(t.getUTCHours()%12||12,e,2)}function ym(t,e){return kv(1+av.count(cv(t),t),e,3)}function vm(t,e){return kv(t.getUTCMilliseconds(),e,3)}function mm(t,e){return vm(t,e)+"000"}function bm(t,e){return kv(t.getUTCMonth()+1,e,2)}function xm(t,e){return kv(t.getUTCMinutes(),e,2)}function _m(t,e){return kv(t.getUTCSeconds(),e,2)}function wm(t){var e=t.getUTCDay();return 0===e?7:e}function km(t,e){return kv($y.count(cv(t)-1,t),e,2)}function Cm(t){var e=t.getUTCDay();return e>=4||0===e?qy(t):qy.ceil(t)}function Em(t,e){return t=Cm(t),kv(qy.count(cv(t),t)+(4===cv(t).getUTCDay()),e,2)}function Tm(t){return t.getUTCDay()}function Sm(t,e){return kv(Vy.count(cv(t)-1,t),e,2)}function Am(t,e){return kv(t.getUTCFullYear()%100,e,2)}function Mm(t,e){return kv((t=Cm(t)).getUTCFullYear()%100,e,2)}function Om(t,e){return kv(t.getUTCFullYear()%1e4,e,4)}function jm(t,e){var n=t.getUTCDay();return kv((t=n>=4||0===n?qy(t):qy.ceil(t)).getUTCFullYear()%1e4,e,4)}function Dm(){return"+0000"}function Nm(){return"%"}function Bm(t){return+t}function Lm(t){return Math.floor(+t/1e3)}function Fm(t){return pv=dv(t),gv=pv.format,yv=pv.parse,vv=pv.utcFormat,mv=pv.utcParse,pv}Fm({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var Pm=1e3,Im=6e4,Rm=36e5,Ym=864e5,zm=2592e6,Um=31536e6;function Wm(t){return new Date(t)}function $m(t){return t instanceof Date?+t:+new Date(+t)}function Vm(t,e,n,r,i,o,s,c,u){var l=Tg(bg,bg),f=l.invert,h=l.domain,d=u(".%L"),p=u(":%S"),g=u("%I:%M"),y=u("%I %p"),v=u("%a %d"),m=u("%b %d"),b=u("%B"),x=u("%Y"),_=[[s,1,Pm],[s,5,5e3],[s,15,15e3],[s,30,3e4],[o,1,Im],[o,5,3e5],[o,15,9e5],[o,30,18e5],[i,1,Rm],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,Ym],[r,2,1728e5],[n,1,6048e5],[e,1,zm],[e,3,7776e6],[t,1,Um]];function w(a){return(s(a)1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return Nx.h=360*t-100,Nx.s=1.5-1.5*e,Nx.l=.8-.9*e,Nx+""},Lx=Je(),Fx=Math.PI/3,Px=2*Math.PI/3,Ix=function(t){var e;return t=(.5-t)*Math.PI,Lx.r=255*(e=Math.sin(t))*e,Lx.g=255*(e=Math.sin(t+Fx))*e,Lx.b=255*(e=Math.sin(t+Px))*e,Lx+""},Rx=function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-14825.05*t)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+707.56*t)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-6838.66*t)))))))+")"};function Yx(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}var zx=Yx(vb("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),Ux=Yx(vb("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),Wx=Yx(vb("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),$x=Yx(vb("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),Vx=function(t){return Ce(ie(t).call(document.documentElement))},Hx=0;function Gx(){return new qx}function qx(){this._="@"+(++Hx).toString(36)}qx.prototype=Gx.prototype={constructor:qx,get:function(t){for(var e=this._;!(e in t);)if(!(t=t.parentNode))return;return t[e]},set:function(t,e){return t[this._]=e},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};var Xx=function(t){return"string"==typeof t?new _e([document.querySelectorAll(t)],[document.documentElement]):new _e([null==t?[]:t],xe)},Zx=function(t,e){null==e&&(e=Nn().touches);for(var n=0,r=e?e.length:0,i=new Array(r);n1?0:t<-1?o_:Math.acos(t)}function l_(t){return t>=1?s_:t<=-1?-s_:Math.asin(t)}function f_(t){return t.innerRadius}function h_(t){return t.outerRadius}function d_(t){return t.startAngle}function p_(t){return t.endAngle}function g_(t){return t&&t.padAngle}function y_(t,e,n,r,i,a,o,s){var c=n-t,u=r-e,l=o-i,f=s-a,h=f*c-l*u;if(!(h*hO*O+j*j&&(C=T,E=S),{cx:C,cy:E,x01:-l,y01:-f,x11:C*(i/_-1),y11:E*(i/_-1)}}var m_=function(){var t=f_,e=h_,n=Jx(0),r=null,i=d_,a=p_,o=g_,s=null;function c(){var c,u,l=+t.apply(this,arguments),f=+e.apply(this,arguments),h=i.apply(this,arguments)-s_,d=a.apply(this,arguments)-s_,p=Qx(d-h),g=d>h;if(s||(s=c=Gi()),fa_)if(p>c_-a_)s.moveTo(f*t_(h),f*r_(h)),s.arc(0,0,f,h,d,!g),l>a_&&(s.moveTo(l*t_(d),l*r_(d)),s.arc(0,0,l,d,h,g));else{var y,v,m=h,b=d,x=h,_=d,w=p,k=p,C=o.apply(this,arguments)/2,E=C>a_&&(r?+r.apply(this,arguments):i_(l*l+f*f)),T=n_(Qx(f-l)/2,+n.apply(this,arguments)),S=T,A=T;if(E>a_){var M=l_(E/l*r_(C)),O=l_(E/f*r_(C));(w-=2*M)>a_?(x+=M*=g?1:-1,_-=M):(w=0,x=_=(h+d)/2),(k-=2*O)>a_?(m+=O*=g?1:-1,b-=O):(k=0,m=b=(h+d)/2)}var j=f*t_(m),D=f*r_(m),N=l*t_(_),B=l*r_(_);if(T>a_){var L,F=f*t_(b),P=f*r_(b),I=l*t_(x),R=l*r_(x);if(pa_?A>a_?(y=v_(I,R,j,D,f,A,g),v=v_(F,P,N,B,f,A,g),s.moveTo(y.cx+y.x01,y.cy+y.y01),Aa_&&w>a_?S>a_?(y=v_(N,B,F,P,l,-S,g),v=v_(j,D,I,R,l,-S,g),s.lineTo(y.cx+y.x01,y.cy+y.y01),S=l;--f)s.point(y[f],v[f]);s.lineEnd(),s.areaEnd()}g&&(y[u]=+t(h,u,c),v[u]=+n(h,u,c),s.point(e?+e(h,u,c):y[u],r?+r(h,u,c):v[u]))}if(d)return s=null,d+""||null}function u(){return k_().defined(i).curve(o).context(a)}return c.x=function(n){return arguments.length?(t="function"==typeof n?n:Jx(+n),e=null,c):t},c.x0=function(e){return arguments.length?(t="function"==typeof e?e:Jx(+e),c):t},c.x1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:Jx(+t),c):e},c.y=function(t){return arguments.length?(n="function"==typeof t?t:Jx(+t),r=null,c):n},c.y0=function(t){return arguments.length?(n="function"==typeof t?t:Jx(+t),c):n},c.y1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:Jx(+t),c):r},c.lineX0=c.lineY0=function(){return u().x(t).y(n)},c.lineY1=function(){return u().x(t).y(r)},c.lineX1=function(){return u().x(e).y(n)},c.defined=function(t){return arguments.length?(i="function"==typeof t?t:Jx(!!t),c):i},c.curve=function(t){return arguments.length?(o=t,null!=a&&(s=o(a)),c):o},c.context=function(t){return arguments.length?(null==t?a=s=null:s=o(a=t),c):a},c},E_=function(t,e){return et?1:e>=t?0:NaN},T_=function(t){return t},S_=function(){var t=T_,e=E_,n=null,r=Jx(0),i=Jx(c_),a=Jx(0);function o(o){var s,c,u,l,f,h=o.length,d=0,p=new Array(h),g=new Array(h),y=+r.apply(this,arguments),v=Math.min(c_,Math.max(-c_,i.apply(this,arguments)-y)),m=Math.min(Math.abs(v)/h,a.apply(this,arguments)),b=m*(v<0?-1:1);for(s=0;s0&&(d+=f);for(null!=e?p.sort((function(t,n){return e(g[t],g[n])})):null!=n&&p.sort((function(t,e){return n(o[t],o[e])})),s=0,u=d?(v-h*b)/d:0;s0?f*u:0)+b,g[c]={data:o[c],index:s,value:f,startAngle:y,endAngle:l,padAngle:m};return g}return o.value=function(e){return arguments.length?(t="function"==typeof e?e:Jx(+e),o):t},o.sortValues=function(t){return arguments.length?(e=t,n=null,o):e},o.sort=function(t){return arguments.length?(n=t,e=null,o):n},o.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:Jx(+t),o):r},o.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:Jx(+t),o):i},o.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:Jx(+t),o):a},o},A_=O_(x_);function M_(t){this._curve=t}function O_(t){function e(e){return new M_(t(e))}return e._curve=t,e}function j_(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(O_(t)):e()._curve},t}M_.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};var D_=function(){return j_(k_().curve(A_))},N_=function(){var t=C_().curve(A_),e=t.curve,n=t.lineX0,r=t.lineX1,i=t.lineY0,a=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return j_(n())},delete t.lineX0,t.lineEndAngle=function(){return j_(r())},delete t.lineX1,t.lineInnerRadius=function(){return j_(i())},delete t.lineY0,t.lineOuterRadius=function(){return j_(a())},delete t.lineY1,t.curve=function(t){return arguments.length?e(O_(t)):e()._curve},t},B_=function(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]},L_=Array.prototype.slice;function F_(t){return t.source}function P_(t){return t.target}function I_(t){var e=F_,n=P_,r=__,i=w_,a=null;function o(){var o,s=L_.call(arguments),c=e.apply(this,s),u=n.apply(this,s);if(a||(a=o=Gi()),t(a,+r.apply(this,(s[0]=c,s)),+i.apply(this,s),+r.apply(this,(s[0]=u,s)),+i.apply(this,s)),o)return a=null,o+""||null}return o.source=function(t){return arguments.length?(e=t,o):e},o.target=function(t){return arguments.length?(n=t,o):n},o.x=function(t){return arguments.length?(r="function"==typeof t?t:Jx(+t),o):r},o.y=function(t){return arguments.length?(i="function"==typeof t?t:Jx(+t),o):i},o.context=function(t){return arguments.length?(a=null==t?null:t,o):a},o}function R_(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e=(e+r)/2,n,e,i,r,i)}function Y_(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e,n=(n+i)/2,r,n,r,i)}function z_(t,e,n,r,i){var a=B_(e,n),o=B_(e,n=(n+i)/2),s=B_(r,n),c=B_(r,i);t.moveTo(a[0],a[1]),t.bezierCurveTo(o[0],o[1],s[0],s[1],c[0],c[1])}function U_(){return I_(R_)}function W_(){return I_(Y_)}function $_(){var t=I_(z_);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}var V_={draw:function(t,e){var n=Math.sqrt(e/o_);t.moveTo(n,0),t.arc(0,0,n,0,c_)}},H_={draw:function(t,e){var n=Math.sqrt(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}},G_=Math.sqrt(1/3),q_=2*G_,X_={draw:function(t,e){var n=Math.sqrt(e/q_),r=n*G_;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}},Z_=Math.sin(o_/10)/Math.sin(7*o_/10),J_=Math.sin(c_/10)*Z_,Q_=-Math.cos(c_/10)*Z_,K_={draw:function(t,e){var n=Math.sqrt(.8908130915292852*e),r=J_*n,i=Q_*n;t.moveTo(0,-n),t.lineTo(r,i);for(var a=1;a<5;++a){var o=c_*a/5,s=Math.cos(o),c=Math.sin(o);t.lineTo(c*n,-s*n),t.lineTo(s*r-c*i,c*r+s*i)}t.closePath()}},tw={draw:function(t,e){var n=Math.sqrt(e),r=-n/2;t.rect(r,r,n,n)}},ew=Math.sqrt(3),nw={draw:function(t,e){var n=-Math.sqrt(e/(3*ew));t.moveTo(0,2*n),t.lineTo(-ew*n,-n),t.lineTo(ew*n,-n),t.closePath()}},rw=-.5,iw=Math.sqrt(3)/2,aw=1/Math.sqrt(12),ow=3*(aw/2+1),sw={draw:function(t,e){var n=Math.sqrt(e/ow),r=n/2,i=n*aw,a=r,o=n*aw+n,s=-a,c=o;t.moveTo(r,i),t.lineTo(a,o),t.lineTo(s,c),t.lineTo(rw*r-iw*i,iw*r+rw*i),t.lineTo(rw*a-iw*o,iw*a+rw*o),t.lineTo(rw*s-iw*c,iw*s+rw*c),t.lineTo(rw*r+iw*i,rw*i-iw*r),t.lineTo(rw*a+iw*o,rw*o-iw*a),t.lineTo(rw*s+iw*c,rw*c-iw*s),t.closePath()}},cw=[V_,H_,X_,tw,K_,nw,sw],uw=function(){var t=Jx(V_),e=Jx(64),n=null;function r(){var r;if(n||(n=r=Gi()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),r)return n=null,r+""||null}return r.type=function(e){return arguments.length?(t="function"==typeof e?e:Jx(e),r):t},r.size=function(t){return arguments.length?(e="function"==typeof t?t:Jx(+t),r):e},r.context=function(t){return arguments.length?(n=null==t?null:t,r):n},r},lw=function(){};function fw(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function hw(t){this._context=t}hw.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:fw(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:fw(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};var dw=function(t){return new hw(t)};function pw(t){this._context=t}pw.prototype={areaStart:lw,areaEnd:lw,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:fw(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};var gw=function(t){return new pw(t)};function yw(t){this._context=t}yw.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:fw(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};var vw=function(t){return new yw(t)};function mw(t,e){this._basis=new hw(t),this._beta=e}mw.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r,i=t[0],a=e[0],o=t[n]-i,s=e[n]-a,c=-1;++c<=n;)r=c/n,this._basis.point(this._beta*t[c]+(1-this._beta)*(i+r*o),this._beta*e[c]+(1-this._beta)*(a+r*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var bw=function t(e){function n(t){return 1===e?new hw(t):new mw(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function xw(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function _w(t,e){this._context=t,this._k=(1-e)/6}_w.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:xw(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:xw(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var ww=function t(e){function n(t){return new _w(t,e)}return n.tension=function(e){return t(+e)},n}(0);function kw(t,e){this._context=t,this._k=(1-e)/6}kw.prototype={areaStart:lw,areaEnd:lw,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:xw(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Cw=function t(e){function n(t){return new kw(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Ew(t,e){this._context=t,this._k=(1-e)/6}Ew.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:xw(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Tw=function t(e){function n(t){return new Ew(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Sw(t,e,n){var r=t._x1,i=t._y1,a=t._x2,o=t._y2;if(t._l01_a>a_){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>a_){var u=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,l=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*u+t._x1*t._l23_2a-e*t._l12_2a)/l,o=(o*u+t._y1*t._l23_2a-n*t._l12_2a)/l}t._context.bezierCurveTo(r,i,a,o,t._x2,t._y2)}function Aw(t,e){this._context=t,this._alpha=e}Aw.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:Sw(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Mw=function t(e){function n(t){return e?new Aw(t,e):new _w(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Ow(t,e){this._context=t,this._alpha=e}Ow.prototype={areaStart:lw,areaEnd:lw,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Sw(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var jw=function t(e){function n(t){return e?new Ow(t,e):new kw(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Dw(t,e){this._context=t,this._alpha=e}Dw.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Sw(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Nw=function t(e){function n(t){return e?new Dw(t,e):new Ew(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Bw(t){this._context=t}Bw.prototype={areaStart:lw,areaEnd:lw,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};var Lw=function(t){return new Bw(t)};function Fw(t){return t<0?-1:1}function Pw(t,e,n){var r=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(r||i<0&&-0),o=(n-t._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(Fw(a)+Fw(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Iw(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Rw(t,e,n){var r=t._x0,i=t._y0,a=t._x1,o=t._y1,s=(a-r)/3;t._context.bezierCurveTo(r+s,i+s*e,a-s,o-s*n,a,o)}function Yw(t){this._context=t}function zw(t){this._context=new Uw(t)}function Uw(t){this._context=t}function Ww(t){return new Yw(t)}function $w(t){return new zw(t)}function Vw(t){this._context=t}function Hw(t){var e,n,r=t.length-1,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e=0;--e)i[e]=(o[e]-i[e+1])/a[e];for(a[r-1]=(t[r]+i[r-1])/2,e=0;e=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}};var Xw=function(t){return new qw(t,.5)};function Zw(t){return new qw(t,0)}function Jw(t){return new qw(t,1)}var Qw=function(t,e){if((i=t.length)>1)for(var n,r,i,a=1,o=t[e[0]],s=o.length;a=0;)n[e]=e;return n};function tk(t,e){return t[e]}var ek=function(){var t=Jx([]),e=Kw,n=Qw,r=tk;function i(i){var a,o,s=t.apply(this,arguments),c=i.length,u=s.length,l=new Array(u);for(a=0;a0){for(var n,r,i,a=0,o=t[0].length;a0)for(var n,r,i,a,o,s,c=0,u=t[e[0]].length;c0?(r[0]=a,r[1]=a+=i):i<0?(r[1]=o,r[0]=o+=i):(r[0]=0,r[1]=i)},ik=function(t,e){if((n=t.length)>0){for(var n,r=0,i=t[e[0]],a=i.length;r0&&(r=(n=t[e[0]]).length)>0){for(var n,r,i,a=0,o=1;oa&&(a=e,r=n);return r}var ck=function(t){var e=t.map(uk);return Kw(t).sort((function(t,n){return e[t]-e[n]}))};function uk(t){for(var e,n=0,r=-1,i=t.length;++r0)){if(a/=h,h<0){if(a0){if(a>f)return;a>l&&(l=a)}if(a=r-c,h||!(a<0)){if(a/=h,h<0){if(a>f)return;a>l&&(l=a)}else if(h>0){if(a0)){if(a/=d,d<0){if(a0){if(a>f)return;a>l&&(l=a)}if(a=i-u,d||!(a<0)){if(a/=d,d<0){if(a>f)return;a>l&&(l=a)}else if(d>0){if(a0||f<1)||(l>0&&(t[0]=[c+l*h,u+l*d]),f<1&&(t[1]=[c+f*h,u+f*d]),!0)}}}}}function Ok(t,e,n,r,i){var a=t[1];if(a)return!0;var o,s,c=t[0],u=t.left,l=t.right,f=u[0],h=u[1],d=l[0],p=l[1],g=(f+d)/2,y=(h+p)/2;if(p===h){if(g=r)return;if(f>d){if(c){if(c[1]>=i)return}else c=[g,n];a=[g,i]}else{if(c){if(c[1]1)if(f>d){if(c){if(c[1]>=i)return}else c=[(n-s)/o,n];a=[(i-s)/o,i]}else{if(c){if(c[1]=r)return}else c=[e,o*e+s];a=[r,o*r+s]}else{if(c){if(c[0]=-Qk)){var d=c*c+u*u,p=l*l+f*f,g=(f*d-u*p)/h,y=(c*p-l*d)/h,v=Lk.pop()||new Fk;v.arc=t,v.site=i,v.x=g+o,v.y=(v.cy=y+s)+Math.sqrt(g*g+y*y),t.circle=v;for(var m=null,b=Xk._;b;)if(v.yJk)s=s.L;else{if(!((i=a-Hk(s,o))>Jk)){r>-Jk?(e=s.P,n=s):i>-Jk?(e=s,n=s.N):e=n=s;break}if(!s.R){e=s;break}s=s.R}!function(t){qk[t.index]={site:t,halfedges:[]}}(t);var c=zk(t);if(Gk.insert(e,c),e||n){if(e===n)return Ik(e),n=zk(e.site),Gk.insert(c,n),c.edge=n.edge=Tk(e.site,c.site),Pk(e),void Pk(n);if(n){Ik(e),Ik(n);var u=e.site,l=u[0],f=u[1],h=t[0]-l,d=t[1]-f,p=n.site,g=p[0]-l,y=p[1]-f,v=2*(h*y-d*g),m=h*h+d*d,b=g*g+y*y,x=[(y*m-d*b)/v+l,(h*b-g*m)/v+f];Ak(n.edge,u,p,x),c.edge=Tk(u,t,null,x),n.edge=Tk(t,p,null,x),Pk(e),Pk(n)}else c.edge=Tk(e.site,c.site)}}function Vk(t,e){var n=t.site,r=n[0],i=n[1],a=i-e;if(!a)return r;var o=t.P;if(!o)return-1/0;var s=(n=o.site)[0],c=n[1],u=c-e;if(!u)return s;var l=s-r,f=1/a-1/u,h=l/u;return f?(-h+Math.sqrt(h*h-2*f*(l*l/(-2*u)-c+u/2+i-a/2)))/f+r:(r+s)/2}function Hk(t,e){var n=t.N;if(n)return Vk(n,e);var r=t.site;return r[1]===e?r[0]:1/0}var Gk,qk,Xk,Zk,Jk=1e-6,Qk=1e-12;function Kk(t,e){return e[1]-t[1]||e[0]-t[0]}function tC(t,e){var n,r,i,a=t.sort(Kk).pop();for(Zk=[],qk=new Array(t.length),Gk=new Ek,Xk=new Ek;;)if(i=Bk,a&&(!i||a[1]Jk||Math.abs(i[0][1]-i[1][1])>Jk)||delete Zk[a]}(o,s,c,u),function(t,e,n,r){var i,a,o,s,c,u,l,f,h,d,p,g,y=qk.length,v=!0;for(i=0;iJk||Math.abs(g-h)>Jk)&&(c.splice(s,0,Zk.push(Sk(o,d,Math.abs(p-t)Jk?[t,Math.abs(f-t)Jk?[Math.abs(h-r)Jk?[n,Math.abs(f-n)Jk?[Math.abs(h-e)=s)return null;var c=t-i.site[0],u=e-i.site[1],l=c*c+u*u;do{i=a.cells[r=o],o=null,i.halfedges.forEach((function(n){var r=a.edges[n],s=r.left;if(s!==i.site&&s||(s=r.right)){var c=t-s[0],u=e-s[1],f=c*c+u*u;fr?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}var gC=function(){var t,e,n=uC,r=lC,i=pC,a=hC,o=dC,s=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],u=250,l=Bp,f=ht("start","zoom","end"),h=500,d=0;function p(t){t.property("__zoom",fC).on("wheel.zoom",_).on("mousedown.zoom",w).on("dblclick.zoom",k).filter(o).on("touchstart.zoom",C).on("touchmove.zoom",E).on("touchend.zoom touchcancel.zoom",T).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(t,e){return(e=Math.max(s[0],Math.min(s[1],e)))===t.k?t:new iC(e,t.x,t.y)}function y(t,e,n){var r=e[0]-n[0]*t.k,i=e[1]-n[1]*t.k;return r===t.x&&i===t.y?t:new iC(t.k,r,i)}function v(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function m(t,e,n){t.on("start.zoom",(function(){b(this,arguments).start()})).on("interrupt.zoom end.zoom",(function(){b(this,arguments).end()})).tween("zoom",(function(){var t=this,i=arguments,a=b(t,i),o=r.apply(t,i),s=null==n?v(o):"function"==typeof n?n.apply(t,i):n,c=Math.max(o[1][0]-o[0][0],o[1][1]-o[0][1]),u=t.__zoom,f="function"==typeof e?e.apply(t,i):e,h=l(u.invert(s).concat(c/u.k),f.invert(s).concat(c/f.k));return function(t){if(1===t)t=f;else{var e=h(t),n=c/e[2];t=new iC(n,s[0]-e[0]*n,s[1]-e[1]*n)}a.zoom(null,t)}}))}function b(t,e,n){return!n&&t.__zooming||new x(t,e)}function x(t,e){this.that=t,this.args=e,this.active=0,this.extent=r.apply(t,e),this.taps=0}function _(){if(n.apply(this,arguments)){var t=b(this,arguments),e=this.__zoom,r=Math.max(s[0],Math.min(s[1],e.k*Math.pow(2,a.apply(this,arguments)))),o=Fn(this);if(t.wheel)t.mouse[0][0]===o[0]&&t.mouse[0][1]===o[1]||(t.mouse[1]=e.invert(t.mouse[0]=o)),clearTimeout(t.wheel);else{if(e.k===r)return;t.mouse=[o,e.invert(o)],lr(this),t.start()}cC(),t.wheel=setTimeout(u,150),t.zoom("mouse",i(y(g(e,r),t.mouse[0],t.mouse[1]),t.extent,c))}function u(){t.wheel=null,t.end()}}function w(){if(!e&&n.apply(this,arguments)){var t=b(this,arguments,!0),r=Ce(le.view).on("mousemove.zoom",u,!0).on("mouseup.zoom",l,!0),a=Fn(this),o=le.clientX,s=le.clientY;Se(le.view),sC(),t.mouse=[a,this.__zoom.invert(a)],lr(this),t.start()}function u(){if(cC(),!t.moved){var e=le.clientX-o,n=le.clientY-s;t.moved=e*e+n*n>d}t.zoom("mouse",i(y(t.that.__zoom,t.mouse[0]=Fn(t.that),t.mouse[1]),t.extent,c))}function l(){r.on("mousemove.zoom mouseup.zoom",null),Ae(le.view,t.moved),cC(),t.end()}}function k(){if(n.apply(this,arguments)){var t=this.__zoom,e=Fn(this),a=t.invert(e),o=t.k*(le.shiftKey?.5:2),s=i(y(g(t,o),e,a),r.apply(this,arguments),c);cC(),u>0?Ce(this).transition().duration(u).call(m,s,e):Ce(this).call(p.transform,s)}}function C(){if(n.apply(this,arguments)){var e,r,i,a,o=le.touches,s=o.length,c=b(this,arguments,le.changedTouches.length===s);for(sC(),r=0;r-1}(s)?s:(n=s.match(a))?(e=n[0],r.test(e)?"about:blank":s):"about:blank"}}},function(t,e,n){t.exports={Graph:n(420),version:n(780)}},function(t,e,n){var r=n(571);t.exports=function(t){return r(t,4)}},function(t,e){t.exports=function(){this.__data__=[],this.size=0}},function(t,e,n){var r=n(369),i=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=r(e,t);return!(n<0)&&(n==e.length-1?e.pop():i.call(e,n,1),--this.size,!0)}},function(t,e,n){var r=n(369);t.exports=function(t){var e=this.__data__,n=r(e,t);return n<0?void 0:e[n][1]}},function(t,e,n){var r=n(369);t.exports=function(t){return r(this.__data__,t)>-1}},function(t,e,n){var r=n(369);t.exports=function(t,e){var n=this.__data__,i=r(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}},function(t,e,n){var r=n(368);t.exports=function(){this.__data__=new r,this.size=0}},function(t,e){t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},function(t,e){t.exports=function(t){return this.__data__.get(t)}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e,n){var r=n(368),i=n(421),a=n(422);t.exports=function(t,e){var n=this.__data__;if(n instanceof r){var o=n.__data__;if(!i||o.length<199)return o.push([t,e]),this.size=++n.size,this;n=this.__data__=new a(o)}return n.set(t,e),this.size=n.size,this}},function(t,e,n){var r=n(334),i=n(694),a=n(285),o=n(573),s=/^\[object .+?Constructor\]$/,c=Function.prototype,u=Object.prototype,l=c.toString,f=u.hasOwnProperty,h=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!a(t)||i(t))&&(r(t)?h:s).test(o(t))}},function(t,e,n){var r=n(335),i=Object.prototype,a=i.hasOwnProperty,o=i.toString,s=r?r.toStringTag:void 0;t.exports=function(t){var e=a.call(t,s),n=t[s];try{t[s]=void 0;var r=!0}catch(t){}var i=o.call(t);return r&&(e?t[s]=n:delete t[s]),i}},function(t,e){var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},function(t,e,n){var r,i=n(695),a=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";t.exports=function(t){return!!a&&a in t}},function(t,e,n){var r=n(294)["__core-js_shared__"];t.exports=r},function(t,e){t.exports=function(t,e){return null==t?void 0:t[e]}},function(t,e,n){var r=n(698),i=n(368),a=n(421);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(a||i),string:new r}}},function(t,e,n){var r=n(699),i=n(700),a=n(701),o=n(702),s=n(703);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}},function(t,e,n){var r=n(594),i=n(772),a=n(776),o=n(595),s=n(777),c=n(434);t.exports=function(t,e,n){var u=-1,l=i,f=t.length,h=!0,d=[],p=d;if(n)h=!1,l=a;else if(f>=200){var g=e?null:s(t);if(g)return c(g);h=!1,l=o,p=new r}else p=e?[]:d;t:for(;++u-1}},function(t,e,n){var r=n(608),i=n(774),a=n(775);t.exports=function(t,e,n){return e==e?a(t,e,n):r(t,i,n)}},function(t,e){t.exports=function(t){return t!=t}},function(t,e){t.exports=function(t,e,n){for(var r=n-1,i=t.length;++r1||1===e.length&&t.hasEdge(e[0],e[0])}))}},function(t,e,n){var r=n(284);t.exports=function(t,e,n){return function(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],o=a[n],s=r.distance+i.distance;s0;){if(n=c.removeMin(),r.has(s,n))o.setEdge(n,s[n]);else{if(l)throw new Error("Input graph is not connected: "+t);l=!0}t.nodeEdges(n).forEach(u)}return o}},function(t,e,n){"use strict";var r=n(263),i=n(824),a=n(827),o=n(828),s=n(276).normalizeRanks,c=n(830),u=n(276).removeEmptyRanks,l=n(831),f=n(832),h=n(833),d=n(834),p=n(843),g=n(276),y=n(293).Graph;t.exports=function(t,e){var n=e&&e.debugTiming?g.time:g.notime;n("layout",(function(){var e=n(" buildLayoutGraph",(function(){return function(t){var e=new y({multigraph:!0,compound:!0}),n=T(t.graph());return e.setGraph(r.merge({},m,E(n,v),r.pick(n,b))),r.forEach(t.nodes(),(function(n){var i=T(t.node(n));e.setNode(n,r.defaults(E(i,x),_)),e.setParent(n,t.parent(n))})),r.forEach(t.edges(),(function(n){var i=T(t.edge(n));e.setEdge(n,r.merge({},k,E(i,w),r.pick(i,C)))})),e}(t)}));n(" runLayout",(function(){!function(t,e){e(" makeSpaceForEdgeLabels",(function(){!function(t){var e=t.graph();e.ranksep/=2,r.forEach(t.edges(),(function(n){var r=t.edge(n);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===e.rankdir||"BT"===e.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)}))}(t)})),e(" removeSelfEdges",(function(){!function(t){r.forEach(t.edges(),(function(e){if(e.v===e.w){var n=t.node(e.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:e,label:t.edge(e)}),t.removeEdge(e)}}))}(t)})),e(" acyclic",(function(){i.run(t)})),e(" nestingGraph.run",(function(){l.run(t)})),e(" rank",(function(){o(g.asNonCompoundGraph(t))})),e(" injectEdgeLabelProxies",(function(){!function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);if(n.width&&n.height){var r=t.node(e.v),i={rank:(t.node(e.w).rank-r.rank)/2+r.rank,e:e};g.addDummyNode(t,"edge-proxy",i,"_ep")}}))}(t)})),e(" removeEmptyRanks",(function(){u(t)})),e(" nestingGraph.cleanup",(function(){l.cleanup(t)})),e(" normalizeRanks",(function(){s(t)})),e(" assignRankMinMax",(function(){!function(t){var e=0;r.forEach(t.nodes(),(function(n){var i=t.node(n);i.borderTop&&(i.minRank=t.node(i.borderTop).rank,i.maxRank=t.node(i.borderBottom).rank,e=r.max(e,i.maxRank))})),t.graph().maxRank=e}(t)})),e(" removeEdgeLabelProxies",(function(){!function(t){r.forEach(t.nodes(),(function(e){var n=t.node(e);"edge-proxy"===n.dummy&&(t.edge(n.e).labelRank=n.rank,t.removeNode(e))}))}(t)})),e(" normalize.run",(function(){a.run(t)})),e(" parentDummyChains",(function(){c(t)})),e(" addBorderSegments",(function(){f(t)})),e(" order",(function(){d(t)})),e(" insertSelfEdges",(function(){!function(t){var e=g.buildLayerMatrix(t);r.forEach(e,(function(e){var n=0;r.forEach(e,(function(e,i){var a=t.node(e);a.order=i+n,r.forEach(a.selfEdges,(function(e){g.addDummyNode(t,"selfedge",{width:e.label.width,height:e.label.height,rank:a.rank,order:i+ ++n,e:e.e,label:e.label},"_se")})),delete a.selfEdges}))}))}(t)})),e(" adjustCoordinateSystem",(function(){h.adjust(t)})),e(" position",(function(){p(t)})),e(" positionSelfEdges",(function(){!function(t){r.forEach(t.nodes(),(function(e){var n=t.node(e);if("selfedge"===n.dummy){var r=t.node(n.e.v),i=r.x+r.width/2,a=r.y,o=n.x-i,s=r.height/2;t.setEdge(n.e,n.label),t.removeNode(e),n.label.points=[{x:i+2*o/3,y:a-s},{x:i+5*o/6,y:a-s},{x:i+o,y:a},{x:i+5*o/6,y:a+s},{x:i+2*o/3,y:a+s}],n.label.x=n.x,n.label.y=n.y}}))}(t)})),e(" removeBorderNodes",(function(){!function(t){r.forEach(t.nodes(),(function(e){if(t.children(e).length){var n=t.node(e),i=t.node(n.borderTop),a=t.node(n.borderBottom),o=t.node(r.last(n.borderLeft)),s=t.node(r.last(n.borderRight));n.width=Math.abs(s.x-o.x),n.height=Math.abs(a.y-i.y),n.x=o.x+n.width/2,n.y=i.y+n.height/2}})),r.forEach(t.nodes(),(function(e){"border"===t.node(e).dummy&&t.removeNode(e)}))}(t)})),e(" normalize.undo",(function(){a.undo(t)})),e(" fixupEdgeLabelCoords",(function(){!function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);if(r.has(n,"x"))switch("l"!==n.labelpos&&"r"!==n.labelpos||(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}}))}(t)})),e(" undoCoordinateSystem",(function(){h.undo(t)})),e(" translateGraph",(function(){!function(t){var e=Number.POSITIVE_INFINITY,n=0,i=Number.POSITIVE_INFINITY,a=0,o=t.graph(),s=o.marginx||0,c=o.marginy||0;function u(t){var r=t.x,o=t.y,s=t.width,c=t.height;e=Math.min(e,r-s/2),n=Math.max(n,r+s/2),i=Math.min(i,o-c/2),a=Math.max(a,o+c/2)}r.forEach(t.nodes(),(function(e){u(t.node(e))})),r.forEach(t.edges(),(function(e){var n=t.edge(e);r.has(n,"x")&&u(n)})),e-=s,i-=c,r.forEach(t.nodes(),(function(n){var r=t.node(n);r.x-=e,r.y-=i})),r.forEach(t.edges(),(function(n){var a=t.edge(n);r.forEach(a.points,(function(t){t.x-=e,t.y-=i})),r.has(a,"x")&&(a.x-=e),r.has(a,"y")&&(a.y-=i)})),o.width=n-e+s,o.height=a-i+c}(t)})),e(" assignNodeIntersects",(function(){!function(t){r.forEach(t.edges(),(function(e){var n,r,i=t.edge(e),a=t.node(e.v),o=t.node(e.w);i.points?(n=i.points[0],r=i.points[i.points.length-1]):(i.points=[],n=o,r=a),i.points.unshift(g.intersectRect(a,n)),i.points.push(g.intersectRect(o,r))}))}(t)})),e(" reversePoints",(function(){!function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);n.reversed&&n.points.reverse()}))}(t)})),e(" acyclic.undo",(function(){i.undo(t)}))}(e,n)})),n(" updateInputGraph",(function(){!function(t,e){r.forEach(t.nodes(),(function(n){var r=t.node(n),i=e.node(n);r&&(r.x=i.x,r.y=i.y,e.children(n).length&&(r.width=i.width,r.height=i.height))})),r.forEach(t.edges(),(function(n){var i=t.edge(n),a=e.edge(n);i.points=a.points,r.has(a,"x")&&(i.x=a.x,i.y=a.y)})),t.graph().width=e.graph().width,t.graph().height=e.graph().height}(t,e)}))}))};var v=["nodesep","edgesep","ranksep","marginx","marginy"],m={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},b=["acyclicer","ranker","rankdir","align"],x=["width","height"],_={width:0,height:0},w=["minlen","weight","width","height","labeloffset"],k={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},C=["labelpos"];function E(t,e){return r.mapValues(r.pick(t,e),Number)}function T(t){var e={};return r.forEach(t,(function(t,n){e[n.toLowerCase()]=t})),e}},function(t,e,n){var r=n(571);t.exports=function(t){return r(t,5)}},function(t,e,n){var r=n(794)(n(795));t.exports=r},function(t,e,n){var r=n(302),i=n(301),a=n(310);t.exports=function(t){return function(e,n,o){var s=Object(e);if(!i(e)){var c=r(n,3);e=a(e),n=function(t){return c(s[t],t,s)}}var u=t(e,n,o);return u>-1?s[c?e[u]:u]:void 0}}},function(t,e,n){var r=n(608),i=n(302),a=n(796),o=Math.max;t.exports=function(t,e,n){var s=null==t?0:t.length;if(!s)return-1;var c=null==n?0:a(n);return c<0&&(c=o(s+c,0)),r(t,i(e,3),c)}},function(t,e,n){var r=n(617);t.exports=function(t){var e=r(t),n=e%1;return e==e?n?e-n:e:0}},function(t,e,n){var r=n(285),i=n(339),a=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,u=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(i(t))return NaN;if(r(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=r(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(a,"");var n=s.test(t);return n||c.test(t)?u(t.slice(2),n?2:8):o.test(t)?NaN:+t}},function(t,e,n){var r=n(433),i=n(590),a=n(322);t.exports=function(t,e){return null==t?t:r(t,i(e),a)}},function(t,e){t.exports=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}},function(t,e,n){var r=n(373),i=n(432),a=n(302);t.exports=function(t,e){var n={};return e=a(e,3),i(t,(function(t,i,a){r(n,i,e(t,i,a))})),n}},function(t,e,n){var r=n(438),i=n(802),a=n(323);t.exports=function(t){return t&&t.length?r(t,a,i):void 0}},function(t,e){t.exports=function(t,e){return t>e}},function(t,e,n){var r=n(804),i=n(807)((function(t,e,n){r(t,e,n)}));t.exports=i},function(t,e,n){var r=n(367),i=n(619),a=n(433),o=n(805),s=n(285),c=n(322),u=n(621);t.exports=function t(e,n,l,f,h){e!==n&&a(n,(function(a,c){if(h||(h=new r),s(a))o(e,n,c,l,t,f,h);else{var d=f?f(u(e,c),a,c+"",e,n,h):void 0;void 0===d&&(d=a),i(e,c,d)}}),c)}},function(t,e,n){var r=n(619),i=n(577),a=n(586),o=n(578),s=n(587),c=n(352),u=n(269),l=n(609),f=n(336),h=n(334),d=n(285),p=n(620),g=n(353),y=n(621),v=n(806);t.exports=function(t,e,n,m,b,x,_){var w=y(t,n),k=y(e,n),C=_.get(k);if(C)r(t,n,C);else{var E=x?x(w,k,n+"",t,e,_):void 0,T=void 0===E;if(T){var S=u(k),A=!S&&f(k),M=!S&&!A&&g(k);E=k,S||A||M?u(w)?E=w:l(w)?E=o(w):A?(T=!1,E=i(k,!0)):M?(T=!1,E=a(k,!0)):E=[]:p(k)||c(k)?(E=w,c(w)?E=v(w):d(w)&&!h(w)||(E=s(k))):T=!1}T&&(_.set(k,E),b(E,k,m,x,_),_.delete(k)),r(t,n,E)}}},function(t,e,n){var r=n(351),i=n(322);t.exports=function(t){return r(t,i(t))}},function(t,e,n){var r=n(382),i=n(383);t.exports=function(t){return r((function(e,n){var r=-1,a=n.length,o=a>1?n[a-1]:void 0,s=a>2?n[2]:void 0;for(o=t.length>3&&"function"==typeof o?(a--,o):void 0,s&&i(n[0],n[1],s)&&(o=a<3?void 0:o,a=1),e=Object(e);++r1&&o(t,e[0],e[1])?e=[]:n>2&&o(e[0],e[1],e[2])&&(e=[e[0]]),i(t,r(e,1),[])}));t.exports=s},function(t,e,n){var r=n(381),i=n(379),a=n(302),o=n(604),s=n(819),c=n(375),u=n(820),l=n(323),f=n(269);t.exports=function(t,e,n){e=e.length?r(e,(function(t){return f(t)?function(e){return i(e,1===t.length?t[0]:t)}:t})):[l];var h=-1;e=r(e,c(a));var d=o(t,(function(t,n,i){return{criteria:r(e,(function(e){return e(t)})),index:++h,value:t}}));return s(d,(function(t,e){return u(t,e,n)}))}},function(t,e){t.exports=function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}},function(t,e,n){var r=n(821);t.exports=function(t,e,n){for(var i=-1,a=t.criteria,o=e.criteria,s=a.length,c=n.length;++i=c?u:u*("desc"==n[i]?-1:1)}return t.index-e.index}},function(t,e,n){var r=n(339);t.exports=function(t,e){if(t!==e){var n=void 0!==t,i=null===t,a=t==t,o=r(t),s=void 0!==e,c=null===e,u=e==e,l=r(e);if(!c&&!l&&!o&&t>e||o&&s&&u&&!c&&!l||i&&s&&u||!n&&u||!a)return 1;if(!i&&!o&&!l&&t0;--c)if(r=e[c].dequeue()){i=i.concat(s(t,e,n,r,!0));break}}return i}(n.graph,n.buckets,n.zeroIdx);return r.flatten(r.map(u,(function(e){return t.outEdges(e.v,e.w)})),!0)};var o=r.constant(1);function s(t,e,n,i,a){var o=a?[]:void 0;return r.forEach(t.inEdges(i.v),(function(r){var i=t.edge(r),s=t.node(r.v);a&&o.push({v:r.v,w:r.w}),s.out-=i,c(e,n,s)})),r.forEach(t.outEdges(i.v),(function(r){var i=t.edge(r),a=r.w,o=t.node(a);o.in-=i,c(e,n,o)})),t.removeNode(i.v),o}function c(t,e,n){n.out?n.in?t[n.out-n.in+e].enqueue(n):t[t.length-1].enqueue(n):t[0].enqueue(n)}},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){if("_next"!==t&&"_prev"!==t)return e}t.exports=n,n.prototype.dequeue=function(){var t=this._sentinel,e=t._prev;if(e!==t)return r(e),e},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(", ")+"]"}},function(t,e,n){"use strict";var r=n(263),i=n(276);t.exports={run:function(t){t.graph().dummyChains=[],r.forEach(t.edges(),(function(e){!function(t,e){var n,r,a,o=e.v,s=t.node(o).rank,c=e.w,u=t.node(c).rank,l=e.name,f=t.edge(e),h=f.labelRank;if(u===s+1)return;for(t.removeEdge(e),a=0,++s;sc.lim&&(u=c,l=!0);var f=r.filter(e.edges(),(function(e){return l===m(t,t.node(e.v),u)&&l!==m(t,t.node(e.w),u)}));return r.minBy(f,(function(t){return a(e,t)}))}function v(t,e,n,i){var a=n.v,o=n.w;t.removeEdge(a,o),t.setEdge(i.v,i.w,{}),d(t),f(t,e),function(t,e){var n=r.find(t.nodes(),(function(t){return!e.node(t).parent})),i=s(t,n);i=i.slice(1),r.forEach(i,(function(n){var r=t.node(n).parent,i=e.edge(n,r),a=!1;i||(i=e.edge(r,n),a=!0),e.node(n).rank=e.node(r).rank+(a?i.minlen:-i.minlen)}))}(t,e)}function m(t,e,n){return n.low<=e.lim&&e.lim<=n.lim}t.exports=l,l.initLowLimValues=d,l.initCutValues=f,l.calcCutValue=h,l.leaveEdge=g,l.enterEdge=y,l.exchangeEdges=v},function(t,e,n){var r=n(263);t.exports=function(t){var e=function(t){var e={},n=0;function i(a){var o=n;r.forEach(t.children(a),i),e[a]={low:o,lim:n++}}return r.forEach(t.children(),i),e}(t);r.forEach(t.graph().dummyChains,(function(n){for(var r=t.node(n),i=r.edgeObj,a=function(t,e,n,r){var i,a,o=[],s=[],c=Math.min(e[n].low,e[r].low),u=Math.max(e[n].lim,e[r].lim);i=n;do{i=t.parent(i),o.push(i)}while(i&&(e[i].low>c||u>e[i].lim));a=i,i=r;for(;(i=t.parent(i))!==a;)s.push(i);return{path:o.concat(s.reverse()),lca:a}}(t,e,i.v,i.w),o=a.path,s=a.lca,c=0,u=o[c],l=!0;n!==i.w;){if(r=t.node(n),l){for(;(u=o[c])!==s&&t.node(u).maxRank=2),s=l.buildLayerMatrix(t);var y=a(t,s);y0;)e%2&&(n+=c[e+1]),c[e=e-1>>1]+=t.weight;u+=t.weight*n}))),u}t.exports=function(t,e){for(var n=0,r=1;r=t.barycenter)&&function(t,e){var n=0,r=0;t.weight&&(n+=t.barycenter*t.weight,r+=t.weight);e.weight&&(n+=e.barycenter*e.weight,r+=e.weight);t.vs=e.vs.concat(t.vs),t.barycenter=n/r,t.weight=r,t.i=Math.min(e.i,t.i),e.merged=!0}(t,e)}}function i(e){return function(n){n.in.push(e),0==--n.indegree&&t.push(n)}}for(;t.length;){var a=t.pop();e.push(a),r.forEach(a.in.reverse(),n(a)),r.forEach(a.out,i(a))}return r.map(r.filter(e,(function(t){return!t.merged})),(function(t){return r.pick(t,["vs","i","barycenter","weight"])}))}(r.filter(n,(function(t){return!t.indegree})))}},function(t,e,n){var r=n(263),i=n(276);function a(t,e,n){for(var i;e.length&&(i=r.last(e)).i<=n;)e.pop(),t.push(i.vs),n++;return n}t.exports=function(t,e){var n=i.partition(t,(function(t){return r.has(t,"barycenter")})),o=n.lhs,s=r.sortBy(n.rhs,(function(t){return-t.i})),c=[],u=0,l=0,f=0;o.sort((h=!!e,function(t,e){return t.barycentere.barycenter?1:h?e.i-t.i:t.i-e.i})),f=a(c,s,f),r.forEach(o,(function(t){f+=t.vs.length,c.push(t.vs),u+=t.barycenter*t.weight,l+=t.weight,f=a(c,s,f)}));var h;var d={vs:r.flatten(c,!0)};l&&(d.barycenter=u/l,d.weight=l);return d}},function(t,e,n){var r=n(263),i=n(293).Graph;t.exports=function(t,e,n){var a=function(t){var e;for(;t.hasNode(e=r.uniqueId("_root")););return e}(t),o=new i({compound:!0}).setGraph({root:a}).setDefaultNodeLabel((function(e){return t.node(e)}));return r.forEach(t.nodes(),(function(i){var s=t.node(i),c=t.parent(i);(s.rank===e||s.minRank<=e&&e<=s.maxRank)&&(o.setNode(i),o.setParent(i,c||a),r.forEach(t[n](i),(function(e){var n=e.v===i?e.w:e.v,a=o.edge(n,i),s=r.isUndefined(a)?0:a.weight;o.setEdge(n,i,{weight:t.edge(e).weight+s})})),r.has(s,"minRank")&&o.setNode(i,{borderLeft:s.borderLeft[e],borderRight:s.borderRight[e]}))})),o}},function(t,e,n){var r=n(263);t.exports=function(t,e,n){var i,a={};r.forEach(n,(function(n){for(var r,o,s=t.parent(n);s;){if((r=t.parent(s))?(o=a[r],a[r]=s):(o=i,i=s),o&&o!==s)return void e.setEdge(o,s);s=r}}))}},function(t,e,n){"use strict";var r=n(263),i=n(276),a=n(844).positionX;t.exports=function(t){(function(t){var e=i.buildLayerMatrix(t),n=t.graph().ranksep,a=0;r.forEach(e,(function(e){var i=r.max(r.map(e,(function(e){return t.node(e).height})));r.forEach(e,(function(e){t.node(e).y=a+i/2})),a+=i+n}))})(t=i.asNonCompoundGraph(t)),r.forEach(a(t),(function(e,n){t.node(n).x=e}))}},function(t,e,n){"use strict";var r=n(263),i=n(293).Graph,a=n(276);function o(t,e){var n={};return r.reduce(e,(function(e,i){var a=0,o=0,s=e.length,u=r.last(i);return r.forEach(i,(function(e,l){var f=function(t,e){if(t.node(e).dummy)return r.find(t.predecessors(e),(function(e){return t.node(e).dummy}))}(t,e),h=f?t.node(f).order:s;(f||e===u)&&(r.forEach(i.slice(o,l+1),(function(e){r.forEach(t.predecessors(e),(function(r){var i=t.node(r),o=i.order;!(os)&&c(n,e,u)}))}))}return r.reduce(e,(function(e,n){var a,o=-1,s=0;return r.forEach(n,(function(r,c){if("border"===t.node(r).dummy){var u=t.predecessors(r);u.length&&(a=t.node(u[0]).order,i(n,s,c,o,a),s=c,o=a)}i(n,s,n.length,a,e.length)})),n})),n}function c(t,e,n){if(e>n){var r=e;e=n,n=r}var i=t[e];i||(t[e]=i={}),i[n]=!0}function u(t,e,n){if(e>n){var i=e;e=n,n=i}return r.has(t[e],n)}function l(t,e,n,i){var a={},o={},s={};return r.forEach(e,(function(t){r.forEach(t,(function(t,e){a[t]=t,o[t]=t,s[t]=e}))})),r.forEach(e,(function(t){var e=-1;r.forEach(t,(function(t){var c=i(t);if(c.length)for(var l=((c=r.sortBy(c,(function(t){return s[t]}))).length-1)/2,f=Math.floor(l),h=Math.ceil(l);f<=h;++f){var d=c[f];o[t]===t&&e0}t.exports=function(t,e,r,i){var a,o,s,c,u,l,f,h,d,p,g,y,v;if(a=e.y-t.y,s=t.x-e.x,u=e.x*t.y-t.x*e.y,d=a*r.x+s*r.y+u,p=a*i.x+s*i.y+u,0!==d&&0!==p&&n(d,p))return;if(o=i.y-r.y,c=r.x-i.x,l=i.x*r.y-r.x*i.y,f=o*t.x+c*t.y+l,h=o*e.x+c*e.y+l,0!==f&&0!==h&&n(f,h))return;if(0===(g=a*c-o*s))return;return y=Math.abs(g/2),{x:(v=s*l-c*u)<0?(v-y)/g:(v+y)/g,y:(v=o*u-a*l)<0?(v-y)/g:(v+y)/g}}},function(t,e,n){var r=n(340),i=n(311),a=n(627).layout;t.exports=function(){var t=n(852),e=n(855),i=n(856),u=n(857),l=n(858),f=n(859),h=n(860),d=n(861),p=n(862),g=function(n,g){!function(t){t.nodes().forEach((function(e){var n=t.node(e);r.has(n,"label")||t.children(e).length||(n.label=e),r.has(n,"paddingX")&&r.defaults(n,{paddingLeft:n.paddingX,paddingRight:n.paddingX}),r.has(n,"paddingY")&&r.defaults(n,{paddingTop:n.paddingY,paddingBottom:n.paddingY}),r.has(n,"padding")&&r.defaults(n,{paddingLeft:n.padding,paddingRight:n.padding,paddingTop:n.padding,paddingBottom:n.padding}),r.defaults(n,o),r.each(["paddingLeft","paddingRight","paddingTop","paddingBottom"],(function(t){n[t]=Number(n[t])})),r.has(n,"width")&&(n._prevWidth=n.width),r.has(n,"height")&&(n._prevHeight=n.height)})),t.edges().forEach((function(e){var n=t.edge(e);r.has(n,"label")||(n.label=""),r.defaults(n,s)}))}(g);var y=c(n,"output"),v=c(y,"clusters"),m=c(y,"edgePaths"),b=i(c(y,"edgeLabels"),g),x=t(c(y,"nodes"),g,d);a(g),l(x,g),f(b,g),u(m,g,p);var _=e(v,g);h(_,g),function(t){r.each(t.nodes(),(function(e){var n=t.node(e);r.has(n,"_prevWidth")?n.width=n._prevWidth:delete n.width,r.has(n,"_prevHeight")?n.height=n._prevHeight:delete n.height,delete n._prevWidth,delete n._prevHeight}))}(g)};return g.createNodes=function(e){return arguments.length?(t=e,g):t},g.createClusters=function(t){return arguments.length?(e=t,g):e},g.createEdgeLabels=function(t){return arguments.length?(i=t,g):i},g.createEdgePaths=function(t){return arguments.length?(u=t,g):u},g.shapes=function(t){return arguments.length?(d=t,g):d},g.arrows=function(t){return arguments.length?(p=t,g):p},g};var o={paddingLeft:10,paddingRight:10,paddingTop:10,paddingBottom:10,rx:0,ry:0,shape:"rect"},s={arrowhead:"normal",curve:i.curveLinear};function c(t,e){var n=t.select("g."+e);return n.empty()&&(n=t.append("g").attr("class",e)),n}},function(t,e,n){"use strict";var r=n(340),i=n(440),a=n(286),o=n(311);t.exports=function(t,e,n){var s,c=e.nodes().filter((function(t){return!a.isSubgraph(e,t)})),u=t.selectAll("g.node").data(c,(function(t){return t})).classed("update",!0);u.exit().remove(),u.enter().append("g").attr("class","node").style("opacity",0),(u=t.selectAll("g.node")).each((function(t){var s=e.node(t),c=o.select(this);a.applyClass(c,s.class,(c.classed("update")?"update ":"")+"node"),c.select("g.label").remove();var u=c.append("g").attr("class","label"),l=i(u,s),f=n[s.shape],h=r.pick(l.node().getBBox(),"width","height");s.elem=this,s.id&&c.attr("id",s.id),s.labelId&&u.attr("id",s.labelId),r.has(s,"width")&&(h.width=s.width),r.has(s,"height")&&(h.height=s.height),h.width+=s.paddingLeft+s.paddingRight,h.height+=s.paddingTop+s.paddingBottom,u.attr("transform","translate("+(s.paddingLeft-s.paddingRight)/2+","+(s.paddingTop-s.paddingBottom)/2+")");var d=o.select(this);d.select(".label-container").remove();var p=f(d,h,s).classed("label-container",!0);a.applyStyle(p,s.style);var g=p.node().getBBox();s.width=g.width,s.height=g.height})),s=u.exit?u.exit():u.selectAll(null);return a.applyTransition(s,e).style("opacity",0).remove(),u}},function(t,e,n){var r=n(286);t.exports=function(t,e){for(var n=t.append("text"),i=function(t){for(var e,n="",r=!1,i=0;i=255?255:t<0?0:t},g:function(t){return t>=255?255:t<0?0:t},b:function(t){return t>=255?255:t<0?0:t},h:function(t){return t%360},s:function(t){return t>=100?100:t<0?0:t},l:function(t){return t>=100?100:t<0?0:t},a:function(t){return t>=1?1:t<0?0:t}},toLinear:function(t){var e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:function(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t},hsl2rgb:function(t,e){var n=t.h,i=t.s,a=t.l;if(100===i)return 2.55*a;n/=360,i/=100;var o=(a/=100)<.5?a*(1+i):a+i-a*i,s=2*a-o;switch(e){case"r":return 255*r.hue2rgb(s,o,n+1/3);case"g":return 255*r.hue2rgb(s,o,n);case"b":return 255*r.hue2rgb(s,o,n-1/3)}},rgb2hsl:function(t,e){var n=t.r,r=t.g,i=t.b;n/=255,r/=255,i/=255;var a=Math.max(n,r,i),o=Math.min(n,r,i),s=(a+o)/2;if("l"===e)return 100*s;if(a===o)return 0;var c=a-o;if("s"===e)return 100*(s>.5?c/(2-a-o):c/(a+o));switch(a){case n:return 60*((r-i)/c+(r1?e:"0"+e},dec2hex:function(t){var e=Math.round(t).toString(16);return e.length>1?e:"0"+e}};e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(287),i=n(441),a=n(871),o=function(){function t(t,e){this.color=e,this.changed=!1,this.data=t,this.type=new a.default}return t.prototype.set=function(t,e){return this.color=e,this.changed=!1,this.data=t,this.type.type=i.TYPE.ALL,this},t.prototype._ensureHSL=function(){void 0===this.data.h&&(this.data.h=r.default.channel.rgb2hsl(this.data,"h")),void 0===this.data.s&&(this.data.s=r.default.channel.rgb2hsl(this.data,"s")),void 0===this.data.l&&(this.data.l=r.default.channel.rgb2hsl(this.data,"l"))},t.prototype._ensureRGB=function(){void 0===this.data.r&&(this.data.r=r.default.channel.hsl2rgb(this.data,"r")),void 0===this.data.g&&(this.data.g=r.default.channel.hsl2rgb(this.data,"g")),void 0===this.data.b&&(this.data.b=r.default.channel.hsl2rgb(this.data,"b"))},Object.defineProperty(t.prototype,"r",{get:function(){return this.type.is(i.TYPE.HSL)||void 0===this.data.r?(this._ensureHSL(),r.default.channel.hsl2rgb(this.data,"r")):this.data.r},set:function(t){this.type.set(i.TYPE.RGB),this.changed=!0,this.data.r=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"g",{get:function(){return this.type.is(i.TYPE.HSL)||void 0===this.data.g?(this._ensureHSL(),r.default.channel.hsl2rgb(this.data,"g")):this.data.g},set:function(t){this.type.set(i.TYPE.RGB),this.changed=!0,this.data.g=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"b",{get:function(){return this.type.is(i.TYPE.HSL)||void 0===this.data.b?(this._ensureHSL(),r.default.channel.hsl2rgb(this.data,"b")):this.data.b},set:function(t){this.type.set(i.TYPE.RGB),this.changed=!0,this.data.b=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"h",{get:function(){return this.type.is(i.TYPE.RGB)||void 0===this.data.h?(this._ensureRGB(),r.default.channel.rgb2hsl(this.data,"h")):this.data.h},set:function(t){this.type.set(i.TYPE.HSL),this.changed=!0,this.data.h=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"s",{get:function(){return this.type.is(i.TYPE.RGB)||void 0===this.data.s?(this._ensureRGB(),r.default.channel.rgb2hsl(this.data,"s")):this.data.s},set:function(t){this.type.set(i.TYPE.HSL),this.changed=!0,this.data.s=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"l",{get:function(){return this.type.is(i.TYPE.RGB)||void 0===this.data.l?(this._ensureRGB(),r.default.channel.rgb2hsl(this.data,"l")):this.data.l},set:function(t){this.type.set(i.TYPE.HSL),this.changed=!0,this.data.l=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"a",{get:function(){return this.data.a},set:function(t){this.changed=!0,this.data.a=t},enumerable:!0,configurable:!0}),t}();e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(441),i=function(){function t(){this.type=r.TYPE.ALL}return t.prototype.get=function(){return this.type},t.prototype.set=function(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t},t.prototype.reset=function(){this.type=r.TYPE.ALL},t.prototype.is=function(t){return this.type===t},t}();e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(287),i={};e.DEC2HEX=i;for(var a=0;a<=255;a++)i[a]=r.default.unit.dec2hex(a)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(633),i={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:function(t){t=t.toLowerCase();var e=i.colors[t];if(e)return r.default.parse(e)},stringify:function(t){var e=r.default.stringify(t);for(var n in i.colors)if(i.colors[n]===e)return n}};e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(287),i=n(355),a={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:function(t){var e=t.charCodeAt(0);if(114===e||82===e){var n=t.match(a.re);if(n){var o=n[1],s=n[2],c=n[3],u=n[4],l=n[5],f=n[6],h=n[7],d=n[8];return i.default.set({r:r.default.channel.clamp.r(s?2.55*parseFloat(o):parseFloat(o)),g:r.default.channel.clamp.g(u?2.55*parseFloat(c):parseFloat(c)),b:r.default.channel.clamp.b(f?2.55*parseFloat(l):parseFloat(l)),a:h?r.default.channel.clamp.a(d?parseFloat(h)/100:parseFloat(h)):1},t)}}},stringify:function(t){return t.a<1?"rgba("+r.default.lang.round(t.r)+", "+r.default.lang.round(t.g)+", "+r.default.lang.round(t.b)+", "+r.default.lang.round(t.a)+")":"rgb("+r.default.lang.round(t.r)+", "+r.default.lang.round(t.g)+", "+r.default.lang.round(t.b)+")"}};e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(287),i=n(355),a={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:function(t){var e=t.match(a.hueRe);if(e){var n=e[1];switch(e[2]){case"grad":return r.default.channel.clamp.h(.9*parseFloat(n));case"rad":return r.default.channel.clamp.h(180*parseFloat(n)/Math.PI);case"turn":return r.default.channel.clamp.h(360*parseFloat(n))}}return r.default.channel.clamp.h(parseFloat(t))},parse:function(t){var e=t.charCodeAt(0);if(104===e||72===e){var n=t.match(a.re);if(n){var o=n[1],s=n[2],c=n[3],u=n[4],l=n[5];return i.default.set({h:a._hue2deg(o),s:r.default.channel.clamp.s(parseFloat(s)),l:r.default.channel.clamp.l(parseFloat(c)),a:u?r.default.channel.clamp.a(l?parseFloat(u)/100:parseFloat(u)):1},t)}}},stringify:function(t){return t.a<1?"hsla("+r.default.lang.round(t.h)+", "+r.default.lang.round(t.s)+"%, "+r.default.lang.round(t.l)+"%, "+t.a+")":"hsl("+r.default.lang.round(t.h)+", "+r.default.lang.round(t.s)+"%, "+r.default.lang.round(t.l)+"%)"}};e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(312);e.default=function(t){return r.default(t,"r")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(312);e.default=function(t){return r.default(t,"g")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(312);e.default=function(t){return r.default(t,"b")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(312);e.default=function(t){return r.default(t,"h")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(312);e.default=function(t){return r.default(t,"s")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(312);e.default=function(t){return r.default(t,"l")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(637);e.default=function(t){return!r.default(t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(295);e.default=function(t){try{return r.default.parse(t),!0}catch(t){return!1}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(324);e.default=function(t,e){return r.default(t,"s",e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(324);e.default=function(t,e){return r.default(t,"s",-e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(324);e.default=function(t,e){return r.default(t,"l",e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(324);e.default=function(t,e){return r.default(t,"l",-e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(324);e.default=function(t){return r.default(t,"h",180)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(386);e.default=function(t){return r.default(t,{s:0})}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(295),i=n(641);e.default=function(t,e){void 0===e&&(e=100);var n=r.default.parse(t);return n.r=255-n.r,n.g=255-n.g,n.b=255-n.b,i.default(n,t,e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(287),i=n(295),a=n(640);e.default=function(t,e){var n,o,s,c=i.default.parse(t),u={};for(var l in e)u[l]=(n=c[l],o=e[l],s=r.default.channel.max[l],o>0?(s-n)*o/100:n*o/100);return a.default(t,u)}},function(t,e,n){(function(t){t.exports=function(){"use strict";var e,r;function i(){return e.apply(null,arguments)}function a(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function o(t){return null!=t&&"[object Object]"===Object.prototype.toString.call(t)}function s(t){return void 0===t}function c(t){return"number"==typeof t||"[object Number]"===Object.prototype.toString.call(t)}function u(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function l(t,e){var n,r=[];for(n=0;n>>0,r=0;rEt(t)?(a=t+1,s-Et(t)):(a=t,s),{year:a,dayOfYear:o}}function $t(t,e,n){var r,i,a=Ut(t.year(),e,n),o=Math.floor((t.dayOfYear()-a-1)/7)+1;return o<1?r=o+Vt(i=t.year()-1,e,n):o>Vt(t.year(),e,n)?(r=o-Vt(t.year(),e,n),i=t.year()+1):(i=t.year(),r=o),{week:r,year:i}}function Vt(t,e,n){var r=Ut(t,e,n),i=Ut(t+1,e,n);return(Et(t)-r+i)/7}function Ht(t,e){return t.slice(e,7).concat(t.slice(0,e))}$("w",["ww",2],"wo","week"),$("W",["WW",2],"Wo","isoWeek"),B("week","w"),B("isoWeek","W"),I("week",5),I("isoWeek",5),lt("w",Q),lt("ww",Q,q),lt("W",Q),lt("WW",Q,q),gt(["w","ww","W","WW"],(function(t,e,n,r){e[r.substr(0,1)]=k(t)})),$("d",0,"do","day"),$("dd",0,0,(function(t){return this.localeData().weekdaysMin(this,t)})),$("ddd",0,0,(function(t){return this.localeData().weekdaysShort(this,t)})),$("dddd",0,0,(function(t){return this.localeData().weekdays(this,t)})),$("e",0,0,"weekday"),$("E",0,0,"isoWeekday"),B("day","d"),B("weekday","e"),B("isoWeekday","E"),I("day",11),I("weekday",11),I("isoWeekday",11),lt("d",Q),lt("e",Q),lt("E",Q),lt("dd",(function(t,e){return e.weekdaysMinRegex(t)})),lt("ddd",(function(t,e){return e.weekdaysShortRegex(t)})),lt("dddd",(function(t,e){return e.weekdaysRegex(t)})),gt(["dd","ddd","dddd"],(function(t,e,n,r){var i=n._locale.weekdaysParse(t,r,n._strict);null!=i?e.d=i:p(n).invalidWeekday=t})),gt(["d","e","E"],(function(t,e,n,r){e[r]=k(t)}));var Gt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),qt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Xt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Zt=ct,Jt=ct,Qt=ct;function Kt(){function t(t,e){return e.length-t.length}var e,n,r,i,a,o=[],s=[],c=[],u=[];for(e=0;e<7;e++)n=d([2e3,1]).day(e),r=this.weekdaysMin(n,""),i=this.weekdaysShort(n,""),a=this.weekdays(n,""),o.push(r),s.push(i),c.push(a),u.push(r),u.push(i),u.push(a);for(o.sort(t),s.sort(t),c.sort(t),u.sort(t),e=0;e<7;e++)s[e]=ht(s[e]),c[e]=ht(c[e]),u[e]=ht(u[e]);this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function te(){return this.hours()%12||12}function ee(t,e){$(t,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)}))}function ne(t,e){return e._meridiemParse}$("H",["HH",2],0,"hour"),$("h",["hh",2],0,te),$("k",["kk",2],0,(function(){return this.hours()||24})),$("hmm",0,0,(function(){return""+te.apply(this)+R(this.minutes(),2)})),$("hmmss",0,0,(function(){return""+te.apply(this)+R(this.minutes(),2)+R(this.seconds(),2)})),$("Hmm",0,0,(function(){return""+this.hours()+R(this.minutes(),2)})),$("Hmmss",0,0,(function(){return""+this.hours()+R(this.minutes(),2)+R(this.seconds(),2)})),ee("a",!0),ee("A",!1),B("hour","h"),I("hour",13),lt("a",ne),lt("A",ne),lt("H",Q),lt("h",Q),lt("k",Q),lt("HH",Q,q),lt("hh",Q,q),lt("kk",Q,q),lt("hmm",K),lt("hmmss",tt),lt("Hmm",K),lt("Hmmss",tt),pt(["H","HH"],bt),pt(["k","kk"],(function(t,e,n){var r=k(t);e[bt]=24===r?0:r})),pt(["a","A"],(function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t})),pt(["h","hh"],(function(t,e,n){e[bt]=k(t),p(n).bigHour=!0})),pt("hmm",(function(t,e,n){var r=t.length-2;e[bt]=k(t.substr(0,r)),e[xt]=k(t.substr(r)),p(n).bigHour=!0})),pt("hmmss",(function(t,e,n){var r=t.length-4,i=t.length-2;e[bt]=k(t.substr(0,r)),e[xt]=k(t.substr(r,2)),e[_t]=k(t.substr(i)),p(n).bigHour=!0})),pt("Hmm",(function(t,e,n){var r=t.length-2;e[bt]=k(t.substr(0,r)),e[xt]=k(t.substr(r))})),pt("Hmmss",(function(t,e,n){var r=t.length-4,i=t.length-2;e[bt]=k(t.substr(0,r)),e[xt]=k(t.substr(r,2)),e[_t]=k(t.substr(i))}));var re,ie=Mt("Hours",!0),ae={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Bt,monthsShort:Lt,week:{dow:0,doy:6},weekdays:Gt,weekdaysMin:Xt,weekdaysShort:qt,meridiemParse:/[ap]\.?m?\.?/i},oe={},se={};function ce(t){return t?t.toLowerCase().replace("_","-"):t}function ue(e){var r=null;if(!oe[e]&&void 0!==t&&t&&t.exports)try{r=re._abbr,n(893)("./"+e),le(r)}catch(e){}return oe[e]}function le(t,e){var n;return t&&((n=s(e)?he(t):fe(t,e))?re=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),re._abbr}function fe(t,e){if(null===e)return delete oe[t],null;var n,r=ae;if(e.abbr=t,null!=oe[t])M("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=oe[t]._config;else if(null!=e.parentLocale)if(null!=oe[e.parentLocale])r=oe[e.parentLocale]._config;else{if(null==(n=ue(e.parentLocale)))return se[e.parentLocale]||(se[e.parentLocale]=[]),se[e.parentLocale].push({name:t,config:e}),null;r=n._config}return oe[t]=new D(j(r,e)),se[t]&&se[t].forEach((function(t){fe(t.name,t.config)})),le(t),oe[t]}function he(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return re;if(!a(t)){if(e=ue(t))return e;t=[t]}return function(t){for(var e,n,r,i,a=0;a=e&&C(i,n,!0)>=e-1)break;e--}a++}return re}(t)}function de(t){var e,n=t._a;return n&&-2===p(t).overflow&&(e=n[vt]<0||11Dt(n[yt],n[vt])?mt:n[bt]<0||24Vt(n,a,o)?p(t)._overflowWeeks=!0:null!=c?p(t)._overflowWeekday=!0:(s=Wt(n,r,i,a,o),t._a[yt]=s.year,t._dayOfYear=s.dayOfYear)}(t),null!=t._dayOfYear&&(o=pe(t._a[yt],r[yt]),(t._dayOfYear>Et(o)||0===t._dayOfYear)&&(p(t)._overflowDayOfYear=!0),n=zt(o,0,t._dayOfYear),t._a[vt]=n.getUTCMonth(),t._a[mt]=n.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=s[e]=r[e];for(;e<7;e++)t._a[e]=s[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[bt]&&0===t._a[xt]&&0===t._a[_t]&&0===t._a[wt]&&(t._nextDay=!0,t._a[bt]=0),t._d=(t._useUTC?zt:function(t,e,n,r,i,a,o){var s;return t<100&&0<=t?(s=new Date(t+400,e,n,r,i,a,o),isFinite(s.getFullYear())&&s.setFullYear(t)):s=new Date(t,e,n,r,i,a,o),s}).apply(null,s),a=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[bt]=24),t._w&&void 0!==t._w.d&&t._w.d!==a&&(p(t).weekdayMismatch=!0)}}var ye=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ve=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,me=/Z|[+-]\d\d(?::?\d\d)?/,be=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],xe=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],_e=/^\/?Date\((\-?\d+)/i;function we(t){var e,n,r,i,a,o,s=t._i,c=ye.exec(s)||ve.exec(s);if(c){for(p(t).iso=!0,e=0,n=be.length;en.valueOf():n.valueOf()this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},yn.isLocal=function(){return!!this.isValid()&&!this._isUTC},yn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},yn.isUtc=We,yn.isUTC=We,yn.zoneAbbr=function(){return this._isUTC?"UTC":""},yn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},yn.dates=T("dates accessor is deprecated. Use date instead.",ln),yn.months=T("months accessor is deprecated. Use month instead",Pt),yn.years=T("years accessor is deprecated. Use year instead",At),yn.zone=T("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()})),yn.isDSTShifted=T("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!s(this._isDSTShifted))return this._isDSTShifted;var t={};if(m(t,this),(t=Ae(t))._a){var e=t._isUTC?d(t._a):Oe(t._a);this._isDSTShifted=this.isValid()&&0])/g,m=/([[}=:>])\s+/g,b=/(\{[^{]+?);(?=\})/g,x=/\s{2,}/g,_=/([^\(])(:+) */g,w=/[svh]\w+-[tblr]{2}/,k=/\(\s*(.*)\s*\)/g,C=/([\s\S]*?);/g,E=/-self|flex-/g,T=/[^]*?(:[rp][el]a[\w-]+)[^]*/,S=/stretch|:\s*\w+\-(?:conte|avail)/,A=/([^-])(image-set\()/,M="-webkit-",O="-moz-",j="-ms-",D=59,N=125,B=123,L=40,F=41,P=91,I=93,R=10,Y=13,z=9,U=64,W=32,$=38,V=45,H=95,G=42,q=44,X=58,Z=39,J=34,Q=47,K=62,tt=43,et=126,nt=0,rt=12,it=11,at=107,ot=109,st=115,ct=112,ut=111,lt=105,ft=99,ht=100,dt=112,pt=1,gt=1,yt=0,vt=1,mt=1,bt=1,xt=0,_t=0,wt=0,kt=[],Ct=[],Et=0,Tt=null,St=-2,At=-1,Mt=0,Ot=1,jt=2,Dt=3,Nt=0,Bt=1,Lt="",Ft="",Pt="";function It(t,e,i,a,o){for(var s,c,u=0,l=0,f=0,h=0,d=0,v=0,m=0,b=0,x=0,_=0,w=0,C=0,E=0,T=0,S=0,A=0,H=0,bt=0,xt=0,Ct=i.length,Tt=Ct-1,St="",At="",Yt="",$t="",qt="",Xt="";S0&&(At=At.replace(r,"")),At.trim().length>0)){switch(m){case W:case z:case D:case Y:case R:break;default:At+=i.charAt(S)}m=D}if(1===H)switch(m){case B:case N:case D:case J:case Z:case L:case F:case q:H=0;case z:case Y:case R:case W:break;default:for(H=0,xt=S,d=m,S--,m=D;xt0&&(++S,m=d);case B:xt=Ct}}switch(m){case B:for(d=(At=At.trim()).charCodeAt(0),w=1,xt=++S;S0&&(At=At.replace(r,"")),v=At.charCodeAt(1)){case ht:case ot:case st:case V:s=e;break;default:s=kt}if(xt=(Yt=It(e,s,Yt,v,o+1)).length,wt>0&&0===xt&&(xt=At.length),Et>0&&(s=Rt(kt,At,bt),c=Ht(Dt,Yt,s,e,gt,pt,xt,v,o,a),At=s.join(""),void 0!==c&&0===(xt=(Yt=c.trim()).length)&&(v=0,Yt="")),xt>0)switch(v){case st:At=At.replace(k,Wt);case ht:case ot:case V:Yt=At+"{"+Yt+"}";break;case at:Yt=(At=At.replace(p,"$1 $2"+(Bt>0?Lt:"")))+"{"+Yt+"}",Yt=1===mt||2===mt&&Ut("@"+Yt,3)?"@"+M+Yt+"@"+Yt:"@"+Yt;break;default:Yt=At+Yt,a===dt&&($t+=Yt,Yt="")}else Yt="";break;default:Yt=It(e,Rt(e,At,bt),Yt,a,o+1)}qt+=Yt,C=0,H=0,T=0,A=0,bt=0,E=0,At="",Yt="",m=i.charCodeAt(++S);break;case N:case D:if((xt=(At=(A>0?At.replace(r,""):At).trim()).length)>1)switch(0===T&&((d=At.charCodeAt(0))===V||d>96&&d<123)&&(xt=(At=At.replace(" ",":")).length),Et>0&&void 0!==(c=Ht(Ot,At,e,t,gt,pt,$t.length,a,o,a))&&0===(xt=(At=c.trim()).length)&&(At="\0\0"),d=At.charCodeAt(0),v=At.charCodeAt(1),d){case nt:break;case U:if(v===lt||v===ft){Xt+=At+i.charAt(S);break}default:if(At.charCodeAt(xt-1)===X)break;$t+=zt(At,d,v,At.charCodeAt(2))}C=0,H=0,T=0,A=0,bt=0,At="",m=i.charCodeAt(++S)}}switch(m){case Y:case R:if(l+h+f+u+_t===0)switch(_){case F:case Z:case J:case U:case et:case K:case G:case tt:case Q:case V:case X:case q:case D:case B:case N:break;default:T>0&&(H=1)}l===Q?l=0:vt+C===0&&a!==at&&At.length>0&&(A=1,At+="\0"),Et*Nt>0&&Ht(Mt,At,e,t,gt,pt,$t.length,a,o,a),pt=1,gt++;break;case D:case N:if(l+h+f+u===0){pt++;break}default:switch(pt++,St=i.charAt(S),m){case z:case W:if(h+u+l===0)switch(b){case q:case X:case z:case W:St="";break;default:m!==W&&(St=" ")}break;case nt:St="\\0";break;case rt:St="\\f";break;case it:St="\\v";break;case $:h+l+u===0&&vt>0&&(bt=1,A=1,St="\f"+St);break;case 108:if(h+l+u+yt===0&&T>0)switch(S-T){case 2:b===ct&&i.charCodeAt(S-3)===X&&(yt=b);case 8:x===ut&&(yt=x)}break;case X:h+l+u===0&&(T=S);break;case q:l+f+h+u===0&&(A=1,St+="\r");break;case J:case Z:0===l&&(h=h===m?0:0===h?m:h);break;case P:h+l+f===0&&u++;break;case I:h+l+f===0&&u--;break;case F:h+l+u===0&&f--;break;case L:if(h+l+u===0){if(0===C)switch(2*b+3*x){case 533:break;default:w=0,C=1}f++}break;case U:l+f+h+u+T+E===0&&(E=1);break;case G:case Q:if(h+u+f>0)break;switch(l){case 0:switch(2*m+3*i.charCodeAt(S+1)){case 235:l=Q;break;case 220:xt=S,l=G}break;case G:m===Q&&b===G&&xt+2!==S&&(33===i.charCodeAt(xt+2)&&($t+=i.substring(xt,S+1)),St="",l=0)}}if(0===l){if(vt+h+u+E===0&&a!==at&&m!==D)switch(m){case q:case et:case K:case tt:case F:case L:if(0===C){switch(b){case z:case W:case R:case Y:St+="\0";break;default:St="\0"+St+(m===q?"":"\0")}A=1}else switch(m){case L:T+7===S&&108===b&&(T=0),C=++w;break;case F:0==(C=--w)&&(A=1,St+="\0")}break;case z:case W:switch(b){case nt:case B:case N:case D:case q:case rt:case z:case W:case R:case Y:break;default:0===C&&(A=1,St+="\0")}}At+=St,m!==W&&m!==z&&(_=m)}}x=b,b=m,S++}if(xt=$t.length,wt>0&&0===xt&&0===qt.length&&0===e[0].length==0&&(a!==ot||1===e.length&&(vt>0?Ft:Pt)===e[0])&&(xt=e.join(",").length+2),xt>0){if(s=0===vt&&a!==at?Vt(e):e,Et>0&&void 0!==(c=Ht(jt,$t,s,t,gt,pt,xt,a,o,a))&&0===($t=c).length)return Xt+$t+qt;if($t=s.join(",")+"{"+$t+"}",mt*yt!=0){switch(2!==mt||Ut($t,2)||(yt=0),yt){case ut:$t=$t.replace(y,":"+O+"$1")+$t;break;case ct:$t=$t.replace(g,"::"+M+"input-$1")+$t.replace(g,"::"+O+"$1")+$t.replace(g,":"+j+"input-$1")+$t}yt=0}}return Xt+$t+qt}function Rt(t,e,n){var r=e.trim().split(l),i=r,a=r.length,o=t.length;switch(o){case 0:case 1:for(var s=0,c=0===o?"":t[0]+" ";s0&&vt>0)return i.replace(h,"$1").replace(f,"$1"+Pt);break;default:return t.trim()+i.replace(f,"$1"+t.trim())}default:if(n*vt>0&&i.indexOf("\f")>0)return i.replace(f,(t.charCodeAt(0)===X?"":"$1")+t.trim())}return t+i}function zt(t,e,n,r){var s,c=0,u=t+";",l=2*e+3*n+4*r;if(944===l)return $t(u);if(0===mt||2===mt&&!Ut(u,1))return u;switch(l){case 1015:return 97===u.charCodeAt(10)?M+u+u:u;case 951:return 116===u.charCodeAt(3)?M+u+u:u;case 963:return 110===u.charCodeAt(5)?M+u+u:u;case 1009:if(100!==u.charCodeAt(4))break;case 969:case 942:return M+u+u;case 978:return M+u+O+u+u;case 1019:case 983:return M+u+O+u+j+u+u;case 883:return u.charCodeAt(8)===V?M+u+u:u.indexOf("image-set(",11)>0?u.replace(A,"$1"+M+"$2")+u:u;case 932:if(u.charCodeAt(4)===V)switch(u.charCodeAt(5)){case 103:return M+"box-"+u.replace("-grow","")+M+u+j+u.replace("grow","positive")+u;case 115:return M+u+j+u.replace("shrink","negative")+u;case 98:return M+u+j+u.replace("basis","preferred-size")+u}return M+u+j+u+u;case 964:return M+u+j+"flex-"+u+u;case 1023:if(99!==u.charCodeAt(8))break;return s=u.substring(u.indexOf(":",15)).replace("flex-","").replace("space-between","justify"),M+"box-pack"+s+M+u+j+"flex-pack"+s+u;case 1005:return a.test(u)?u.replace(i,":"+M)+u.replace(i,":"+O)+u:u;case 1e3:switch(c=(s=u.substring(13).trim()).indexOf("-")+1,s.charCodeAt(0)+s.charCodeAt(c)){case 226:s=u.replace(w,"tb");break;case 232:s=u.replace(w,"tb-rl");break;case 220:s=u.replace(w,"lr");break;default:return u}return M+u+j+s+u;case 1017:if(-1===u.indexOf("sticky",9))return u;case 975:switch(c=(u=t).length-10,l=(s=(33===u.charCodeAt(c)?u.substring(0,c):u).substring(t.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|s.charCodeAt(7))){case 203:if(s.charCodeAt(8)<111)break;case 115:u=u.replace(s,M+s)+";"+u;break;case 207:case 102:u=u.replace(s,M+(l>102?"inline-":"")+"box")+";"+u.replace(s,M+s)+";"+u.replace(s,j+s+"box")+";"+u}return u+";";case 938:if(u.charCodeAt(5)===V)switch(u.charCodeAt(6)){case 105:return s=u.replace("-items",""),M+u+M+"box-"+s+j+"flex-"+s+u;case 115:return M+u+j+"flex-item-"+u.replace(E,"")+u;default:return M+u+j+"flex-line-pack"+u.replace("align-content","").replace(E,"")+u}break;case 973:case 989:if(u.charCodeAt(3)!==V||122===u.charCodeAt(4))break;case 931:case 953:if(!0===S.test(t))return 115===(s=t.substring(t.indexOf(":")+1)).charCodeAt(0)?zt(t.replace("stretch","fill-available"),e,n,r).replace(":fill-available",":stretch"):u.replace(s,M+s)+u.replace(s,O+s.replace("fill-",""))+u;break;case 962:if(u=M+u+(102===u.charCodeAt(5)?j+u:"")+u,n+r===211&&105===u.charCodeAt(13)&&u.indexOf("transform",10)>0)return u.substring(0,u.indexOf(";",27)+1).replace(o,"$1"+M+"$2")+u}return u}function Ut(t,e){var n=t.indexOf(1===e?":":"{"),r=t.substring(0,3!==e?n:10),i=t.substring(n+1,t.length-1);return Tt(2!==e?r:r.replace(T,"$1"),i,e)}function Wt(t,e){var n=zt(e,e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2));return n!==e+";"?n.replace(C," or ($1)").substring(4):"("+e+")"}function $t(t){var e=t.length,n=t.indexOf(":",9)+1,r=t.substring(0,n).trim(),i=t.substring(n,e-1).trim();switch(t.charCodeAt(9)*Bt){case 0:break;case V:if(110!==t.charCodeAt(10))break;default:var a=i.split((i="",s)),o=0;for(n=0,e=a.length;oU&&f<90||f>96&&f<123||f===H||f===V&&u.charCodeAt(1)!==V))switch(isNaN(parseFloat(u))+(-1!==u.indexOf("("))){case 1:switch(u){case"infinite":case"alternate":case"backwards":case"running":case"normal":case"forwards":case"both":case"none":case"linear":case"ease":case"ease-in":case"ease-out":case"ease-in-out":case"paused":case"reverse":case"alternate-reverse":case"inherit":case"initial":case"unset":case"step-start":case"step-end":break;default:u+=Lt}}l[n++]=u}i+=(0===o?"":",")+l.join(" ")}}return i=r+i+";",1===mt||2===mt&&Ut(i,1)?M+i+i:i}function Vt(t){for(var e,n,i=0,a=t.length,o=Array(a);i1)){if(h=c.charCodeAt(c.length-1),d=n.charCodeAt(0),e="",0!==l)switch(h){case G:case et:case K:case tt:case W:case L:break;default:e=" "}switch(d){case $:n=e+Ft;case et:case K:case tt:case W:case F:case L:break;case P:n=e+n+Ft;break;case X:switch(2*n.charCodeAt(1)+3*n.charCodeAt(2)){case 530:if(bt>0){n=e+n.substring(8,f-1);break}default:(l<1||s[l-1].length<1)&&(n=e+Ft+n)}break;case q:e="";default:n=f>1&&n.indexOf(":")>0?e+n.replace(_,"$1"+Ft+"$2"):e+n+Ft}c+=n}o[i]=c.replace(r,"").trim()}return o}function Ht(t,e,n,r,i,a,o,s,c,u){for(var l,f=0,h=e;f0&&(Lt=r.replace(d,i===P?"":"-")),i=1,1===vt?Pt=r:Ft=r;var a,o=[Pt];Et>0&&void 0!==(a=Ht(At,n,o,o,gt,pt,0,0,0,0))&&"string"==typeof a&&(n=a);var s=It(kt,o,n,0,0);return Et>0&&void 0!==(a=Ht(St,s,o,o,gt,pt,s.length,0,0,0))&&"string"!=typeof(s=a)&&(i=0),Lt="",Pt="",Ft="",yt=0,gt=1,pt=1,xt*i==0?s:qt(s)}return Jt.use=Xt,Jt.set=Zt,void 0!==e&&Zt(e),Jt}(null)},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){var r;"undefined"!=typeof self&&self,r=function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s="./src/mermaid.js")}({"./node_modules/node-libs-browser/mock/empty.js":function(t,e){},"./node_modules/path-browserify/index.js":function(t,e,n){(function(t){function n(t,e){for(var n=0,r=t.length-1;r>=0;r--){var i=t[r];"."===i?t.splice(r,1):".."===i?(t.splice(r,1),n++):n&&(t.splice(r,1),n--)}if(e)for(;n--;n)t.unshift("..");return t}function r(t,e){if(t.filter)return t.filter(e);for(var n=[],r=0;r=-1&&!i;a--){var o=a>=0?arguments[a]:t.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");o&&(e=o+"/"+e,i="/"===o.charAt(0))}return(i?"/":"")+(e=n(r(e.split("/"),(function(t){return!!t})),!i).join("/"))||"."},e.normalize=function(t){var a=e.isAbsolute(t),o="/"===i(t,-1);return(t=n(r(t.split("/"),(function(t){return!!t})),!a).join("/"))||a||(t="."),t&&o&&(t+="/"),(a?"/":"")+t},e.isAbsolute=function(t){return"/"===t.charAt(0)},e.join=function(){var t=Array.prototype.slice.call(arguments,0);return e.normalize(r(t,(function(t,e){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t})).join("/"))},e.relative=function(t,n){function r(t){for(var e=0;e=0&&""===t[n];n--);return e>n?[]:t.slice(e,n-e+1)}t=e.resolve(t).substr(1),n=e.resolve(n).substr(1);for(var i=r(t.split("/")),a=r(n.split("/")),o=Math.min(i.length,a.length),s=o,c=0;c=1;--a)if(47===(e=t.charCodeAt(a))){if(!i){r=a;break}}else i=!1;return-1===r?n?"/":".":n&&1===r?"/":t.slice(0,r)},e.basename=function(t,e){var n=function(t){"string"!=typeof t&&(t+="");var e,n=0,r=-1,i=!0;for(e=t.length-1;e>=0;--e)if(47===t.charCodeAt(e)){if(!i){n=e+1;break}}else-1===r&&(i=!1,r=e+1);return-1===r?"":t.slice(n,r)}(t);return e&&n.substr(-1*e.length)===e&&(n=n.substr(0,n.length-e.length)),n},e.extname=function(t){"string"!=typeof t&&(t+="");for(var e=-1,n=0,r=-1,i=!0,a=0,o=t.length-1;o>=0;--o){var s=t.charCodeAt(o);if(47!==s)-1===r&&(i=!1,r=o+1),46===s?-1===e?e=o:1!==a&&(a=1):-1!==e&&(a=-1);else if(!i){n=o+1;break}}return-1===e||-1===r||0===a||1===a&&e===r-1&&e===n+1?"":t.slice(e,r)};var i="b"==="ab".substr(-1)?function(t,e,n){return t.substr(e,n)}:function(t,e,n){return e<0&&(e=t.length+e),t.substr(e,n)}}).call(this,n("./node_modules/process/browser.js"))},"./node_modules/process/browser.js":function(t,e){var n,r,i=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(t){n=a}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(t){r=o}}();var c,u=[],l=!1,f=-1;function h(){l&&c&&(l=!1,c.length?u=c.concat(u):f=-1,u.length&&d())}function d(){if(!l){var t=s(h);l=!0;for(var e=u.length;e;){for(c=u,u=[];++f1)for(var n=1;n docs/getting-started/Setup.md","build:watch":"yarn build --watch","minify":"minify ./dist/mermaid.js > ./dist/mermaid.min.js","release":"yarn build","lint":"eslint src","e2e:depr":"yarn lint && jest e2e --config e2e/jest.config.js","cypress":"percy exec -- cypress run","e2e":"start-server-and-test dev http://localhost:9000/ cypress","e2e-upd":"yarn lint && jest e2e -u --config e2e/jest.config.js","dev":"webpack-dev-server --config webpack.config.e2e.js","test":"yarn lint && jest src/.*","test:watch":"jest --watch src","prepublishOnly":"yarn build && yarn test && yarn e2e","prepare":"yarn build"},"repository":{"type":"git","url":"https://github.com/knsv/mermaid"},"author":"Knut Sveidqvist","license":"MIT","standard":{"ignore":["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],"globals":["page"]},"dependencies":{"@braintree/sanitize-url":"^3.1.0","babel-eslint":"^10.1.0","d3":"^5.7.0","dagre":"^0.8.4","dagre-d3":"^0.6.4","entity-decode":"^2.0.2","graphlib":"^2.1.7","he":"^1.2.0","khroma":"^1.1.0","minify":"^4.1.1","moment-mini":"^2.22.1","stylis":"^3.5.2"},"devDependencies":{"@babel/core":"^7.2.2","@babel/preset-env":"^7.8.4","@babel/register":"^7.0.0","@percy/cypress":"*","babel-core":"7.0.0-bridge.0","babel-jest":"^24.9.0","babel-loader":"^8.0.4","coveralls":"^3.0.2","css-loader":"^2.0.1","css-to-string-loader":"^0.1.3","cypress":"4.0.1","documentation":"^12.0.1","eslint":"^6.3.0","eslint-config-prettier":"^6.3.0","eslint-plugin-prettier":"^3.1.0","husky":"^1.2.1","identity-obj-proxy":"^3.0.0","jest":"^24.9.0","jison":"^0.4.18","moment":"^2.23.0","node-sass":"^4.12.0","prettier":"^1.18.2","puppeteer":"^1.17.0","sass-loader":"^7.1.0","start-server-and-test":"^1.10.6","terser-webpack-plugin":"^2.2.2","webpack":"^4.41.2","webpack-bundle-analyzer":"^3.7.0","webpack-cli":"^3.1.2","webpack-dev-server":"^3.4.1","webpack-node-externals":"^1.7.2","yarn-upgrade-all":"^0.5.0"},"files":["dist"],"yarn-upgrade-all":{"ignore":["babel-core"]},"sideEffects":["**/*.css","**/*.scss"],"husky":{"hooks":{"pre-push":"yarn test"}}}')},"./src/config.js":function(t,e,n){"use strict";n.r(e),n.d(e,"defaultConfig",(function(){return c})),n.d(e,"updateCurrentConfig",(function(){return h})),n.d(e,"setSiteConfig",(function(){return d})),n.d(e,"setSiteConfigDelta",(function(){return p})),n.d(e,"updateSiteConfig",(function(){return g})),n.d(e,"getSiteConfig",(function(){return y})),n.d(e,"setConfig",(function(){return v})),n.d(e,"getConfig",(function(){return m})),n.d(e,"sanitize",(function(){return b})),n.d(e,"addDirective",(function(){return x})),n.d(e,"reset",(function(){return _}));var r,i=n("./src/utils.js"),a=n("./src/logger.js"),o=n("./src/themes/index.js"),s=n("./src/defaultConfig.js"),c=Object.freeze(s.default),u=Object(i.assignWithDepth)({},c),l=[],f=Object(i.assignWithDepth)({},c),h=function(t,e){for(var n=Object(i.assignWithDepth)({},t),a={},s=0;s"),i.logger.info("vertexText"+s),function(t){var e,n,i=Object(r.select)(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),a=i.append("xhtml:div"),o=t.label,s=t.isNode?"nodeLabel":"edgeLabel";return a.html(''+o+""),e=a,(n=t.labelStyle)&&e.attr("style",n),a.style("display","inline-block"),a.style("white-space","nowrap"),a.attr("xmlns","http://www.w3.org/1999/xhtml"),i.node()}({isNode:o,label:s.replace(/fa[lrsb]?:fa-[\w-]+/g,(function(t){return"")}))});var c=document.createElementNS("http://www.w3.org/2000/svg","text");c.setAttribute("style",e.replace("color:","fill:"));var u=[];u="string"==typeof s?s.split(/\\n|\n|/gi):Array.isArray(s)?s:[];for(var l=0;l=o||a>=s},d=function(t,e,n){r.logger.warn("intersection calc o:",e," i:",n,t);var i=t.x,a=t.y,o=Math.abs(i-n.x),s=t.width/2,c=n.xMath.abs(i-e.x)*u){var y=n.y=0;x--){var _=u[x],w=i[n.fromCluster].node;if(h(w,_)||b)r.logger.trace("Outside point",_),b||m.unshift(_);else{r.logger.warn("inside",n.fromCluster,_,w);var k=d(w,v,_);m.unshift(k),b=!0}v=_}u=m,l=!0}var C,E=u.filter((function(t){return!Number.isNaN(t.y)})),T=Object(a.line)().x((function(t){return t.x})).y((function(t){return t.y})).curve(a.curveBasis);switch(n.thickness){case"normal":C="edge-thickness-normal";break;case"thick":C="edge-thickness-thick";break;default:C=""}switch(n.pattern){case"solid":C+=" edge-pattern-solid";break;case"dotted":C+=" edge-pattern-dotted";break;case"dashed":C+=" edge-pattern-dashed"}var S=t.append("path").attr("d",T(E)).attr("id",n.id).attr("class"," "+C+(n.classes?" "+n.classes:"")),A="";switch(Object(o.getConfig)().state.arrowMarkerAbsolute&&(A=(A=(A=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),r.logger.info("arrowTypeStart",n.arrowTypeStart),r.logger.info("arrowTypeEnd",n.arrowTypeEnd),n.arrowTypeStart){case"arrow_cross":S.attr("marker-start","url("+A+"#"+s+"-crossStart)");break;case"arrow_point":S.attr("marker-start","url("+A+"#"+s+"-pointStart)");break;case"arrow_barb":S.attr("marker-start","url("+A+"#"+s+"-barbStart)");break;case"arrow_circle":S.attr("marker-start","url("+A+"#"+s+"-circleStart)");break;case"aggregation":S.attr("marker-start","url("+A+"#"+s+"-aggregationStart)");break;case"extension":S.attr("marker-start","url("+A+"#"+s+"-extensionStart)");break;case"composition":S.attr("marker-start","url("+A+"#"+s+"-compositionStart)");break;case"dependency":S.attr("marker-start","url("+A+"#"+s+"-dependencyStart)")}switch(n.arrowTypeEnd){case"arrow_cross":S.attr("marker-end","url("+A+"#"+s+"-crossEnd)");break;case"arrow_point":S.attr("marker-end","url("+A+"#"+s+"-pointEnd)");break;case"arrow_barb":S.attr("marker-end","url("+A+"#"+s+"-barbEnd)");break;case"arrow_circle":S.attr("marker-end","url("+A+"#"+s+"-circleEnd)");break;case"aggregation":S.attr("marker-end","url("+A+"#"+s+"-aggregationEnd)");break;case"extension":S.attr("marker-end","url("+A+"#"+s+"-extensionEnd)");break;case"composition":S.attr("marker-end","url("+A+"#"+s+"-compositionEnd)");break;case"dependency":S.attr("marker-end","url("+A+"#"+s+"-dependencyEnd)")}if(l)return u}},"./src/dagre-wrapper/index.js":function(t,e,n){"use strict";n.r(e),n.d(e,"render",(function(){return p}));var r=n("dagre"),i=n.n(r),a=n("graphlib"),o=n.n(a),s=n("./src/dagre-wrapper/markers.js"),c=n("./src/dagre-wrapper/shapes/util.js"),u=n("./src/dagre-wrapper/mermaid-graphlib.js"),l=n("./src/dagre-wrapper/nodes.js"),f=n("./src/dagre-wrapper/clusters.js"),h=n("./src/dagre-wrapper/edges.js"),d=n("./src/logger.js"),p=function(t,e,n,r,a){Object(s.default)(t,n,r,a),Object(l.clear)(),Object(h.clear)(),Object(f.clear)(),Object(u.clear)(),d.logger.warn("Graph before:",o.a.json.write(e)),Object(u.adjustClustersAndEdges)(e),d.logger.warn("Graph after:",o.a.json.write(e)),d.logger.warn("Graph ever after:",e.graph()),function t(e,n,r,a){d.logger.info("Graph in recursive render:",o.a.json.write(n),a);var s=n.graph().rankdir;d.logger.warn("Dir in recursive render - dir:",s);var p=e.insert("g").attr("class","root");n.nodes()?d.logger.info("Recursive render",n.nodes()):d.logger.info("No nodes found for",n),n.edges().length>0&&d.logger.info("Recursive edges",n.edge(n.edges()[0]));var g=p.insert("g").attr("class","clusters"),y=p.insert("g").attr("class","edgePaths"),v=p.insert("g").attr("class","edgeLabels"),m=p.insert("g").attr("class","nodes");return n.nodes().forEach((function(e){var i=n.node(e);if(void 0!==a){var o=JSON.parse(JSON.stringify(a.clusterData));d.logger.info("Setting data for cluster",o),n.setNode(a.id,o),n.setParent(e,a.id,o)}if(d.logger.info("(Insert) Node "+e+": "+JSON.stringify(n.node(e))),i&&i.clusterNode){d.logger.info("Cluster identified",e,i,n.node(e));var f=t(m,i.graph,r,n.node(e));Object(c.updateNodeBounds)(i,f),Object(l.setNodeElem)(f,i),d.logger.warn("Recursive render complete",f,i)}else n.children(e).length>0?(d.logger.info("Cluster - the non recursive path",e,i.id,i,n),d.logger.info(Object(u.findNonClusterChild)(i.id,n)),u.clusterDb[i.id]={id:Object(u.findNonClusterChild)(i.id,n),node:i}):(d.logger.info("Node - the non recursive path",e,i.id,i),Object(l.insertNode)(m,n.node(e),s))})),n.edges().forEach((function(t){var e=n.edge(t.v,t.w,t.name);d.logger.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),d.logger.info("Edge "+t.v+" -> "+t.w+": ",t," ",JSON.stringify(n.edge(t))),d.logger.info("Fix",u.clusterDb,"ids:",t.v,t.w,"Translateing: ",u.clusterDb[t.v],u.clusterDb[t.w]),Object(h.insertEdgeLabel)(v,e)})),n.edges().forEach((function(t){d.logger.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t))})),d.logger.info("#############################################"),d.logger.info("### Layout ###"),d.logger.info("#############################################"),d.logger.info(n),i.a.layout(n),d.logger.info("Graph after layout:",o.a.json.write(n)),n.nodes().forEach((function(t){var e=n.node(t);d.logger.info("Position "+t+": "+JSON.stringify(n.node(t))),d.logger.info("Position "+t+": ("+e.x,","+e.y,") width: ",e.width," height: ",e.height),e&&e.clusterNode?Object(l.positionNode)(e):n.children(t).length>0?(Object(f.insertCluster)(g,e),u.clusterDb[e.id].node=e):Object(l.positionNode)(e)})),n.edges().forEach((function(t){var e=n.edge(t);d.logger.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(e),e);var i=Object(h.insertEdge)(y,t,e,u.clusterDb,r,n);Object(h.positionEdgeLabel)(e,i)})),p}(t,e,r)}},"./src/dagre-wrapper/intersect/index.js":function(t,e,n){"use strict";n.r(e);var r=n("./src/dagre-wrapper/intersect/intersect-node.js"),i=n.n(r),a=n("./src/dagre-wrapper/intersect/intersect-circle.js"),o=n("./src/dagre-wrapper/intersect/intersect-ellipse.js"),s=n("./src/dagre-wrapper/intersect/intersect-polygon.js"),c=n("./src/dagre-wrapper/intersect/intersect-rect.js");e.default={node:i.a,circle:a.default,ellipse:o.default,polygon:s.default,rect:c.default}},"./src/dagre-wrapper/intersect/intersect-circle.js":function(t,e,n){"use strict";n.r(e);var r=n("./src/dagre-wrapper/intersect/intersect-ellipse.js");e.default=function(t,e,n){return Object(r.default)(t,e,e,n)}},"./src/dagre-wrapper/intersect/intersect-ellipse.js":function(t,e,n){"use strict";n.r(e),e.default=function(t,e,n,r){var i=t.x,a=t.y,o=i-r.x,s=a-r.y,c=Math.sqrt(e*e*s*s+n*n*o*o),u=Math.abs(e*n*o/c);r.x0}n.r(e),e.default=function(t,e,n,i){var a,o,s,c,u,l,f,h,d,p,g,y,v;if(a=e.y-t.y,s=t.x-e.x,u=e.x*t.y-t.x*e.y,d=a*n.x+s*n.y+u,p=a*i.x+s*i.y+u,!(0!==d&&0!==p&&r(d,p)||(o=i.y-n.y,c=n.x-i.x,l=i.x*n.y-n.x*i.y,f=o*t.x+c*t.y+l,h=o*e.x+c*e.y+l,0!==f&&0!==h&&r(f,h)||0==(g=a*c-o*s))))return y=Math.abs(g/2),{x:(v=s*l-c*u)<0?(v-y)/g:(v+y)/g,y:(v=o*u-a*l)<0?(v-y)/g:(v+y)/g}}},"./src/dagre-wrapper/intersect/intersect-node.js":function(t,e){t.exports=function(t,e){return t.intersect(e)}},"./src/dagre-wrapper/intersect/intersect-polygon.js":function(t,e,n){"use strict";n.r(e);var r=n("./src/dagre-wrapper/intersect/intersect-line.js");e.default=function(t,e,n){var i=t.x,a=t.y,o=[],s=Number.POSITIVE_INFINITY,c=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach((function(t){s=Math.min(s,t.x),c=Math.min(c,t.y)})):(s=Math.min(s,e.x),c=Math.min(c,e.y));for(var u=i-t.width/2-s,l=a-t.height/2-c,f=0;f1&&o.sort((function(t,e){var r=t.x-n.x,i=t.y-n.y,a=Math.sqrt(r*r+i*i),o=e.x-n.x,s=e.y-n.y,c=Math.sqrt(o*o+s*s);return aMath.abs(o)*u?(s<0&&(u=-u),n=0===s?0:u*o/s,r=u):(o<0&&(c=-c),n=c,r=0===o?0:c*s/o),{x:i+n,y:a+r}}},"./src/dagre-wrapper/markers.js":function(t,e,n){"use strict";n.r(e);var r=n("./src/logger.js"),i={extension:function(t,e,n){r.logger.trace("Making markers for ",n),t.append("defs").append("marker").attr("id",e+"-extensionStart").attr("class","marker extension "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},composition:function(t,e){t.append("defs").append("marker").attr("id",e+"-compositionStart").attr("class","marker composition "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},aggregation:function(t,e){t.append("defs").append("marker").attr("id",e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},dependency:function(t,e){t.append("defs").append("marker").attr("id",e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},point:function(t,e){t.append("marker").attr("id",e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",0).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},circle:function(t,e){t.append("marker").attr("id",e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},cross:function(t,e){t.append("marker").attr("id",e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},barb:function(t,e){t.append("defs").append("marker").attr("id",e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")}};e.default=function(t,e,n,r){e.forEach((function(e){i[e](t,n,r)}))}},"./src/dagre-wrapper/mermaid-graphlib.js":function(t,e,n){"use strict";n.r(e),n.d(e,"clusterDb",(function(){return o})),n.d(e,"clear",(function(){return u})),n.d(e,"extractDecendants",(function(){return h})),n.d(e,"validate",(function(){return d})),n.d(e,"findNonClusterChild",(function(){return p})),n.d(e,"adjustClustersAndEdges",(function(){return y})),n.d(e,"extractor",(function(){return v}));var r=n("./src/logger.js"),i=n("graphlib"),a=n.n(i),o={},s={},c={},u=function(){s={},c={},o={}},l=function(t,e){return r.logger.debug("In isDecendant",e," ",t," = ",s[e].indexOf(t)>=0),s[e].indexOf(t)>=0},f=function t(e,n,i,a){r.logger.info("Copying children of ",e,"root",a,"data",n.node(e),a);var o=n.children(e)||[];e!==a&&o.push(e),r.logger.debug("Copying (nodes) clusterId",e,"nodes",o),o.forEach((function(o){if(n.children(o).length>0)t(o,n,i,a);else{var c=n.node(o);r.logger.info("cp ",o," to ",a," with parent ",e),i.setNode(o,c),r.logger.debug("Setting parent",o,n.parent(o)),a!==n.parent(o)&&i.setParent(o,n.parent(o)),e!==a&&o!==e?(r.logger.debug("Setting parent",o,e),i.setParent(o,e)):(r.logger.info("In copy ",e,"root",a,"data",n.node(e),a),r.logger.debug("Not Setting parent for node=",o,"cluster!==rootId",e!==a,"node!==clusterId",o!==e));var u=n.edges(o);r.logger.debug("Copying Edges",u),u.forEach((function(t){r.logger.info("Edge",t);var o=n.edge(t.v,t.w,t.name);r.logger.info("Edge data",o,a);try{!function(t,e){return r.logger.info("Decendants of ",e," is ",s[e]),r.logger.info("Edge is ",t),t.v!==e&&t.w!==e&&(s[e]?(r.logger.info("Here "),s[e].indexOf(t.v)>=0||!!l(t.v,e)||!!l(t.w,e)||s[e].indexOf(t.w)>=0):(r.logger.debug("Tilt, ",e,",not in decendants"),!1))}(t,a)?r.logger.info("Skipping copy of edge ",t.v,"--\x3e",t.w," rootId: ",a," clusterId:",e):(r.logger.info("Copying as ",t.v,t.w,o,t.name),i.setEdge(t.v,t.w,o,t.name),r.logger.info("newGraph edges ",i.edges(),i.edge(i.edges()[0])))}catch(t){r.logger.error(t)}}))}r.logger.debug("Removing node",o),n.removeNode(o)}))},h=function t(e,n){for(var r=n.children(e),i=[].concat(r),a=0;a0)return r.logger.trace("The node ",e[n].v," is part of and edge even though it has children"),!1;if(t.children(e[n].w).length>0)return r.logger.trace("The node ",e[n].w," is part of and edge even though it has children"),!1}return!0},p=function t(e,n){r.logger.trace("Searching",e);var i=n.children(e);if(r.logger.trace("Searching children of id ",e,i),i.length<1)return r.logger.trace("This is a valid node",e),e;for(var a=0;a ",o),o}},g=function(t){return o[t]&&o[t].externalConnections&&o[t]?o[t].id:t},y=function(t,e){!t||e>10?r.logger.debug("Opting out, no graph "):(r.logger.debug("Opting in, graph "),t.nodes().forEach((function(e){t.children(e).length>0&&(r.logger.warn("Cluster identified",e," Replacement id in edges: ",p(e,t)),s[e]=h(e,t),o[e]={id:p(e,t),clusterData:t.node(e)})})),t.nodes().forEach((function(e){var n=t.children(e),i=t.edges();n.length>0&&(r.logger.debug("Cluster identified",e,s),i.forEach((function(t){t.v!==e&&t.w!==e&&l(t.v,e)^l(t.w,e)&&(r.logger.debug("Edge: ",t," leaves cluster ",e),r.logger.debug("Decendants of ",e,": ",s[e]),o[e].externalConnections=!0)})))})),v(t,0),t.edges().forEach((function(e){var n=t.edge(e);r.logger.trace("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),r.logger.trace("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(t.edge(e)));var i=e.v,a=e.w;r.logger.trace("Fix",o,"ids:",e.v,e.w,"Translateing: ",o[e.v],o[e.w]),(o[e.v]||o[e.w])&&(r.logger.warn("Fixing and trixing - removing",e.v,e.w,e.name),i=g(e.v),a=g(e.w),t.removeEdge(e.v,e.w,e.name),i!==e.v&&(n.fromCluster=e.v),a!==e.w&&(n.toCluster=e.w),r.logger.warn("Replacing with",i,a,e.name),t.setEdge(i,a,n,e.name))})),r.logger.warn("Adjusted Graph",a.a.json.write(t)),r.logger.trace(o))},v=function t(e,n){if(r.logger.debug("extractor - ",n,a.a.json.write(e),e.children("D")),n>10)r.logger.error("Bailing out");else{for(var i=e.nodes(),s=!1,c=0;c0}if(s){r.logger.debug("Nodes = ",i,n);for(var h=0;h0){r.logger.debug("Cluster without external connections, without a parent and with children",d,n);var p=e.graph(),g=new a.a.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:"TB"===p.rankdir?"LR":"TB",nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}}));r.logger.debug("Old graph before copy",a.a.json.write(e)),f(d,e,g,d),e.setNode(d,{clusterNode:!0,id:d,clusterData:o[d].clusterData,labelText:o[d].labelText,graph:g}),r.logger.debug("New graph after copy",a.a.json.write(g)),r.logger.debug("Old graph after copy",a.a.json.write(e))}else r.logger.debug("Cluster ** ",d," **not meeting the criteria !externalConnections:",!o[d].externalConnections," no parent: ",!e.parent(d)," children ",e.children(d)&&e.children(d).length>0,e.children("D"),n),r.logger.debug(o);else r.logger.debug("Not a cluster",d,n)}i=e.nodes(),r.logger.debug("New list of nodes",i);for(var y=0;y"),e.labelStyle,!0,!0));if(Object(o.getConfig)().flowchart.htmlLabels){var _=x.children[0],w=Object(r.select)(x);p=_.getBoundingClientRect(),w.attr("width",p.width),w.attr("height",p.height)}var k=e.padding/2;return Object(r.select)(x).attr("transform","translate( "+(p.width>b.width?0:(b.width-p.width)/2)+", "+(b.height+k+5)+")"),Object(r.select)(g).attr("transform","translate( "+(p.widthe.height/2-u)){var i=u*u*(1-r*r/(c*c));0!=i&&(i=Math.sqrt(i)),i=u-i,t.y-e.y>0&&(i=-i),n.y+=i}return n},r},start:function(t,e){var n=t.insert("g").attr("class","node default").attr("id",e.id),r=n.insert("circle",":first-child");return r.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),Object(a.updateNodeBounds)(e,r),e.intersect=function(t){return s.default.circle(e,7,t)},n},end:function(t,e){var n=t.insert("g").attr("class","node default").attr("id",e.id),r=n.insert("circle",":first-child"),i=n.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),r.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),Object(a.updateNodeBounds)(e,i),e.intersect=function(t){return s.default.circle(e,7,t)},n},note:n("./src/dagre-wrapper/shapes/note.js").default,subroutine:function(t,e){var n=Object(a.labelHelper)(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,o=i.width+e.padding,c=i.height+e.padding,u=[{x:0,y:0},{x:o,y:0},{x:o,y:-c},{x:0,y:-c},{x:0,y:0},{x:-8,y:0},{x:o+8,y:0},{x:o+8,y:-c},{x:-8,y:-c},{x:-8,y:0}],l=Object(a.insertPolygonShape)(r,o,c,u);return Object(a.updateNodeBounds)(e,l),e.intersect=function(t){return s.default.polygon(e,t)},r},fork:u,join:u,class_box:function(t,e){var n,i=e.padding/2;n=e.classes?"node "+e.classes:"node default";var u=t.insert("g").attr("class",n).attr("id",e.id),l=u.insert("rect",":first-child"),f=u.insert("line"),h=u.insert("line"),d=0,p=4,g=u.insert("g").attr("class","label"),y=0,v=e.classData.annotations&&e.classData.annotations[0],m=g.node().appendChild(Object(c.default)(e.classData.annotations[0],e.labelStyle,!0,!0)),b=m.getBBox();e.classData.annotations[0]&&(p+=b.height+4,d+=b.width);var x=g.node().appendChild(Object(c.default)(e.labelText,e.labelStyle,!0,!0)),_=x.getBBox();p+=_.height+4,_.width>d&&(d=_.width);var w=[];e.classData.members.forEach((function(t){var n=g.node().appendChild(Object(c.default)(t,e.labelStyle,!0,!0)),r=n.getBBox();r.width>d&&(d=r.width),p+=r.height+4,w.push(n)}));var k=[];e.classData.methods.forEach((function(t){var n=g.node().appendChild(Object(c.default)(t,e.labelStyle,!0,!0)),r=n.getBBox();r.width>d&&(d=r.width),p+=r.height+4,k.push(n)})),p+=8,v&&(Object(r.select)(m).attr("transform","translate( "+-(d+e.padding-b.width/2)/2+", "+-1*p/2+")"),y=b.height+4);var C,E=(d-_.width)/2;if(Object(r.select)(x).attr("transform","translate( "+(-1*d/2+E)+", "+(-1*p/2+y)+")"),y+=_.height+4,f.attr("class","divider").attr("x1",-d/2-i).attr("x2",d/2+i).attr("y1",-p/2-i+8+y).attr("y2",-p/2-i+8+y),y+=8,w.forEach((function(t){Object(r.select)(t).attr("transform","translate( "+-d/2+", "+(-1*p/2+y+4)+")"),y+=_.height+4})),h.attr("class","divider").attr("x1",-d/2-i).attr("x2",d/2+i).attr("y1",-p/2-i+8+y).attr("y2",-p/2-i+8+y),y+=8,k.forEach((function(t){Object(r.select)(t).attr("transform","translate( "+-d/2+", "+(-1*p/2+y)+")"),y+=_.height+4})),Object(o.getConfig)().flowchart.htmlLabels){var T=m.children[0],S=Object(r.select)(m);C=T.getBoundingClientRect(),S.attr("width",C.width),S.attr("height",C.height)}return l.attr("class","outer title-state").attr("x",-d/2-i).attr("y",-p/2-i).attr("width",d+e.padding).attr("height",p+e.padding),Object(a.updateNodeBounds)(e,l),e.intersect=function(t){return s.default.rect(e,t)},u}},f={},h=function(t,e,n){f[e.id]=l[e.shape](t,e,n)},d=function(t,e){f[e.id]=t},p=function(){f={}},g=function(t){var e=f[t.id];i.logger.trace("Transforming node",t,"translate("+(t.x-t.width/2-5)+", "+(t.y-t.height/2-5)+")"),t.clusterNode?e.attr("transform","translate("+(t.x-t.width/2-8)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")")}},"./src/dagre-wrapper/shapes/note.js":function(t,e,n){"use strict";n.r(e);var r=n("./src/dagre-wrapper/shapes/util.js"),i=n("./src/logger.js"),a=n("./src/dagre-wrapper/intersect/index.js");e.default=function(t,e){var n=Object(r.labelHelper)(t,e,"node "+e.classes,!0),o=n.shapeSvg,s=n.bbox,c=n.halfPadding;i.logger.info("Classes = ",e.classes);var u=o.insert("rect",":first-child");return u.attr("rx",e.rx).attr("ry",e.ry).attr("x",-s.width/2-c).attr("y",-s.height/2-c).attr("width",s.width+e.padding).attr("height",s.height+e.padding),Object(r.updateNodeBounds)(e,u),e.intersect=function(t){return a.default.rect(e,t)},o}},"./src/dagre-wrapper/shapes/util.js":function(t,e,n){"use strict";n.r(e),n.d(e,"labelHelper",(function(){return o})),n.d(e,"updateNodeBounds",(function(){return s})),n.d(e,"insertPolygonShape",(function(){return c}));var r=n("./src/dagre-wrapper/createLabel.js"),i=n("./src/config.js"),a=n("d3"),o=function(t,e,n,o){var s;s=n||"node default";var c=t.insert("g").attr("class",s).attr("id",e.id),u=c.insert("g").attr("class","label"),l=u.node().appendChild(Object(r.default)(e.labelText,e.labelStyle,!1,o)),f=l.getBBox();if(Object(i.getConfig)().flowchart.htmlLabels){var h=l.children[0],d=Object(a.select)(l);f=h.getBoundingClientRect(),d.attr("width",f.width),d.attr("height",f.height)}var p=e.padding/2;return u.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),{shapeSvg:c,bbox:f,halfPadding:p,label:u}},s=function(t,e){var n=e.node().getBBox();t.width=n.width,t.height=n.height};function c(t,e,n,r){return t.insert("polygon",":first-child").attr("points",r.map((function(t){return t.x+","+t.y})).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+n/2+")")}},"./src/defaultConfig.js":function(t,e,n){"use strict";n.r(e);var r={theme:"default",themeVariables:n("./src/themes/index.js").default.default.getThemeVariables(),themeCSS:void 0,maxTextSize:5e4,fontFamily:'"trebuchet ms", verdana, arial;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize"],flowchart:{diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"linear",padding:15},sequence:{activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open-Sans", "sans-serif"',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20,messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},noteFont:function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},actorFont:function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}}},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"},journey:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1},class:{arrowMarkerAbsolute:!1},git:{arrowMarkerAbsolute:!1},state:{dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5},er:{diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,stroke:"gray",fill:"honeydew",fontSize:12,useMaxWidth:!0}};r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute,r.git.arrowMarkerAbsolute=r.arrowMarkerAbsolute,e.default=r},"./src/diagrams/class/classDb.js":function(t,e,n){"use strict";n.r(e),n.d(e,"parseDirective",(function(){return g})),n.d(e,"addClass",(function(){return v})),n.d(e,"lookUpDomId",(function(){return m})),n.d(e,"clear",(function(){return b})),n.d(e,"getClass",(function(){return x})),n.d(e,"getClasses",(function(){return _})),n.d(e,"getRelations",(function(){return w})),n.d(e,"addRelation",(function(){return k})),n.d(e,"addAnnotation",(function(){return C})),n.d(e,"addMember",(function(){return E})),n.d(e,"addMembers",(function(){return T})),n.d(e,"cleanupLabel",(function(){return S})),n.d(e,"setCssClass",(function(){return A})),n.d(e,"setLink",(function(){return M})),n.d(e,"setClickEvent",(function(){return O})),n.d(e,"bindFunctions",(function(){return D})),n.d(e,"lineType",(function(){return N})),n.d(e,"relationType",(function(){return B}));var r=n("d3"),i=n("./src/logger.js"),a=n("./src/config.js"),o=n("./src/diagrams/common/common.js"),s=n("./src/utils.js"),c=n("./src/mermaidAPI.js"),u="classid-",l=a.getConfig(),f=[],h={},d=0,p=[],g=function(t,e,n){c.default.parseDirective(this,t,e,n)},y=function(t){var e="",n=t;if(t.indexOf("~")>0){var r=t.split("~");n=r[0],e=r[1]}return{className:n,type:e}},v=function(t){var e=y(t);void 0===h[e.className]&&(h[e.className]={id:e.className,type:e.type,cssClasses:[],methods:[],members:[],annotations:[],domId:u+e.className+"-"+d},d++)},m=function(t){for(var e=Object.keys(h),n=0;n>")?r.annotations.push(i.substring(2,i.length-2)):i.indexOf(")")>0?r.methods.push(i):i&&r.members.push(i)}},T=function(t,e){Array.isArray(e)&&(e.reverse(),e.forEach((function(e){return E(t,e)})))},S=function(t){return":"===t.substring(0,1)?t.substr(1).trim():t.trim()},A=function(t,e){t.split(",").forEach((function(t){var n=t;t[0].match(/\d/)&&(n=u+n),void 0!==h[n]&&h[n].cssClasses.push(e)}))},M=function(t,e,n){t.split(",").forEach((function(t){var r=t;t[0].match(/\d/)&&(r=u+r),void 0!==h[r]&&(h[r].link=s.default.formatUrl(e,l),n&&(h[r].tooltip=o.default.sanitizeText(n,l)))})),A(t,"clickable")},O=function(t,e,n){t.split(",").forEach((function(t){j(t,e,n)})),A(t,"clickable")},j=function(t,e,n){var r=t,i=m(r);"loose"===l.securityLevel&&void 0!==e&&void 0!==h[r]&&(n&&(h[r].tooltip=o.default.sanitizeText(n,l)),p.push((function(){var t=document.querySelector('[id="'.concat(i,'"]'));null!==t&&t.addEventListener("click",(function(){s.default.runFunc(e,i)}),!1)})))},D=function(t){p.forEach((function(e){e(t)}))},N={LINE:0,DOTTED_LINE:1},B={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},L=function(t){var e=Object(r.select)(".mermaidTooltip");null===(e._groups||e)[0][0]&&(e=Object(r.select)("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),Object(r.select)(t).select("svg").selectAll("g.node").on("mouseover",(function(){var t=Object(r.select)(this);if(null!==t.attr("title")){var n=this.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.html(t.attr("title")).style("left",window.scrollX+n.left+(n.right-n.left)/2+"px").style("top",window.scrollY+n.top-14+document.body.scrollTop+"px"),t.classed("hover",!0)}})).on("mouseout",(function(){e.transition().duration(500).style("opacity",0),Object(r.select)(this).classed("hover",!1)}))};p.push(L),e.default={parseDirective:g,getConfig:function(){return a.getConfig().class},addClass:v,bindFunctions:D,clear:b,getClass:x,getClasses:_,addAnnotation:C,getRelations:w,addRelation:k,addMember:E,addMembers:T,cleanupLabel:S,lineType:N,relationType:B,setClickEvent:O,setCssClass:A,setLink:M,lookUpDomId:m}},"./src/diagrams/class/classRenderer-v2.js":function(t,e,n){"use strict";n.r(e),n.d(e,"addClasses",(function(){return m})),n.d(e,"addRelations",(function(){return b})),n.d(e,"setConf",(function(){return _})),n.d(e,"drawOld",(function(){return w})),n.d(e,"draw",(function(){return k}));var r=n("d3"),i=n("dagre"),a=n.n(i),o=n("graphlib"),s=n.n(o),c=n("./src/logger.js"),u=n("./src/diagrams/class/classDb.js"),l=n("./src/diagrams/class/parser/classDiagram.jison"),f=n("./src/diagrams/class/svgDraw.js"),h=n("./src/config.js"),d=n("./src/dagre-wrapper/index.js"),p=n("./src/utils.js"),g=n("./src/diagrams/common/common.js");l.parser.yy=u.default;var y={},v={dividerMargin:10,padding:5,textHeight:10},m=function(t,e){var n=Object.keys(t);c.logger.info("keys:",n),c.logger.info(t),n.forEach((function(n){var r=t[n],i="default",a={labelStyle:""},o=void 0!==r.text?r.text:r.id,s="";switch(r.type){case"class":s="class_box";break;default:s="class_box"}e.setNode(r.id,{labelStyle:a.labelStyle,shape:s,labelText:o,classData:r,rx:0,ry:0,class:i,style:a.style,id:r.id,width:"group"===r.type?500:void 0,type:r.type,padding:Object(h.getConfig)().flowchart.padding}),c.logger.info("setNode",{labelStyle:a.labelStyle,shape:s,labelText:o,rx:0,ry:0,class:i,style:a.style,id:r.id,width:"group"===r.type?500:void 0,type:r.type,padding:Object(h.getConfig)().flowchart.padding})}))},b=function(t,e){var n=0;t.forEach((function(i){n++;var a={classes:"relation"};a.pattern=1==i.relation.lineType?"dashed":"solid",a.id="id"+n,"arrow_open"===i.type?a.arrowhead="none":a.arrowhead="normal",c.logger.info(a,i),a.arrowTypeStart=C(i.relation.type1),a.arrowTypeEnd=C(i.relation.type2);var o="",s="";if(void 0!==i.style){var u=Object(p.getStylesFromArray)(i.style);o=u.style,s=u.labelStyle}else o="fill:none";a.style=o,a.labelStyle=s,void 0!==i.interpolate?a.curve=Object(p.interpolateToCurve)(i.interpolate,r.curveLinear):void 0!==t.defaultInterpolate?a.curve=Object(p.interpolateToCurve)(t.defaultInterpolate,r.curveLinear):a.curve=Object(p.interpolateToCurve)(v.curve,r.curveLinear),i.text=i.title,void 0===i.text?void 0!==i.style&&(a.arrowheadStyle="fill: #333"):(a.arrowheadStyle="fill: #333",a.labelpos="c",Object(h.getConfig)().flowchart.htmlLabels,a.labelType="text",a.label=i.text.replace(g.default.lineBreakRegex,"\n"),void 0===i.style&&(a.style=a.style||"stroke: #333; stroke-width: 1.5px;fill:none"),a.labelStyle=a.labelStyle.replace("color:","fill:")),e.setEdge(i.id1,i.id2,a,n)}))},x=function(t){for(var e=Object.keys(y),n=0;n "+t.w+": "+JSON.stringify(i.edge(t))),f.default.drawEdge(n,i.edge(t),i.edge(t).relation,v))}));var b=n.node().getBBox(),_=b.width+40,w=b.height+40;v.useMaxWidth?(n.attr("width","100%"),n.attr("style","max-width: ".concat(_,"px;"))):(n.attr("height",w),n.attr("width",_));var k="".concat(b.x-20," ").concat(b.y-20," ").concat(_," ").concat(w);c.logger.debug("viewBox ".concat(k)),n.attr("viewBox",k)},k=function(t,e){c.logger.info("Drawing class"),u.default.clear(),l.parser.parse(t);var n=Object(h.getConfig)().flowchart;c.logger.info("config:",n);var i=n.nodeSpacing||50,a=n.rankSpacing||50,o=new s.a.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:"TD",nodesep:i,ranksep:a,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}})),f=u.default.getClasses(),p=u.default.getRelations();c.logger.info(p),m(f,o,e),b(p,o);var g=Object(r.select)('[id="'.concat(e,'"]'));g.attr("xmlns:xlink","http://www.w3.org/1999/xlink");var y=Object(r.select)("#"+e+" g");Object(d.render)(y,o,["aggregation","extension","composition","dependency"],"classDiagram",e);var v=g.node().getBBox(),x=v.width+16,_=v.height+16;if(c.logger.debug("new ViewBox 0 0 ".concat(x," ").concat(_),"translate(".concat(8-o._label.marginx,", ").concat(8-o._label.marginy,")")),n.useMaxWidth?(g.attr("width","100%"),g.attr("style","max-width: ".concat(x,"px;"))):(g.attr("height",_),g.attr("width",x)),g.attr("viewBox","0 0 ".concat(x," ").concat(_)),g.select("g").attr("transform","translate(".concat(8-o._label.marginx,", ").concat(8-v.y,")")),!n.htmlLabels)for(var w=document.querySelectorAll('[id="'+e+'"] .edgeLabel .label'),k=0;k "+t.w+": "+JSON.stringify(o.edge(t))),f.default.drawEdge(i,o.edge(t),o.edge(t).relation,d))}));var x=i.node().getBBox(),_=x.width+40,w=x.height+40;d.useMaxWidth?(i.attr("width","100%"),i.attr("style","max-width: ".concat(_,"px;"))):(i.attr("height",w),i.attr("width",_));var k="".concat(x.x-20," ").concat(x.y-20," ").concat(_," ").concat(w);c.logger.debug("viewBox ".concat(k)),i.attr("viewBox",k)};e.default={setConf:g,draw:y}},"./src/diagrams/class/parser/classDiagram.jison":function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,7],n=[1,6],r=[1,14],i=[1,25],a=[1,28],o=[1,26],s=[1,27],c=[1,29],u=[1,30],l=[1,31],f=[1,33],h=[1,34],d=[1,35],p=[10,19],g=[1,47],y=[1,48],v=[1,49],m=[1,50],b=[1,51],x=[1,52],_=[10,19,25,32,33,41,44,45,46,47,48,49],w=[10,19,23,25,32,33,37,41,44,45,46,47,48,49,66,67,68],k=[10,13,17,19],C=[41,66,67,68],E=[41,48,49,66,67,68],T=[41,44,45,46,47,66,67,68],S=[10,19,25],A=[1,81],M={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,directive:5,graphConfig:6,openDirective:7,typeDirective:8,closeDirective:9,NEWLINE:10,":":11,argDirective:12,open_directive:13,type_directive:14,arg_directive:15,close_directive:16,CLASS_DIAGRAM:17,statements:18,EOF:19,statement:20,className:21,alphaNumToken:22,GENERICTYPE:23,relationStatement:24,LABEL:25,classStatement:26,methodStatement:27,annotationStatement:28,clickStatement:29,cssClassStatement:30,CLASS:31,STYLE_SEPARATOR:32,STRUCT_START:33,members:34,STRUCT_STOP:35,ANNOTATION_START:36,ANNOTATION_END:37,MEMBER:38,SEPARATOR:39,relation:40,STR:41,relationType:42,lineType:43,AGGREGATION:44,EXTENSION:45,COMPOSITION:46,DEPENDENCY:47,LINE:48,DOTTED_LINE:49,CALLBACK:50,LINK:51,CSSCLASS:52,commentToken:53,textToken:54,graphCodeTokens:55,textNoTagsToken:56,TAGSTART:57,TAGEND:58,"==":59,"--":60,PCT:61,DEFAULT:62,SPACE:63,MINUS:64,keywords:65,UNICODE_TEXT:66,NUM:67,ALPHA:68,$accept:0,$end:1},terminals_:{2:"error",10:"NEWLINE",11:":",13:"open_directive",14:"type_directive",15:"arg_directive",16:"close_directive",17:"CLASS_DIAGRAM",19:"EOF",23:"GENERICTYPE",25:"LABEL",31:"CLASS",32:"STYLE_SEPARATOR",33:"STRUCT_START",35:"STRUCT_STOP",36:"ANNOTATION_START",37:"ANNOTATION_END",38:"MEMBER",39:"SEPARATOR",41:"STR",44:"AGGREGATION",45:"EXTENSION",46:"COMPOSITION",47:"DEPENDENCY",48:"LINE",49:"DOTTED_LINE",50:"CALLBACK",51:"LINK",52:"CSSCLASS",55:"graphCodeTokens",57:"TAGSTART",58:"TAGEND",59:"==",60:"--",61:"PCT",62:"DEFAULT",63:"SPACE",64:"MINUS",65:"keywords",66:"UNICODE_TEXT",67:"NUM",68:"ALPHA"},productions_:[0,[3,1],[3,2],[4,1],[5,4],[5,6],[7,1],[8,1],[12,1],[9,1],[6,4],[18,1],[18,2],[18,3],[21,1],[21,2],[21,3],[21,2],[20,1],[20,2],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[26,2],[26,4],[26,5],[26,7],[28,4],[34,1],[34,2],[27,1],[27,2],[27,1],[27,1],[24,3],[24,4],[24,4],[24,5],[40,3],[40,2],[40,2],[40,1],[42,1],[42,1],[42,1],[42,1],[43,1],[43,1],[29,3],[29,4],[29,3],[29,4],[30,3],[53,1],[53,1],[54,1],[54,1],[54,1],[54,1],[54,1],[54,1],[54,1],[56,1],[56,1],[56,1],[56,1],[22,1],[22,1],[22,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 6:r.parseDirective("%%{","open_directive");break;case 7:r.parseDirective(a[s],"type_directive");break;case 8:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 9:r.parseDirective("}%%","close_directive","class");break;case 14:this.$=a[s];break;case 15:this.$=a[s-1]+a[s];break;case 16:this.$=a[s-2]+"~"+a[s-1]+a[s];break;case 17:this.$=a[s-1]+"~"+a[s];break;case 18:r.addRelation(a[s]);break;case 19:a[s-1].title=r.cleanupLabel(a[s]),r.addRelation(a[s-1]);break;case 26:r.addClass(a[s]);break;case 27:r.addClass(a[s-2]),r.setCssClass(a[s-2],a[s]);break;case 28:r.addClass(a[s-3]),r.addMembers(a[s-3],a[s-1]);break;case 29:r.addClass(a[s-5]),r.setCssClass(a[s-5],a[s-3]),r.addMembers(a[s-5],a[s-1]);break;case 30:r.addAnnotation(a[s],a[s-2]);break;case 31:this.$=[a[s]];break;case 32:a[s].push(a[s-1]),this.$=a[s];break;case 33:break;case 34:r.addMember(a[s-1],r.cleanupLabel(a[s]));break;case 35:case 36:break;case 37:this.$={id1:a[s-2],id2:a[s],relation:a[s-1],relationTitle1:"none",relationTitle2:"none"};break;case 38:this.$={id1:a[s-3],id2:a[s],relation:a[s-1],relationTitle1:a[s-2],relationTitle2:"none"};break;case 39:this.$={id1:a[s-3],id2:a[s],relation:a[s-2],relationTitle1:"none",relationTitle2:a[s-1]};break;case 40:this.$={id1:a[s-4],id2:a[s],relation:a[s-2],relationTitle1:a[s-3],relationTitle2:a[s-1]};break;case 41:this.$={type1:a[s-2],type2:a[s],lineType:a[s-1]};break;case 42:this.$={type1:"none",type2:a[s],lineType:a[s-1]};break;case 43:this.$={type1:a[s-1],type2:"none",lineType:a[s]};break;case 44:this.$={type1:"none",type2:"none",lineType:a[s]};break;case 45:this.$=r.relationType.AGGREGATION;break;case 46:this.$=r.relationType.EXTENSION;break;case 47:this.$=r.relationType.COMPOSITION;break;case 48:this.$=r.relationType.DEPENDENCY;break;case 49:this.$=r.lineType.LINE;break;case 50:this.$=r.lineType.DOTTED_LINE;break;case 51:this.$=a[s-2],r.setClickEvent(a[s-1],a[s],void 0);break;case 52:this.$=a[s-3],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 53:this.$=a[s-2],r.setLink(a[s-1],a[s],void 0);break;case 54:this.$=a[s-3],r.setLink(a[s-2],a[s-1],a[s]);break;case 55:r.setCssClass(a[s-1],a[s])}},table:[{3:1,4:2,5:3,6:4,7:5,13:e,17:n},{1:[3]},{1:[2,1]},{3:8,4:2,5:3,6:4,7:5,13:e,17:n},{1:[2,3]},{8:9,14:[1,10]},{10:[1,11]},{14:[2,6]},{1:[2,2]},{9:12,11:[1,13],16:r},t([11,16],[2,7]),{5:23,7:5,13:e,18:15,20:16,21:24,22:32,24:17,26:18,27:19,28:20,29:21,30:22,31:i,36:a,38:o,39:s,50:c,51:u,52:l,66:f,67:h,68:d},{10:[1,36]},{12:37,15:[1,38]},{10:[2,9]},{19:[1,39]},{10:[1,40],19:[2,11]},t(p,[2,18],{25:[1,41]}),t(p,[2,20]),t(p,[2,21]),t(p,[2,22]),t(p,[2,23]),t(p,[2,24]),t(p,[2,25]),t(p,[2,33],{40:42,42:45,43:46,25:[1,44],41:[1,43],44:g,45:y,46:v,47:m,48:b,49:x}),{21:53,22:32,66:f,67:h,68:d},t(p,[2,35]),t(p,[2,36]),{22:54,66:f,67:h,68:d},{21:55,22:32,66:f,67:h,68:d},{21:56,22:32,66:f,67:h,68:d},{41:[1,57]},t(_,[2,14],{22:32,21:58,23:[1,59],66:f,67:h,68:d}),t(w,[2,69]),t(w,[2,70]),t(w,[2,71]),t(k,[2,4]),{9:60,16:r},{16:[2,8]},{1:[2,10]},{5:23,7:5,13:e,18:61,19:[2,12],20:16,21:24,22:32,24:17,26:18,27:19,28:20,29:21,30:22,31:i,36:a,38:o,39:s,50:c,51:u,52:l,66:f,67:h,68:d},t(p,[2,19]),{21:62,22:32,41:[1,63],66:f,67:h,68:d},{40:64,42:45,43:46,44:g,45:y,46:v,47:m,48:b,49:x},t(p,[2,34]),{43:65,48:b,49:x},t(C,[2,44],{42:66,44:g,45:y,46:v,47:m}),t(E,[2,45]),t(E,[2,46]),t(E,[2,47]),t(E,[2,48]),t(T,[2,49]),t(T,[2,50]),t(p,[2,26],{32:[1,67],33:[1,68]}),{37:[1,69]},{41:[1,70]},{41:[1,71]},{22:72,66:f,67:h,68:d},t(_,[2,15]),t(_,[2,17],{22:32,21:73,66:f,67:h,68:d}),{10:[1,74]},{19:[2,13]},t(S,[2,37]),{21:75,22:32,66:f,67:h,68:d},{21:76,22:32,41:[1,77],66:f,67:h,68:d},t(C,[2,43],{42:78,44:g,45:y,46:v,47:m}),t(C,[2,42]),{22:79,66:f,67:h,68:d},{34:80,38:A},{21:82,22:32,66:f,67:h,68:d},t(p,[2,51],{41:[1,83]}),t(p,[2,53],{41:[1,84]}),t(p,[2,55]),t(_,[2,16]),t(k,[2,5]),t(S,[2,39]),t(S,[2,38]),{21:85,22:32,66:f,67:h,68:d},t(C,[2,41]),t(p,[2,27],{33:[1,86]}),{35:[1,87]},{34:88,35:[2,31],38:A},t(p,[2,30]),t(p,[2,52]),t(p,[2,54]),t(S,[2,40]),{34:89,38:A},t(p,[2,28]),{35:[2,32]},{35:[1,90]},t(p,[2,29])],defaultActions:{2:[2,1],4:[2,3],7:[2,6],8:[2,2],14:[2,9],38:[2,8],39:[2,10],61:[2,13],88:[2,32]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,f=2,h=1,d=a.slice.call(arguments,1),p=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]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var v=p.yylloc;a.push(v);var m=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||h)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,w,k,C,E,T,S,A,M={};;){if(w=n[n.length-1],this.defaultActions[w]?k=this.defaultActions[w]:(null==x&&(x=b()),k=o[w]&&o[w][x]),void 0===k||!k.length||!k[0]){var O="";for(E in A=[],o[w])this.terminals_[E]&&E>f&&A.push("'"+this.terminals_[E]+"'");O=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==h?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(O,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:v,expected:A})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(k[1]),x=null,_?(x=_,_=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(T=this.productions_[k[1]][1],M.$=i[i.length-T],M._$={first_line:a[a.length-(T||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(T||1)].first_column,last_column:a[a.length-1].last_column},m&&(M._$.range=[a[a.length-(T||1)].range[0],a[a.length-1].range[1]]),void 0!==(C=this.performAction.apply(M,[s,u,c,g.yy,k[1],i,a].concat(d))))return C;T&&(n=n.slice(0,-1*T*2),i=i.slice(0,-1*T),a=a.slice(0,-1*T)),n.push(this.productions_[k[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},O={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),13;case 1:return this.begin("type_directive"),14;case 2:return this.popState(),this.begin("arg_directive"),11;case 3:return this.popState(),this.popState(),16;case 4:return 15;case 5:case 6:break;case 7:return 10;case 8:break;case 9:case 10:return 17;case 11:return this.begin("struct"),33;case 12:return"EOF_IN_STRUCT";case 13:return"OPEN_IN_STRUCT";case 14:return this.popState(),35;case 15:break;case 16:return"MEMBER";case 17:return 31;case 18:return 52;case 19:return 50;case 20:return 51;case 21:return 36;case 22:return 37;case 23:this.begin("generic");break;case 24:this.popState();break;case 25:return"GENERICTYPE";case 26:this.begin("string");break;case 27:this.popState();break;case 28:return"STR";case 29:case 30:return 45;case 31:case 32:return 47;case 33:return 46;case 34:return 44;case 35:return 48;case 36:return 49;case 37:return 25;case 38:return 32;case 39:return 64;case 40:return"DOT";case 41:return"PLUS";case 42:return 61;case 43:case 44:return"EQUALS";case 45:return 68;case 46:return"PUNCTUATION";case 47:return 67;case 48:return 66;case 49:return 63;case 50:return 19}},rules:[/^(?:%%\{)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:[{])/,/^(?:$)/,/^(?:[{])/,/^(?:[}])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:class\b)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:[~])/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:$)/],conditions:{string:{rules:[27,28],inclusive:!1},generic:{rules:[24,25],inclusive:!1},struct:{rules:[12,13,14,15,16],inclusive:!1},open_directive:{rules:[1],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,17,18,19,20,21,22,23,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50],inclusive:!0}}};function j(){this.yy={}}return M.lexer=O,j.prototype=M,M.Parser=j,new j}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n("./node_modules/node-libs-browser/mock/empty.js").readFileSync(n("./node_modules/path-browserify/index.js").normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n("./node_modules/process/browser.js"),n("./node_modules/webpack/buildin/module.js")(t))},"./src/diagrams/class/styles.js":function(t,e,n){"use strict";n.r(e),e.default=function(t){return"g.classGroup text {\n fill: ".concat(t.nodeBorder,";\n fill: ").concat(t.classText,";\n stroke: none;\n font-family: ").concat(t.fontFamily,";\n font-size: 10px;\n\n .title {\n font-weight: bolder;\n }\n}\n.node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n stroke-width: 1px;\n }\n\n\n.divider {\n stroke: ").concat(t.nodeBorder,";\n stroke: 1;\n}\n\ng.clickable {\n cursor: pointer;\n}\n\ng.classGroup rect {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n}\n\ng.classGroup line {\n stroke: ").concat(t.nodeBorder,";\n stroke-width: 1;\n}\n\n.classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ").concat(t.mainBkg,";\n opacity: 0.5;\n}\n\n.classLabel .label {\n fill: ").concat(t.nodeBorder,";\n font-size: 10px;\n}\n\n.relation {\n stroke: ").concat(t.lineColor,";\n stroke-width: 1;\n fill: none;\n}\n\n.dashed-line{\n stroke-dasharray: 3;\n}\n\n#compositionStart, .composition {\n fill: ").concat(t.lineColor," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#compositionEnd, .composition {\n fill: ").concat(t.lineColor," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ").concat(t.lineColor," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ").concat(t.lineColor," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#extensionStart, .extension {\n fill: ").concat(t.lineColor," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#extensionEnd, .extension {\n fill: ").concat(t.lineColor," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#aggregationStart, .aggregation {\n fill: ").concat(t.mainBkg," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#aggregationEnd, .aggregation {\n fill: ").concat(t.mainBkg," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n")}},"./src/diagrams/class/svgDraw.js":function(t,e,n){"use strict";n.r(e),n.d(e,"drawEdge",(function(){return c})),n.d(e,"drawClass",(function(){return u})),n.d(e,"parseMember",(function(){return l}));var r=n("d3"),i=n("./src/diagrams/class/classDb.js"),a=n("./src/utils.js"),o=n("./src/logger.js"),s=0,c=function(t,e,n,c){var u=function(t){switch(t){case i.relationType.AGGREGATION:return"aggregation";case i.relationType.EXTENSION:return"extension";case i.relationType.COMPOSITION:return"composition";case i.relationType.DEPENDENCY:return"dependency"}};e.points=e.points.filter((function(t){return!Number.isNaN(t.y)}));var l,f,h=e.points,d=Object(r.line)().x((function(t){return t.x})).y((function(t){return t.y})).curve(r.curveBasis),p=t.append("path").attr("d",d(h)).attr("id","edge"+s).attr("class","relation"),g="";c.arrowMarkerAbsolute&&(g=(g=(g=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),1==n.relation.lineType&&p.attr("class","relation dashed-line"),"none"!==n.relation.type1&&p.attr("marker-start","url("+g+"#"+u(n.relation.type1)+"Start)"),"none"!==n.relation.type2&&p.attr("marker-end","url("+g+"#"+u(n.relation.type2)+"End)");var y,v,m,b,x=e.points.length,_=a.default.calcLabelPosition(e.points);if(l=_.x,f=_.y,x%2!=0&&x>1){var w=a.default.calcCardinalityPosition("none"!==n.relation.type1,e.points,e.points[0]),k=a.default.calcCardinalityPosition("none"!==n.relation.type2,e.points,e.points[x-1]);o.logger.debug("cardinality_1_point "+JSON.stringify(w)),o.logger.debug("cardinality_2_point "+JSON.stringify(k)),y=w.x,v=w.y,m=k.x,b=k.y}if(void 0!==n.title){var C=t.append("g").attr("class","classLabel"),E=C.append("text").attr("class","label").attr("x",l).attr("y",f).attr("fill","red").attr("text-anchor","middle").text(n.title);window.label=E;var T=E.node().getBBox();C.insert("rect",":first-child").attr("class","box").attr("x",T.x-c.padding/2).attr("y",T.y-c.padding/2).attr("width",T.width+c.padding).attr("height",T.height+c.padding)}o.logger.info("Rendering relation "+JSON.stringify(n)),void 0!==n.relationTitle1&&"none"!==n.relationTitle1&&t.append("g").attr("class","cardinality").append("text").attr("class","type1").attr("x",y).attr("y",v).attr("fill","black").attr("font-size","6").text(n.relationTitle1),void 0!==n.relationTitle2&&"none"!==n.relationTitle2&&t.append("g").attr("class","cardinality").append("text").attr("class","type2").attr("x",m).attr("y",b).attr("fill","black").attr("font-size","6").text(n.relationTitle2),s++},u=function(t,e,n){o.logger.info("Rendering class "+e);var r,a=e.id,s={id:a,label:e.id,width:0,height:0},c=t.append("g").attr("id",Object(i.lookUpDomId)(a)).attr("class","classGroup");r=e.link?c.append("svg:a").attr("xlink:href",e.link).attr("target","_blank").append("text").attr("y",n.textHeight+n.padding).attr("x",0):c.append("text").attr("y",n.textHeight+n.padding).attr("x",0);var u=!0;e.annotations.forEach((function(t){var e=r.append("tspan").text("«"+t+"»");u||e.attr("dy",n.textHeight),u=!1}));var l=e.id;void 0!==e.type&&""!==e.type&&(l+="<"+e.type+">");var f=r.append("tspan").text(l).attr("class","title");u||f.attr("dy",n.textHeight);var h=r.node().getBBox().height,d=c.append("line").attr("x1",0).attr("y1",n.padding+h+n.dividerMargin/2).attr("y2",n.padding+h+n.dividerMargin/2),g=c.append("text").attr("x",n.padding).attr("y",h+n.dividerMargin+n.textHeight).attr("fill","white").attr("class","classText");u=!0,e.members.forEach((function(t){p(g,t,u,n),u=!1}));var y=g.node().getBBox(),v=c.append("line").attr("x1",0).attr("y1",n.padding+h+n.dividerMargin+y.height).attr("y2",n.padding+h+n.dividerMargin+y.height),m=c.append("text").attr("x",n.padding).attr("y",h+2*n.dividerMargin+y.height+n.textHeight).attr("fill","white").attr("class","classText");u=!0,e.methods.forEach((function(t){p(m,t,u,n),u=!1}));var b=c.node().getBBox(),x=" ";e.cssClasses.length>0&&(x+=e.cssClasses.join(" "));var _=c.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",b.width+2*n.padding).attr("height",b.height+n.padding+.5*n.dividerMargin).attr("class",x).node().getBBox().width;return r.node().childNodes.forEach((function(t){t.setAttribute("x",(_-t.getBBox().width)/2)})),e.tooltip&&r.insert("title").text(e.tooltip),d.attr("x2",_),v.attr("x2",_),s.width=_,s.height=b.height+n.padding+.5*n.dividerMargin,s},l=function(t){var e=t.match(/(\+|-|~|#)?(\w+)(~\w+~|\[\])?\s+(\w+)/),n=t.match(/^([+|\-|~|#])?(\w+) *\( *(.*)\) *(\*|\$)? *(\w*[~|[\]]*\s*\w*~?)$/);return e&&!n?f(e):n?h(n):d(t)},f=function(t){var e="";try{e=(t[1]?t[1].trim():"")+(t[2]?t[2].trim():"")+(t[3]?g(t[3].trim()):"")+" "+(t[4]?t[4].trim():"")}catch(n){e=t}return{displayText:e,cssStyle:""}},h=function(t){var e="",n="";try{var r=t[1]?t[1].trim():"",i=t[2]?t[2].trim():"",a=t[3]?g(t[3].trim()):"",o=t[4]?t[4].trim():"";n=r+i+"("+a+")"+(t[5]?" : "+g(t[5]).trim():""),e=y(o)}catch(e){n=t}return{displayText:n,cssStyle:e}},d=function(t){var e="",n="",r="",i=t.indexOf("("),a=t.indexOf(")");if(i>1&&a>i&&a<=t.length){var o="",s="",c=t.substring(0,1);c.match(/\w/)?s=t.substring(0,i).trim():(c.match(/\+|-|~|#/)&&(o=c),s=t.substring(1,i).trim());var u=t.substring(i+1,a),l=t.substring(a+1,1);n=y(l),e=o+s+"("+g(u.trim())+")",a<"".length&&""!==(r=t.substring(a+2).trim())&&(r=" : "+g(r))}else e=g(t);return{displayText:e,cssStyle:n}},p=function(t,e,n,r){var i=l(e),a=t.append("tspan").attr("x",r.padding).text(i.displayText);""!==i.cssStyle&&a.attr("style",i.cssStyle),n||a.attr("dy",r.textHeight)},g=function t(e){var n=e;return-1!=e.indexOf("~")?t(n=(n=n.replace("~","<")).replace("~",">")):n},y=function(t){switch(t){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}};e.default={drawClass:u,drawEdge:c,parseMember:l}},"./src/diagrams/common/common.js":function(t,e,n){"use strict";n.r(e),n.d(e,"getRows",(function(){return r})),n.d(e,"removeScript",(function(){return i})),n.d(e,"sanitizeText",(function(){return a})),n.d(e,"lineBreakRegex",(function(){return o})),n.d(e,"hasBreaks",(function(){return s})),n.d(e,"splitBreaks",(function(){return c}));var r=function(t){if(!t)return 1;var e=u(t);return(e=e.replace(/\\n/g,"#br#")).split("#br#")},i=function(t){for(var e="",n=0;n>=0;){if(!((n=t.indexOf("=0)){e+=t,n=-1;break}e+=t.substr(0,n),(n=(t=t.substr(n+1)).indexOf("<\/script>"))>=0&&(n+=9,t=t.substr(n))}return e},a=function(t,e){var n=t,r=!0;if(!e.flowchart||!1!==e.flowchart.htmlLabels&&"false"!==e.flowchart.htmlLabels||(r=!1),r){var a=e.securityLevel;"antiscript"===a?n=i(n):"loose"!==a&&(n=(n=(n=u(n)).replace(//g,">")).replace(/=/g,"="),n=l(n))}return n},o=//gi,s=function(t){return//gi.test(t)},c=function(t){return t.split(//gi)},u=function(t){return t.replace(o,"#br#")},l=function(t){return t.replace(/#br#/g,"
")};e.default={getRows:r,sanitizeText:a,hasBreaks:s,splitBreaks:c,lineBreakRegex:o,removeScript:i}},"./src/diagrams/er/erDb.js":function(t,e,n){"use strict";n.r(e),n.d(e,"parseDirective",(function(){return u}));var r=n("./src/logger.js"),i=n("./src/mermaidAPI.js"),a=n("./src/config.js"),o={},s=[],c="",u=function(t,e,n){i.default.parseDirective(this,t,e,n)};e.default={Cardinality:{ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE"},Identification:{NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},parseDirective:u,getConfig:function(){return a.getConfig().er},addEntity:function(t){void 0===o[t]&&(o[t]=t,r.logger.debug("Added new entity :",t))},getEntities:function(){return o},addRelationship:function(t,e,n,i){var a={entityA:t,roleA:e,entityB:n,relSpec:i};s.push(a),r.logger.debug("Added new relationship :",a)},getRelationships:function(){return s},clear:function(){o={},s=[],c=""},setTitle:function(t){c=t},getTitle:function(){return c}}},"./src/diagrams/er/erMarkers.js":function(t,e,n){"use strict";n.r(e);var r={ONLY_ONE_START:"ONLY_ONE_START",ONLY_ONE_END:"ONLY_ONE_END",ZERO_OR_ONE_START:"ZERO_OR_ONE_START",ZERO_OR_ONE_END:"ZERO_OR_ONE_END",ONE_OR_MORE_START:"ONE_OR_MORE_START",ONE_OR_MORE_END:"ONE_OR_MORE_END",ZERO_OR_MORE_START:"ZERO_OR_MORE_START",ZERO_OR_MORE_END:"ZERO_OR_MORE_END"};e.default={ERMarkers:r,insertMarkers:function(t,e){var n;t.append("defs").append("marker").attr("id",r.ONLY_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",r.ONLY_ONE_END).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,0 L3,18 M9,0 L9,18"),(n=t.append("defs").append("marker").attr("id",r.ZERO_OR_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto")).append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),n.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18"),(n=t.append("defs").append("marker").attr("id",r.ZERO_OR_ONE_END).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto")).append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),n.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,0 L21,18"),t.append("defs").append("marker").attr("id",r.ONE_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",r.ONE_OR_MORE_END).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18"),(n=t.append("defs").append("marker").attr("id",r.ZERO_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto")).append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),n.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18"),(n=t.append("defs").append("marker").attr("id",r.ZERO_OR_MORE_END).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto")).append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),n.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")}}},"./src/diagrams/er/erRenderer.js":function(t,e,n){"use strict";n.r(e),n.d(e,"setConf",(function(){return g})),n.d(e,"draw",(function(){return m}));var r=n("graphlib"),i=n.n(r),a=n("d3"),o=n("./src/diagrams/er/erDb.js"),s=n("./src/diagrams/er/parser/erDiagram.jison"),c=n.n(s),u=n("dagre"),l=n.n(u),f=n("./src/config.js"),h=n("./src/logger.js"),d=n("./src/diagrams/er/erMarkers.js"),p={},g=function(t){for(var e=Object.keys(t),n=0;nf&&A.push("'"+this.terminals_[E]+"'");O=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==h?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(O,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:v,expected:A})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(k[1]),x=null,_?(x=_,_=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(T=this.productions_[k[1]][1],M.$=i[i.length-T],M._$={first_line:a[a.length-(T||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(T||1)].first_column,last_column:a[a.length-1].last_column},m&&(M._$.range=[a[a.length-(T||1)].range[0],a[a.length-1].range[1]]),void 0!==(C=this.performAction.apply(M,[s,u,c,g.yy,k[1],i,a].concat(d))))return C;T&&(n=n.slice(0,-1*T*2),i=i.slice(0,-1*T),a=a.slice(0,-1*T)),n.push(this.productions_[k[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},p={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),30;case 1:return this.begin("type_directive"),31;case 2:return this.popState(),this.begin("arg_directive"),15;case 3:return this.popState(),this.popState(),33;case 4:return 32;case 5:case 6:break;case 7:return 11;case 8:break;case 9:return 9;case 10:return 29;case 11:return 4;case 12:return 23;case 13:return 24;case 14:return 25;case 15:return 26;case 16:return 23;case 17:return 24;case 18:return 25;case 19:return 27;case 20:return 28;case 21:case 22:return 27;case 23:return 20;case 24:return e.yytext[0];case 25:return 6}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\|o\b)/i,/^(?:\}o\b)/i,/^(?:\}\|)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:[A-Za-z][A-Za-z0-9\-]*)/i,/^(?:.)/i,/^(?:$)/i],conditions:{open_directive:{rules:[1],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0}}};function g(){this.yy={}}return d.lexer=p,g.prototype=d,d.Parser=g,new g}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n("./node_modules/node-libs-browser/mock/empty.js").readFileSync(n("./node_modules/path-browserify/index.js").normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n("./node_modules/process/browser.js"),n("./node_modules/webpack/buildin/module.js")(t))},"./src/diagrams/er/styles.js":function(t,e,n){"use strict";n.r(e),e.default=function(t){return"\n .entityBox {\n fill: ".concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n }\n\n .relationshipLabelBox {\n fill: ").concat(t.tertiaryColor,";\n opacity: 0.7;\n background-color: ").concat(t.tertiaryColor,";\n rect {\n opacity: 0.5;\n }\n }\n\n .relationshipLine {\n stroke: ").concat(t.lineColor,";\n }\n")}},"./src/diagrams/flowchart/flowChartShapes.js":function(t,e,n){"use strict";n.r(e),n.d(e,"addToRender",(function(){return y})),n.d(e,"addToRenderV2",(function(){return v}));var r=n("dagre-d3"),i=n.n(r);function a(t,e,n){var r=.9*(e.width+e.height),a=[{x:r/2,y:0},{x:r,y:-r/2},{x:r/2,y:-r},{x:0,y:-r/2}],o=m(t,r,r,a);return n.intersect=function(t){return i.a.intersect.polygon(n,a,t)},o}function o(t,e,n){var r=e.height,a=r/4,o=e.width+2*a,s=[{x:a,y:0},{x:o-a,y:0},{x:o,y:-r/2},{x:o-a,y:-r},{x:a,y:-r},{x:0,y:-r/2}],c=m(t,o,r,s);return n.intersect=function(t){return i.a.intersect.polygon(n,s,t)},c}function s(t,e,n){var r=e.width,a=e.height,o=[{x:-a/2,y:0},{x:r,y:0},{x:r,y:-a},{x:-a/2,y:-a},{x:0,y:-a/2}],s=m(t,r,a,o);return n.intersect=function(t){return i.a.intersect.polygon(n,o,t)},s}function c(t,e,n){var r=e.width,a=e.height,o=[{x:-2*a/6,y:0},{x:r-a/6,y:0},{x:r+2*a/6,y:-a},{x:a/6,y:-a}],s=m(t,r,a,o);return n.intersect=function(t){return i.a.intersect.polygon(n,o,t)},s}function u(t,e,n){var r=e.width,a=e.height,o=[{x:2*a/6,y:0},{x:r+a/6,y:0},{x:r-2*a/6,y:-a},{x:-a/6,y:-a}],s=m(t,r,a,o);return n.intersect=function(t){return i.a.intersect.polygon(n,o,t)},s}function l(t,e,n){var r=e.width,a=e.height,o=[{x:-2*a/6,y:0},{x:r+2*a/6,y:0},{x:r-a/6,y:-a},{x:a/6,y:-a}],s=m(t,r,a,o);return n.intersect=function(t){return i.a.intersect.polygon(n,o,t)},s}function f(t,e,n){var r=e.width,a=e.height,o=[{x:a/6,y:0},{x:r-a/6,y:0},{x:r+2*a/6,y:-a},{x:-2*a/6,y:-a}],s=m(t,r,a,o);return n.intersect=function(t){return i.a.intersect.polygon(n,o,t)},s}function h(t,e,n){var r=e.width,a=e.height,o=[{x:0,y:0},{x:r+a/2,y:0},{x:r,y:-a/2},{x:r+a/2,y:-a},{x:0,y:-a}],s=m(t,r,a,o);return n.intersect=function(t){return i.a.intersect.polygon(n,o,t)},s}function d(t,e,n){var r=e.height,a=e.width+r/4,o=t.insert("rect",":first-child").attr("rx",r/2).attr("ry",r/2).attr("x",-a/2).attr("y",-r/2).attr("width",a).attr("height",r);return n.intersect=function(t){return i.a.intersect.rect(n,t)},o}function p(t,e,n){var r=e.width,a=e.height,o=[{x:0,y:0},{x:r,y:0},{x:r,y:-a},{x:0,y:-a},{x:0,y:0},{x:-8,y:0},{x:r+8,y:0},{x:r+8,y:-a},{x:-8,y:-a},{x:-8,y:0}],s=m(t,r,a,o);return n.intersect=function(t){return i.a.intersect.polygon(n,o,t)},s}function g(t,e,n){var r=e.width,a=r/2,o=a/(2.5+r/50),s=e.height+o,c="M 0,"+o+" a "+a+","+o+" 0,0,0 "+r+" 0 a "+a+","+o+" 0,0,0 "+-r+" 0 l 0,"+s+" a "+a+","+o+" 0,0,0 "+r+" 0 l 0,"+-s,u=t.attr("label-offset-y",o).insert("path",":first-child").attr("d",c).attr("transform","translate("+-r/2+","+-(s/2+o)+")");return n.intersect=function(t){var e=i.a.intersect.rect(n,t),r=e.x-n.x;if(0!=a&&(Math.abs(r)n.height/2-o)){var s=o*o*(1-r*r/(a*a));0!=s&&(s=Math.sqrt(s)),s=o-s,t.y-n.y>0&&(s=-s),e.y+=s}return e},u}function y(t){t.shapes().question=a,t.shapes().hexagon=o,t.shapes().stadium=d,t.shapes().subroutine=p,t.shapes().cylinder=g,t.shapes().rect_left_inv_arrow=s,t.shapes().lean_right=c,t.shapes().lean_left=u,t.shapes().trapezoid=l,t.shapes().inv_trapezoid=f,t.shapes().rect_right_inv_arrow=h}function v(t){t({question:a}),t({hexagon:o}),t({stadium:d}),t({subroutine:p}),t({cylinder:g}),t({rect_left_inv_arrow:s}),t({lean_right:c}),t({lean_left:u}),t({trapezoid:l}),t({inv_trapezoid:f}),t({rect_right_inv_arrow:h})}function m(t,e,n,r){return t.insert("polygon",":first-child").attr("points",r.map((function(t){return t.x+","+t.y})).join(" ")).attr("transform","translate("+-e/2+","+n/2+")")}e.default={addToRender:y,addToRenderV2:v}},"./src/diagrams/flowchart/flowDb.js":function(t,e,n){"use strict";n.r(e),n.d(e,"parseDirective",(function(){return _})),n.d(e,"addVertex",(function(){return w})),n.d(e,"addSingleLink",(function(){return k})),n.d(e,"addLink",(function(){return C})),n.d(e,"updateLinkInterpolate",(function(){return E})),n.d(e,"updateLink",(function(){return T})),n.d(e,"addClass",(function(){return S})),n.d(e,"setDirection",(function(){return A})),n.d(e,"setClass",(function(){return M})),n.d(e,"setLink",(function(){return j})),n.d(e,"getTooltip",(function(){return D})),n.d(e,"setClickEvent",(function(){return N})),n.d(e,"bindFunctions",(function(){return B})),n.d(e,"getDirection",(function(){return L})),n.d(e,"getVertices",(function(){return F})),n.d(e,"getEdges",(function(){return P})),n.d(e,"getClasses",(function(){return I})),n.d(e,"clear",(function(){return Y})),n.d(e,"defaultStyle",(function(){return z})),n.d(e,"addSubGraph",(function(){return U})),n.d(e,"getDepthFirstPos",(function(){return H})),n.d(e,"indexNodes",(function(){return G})),n.d(e,"getSubGraphs",(function(){return q})),n.d(e,"firstGraph",(function(){return X}));var r=n("d3"),i=n("./src/utils.js"),a=n("./src/config.js"),o=n("./src/diagrams/common/common.js"),s=n("./src/mermaidAPI.js");function c(t){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var u,l="",f=a.getConfig(),h={},d=[],p=[],g=[],y={},v={},m=0,b=!0,x=[],_=function(t,e,n){s.default.parseDirective(this,t,e,n)},w=function(t,e,n,r,i){var s,c=t;void 0!==c&&0!==c.trim().length&&(c[0].match(/\d/)&&(c=l+c),void 0===h[c]&&(h[c]={id:c,styles:[],classes:[]}),void 0!==e?(f=a.getConfig(),'"'===(s=o.default.sanitizeText(e.trim(),f))[0]&&'"'===s[s.length-1]&&(s=s.substring(1,s.length-1)),h[c].text=s):void 0===h[c].text&&(h[c].text=t),void 0!==n&&(h[c].type=n),null!=r&&r.forEach((function(t){h[c].styles.push(t)})),null!=i&&i.forEach((function(t){h[c].classes.push(t)})))},k=function(t,e,n,r){var i=t,a=e;i[0].match(/\d/)&&(i=l+i),a[0].match(/\d/)&&(a=l+a);var s={start:i,end:a,type:void 0,text:""};void 0!==(r=n.text)&&(s.text=o.default.sanitizeText(r.trim(),f),'"'===s.text[0]&&'"'===s.text[s.text.length-1]&&(s.text=s.text.substring(1,s.text.length-1))),void 0!==n&&(s.type=n.type,s.stroke=n.stroke,s.length=n.length),d.push(s)},C=function(t,e,n,r){var i,a;for(i=0;i/)&&(u="LR"),u.match(/.*v/)&&(u="TB")},M=function(t,e){t.split(",").forEach((function(t){var n=t;t[0].match(/\d/)&&(n=l+n),void 0!==h[n]&&h[n].classes.push(e),void 0!==y[n]&&y[n].classes.push(e)}))},O=function(t,e){t.split(",").forEach((function(t){void 0!==e&&(v[t]=o.default.sanitizeText(e,f))}))},j=function(t,e,n,r){t.split(",").forEach((function(t){var n=t;t[0].match(/\d/)&&(n=l+n),void 0!==h[n]&&(h[n].link=i.default.formatUrl(e,f),h[n].linkTarget=r)})),O(t,n),M(t,"clickable")},D=function(t){return v[t]},N=function(t,e,n){t.split(",").forEach((function(t){!function(t,e){var n=t;t[0].match(/\d/)&&(n=l+n),"loose"===a.getConfig().securityLevel&&void 0!==e&&void 0!==h[n]&&x.push((function(){var t=document.querySelector('[id="'.concat(n,'"]'));null!==t&&t.addEventListener("click",(function(){i.default.runFunc(e,n)}),!1)}))}(t,e)})),O(t,n),M(t,"clickable")},B=function(t){x.forEach((function(e){e(t)}))},L=function(){return u.trim()},F=function(){return h},P=function(){return d},I=function(){return p},R=function(t){var e=Object(r.select)(".mermaidTooltip");null===(e._groups||e)[0][0]&&(e=Object(r.select)("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),Object(r.select)(t).select("svg").selectAll("g.node").on("mouseover",(function(){var t=Object(r.select)(this);if(null!==t.attr("title")){var n=this.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.html(t.attr("title")).style("left",window.scrollX+n.left+(n.right-n.left)/2+"px").style("top",window.scrollY+n.top-14+document.body.scrollTop+"px"),t.classed("hover",!0)}})).on("mouseout",(function(){e.transition().duration(500).style("opacity",0),Object(r.select)(this).classed("hover",!1)}))};x.push(R);var Y=function(){h={},p={},d=[],(x=[]).push(R),g=[],y={},m=0,v=[],b=!0},z=function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},U=function(t,e,n){var r=t.trim(),i=n;t===n&&n.match(/\s/)&&(r=void 0);var a,s,u,h=[];a=h.concat.apply(h,e),s={boolean:{},number:{},string:{}},u=[],h=a.filter((function(t){var e=c(t);return""!==t.trim()&&(e in s?!s[e].hasOwnProperty(t)&&(s[e][t]=!0):!(u.indexOf(t)>=0)&&u.push(t))}));for(var d=0;d0&&function t(e,n){var r=g[n].nodes;if(!(($+=1)>2e3)){if(V[$]=n,g[n].id===e)return{result:!0,count:0};for(var i=0,a=1;i=0){var s=t(e,o);if(s.result)return{result:!0,count:a+s.count};a+=s.count}i+=1}return{result:!1,count:a}}}("none",g.length-1)},q=function(){return g},X=function(){return!!b&&(b=!1,!0)};e.default={parseDirective:_,defaultConfig:function(){return a.defaultConfig.flowchart},addVertex:w,addLink:C,updateLinkInterpolate:E,updateLink:T,addClass:S,setDirection:A,setClass:M,getTooltip:D,setClickEvent:N,setLink:j,bindFunctions:B,getDirection:L,getVertices:F,getEdges:P,getClasses:I,clear:Y,defaultStyle:z,addSubGraph:U,getDepthFirstPos:H,indexNodes:G,getSubGraphs:q,destructLink:function(t,e){var n,r=function(t){var e=t.trim(),n=e.slice(0,-1),r="arrow_open";switch(e.slice(-1)){case"x":r="arrow_cross","x"===e[0]&&(r="double_"+r,n=n.slice(1));break;case">":r="arrow_point","<"===e[0]&&(r="double_"+r,n=n.slice(1));break;case"o":r="arrow_circle","o"===e[0]&&(r="double_"+r,n=n.slice(1))}var i="normal",a=n.length-1;"="===n[0]&&(i="thick");var o=function(t,e){for(var n=e.length,r=0,i=0;i0&&(a=i.classes.join(" "));var o,s=Object(g.getStylesFromArray)(i.styles),c=void 0!==i.text?i.text:i.id;if(Object(u.getConfig)().flowchart.htmlLabels){var l={label:c.replace(/fa[lrsb]?:fa-[\w-]+/g,(function(t){return"")}))};(o=h()(r,l).node()).parentNode.removeChild(o)}else{var f=document.createElementNS("http://www.w3.org/2000/svg","text");f.setAttribute("style",s.labelStyle.replace("color:","fill:"));for(var y=c.split(p.default.lineBreakRegex),v=0;v=0;v--)s=y[v],d.logger.info("Subgraph - ",s),o.default.addVertex(s.id,s.title,"group",void 0,s.classes);var x=o.default.getVertices(),_=o.default.getEdges();d.logger.info(_);var w=0;for(w=y.length-1;w>=0;w--){s=y[w],Object(a.selectAll)("cluster").append("text");for(var k=0;k0&&(a=i.classes.join(" "));var o,s=Object(y.getStylesFromArray)(i.styles),c=void 0!==i.text?i.text:i.id;if(Object(u.getConfig)().flowchart.htmlLabels){var l={label:c.replace(/fa[lrsb]?:fa-[\w-]+/g,(function(t){return"")}))};(o=d()(r,l).node()).parentNode.removeChild(o)}else{var f=document.createElementNS("http://www.w3.org/2000/svg","text");f.setAttribute("style",s.labelStyle.replace("color:","fill:"));for(var h=c.split(g.default.lineBreakRegex),p=0;p').concat(o.text,"")):(f.labelType="text",f.label=o.text.replace(g.default.lineBreakRegex,"\n"),void 0===o.style&&(f.style=f.style||"stroke: #333; stroke-width: 1.5px;fill:none"),f.labelStyle=f.labelStyle.replace("color:","fill:"))),f.id=s,f.class=c+" "+l,f.minlen=o.length||1,e.setEdge(o.start,o.end,f,i)}))},w=function(t){p.logger.info("Extracting classes"),o.default.clear();try{var e=c.a.parser;return e.yy=o.default,e.parse(t),o.default.getClasses()}catch(t){return}},k=function(t,e){p.logger.info("Drawing flowchart"),o.default.clear();var n=c.a.parser;n.yy=o.default,n.parse(t);var r=o.default.getDirection();void 0===r&&(r="TD");for(var s,l=Object(u.getConfig)().flowchart,h=l.nodeSpacing||50,d=l.rankSpacing||50,g=new i.a.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:r,nodesep:h,ranksep:d,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}})),y=o.default.getSubGraphs(),m=y.length-1;m>=0;m--)s=y[m],o.default.addVertex(s.id,s.title,"group",void 0,s.classes);var b=o.default.getVertices(),w=o.default.getEdges(),k=0;for(k=y.length-1;k>=0;k--){s=y[k],Object(a.selectAll)("cluster").append("text");for(var C=0;Cf&&A.push("'"+this.terminals_[E]+"'");O=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==h?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(O,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:v,expected:A})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(k[1]),x=null,_?(x=_,_=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(T=this.productions_[k[1]][1],M.$=i[i.length-T],M._$={first_line:a[a.length-(T||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(T||1)].first_column,last_column:a[a.length-1].last_column},m&&(M._$.range=[a[a.length-(T||1)].range[0],a[a.length-1].range[1]]),void 0!==(C=this.performAction.apply(M,[s,u,c,g.yy,k[1],i,a].concat(d))))return C;T&&(n=n.slice(0,-1*T*2),i=i.slice(0,-1*T),a=a.slice(0,-1*T)),n.push(this.productions_[k[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},qt={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),12;case 1:return this.begin("type_directive"),13;case 2:return this.popState(),this.begin("arg_directive"),10;case 3:return this.popState(),this.popState(),15;case 4:return 14;case 5:case 6:break;case 7:this.begin("string");break;case 8:this.popState();break;case 9:return"STR";case 10:return 75;case 11:return 84;case 12:return 76;case 13:return 90;case 14:return 77;case 15:return 78;case 16:return 79;case 17:case 18:return t.lex.firstGraph()&&this.begin("dir"),24;case 19:return 38;case 20:return 42;case 21:case 22:case 23:case 24:return 87;case 25:return this.popState(),25;case 26:case 27:case 28:case 29:case 30:case 31:case 32:case 33:case 34:case 35:return this.popState(),26;case 36:return 91;case 37:return 99;case 38:return 47;case 39:return 96;case 40:return 46;case 41:return 20;case 42:return 92;case 43:return 110;case 44:case 45:case 46:return 70;case 47:case 48:case 49:return 69;case 50:return 51;case 51:return 52;case 52:return 53;case 53:return 54;case 54:return 55;case 55:return 56;case 56:return 57;case 57:return 58;case 58:return 97;case 59:return 100;case 60:return 111;case 61:return 108;case 62:return 101;case 63:case 64:return 109;case 65:return 102;case 66:return 61;case 67:return 81;case 68:return"SEP";case 69:return 80;case 70:return 95;case 71:return 63;case 72:return 62;case 73:return 65;case 74:return 64;case 75:return 106;case 76:return 107;case 77:return 71;case 78:return 49;case 79:return 50;case 80:return 40;case 81:return 41;case 82:return 59;case 83:return 60;case 84:return 117;case 85:return 21;case 86:return 22;case 87:return 23}},rules:[/^(?:%%\{)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:%%(?!\{)[^\n]*)/,/^(?:[^\}]%%[^\n]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:click\b)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\[)/,/^(?:\]\))/,/^(?:\[\[)/,/^(?:\]\])/,/^(?:\[\()/,/^(?:\)\])/,/^(?:-)/,/^(?:\.)/,/^(?:[\_])/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:[A-Za-z]+)/,/^(?:\\\])/,/^(?:\[\/)/,/^(?:\/\])/,/^(?:\[\\)/,/^(?:[!"#$%&'*+,-.`?\\_/])/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:\{)/,/^(?:\})/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},vertex:{rules:[],inclusive:!1},dir:{rules:[25,26,27,28,29,30,31,32,33,34,35],inclusive:!1},string:{rules:[8,9],inclusive:!1},INITIAL:{rules:[0,5,6,7,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87],inclusive:!0}}};function Xt(){this.yy={}}return Gt.lexer=qt,Xt.prototype=Gt,Gt.Parser=Xt,new Xt}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n("./node_modules/node-libs-browser/mock/empty.js").readFileSync(n("./node_modules/path-browserify/index.js").normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n("./node_modules/process/browser.js"),n("./node_modules/webpack/buildin/module.js")(t))},"./src/diagrams/flowchart/styles.js":function(t,e,n){"use strict";n.r(e),e.default=function(t){return".label {\n font-family: ".concat(t.fontFamily,";\n color: ").concat(t.nodeTextColor||t.textColor,";\n }\n\n .label text {\n fill: ").concat(t.nodeTextColor||t.textColor,";\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ").concat(t.arrowheadColor,";\n }\n\n .edgePath .path {\n stroke: ").concat(t.lineColor,";\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ").concat(t.lineColor,";\n fill: none;\n }\n\n .edgeLabel {\n background-color: ").concat(t.edgeLabelBackground,";\n rect {\n opacity: 0.5;\n background-color: ").concat(t.edgeLabelBackground,";\n fill: ").concat(t.edgeLabelBackground,";\n }\n text-align: center;\n }\n\n .cluster rect {\n fill: ").concat(t.clusterBkg,";\n stroke: ").concat(t.clusterBorder,";\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ").concat(t.titleColor,";\n }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ").concat(t.fontFamily,";\n font-size: 12px;\n background: ").concat(t.tertiaryColor,";\n border: 1px solid ").concat(t.border2,";\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n")}},"./src/diagrams/gantt/ganttDb.js":function(t,e,n){"use strict";n.r(e),n.d(e,"parseDirective",(function(){return E})),n.d(e,"clear",(function(){return T})),n.d(e,"setAxisFormat",(function(){return S})),n.d(e,"getAxisFormat",(function(){return A})),n.d(e,"setTodayMarker",(function(){return M})),n.d(e,"getTodayMarker",(function(){return O})),n.d(e,"setDateFormat",(function(){return j})),n.d(e,"enableInclusiveEndDates",(function(){return D})),n.d(e,"endDatesAreInclusive",(function(){return N})),n.d(e,"getDateFormat",(function(){return B})),n.d(e,"setExcludes",(function(){return L})),n.d(e,"getExcludes",(function(){return F})),n.d(e,"setTitle",(function(){return P})),n.d(e,"getTitle",(function(){return I})),n.d(e,"addSection",(function(){return R})),n.d(e,"getSections",(function(){return Y})),n.d(e,"getTasks",(function(){return z})),n.d(e,"addTask",(function(){return Q})),n.d(e,"findTaskById",(function(){return K})),n.d(e,"addTaskOrg",(function(){return tt})),n.d(e,"setLink",(function(){return nt})),n.d(e,"setClass",(function(){return rt})),n.d(e,"setClickEvent",(function(){return at})),n.d(e,"bindFunctions",(function(){return ot}));var r=n("moment-mini"),i=n.n(r),a=n("@braintree/sanitize-url"),o=n("./src/logger.js"),s=n("./src/config.js"),c=n("./src/utils.js"),u=n("./src/mermaidAPI.js");function l(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e=6&&n.indexOf("weekends")>=0||n.indexOf(t.format("dddd").toLowerCase())>=0||n.indexOf(t.format(e.trim()))>=0},W=function(t,e,n){if(n.length&&!t.manualEndTime){var r=i()(t.startTime,e,!0);r.add(1,"d");var a=i()(t.endTime,e,!0),o=$(r,a,e,n);t.endTime=a.toDate(),t.renderEndTime=o}},$=function(t,e,n,r){for(var i=!1,a=null;t<=e;)i||(a=e.toDate()),(i=U(t,n,r))&&e.add(1,"d"),t.add(1,"d");return a},V=function(t,e,n){n=n.trim();var r=/^after\s+([\d\w- ]+)/.exec(n.trim());if(null!==r){var a=null;if(r[1].split(" ").forEach((function(t){var e=K(t);void 0!==e&&(a?e.endTime>a.endTime&&(a=e):a=e)})),a)return a.endTime;var s=new Date;return s.setHours(0,0,0,0),s}var c=i()(n,e.trim(),!0);return c.isValid()?c.toDate():(o.logger.debug("Invalid date:"+n),o.logger.debug("With date format:"+e.trim()),new Date)},H=function(t,e){if(null!==t)switch(t[2]){case"s":e.add(t[1],"seconds");break;case"m":e.add(t[1],"minutes");break;case"h":e.add(t[1],"hours");break;case"d":e.add(t[1],"days");break;case"w":e.add(t[1],"weeks")}return e.toDate()},G=function(t,e,n,r){r=r||!1,n=n.trim();var a=i()(n,e.trim(),!0);return a.isValid()?(r&&a.add(1,"d"),a.toDate()):H(/^([\d]+)([wdhms])/.exec(n.trim()),i()(t))},q=0,X=function(t){return void 0===t?"task"+(q+=1):t},Z=[],J={},Q=function(t,e){var n={section:x,type:x,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:e},task:t,classes:[]},r=function(t,e){var n=(":"===e.substr(0,1)?e.substr(1,e.length):e).split(","),r={};st(n,r,_);for(var i=0;ir?i=1:n0&&(n=t.classes.join(" "));for(var r=0,i=0;in-e?n+a+1.5*c.leftPadding>o?e+r-5:n+r+5:(n-e)/2+e+r})).attr("y",(function(t,r){return t.order*e+c.barHeight/2+(c.fontSize/2-2)+n})).attr("text-height",i).attr("class",(function(t){var e=h(t.startTime),n=h(t.endTime);t.milestone&&(n=e+i);var r=this.getBBox().width,a="";t.classes.length>0&&(a=t.classes.join(" "));var s=0;console.log(c);for(var u=0;un-e?n+r+1.5*c.leftPadding>o?a+" taskTextOutsideLeft taskTextOutside"+s+" "+l:a+" taskTextOutsideRight taskTextOutside"+s+" "+l+" width-"+r:a+" taskText taskText"+s+" "+l+" width-"+r}))}(g,b,x,_,m,0,y),function(t,e){for(var n=[],r=0,i=0;i0&&o.setAttribute("dy","1em"),o.textContent=e[i],r.appendChild(o)}return r})).attr("x",10).attr("y",(function(i,a){if(!(a>0))return i[1]*t/2+e;for(var o=0;of&&A.push("'"+this.terminals_[E]+"'");O=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==h?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(O,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:v,expected:A})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(k[1]),x=null,_?(x=_,_=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(T=this.productions_[k[1]][1],M.$=i[i.length-T],M._$={first_line:a[a.length-(T||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(T||1)].first_column,last_column:a[a.length-1].last_column},m&&(M._$.range=[a[a.length-(T||1)].range[0],a[a.length-1].range[1]]),void 0!==(C=this.performAction.apply(M,[s,u,c,g.yy,k[1],i,a].concat(d))))return C;T&&(n=n.slice(0,-1*T*2),i=i.slice(0,-1*T),a=a.slice(0,-1*T)),n.push(this.productions_[k[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},y={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),32;case 1:return this.begin("type_directive"),33;case 2:return this.popState(),this.begin("arg_directive"),25;case 3:return this.popState(),this.popState(),35;case 4:return 34;case 5:case 6:case 7:break;case 8:return 11;case 9:case 10:case 11:break;case 12:this.begin("href");break;case 13:this.popState();break;case 14:return 30;case 15:this.begin("callbackname");break;case 16:this.popState();break;case 17:this.popState(),this.begin("callbackargs");break;case 18:return 28;case 19:this.popState();break;case 20:return 29;case 21:this.begin("click");break;case 22:this.popState();break;case 23:return 27;case 24:return 5;case 25:return 12;case 26:return 13;case 27:return 14;case 28:return 15;case 29:return 16;case 30:return"date";case 31:return 17;case 32:return 18;case 33:return 20;case 34:return 21;case 35:return 25;case 36:return 7;case 37:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},callbackargs:{rules:[19,20],inclusive:!1},callbackname:{rules:[16,17,18],inclusive:!1},href:{rules:[13,14],inclusive:!1},click:{rules:[22,23],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,15,21,24,25,26,27,28,29,30,31,32,33,34,35,36,37],inclusive:!0}}};function v(){this.yy={}}return g.lexer=y,v.prototype=g,g.Parser=v,new v}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n("./node_modules/node-libs-browser/mock/empty.js").readFileSync(n("./node_modules/path-browserify/index.js").normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n("./node_modules/process/browser.js"),n("./node_modules/webpack/buildin/module.js")(t))},"./src/diagrams/gantt/styles.js":function(t,e,n){"use strict";n.r(e),e.default=function(t){return'\n .mermaid-main-font {\n font-family: "trebuchet ms", verdana, arial;\n font-family: var(--mermaid-font-family);\n }\n\n .section {\n stroke: none;\n opacity: 0.2;\n }\n\n .section0 {\n fill: '.concat(t.sectionBkgColor,";\n }\n\n .section2 {\n fill: ").concat(t.sectionBkgColor2,";\n }\n\n .section1,\n .section3 {\n fill: ").concat(t.altSectionBkgColor,";\n opacity: 0.2;\n }\n\n .sectionTitle0 {\n fill: ").concat(t.titleColor,";\n }\n\n .sectionTitle1 {\n fill: ").concat(t.titleColor,";\n }\n\n .sectionTitle2 {\n fill: ").concat(t.titleColor,";\n }\n\n .sectionTitle3 {\n fill: ").concat(t.titleColor,";\n }\n\n .sectionTitle {\n text-anchor: start;\n font-size: 11px;\n text-height: 14px;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family);\n\n }\n\n\n /* Grid and axis */\n\n .grid .tick {\n stroke: ").concat(t.gridColor,";\n opacity: 0.8;\n shape-rendering: crispEdges;\n text {\n font-family: ").concat(t.fontFamily,";\n fill: ").concat(t.textColor,";\n }\n }\n\n .grid path {\n stroke-width: 0;\n }\n\n\n /* Today line */\n\n .today {\n fill: none;\n stroke: ").concat(t.todayLineColor,";\n stroke-width: 2px;\n }\n\n\n /* Task styling */\n\n /* Default task */\n\n .task {\n stroke-width: 2;\n }\n\n .taskText {\n text-anchor: middle;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family);\n }\n\n .taskText:not([font-size]) {\n font-size: 11px;\n }\n\n .taskTextOutsideRight {\n fill: ").concat(t.taskTextDarkColor,";\n text-anchor: start;\n font-size: 11px;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family);\n\n }\n\n .taskTextOutsideLeft {\n fill: ").concat(t.taskTextDarkColor,";\n text-anchor: end;\n font-size: 11px;\n }\n\n /* Special case clickable */\n .task.clickable {\n cursor: pointer;\n }\n .taskText.clickable {\n cursor: pointer;\n fill: ").concat(t.taskTextClickableColor," !important;\n font-weight: bold;\n }\n\n .taskTextOutsideLeft.clickable {\n cursor: pointer;\n fill: ").concat(t.taskTextClickableColor," !important;\n font-weight: bold;\n }\n\n .taskTextOutsideRight.clickable {\n cursor: pointer;\n fill: ").concat(t.taskTextClickableColor," !important;\n font-weight: bold;\n }\n\n /* Specific task settings for the sections*/\n\n .taskText0,\n .taskText1,\n .taskText2,\n .taskText3 {\n fill: ").concat(t.taskTextColor,";\n }\n\n .task0,\n .task1,\n .task2,\n .task3 {\n fill: ").concat(t.taskBkgColor,";\n stroke: ").concat(t.taskBorderColor,";\n }\n\n .taskTextOutside0,\n .taskTextOutside2\n {\n fill: ").concat(t.taskTextOutsideColor,";\n }\n\n .taskTextOutside1,\n .taskTextOutside3 {\n fill: ").concat(t.taskTextOutsideColor,";\n }\n\n\n /* Active task */\n\n .active0,\n .active1,\n .active2,\n .active3 {\n fill: ").concat(t.activeTaskBkgColor,";\n stroke: ").concat(t.activeTaskBorderColor,";\n }\n\n .activeText0,\n .activeText1,\n .activeText2,\n .activeText3 {\n fill: ").concat(t.taskTextDarkColor," !important;\n }\n\n\n /* Completed task */\n\n .done0,\n .done1,\n .done2,\n .done3 {\n stroke: ").concat(t.doneTaskBorderColor,";\n fill: ").concat(t.doneTaskBkgColor,";\n stroke-width: 2;\n }\n\n .doneText0,\n .doneText1,\n .doneText2,\n .doneText3 {\n fill: ").concat(t.taskTextDarkColor," !important;\n }\n\n\n /* Tasks on the critical line */\n\n .crit0,\n .crit1,\n .crit2,\n .crit3 {\n stroke: ").concat(t.critBorderColor,";\n fill: ").concat(t.critBkgColor,";\n stroke-width: 2;\n }\n\n .activeCrit0,\n .activeCrit1,\n .activeCrit2,\n .activeCrit3 {\n stroke: ").concat(t.critBorderColor,";\n fill: ").concat(t.activeTaskBkgColor,";\n stroke-width: 2;\n }\n\n .doneCrit0,\n .doneCrit1,\n .doneCrit2,\n .doneCrit3 {\n stroke: ").concat(t.critBorderColor,";\n fill: ").concat(t.doneTaskBkgColor,";\n stroke-width: 2;\n cursor: pointer;\n shape-rendering: crispEdges;\n }\n\n .milestone {\n transform: rotate(45deg) scale(0.8,0.8);\n }\n\n .milestoneText {\n font-style: italic;\n }\n .doneCritText0,\n .doneCritText1,\n .doneCritText2,\n .doneCritText3 {\n fill: ").concat(t.taskTextDarkColor," !important;\n }\n\n .activeCritText0,\n .activeCritText1,\n .activeCritText2,\n .activeCritText3 {\n fill: ").concat(t.taskTextDarkColor," !important;\n }\n\n .titleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ").concat(t.textColor," ;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family);\n }\n")}},"./src/diagrams/git/gitGraphAst.js":function(t,e,n){"use strict";n.r(e),n.d(e,"setDirection",(function(){return d})),n.d(e,"setOptions",(function(){return g})),n.d(e,"getOptions",(function(){return y})),n.d(e,"commit",(function(){return v})),n.d(e,"branch",(function(){return m})),n.d(e,"merge",(function(){return b})),n.d(e,"checkout",(function(){return x})),n.d(e,"reset",(function(){return _})),n.d(e,"prettyPrint",(function(){return C})),n.d(e,"clear",(function(){return E})),n.d(e,"getBranchesAsObjArray",(function(){return T})),n.d(e,"getBranches",(function(){return S})),n.d(e,"getCommits",(function(){return A})),n.d(e,"getCommitsArray",(function(){return M})),n.d(e,"getCurrentBranch",(function(){return O})),n.d(e,"getDirection",(function(){return j})),n.d(e,"getHead",(function(){return D}));var r=n("./src/logger.js"),i=n("./src/utils.js"),a={},o=null,s={master:o},c="master",u="LR",l=0;function f(){return Object(i.random)({length:7})}function h(t,e){for(r.logger.debug("Entering isfastforwardable:",t.id,e.id);t.seq<=e.seq&&t!==e&&null!=e.parent;){if(Array.isArray(e.parent))return r.logger.debug("In merge commit:",e.parent),h(t,a[e.parent[0]])||h(t,a[e.parent[1]]);e=a[e.parent]}return r.logger.debug(t.id,e.id),t.id===e.id}var d=function(t){u=t},p={},g=function(t){r.logger.debug("options str",t),t=(t=t&&t.trim())||"{}";try{p=JSON.parse(t)}catch(t){r.logger.error("error while parsing gitGraph options",t.message)}},y=function(){return p},v=function(t){var e={id:f(),message:t,seq:l++,parent:null==o?null:o.id};o=e,a[e.id]=e,s[c]=e.id,r.logger.debug("in pushCommit "+e.id)},m=function(t){s[t]=null!=o?o.id:null,r.logger.debug("in createBranch")},b=function(t){var e=a[s[c]],n=a[s[t]];if(function(t,e){return t.seq>e.seq&&h(e,t)}(e,n))r.logger.debug("Already merged");else{if(h(e,n))s[c]=s[t],o=a[s[c]];else{var i={id:f(),message:"merged branch "+t+" into "+c,seq:l++,parent:[null==o?null:o.id,s[t]]};o=i,a[i.id]=i,s[c]=i.id}r.logger.debug(s),r.logger.debug("in mergeBranch")}},x=function(t){r.logger.debug("in checkout");var e=s[c=t];o=a[e]},_=function(t){r.logger.debug("in reset",t);var e=t.split(":")[0],n=parseInt(t.split(":")[1]),i="HEAD"===e?o:a[s[e]];for(r.logger.debug(i,n);n>0;)if(n--,!(i=a[i.parent])){var u="Critical error - unique parent commit not found during reset";throw r.logger.error(u),u}o=i,s[c]=i.id};function w(t,e,n){var r=t.indexOf(e);-1===r?t.push(n):t.splice(r,1,n)}function k(t){var e=t.reduce((function(t,e){return t.seq>e.seq?t:e}),t[0]),n="";t.forEach((function(t){n+=t===e?"\t*":"\t|"}));var i,o,c,u=[n,e.id,e.seq];for(var l in s)s[l]===e.id&&u.push(l);if(r.logger.debug(u.join(" ")),Array.isArray(e.parent)){var f=a[e.parent[0]];w(t,e,f),t.push(a[e.parent[1]])}else{if(null==e.parent)return;var h=a[e.parent];w(t,e,h)}i=t,o=function(t){return t.id},c=Object.create(null),k(t=i.reduce((function(t,e){var n=o(e);return c[n]||(c[n]=!0,t.push(e)),t}),[]))}var C=function(){r.logger.debug(a),k([M()[0]])},E=function(){a={},s={master:o=null},c="master",l=0},T=function(){var t=[];for(var e in s)t.push({name:e,commit:a[s[e]]});return t},S=function(){return s},A=function(){return a},M=function(){var t=Object.keys(a).map((function(t){return a[t]}));return t.forEach((function(t){r.logger.debug(t.id)})),t.sort((function(t,e){return e.seq-t.seq})),t},O=function(){return c},j=function(){return u},D=function(){return o};e.default={setDirection:d,setOptions:g,getOptions:y,commit:v,branch:m,merge:b,checkout:x,reset:_,prettyPrint:C,clear:E,getBranchesAsObjArray:T,getBranches:S,getCommits:A,getCommitsArray:M,getCurrentBranch:O,getDirection:j,getHead:D}},"./src/diagrams/git/gitGraphRenderer.js":function(t,e,n){"use strict";n.r(e),n.d(e,"setConf",(function(){return d})),n.d(e,"draw",(function(){return x}));var r,i=n("d3"),a=n("./src/diagrams/git/gitGraphAst.js"),o=n("./src/diagrams/git/parser/gitGraph.jison"),s=n.n(o),c=n("./src/logger.js"),u=n("./src/utils.js"),l={},f={nodeSpacing:150,nodeFillColor:"yellow",nodeStrokeWidth:2,nodeStrokeColor:"grey",lineStrokeWidth:4,branchOffset:50,lineColor:"grey",leftMargin:50,branchColors:["#442f74","#983351","#609732","#AA9A39"],nodeRadius:10,nodeLabel:{width:75,height:100,x:-25,y:0}},h={},d=function(t){h=t};function p(t,e,n,r){var a=Object(u.interpolateToCurve)(r,i.curveBasis),o=f.branchColors[n%f.branchColors.length],s=Object(i.line)().x((function(t){return Math.round(t.x)})).y((function(t){return Math.round(t.y)})).curve(a);t.append("svg:path").attr("d",s(e)).style("stroke",o).style("stroke-width",f.lineStrokeWidth).style("fill","none")}function g(t,e){e=e||t.node().getBBox();var n=t.node().getCTM();return{left:n.e+e.x*n.a,top:n.f+e.y*n.d,width:e.width,height:e.height}}function y(t,e,n,r,i){c.logger.debug("svgDrawLineForCommits: ",e,n);var a=g(t.select("#node-"+e+" circle")),o=g(t.select("#node-"+n+" circle"));switch(r){case"LR":if(a.left-o.left>f.nodeSpacing){var s={x:a.left-f.nodeSpacing,y:o.top+o.height/2};p(t,[s,{x:o.left+o.width,y:o.top+o.height/2}],i,"linear"),p(t,[{x:a.left,y:a.top+a.height/2},{x:a.left-f.nodeSpacing/2,y:a.top+a.height/2},{x:a.left-f.nodeSpacing/2,y:s.y},s],i)}else p(t,[{x:a.left,y:a.top+a.height/2},{x:a.left-f.nodeSpacing/2,y:a.top+a.height/2},{x:a.left-f.nodeSpacing/2,y:o.top+o.height/2},{x:o.left+o.width,y:o.top+o.height/2}],i);break;case"BT":if(o.top-a.top>f.nodeSpacing){var u={x:o.left+o.width/2,y:a.top+a.height+f.nodeSpacing};p(t,[u,{x:o.left+o.width/2,y:o.top}],i,"linear"),p(t,[{x:a.left+a.width/2,y:a.top+a.height},{x:a.left+a.width/2,y:a.top+a.height+f.nodeSpacing/2},{x:o.left+o.width/2,y:u.y-f.nodeSpacing/2},u],i)}else p(t,[{x:a.left+a.width/2,y:a.top+a.height},{x:a.left+a.width/2,y:a.top+f.nodeSpacing/2},{x:o.left+o.width/2,y:o.top-f.nodeSpacing/2},{x:o.left+o.width/2,y:o.top}],i)}}function v(t,e){return t.select(e).node().cloneNode(!0)}function m(t,e,n,i){var a,o=Object.keys(l).length;if("string"==typeof e)do{if(a=l[e],c.logger.debug("in renderCommitHistory",a.id,a.seq),t.select("#node-"+e).size()>0)return;t.append((function(){return v(t,"#def-commit")})).attr("class","commit").attr("id",(function(){return"node-"+a.id})).attr("transform",(function(){switch(i){case"LR":return"translate("+(a.seq*f.nodeSpacing+f.leftMargin)+", "+r*f.branchOffset+")";case"BT":return"translate("+(r*f.branchOffset+f.leftMargin)+", "+(o-a.seq)*f.nodeSpacing+")"}})).attr("fill",f.nodeFillColor).attr("stroke",f.nodeStrokeColor).attr("stroke-width",f.nodeStrokeWidth);var s=void 0;for(var u in n)if(n[u].commit===a){s=n[u];break}s&&(c.logger.debug("found branch ",s.name),t.select("#node-"+a.id+" p").append("xhtml:span").attr("class","branch-label").text(s.name+", ")),t.select("#node-"+a.id+" p").append("xhtml:span").attr("class","commit-id").text(a.id),""!==a.message&&"BT"===i&&t.select("#node-"+a.id+" p").append("xhtml:span").attr("class","commit-msg").text(", "+a.message),e=a.parent}while(e&&l[e]);Array.isArray(e)&&(c.logger.debug("found merge commmit",e),m(t,e[0],n,i),r++,m(t,e[1],n,i),r--)}function b(t,e,n,r){for(r=r||0;e.seq>0&&!e.lineDrawn;)"string"==typeof e.parent?(y(t,e.id,e.parent,n,r),e.lineDrawn=!0,e=l[e.parent]):Array.isArray(e.parent)&&(y(t,e.id,e.parent[0],n,r),y(t,e.id,e.parent[1],n,r+1),b(t,l[e.parent[1]],n,r+1),e.lineDrawn=!0,e=l[e.parent[0]])}var x=function(t,e,n){try{var o=s.a.parser;o.yy=a.default,o.yy.clear(),c.logger.debug("in gitgraph renderer",t+"\n","id:",e,n),o.parse(t+"\n"),f=Object.assign(f,h,a.default.getOptions()),c.logger.debug("effective options",f);var u=a.default.getDirection();l=a.default.getCommits();var d=a.default.getBranchesAsObjArray();"BT"===u&&(f.nodeLabel.x=d.length*f.branchOffset,f.nodeLabel.width="100%",f.nodeLabel.y=-2*f.nodeRadius);var p=Object(i.select)('[id="'.concat(e,'"]'));for(var g in function(t){t.append("defs").append("g").attr("id","def-commit").append("circle").attr("r",f.nodeRadius).attr("cx",0).attr("cy",0),t.select("#def-commit").append("foreignObject").attr("width",f.nodeLabel.width).attr("height",f.nodeLabel.height).attr("x",f.nodeLabel.x).attr("y",f.nodeLabel.y).attr("class","node-label").attr("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility").append("p").html("")}(p),r=1,d){var y=d[g];m(p,y.commit.id,d,u),b(p,y.commit,u),r++}p.attr("height",(function(){return"BT"===u?Object.keys(l).length*f.nodeSpacing:(d.length+1)*f.branchOffset}))}catch(t){c.logger.error("Error while rendering gitgraph"),c.logger.error(t.message)}};e.default={setConf:d,draw:x}},"./src/diagrams/git/parser/gitGraph.jison":function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[2,3],n=[1,7],r=[7,12,15,17,19,20,21],i=[7,11,12,15,17,19,20,21],a=[2,20],o=[1,32],s={trace:function(){},yy:{},symbols_:{error:2,start:3,GG:4,":":5,document:6,EOF:7,DIR:8,options:9,body:10,OPT:11,NL:12,line:13,statement:14,COMMIT:15,commit_arg:16,BRANCH:17,ID:18,CHECKOUT:19,MERGE:20,RESET:21,reset_arg:22,STR:23,HEAD:24,reset_parents:25,CARET:26,$accept:0,$end:1},terminals_:{2:"error",4:"GG",5:":",7:"EOF",8:"DIR",11:"OPT",12:"NL",15:"COMMIT",17:"BRANCH",18:"ID",19:"CHECKOUT",20:"MERGE",21:"RESET",23:"STR",24:"HEAD",26:"CARET"},productions_:[0,[3,4],[3,5],[6,0],[6,2],[9,2],[9,1],[10,0],[10,2],[13,2],[13,1],[14,2],[14,2],[14,2],[14,2],[14,2],[16,0],[16,1],[22,2],[22,2],[25,0],[25,2]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 2:return r.setDirection(a[s-3]),a[s-1];case 4:r.setOptions(a[s-1]),this.$=a[s];break;case 5:a[s-1]+=a[s],this.$=a[s-1];break;case 7:this.$=[];break;case 8:a[s-1].push(a[s]),this.$=a[s-1];break;case 9:this.$=a[s-1];break;case 11:r.commit(a[s]);break;case 12:r.branch(a[s]);break;case 13:r.checkout(a[s]);break;case 14:r.merge(a[s]);break;case 15:r.reset(a[s]);break;case 16:this.$="";break;case 17:this.$=a[s];break;case 18:this.$=a[s-1]+":"+a[s];break;case 19:this.$=a[s-1]+":"+r.count,r.count=0;break;case 20:r.count=0;break;case 21:r.count+=1}},table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3],8:[1,4]},{6:5,7:e,9:6,12:n},{5:[1,8]},{7:[1,9]},t(r,[2,7],{10:10,11:[1,11]}),t(i,[2,6]),{6:12,7:e,9:6,12:n},{1:[2,1]},{7:[2,4],12:[1,15],13:13,14:14,15:[1,16],17:[1,17],19:[1,18],20:[1,19],21:[1,20]},t(i,[2,5]),{7:[1,21]},t(r,[2,8]),{12:[1,22]},t(r,[2,10]),{12:[2,16],16:23,23:[1,24]},{18:[1,25]},{18:[1,26]},{18:[1,27]},{18:[1,30],22:28,24:[1,29]},{1:[2,2]},t(r,[2,9]),{12:[2,11]},{12:[2,17]},{12:[2,12]},{12:[2,13]},{12:[2,14]},{12:[2,15]},{12:a,25:31,26:o},{12:a,25:33,26:o},{12:[2,18]},{12:a,25:34,26:o},{12:[2,19]},{12:[2,21]}],defaultActions:{9:[2,1],21:[2,2],23:[2,11],24:[2,17],25:[2,12],26:[2,13],27:[2,14],28:[2,15],31:[2,18],33:[2,19],34:[2,21]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,f=2,h=1,d=a.slice.call(arguments,1),p=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]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var v=p.yylloc;a.push(v);var m=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||h)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,w,k,C,E,T,S,A,M={};;){if(w=n[n.length-1],this.defaultActions[w]?k=this.defaultActions[w]:(null==x&&(x=b()),k=o[w]&&o[w][x]),void 0===k||!k.length||!k[0]){var O="";for(E in A=[],o[w])this.terminals_[E]&&E>f&&A.push("'"+this.terminals_[E]+"'");O=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==h?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(O,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:v,expected:A})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(k[1]),x=null,_?(x=_,_=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(T=this.productions_[k[1]][1],M.$=i[i.length-T],M._$={first_line:a[a.length-(T||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(T||1)].first_column,last_column:a[a.length-1].last_column},m&&(M._$.range=[a[a.length-(T||1)].range[0],a[a.length-1].range[1]]),void 0!==(C=this.performAction.apply(M,[s,u,c,g.yy,k[1],i,a].concat(d))))return C;T&&(n=n.slice(0,-1*T*2),i=i.slice(0,-1*T),a=a.slice(0,-1*T)),n.push(this.productions_[k[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},c={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 12;case 1:case 2:case 3:break;case 4:return 4;case 5:return 15;case 6:return 17;case 7:return 20;case 8:return 21;case 9:return 19;case 10:case 11:return 8;case 12:return 5;case 13:return 26;case 14:this.begin("options");break;case 15:this.popState();break;case 16:return 11;case 17:this.begin("string");break;case 18:this.popState();break;case 19:return 23;case 20:return 18;case 21:return 7}},rules:[/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:gitGraph\b)/i,/^(?:commit\b)/i,/^(?:branch\b)/i,/^(?:merge\b)/i,/^(?:reset\b)/i,/^(?:checkout\b)/i,/^(?:LR\b)/i,/^(?:BT\b)/i,/^(?::)/i,/^(?:\^)/i,/^(?:options\r?\n)/i,/^(?:end\r?\n)/i,/^(?:[^\n]+\r?\n)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[a-zA-Z][-_\.a-zA-Z0-9]*[-_a-zA-Z0-9])/i,/^(?:$)/i],conditions:{options:{rules:[15,16],inclusive:!1},string:{rules:[18,19],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,17,20,21],inclusive:!0}}};function u(){this.yy={}}return s.lexer=c,u.prototype=s,s.Parser=u,new u}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n("./node_modules/node-libs-browser/mock/empty.js").readFileSync(n("./node_modules/path-browserify/index.js").normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n("./node_modules/process/browser.js"),n("./node_modules/webpack/buildin/module.js")(t))},"./src/diagrams/git/styles.js":function(t,e,n){"use strict";n.r(e),e.default=function(){return"\n .commit-id,\n .commit-msg,\n .branch-label {\n fill: lightgrey;\n color: lightgrey;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family);\n }\n"}},"./src/diagrams/info/infoDb.js":function(t,e,n){"use strict";n.r(e),n.d(e,"setMessage",(function(){return o})),n.d(e,"getMessage",(function(){return s})),n.d(e,"setInfo",(function(){return c})),n.d(e,"getInfo",(function(){return u}));var r=n("./src/logger.js"),i="",a=!1,o=function(t){r.logger.debug("Setting message to: "+t),i=t},s=function(){return i},c=function(t){a=t},u=function(){return a};e.default={setMessage:o,getMessage:s,setInfo:c,getInfo:u}},"./src/diagrams/info/infoRenderer.js":function(t,e,n){"use strict";n.r(e),n.d(e,"setConf",(function(){return u})),n.d(e,"draw",(function(){return l}));var r=n("d3"),i=n("./src/diagrams/info/infoDb.js"),a=n("./src/diagrams/info/parser/info.jison"),o=n.n(a),s=n("./src/logger.js"),c={},u=function(t){Object.keys(t).forEach((function(e){c[e]=t[e]}))},l=function(t,e,n){try{var a=o.a.parser;a.yy=i.default,s.logger.debug("Renering info diagram\n"+t),a.parse(t),s.logger.debug("Parsed info diagram");var c=Object(r.select)("#"+e);c.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size","32px").style("text-anchor","middle").text("v "+n),c.attr("height",100),c.attr("width",400)}catch(t){s.logger.error("Error while rendering info diagram"),s.logger.error(t.message)}};e.default={setConf:u,draw:l}},"./src/diagrams/info/parser/info.jison":function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[6,9,10],n={trace:function(){},yy:{},symbols_:{error:2,start:3,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,$accept:0,$end:1},terminals_:{2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1]],performAction:function(t,e,n,r,i,a,o){switch(a.length,i){case 1:return r;case 4:break;case 6:r.setInfo(!0)}},table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8]},{1:[2,1]},t(e,[2,3]),t(e,[2,4]),t(e,[2,5]),t(e,[2,6])],defaultActions:{4:[2,1]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,f=2,h=1,d=a.slice.call(arguments,1),p=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]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var v=p.yylloc;a.push(v);var m=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||h)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,w,k,C,E,T,S,A,M={};;){if(w=n[n.length-1],this.defaultActions[w]?k=this.defaultActions[w]:(null==x&&(x=b()),k=o[w]&&o[w][x]),void 0===k||!k.length||!k[0]){var O="";for(E in A=[],o[w])this.terminals_[E]&&E>f&&A.push("'"+this.terminals_[E]+"'");O=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==h?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(O,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:v,expected:A})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(k[1]),x=null,_?(x=_,_=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(T=this.productions_[k[1]][1],M.$=i[i.length-T],M._$={first_line:a[a.length-(T||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(T||1)].first_column,last_column:a[a.length-1].last_column},m&&(M._$.range=[a[a.length-(T||1)].range[0],a[a.length-1].range[1]]),void 0!==(C=this.performAction.apply(M,[s,u,c,g.yy,k[1],i,a].concat(d))))return C;T&&(n=n.slice(0,-1*T*2),i=i.slice(0,-1*T),a=a.slice(0,-1*T)),n.push(this.productions_[k[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},r={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 4;case 1:return 9;case 2:return"space";case 3:return 10;case 4:return 6;case 5:return"TXT"}},rules:[/^(?:info\b)/i,/^(?:[\s\n\r]+)/i,/^(?:[\s]+)/i,/^(?:showInfo\b)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5],inclusive:!0}}};function i(){this.yy={}}return n.lexer=r,i.prototype=n,n.Parser=i,new i}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n("./node_modules/node-libs-browser/mock/empty.js").readFileSync(n("./node_modules/path-browserify/index.js").normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n("./node_modules/process/browser.js"),n("./node_modules/webpack/buildin/module.js")(t))},"./src/diagrams/info/styles.js":function(t,e,n){"use strict";n.r(e),e.default=function(){return""}},"./src/diagrams/pie/parser/pie.jison":function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,4],n=[1,5],r=[1,6],i=[1,7],a=[1,9],o=[1,10,12,19,20,21,22],s=[1,6,10,12,19,20,21,22],c=[19,20,21],u=[1,22],l=[6,19,20,21,22],f={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,directive:5,PIE:6,document:7,line:8,statement:9,txt:10,value:11,title:12,title_value:13,openDirective:14,typeDirective:15,closeDirective:16,":":17,argDirective:18,NEWLINE:19,";":20,EOF:21,open_directive:22,type_directive:23,arg_directive:24,close_directive:25,$accept:0,$end:1},terminals_:{2:"error",6:"PIE",10:"txt",11:"value",12:"title",13:"title_value",17:":",19:"NEWLINE",20:";",21:"EOF",22:"open_directive",23:"type_directive",24:"arg_directive",25:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[9,0],[9,2],[9,2],[9,1],[5,3],[5,5],[4,1],[4,1],[4,1],[14,1],[15,1],[18,1],[16,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 6:this.$=a[s-1];break;case 8:r.addSection(a[s-1],r.cleanupValue(a[s]));break;case 9:this.$=a[s].trim(),r.setTitle(this.$);break;case 16:r.parseDirective("%%{","open_directive");break;case 17:r.parseDirective(a[s],"type_directive");break;case 18:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 19:r.parseDirective("}%%","close_directive","pie")}},table:[{3:1,4:2,5:3,6:e,14:8,19:n,20:r,21:i,22:a},{1:[3]},{3:10,4:2,5:3,6:e,14:8,19:n,20:r,21:i,22:a},{3:11,4:2,5:3,6:e,14:8,19:n,20:r,21:i,22:a},t(o,[2,4],{7:12}),t(s,[2,13]),t(s,[2,14]),t(s,[2,15]),{15:13,23:[1,14]},{23:[2,16]},{1:[2,1]},{1:[2,2]},t(c,[2,7],{14:8,8:15,9:16,5:19,1:[2,3],10:[1,17],12:[1,18],22:a}),{16:20,17:[1,21],25:u},t([17,25],[2,17]),t(o,[2,5]),{4:23,19:n,20:r,21:i},{11:[1,24]},{13:[1,25]},t(c,[2,10]),t(l,[2,11]),{18:26,24:[1,27]},t(l,[2,19]),t(o,[2,6]),t(c,[2,8]),t(c,[2,9]),{16:28,25:u},{25:[2,18]},t(l,[2,12])],defaultActions:{9:[2,16],10:[2,1],11:[2,2],27:[2,18]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,f=2,h=1,d=a.slice.call(arguments,1),p=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]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var v=p.yylloc;a.push(v);var m=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||h)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,w,k,C,E,T,S,A,M={};;){if(w=n[n.length-1],this.defaultActions[w]?k=this.defaultActions[w]:(null==x&&(x=b()),k=o[w]&&o[w][x]),void 0===k||!k.length||!k[0]){var O="";for(E in A=[],o[w])this.terminals_[E]&&E>f&&A.push("'"+this.terminals_[E]+"'");O=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==h?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(O,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:v,expected:A})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(k[1]),x=null,_?(x=_,_=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(T=this.productions_[k[1]][1],M.$=i[i.length-T],M._$={first_line:a[a.length-(T||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(T||1)].first_column,last_column:a[a.length-1].last_column},m&&(M._$.range=[a[a.length-(T||1)].range[0],a[a.length-1].range[1]]),void 0!==(C=this.performAction.apply(M,[s,u,c,g.yy,k[1],i,a].concat(d))))return C;T&&(n=n.slice(0,-1*T*2),i=i.slice(0,-1*T),a=a.slice(0,-1*T)),n.push(this.productions_[k[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},h={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),22;case 1:return this.begin("type_directive"),23;case 2:return this.popState(),this.begin("arg_directive"),17;case 3:return this.popState(),this.popState(),25;case 4:return 24;case 5:break;case 6:console.log("Crap after close");break;case 7:return 19;case 8:case 9:break;case 10:return this.begin("title"),12;case 11:return this.popState(),"title_value";case 12:this.begin("string");break;case 13:this.popState();break;case 14:return"txt";case 15:return 6;case 16:return"value";case 17:return 21}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[\s]+)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:pie\b)/i,/^(?::[\s]*[\d]+(?:\.[\d]+)?)/i,/^(?:$)/i],conditions:{close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},title:{rules:[11],inclusive:!1},string:{rules:[13,14],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,12,15,16,17],inclusive:!0}}};function d(){this.yy={}}return f.lexer=h,d.prototype=f,f.Parser=d,new d}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n("./node_modules/node-libs-browser/mock/empty.js").readFileSync(n("./node_modules/path-browserify/index.js").normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n("./node_modules/process/browser.js"),n("./node_modules/webpack/buildin/module.js")(t))},"./src/diagrams/pie/pieDb.js":function(t,e,n){"use strict";n.r(e),n.d(e,"parseDirective",(function(){return c}));var r=n("./src/logger.js"),i=n("./src/mermaidAPI.js"),a=n("./src/config.js"),o={},s="",c=function(t,e,n){i.default.parseDirective(this,t,e,n)};e.default={parseDirective:c,getConfig:function(){return a.getConfig().pie},addSection:function(t,e){void 0===o[t]&&(o[t]=e,r.logger.debug("Added new section :",t))},getSections:function(){return o},cleanupValue:function(t){return":"===t.substring(0,1)?(t=t.substring(1).trim(),Number(t.trim())):Number(t.trim())},clear:function(){o={},s=""},setTitle:function(t){s=t},getTitle:function(){return s}}},"./src/diagrams/pie/pieRenderer.js":function(t,e,n){"use strict";n.r(e),n.d(e,"setConf",(function(){return l})),n.d(e,"draw",(function(){return f}));var r,i=n("d3"),a=n("./src/diagrams/pie/pieDb.js"),o=n("./src/diagrams/pie/parser/pie.jison"),s=n.n(o),c=n("./src/logger.js"),u={},l=function(t){Object.keys(t).forEach((function(e){u[e]=t[e]}))},f=function(t,e){try{var n=s.a.parser;n.yy=a.default,c.logger.debug("Rendering info diagram\n"+t),n.yy.clear(),n.parse(t),c.logger.debug("Parsed info diagram");var o=document.getElementById(e);void 0===(r=o.parentElement.offsetWidth)&&(r=1200),void 0!==u.useWidth&&(r=u.useWidth),o.setAttribute("height","100%"),o.setAttribute("viewBox","0 0 "+r+" 450");var l=r,f=18,h=Math.min(l,450)/2-40,d=Object(i.select)("#"+e).append("svg").attr("width",l).attr("height",450).append("g").attr("transform","translate("+l/2+",225)"),p=a.default.getSections(),g=0;Object.keys(p).forEach((function(t){g+=p[t]})),c.logger.info(p);var y=Object(i.scaleOrdinal)().domain(p).range(i.schemeSet2),v=Object(i.pie)().value((function(t){return t.value}))(Object(i.entries)(p)),m=Object(i.arc)().innerRadius(0).outerRadius(h);d.selectAll("mySlices").data(v).enter().append("path").attr("d",m).attr("fill",(function(t){return y(t.data.key)})).attr("stroke","black").style("stroke-width","2px").style("opacity",.7),d.selectAll("mySlices").data(v).enter().append("text").text((function(t){return(t.data.value/g*100).toFixed(0)+"%"})).attr("transform",(function(t){return"translate("+m.centroid(t)+")"})).style("text-anchor","middle").attr("class","slice").style("font-size",17),d.append("text").text(n.yy.getTitle()).attr("x",0).attr("y",-200).attr("class","pieTitleText");var b=d.selectAll(".legend").data(y.domain()).enter().append("g").attr("class","legend").attr("transform",(function(t,e){return"translate(216,"+(22*e-22*y.domain().length/2)+")"}));b.append("rect").attr("width",f).attr("height",f).style("fill",y).style("stroke",y),b.append("text").attr("x",22).attr("y",14).text((function(t){return t}))}catch(t){c.logger.error("Error while rendering info diagram"),c.logger.error(t)}};e.default={setConf:l,draw:f}},"./src/diagrams/pie/styles.js":function(t,e,n){"use strict";n.r(e),e.default=function(t){return".pieTitleText {\n text-anchor: middle;\n font-size: 25px;\n fill: ".concat(t.taskTextDarkColor,";\n font-family: ").concat(t.fontFamily,";\n }\n .slice {\n font-family: ").concat(t.fontFamily,";\n fill: ").concat(t.textColor,";\n // fill: white;\n }\n .legend text {\n fill: ").concat(t.taskTextDarkColor,";\n font-family: ").concat(t.fontFamily,";\n font-size: 17px;\n }\n")}},"./src/diagrams/sequence/parser/sequenceDiagram.jison":function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,2],n=[1,3],r=[1,5],i=[1,7],a=[2,5],o=[1,15],s=[1,17],c=[1,18],u=[1,20],l=[1,21],f=[1,22],h=[1,24],d=[1,25],p=[1,26],g=[1,27],y=[1,28],v=[1,29],m=[1,32],b=[1,33],x=[1,36],_=[1,4,5,16,21,22,23,25,27,28,29,30,31,33,35,36,37,48,56],w=[1,44],k=[4,5,16,21,22,23,25,27,28,29,30,31,33,37,48,56],C=[4,5,16,21,22,23,25,27,28,29,30,31,33,36,37,48,56],E=[4,5,16,21,22,23,25,27,28,29,30,31,33,35,37,48,56],T=[46,47,48],S=[1,4,5,7,16,21,22,23,25,27,28,29,30,31,33,35,36,37,48,56],A={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,directive:6,SD:7,document:8,line:9,statement:10,openDirective:11,typeDirective:12,closeDirective:13,":":14,argDirective:15,participant:16,actor:17,AS:18,restOfLine:19,signal:20,autonumber:21,activate:22,deactivate:23,note_statement:24,title:25,text2:26,loop:27,end:28,rect:29,opt:30,alt:31,else_sections:32,par:33,par_sections:34,and:35,else:36,note:37,placement:38,over:39,actor_pair:40,spaceList:41,",":42,left_of:43,right_of:44,signaltype:45,"+":46,"-":47,ACTOR:48,SOLID_OPEN_ARROW:49,DOTTED_OPEN_ARROW:50,SOLID_ARROW:51,DOTTED_ARROW:52,SOLID_CROSS:53,DOTTED_CROSS:54,TXT:55,open_directive:56,type_directive:57,arg_directive:58,close_directive:59,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",7:"SD",14:":",16:"participant",18:"AS",19:"restOfLine",21:"autonumber",22:"activate",23:"deactivate",25:"title",27:"loop",28:"end",29:"rect",30:"opt",31:"alt",33:"par",35:"and",36:"else",37:"note",39:"over",42:",",43:"left_of",44:"right_of",46:"+",47:"-",48:"ACTOR",49:"SOLID_OPEN_ARROW",50:"DOTTED_OPEN_ARROW",51:"SOLID_ARROW",52:"DOTTED_ARROW",53:"SOLID_CROSS",54:"DOTTED_CROSS",55:"TXT",56:"open_directive",57:"type_directive",58:"arg_directive",59:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[6,4],[6,6],[10,5],[10,3],[10,2],[10,1],[10,3],[10,3],[10,2],[10,3],[10,4],[10,4],[10,4],[10,4],[10,4],[10,1],[34,1],[34,4],[32,1],[32,4],[24,4],[24,4],[41,2],[41,1],[40,3],[40,1],[38,1],[38,1],[20,5],[20,5],[20,4],[17,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[26,1],[11,1],[12,1],[15,1],[13,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 4:return r.apply(a[s]),a[s];case 5:this.$=[];break;case 6:a[s-1].push(a[s]),this.$=a[s-1];break;case 7:case 8:this.$=a[s];break;case 9:this.$=[];break;case 12:a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 13:this.$=a[s-1];break;case 15:r.enableSequenceNumbers();break;case 16:this.$={type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:a[s-1]};break;case 17:this.$={type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:a[s-1]};break;case 19:this.$=[{type:"setTitle",text:a[s-1]}];break;case 20:a[s-1].unshift({type:"loopStart",loopText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.LOOP_START}),a[s-1].push({type:"loopEnd",loopText:a[s-2],signalType:r.LINETYPE.LOOP_END}),this.$=a[s-1];break;case 21:a[s-1].unshift({type:"rectStart",color:r.parseMessage(a[s-2]),signalType:r.LINETYPE.RECT_START}),a[s-1].push({type:"rectEnd",color:r.parseMessage(a[s-2]),signalType:r.LINETYPE.RECT_END}),this.$=a[s-1];break;case 22:a[s-1].unshift({type:"optStart",optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.OPT_START}),a[s-1].push({type:"optEnd",optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.OPT_END}),this.$=a[s-1];break;case 23:a[s-1].unshift({type:"altStart",altText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.ALT_START}),a[s-1].push({type:"altEnd",signalType:r.LINETYPE.ALT_END}),this.$=a[s-1];break;case 24:a[s-1].unshift({type:"parStart",parText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.PAR_START}),a[s-1].push({type:"parEnd",signalType:r.LINETYPE.PAR_END}),this.$=a[s-1];break;case 27:this.$=a[s-3].concat([{type:"and",parText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.PAR_AND},a[s]]);break;case 29:this.$=a[s-3].concat([{type:"else",altText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.ALT_ELSE},a[s]]);break;case 30:this.$=[a[s-1],{type:"addNote",placement:a[s-2],actor:a[s-1].actor,text:a[s]}];break;case 31:a[s-2]=[].concat(a[s-1],a[s-1]).slice(0,2),a[s-2][0]=a[s-2][0].actor,a[s-2][1]=a[s-2][1].actor,this.$=[a[s-1],{type:"addNote",placement:r.PLACEMENT.OVER,actor:a[s-2].slice(0,2),text:a[s]}];break;case 34:this.$=[a[s-2],a[s]];break;case 35:this.$=a[s];break;case 36:this.$=r.PLACEMENT.LEFTOF;break;case 37:this.$=r.PLACEMENT.RIGHTOF;break;case 38:this.$=[a[s-4],a[s-1],{type:"addMessage",from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s]},{type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:a[s-1]}];break;case 39:this.$=[a[s-4],a[s-1],{type:"addMessage",from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s]},{type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:a[s-4]}];break;case 40:this.$=[a[s-3],a[s-1],{type:"addMessage",from:a[s-3].actor,to:a[s-1].actor,signalType:a[s-2],msg:a[s]}];break;case 41:this.$={type:"addActor",actor:a[s]};break;case 42:this.$=r.LINETYPE.SOLID_OPEN;break;case 43:this.$=r.LINETYPE.DOTTED_OPEN;break;case 44:this.$=r.LINETYPE.SOLID;break;case 45:this.$=r.LINETYPE.DOTTED;break;case 46:this.$=r.LINETYPE.SOLID_CROSS;break;case 47:this.$=r.LINETYPE.DOTTED_CROSS;break;case 48:this.$=r.parseMessage(a[s].trim().substring(1));break;case 49:r.parseDirective("%%{","open_directive");break;case 50:r.parseDirective(a[s],"type_directive");break;case 51:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 52:r.parseDirective("}%%","close_directive","sequence")}},table:[{3:1,4:e,5:n,6:4,7:r,11:6,56:i},{1:[3]},{3:8,4:e,5:n,6:4,7:r,11:6,56:i},{3:9,4:e,5:n,6:4,7:r,11:6,56:i},{3:10,4:e,5:n,6:4,7:r,11:6,56:i},t([1,4,5,16,21,22,23,25,27,29,30,31,33,37,48,56],a,{8:11}),{12:12,57:[1,13]},{57:[2,49]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:o,5:s,6:30,9:14,10:16,11:6,16:c,17:31,20:19,21:u,22:l,23:f,24:23,25:h,27:d,29:p,30:g,31:y,33:v,37:m,48:b,56:i},{13:34,14:[1,35],59:x},t([14,59],[2,50]),t(_,[2,6]),{6:30,10:37,11:6,16:c,17:31,20:19,21:u,22:l,23:f,24:23,25:h,27:d,29:p,30:g,31:y,33:v,37:m,48:b,56:i},t(_,[2,8]),t(_,[2,9]),{17:38,48:b},{5:[1,39]},t(_,[2,15]),{17:40,48:b},{17:41,48:b},{5:[1,42]},{26:43,55:w},{19:[1,45]},{19:[1,46]},{19:[1,47]},{19:[1,48]},{19:[1,49]},t(_,[2,25]),{45:50,49:[1,51],50:[1,52],51:[1,53],52:[1,54],53:[1,55],54:[1,56]},{38:57,39:[1,58],43:[1,59],44:[1,60]},t([5,18,42,49,50,51,52,53,54,55],[2,41]),{5:[1,61]},{15:62,58:[1,63]},{5:[2,52]},t(_,[2,7]),{5:[1,65],18:[1,64]},t(_,[2,14]),{5:[1,66]},{5:[1,67]},t(_,[2,18]),{5:[1,68]},{5:[2,48]},t(k,a,{8:69}),t(k,a,{8:70}),t(k,a,{8:71}),t(C,a,{32:72,8:73}),t(E,a,{34:74,8:75}),{17:78,46:[1,76],47:[1,77],48:b},t(T,[2,42]),t(T,[2,43]),t(T,[2,44]),t(T,[2,45]),t(T,[2,46]),t(T,[2,47]),{17:79,48:b},{17:81,40:80,48:b},{48:[2,36]},{48:[2,37]},t(S,[2,10]),{13:82,59:x},{59:[2,51]},{19:[1,83]},t(_,[2,13]),t(_,[2,16]),t(_,[2,17]),t(_,[2,19]),{4:o,5:s,6:30,9:14,10:16,11:6,16:c,17:31,20:19,21:u,22:l,23:f,24:23,25:h,27:d,28:[1,84],29:p,30:g,31:y,33:v,37:m,48:b,56:i},{4:o,5:s,6:30,9:14,10:16,11:6,16:c,17:31,20:19,21:u,22:l,23:f,24:23,25:h,27:d,28:[1,85],29:p,30:g,31:y,33:v,37:m,48:b,56:i},{4:o,5:s,6:30,9:14,10:16,11:6,16:c,17:31,20:19,21:u,22:l,23:f,24:23,25:h,27:d,28:[1,86],29:p,30:g,31:y,33:v,37:m,48:b,56:i},{28:[1,87]},{4:o,5:s,6:30,9:14,10:16,11:6,16:c,17:31,20:19,21:u,22:l,23:f,24:23,25:h,27:d,28:[2,28],29:p,30:g,31:y,33:v,36:[1,88],37:m,48:b,56:i},{28:[1,89]},{4:o,5:s,6:30,9:14,10:16,11:6,16:c,17:31,20:19,21:u,22:l,23:f,24:23,25:h,27:d,28:[2,26],29:p,30:g,31:y,33:v,35:[1,90],37:m,48:b,56:i},{17:91,48:b},{17:92,48:b},{26:93,55:w},{26:94,55:w},{26:95,55:w},{42:[1,96],55:[2,35]},{5:[1,97]},{5:[1,98]},t(_,[2,20]),t(_,[2,21]),t(_,[2,22]),t(_,[2,23]),{19:[1,99]},t(_,[2,24]),{19:[1,100]},{26:101,55:w},{26:102,55:w},{5:[2,40]},{5:[2,30]},{5:[2,31]},{17:103,48:b},t(S,[2,11]),t(_,[2,12]),t(C,a,{8:73,32:104}),t(E,a,{8:75,34:105}),{5:[2,38]},{5:[2,39]},{55:[2,34]},{28:[2,29]},{28:[2,27]}],defaultActions:{7:[2,49],8:[2,1],9:[2,2],10:[2,3],36:[2,52],44:[2,48],59:[2,36],60:[2,37],63:[2,51],93:[2,40],94:[2,30],95:[2,31],101:[2,38],102:[2,39],103:[2,34],104:[2,29],105:[2,27]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,f=2,h=1,d=a.slice.call(arguments,1),p=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]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var v=p.yylloc;a.push(v);var m=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||h)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,w,k,C,E,T,S,A,M={};;){if(w=n[n.length-1],this.defaultActions[w]?k=this.defaultActions[w]:(null==x&&(x=b()),k=o[w]&&o[w][x]),void 0===k||!k.length||!k[0]){var O="";for(E in A=[],o[w])this.terminals_[E]&&E>f&&A.push("'"+this.terminals_[E]+"'");O=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==h?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(O,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:v,expected:A})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(k[1]),x=null,_?(x=_,_=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(T=this.productions_[k[1]][1],M.$=i[i.length-T],M._$={first_line:a[a.length-(T||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(T||1)].first_column,last_column:a[a.length-1].last_column},m&&(M._$.range=[a[a.length-(T||1)].range[0],a[a.length-1].range[1]]),void 0!==(C=this.performAction.apply(M,[s,u,c,g.yy,k[1],i,a].concat(d))))return C;T&&(n=n.slice(0,-1*T*2),i=i.slice(0,-1*T),a=a.slice(0,-1*T)),n.push(this.productions_[k[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},M={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),56;case 1:return this.begin("type_directive"),57;case 2:return this.popState(),this.begin("arg_directive"),14;case 3:return this.popState(),this.popState(),59;case 4:return 58;case 5:return 5;case 6:case 7:case 8:case 9:case 10:break;case 11:return this.begin("ID"),16;case 12:return e.yytext=e.yytext.trim(),this.begin("ALIAS"),48;case 13:return this.popState(),this.popState(),this.begin("LINE"),18;case 14:return this.popState(),this.popState(),5;case 15:return this.begin("LINE"),27;case 16:return this.begin("LINE"),29;case 17:return this.begin("LINE"),30;case 18:return this.begin("LINE"),31;case 19:return this.begin("LINE"),36;case 20:return this.begin("LINE"),33;case 21:return this.begin("LINE"),35;case 22:return this.popState(),19;case 23:return 28;case 24:return 43;case 25:return 44;case 26:return 39;case 27:return 37;case 28:return this.begin("ID"),22;case 29:return this.begin("ID"),23;case 30:return 25;case 31:return 7;case 32:return 21;case 33:return 42;case 34:return 5;case 35:return e.yytext=e.yytext.trim(),48;case 36:return 51;case 37:return 52;case 38:return 49;case 39:return 50;case 40:return 53;case 41:return 54;case 42:return 55;case 43:return 46;case 44:return 47;case 45:return 5;case 46:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:participant\b)/i,/^(?:[^\->:\n,;]+?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:and\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\b)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\->:\n,;]+((?!(-x|--x))[\-]*[^\+\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{open_directive:{rules:[1,8],inclusive:!1},type_directive:{rules:[2,3,8],inclusive:!1},arg_directive:{rules:[3,4,8],inclusive:!1},ID:{rules:[7,8,12],inclusive:!1},ALIAS:{rules:[7,8,13,14],inclusive:!1},LINE:{rules:[7,8,22],inclusive:!1},INITIAL:{rules:[0,5,6,8,9,10,11,15,16,17,18,19,20,21,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}};function O(){this.yy={}}return A.lexer=M,O.prototype=A,A.Parser=O,new O}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n("./node_modules/node-libs-browser/mock/empty.js").readFileSync(n("./node_modules/path-browserify/index.js").normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n("./node_modules/process/browser.js"),n("./node_modules/webpack/buildin/module.js")(t))},"./src/diagrams/sequence/sequenceDb.js":function(t,e,n){"use strict";n.r(e),n.d(e,"parseDirective",(function(){return g})),n.d(e,"addActor",(function(){return y})),n.d(e,"addMessage",(function(){return m})),n.d(e,"addSignal",(function(){return b})),n.d(e,"getMessages",(function(){return x})),n.d(e,"getActors",(function(){return _})),n.d(e,"getActor",(function(){return w})),n.d(e,"getActorKeys",(function(){return k})),n.d(e,"getTitle",(function(){return C})),n.d(e,"getTitleWrapped",(function(){return E})),n.d(e,"enableSequenceNumbers",(function(){return T})),n.d(e,"showSequenceNumbers",(function(){return S})),n.d(e,"setWrap",(function(){return A})),n.d(e,"autoWrap",(function(){return M})),n.d(e,"clear",(function(){return O})),n.d(e,"parseMessage",(function(){return j})),n.d(e,"LINETYPE",(function(){return D})),n.d(e,"ARROWTYPE",(function(){return N})),n.d(e,"PLACEMENT",(function(){return B})),n.d(e,"addNote",(function(){return L})),n.d(e,"setTitle",(function(){return F})),n.d(e,"apply",(function(){return P}));var r=n("./src/mermaidAPI.js"),i=n("./src/config.js"),a=n("./src/diagrams/common/common.js"),o=n("./src/logger.js"),s=void 0,c={},u=[],l=[],f="",h=!1,d=!1,p=!1,g=function(t,e,n){r.default.parseDirective(this,t,e,n)},y=function(t,e,n){var r=c[t];r&&e===r.name&&null==n||(null!=n&&null!=n.text||(n={text:e,wrap:null}),c[t]={name:e,description:n.text,wrap:void 0===n.wrap&&M()||!!n.wrap,prevActor:s},s&&c[s]&&(c[s].nextActor=t),s=t)},v=function(t){var e,n=0;for(e=0;e2&&void 0!==arguments[2]?arguments[2]:{text:void 0,wrap:void 0},r=arguments.length>3?arguments[3]:void 0;if(r===D.ACTIVE_END){var i=v(t.actor);if(i<1){var a=new Error("Trying to inactivate an inactive participant ("+t.actor+")");throw a.hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},a}}return u.push({from:t,to:e,message:n.text,wrap:void 0===n.wrap&&M()||!!n.wrap,type:r}),!0},x=function(){return u},_=function(){return c},w=function(t){return c[t]},k=function(){return Object.keys(c)},C=function(){return f},E=function(){return h},T=function(){d=!0},S=function(){return d},A=function(t){p=t},M=function(){return p},O=function(){c={},u=[]},j=function(t){var e=t.trim(),n={text:e.replace(/^[:]?(?:no)?wrap:/,"").trim(),wrap:null===e.match(/^[:]?(?:no)?wrap:/)?a.default.hasBreaks(e)||void 0:null!==e.match(/^[:]?wrap:/)||null===e.match(/^[:]?nowrap:/)&&void 0};return o.logger.debug("parseMessage:",n),n},D={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23},N={FILLED:0,OPEN:1},B={LEFTOF:0,RIGHTOF:1,OVER:2},L=function(t,e,n){var r={actor:t,placement:e,message:n.text,wrap:void 0===n.wrap&&M()||!!n.wrap},i=[].concat(t,t);l.push(r),u.push({from:i[0],to:i[1],message:n.text,wrap:void 0===n.wrap&&M()||!!n.wrap,type:D.NOTE,placement:e})},F=function(t){f=t.text,h=void 0===t.wrap&&M()||!!t.wrap},P=function t(e){if(e instanceof Array)e.forEach((function(e){t(e)}));else switch(e.type){case"addActor":y(e.actor,e.actor,e.description);break;case"activeStart":case"activeEnd":b(e.actor,void 0,void 0,e.signalType);break;case"addNote":L(e.actor,e.placement,e.text);break;case"addMessage":b(e.from,e.to,e.msg,e.signalType);break;case"loopStart":b(void 0,void 0,e.loopText,e.signalType);break;case"loopEnd":b(void 0,void 0,void 0,e.signalType);break;case"rectStart":b(void 0,void 0,e.color,e.signalType);break;case"rectEnd":b(void 0,void 0,void 0,e.signalType);break;case"optStart":b(void 0,void 0,e.optText,e.signalType);break;case"optEnd":b(void 0,void 0,void 0,e.signalType);break;case"altStart":case"else":b(void 0,void 0,e.altText,e.signalType);break;case"altEnd":b(void 0,void 0,void 0,e.signalType);break;case"setTitle":F(e.text);break;case"parStart":case"and":b(void 0,void 0,e.parText,e.signalType);break;case"parEnd":b(void 0,void 0,void 0,e.signalType)}};e.default={addActor:y,addMessage:m,addSignal:b,autoWrap:M,setWrap:A,enableSequenceNumbers:T,showSequenceNumbers:S,getMessages:x,getActors:_,getActor:w,getActorKeys:k,getTitle:C,parseDirective:g,getConfig:function(){return i.getConfig().sequence},getTitleWrapped:E,clear:O,parseMessage:j,LINETYPE:D,ARROWTYPE:N,PLACEMENT:B,addNote:L,setTitle:F,apply:P}},"./src/diagrams/sequence/sequenceRenderer.js":function(t,e,n){"use strict";n.r(e),n.d(e,"bounds",(function(){return h})),n.d(e,"drawActors",(function(){return y})),n.d(e,"setConf",(function(){return v})),n.d(e,"draw",(function(){return _}));var r=n("d3"),i=n("./src/diagrams/sequence/svgDraw.js"),a=n("./src/logger.js"),o=n("./src/diagrams/sequence/parser/sequenceDiagram.jison"),s=n("./src/diagrams/common/common.js"),c=n("./src/diagrams/sequence/sequenceDb.js"),u=n("./src/config.js"),l=n("./src/utils.js");o.parser.yy=c.default;var f={},h={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:function(){return Math.max.apply(null,0===this.actors.length?[0]:this.actors.map((function(t){return t.height||0})))+(0===this.loops.length?0:this.loops.map((function(t){return t.height||0})).reduce((function(t,e){return t+e})))+(0===this.messages.length?0:this.messages.map((function(t){return t.height||0})).reduce((function(t,e){return t+e})))+(0===this.notes.length?0:this.notes.map((function(t){return t.height||0})).reduce((function(t,e){return t+e})))},clear:function(){this.actors=[],this.loops=[],this.messages=[],this.notes=[]},addActor:function(t){this.actors.push(t)},addLoop:function(t){this.loops.push(t)},addMessage:function(t){this.messages.push(t)},addNote:function(t){this.notes.push(t)},lastActor:function(){return this.actors[this.actors.length-1]},lastLoop:function(){return this.loops[this.loops.length-1]},lastMessage:function(){return this.messages[this.messages.length-1]},lastNote:function(){return this.notes[this.notes.length-1]},actors:[],loops:[],messages:[],notes:[]},init:function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,v(o.parser.yy.getConfig())},updateVal:function(t,e,n,r){void 0===t[e]?t[e]=n:t[e]=r(n,t[e])},updateBounds:function(t,e,n,r){var i=this,a=0;function o(o){return function(s){a++;var c=i.sequenceItems.length-a+1;i.updateVal(s,"starty",e-c*f.boxMargin,Math.min),i.updateVal(s,"stopy",r+c*f.boxMargin,Math.max),i.updateVal(h.data,"startx",t-c*f.boxMargin,Math.min),i.updateVal(h.data,"stopx",n+c*f.boxMargin,Math.max),"activation"!==o&&(i.updateVal(s,"startx",t-c*f.boxMargin,Math.min),i.updateVal(s,"stopx",n+c*f.boxMargin,Math.max),i.updateVal(h.data,"starty",e-c*f.boxMargin,Math.min),i.updateVal(h.data,"stopy",r+c*f.boxMargin,Math.max))}}this.sequenceItems.forEach(o()),this.activations.forEach(o("activation"))},insert:function(t,e,n,r){var i=Math.min(t,n),a=Math.max(t,n),o=Math.min(e,r),s=Math.max(e,r);this.updateVal(h.data,"startx",i,Math.min),this.updateVal(h.data,"starty",o,Math.min),this.updateVal(h.data,"stopx",a,Math.max),this.updateVal(h.data,"stopy",s,Math.max),this.updateBounds(i,o,a,s)},newActivation:function(t,e,n){var r=n[t.from.actor],a=m(t.from.actor).length||0,o=r.x+r.width/2+(a-1)*f.activationWidth/2;this.activations.push({startx:o,starty:this.verticalPos+2,stopx:o+f.activationWidth,stopy:void 0,actor:t.from.actor,anchored:i.default.anchorElement(e)})},endActivation:function(t){var e=this.activations.map((function(t){return t.actor})).lastIndexOf(t.from.actor);return this.activations.splice(e,1)[0]},createLoop:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{message:void 0,wrap:!1,width:void 0},e=arguments.length>1?arguments[1]:void 0;return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t.message,wrap:t.wrap,width:t.width,height:0,fill:e}},newLoop:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{message:void 0,wrap:!1,width:void 0},e=arguments.length>1?arguments[1]:void 0;this.sequenceItems.push(this.createLoop(t,e))},endLoop:function(){return this.sequenceItems.pop()},addSectionToLoop:function(t){var e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:h.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return console.log("here",this.data),{bounds:this.data,models:this.models}}},d=function(t){return{fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}},p=function(t){return{fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}},g=function(t){return{fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight}},y=function(t,e,n,r){for(var a=0,o=0,s=0;se&&(r.starty=e-6,e+=12),i.default.drawActivation(n,r,e,f,m(t.from.actor).length),h.insert(r.startx,e-10,r.stopx,e)}(t,h.getVerticalPos());break;case o.parser.yy.LINETYPE.LOOP_START:x(E,t,f.boxMargin,f.boxMargin+f.boxTextMargin,(function(t){return h.newLoop(t)}));break;case o.parser.yy.LINETYPE.LOOP_END:e=h.endLoop(),i.default.drawLoop(n,e,"loop",f),h.bumpVerticalPos(e.stopy-h.getVerticalPos()),h.models.addLoop(e);break;case o.parser.yy.LINETYPE.RECT_START:x(E,t,f.boxMargin,f.boxMargin,(function(t){return h.newLoop(void 0,t.message)}));break;case o.parser.yy.LINETYPE.RECT_END:e=h.endLoop(),i.default.drawBackgroundRect(n,e),h.models.addLoop(e),h.bumpVerticalPos(e.stopy-h.getVerticalPos());break;case o.parser.yy.LINETYPE.OPT_START:x(E,t,f.boxMargin,f.boxMargin+f.boxTextMargin,(function(t){return h.newLoop(t)}));break;case o.parser.yy.LINETYPE.OPT_END:e=h.endLoop(),i.default.drawLoop(n,e,"opt",f),h.bumpVerticalPos(e.stopy-h.getVerticalPos()),h.models.addLoop(e);break;case o.parser.yy.LINETYPE.ALT_START:x(E,t,f.boxMargin,f.boxMargin+f.boxTextMargin,(function(t){return h.newLoop(t)}));break;case o.parser.yy.LINETYPE.ALT_ELSE:x(E,t,f.boxMargin+f.boxTextMargin,f.boxMargin,(function(t){return h.addSectionToLoop(t)}));break;case o.parser.yy.LINETYPE.ALT_END:e=h.endLoop(),i.default.drawLoop(n,e,"alt",f),h.bumpVerticalPos(e.stopy-h.getVerticalPos()),h.models.addLoop(e);break;case o.parser.yy.LINETYPE.PAR_START:x(E,t,f.boxMargin,f.boxMargin+f.boxTextMargin,(function(t){return h.newLoop(t)}));break;case o.parser.yy.LINETYPE.PAR_AND:x(E,t,f.boxMargin+f.boxTextMargin,f.boxMargin,(function(t){return h.addSectionToLoop(t)}));break;case o.parser.yy.LINETYPE.PAR_END:e=h.endLoop(),i.default.drawLoop(n,e,"par",f),h.bumpVerticalPos(e.stopy-h.getVerticalPos()),h.models.addLoop(e);break;default:try{(u=t.msgModel).starty=h.getVerticalPos(),u.sequenceIndex=T,function(t,e){h.bumpVerticalPos(10);var n=e.startx,r=e.stopx,a=e.starty,u=e.message,p=e.type,g=e.sequenceIndex,y=e.wrap,v=s.default.splitBreaks(u).length,m=l.default.calculateTextDimensions(u,d(f)),b=m.height/v;e.height+=b,h.bumpVerticalPos(b);var x=i.default.getTextObj();x.x=n,x.y=a+10,x.width=r-n,x.class="messageText",x.dy="1em",x.text=u,x.fontFamily=f.messageFontFamily,x.fontSize=f.messageFontSize,x.fontWeight=f.messageFontWeight,x.anchor=f.messageAlign,x.valign=f.messageAlign,x.textMargin=f.wrapPadding,x.tspan=!1,x.wrap=y,Object(i.drawText)(t,x);var _,w,k=m.height-10,C=m.width;if(n===r){w=h.getVerticalPos()+k,f.rightAngles?_=t.append("path").attr("d","M ".concat(n,",").concat(w," H ").concat(n+Math.max(f.width/2,C/2)," V ").concat(w+25," H ").concat(n)):(k+=f.boxMargin,w=h.getVerticalPos()+k,_=t.append("path").attr("d","M "+n+","+w+" C "+(n+60)+","+(w-10)+" "+(n+60)+","+(w+30)+" "+n+","+(w+20))),k+=30;var E=Math.max(C/2,f.width/2);h.insert(n-E,h.getVerticalPos()-10+k,r+E,h.getVerticalPos()+30+k)}else k+=f.boxMargin,w=h.getVerticalPos()+k,(_=t.append("line")).attr("x1",n),_.attr("y1",w),_.attr("x2",r),_.attr("y2",w),h.insert(n,w-10,r,w);p===o.parser.yy.LINETYPE.DOTTED||p===o.parser.yy.LINETYPE.DOTTED_CROSS||p===o.parser.yy.LINETYPE.DOTTED_OPEN?(_.style("stroke-dasharray","3, 3"),_.attr("class","messageLine1")):_.attr("class","messageLine0");var T="";f.arrowMarkerAbsolute&&(T=(T=(T=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),_.attr("stroke-width",2),_.attr("stroke","none"),_.style("fill","none"),p!==o.parser.yy.LINETYPE.SOLID&&p!==o.parser.yy.LINETYPE.DOTTED||_.attr("marker-end","url("+T+"#arrowhead)"),p!==o.parser.yy.LINETYPE.SOLID_CROSS&&p!==o.parser.yy.LINETYPE.DOTTED_CROSS||_.attr("marker-end","url("+T+"#crosshead)"),(c.default.showSequenceNumbers()||f.showSequenceNumbers)&&(_.attr("marker-start","url("+T+"#sequencenumber)"),t.append("text").attr("x",n).attr("y",w+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("textLength","16px").attr("class","sequenceNumber").text(g)),h.bumpVerticalPos(k),e.height+=k,e.stopy=e.starty+e.height,h.insert(e.fromBounds,e.starty,e.toBounds,e.stopy)}(n,u),h.models.addMessage(u)}catch(t){a.logger.error("error while drawing message",t)}}[o.parser.yy.LINETYPE.SOLID_OPEN,o.parser.yy.LINETYPE.DOTTED_OPEN,o.parser.yy.LINETYPE.SOLID,o.parser.yy.LINETYPE.DOTTED,o.parser.yy.LINETYPE.SOLID_CROSS,o.parser.yy.LINETYPE.DOTTED_CROSS].includes(t.type)&&T++})),f.mirrorActors&&(h.bumpVerticalPos(2*f.boxMargin),y(n,p,g,h.getVerticalPos()));var S=h.getBounds().bounds;a.logger.debug("For line height fix Querying: #"+e+" .actor-line"),Object(r.selectAll)("#"+e+" .actor-line").attr("y2",S.stopy);var A=S.stopy-S.starty+2*f.diagramMarginY;f.mirrorActors&&(A=A-f.boxMargin+f.bottomMarginAdj);var M=S.stopx-S.startx+2*f.diagramMarginX;b&&n.append("text").text(b).attr("x",(S.stopx-S.startx)/2-2*f.diagramMarginX).attr("y",-25),f.useMaxWidth?(n.attr("height","100%"),n.attr("width","100%"),n.attr("style","max-width:"+M+"px;")):(n.attr("height",A),n.attr("width",M));var O=b?40:0;n.attr("viewBox",S.startx-f.diagramMarginX+" -"+(f.diagramMarginY+O)+" "+M+" "+(A+O)),a.logger.debug("models:",h.models)},w=function(t,e){var n={};return e.forEach((function(e){if(t[e.to]&&t[e.from]){var r=t[e.to];if(e.placement===o.parser.yy.PLACEMENT.LEFTOF&&!r.prevActor)return;if(e.placement===o.parser.yy.PLACEMENT.RIGHTOF&&!r.nextActor)return;var i=void 0!==e.placement,a=!i,s=i?p(f):d(f),c=e.wrap?l.default.wrapLabel(e.message,f.width-2*f.wrapPadding,s):e.message,u=l.default.calculateTextDimensions(c,s).width+2*f.wrapPadding;a&&e.from===r.nextActor?n[e.to]=Math.max(n[e.to]||0,u):a&&e.from===r.prevActor?n[e.from]=Math.max(n[e.from]||0,u):a&&e.from===e.to?(n[e.from]=Math.max(n[e.from]||0,u/2),n[e.to]=Math.max(n[e.to]||0,u/2)):e.placement===o.parser.yy.PLACEMENT.RIGHTOF?n[e.from]=Math.max(n[e.from]||0,u):e.placement===o.parser.yy.PLACEMENT.LEFTOF?n[r.prevActor]=Math.max(n[r.prevActor]||0,u):e.placement===o.parser.yy.PLACEMENT.OVER&&(r.prevActor&&(n[r.prevActor]=Math.max(n[r.prevActor]||0,u/2)),r.nextActor&&(n[e.from]=Math.max(n[e.from]||0,u/2)))}})),a.logger.debug("maxMessageWidthPerActor:",n),n},k=function(t,e){var n=0;for(var r in Object.keys(t).forEach((function(e){var r=t[e];r.wrap&&(r.description=l.default.wrapLabel(r.description,f.width-2*f.wrapPadding,g(f)));var i=l.default.calculateTextDimensions(r.description,g(f));r.width=r.wrap?f.width:Math.max(f.width,i.width+2*f.wrapPadding),r.height=r.wrap?Math.max(i.height,f.height):f.height,n=Math.max(n,r.height)})),e){var i=t[r];if(i){var a=t[i.nextActor];if(a){var o=e[r]+f.actorMargin-i.width/2-a.width/2;i.margin=Math.max(o,f.actorMargin)}}}return Math.max(n,f.height)},C=function(t,e){var n,r,i,s={},c=[];return t.forEach((function(t){switch(t.id=l.default.random({length:10}),t.type){case o.parser.yy.LINETYPE.LOOP_START:case o.parser.yy.LINETYPE.ALT_START:case o.parser.yy.LINETYPE.OPT_START:case o.parser.yy.LINETYPE.PAR_START:c.push({id:t.id,msg:t.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case o.parser.yy.LINETYPE.ALT_ELSE:case o.parser.yy.LINETYPE.PAR_AND:t.message&&(n=c.pop(),s[n.id]=n,s[t.id]=n,c.push(n));break;case o.parser.yy.LINETYPE.LOOP_END:case o.parser.yy.LINETYPE.ALT_END:case o.parser.yy.LINETYPE.OPT_END:case o.parser.yy.LINETYPE.PAR_END:n=c.pop(),s[n.id]=n;break;case o.parser.yy.LINETYPE.ACTIVE_START:var u=e[t.from?t.from.actor:t.to.actor],g=m(t.from?t.from.actor:t.to.actor).length,y=u.x+u.width/2+(g-1)*f.activationWidth/2,v={startx:y,stopx:y+f.activationWidth,actor:t.from.actor,enabled:!0};h.activations.push(v);break;case o.parser.yy.LINETYPE.ACTIVE_END:var x=h.activations.map((function(t){return t.actor})).lastIndexOf(t.from.actor);delete h.activations.splice(x,1)[0]}void 0!==t.placement?(r=function(t,e){var n=e[t.from].x,r=e[t.to].x,i=t.wrap&&t.message,s=l.default.calculateTextDimensions(i?l.default.wrapLabel(t.message,f.width,p(f)):t.message,p(f)),c={width:i?f.width:Math.max(f.width,s.width+2*f.noteMargin),height:0,startx:e[t.from].x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===o.parser.yy.PLACEMENT.RIGHTOF?(c.width=i?Math.max(f.width,s.width):Math.max(e[t.from].width/2+e[t.to].width/2,s.width+2*f.noteMargin),c.startx=n+(e[t.from].width+f.actorMargin)/2):t.placement===o.parser.yy.PLACEMENT.LEFTOF?(c.width=i?Math.max(f.width,s.width+2*f.noteMargin):Math.max(e[t.from].width/2+e[t.to].width/2,s.width+2*f.noteMargin),c.startx=n-c.width+(e[t.from].width-f.actorMargin)/2):t.to===t.from?(s=l.default.calculateTextDimensions(i?l.default.wrapLabel(t.message,Math.max(f.width,e[t.from].width),p(f)):t.message,p(f)),c.width=i?Math.max(f.width,e[t.from].width):Math.max(e[t.from].width,f.width,s.width+2*f.noteMargin),c.startx=n+(e[t.from].width-c.width)/2):(c.width=Math.abs(n+e[t.from].width/2-(r+e[t.to].width/2))+f.actorMargin,c.startx=n0&&c.forEach((function(r){if(n=r,i.startx===i.stopx){var a=e[t.from],o=e[t.to];n.from=Math.min(a.x-i.width/2,a.x-a.width/2,n.from),n.to=Math.max(o.x+i.width/2,o.x+a.width/2,n.to),n.width=Math.max(n.width,Math.abs(n.to-n.from))-f.labelBoxWidth}else n.from=Math.min(i.startx,n.from),n.to=Math.max(i.stopx,n.to),n.width=Math.max(n.width,i.width)-f.labelBoxWidth})))})),h.activations=[],a.logger.debug("Loop type widths:",s),s};e.default={bounds:h,drawActors:y,setConf:v,draw:_}},"./src/diagrams/sequence/styles.js":function(t,e,n){"use strict";n.r(e),e.default=function(t){return".actor {\n stroke: ".concat(t.actorBorder,";\n fill: ").concat(t.actorBkg,";\n }\n\n text.actor > tspan {\n fill: ").concat(t.actorTextColor,";\n stroke: none;\n }\n\n .actor-line {\n stroke: ").concat(t.actorLineColor,";\n }\n\n .messageLine0 {\n stroke-width: 1.5;\n stroke-dasharray: none;\n stroke: ").concat(t.signalColor,";\n }\n\n .messageLine1 {\n stroke-width: 1.5;\n stroke-dasharray: 2, 2;\n stroke: ").concat(t.signalColor,";\n }\n\n #arrowhead path {\n fill: ").concat(t.signalColor,";\n stroke: ").concat(t.signalColor,";\n }\n\n .sequenceNumber {\n fill: ").concat(t.sequenceNumberColor,";\n }\n\n #sequencenumber {\n fill: ").concat(t.signalColor,";\n }\n\n #crosshead path {\n fill: ").concat(t.signalColor,";\n stroke: ").concat(t.signalColor,";\n }\n\n .messageText {\n fill: ").concat(t.signalTextColor,";\n stroke: ").concat(t.signalTextColor,";\n }\n\n .labelBox {\n stroke: ").concat(t.labelBoxBorderColor,";\n fill: ").concat(t.labelBoxBkgColor,";\n }\n\n .labelText, .labelText > tspan {\n fill: ").concat(t.labelTextColor,";\n stroke: none;\n }\n\n .loopText, .loopText > tspan {\n fill: ").concat(t.loopTextColor,";\n stroke: none;\n }\n\n .loopLine {\n stroke-width: 2px;\n stroke-dasharray: 2, 2;\n stroke: ").concat(t.labelBoxBorderColor,";\n fill: ").concat(t.labelBoxBorderColor,";\n }\n\n .note {\n //stroke: #decc93;\n stroke: ").concat(t.noteBorderColor,";\n fill: ").concat(t.noteBkgColor,";\n }\n\n .noteText, .noteText > tspan {\n fill: ").concat(t.noteTextColor,";\n stroke: none;\n }\n\n .activation0 {\n fill: ").concat(t.activationBkgColor,";\n stroke: ").concat(t.activationBorderColor,";\n }\n\n .activation1 {\n fill: ").concat(t.activationBkgColor,";\n stroke: ").concat(t.activationBorderColor,";\n }\n\n .activation2 {\n fill: ").concat(t.activationBkgColor,";\n stroke: ").concat(t.activationBorderColor,";\n }\n")}},"./src/diagrams/sequence/svgDraw.js":function(t,e,n){"use strict";n.r(e),n.d(e,"drawRect",(function(){return i})),n.d(e,"drawText",(function(){return a})),n.d(e,"drawLabel",(function(){return o})),n.d(e,"drawActor",(function(){return c})),n.d(e,"anchorElement",(function(){return u})),n.d(e,"drawActivation",(function(){return l})),n.d(e,"drawLoop",(function(){return f})),n.d(e,"drawBackgroundRect",(function(){return h})),n.d(e,"insertArrowHead",(function(){return d})),n.d(e,"insertSequenceNumber",(function(){return p})),n.d(e,"insertArrowCrossHead",(function(){return g})),n.d(e,"getTextObj",(function(){return y})),n.d(e,"getNoteRect",(function(){return v}));var r=n("./src/diagrams/common/common.js"),i=function(t,e){var n=t.append("rect");return n.attr("x",e.x),n.attr("y",e.y),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("width",e.width),n.attr("height",e.height),n.attr("rx",e.rx),n.attr("ry",e.ry),void 0!==e.class&&n.attr("class",e.class),n},a=function(t,e){var n=0,i=0,a=e.wrap?e.text.split(r.default.lineBreakRegex):[e.text.replace(r.default.lineBreakRegex," ")],o=[],s=0,c=function(){return e.y};if(void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0)switch(e.valign){case"top":case"start":c=function(){return Math.round(e.y+e.textMargin)};break;case"middle":case"center":c=function(){return Math.round(e.y+(n+i+e.textMargin)/2)};break;case"bottom":case"end":c=function(){return Math.round(e.y+(n+i+2*e.textMargin)-e.textMargin)}}if(void 0!==e.anchor&&void 0!==e.textMargin&&void 0!==e.width)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="text-after-edge",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="text-before-edge",e.alignmentBaseline="middle"}for(var u=0;u0&&(i+=(f._groups||f)[0][0].getBBox().height,n=i),o.push(f)}return o},o=function(t,e){var n,r,i,o,s,c=t.append("polygon");return c.attr("points",(n=e.x,r=e.y,i=e.width,o=e.height,n+","+r+" "+(n+i)+","+r+" "+(n+i)+","+(r+o-(s=7))+" "+(n+i-1.2*s)+","+(r+o)+" "+n+","+(r+o))),c.attr("class","labelBox"),e.y=e.y+e.height/2,a(t,e),c},s=-1,c=function(t,e,n){var r=e.x+e.width/2,a=t.append("g");0===e.y&&(s++,a.append("line").attr("id","actor"+s).attr("x1",r).attr("y1",5).attr("x2",r).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999"));var o=v();o.x=e.x,o.y=e.y,o.fill="#eaeaea",o.width=e.width,o.height=e.height,o.class="actor",o.rx=3,o.ry=3,i(a,o),m(n)(e.description,a,o.x,o.y,o.width,o.height,{class:"actor"},n)},u=function(t){return t.append("g")},l=function(t,e,n,r,a){var o=v(),s=e.anchored;o.x=e.startx,o.y=e.starty,o.class="activation"+a%3,o.width=e.stopx-e.startx,o.height=n-e.starty,i(s,o)},f=function(t,e,n,r){var i=r.boxMargin,s=r.boxTextMargin,c=r.labelBoxHeight,u=r.labelBoxWidth,l=r.messageFontFamily,f=r.messageFontSize,h=r.messageFontWeight,d=t.append("g"),p=function(t,e,n,r){return d.append("line").attr("x1",t).attr("y1",e).attr("x2",n).attr("y2",r).attr("class","loopLine")};p(e.startx,e.starty,e.stopx,e.starty),p(e.stopx,e.starty,e.stopx,e.stopy),p(e.startx,e.stopy,e.stopx,e.stopy),p(e.startx,e.starty,e.startx,e.stopy),void 0!==e.sections&&e.sections.forEach((function(t){p(e.startx,t.y,e.stopx,t.y).style("stroke-dasharray","3, 3")}));var g=y();g.text=n,g.x=e.startx,g.y=e.starty,g.fontFamily=l,g.fontSize=f,g.fontWeight=h,g.anchor="middle",g.valign="middle",g.tspan=!1,g.width=u||50,g.height=c||20,g.textMargin=s,g.class="labelText",o(d,g),(g=y()).text=e.title,g.x=e.startx+u/2+(e.stopx-e.startx)/2,g.y=e.starty+i+s,g.anchor="middle",g.valign="middle",g.textMargin=s,g.class="loopText",g.fontFamily=l,g.fontSize=f,g.fontWeight=h,g.wrap=!0;var v=a(d,g);return void 0!==e.sectionTitles&&e.sectionTitles.forEach((function(t,n){if(t.message){g.text=t.message,g.x=e.startx+(e.stopx-e.startx)/2,g.y=e.sections[n].y+i+s,g.class="loopText",g.anchor="middle",g.valign="middle",g.tspan=!1,g.fontFamily=l,g.fontSize=f,g.fontWeight=h,g.wrap=e.wrap,v=a(d,g);var r=Math.round(v.map((function(t){return(t._groups||t)[0][0].getBBox().height})).reduce((function(t,e){return t+e})));e.sections[n].height+=r-(i+s)}})),e.height=Math.round(e.stopy-e.starty),d},h=function(t,e){i(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},d=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},p=function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},g=function(t){var e=t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);e.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),e.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},y=function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},v=function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},m=function(){function t(t,e,n,r,a,o,s){i(e.append("text").attr("x",n+a/2).attr("y",r+o/2+5).style("text-anchor","middle").text(t),s)}function e(t,e,n,a,o,s,c,u){for(var l=u.actorFontSize,f=u.actorFontFamily,h=u.actorFontWeight,d=t.split(r.default.lineBreakRegex),p=0;pf&&A.push("'"+this.terminals_[E]+"'");O=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==h?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(O,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:v,expected:A})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(k[1]),x=null,_?(x=_,_=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(T=this.productions_[k[1]][1],M.$=i[i.length-T],M._$={first_line:a[a.length-(T||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(T||1)].first_column,last_column:a[a.length-1].last_column},m&&(M._$.range=[a[a.length-(T||1)].range[0],a[a.length-1].range[1]]),void 0!==(C=this.performAction.apply(M,[s,u,c,g.yy,k[1],i,a].concat(d))))return C;T&&(n=n.slice(0,-1*T*2),i=i.slice(0,-1*T),a=a.slice(0,-1*T)),n.push(this.productions_[k[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},C={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),39;case 1:return this.begin("type_directive"),40;case 2:return this.popState(),this.begin("arg_directive"),32;case 3:return this.popState(),this.popState(),42;case 4:return 41;case 5:break;case 6:console.log("Crap after close");break;case 7:return 5;case 8:case 9:case 10:case 11:break;case 12:return this.pushState("SCALE"),15;case 13:return 16;case 14:this.popState();break;case 15:this.pushState("STATE");break;case 16:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),23;case 17:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),24;case 18:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),23;case 19:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),24;case 20:this.begin("STATE_STRING");break;case 21:return this.popState(),this.pushState("STATE_ID"),"AS";case 22:return this.popState(),"ID";case 23:this.popState();break;case 24:return"STATE_DESCR";case 25:return 17;case 26:this.popState();break;case 27:return this.popState(),this.pushState("struct"),18;case 28:return this.popState(),19;case 29:break;case 30:return this.begin("NOTE"),26;case 31:return this.popState(),this.pushState("NOTE_ID"),37;case 32:return this.popState(),this.pushState("NOTE_ID"),38;case 33:this.popState(),this.pushState("FLOATING_NOTE");break;case 34:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 35:break;case 36:return"NOTE_TEXT";case 37:return this.popState(),"ID";case 38:return this.popState(),this.pushState("NOTE_TEXT"),22;case 39:return this.popState(),e.yytext=e.yytext.substr(2).trim(),28;case 40:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),28;case 41:case 42:return 7;case 43:return 14;case 44:return 36;case 45:return 22;case 46:return e.yytext=e.yytext.trim(),12;case 47:return 13;case 48:return 25;case 49:return 5;case 50:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:\s*[^:;]+end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[9,10],inclusive:!1},close_directive:{rules:[9,10],inclusive:!1},arg_directive:{rules:[3,4,9,10],inclusive:!1},type_directive:{rules:[2,3,9,10],inclusive:!1},open_directive:{rules:[1,9,10],inclusive:!1},struct:{rules:[9,10,15,28,29,30,44,45,46,47,48],inclusive:!1},FLOATING_NOTE_ID:{rules:[37],inclusive:!1},FLOATING_NOTE:{rules:[34,35,36],inclusive:!1},NOTE_TEXT:{rules:[39,40],inclusive:!1},NOTE_ID:{rules:[38],inclusive:!1},NOTE:{rules:[31,32,33],inclusive:!1},SCALE:{rules:[13,14],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[22],inclusive:!1},STATE_STRING:{rules:[23,24],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[9,10,16,17,18,19,20,21,25,26,27],inclusive:!1},ID:{rules:[9,10],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,10,11,12,15,27,30,41,42,43,44,45,46,47,49,50],inclusive:!0}}};function E(){this.yy={}}return k.lexer=C,E.prototype=k,k.Parser=E,new E}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n("./node_modules/node-libs-browser/mock/empty.js").readFileSync(n("./node_modules/path-browserify/index.js").normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n("./node_modules/process/browser.js"),n("./node_modules/webpack/buildin/module.js")(t))},"./src/diagrams/state/shapes.js":function(t,e,n){"use strict";n.r(e),n.d(e,"drawStartState",(function(){return l})),n.d(e,"drawDivider",(function(){return f})),n.d(e,"drawSimpleState",(function(){return h})),n.d(e,"drawDescrState",(function(){return d})),n.d(e,"addTitleAndBox",(function(){return p})),n.d(e,"drawText",(function(){return g})),n.d(e,"drawNote",(function(){return y})),n.d(e,"drawState",(function(){return v})),n.d(e,"drawEdge",(function(){return b}));var r=n("d3"),i=n("./src/diagrams/state/id-cache.js"),a=n("./src/diagrams/state/stateDb.js"),o=n("./src/utils.js"),s=n("./src/diagrams/common/common.js"),c=n("./src/config.js"),u=n("./src/logger.js"),l=function(t){return t.append("circle").attr("class","start-state").attr("r",Object(c.getConfig)().state.sizeUnit).attr("cx",Object(c.getConfig)().state.padding+Object(c.getConfig)().state.sizeUnit).attr("cy",Object(c.getConfig)().state.padding+Object(c.getConfig)().state.sizeUnit)},f=function(t){return t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",Object(c.getConfig)().state.textHeight).attr("class","divider").attr("x2",2*Object(c.getConfig)().state.textHeight).attr("y1",0).attr("y2",0)},h=function(t,e){var n=t.append("text").attr("x",2*Object(c.getConfig)().state.padding).attr("y",Object(c.getConfig)().state.textHeight+2*Object(c.getConfig)().state.padding).attr("font-size",Object(c.getConfig)().state.fontSize).attr("class","state-title").text(e.id),r=n.node().getBBox();return t.insert("rect",":first-child").attr("x",Object(c.getConfig)().state.padding).attr("y",Object(c.getConfig)().state.padding).attr("width",r.width+2*Object(c.getConfig)().state.padding).attr("height",r.height+2*Object(c.getConfig)().state.padding).attr("rx",Object(c.getConfig)().state.radius),n},d=function(t,e){var n=t.append("text").attr("x",2*Object(c.getConfig)().state.padding).attr("y",Object(c.getConfig)().state.textHeight+1.3*Object(c.getConfig)().state.padding).attr("font-size",Object(c.getConfig)().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),r=n.height,i=t.append("text").attr("x",Object(c.getConfig)().state.padding).attr("y",r+.4*Object(c.getConfig)().state.padding+Object(c.getConfig)().state.dividerMargin+Object(c.getConfig)().state.textHeight).attr("class","state-description"),a=!0,o=!0;e.descriptions.forEach((function(t){a||(function(t,e,n){var r=t.append("tspan").attr("x",2*Object(c.getConfig)().state.padding).text(e);n||r.attr("dy",Object(c.getConfig)().state.textHeight)}(i,t,o),o=!1),a=!1}));var s=t.append("line").attr("x1",Object(c.getConfig)().state.padding).attr("y1",Object(c.getConfig)().state.padding+r+Object(c.getConfig)().state.dividerMargin/2).attr("y2",Object(c.getConfig)().state.padding+r+Object(c.getConfig)().state.dividerMargin/2).attr("class","descr-divider"),u=i.node().getBBox(),l=Math.max(u.width,n.width);return s.attr("x2",l+3*Object(c.getConfig)().state.padding),t.insert("rect",":first-child").attr("x",Object(c.getConfig)().state.padding).attr("y",Object(c.getConfig)().state.padding).attr("width",l+2*Object(c.getConfig)().state.padding).attr("height",u.height+r+2*Object(c.getConfig)().state.padding).attr("rx",Object(c.getConfig)().state.radius),t},p=function(t,e,n){var r,i=Object(c.getConfig)().state.padding,a=2*Object(c.getConfig)().state.padding,o=t.node().getBBox(),s=o.width,u=o.x,l=t.append("text").attr("x",0).attr("y",Object(c.getConfig)().state.titleShift).attr("font-size",Object(c.getConfig)().state.fontSize).attr("class","state-title").text(e.id),f=l.node().getBBox().width+a,h=Math.max(f,s);h===s&&(h+=a);var d=t.node().getBBox();e.doc,r=u-i,f>s&&(r=(s-h)/2+i),Math.abs(u-d.x)s&&(r=u-(f-s)/2);var p=1-Object(c.getConfig)().state.textHeight;return t.insert("rect",":first-child").attr("x",r).attr("y",p).attr("class",n?"alt-composit":"composit").attr("width",h).attr("height",d.height+Object(c.getConfig)().state.textHeight+Object(c.getConfig)().state.titleShift+1).attr("rx","0"),l.attr("x",r+i),f<=s&&l.attr("x",u+(h-a)/2-f/2+i),t.insert("rect",":first-child").attr("x",r).attr("y",Object(c.getConfig)().state.titleShift-Object(c.getConfig)().state.textHeight-Object(c.getConfig)().state.padding).attr("width",h).attr("height",3*Object(c.getConfig)().state.textHeight).attr("rx",Object(c.getConfig)().state.radius),t.insert("rect",":first-child").attr("x",r).attr("y",Object(c.getConfig)().state.titleShift-Object(c.getConfig)().state.textHeight-Object(c.getConfig)().state.padding).attr("width",h).attr("height",d.height+3+2*Object(c.getConfig)().state.textHeight).attr("rx",Object(c.getConfig)().state.radius),t},g=function(t,e){var n=e.text.replace(s.default.lineBreakRegex," "),r=t.append("text");r.attr("x",e.x),r.attr("y",e.y),r.style("text-anchor",e.anchor),r.attr("fill",e.fill),void 0!==e.class&&r.attr("class",e.class);var i=r.append("tspan");return i.attr("x",e.x+2*e.textMargin),i.attr("fill",e.fill),i.text(n),r},y=function(t,e){e.attr("class","state-note");var n=e.append("rect").attr("x",0).attr("y",Object(c.getConfig)().state.padding),r=function(t,e,n,r){var i=0,a=r.append("text");a.style("text-anchor","start"),a.attr("class","noteText");var o=t.replace(/\r\n/g,"
"),u=(o=o.replace(/\n/g,"
")).split(s.default.lineBreakRegex),l=1.25*Object(c.getConfig)().state.noteMargin,f=!0,h=!1,d=void 0;try{for(var p,g=u[Symbol.iterator]();!(f=(p=g.next()).done);f=!0){var y=p.value.trim();if(y.length>0){var v=a.append("tspan");v.text(y),0===l&&(l+=v.node().getBBox().height),i+=l,v.attr("x",e+Object(c.getConfig)().state.noteMargin),v.attr("y",n+i+1.25*Object(c.getConfig)().state.noteMargin)}}}catch(t){h=!0,d=t}finally{try{f||null==g.return||g.return()}finally{if(h)throw d}}return{textWidth:a.node().getBBox().width,textHeight:i}}(t,0,0,e.append("g")),i=r.textWidth,a=r.textHeight;return n.attr("height",a+2*Object(c.getConfig)().state.noteMargin),n.attr("width",i+2*Object(c.getConfig)().state.noteMargin),n},v=function(t,e){var n=e.id,r={id:n,label:e.id,width:0,height:0},a=t.append("g").attr("id",n).attr("class","stateGroup");"start"===e.type&&l(a),"end"===e.type&&function(t){t.append("circle").attr("class","end-state-outer").attr("r",Object(c.getConfig)().state.sizeUnit+Object(c.getConfig)().state.miniPadding).attr("cx",Object(c.getConfig)().state.padding+Object(c.getConfig)().state.sizeUnit+Object(c.getConfig)().state.miniPadding).attr("cy",Object(c.getConfig)().state.padding+Object(c.getConfig)().state.sizeUnit+Object(c.getConfig)().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",Object(c.getConfig)().state.sizeUnit).attr("cx",Object(c.getConfig)().state.padding+Object(c.getConfig)().state.sizeUnit+2).attr("cy",Object(c.getConfig)().state.padding+Object(c.getConfig)().state.sizeUnit+2)}(a),"fork"!==e.type&&"join"!==e.type||function(t,e){var n=Object(c.getConfig)().state.forkWidth,r=Object(c.getConfig)().state.forkHeight;if(e.parentId){var i=n;n=r,r=i}t.append("rect").style("stroke","black").style("fill","black").attr("width",n).attr("height",r).attr("x",Object(c.getConfig)().state.padding).attr("y",Object(c.getConfig)().state.padding)}(a,e),"note"===e.type&&y(e.note.text,a),"divider"===e.type&&f(a),"default"===e.type&&0===e.descriptions.length&&h(a,e),"default"===e.type&&e.descriptions.length>0&&d(a,e);var o=a.node().getBBox();return r.width=o.width+2*Object(c.getConfig)().state.padding,r.height=o.height+2*Object(c.getConfig)().state.padding,i.default.set(n,r),r},m=0,b=function(t,e,n){e.points=e.points.filter((function(t){return!Number.isNaN(t.y)}));var i=e.points,l=Object(r.line)().x((function(t){return t.x})).y((function(t){return t.y})).curve(r.curveBasis),f=t.append("path").attr("d",l(i)).attr("id","edge"+m).attr("class","transition"),h="";if(Object(c.getConfig)().state.arrowMarkerAbsolute&&(h=(h=(h=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),f.attr("marker-end","url("+h+"#"+function(t){switch(t){case a.default.relationType.AGGREGATION:return"aggregation";case a.default.relationType.EXTENSION:return"extension";case a.default.relationType.COMPOSITION:return"composition";case a.default.relationType.DEPENDENCY:return"dependency"}}(a.default.relationType.DEPENDENCY)+"End)"),void 0!==n.title){for(var d=t.append("g").attr("class","stateLabel"),p=o.default.calcLabelPosition(e.points),g=p.x,y=p.y,v=s.default.getRows(n.title),b=0,x=[],_=0,w=0,k=0;k<=v.length;k++){var C=d.append("text").attr("text-anchor","middle").text(v[k]).attr("x",g).attr("y",y+b),E=C.node().getBBox();if(_=Math.max(_,E.width),w=Math.min(w,E.x),u.logger.info(E.x,g,y+b),0===b){var T=C.node().getBBox();b=T.height,u.logger.info("Title height",b,y)}x.push(C)}var S=b*v.length;if(v.length>1){var A=(v.length-1)*b*.5;x.forEach((function(t,e){return t.attr("y",y+e*b-A)})),S=b*v.length}var M=d.node().getBBox();d.insert("rect",":first-child").attr("class","box").attr("x",g-_/2-Object(c.getConfig)().state.padding/2).attr("y",y-S/2-Object(c.getConfig)().state.padding/2-3.5).attr("width",_+Object(c.getConfig)().state.padding).attr("height",S+Object(c.getConfig)().state.padding),u.logger.info(M)}m++}},"./src/diagrams/state/stateDb.js":function(t,e,n){"use strict";n.r(e),n.d(e,"parseDirective",(function(){return l})),n.d(e,"addState",(function(){return p})),n.d(e,"clear",(function(){return g})),n.d(e,"getState",(function(){return y})),n.d(e,"getStates",(function(){return v})),n.d(e,"logDocuments",(function(){return m})),n.d(e,"getRelations",(function(){return b})),n.d(e,"addRelation",(function(){return x})),n.d(e,"cleanupLabel",(function(){return w})),n.d(e,"lineType",(function(){return k})),n.d(e,"relationType",(function(){return T}));var r=n("./src/logger.js"),i=n("./src/utils.js"),a=n("./src/mermaidAPI.js"),o=n("./src/config.js");function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var c=function(t){return JSON.parse(JSON.stringify(t))},u=[],l=function(t,e,n){a.default.parseDirective(this,t,e,n)},f={root:{relations:[],states:{},documents:{}}},h=f.root,d=0,p=function(t,e,n,i,a){void 0===h.states[t]?h.states[t]={id:t,descriptions:[],type:e,doc:n,note:a}:(h.states[t].doc||(h.states[t].doc=n),h.states[t].type||(h.states[t].type=e)),i&&(r.logger.info("Adding state ",t,i),"string"==typeof i&&_(t,i.trim()),"object"===s(i)&&i.forEach((function(e){return _(t,e.trim())}))),a&&(h.states[t].note=a)},g=function(){h=(f={root:{relations:[],states:{},documents:{}}}).root,h=f.root,d=0,E=[]},y=function(t){return h.states[t]},v=function(){return h.states},m=function(){r.logger.info("Documents = ",f)},b=function(){return h.relations},x=function(t,e,n){var r=t,i=e,a="default",o="default";"[*]"===t&&(r="start"+ ++d,a="start"),"[*]"===e&&(i="end"+d,o="end"),p(r,a),p(i,o),h.relations.push({id1:r,id2:i,title:n})},_=function(t,e){var n=h.states[t],r=e;":"===r[0]&&(r=r.substr(1).trim()),n.descriptions.push(r)},w=function(t){return":"===t.substring(0,1)?t.substr(2).trim():t.trim()},k={LINE:0,DOTTED_LINE:1},C=0,E=[],T={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3};e.default={parseDirective:l,getConfig:function(){return o.getConfig().state},addState:p,clear:g,getState:y,getStates:v,getRelations:b,getClasses:function(){return E},getDirection:function(){return"TB"},addRelation:x,getDividerId:function(){return"divider-id-"+ ++C},cleanupLabel:w,lineType:k,relationType:T,logDocuments:m,getRootDoc:function(){return u},setRootDoc:function(t){r.logger.info("Setting root doc",t),u=t},getRootDocV2:function(){return function t(e,n,r){if("relation"===n.stmt)t(e,n.state1,!0),t(e,n.state2,!1);else if("state"===n.stmt&&"[*]"===n.id&&(n.id=r?e.id+"_start":e.id+"_end",n.start=r),n.doc){var a=[],o=0,s=[];for(o=0;o0&&s.length>0){var l={stmt:"state",id:Object(i.generateId)(),type:"divider",doc:c(s)};a.push(c(l)),n.doc=a}n.doc.forEach((function(e){return t(n,e,!0)}))}}({id:"root"},{id:"root",doc:u},!0),{id:"root",doc:u}},extract:function(t){var e;e=t.doc?t.doc:t,r.logger.info(e),g(),r.logger.info("Extract",e),e.forEach((function(t){"state"===t.stmt&&p(t.id,t.type,t.doc,t.description,t.note),"relation"===t.stmt&&x(t.state1.id,t.state2.id,t.description)}))},trimColon:function(t){return t&&":"===t[0]?t.substr(1).trim():t.trim()}}},"./src/diagrams/state/stateRenderer-v2.js":function(t,e,n){"use strict";n.r(e),n.d(e,"setConf",(function(){return d})),n.d(e,"getClasses",(function(){return g})),n.d(e,"draw",(function(){return b}));var r=n("graphlib"),i=n.n(r),a=n("d3"),o=n("./src/diagrams/state/stateDb.js"),s=n("./src/diagrams/state/parser/stateDiagram.jison"),c=n.n(s),u=n("./src/config.js"),l=n("./src/dagre-wrapper/index.js"),f=n("./src/logger.js"),h={},d=function(t){for(var e=Object.keys(t),n=0;n0?(p[n.id].shape="rectWithTitle",p[n.id].description===n.id?p[n.id].description=[n.description]:p[n.id].description=[p[n.id].description,n.description]):(p[n.id].shape="rect",p[n.id].description=n.description)),!p[n.id].type&&n.doc&&(f.logger.info("Setting cluser for ",n.id),p[n.id].type="group",p[n.id].shape="divider"===n.type?"divider":"roundedWithTitle",p[n.id].classes=p[n.id].classes+" "+(r?"statediagram-cluster statediagram-cluster-alt":"statediagram-cluster"));var a={labelStyle:"",shape:p[n.id].shape,labelText:p[n.id].description,classes:p[n.id].classes,style:"",id:n.id,type:p[n.id].type,padding:15};if(n.note){var o={labelStyle:"",shape:"note",labelText:n.note.text,classes:"statediagram-note",style:"",id:n.id+"----note",type:p[n.id].type,padding:15},s={labelStyle:"",shape:"noteGroup",labelText:n.note.text,classes:p[n.id].classes,style:"",id:n.id+"----parent",type:"group",padding:0};t.setNode(n.id+"----parent",s),t.setNode(o.id,o),t.setNode(n.id,a),t.setParent(n.id,n.id+"----parent"),t.setParent(o.id,n.id+"----parent");var c=n.id,u=o.id;"left of"===n.note.position&&(c=o.id,u=n.id),t.setEdge(c,u,{arrowhead:"none",arrowType:"",style:"fill:none",labelStyle:"",classes:"transition note-edge",arrowheadStyle:"fill: #333",labelpos:"c",labelType:"text",thickness:"normal"})}else t.setNode(n.id,a)}e&&"root"!==e.id&&(f.logger.info("Setting node ",n.id," to be child of its parent ",e.id),t.setParent(n.id,e.id)),n.doc&&(f.logger.info("Adding nodes children "),m(t,n,n.doc,!r))},v=0,m=function(t,e,n,r){f.logger.trace("items",n),n.forEach((function(n){if("state"===n.stmt||"default"===n.stmt)y(t,e,n,r);else if("relation"===n.stmt){y(t,e,n.state1,r),y(t,e,n.state2,r);var i={id:"edge"+v,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:"fill:none",labelStyle:"",label:n.description,arrowheadStyle:"fill: #333",labelpos:"c",labelType:"text",thickness:"normal",classes:"transition"},a=n.state1.id,o=n.state2.id;t.setEdge(a,o,i,v),v++}}))},b=function(t,e){f.logger.info("Drawing state diagram (v2)",e),o.default.clear(),p={};var n=c.a.parser;n.yy=o.default,n.parse(t);var r=o.default.getDirection();void 0===r&&(r="LR");var s=Object(u.getConfig)().state,h=s.nodeSpacing||50,d=s.rankSpacing||50,g=new i.a.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:"TB",nodesep:h,ranksep:d,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}}));f.logger.info(o.default.getRootDocV2()),o.default.extract(o.default.getRootDocV2()),f.logger.info(o.default.getRootDocV2()),y(g,void 0,o.default.getRootDocV2(),!0);var v=Object(a.select)('[id="'.concat(e,'"]')),m=Object(a.select)("#"+e+" g");Object(l.render)(m,g,["barb"],"statediagram",e);var b=v.node().getBBox(),x=b.width+16,_=b.height+16;v.attr("width",1.75*x),v.attr("class","statediagram");var w=v.node().getBBox();s.useMaxWidth?(v.attr("width","100%"),v.attr("style","max-width: ".concat(x,"px;"))):(v.attr("height",_),v.attr("width",x));var k="".concat(w.x-8," ").concat(w.y-8," ").concat(x," ").concat(_);if(f.logger.debug("viewBox ".concat(k)),v.attr("viewBox",k),!s.htmlLabels)for(var C=document.querySelectorAll('[id="'+e+'"] .edgeLabel .label'),E=0;E "+t.w+": "+JSON.stringify(p.edge(t))),Object(d.drawEdge)(n,p.edge(t),p.edge(t).relation))})),M=A.getBBox();var O={id:a||"root",label:a||"root",width:0,height:0};return O.width=M.width+2*r.padding,O.height=M.height+2*r.padding,u.logger.debug("Doc rendered",O,p),O};e.default={setConf:y,draw:v}},"./src/diagrams/state/styles.js":function(t,e,n){"use strict";n.r(e),e.default=function(t){return"g.stateGroup text {\n fill: ".concat(t.nodeBorder,";\n stroke: none;\n font-size: 10px;\n}\ng.stateGroup text {\n fill: ").concat(t.textColor,";\n stroke: none;\n font-size: 10px;\n\n}\ng.stateGroup .state-title {\n font-weight: bolder;\n fill: ").concat(t.labelColor,";\n}\n\ng.stateGroup rect {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n}\n\ng.stateGroup line {\n stroke: ").concat(t.lineColor,";\n stroke-width: 1;\n}\n\n.transition {\n stroke: ").concat(t.lineColor,";\n stroke-width: 1;\n fill: none;\n}\n\n.stateGroup .composit {\n fill: ").concat(t.background,";\n border-bottom: 1px\n}\n\n.stateGroup .alt-composit {\n fill: #e0e0e0;\n border-bottom: 1px\n}\n\n.state-note {\n stroke: ").concat(t.noteBorderColor,";\n fill: ").concat(t.noteBkgColor,";\n\n text {\n fill: black;\n stroke: none;\n font-size: 10px;\n }\n}\n\n.stateLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ").concat(t.mainBkg,";\n opacity: 0.5;\n}\n\n.edgeLabel .label rect {\n fill: ").concat(t.tertiaryColor,";\n opacity: 0.5;\n}\n.edgeLabel .label text {\n fill: ").concat(t.tertiaryTextColor,";\n}\n.label div .edgeLabel {\n color: ").concat(t.tertiaryTextColor,";\n}\n\n.stateLabel text {\n fill: ").concat(t.labelColor,";\n font-size: 10px;\n font-weight: bold;\n}\n\n.node circle.state-start {\n fill: ").concat(t.lineColor,";\n stroke: black;\n}\n.node circle.state-end {\n fill: ").concat(t.primaryBorderColor,";\n stroke: ").concat(t.background,";\n stroke-width: 1.5\n}\n.end-state-inner {\n fill: ").concat(t.background,";\n // stroke: ").concat(t.background,";\n stroke-width: 1.5\n}\n\n.node rect {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n stroke-width: 1px;\n}\n#statediagram-barbEnd {\n fill: ").concat(t.lineColor,";\n}\n\n.statediagram-cluster rect {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n stroke-width: 1px;\n}\n\n.cluster-label, .nodeLabel {\n color: ").concat(t.textColor,";\n}\n\n.statediagram-cluster rect.outer {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state .divider {\n stroke: ").concat(t.nodeBorder,";\n}\n\n.statediagram-state .title-state {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-cluster.statediagram-cluster .inner {\n fill: ").concat(t.background,";\n}\n.statediagram-cluster.statediagram-cluster-alt .inner {\n fill: #e0e0e0;\n}\n\n.statediagram-cluster .inner {\n rx:0;\n ry:0;\n}\n\n.statediagram-state rect.basic {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state rect.divider {\n stroke-dasharray: 10,10;\n fill: ").concat(t.altBackground?t.altBackground:"#efefef",";\n}\n\n.note-edge {\n stroke-dasharray: 5;\n}\n\n.statediagram-note rect {\n fill: ").concat(t.noteBkgColor,";\n stroke: ").concat(t.noteBorderColor,";\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n.statediagram-note rect {\n fill: ").concat(t.noteBkgColor,";\n stroke: ").concat(t.noteBorderColor,";\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n\n.statediagram-note text {\n fill: ").concat(t.noteTextColor,";\n}\n\n.statediagram-note .nodeLabel {\n color: ").concat(t.noteTextColor,";\n}\n\n#dependencyStart, #dependencyEnd {\n fill: ").concat(t.lineColor,";\n stroke: ").concat(t.lineColor,";\n stroke-width: 1;\n}\n")}},"./src/diagrams/user-journey/journeyDb.js":function(t,e,n){"use strict";n.r(e),n.d(e,"parseDirective",(function(){return f})),n.d(e,"clear",(function(){return h})),n.d(e,"setTitle",(function(){return d})),n.d(e,"getTitle",(function(){return p})),n.d(e,"addSection",(function(){return g})),n.d(e,"getSections",(function(){return y})),n.d(e,"getTasks",(function(){return v})),n.d(e,"addTask",(function(){return m})),n.d(e,"addTaskOrg",(function(){return b}));var r=n("./src/mermaidAPI.js"),i=n("./src/config.js");function a(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);ef&&A.push("'"+this.terminals_[E]+"'");O=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==h?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(O,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:v,expected:A})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(k[1]),x=null,_?(x=_,_=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(T=this.productions_[k[1]][1],M.$=i[i.length-T],M._$={first_line:a[a.length-(T||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(T||1)].first_column,last_column:a[a.length-1].last_column},m&&(M._$.range=[a[a.length-(T||1)].range[0],a[a.length-1].range[1]]),void 0!==(C=this.performAction.apply(M,[s,u,c,g.yy,k[1],i,a].concat(d))))return C;T&&(n=n.slice(0,-1*T*2),i=i.slice(0,-1*T),a=a.slice(0,-1*T)),n.push(this.productions_[k[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},l={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),21;case 1:return this.begin("type_directive"),22;case 2:return this.popState(),this.begin("arg_directive"),15;case 3:return this.popState(),this.popState(),24;case 4:return 23;case 5:case 6:break;case 7:return 11;case 8:case 9:break;case 10:return 4;case 11:return 17;case 12:return 18;case 13:return 19;case 14:return 20;case 15:return 15;case 16:return 6;case 17:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{open_directive:{rules:[1],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,13,14,15,16,17],inclusive:!0}}};function f(){this.yy={}}return u.lexer=l,f.prototype=u,u.Parser=f,new f}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n("./node_modules/node-libs-browser/mock/empty.js").readFileSync(n("./node_modules/path-browserify/index.js").normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n("./node_modules/process/browser.js"),n("./node_modules/webpack/buildin/module.js")(t))},"./src/diagrams/user-journey/styles.js":function(t,e,n){"use strict";n.r(e),e.default=function(t){return".label {\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family);\n color: ".concat(t.textColor,";\n }\n .mouth {\n stroke: #666;\n }\n\n line {\n stroke: ").concat(t.textColor,"\n }\n\n .legend {\n fill: ").concat(t.textColor,";\n }\n\n .label text {\n fill: #333;\n }\n .label {\n color: ").concat(t.textColor,"\n }\n\n .face {\n fill: #FFF8DC;\n stroke: #999;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ").concat(t.arrowheadColor,";\n }\n\n .edgePath .path {\n stroke: ").concat(t.lineColor,";\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ").concat(t.lineColor,";\n fill: none;\n }\n\n .edgeLabel {\n background-color: ").concat(t.edgeLabelBackground,";\n rect {\n opacity: 0.5;\n }\n text-align: center;\n }\n\n .cluster rect {\n }\n\n .cluster text {\n fill: ").concat(t.titleColor,";\n }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family);\n font-size: 12px;\n background: ").concat(t.tertiaryColor,";\n border: 1px solid ").concat(t.border2,";\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .task-type-0, .section-type-0 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType0):"",";\n }\n .task-type-1, .section-type-1 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType1):"",";\n }\n .task-type-2, .section-type-2 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType2):"",";\n }\n .task-type-3, .section-type-3 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType3):"",";\n }\n .task-type-4, .section-type-4 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType4):"",";\n }\n .task-type-5, .section-type-5 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType5):"",";\n }\n .task-type-6, .section-type-6 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType6):"",";\n }\n .task-type-7, .section-type-7 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType7):"",";\n }\n")}},"./src/diagrams/user-journey/svgDraw.js":function(t,e,n){"use strict";n.r(e),n.d(e,"drawRect",(function(){return i})),n.d(e,"drawFace",(function(){return a})),n.d(e,"drawCircle",(function(){return o})),n.d(e,"drawText",(function(){return s})),n.d(e,"drawLabel",(function(){return c})),n.d(e,"drawSection",(function(){return u})),n.d(e,"drawTask",(function(){return f})),n.d(e,"drawBackgroundRect",(function(){return h})),n.d(e,"getTextObj",(function(){return d})),n.d(e,"getNoteRect",(function(){return p}));var r=n("d3"),i=function(t,e){var n=t.append("rect");return n.attr("x",e.x),n.attr("y",e.y),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("width",e.width),n.attr("height",e.height),n.attr("rx",e.rx),n.attr("ry",e.ry),void 0!==e.class&&n.attr("class",e.class),n},a=function(t,e){var n=15,i=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",n).attr("stroke-width",2).attr("overflow","visible"),a=t.append("g");return a.append("circle").attr("cx",e.cx-5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),a.append("circle").attr("cx",e.cx+5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),e.score>3?function(t){var i=Object(r.arc)().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(n/2.2);t.append("path").attr("class","mouth").attr("d",i).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}(a):e.score<3?function(t){var i=Object(r.arc)().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(n/2.2);t.append("path").attr("class","mouth").attr("d",i).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}(a):function(t){t.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}(a),i},o=function(t,e){var n=t.append("circle");return n.attr("cx",e.cx),n.attr("cy",e.cy),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("r",e.r),void 0!==n.class&&n.attr("class",n.class),void 0!==e.title&&n.append("title").text(e.title),n},s=function(t,e){var n=e.text.replace(//gi," "),r=t.append("text");r.attr("x",e.x),r.attr("y",e.y),r.attr("class","legend"),r.style("text-anchor",e.anchor),void 0!==e.class&&r.attr("class",e.class);var i=r.append("tspan");return i.attr("x",e.x+2*e.textMargin),i.text(n),r},c=function(t,e){var n,r,i,a,o,c=t.append("polygon");c.attr("points",(n=e.x,r=e.y,n+","+r+" "+(n+(i=50))+","+r+" "+(n+i)+","+(r+(a=20)-(o=7))+" "+(n+i-1.2*o)+","+(r+a)+" "+n+","+(r+a))),c.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,s(t,e)},u=function(t,e,n){var r=t.append("g"),a=p();a.x=e.x,a.y=e.y,a.fill=e.fill,a.width=n.width,a.height=n.height,a.class="journey-section section-type-"+e.num,a.rx=3,a.ry=3,i(r,a),g(n)(e.text,r,a.x,a.y,a.width,a.height,{class:"journey-section section-type-"+e.num},n,e.colour)},l=-1,f=function(t,e,n){var r=e.x+n.width/2,s=t.append("g");l++,s.append("line").attr("id","task"+l).attr("x1",r).attr("y1",e.y).attr("x2",r).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),a(s,{cx:r,cy:300+30*(5-e.score),score:e.score});var c=p();c.x=e.x,c.y=e.y,c.fill=e.fill,c.width=n.width,c.height=n.height,c.class="task task-type-"+e.num,c.rx=3,c.ry=3,i(s,c);var u=e.x+14;e.people.forEach((function(t){var n=e.actors[t],r={cx:u,cy:e.y,r:7,fill:n,stroke:"#000",title:t};o(s,r),u+=10})),g(n)(e.task,s,c.x,c.y,c.width,c.height,{class:"task"},n,e.colour)},h=function(t,e){i(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},d=function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},p=function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},g=function(){function t(t,e,n,i,a,o,s,c){r(e.append("text").attr("x",n+a/2).attr("y",i+o/2+5).style("font-color",c).style("text-anchor","middle").text(t),s)}function e(t,e,n,i,a,o,s,c,u){for(var l=c.taskFontSize,f=c.taskFontFamily,h=t.split(//gi),d=0;d0&&void 0!==arguments[0]?arguments[0]:"fatal";isNaN(t)&&(t=t.toLowerCase(),void 0!==a[t]&&(t=a[t])),o.trace=function(){},o.debug=function(){},o.info=function(){},o.warn=function(){},o.error=function(){},o.fatal=function(){},t<=a.fatal&&(o.fatal=console.error?console.error.bind(console,c("FATAL"),"color: orange"):console.log.bind(console,"",c("FATAL"))),t<=a.error&&(o.error=console.error?console.error.bind(console,c("ERROR"),"color: orange"):console.log.bind(console,"",c("ERROR"))),t<=a.warn&&(o.warn=console.warn?console.warn.bind(console,c("WARN"),"color: orange"):console.log.bind(console,"",c("WARN"))),t<=a.info&&(o.info=console.info?console.info.bind(console,c("INFO"),"color: lightblue"):console.log.bind(console,"",c("INFO"))),t<=a.debug&&(o.debug=console.debug?console.debug.bind(console,c("DEBUG"),"color: lightgreen"):console.log.bind(console,"",c("DEBUG")))},c=function(t){var e=i()().format("ss.SSS");return"%c".concat(e," : ").concat(t," : ")}},"./src/mermaid.js":function(t,e,n){"use strict";n.r(e);var r=n("entity-decode/browser"),i=n.n(r),a=n("./src/mermaidAPI.js"),o=n("./src/logger.js"),s=n("./src/utils.js"),c=function(){u.startOnLoad?a.default.getConfig().startOnLoad&&u.init():void 0===u.startOnLoad&&(o.logger.debug("In start, no config"),a.default.getConfig().startOnLoad&&u.init())};"undefined"!=typeof document&&window.addEventListener("load",(function(){c()}),!1);var u={startOnLoad:!0,htmlLabels:!0,mermaidAPI:a.default,parse:a.default.parse,render:a.default.render,init:function(){var t,e,n,r=this,c=a.default.getConfig();arguments.length>=2?(void 0!==arguments[0]&&(u.sequenceConfig=arguments[0]),t=arguments[1]):t=arguments[0],"function"==typeof arguments[arguments.length-1]?(e=arguments[arguments.length-1],o.logger.debug("Callback function found")):void 0!==c.mermaid&&("function"==typeof c.mermaid.callback?(e=c.mermaid.callback,o.logger.debug("Callback function found")):o.logger.debug("No Callback function found")),t=void 0===t?document.querySelectorAll(".mermaid"):"string"==typeof t?document.querySelectorAll(t):t instanceof window.Node?[t]:t,o.logger.debug("Start On Load before: "+u.startOnLoad),void 0!==u.startOnLoad&&(o.logger.debug("Start On Load inner: "+u.startOnLoad),a.default.updateSiteConfig({startOnLoad:u.startOnLoad})),void 0!==u.ganttConfig&&a.default.updateSiteConfig({gantt:u.ganttConfig});for(var l=function(c){var u=t[c];if(u.getAttribute("data-processed"))return"continue";u.setAttribute("data-processed",!0);var l="mermaid-".concat(Date.now());n=u.innerHTML,n=i()(n).trim().replace(//gi,"
");var f=s.default.detectInit(n);f&&o.logger.debug("Detected early reinit: ",f);try{a.default.render(l,n,(function(t,n){u.innerHTML=t,void 0!==e&&e(l),n&&n(u)}),u)}catch(t){o.logger.warn("Syntax Error rendering"),o.logger.warn(t),r.parseError&&r.parseError(t)}},f=0;fg.maxTextSize&&(f="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa"),void 0!==r)r.innerHTML="",Object(a.select)(r).append("div").attr("id","d"+t).attr("style","font-family: "+g.fontFamily).append("svg").attr("id",t).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg").append("g");else{var y=document.getElementById(t);y&&y.remove();var v=document.querySelector("#d"+t);v&&v.remove(),Object(a.select)("body").append("div").attr("id","d"+t).append("svg").attr("id",t).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg").append("g")}window.txt=f,f=rt(f);var b=Object(a.select)("#d"+t).node(),x=c.default.detectType(f),C=b.firstChild,E=C.firstChild,M="";if(void 0!==g.themeCSS&&(M+="\n".concat(g.themeCSS)),void 0!==g.fontFamily&&(M+="\n:root { --mermaid-font-family: ".concat(g.fontFamily,"}")),void 0!==g.altFontFamily&&(M+="\n:root { --mermaid-alt-font-family: ".concat(g.altFontFamily,"}")),"flowchart"===x||"flowchart-v2"===x||"graph"===x){var O=u.default.getClasses(f);for(var j in O)M+="\n.".concat(j," > * { ").concat(O[j].styles.join(" !important; ")," !important; }"),O[j].textStyles&&(M+="\n.".concat(j," tspan { ").concat(O[j].textStyles.join(" !important; ")," !important; }"))}var N=(new i.a)("#".concat(t),Object(tt.default)(x,M,g.themeVariables)),B=document.createElement("style");B.innerHTML=N,C.insertBefore(B,E);try{switch(x){case"git":g.flowchart.arrowMarkerAbsolute=g.arrowMarkerAbsolute,D.default.setConf(g.git),D.default.draw(f,t,!1);break;case"flowchart":g.flowchart.arrowMarkerAbsolute=g.arrowMarkerAbsolute,u.default.setConf(g.flowchart),u.default.draw(f,t,!1);break;case"flowchart-v2":g.flowchart.arrowMarkerAbsolute=g.arrowMarkerAbsolute,l.default.setConf(g.flowchart),l.default.draw(f,t,!1);break;case"sequence":g.sequence.arrowMarkerAbsolute=g.arrowMarkerAbsolute,g.sequenceDiagram?(p.default.setConf(Object.assign(g.sequence,g.sequenceDiagram)),console.error("`mermaid config.sequenceDiagram` has been renamed to `config.sequence`. Please update your mermaid config.")):p.default.setConf(g.sequence),p.default.draw(f,t);break;case"gantt":g.gantt.arrowMarkerAbsolute=g.arrowMarkerAbsolute,m.default.setConf(g.gantt),m.default.draw(f,t);break;case"class":g.class.arrowMarkerAbsolute=g.arrowMarkerAbsolute,w.default.setConf(g.class),w.default.draw(f,t);break;case"classDiagram":g.class.arrowMarkerAbsolute=g.arrowMarkerAbsolute,k.default.setConf(g.class),k.default.draw(f,t);break;case"state":g.class.arrowMarkerAbsolute=g.arrowMarkerAbsolute,S.default.setConf(g.state),S.default.draw(f,t);break;case"stateDiagram":g.class.arrowMarkerAbsolute=g.arrowMarkerAbsolute,A.default.setConf(g.state),A.default.draw(f,t);break;case"info":g.class.arrowMarkerAbsolute=g.arrowMarkerAbsolute,F.default.setConf(g.class),F.default.draw(f,t,o.version);break;case"pie":g.class.arrowMarkerAbsolute=g.arrowMarkerAbsolute,z.default.setConf(g.class),z.default.draw(f,t,o.version);break;case"er":q.default.setConf(g.er),q.default.draw(f,t,o.version);break;case"journey":Q.default.setConf(g.journey),Q.default.draw(f,t,o.version)}}catch(e){throw P.default.draw(t,o.version),e}Object(a.select)('[id="'.concat(t,'"]')).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");var L=Object(a.select)("#d"+t).node().innerHTML;if(s.logger.debug("cnf.arrowMarkerAbsolute",g.arrowMarkerAbsolute),g.arrowMarkerAbsolute&&"false"!==g.arrowMarkerAbsolute||(L=L.replace(/marker-end="url\(.*?#/g,'marker-end="url(#',"g")),L=it(L),void 0!==n)switch(x){case"flowchart":case"flowchart-v2":n(L,d.default.bindFunctions);break;case"gantt":n(L,_.default.bindFunctions);break;case"class":n(L,T.default.bindFunctions);break;default:n(L)}else s.logger.debug("CB = undefined!");var I=Object(a.select)("#d"+t).node();return null!==I&&"function"==typeof I.remove&&Object(a.select)("#d"+t).node().remove(),L},parse:function(t){var e=c.default.detectInit(t);e&&s.logger.debug("reinit ",e);var n,r=c.default.detectType(t);switch(s.logger.debug("Type "+r),r){case"git":(n=B.a).parser.yy=L.default;break;case"flowchart":case"flowchart-v2":d.default.clear(),(n=h.a).parser.yy=d.default;break;case"sequence":(n=y.a).parser.yy=v.default;break;case"gantt":(n=x.a).parser.yy=_.default;break;case"class":case"classDiagram":(n=E.a).parser.yy=T.default;break;case"state":case"stateDiagram":(n=O.a).parser.yy=j.default;break;case"info":s.logger.debug("info info info"),(n=R.a).parser.yy=Y.default;break;case"pie":s.logger.debug("pie"),(n=W.a).parser.yy=$.default;break;case"er":s.logger.debug("er"),(n=G.a).parser.yy=V.default;break;case"journey":s.logger.debug("Journey"),(n=Z.a).parser.yy=J.default}return n.parser.yy.graphType=r,n.parser.yy.parseError=function(t,e){throw{str:t,hash:e}},n.parse(t),n},parseDirective:function(t,e,n,r){try{if(void 0!==e)switch(e=e.trim(),n){case"open_directive":at={};break;case"type_directive":at.type=e.toLowerCase();break;case"arg_directive":at.args=JSON.parse(e);break;case"close_directive":ot(t,at,r),at=null}}catch(t){s.logger.error("Error while rendering sequenceDiagram directive: ".concat(e," jison context: ").concat(n)),s.logger.error(t.message)}},initialize:function(t){t&&t.fontFamily&&(t.themeVariables&&t.themeVariables.fontFamily||(t.themeVariables={fontFamily:t.fontFamily})),K.setSiteConfigDelta(t),t&&t.theme&&et.default[t.theme]?t.themeVariables=et.default[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=et.default.default.getThemeVariables(t.themeVariables));var e="object"===nt(t)?K.setSiteConfig(t):K.getSiteConfig();st(e),Object(s.setLogLevel)(e.logLevel)},reinitialize:ct,getConfig:K.getConfig,setConfig:K.setConfig,getSiteConfig:K.getSiteConfig,updateSiteConfig:K.updateSiteConfig,reset:function(){K.reset()},globalReset:function(){K.reset(K.defaultConfig),st(K.getConfig())},defaultConfig:K.defaultConfig});Object(s.setLogLevel)(K.getConfig().logLevel),K.reset(K.getConfig()),e.default=ut},"./src/styles.js":function(t,e,n){"use strict";n.r(e),n.d(e,"calcThemeVariables",(function(){return p}));var r=n("./src/diagrams/class/styles.js"),i=n("./src/diagrams/er/styles.js"),a=n("./src/diagrams/flowchart/styles.js"),o=n("./src/diagrams/gantt/styles.js"),s=n("./src/diagrams/git/styles.js"),c=n("./src/diagrams/info/styles.js"),u=n("./src/diagrams/pie/styles.js"),l=n("./src/diagrams/sequence/styles.js"),f=n("./src/diagrams/state/styles.js"),h=n("./src/diagrams/user-journey/styles.js"),d={flowchart:a.default,"flowchart-v2":a.default,sequence:l.default,gantt:o.default,classDiagram:r.default,"classDiagram-v2":r.default,class:r.default,stateDiagram:f.default,state:f.default,git:s.default,info:c.default,pie:u.default,er:i.default,journey:h.default},p=function(t,e){return t.calcColors(e)};e.default=function(t,e,n){return" {\n font-family: ".concat(n.fontFamily,";\n font-size: ").concat(n.fontSize,";\n fill: ").concat(n.textColor,"\n }\n\n /* Classes common for multiple diagrams */\n\n .error-icon {\n fill: ").concat(n.errorBkgColor,";\n }\n .error-text {\n fill: ").concat(n.errorTextColor,";\n stroke: ").concat(n.errorTextColor,";\n }\n\n .edge-thickness-normal {\n stroke-width: 2px;\n }\n .edge-thickness-thick {\n stroke-width: 3.5px\n }\n .edge-pattern-solid {\n stroke-dasharray: 0;\n }\n\n .edge-pattern-dashed{\n stroke-dasharray: 3;\n }\n .edge-pattern-dotted {\n stroke-dasharray: 2;\n }\n\n .marker {\n fill: ").concat(n.lineColor,";\n }\n .marker.cross {\n stroke: ").concat(n.lineColor,";\n }\n\n svg {\n font-family: ").concat(n.fontFamily,";\n font-size: ").concat(n.fontSize,";\n }\n\n ").concat(d[t](n),"\n\n ").concat(e,"\n\n ").concat(t," { fill: apa;}\n")}},"./src/themes/index.js":function(t,e,n){"use strict";n.r(e);var r=n("./src/themes/theme-base.js"),i=n("./src/themes/theme-dark.js"),a=n("./src/themes/theme-default.js"),o=n("./src/themes/theme-forest.js"),s=n("./src/themes/theme-neutral.js");e.default={base:{getThemeVariables:r.getThemeVariables},dark:{getThemeVariables:i.getThemeVariables},default:{getThemeVariables:a.getThemeVariables},forest:{getThemeVariables:o.getThemeVariables},neutral:{getThemeVariables:s.getThemeVariables}}},"./src/themes/theme-base.js":function(t,e,n){"use strict";n.r(e),n.d(e,"getThemeVariables",(function(){return c}));var r=n("khroma"),i=n("./src/themes/theme-helpers.js");function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:null;try{var n=new RegExp("[%]{2}(?![{]".concat(h.source,")(?=[}][%]{2}).*\n"),"ig");t=t.trim().replace(n,"").replace(/'/gm,'"'),i.logger.debug("Detecting diagram directive".concat(null!==e?" type:"+e:""," based on the text:").concat(t));for(var r,a=[];null!==(r=f.exec(t));)if(r.index===f.lastIndex&&f.lastIndex++,r&&!e||e&&r[1]&&r[1].match(e)||e&&r[2]&&r[2].match(e)){var o=r[1]?r[1]:r[2],s=r[3]?r[3].trim():r[4]?JSON.parse(r[4].trim()):null;a.push({type:o,args:s})}return 0===a.length&&a.push({type:t,args:null}),1===a.length?a[0]:a}catch(n){return i.logger.error("ERROR: ".concat(n.message," - Unable to parse directive").concat(null!==e?" type:"+e:""," based on the text:").concat(t)),{type:null,args:null}}},y=function(t){return t=t.replace(f,"").replace(d,"\n"),i.logger.debug("Detecting diagram type based on the text "+t),t.match(/^\s*sequenceDiagram/)?"sequence":t.match(/^\s*gantt/)?"gantt":t.match(/^\s*classDiagram-v2/)?"classDiagram":t.match(/^\s*classDiagram/)?"class":t.match(/^\s*stateDiagram-v2/)?"stateDiagram":t.match(/^\s*stateDiagram/)?"state":t.match(/^\s*gitGraph/)?"git":t.match(/^\s*flowchart/)?"flowchart-v2":t.match(/^\s*info/)?"info":t.match(/^\s*pie/)?"pie":t.match(/^\s*erDiagram/)?"er":t.match(/^\s*journey/)?"journey":"flowchart"},v=function(t,e){var n={};return function(){for(var r=arguments.length,i=new Array(r),a=0;a1?s-1:0),u=1;u"},n),o.default.lineBreakRegex.test(t))return t;var r=t.split(" "),i=[],a="";return r.forEach((function(t,o){var s=N("".concat(t," "),n),c=N(a,n);if(s>e){var l=j(t,e,"-",n),f=l.hyphenatedStrings,h=l.remainingWord;i.push.apply(i,[a].concat(u(f))),a=h}else c+s>=e?(i.push(a),a=t):a=[a,t].filter(Boolean).join(" ");o+1===r.length&&i.push(a)})),i.filter((function(t){return""!==t})).join(n.joinWith)}),(function(t,e,n){return"".concat(t,"-").concat(e,"-").concat(n.fontSize,"-").concat(n.fontWeight,"-").concat(n.fontFamily,"-").concat(n.joinWith)})),j=v((function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"-",r=arguments.length>3?arguments[3]:void 0;r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},r);var i=t.split(""),a=[],o="";return i.forEach((function(t,s){var c="".concat(o).concat(t);if(N(c,r)>=e){var u=s+1,l=i.length===u,f="".concat(c).concat(n);a.push(l?c:f),o=""}else o=c})),{hyphenatedStrings:a,remainingWord:o}}),(function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"-",r=arguments.length>3?arguments[3]:void 0;return"".concat(t,"-").concat(e,"-").concat(n,"-").concat(r.fontSize,"-").concat(r.fontWeight,"-").concat(r.fontFamily)})),D=function(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:15},e),B(t,e).height},N=function(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e),B(t,e).width},B=v((function(t,e){var n=e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e),i=n.fontSize,a=n.fontFamily,s=n.fontWeight;if(!t)return{width:0,height:0};var c=["sans-serif",a],u=t.split(o.default.lineBreakRegex),l=[],f=Object(r.select)("body");if(!f.remove)return{width:0,height:0,lineHeight:0};for(var h=f.append("svg"),d=0,p=c;dl[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1]}),(function(t,e){return"".concat(t,"-").concat(e.fontSize,"-").concat(e.fontWeight,"-").concat(e.fontFamily)}));e.default={assignWithDepth:S,wrapLabel:O,calculateTextHeight:D,calculateTextWidth:N,calculateTextDimensions:B,detectInit:p,detectDirective:g,detectType:y,isSubstringInArray:m,interpolateToCurve:b,calcLabelPosition:function(t){return function(t){var e,n=0;t.forEach((function(t){n+=w(t,e),e=t}));var r=n/2,i=void 0;return e=void 0,t.forEach((function(t){if(e&&!i){var n=w(t,e);if(n=1&&(i={x:t.x,y:t.y}),a>0&&a<1&&(i={x:(1-a)*e.x+a*t.x,y:(1-a)*e.y+a*t.y})}}e=t})),i}(t)},calcCardinalityPosition:function(t,e,n){var r;e[0]!==n&&(e=e.reverse()),e.forEach((function(t){w(t,r),r=t}));var i,a=25;r=void 0,e.forEach((function(t){if(r&&!i){var e=w(t,r);if(e=1&&(i={x:t.x,y:t.y}),n>0&&n<1&&(i={x:(1-n)*r.x+n*t.x,y:(1-n)*r.y+n*t.y})}}r=t}));var o=t?10:5,s=Math.atan2(e[0].y-i.y,e[0].x-i.x),c={x:0,y:0};return c.x=Math.sin(s)*o+(e[0].x+i.x)/2,c.y=-Math.cos(s)*o+(e[0].y+i.y)/2,c},formatUrl:x,getStylesFromArray:k,generateId:E,random:T,memoize:v,runFunc:_}},"@braintree/sanitize-url":function(t,e){t.exports=n(678)},d3:function(t,e){t.exports=n(674)},dagre:function(t,e){t.exports=n(570)},"dagre-d3":function(t,e){t.exports=n(847)},"dagre-d3/lib/label/add-html-label.js":function(t,e){t.exports=n(632)},"entity-decode/browser":function(t,e){t.exports=n(864)},graphlib:function(t,e){t.exports=n(419)},khroma:function(t,e){t.exports=n(865)},"moment-mini":function(t,e){t.exports=n(892)},stylis:function(t,e){t.exports=n(894)}}).default},t.exports=r()}])]);