(function(){var t;(t=class t extends this.OS.application.BaseApplication{constructor(t){super("GraphEditor",t)}main(){return mermaid.initialize({theme:"forest"}),this.currfile=this.args&&this.args.length>0?this.args[0].path.asFileHandle():"Untitled".asFileHandle(),this.currfile.dirty=!1,this.datarea=this.find("datarea"),this.preview=this.find("preview"),this.btctn=this.find("btn-container"),this.editor=ace.edit(this.datarea),this.editor.setOptions({enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,fontSize:"11pt"}),this.editor.getSession().setUseWrapMode(!0),this.editor.session.setMode("ace/mode/text"),this.editor.setTheme("ace/theme/monokai"),this.editor.on("input",()=>this.editormux?(this.editormux=!1,!1):this.currfile.dirty?void 0:this.currfile.dirty=!0),this.currfile.basename||(this.editormux=!0,this.editor.setValue(t.dummymermaid),this.renderSVG(!1)),this.editor.container.addEventListener("keydown",t=>{if(13===t.keyCode)return this.renderSVG(!0)},!0),this.bindKey("CTRL-R",()=>this.renderSVG(!1)),this.bindKey("ALT-G",()=>this.export("SVG")),this.bindKey("ALT-P",()=>this.export("PNG")),this.bindKey("ALT-N",()=>this.actionFile(this.name+"-New")),this.bindKey("ALT-O",()=>this.actionFile(this.name+"-Open")),this.bindKey("CTRL-S",()=>this.actionFile(this.name+"-Save")),this.bindKey("ALT-W",()=>this.actionFile(this.name+"-Saveas")),this.bindKey("CTRL-M",()=>this.svgToCanvas((function(){}))),this.on("hboxchange",()=>(this.editor.resize(),this.calibrate())),this.on("focus",()=>this.editor.focus()),this.find("btn-zoomin").onbtclick=t=>{if(this.pan)return this.pan.zoomIn()},this.find("btn-zoomout").onbtclick=t=>{if(this.pan)return this.pan.zoomOut()},this.find("btn-reset").onbtclick=t=>{if(this.pan)return this.pan.resetZoom()},this.open(this.currfile)}menu(){return[{text:"__(File)",nodes:[{text:"__(New)",dataid:this.name+"-New",shortcut:"A-N"},{text:"__(Open)",dataid:this.name+"-Open",shortcut:"A-O"},{text:"__(Save)",dataid:this.name+"-Save",shortcut:"C-S"},{text:"__(Save as)",dataid:this.name+"-Saveas",shortcut:"A-W"},{text:"__(Render)",dataid:this.name+"-Render",shortcut:"C-R"},{text:"__(Export as)",nodes:[{text:"SVG",shortcut:"A-G"},{text:"PNG",shortcut:"A-P"}],onchildselect:t=>this.export(t.data.item.data.text)}],onchildselect:t=>this.actionFile(t.data.item.data.dataid)}]}open(t){if("Untitled"!==t.path)return t.dirty=!1,t.read().then(e=>(this.currfile=t,this.editormux=!0,this.currfile.dirty=!1,this.editor.setValue(e),this.scheme.apptitle=""+this.currfile.basename,this.renderSVG(!1))).catch(t=>this.error(t.toString(),t))}save(t){return t.write("text/plain").then(e=>(t.dirty=!1,t.text=t.basename,this.scheme.apptitle=""+this.currfile.basename)).catch(t=>this.error(t.toString(),t))}actionFile(t){var e;switch(e=()=>this.openDialog("FileDialog",{title:__("Save as"),file:this.currfile}).then(t=>(this.currfile.setPath(`${t.file.path}/${t.name}`),this.save(this.currfile))).catch(t=>this.error(t.toString(),t)),t){case this.name+"-Open":return this.openDialog("FileDialog",{title:__("Open file")}).then((t,e)=>this.open(t.file.path.asFileHandle())).catch(t=>this.error(t.toString(),t));case this.name+"-Save":return this.currfile.cache=this.editor.getValue(),this.currfile.basename?this.save(this.currfile):e();case this.name+"-Saveas":return this.currfile.cache=this.editor.getValue(),e();case this.name+"-Render":return this.renderSVG(!1);case this.name+"-New":return this.currfile="Untitled".asFileHandle(),this.currfile.cache="",this.currfile.dirty=!1,this.editormux=!0,this.editor.setValue("")}}export(t){return this.openDialog("FileDialog",{title:__("Export as"),file:this.currfile}).then(e=>{var n,r;r=`${e.file.path}/${e.name}`.asFileHandle();try{switch(t){case"SVG":return r.cache=this.svgtext(),r.write("text/plain").then(t=>this.notify(__("File exported"))).catch(e=>this.error(__("Cannot export to {0}: {1}",t,e.toString()),e));case"PNG":return this.svgToCanvas(e=>{var n;try{return r.cache=e.toDataURL("image/png"),r.write("base64").then(t=>this.notify(__("File exported"))).catch(e=>this.error(__("Cannot export to {0}: {1}",t,e.toString()),e))}catch(t){return n=t,this.error(__("Cannot export to PNG in this browser: {0}",n.toString()),n)}})}}catch(t){return n=t,this.error(__("Cannot export: {0}",n.message),n)}}).catch(t=>this.error(t.toString(),t))}renderSVG(t){var e,n,r;n=Math.floor(1e5*Math.random())+1,r=this.editor.getValue();try{mermaid.parse(r)}catch(n){return e=n,void(t||this.error(__("Syntax error: {0}",e.toString()),e))}return mermaid.render("c"+n,r,(t,e)=>{var n;return this.preview.innerHTML=t,$(this.preview).append(this.btctn),this.calibrate(),n=$(this.preview).children("svg")[0],this.pan=svgPanZoom(n,{zoomEnabled:!0,controlIconsEnabled:!1,fit:!0,center:!0,minZoom:.1})},this.preview)}svgtext(){var t;return t=$(this.preview).children("svg")[0],$("g.label",t).each(t=>$(this).css("font-family","Ubuntu").css("font-size","13px")),$("text",t).each(t=>$(this).css("font-family","Ubuntu").css("font-size","13px")),(new XMLSerializer).serializeToString(t)}svgToCanvas(t){var e,n,r,i,a;return(n=new Image).crossOrigin="anonymous",i=this.svgtext(),e=window.URL||window.webkitURL||window,r=new Blob([i],{type:"image/svg+xml;charset=utf-8"}),a=e.createObjectURL(r),n.onload=()=>{var e;return(e=this.find("offscreen")).width=n.width,e.height=n.height,e.getContext("2d").drawImage(n,0,0,n.width,n.height),t(e)},n.src=a}calibrate(){var t,e;if(e=$(this.preview).children("svg")[0])return t=[$(this.preview).width(),$(this.preview).height()],$(e).attr("width",t[0]+"px"),$(e).attr("height",t[1]+"px")}cleanup(t){if(this.currfile&&this.currfile.dirty)return t.preventDefault(),this.ask({title:__("Quit"),text:__("Quit without saving ?")}).then(t=>{if(t)return this.currfile.dirty=!1,this.quit()})}}).dummymermaid="classDiagram\nClass01 <|-- AveryLongClass : Cool\nClass03 *-- Class04\nClass05 o-- Class06\nClass07 .. Class08\nClass09 --\x3e C2 : Where am i?\nClass09 --* C3\nClass09 --|> Class07\nClass07 : equals()\nClass07 : Object[] elementData\nClass01 : size()\nClass01 : int chimp\nClass01 : int gorilla\nClass08 <--\x3e C2: Cool label",t.dependencies=["pkg://ACECore/core/ace.js","pkg://ACECore/path.js"],this.OS.register("GraphEditor",t)}).call(this),function t(e,n,r){function i(o,s){if(!n[o]){if(!e[o]){var u="function"==typeof require&&require;if(!s&&u)return u(o,!0);if(a)return a(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[o]={exports:{}};e[o][0].call(l.exports,(function(t){return i(e[o][1][t]||t)}),l,l.exports,t,e,n,r)}return n[o].exports}for(var a="function"==typeof require&&require,o=0;o=0;r--)this.eventListeners.hasOwnProperty(n[r])&&delete this.eventListeners[n[r]]}for(var i in this.eventListeners)(this.options.eventsListenerElement||this.svg).addEventListener(i,this.eventListeners[i],!1);this.options.mouseWheelZoomEnabled&&(this.options.mouseWheelZoomEnabled=!1,this.enableMouseWheelZoom())},u.prototype.enableMouseWheelZoom=function(){if(!this.options.mouseWheelZoomEnabled){var t=this;this.wheelListener=function(e){return t.handleMouseWheel(e)},r.on(this.options.eventsListenerElement||this.svg,this.wheelListener,!1),this.options.mouseWheelZoomEnabled=!0}},u.prototype.disableMouseWheelZoom=function(){this.options.mouseWheelZoomEnabled&&(r.off(this.options.eventsListenerElement||this.svg,this.wheelListener,!1),this.options.mouseWheelZoomEnabled=!1)},u.prototype.handleMouseWheel=function(t){if(this.options.zoomEnabled&&"none"===this.state){this.options.preventMouseEventsDefault&&(t.preventDefault?t.preventDefault():t.returnValue=!1);var e=t.deltaY||1,n=Date.now()-this.lastMouseWheelEventTime,r=3+Math.max(0,30-n);this.lastMouseWheelEventTime=Date.now(),"deltaMode"in t&&0===t.deltaMode&&t.wheelDelta&&(e=0===t.deltaY?0:Math.abs(t.wheelDelta)/t.deltaY),e=-.30?1:-1)*Math.log(Math.abs(e)+10)/r;var i=this.svg.getScreenCTM().inverse(),a=o.getEventPoint(t,this.svg).matrixTransform(i),s=Math.pow(1+this.options.zoomScaleSensitivity,-1*e);this.zoomAtPoint(s,a)}},u.prototype.zoomAtPoint=function(t,e,n){var r=this.viewport.getOriginalState();n?(t=Math.max(this.options.minZoom*r.zoom,Math.min(this.options.maxZoom*r.zoom,t)),t/=this.getZoom()):this.getZoom()*tthis.options.maxZoom*r.zoom&&(t=this.options.maxZoom*r.zoom/this.getZoom());var i=this.viewport.getCTM(),a=e.matrixTransform(i.inverse()),o=this.svg.createSVGMatrix().translate(a.x,a.y).scale(t).translate(-a.x,-a.y),s=i.multiply(o);s.a!==i.a&&this.viewport.setCTM(s)},u.prototype.zoom=function(t,e){this.zoomAtPoint(t,o.getSvgCenterPoint(this.svg,this.width,this.height),e)},u.prototype.publicZoom=function(t,e){e&&(t=this.computeFromRelativeZoom(t)),this.zoom(t,e)},u.prototype.publicZoomAtPoint=function(t,e,n){if(n&&(t=this.computeFromRelativeZoom(t)),"SVGPoint"!==a.getType(e)){if(!("x"in e)||!("y"in e))throw new Error("Given point is invalid");e=o.createSVGPoint(this.svg,e.x,e.y)}this.zoomAtPoint(t,e,n)},u.prototype.getZoom=function(){return this.viewport.getZoom()},u.prototype.getRelativeZoom=function(){return this.viewport.getRelativeZoom()},u.prototype.computeFromRelativeZoom=function(t){return t*this.viewport.getOriginalState().zoom},u.prototype.resetZoom=function(){var t=this.viewport.getOriginalState();this.zoom(t.zoom,!0)},u.prototype.resetPan=function(){this.pan(this.viewport.getOriginalState())},u.prototype.reset=function(){this.resetZoom(),this.resetPan()},u.prototype.handleDblClick=function(t){var e;if(this.options.preventMouseEventsDefault&&(t.preventDefault?t.preventDefault():t.returnValue=!1),this.options.controlIconsEnabled&&(t.target.getAttribute("class")||"").indexOf("svg-pan-zoom-control")>-1)return!1;e=t.shiftKey?1/(2*(1+this.options.zoomScaleSensitivity)):2*(1+this.options.zoomScaleSensitivity);var n=o.getEventPoint(t,this.svg).matrixTransform(this.svg.getScreenCTM().inverse());this.zoomAtPoint(e,n)},u.prototype.handleMouseDown=function(t,e){this.options.preventMouseEventsDefault&&(t.preventDefault?t.preventDefault():t.returnValue=!1),a.mouseAndTouchNormalize(t,this.svg),this.options.dblClickZoomEnabled&&a.isDblClick(t,e)?this.handleDblClick(t):(this.state="pan",this.firstEventCTM=this.viewport.getCTM(),this.stateOrigin=o.getEventPoint(t,this.svg).matrixTransform(this.firstEventCTM.inverse()))},u.prototype.handleMouseMove=function(t){if(this.options.preventMouseEventsDefault&&(t.preventDefault?t.preventDefault():t.returnValue=!1),"pan"===this.state&&this.options.panEnabled){var e=o.getEventPoint(t,this.svg).matrixTransform(this.firstEventCTM.inverse()),n=this.firstEventCTM.translate(e.x-this.stateOrigin.x,e.y-this.stateOrigin.y);this.viewport.setCTM(n)}},u.prototype.handleMouseUp=function(t){this.options.preventMouseEventsDefault&&(t.preventDefault?t.preventDefault():t.returnValue=!1),"pan"===this.state&&(this.state="none")},u.prototype.fit=function(){var t=this.viewport.getViewBox(),e=Math.min(this.width/t.width,this.height/t.height);this.zoom(e,!0)},u.prototype.contain=function(){var t=this.viewport.getViewBox(),e=Math.max(this.width/t.width,this.height/t.height);this.zoom(e,!0)},u.prototype.center=function(){var t=this.viewport.getViewBox(),e=.5*(this.width-(t.width+2*t.x)*this.getZoom()),n=.5*(this.height-(t.height+2*t.y)*this.getZoom());this.getPublicInstance().pan({x:e,y:n})},u.prototype.updateBBox=function(){this.viewport.simpleViewBoxCache()},u.prototype.pan=function(t){var e=this.viewport.getCTM();e.e=t.x,e.f=t.y,this.viewport.setCTM(e)},u.prototype.panBy=function(t){var e=this.viewport.getCTM();e.e+=t.x,e.f+=t.y,this.viewport.setCTM(e)},u.prototype.getPan=function(){var t=this.viewport.getState();return{x:t.x,y:t.y}},u.prototype.resize=function(){var t=o.getBoundingClientRectNormalized(this.svg);this.width=t.width,this.height=t.height;var e=this.viewport;e.options.width=this.width,e.options.height=this.height,e.processCTM(),this.options.controlIconsEnabled&&(this.getPublicInstance().disableControlIcons(),this.getPublicInstance().enableControlIcons())},u.prototype.destroy=function(){var t=this;for(var e in this.beforeZoom=null,this.onZoom=null,this.beforePan=null,this.onPan=null,this.onUpdatedCTM=null,null!=this.options.customEventsHandler&&this.options.customEventsHandler.destroy({svgElement:this.svg,eventsListenerElement:this.options.eventsListenerElement,instance:this.getPublicInstance()}),this.eventListeners)(this.options.eventsListenerElement||this.svg).removeEventListener(e,this.eventListeners[e],!1);this.disableMouseWheelZoom(),this.getPublicInstance().disableControlIcons(),this.reset(),l=l.filter((function(e){return e.svg!==t.svg})),delete this.options,delete this.viewport,delete this.publicInstance,delete this.pi,this.getPublicInstance=function(){return null}},u.prototype.getPublicInstance=function(){var t=this;return this.publicInstance||(this.publicInstance=this.pi={enablePan:function(){return t.options.panEnabled=!0,t.pi},disablePan:function(){return t.options.panEnabled=!1,t.pi},isPanEnabled:function(){return!!t.options.panEnabled},pan:function(e){return t.pan(e),t.pi},panBy:function(e){return t.panBy(e),t.pi},getPan:function(){return t.getPan()},setBeforePan:function(e){return t.options.beforePan=null===e?null:a.proxy(e,t.publicInstance),t.pi},setOnPan:function(e){return t.options.onPan=null===e?null:a.proxy(e,t.publicInstance),t.pi},enableZoom:function(){return t.options.zoomEnabled=!0,t.pi},disableZoom:function(){return t.options.zoomEnabled=!1,t.pi},isZoomEnabled:function(){return!!t.options.zoomEnabled},enableControlIcons:function(){return t.options.controlIconsEnabled||(t.options.controlIconsEnabled=!0,i.enable(t)),t.pi},disableControlIcons:function(){return t.options.controlIconsEnabled&&(t.options.controlIconsEnabled=!1,i.disable(t)),t.pi},isControlIconsEnabled:function(){return!!t.options.controlIconsEnabled},enableDblClickZoom:function(){return t.options.dblClickZoomEnabled=!0,t.pi},disableDblClickZoom:function(){return t.options.dblClickZoomEnabled=!1,t.pi},isDblClickZoomEnabled:function(){return!!t.options.dblClickZoomEnabled},enableMouseWheelZoom:function(){return t.enableMouseWheelZoom(),t.pi},disableMouseWheelZoom:function(){return t.disableMouseWheelZoom(),t.pi},isMouseWheelZoomEnabled:function(){return!!t.options.mouseWheelZoomEnabled},setZoomScaleSensitivity:function(e){return t.options.zoomScaleSensitivity=e,t.pi},setMinZoom:function(e){return t.options.minZoom=e,t.pi},setMaxZoom:function(e){return t.options.maxZoom=e,t.pi},setBeforeZoom:function(e){return t.options.beforeZoom=null===e?null:a.proxy(e,t.publicInstance),t.pi},setOnZoom:function(e){return t.options.onZoom=null===e?null:a.proxy(e,t.publicInstance),t.pi},zoom:function(e){return t.publicZoom(e,!0),t.pi},zoomBy:function(e){return t.publicZoom(e,!1),t.pi},zoomAtPoint:function(e,n){return t.publicZoomAtPoint(e,n,!0),t.pi},zoomAtPointBy:function(e,n){return t.publicZoomAtPoint(e,n,!1),t.pi},zoomIn:function(){return this.zoomBy(1+t.options.zoomScaleSensitivity),t.pi},zoomOut:function(){return this.zoomBy(1/(1+t.options.zoomScaleSensitivity)),t.pi},getZoom:function(){return t.getRelativeZoom()},setOnUpdatedCTM:function(e){return t.options.onUpdatedCTM=null===e?null:a.proxy(e,t.publicInstance),t.pi},resetZoom:function(){return t.resetZoom(),t.pi},resetPan:function(){return t.resetPan(),t.pi},reset:function(){return t.reset(),t.pi},fit:function(){return t.fit(),t.pi},contain:function(){return t.contain(),t.pi},center:function(){return t.center(),t.pi},updateBBox:function(){return t.updateBBox(),t.pi},resize:function(){return t.resize(),t.pi},getSizes:function(){return{width:t.width,height:t.height,realZoom:t.getZoom(),viewBox:t.viewport.getViewBox()}},destroy:function(){return t.destroy(),t.pi}}),this.publicInstance};var l=[];e.exports=function(t,e){var n=a.getSvg(t);if(null===n)return null;for(var r=l.length-1;r>=0;r--)if(l[r].svg===n)return l[r].instance.getPublicInstance();return l.push({svg:n,instance:new u(n,e)}),l[l.length-1].instance.getPublicInstance()}},{"./control-icons":2,"./shadow-viewport":3,"./svg-utilities":5,"./uniwheel":6,"./utilities":7}],5:[function(t,e,n){var r=t("./utilities"),i="unknown";document.documentMode&&(i="ie"),e.exports={svgNS:"http://www.w3.org/2000/svg",xmlNS:"http://www.w3.org/XML/1998/namespace",xmlnsNS:"http://www.w3.org/2000/xmlns/",xlinkNS:"http://www.w3.org/1999/xlink",evNS:"http://www.w3.org/2001/xml-events",getBoundingClientRectNormalized:function(t){if(t.clientWidth&&t.clientHeight)return{width:t.clientWidth,height:t.clientHeight};if(t.getBoundingClientRect())return t.getBoundingClientRect();throw new Error("Cannot get BoundingClientRect for SVG.")},getOrCreateViewport:function(t,e){var n=null;if(!(n=r.isElement(e)?e:t.querySelector(e))){var i=Array.prototype.slice.call(t.childNodes||t.children).filter((function(t){return"defs"!==t.nodeName&&"#text"!==t.nodeName}));1===i.length&&"g"===i[0].nodeName&&null===i[0].getAttribute("transform")&&(n=i[0])}if(!n){var a="viewport-"+(new Date).toISOString().replace(/\D/g,"");(n=document.createElementNS(this.svgNS,"g")).setAttribute("id",a);var o=t.childNodes||t.children;if(o&&o.length>0)for(var s=o.length;s>0;s--)"defs"!==o[o.length-s].nodeName&&n.appendChild(o[o.length-s]);t.appendChild(n)}var u=[];return n.getAttribute("class")&&(u=n.getAttribute("class").split(" ")),~u.indexOf("svg-pan-zoom_viewport")||(u.push("svg-pan-zoom_viewport"),n.setAttribute("class",u.join(" "))),n},setupSvgAttributes:function(t){if(t.setAttribute("xmlns",this.svgNS),t.setAttributeNS(this.xmlnsNS,"xmlns:xlink",this.xlinkNS),t.setAttributeNS(this.xmlnsNS,"xmlns:ev",this.evNS),null!==t.parentNode){var e=t.getAttribute("style")||"";-1===e.toLowerCase().indexOf("overflow")&&t.setAttribute("style","overflow: hidden; "+e)}},internetExplorerRedisplayInterval:300,refreshDefsGlobal:r.throttle((function(){for(var t=document.querySelectorAll("defs"),e=t.length,n=0;ne?(clearTimeout(s),s=null,u=l,a=t.apply(r,i),s||(r=i=null)):s||!1===n.trailing||(s=setTimeout(c,f)),a}},createRequestAnimationFrame:function(t){var e=null;return"auto"!==t&&t<60&&t>1&&(e=Math.floor(1e3/t)),null===e?window.requestAnimationFrame||r(33):r(e)}}},{}]},{},[1]),function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.mermaid=e():t.mermaid=e()}("undefined"!=typeof self?self:this,(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=354)}([function(t,e,n){"use strict";n.r(e);var r=function(t,e){return te?1:t>=e?0:NaN},i=function(t){var e;return 1===t.length&&(e=t,t=function(t,n){return r(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}}},a=i(r),o=a.right,s=a.left,u=o,c=function(t,e){null==e&&(e=l);for(var n=0,r=t.length-1,i=t[0],a=new Array(r<0?0:r);nt?1:e>=t?0:NaN},d=function(t){return null===t?NaN:+t},p=function(t,e){var n,r,i=t.length,a=0,o=-1,s=0,u=0;if(null==e)for(;++o1)return u/(a-1)},y=function(t,e){var n=p(t,e);return n?Math.sqrt(n):n},g=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>=k?10:a>=E?5:a>=S?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=k?10:a>=E?5:a>=S?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>=k?i*=10:a>=E?i*=5:a>=S&&(i*=2),ef;)h.pop(),--d;var p,y=new Array(d+1);for(i=0;i<=d;++i)(p=y[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)}},D=function(t,e,n){return t=b.call(t,d).sort(r),Math.ceil((n-e)/(2*(N(t,.75)-N(t,.25))*Math.pow(t.length,-1/3)))},L=function(t,e,n){return Math.ceil((n-e)/(3.5*y(t)*Math.pow(t.length,-1/3)))},F=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},P=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},B=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},j=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,i,a=0,o=0,s=t[o];for(null==e&&(e=r);++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 ut(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}mt.prototype={constructor:mt,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var _t="http://www.w3.org/1999/xhtml",wt={svg:"http://www.w3.org/2000/svg",xhtml:_t,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},kt=function(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),wt.hasOwnProperty(e)?{space:wt[e],local:t}:t};function Et(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 Tt(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Mt(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function Ct(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 Ot=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function Nt(t){return function(){this.style.removeProperty(t)}}function Dt(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)||Ot(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 Bt(t){return t.trim().split(/^|\s+/)}function jt(t){return t.classList||new zt(t)}function zt(t){this._node=t,this._names=Bt(t.getAttribute("class")||"")}function Yt(t,e){for(var n=jt(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}};var ne=function(t){var e=kt(t);return(e.local?ee:te)(e)};function re(){return null}function ie(){var t=this.parentNode;t&&t.removeChild(this)}function ae(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function oe(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}var se={},ue=null;function ce(t,e,n){return t=le(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function le(t,e,n){return function(r){var i=ue;ue=r;try{t.call(this,this.__data__,e,n)}finally{ue=i}}}function fe(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 he(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r=_&&(_=x+1);!(b=m[_])&&++_=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=xt);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a1?this.each((null==e?Nt:"function"==typeof e?Lt:Dt)(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=Bt(t+"");if(arguments.length<2){for(var r=jt(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?new qe(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?new qe(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=Fe.exec(t))?new qe(e[1],e[2],e[3],1):(e=Pe.exec(t))?new qe(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Ie.exec(t))?Ge(e[1],e[2],e[3],e[4]):(e=Re.exec(t))?Ge(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Be.exec(t))?Qe(e[1],e[2]/100,e[3]/100,1):(e=je.exec(t))?Qe(e[1],e[2]/100,e[3]/100,e[4]):ze.hasOwnProperty(t)?Ve(ze[t]):"transparent"===t?new qe(NaN,NaN,NaN,0):null}function Ve(t){return new qe(t>>16&255,t>>8&255,255&t,1)}function Ge(t,e,n,r){return r<=0&&(t=e=n=NaN),new qe(t,e,n,r)}function We(t){return t instanceof Ce||(t=$e(t)),t?new qe((t=t.rgb()).r,t.g,t.b,t.opacity):new qe}function He(t,e,n,r){return 1===arguments.length?We(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 Ze(){return"#"+Je(this.r)+Je(this.g)+Je(this.b)}function Xe(){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 Je(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Qe(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new en(t,e,n,r)}function Ke(t){if(t instanceof en)return new en(t.h,t.s,t.l,t.opacity);if(t instanceof Ce||(t=$e(t)),!t)return new en;if(t instanceof en)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,u=(a+i)/2;return s?(o=e===a?(n-r)/s+6*(n0&&u<1?0:o,new en(o,s,u,t.opacity)}function tn(t,e,n,r){return 1===arguments.length?Ke(t):new en(t,e,n,null==r?1:r)}function en(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function nn(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 rn(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}Te(Ce,$e,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Ye,formatHex:Ye,formatHsl:function(){return Ke(this).formatHsl()},formatRgb:Ue,toString:Ue}),Te(qe,He,Me(Ce,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new qe(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,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:Ze,formatHex:Ze,formatRgb:Xe,toString:Xe})),Te(en,tn,Me(Ce,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new en(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new en(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(nn(t>=240?t-240:t+120,i,r),nn(t,i,r),nn(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 an=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):sn(isNaN(t)?e:t)}function ln(t,e){var n=e-t;return n?un(t,n):sn(isNaN(t)?e:t)}var fn=function t(e){var n=function(t){return 1==(t=+t)?ln: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):sn(isNaN(e)?n:e)}}(e);function r(t,e){var r=n((t=He(t)).r,(e=He(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=ln(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 hn(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,u.push({i:o,x:wn(n,r)})),a=Sn.lastIndex;return a=0&&e._call.call(null,t),e=e._next;--Dn}function Gn(){In=(Pn=Bn.now())+Rn,Dn=Ln=0;try{Vn()}finally{Dn=0,function(){for(var t,e,n=bn,r=1/0;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:bn=e);xn=t,Hn(r)}(),In=0}}function Wn(){var t=Bn.now(),e=t-Pn;e>1e3&&(Rn-=e,Pn=t)}function Hn(t){Dn||(Ln&&(Ln=clearTimeout(Ln)),t-In>24?(t<1/0&&(Ln=setTimeout(Gn,t-Bn.now()-Rn)),Fn&&(Fn=clearInterval(Fn))):(Fn||(Pn=Bn.now(),Fn=setInterval(Wn,1e3)),Dn=1,jn(Gn)))}Un.prototype=$n.prototype={constructor:Un,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?zn():+n)+(null==e?0:+e),this._next||xn===this||(xn?xn._next=this:bn=this,xn=this),this._call=t,this._time=n,Hn()},stop:function(){this._call&&(this._call=null,this._time=1/0,Hn())}};var qn=function(t,e,n){var r=new Un;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r},Zn=lt("start","end","cancel","interrupt"),Xn=[],Jn=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(u){var c,l,f,h;if(1!==n.state)return s();for(c in i)if((h=i[c]).name===n.name){if(3===h.state)return qn(a);4===h.state?(h.state=6,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[c]):+c0)throw new Error("too late; already scheduled");return n}function Kn(t,e){var n=tr(t,e);if(n.state>3)throw new Error("too late; already running");return n}function tr(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}var er,nr,rr,ir,ar=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}},or=180/Math.PI,sr={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},ur=function(t,e,n,r,i,a){var o,s,u;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,u/=s),t*r180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:wn(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(a.rotate,o.rotate,s,u),function(t,e,n,a){t!==e?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:wn(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(a.skewX,o.skewX,s,u),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:wn(t,n)},{i:s-2,x:wn(e,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,u),a=o=null,function(t){for(var e,n=-1,r=u.length;++n=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?Qn:Kn;return function(){var o=a(this,t),s=o.on;s!==r&&(i=(r=s).copy()).on(e,n),o.on=i}}var Dr=_e.prototype.constructor;function Lr(t){return function(){this.style.removeProperty(t)}}function Fr(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function Pr(t,e,n){var r,i;function a(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&Fr(t,a,n)),r}return a._value=e,a}function Ir(t){return function(e){this.textContent=t.call(this,e)}}function Rr(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&Ir(r)),e}return r._value=t,r}var Br=0;function jr(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function zr(t){return _e().transition(t)}function Yr(){return++Br}var Ur=_e.prototype;function $r(t){return t*t*t}function Vr(t){return--t*t*t+1}function Gr(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}jr.prototype=zr.prototype={constructor:jr,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=ht(t));for(var r=this._groups,i=r.length,a=new Array(i),o=0;o1&&n.name===e)return new jr([[t]],qr,e,+r);return null},Xr=function(t){return function(){return t}},Jr=function(t,e,n){this.target=t,this.type=e,this.selection=n};function Qr(){ue.stopImmediatePropagation()}var Kr=function(){ue.preventDefault(),ue.stopImmediatePropagation()},ti={name:"drag"},ei={name:"space"},ni={name:"handle"},ri={name:"center"};function ii(t){return[+t[0],+t[1]]}function ai(t){return[ii(t[0]),ii(t[1])]}function oi(t){return function(e){return On(e,ue.touches,t)}}var si={name:"x",handles:["w","e"].map(yi),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]]}},ui={name:"y",handles:["n","s"].map(yi),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]]}},ci={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(yi),input:function(t){return null==t?null:ai(t)},output:function(t){return t}},li={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"},fi={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},hi={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},di={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},pi={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function yi(t){return{type:t}}function gi(){return!ue.ctrlKey&&!ue.button}function mi(){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 vi(){return navigator.maxTouchPoints||"ontouchstart"in this}function bi(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function xi(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function _i(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function wi(){return Si(si)}function ki(){return Si(ui)}var Ei=function(){return Si(ci)};function Si(t){var e,n=mi,r=gi,i=vi,a=!0,o=lt("start","brush","end"),s=6;function u(e){var n=e.property("__brush",y).selectAll(".overlay").data([yi("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",li.overlay).merge(n).each((function(){var t=bi(this).extent;we(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([yi("selection")]).enter().append("rect").attr("class","selection").attr("cursor",li.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 li[t.type]})),e.each(c).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 c(){var t=we(this),e=bi(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){return!n&&t.__brush.emitter||new f(t,e)}function f(t,e){this.that=t,this.args=e,this.state=t.__brush,this.active=0}function h(){if((!e||ue.touches)&&r.apply(this,arguments)){var n,i,o,s,u,f,h,d,p,y,g,m=this,v=ue.target.__data__.type,b="selection"===(a&&ue.metaKey?v="overlay":v)?ti:a&&ue.altKey?ri:ni,x=t===ui?null:di[v],_=t===si?null:pi[v],w=bi(m),k=w.extent,E=w.selection,S=k[0][0],A=k[0][1],T=k[1][0],M=k[1][1],C=0,O=0,N=x&&_&&a&&ue.shiftKey,D=ue.touches?oi(ue.changedTouches[0].identifier):Nn,L=D(m),F=L,P=l(m,arguments,!0).beforestart();"overlay"===v?(E&&(p=!0),w.selection=E=[[n=t===ui?S:L[0],o=t===si?A:L[1]],[u=t===ui?T:n,h=t===si?M:o]]):(n=E[0][0],o=E[0][1],u=E[1][0],h=E[1][1]),i=n,s=o,f=u,d=h;var I=we(m).attr("pointer-events","none"),R=I.selectAll(".overlay").attr("cursor",li[v]);if(ue.touches)P.moved=j,P.ended=Y;else{var B=we(ue.view).on("mousemove.brush",j,!0).on("mouseup.brush",Y,!0);a&&B.on("keydown.brush",U,!0).on("keyup.brush",$,!0),Se(ue.view)}Qr(),ar(m),c.call(m),P.start()}function j(){var t=D(m);!N||y||g||(Math.abs(t[0]-F[0])>Math.abs(t[1]-F[1])?g=!0:y=!0),F=t,p=!0,Kr(),z()}function z(){var t;switch(C=F[0]-L[0],O=F[1]-L[1],b){case ei:case ti:x&&(C=Math.max(S-n,Math.min(T-u,C)),i=n+C,f=u+C),_&&(O=Math.max(A-o,Math.min(M-h,O)),s=o+O,d=h+O);break;case ni:x<0?(C=Math.max(S-n,Math.min(T-n,C)),i=n+C,f=u):x>0&&(C=Math.max(S-u,Math.min(T-u,C)),i=n,f=u+C),_<0?(O=Math.max(A-o,Math.min(M-o,O)),s=o+O,d=h):_>0&&(O=Math.max(A-h,Math.min(M-h,O)),s=o,d=h+O);break;case ri:x&&(i=Math.max(S,Math.min(T,n-C*x)),f=Math.max(S,Math.min(T,u+C*x))),_&&(s=Math.max(A,Math.min(M,o-O*_)),d=Math.max(A,Math.min(M,h+O*_)))}f0&&(n=i-C),_<0?h=d-O:_>0&&(o=s-O),b=ei,R.attr("cursor",li.selection),z());break;default:return}Kr()}function $(){switch(ue.keyCode){case 16:N&&(y=g=N=!1,z());break;case 18:b===ri&&(x<0?u=f:x>0&&(n=i),_<0?h=d:_>0&&(o=s),b=ni,z());break;case 32:b===ei&&(ue.altKey?(x&&(u=f-C*x,n=i+C*x),_&&(h=d-O*_,o=s+O*_),b=ri):(x<0?u=f:x>0&&(n=i),_<0?h=d:_>0&&(o=s),b=ni),R.attr("cursor",li[v]),z());break;default:return}Kr()}}function d(){l(this,arguments).moved()}function p(){l(this,arguments).ended()}function y(){var e=this.__brush||{selection:null};return e.extent=ai(n.apply(this,arguments)),e.dim=t,e}return u.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=Tn(a,o);function u(t){r.selection=1===t&&null===o?null:s(t),c.call(e),i.brush()}return null!==a&&null!==o?u:u(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();ar(e),i.selection=null===a?null:a,c.call(e),o.start().brush().end()}))},u.clear=function(t){u.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){pe(new Jr(u,e,t.output(this.state.selection)),o.apply,o,[e,this.that,this.args])}},u.extent=function(t){return arguments.length?(n="function"==typeof t?t:Xr(ai(t)),u):n},u.filter=function(t){return arguments.length?(r="function"==typeof t?t:Xr(!!t),u):r},u.touchable=function(t){return arguments.length?(i="function"==typeof t?t:Xr(!!t),u):i},u.handleSize=function(t){return arguments.length?(s=+t,u):s},u.keyModifiers=function(t){return arguments.length?(a=!!t,u):a},u.on=function(){var t=o.on.apply(o,arguments);return t===o?u:t},u}var Ai=Math.cos,Ti=Math.sin,Mi=Math.PI,Ci=Mi/2,Oi=2*Mi,Ni=Math.max;function Di(t){return function(e,n){return t(e.source.value+e.target.value,n.source.value+n.target.value)}}var Li=function(){var t=0,e=null,n=null,r=null;function i(i){var a,o,s,u,c,l,f=i.length,h=[],d=w(f),p=[],y=[],g=y.groups=new Array(f),m=new Array(f*f);for(a=0,c=-1;++c1e-6)if(Math.abs(l*s-u*c)>1e-6&&i){var h=n-a,d=r-o,p=s*s+u*u,y=h*h+d*d,g=Math.sqrt(p),m=Math.sqrt(f),v=i*Math.tan((Ii-Math.acos((p+f-y)/(2*g*m)))/2),b=v/m,x=v/g;Math.abs(b-1)>1e-6&&(this._+="L"+(t+b*c)+","+(e+b*l)),this._+="A"+i+","+i+",0,0,"+ +(l*h>c*d)+","+(this._x1=t+x*s)+","+(this._y1=e+x*u)}else this._+="L"+(this._x1=t)+","+(this._y1=e)},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),u=t+o,c=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"+u+","+c:(Math.abs(this._x1-u)>1e-6||Math.abs(this._y1-c)>1e-6)&&(this._+="L"+u+","+c),n&&(f<0&&(f=f%Ri+Ri),f>Bi?this._+="A"+n+","+n+",0,1,"+l+","+(t-o)+","+(e-s)+"A"+n+","+n+",0,1,"+l+","+(this._x1=u)+","+(this._y1=c):f>1e-6&&(this._+="A"+n+","+n+",0,"+ +(f>=Ii)+","+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 Yi=zi;function Ui(t){return t.source}function $i(t){return t.target}function Vi(t){return t.radius}function Gi(t){return t.startAngle}function Wi(t){return t.endAngle}var Hi=function(){var t=Ui,e=$i,n=Vi,r=Gi,i=Wi,a=null;function o(){var o,s=Fi.call(arguments),u=t.apply(this,s),c=e.apply(this,s),l=+n.apply(this,(s[0]=u,s)),f=r.apply(this,s)-Ci,h=i.apply(this,s)-Ci,d=l*Ai(f),p=l*Ti(f),y=+n.apply(this,(s[0]=c,s)),g=r.apply(this,s)-Ci,m=i.apply(this,s)-Ci;if(a||(a=o=Yi()),a.moveTo(d,p),a.arc(0,0,l,f,h),f===g&&h===m||(a.quadraticCurveTo(0,0,y*Ai(g),y*Ti(g)),a.arc(0,0,y,g,m)),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:Pi(+t),o):n},o.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:Pi(+t),o):r},o.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:Pi(+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};function qi(){}function Zi(t,e){var n=new qi;if(t instanceof qi)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 u,c,l,f=-1,h=n.length,d=r[i++],p=Xi(),y=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,ta,ea),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 Qi(){return{}}function Ki(t,e,n){t[e]=n}function ta(){return Xi()}function ea(t,e,n){t.set(e,n)}function na(){}var ra=Xi.prototype;function ia(t,e){var n=new na;if(t instanceof na)t.each((function(t){n.add(t)}));else if(t){var r=-1,i=t.length;if(null==e)for(;++r6/29*(6/29)*(6/29)?Math.pow(t,1/3):t/(6/29*3*(6/29))+4/29}function ga(t){return t>6/29?t*t*t:6/29*3*(6/29)*(t-4/29)}function ma(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function va(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function ba(t){if(t instanceof wa)return new wa(t.h,t.c,t.l,t.opacity);if(t instanceof pa||(t=fa(t)),0===t.a&&0===t.b)return new wa(NaN,0r!=d>r&&n<(h-c)*(r-l)/(d-l)+c&&(i=-i)}return i}function Pa(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 Ia=function(){},Ra=[[],[[[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]]],[]],Ba=function(){var t=1,e=1,n=C,r=s;function i(t){var e=n(t);if(Array.isArray(e))e=e.slice().sort(Na);else{var r=g(t),i=r[0],o=r[1];e=M(i,o,e),e=w(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,u,c,l,f,h=new Array,d=new Array;for(a=s=-1,c=n[0]>=r,Ra[c<<1].forEach(p);++a=r,Ra[u|c<<1].forEach(p);for(Ra[c<<0].forEach(p);++s=r,l=n[s*t]>=r,Ra[c<<1|l<<2].forEach(p);++a=r,f=l,l=n[s*t+a+1]>=r,Ra[u|c<<1|l<<2|f<<3].forEach(p);Ra[c|l<<3].forEach(p)}for(a=-1,l=n[s*t]>=r,Ra[l<<2].forEach(p);++a=r,Ra[l<<2|f<<3].forEach(p);function p(t){var e,n,r=[t[0][0]+a,t[0][1]+s],u=[t[1][0]+a,t[1][1]+s],c=o(r),l=o(u);(e=d[c])?(n=h[l])?(delete d[e.end],delete h[n.start],e===n?(e.ring.push(u),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(u),d[e.end=l]=e):(e=h[l])?(n=d[c])?(delete h[e.start],delete d[n.end],e===n?(e.ring.push(u),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=c]=e):h[c]=d[l]={start:c,end:l,ring:[r,u]}}Ra[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)?Da(Oa.call(t)):Da(t),i):n},i.smooth=function(t){return arguments.length?(r=t?s:Ia,i):r===s},i};function ja(t,e,n){for(var r=t.width,i=t.height,a=1+(n<<1),o=0;o=n&&(s>=a&&(u-=t.data[s-a+o*r]),e.data[s-n+o*r]=u/Math.min(s+1,r-1+a-s,a))}function za(t,e,n){for(var r=t.width,i=t.height,a=1+(n<<1),o=0;o=n&&(s>=a&&(u-=t.data[o+(s-a)*r]),e.data[o+(s-n)*r]=u/Math.min(s+1,i-1+a-s,a))}function Ya(t){return t[0]}function Ua(t){return t[1]}function $a(){return 1}var Va=function(){var t=Ya,e=Ua,n=$a,r=960,i=500,a=20,o=2,s=3*a,u=r+2*s>>o,c=i+2*s>>o,l=Da(20);function f(r){var i=new Float32Array(u*c),f=new Float32Array(u*c);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),za({width:u,height:c,data:f},{width:u,height:c,data:i},a>>o),ja({width:u,height:c,data:i},{width:u,height:c,data:f},a>>o),za({width:u,height:c,data:f},{width:u,height:c,data:i},a>>o),ja({width:u,height:c,data:i},{width:u,height:c,data:f},a>>o),za({width:u,height:c,data:f},{width:u,height:c,data:i},a>>o);var d=l(i);if(!Array.isArray(d)){var p=F(i);d=M(0,p,d),(d=w(0,Math.floor(p/d)*d,d)).shift()}return Ba().thresholds(d).size([u,c])(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(y)}function y(t){t[0]=t[0]*Math.pow(2,o)-s,t[1]=t[1]*Math.pow(2,o)-s}function g(){return u=r+2*(s=3*a)>>o,c=i+2*s>>o,f}return f.x=function(e){return arguments.length?(t="function"==typeof e?e:Da(+e),f):t},f.y=function(t){return arguments.length?(e="function"==typeof t?t:Da(+t),f):e},f.weight=function(t){return arguments.length?(n="function"==typeof t?t:Da(+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,g()},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),g()},f.thresholds=function(t){return arguments.length?(l="function"==typeof t?t:Array.isArray(t)?Da(Oa.call(t)):Da(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),g()},f},Ga=function(t){return function(){return t}};function Wa(t,e,n,r,i,a,o,s,u,c){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=u,this._=c}function Ha(){return!ue.ctrlKey&&!ue.button}function qa(){return this.parentNode}function Za(t){return null==t?{x:ue.x,y:ue.y}:t}function Xa(){return navigator.maxTouchPoints||"ontouchstart"in this}Wa.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var Ja=function(){var t,e,n,r,i=Ha,a=qa,o=Za,s=Xa,u={},c=lt("start","drag","end"),l=0,f=0;function h(t){t.on("mousedown.drag",d).filter(s).on("touchstart.drag",g).on("touchmove.drag",m).on("touchend.drag touchcancel.drag",v).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),Nn,this,arguments);o&&(we(ue.view).on("mousemove.drag",p,!0).on("mouseup.drag",y,!0),Se(ue.view),ke(),n=!1,t=ue.clientX,e=ue.clientY,o("start"))}}function p(){if(Ee(),!n){var r=ue.clientX-t,i=ue.clientY-e;n=r*r+i*i>f}u.mouse("drag")}function y(){we(ue.view).on("mousemove.drag mouseup.drag",null),Ae(ue.view,n),Ee(),u.mouse("end")}function g(){if(i.apply(this,arguments)){var t,e,n=ue.changedTouches,r=a.apply(this,arguments),o=n.length;for(t=0;t=a?u=!0:10===(r=t.charCodeAt(o++))?c=!0:13===r&&(c=!0,10===t.charCodeAt(o)&&++o),t.slice(i+1,e-1).replace(/""/g,'"')}for(;o9999?"+"+no(e,6):no(e,4))+"-"+no(t.getUTCMonth()+1,2)+"-"+no(t.getUTCDate(),2)+(a?"T"+no(n,2)+":"+no(r,2)+":"+no(i,2)+"."+no(a,3)+"Z":i?"T"+no(n,2)+":"+no(r,2)+":"+no(i,2)+"Z":r||n?"T"+no(n,2)+":"+no(r,2)+"Z":"")}(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,e){var n,i,a=r(t,(function(t,r){if(n)return n(t,r-1);i=t,n=e?function(t,e){var n=to(t);return function(r,i){return e(n(r),i,t)}}(t,e):to(t)}));return a.columns=i||[],a},parseRows:r,format:function(e,n){return null==n&&(n=eo(e)),[n.map(o).join(t)].concat(i(e,n)).join("\n")},formatBody:function(t,e){return null==e&&(e=eo(t)),i(t,e).join("\n")},formatRows:function(t){return t.map(a).join("\n")},formatRow:a,formatValue:o}},io=ro(","),ao=io.parse,oo=io.parseRows,so=io.format,uo=io.formatBody,co=io.formatRows,lo=io.formatRow,fo=io.formatValue,ho=ro("\t"),po=ho.parse,yo=ho.parseRows,go=ho.format,mo=ho.formatBody,vo=ho.formatRows,bo=ho.formatRow,xo=ho.formatValue;function _o(t){for(var e in t){var n,r,i=t[e].trim();if(i)if("true"===i)i=!0;else if("false"===i)i=!1;else if("NaN"===i)i=NaN;else if(isNaN(n=+i)){if(!(r=i.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)))continue;wo&&r[4]&&!r[7]&&(i=i.replace(/-/g,"/").replace(/T/," ")),i=new Date(i)}else i=n;else i=null;t[e]=i}return t}var wo=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();function ko(t){return+t}function Eo(t){return t*t}function So(t){return t*(2-t)}function Ao(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}var To=function t(e){function n(t){return Math.pow(t,e)}return e=+e,n.exponent=t,n}(3),Mo=function t(e){function n(t){return 1-Math.pow(1-t,e)}return e=+e,n.exponent=t,n}(3),Co=function t(e){function n(t){return((t*=2)<=1?Math.pow(t,e):2-Math.pow(2-t,e))/2}return e=+e,n.exponent=t,n}(3),Oo=Math.PI,No=Oo/2;function Do(t){return 1-Math.cos(t*No)}function Lo(t){return Math.sin(t*No)}function Fo(t){return(1-Math.cos(Oo*t))/2}function Po(t){return Math.pow(2,10*t-10)}function Io(t){return 1-Math.pow(2,-10*t)}function Ro(t){return((t*=2)<=1?Math.pow(2,10*t-10):2-Math.pow(2,10-10*t))/2}function Bo(t){return 1-Math.sqrt(1-t*t)}function jo(t){return Math.sqrt(1- --t*t)}function zo(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}function Yo(t){return 1-Uo(1-t)}function Uo(t){return(t=+t)<4/11?7.5625*t*t:t<8/11?7.5625*(t-=6/11)*t+.75:t<10/11?7.5625*(t-=9/11)*t+.9375:7.5625*(t-=21/22)*t+63/64}function $o(t){return((t*=2)<=1?1-Uo(1-t):Uo(t-1)+1)/2}var Vo=function t(e){function n(t){return t*t*((e+1)*t-e)}return e=+e,n.overshoot=t,n}(1.70158),Go=function t(e){function n(t){return--t*t*((e+1)*t+e)+1}return e=+e,n.overshoot=t,n}(1.70158),Wo=function t(e){function n(t){return((t*=2)<1?t*t*((e+1)*t-e):(t-=2)*t*((e+1)*t+e)+2)/2}return e=+e,n.overshoot=t,n}(1.70158),Ho=2*Math.PI,qo=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Ho);function i(t){return e*Math.pow(2,10*--t)*Math.sin((r-t)/n)}return i.amplitude=function(e){return t(e,n*Ho)},i.period=function(n){return t(e,n)},i}(1,.3),Zo=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Ho);function i(t){return 1-e*Math.pow(2,-10*(t=+t))*Math.sin((t+r)/n)}return i.amplitude=function(e){return t(e,n*Ho)},i.period=function(n){return t(e,n)},i}(1,.3),Xo=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Ho);function i(t){return((t=2*t-1)<0?e*Math.pow(2,10*t)*Math.sin((r-t)/n):2-e*Math.pow(2,-10*t)*Math.sin((r+t)/n))/2}return i.amplitude=function(e){return t(e,n*Ho)},i.period=function(n){return t(e,n)},i}(1,.3);function Jo(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.blob()}var Qo=function(t,e){return fetch(t,e).then(Jo)};function Ko(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.arrayBuffer()}var ts=function(t,e){return fetch(t,e).then(Ko)};function es(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}var ns=function(t,e){return fetch(t,e).then(es)};function rs(t){return function(e,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=void 0),ns(e,n).then((function(e){return t(e,r)}))}}function is(t,e,n,r){3===arguments.length&&"function"==typeof n&&(r=n,n=void 0);var i=ro(t);return ns(e,n).then((function(t){return i.parse(t,r)}))}var as=rs(ao),os=rs(po),ss=function(t,e){return new Promise((function(n,r){var i=new Image;for(var a in e)i[a]=e[a];i.onerror=r,i.onload=function(){n(i)},i.src=t}))};function us(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.json()}var cs=function(t,e){return fetch(t,e).then(us)};function ls(t){return function(e,n){return ns(e,n).then((function(e){return(new DOMParser).parseFromString(e,t)}))}}var fs=ls("application/xml"),hs=ls("text/html"),ds=ls("image/svg+xml"),ps=function(t,e){var n;function r(){var r,i,a=n.length,o=0,s=0;for(r=0;r=(a=(y+m)/2))?y=a:m=a,(l=n>=(o=(g+v)/2))?g=o:v=o,i=d,!(d=d[f=l<<1|c]))return i[f]=p,t;if(s=+t._x.call(null,d.data),u=+t._y.call(null,d.data),e===s&&n===u)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),(c=e>=(a=(y+m)/2))?y=a:m=a,(l=n>=(o=(g+v)/2))?g=o:v=o}while((f=l<<1|c)==(h=(u>=o)<<1|s>=a));return i[h]=d,i[f]=p,t}var vs=function(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i};function bs(t){return t[0]}function xs(t){return t[1]}function _s(t,e,n){var r=new ws(null==e?bs:e,null==n?xs:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function ws(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 ks(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var Es=_s.prototype=ws.prototype;function Ss(t){return t.x+t.vx}function As(t){return t.y+t.vy}Es.copy=function(){var t,e,n=new ws(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=ks(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]=ks(e));return n},Es.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return ms(this.cover(e,n),e,n,t)},Es.addAll=function(t){var e,n,r,i,a=t.length,o=new Array(a),s=new Array(a),u=1/0,c=1/0,l=-1/0,f=-1/0;for(n=0;nl&&(l=r),if&&(f=i));if(u>l||c>f)return this;for(this.cover(u,c).cover(l,f),n=0;nt||t>=i||r>e||e>=a;)switch(s=(eh||(a=u.y0)>d||(o=u.x1)=m)<<1|t>=g)&&(u=p[p.length-1],p[p.length-1]=p[p.length-1-c],p[p.length-1-c]=u)}else{var v=t-+this._x.call(null,y.data),b=e-+this._y.call(null,y.data),x=v*v+b*b;if(x=(s=(p+g)/2))?p=s:g=s,(l=o>=(u=(y+m)/2))?y=u:m=u,e=d,!(d=d[f=l<<1|c]))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)},Es.removeAll=function(t){for(var e=0,n=t.length;eu+d||ic+d||as.index){var p=u-o.x-o.vx,y=c-o.y-o.vy,g=p*p+y*y;gt.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,u,c=0,l=t.length;for(null==r?r=1/0:r*=r,c=0;c1?(c.on(t,n),e):c.on(t)}}},Ps=function(){var t,e,n,r,i=ys(-30),a=1,o=1/0,s=.81;function u(r){var i,a=t.length,o=_s(t,Ns,Ds).visitAfter(l);for(n=r,i=0;i=o)){(t.data!==e||t.next)&&(0===l&&(d+=(l=gs())*l),0===f&&(d+=(f=gs())*f),d1?r[0]+r.slice(2):r,+t.slice(n+1)]},zs=function(t){return(t=js(Math.abs(t)))?t[1]:NaN},Ys=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Us(t){if(!(e=Ys.exec(t)))throw new Error("invalid format: "+t);var e;return new $s({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 $s(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+""}Us.prototype=$s.prototype,$s.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 Vs,Gs,Ws,Hs,qs=function(t,e){var n=js(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")},Zs={"%":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.round(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 qs(100*t,e)},r:qs,s:function(t,e){var n=js(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(Vs=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")+js(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)}},Xs=function(t){return t},Js=Array.prototype.map,Qs=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"],Ks=function(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?Xs:(e=Js.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,a=[],o=0,s=e[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),a.push(t.substring(i-=s,i+s)),!((u+=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?Xs:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(Js.call(t.numerals,String)),u=void 0===t.percent?"%":t.percent+"",c=void 0===t.minus?"-":t.minus+"",l=void 0===t.nan?"NaN":t.nan+"";function f(t){var e=(t=Us(t)).fill,n=t.align,f=t.sign,h=t.symbol,d=t.zero,p=t.width,y=t.comma,g=t.precision,m=t.trim,v=t.type;"n"===v?(y=!0,v="g"):Zs[v]||(void 0===g&&(g=12),m=!0,v="g"),(d||"0"===e&&"="===n)&&(d=!0,e="0",n="=");var b="$"===h?i:"#"===h&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",x="$"===h?a:/[%p]/.test(v)?u:"",_=Zs[v],w=/[defgprs%]/.test(v);function k(t){var i,a,u,h=b,k=x;if("c"===v)k=_(t)+k,t="";else{var E=(t=+t)<0;if(t=isNaN(t)?l:_(Math.abs(t),g),m&&(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)),E&&0==+t&&(E=!1),h=(E?"("===f?f:c:"-"===f||"("===f?"":f)+h,k=("s"===v?Qs[8+Vs/3]:"")+k+(E&&"("===f?")":""),w)for(i=-1,a=t.length;++i(u=t.charCodeAt(i))||u>57){k=(46===u?o+t.slice(i+1):t.slice(i))+k,t=t.slice(0,i);break}}y&&!d&&(t=r(t,1/0));var S=h.length+t.length+k.length,A=S>1)+h+t+k+A.slice(S);break;default:t=A+h+t+k}return s(t)}return g=void 0===g?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),k.toString=function(){return t+""},k}return{format:f,formatPrefix:function(t,e){var n=f(((t=Us(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(zs(e)/3))),i=Math.pow(10,-r),a=Qs[8+r/3];return function(t){return n(i*t)+a}}}};function tu(t){return Gs=Ks(t),Ws=Gs.format,Hs=Gs.formatPrefix,Gs}tu({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});var eu=function(t){return Math.max(0,-zs(Math.abs(t)))},nu=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(zs(e)/3)))-zs(Math.abs(t)))},ru=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,zs(e)-zs(t))+1},iu=function(){return new au};function au(){this.reset()}au.prototype={constructor:au,reset:function(){this.s=this.t=0},add:function(t){su(ou,t,this.t),su(this,ou.s,this.s),this.s?this.t+=ou.t:this.s=ou.t},valueOf:function(){return this.s}};var ou=new au;function su(t,e,n){var r=t.s=e+n,i=r-e,a=r-i;t.t=e-a+(n-i)}var uu=Math.PI,cu=uu/2,lu=uu/4,fu=2*uu,hu=180/uu,du=uu/180,pu=Math.abs,yu=Math.atan,gu=Math.atan2,mu=Math.cos,vu=Math.ceil,bu=Math.exp,xu=(Math.floor,Math.log),_u=Math.pow,wu=Math.sin,ku=Math.sign||function(t){return t>0?1:t<0?-1:0},Eu=Math.sqrt,Su=Math.tan;function Au(t){return t>1?0:t<-1?uu:Math.acos(t)}function Tu(t){return t>1?cu:t<-1?-cu:Math.asin(t)}function Mu(t){return(t=wu(t/2))*t}function Cu(){}function Ou(t,e){t&&Du.hasOwnProperty(t.type)&&Du[t.type](t,e)}var Nu={Feature:function(t,e){Ou(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=mu(e=(e*=du)/2+lu),o=wu(e),s=ju*o,u=Bu*a+s*mu(i),c=s*r*wu(i);Yu.add(gu(c,u)),Ru=t,Bu=a,ju=o}var qu=function(t){return Uu.reset(),zu(t,$u),2*Uu};function Zu(t){return[gu(t[1],t[0]),Tu(t[2])]}function Xu(t){var e=t[0],n=t[1],r=mu(n);return[r*mu(e),r*wu(e),wu(n)]}function Ju(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Qu(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 tc(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function ec(t){var e=Eu(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var nc,rc,ic,ac,oc,sc,uc,cc,lc,fc,hc=iu(),dc={point:pc,lineStart:gc,lineEnd:mc,polygonStart:function(){dc.point=vc,dc.lineStart=bc,dc.lineEnd=xc,hc.reset(),$u.polygonStart()},polygonEnd:function(){$u.polygonEnd(),dc.point=pc,dc.lineStart=gc,dc.lineEnd=mc,Yu<0?(nc=-(ic=180),rc=-(ac=90)):hc>1e-6?ac=90:hc<-1e-6&&(rc=-90),fc[0]=nc,fc[1]=ic},sphere:function(){nc=-(ic=180),rc=-(ac=90)}};function pc(t,e){lc.push(fc=[nc=t,ic=t]),eac&&(ac=e)}function yc(t,e){var n=Xu([t*du,e*du]);if(cc){var r=Qu(cc,n),i=Qu([r[1],-r[0],0],r);ec(i),i=Zu(i);var a,o=t-oc,s=o>0?1:-1,u=i[0]*hu*s,c=pu(o)>180;c^(s*ocac&&(ac=a):c^(s*oc<(u=(u+360)%360-180)&&uac&&(ac=e)),c?t_c(nc,ic)&&(ic=t):_c(t,ic)>_c(nc,ic)&&(nc=t):ic>=nc?(tic&&(ic=t)):t>oc?_c(nc,t)>_c(nc,ic)&&(ic=t):_c(t,ic)>_c(nc,ic)&&(nc=t)}else lc.push(fc=[nc=t,ic=t]);eac&&(ac=e),cc=n,oc=t}function gc(){dc.point=yc}function mc(){fc[0]=nc,fc[1]=ic,dc.point=pc,cc=null}function vc(t,e){if(cc){var n=t-oc;hc.add(pu(n)>180?n+(n>0?360:-360):n)}else sc=t,uc=e;$u.point(t,e),yc(t,e)}function bc(){$u.lineStart()}function xc(){vc(sc,uc),$u.lineEnd(),pu(hc)>1e-6&&(nc=-(ic=180)),fc[0]=nc,fc[1]=ic,cc=null}function _c(t,e){return(e-=t)<0?e+360:e}function wc(t,e){return t[0]-e[0]}function kc(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e_c(r[0],r[1])&&(r[1]=i[1]),_c(i[0],r[1])>_c(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=_c(r[1],i[0]))>o&&(o=s,nc=i[0],ic=r[1])}return lc=fc=null,nc===1/0||rc===1/0?[[NaN,NaN],[NaN,NaN]]:[[nc,rc],[ic,ac]]},Yc={sphere:Cu,point:Uc,lineStart:Vc,lineEnd:Hc,polygonStart:function(){Yc.lineStart=qc,Yc.lineEnd=Zc},polygonEnd:function(){Yc.lineStart=Vc,Yc.lineEnd=Hc}};function Uc(t,e){t*=du;var n=mu(e*=du);$c(n*mu(t),n*wu(t),wu(e))}function $c(t,e,n){++Ec,Ac+=(t-Ac)/Ec,Tc+=(e-Tc)/Ec,Mc+=(n-Mc)/Ec}function Vc(){Yc.point=Gc}function Gc(t,e){t*=du;var n=mu(e*=du);Rc=n*mu(t),Bc=n*wu(t),jc=wu(e),Yc.point=Wc,$c(Rc,Bc,jc)}function Wc(t,e){t*=du;var n=mu(e*=du),r=n*mu(t),i=n*wu(t),a=wu(e),o=gu(Eu((o=Bc*a-jc*i)*o+(o=jc*r-Rc*a)*o+(o=Rc*i-Bc*r)*o),Rc*r+Bc*i+jc*a);Sc+=o,Cc+=o*(Rc+(Rc=r)),Oc+=o*(Bc+(Bc=i)),Nc+=o*(jc+(jc=a)),$c(Rc,Bc,jc)}function Hc(){Yc.point=Uc}function qc(){Yc.point=Xc}function Zc(){Jc(Pc,Ic),Yc.point=Uc}function Xc(t,e){Pc=t,Ic=e,t*=du,e*=du,Yc.point=Jc;var n=mu(e);Rc=n*mu(t),Bc=n*wu(t),jc=wu(e),$c(Rc,Bc,jc)}function Jc(t,e){t*=du;var n=mu(e*=du),r=n*mu(t),i=n*wu(t),a=wu(e),o=Bc*a-jc*i,s=jc*r-Rc*a,u=Rc*i-Bc*r,c=Eu(o*o+s*s+u*u),l=Tu(c),f=c&&-l/c;Dc+=f*o,Lc+=f*s,Fc+=f*u,Sc+=l,Cc+=l*(Rc+(Rc=r)),Oc+=l*(Bc+(Bc=i)),Nc+=l*(jc+(jc=a)),$c(Rc,Bc,jc)}var Qc=function(t){Ec=Sc=Ac=Tc=Mc=Cc=Oc=Nc=Dc=Lc=Fc=0,zu(t,Yc);var e=Dc,n=Lc,r=Fc,i=e*e+n*n+r*r;return i<1e-12&&(e=Cc,n=Oc,r=Nc,Sc<1e-6&&(e=Ac,n=Tc,r=Mc),(i=e*e+n*n+r*r)<1e-12)?[NaN,NaN]:[gu(n,e)*hu,Tu(r/Eu(i))*hu]},Kc=function(t){return function(){return t}},tl=function(t,e){function n(n,r){return n=t(n,r),e(n[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,r){return(n=e.invert(n,r))&&t.invert(n[0],n[1])}),n};function el(t,e){return[pu(t)>uu?t+Math.round(-t/fu)*fu:t,e]}function nl(t,e,n){return(t%=fu)?e||n?tl(il(t),al(e,n)):il(t):e||n?al(e,n):el}function rl(t){return function(e,n){return[(e+=t)>uu?e-fu:e<-uu?e+fu:e,n]}}function il(t){var e=rl(t);return e.invert=rl(-t),e}function al(t,e){var n=mu(t),r=wu(t),i=mu(e),a=wu(e);function o(t,e){var o=mu(e),s=mu(t)*o,u=wu(t)*o,c=wu(e),l=c*n+s*r;return[gu(u*i-l*a,s*n-c*r),Tu(l*i+u*a)]}return o.invert=function(t,e){var o=mu(e),s=mu(t)*o,u=wu(t)*o,c=wu(e),l=c*i-u*a;return[gu(u*i+c*a,s*n+l*r),Tu(l*n-s*r)]},o}el.invert=el;var ol=function(t){function e(e){return(e=t(e[0]*du,e[1]*du))[0]*=hu,e[1]*=hu,e}return t=nl(t[0]*du,t[1]*du,t.length>2?t[2]*du:0),e.invert=function(e){return(e=t.invert(e[0]*du,e[1]*du))[0]*=hu,e[1]*=hu,e},e};function sl(t,e,n,r,i,a){if(n){var o=mu(e),s=wu(e),u=r*n;null==i?(i=e+r*fu,a=e-u/2):(i=ul(o,i),a=ul(o,a),(r>0?ia)&&(i+=r*fu));for(var c,l=i;r>0?l>a:l1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}},fl=function(t,e){return pu(t[0]-e[0])<1e-6&&pu(t[1]-e[1])<1e-6};function hl(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}var dl=function(t,e,n,r,i){var a,o,s=[],u=[];if(t.forEach((function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],o=t[e];if(fl(r,o)){for(i.lineStart(),a=0;a=0;--a)i.point((l=c[a])[0],l[1]);else r(h.x,h.p.x,-1,i);h=h.p}c=(h=h.o).z,d=!d}while(!h.v);i.lineEnd()}}};function pl(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r=0?1:-1,S=E*k,A=S>uu,T=y*_;if(yl.add(gu(T*E*wu(S),g*w+T*mu(S))),o+=A?k+E*fu:k,A^d>=n^b>=n){var M=Qu(Xu(h),Xu(v));ec(M);var C=Qu(a,M);ec(C);var O=(A^k>=0?-1:1)*Tu(C[2]);(r>O||r===O&&(M[0]||M[1]))&&(s+=A^k>=0?1:-1)}}return(o<-1e-6||o<1e-6&&yl<-1e-6)^1&s},vl=function(t,e,n,r){return function(i){var a,o,s,u=e(i),c=ll(),l=e(c),f=!1,h={point:d,lineStart:y,lineEnd:g,polygonStart:function(){h.point=m,h.lineStart=v,h.lineEnd=b,o=[],a=[]},polygonEnd:function(){h.point=d,h.lineStart=y,h.lineEnd=g,o=R(o);var t=ml(a,r);o.length?(f||(i.polygonStart(),f=!0),dl(o,xl,t,n,i)):t&&(f||(i.polygonStart(),f=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),f&&(i.polygonEnd(),f=!1),o=a=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function d(e,n){t(e,n)&&i.point(e,n)}function p(t,e){u.point(t,e)}function y(){h.point=p,u.lineStart()}function g(){h.point=d,u.lineEnd()}function m(t,e){s.push([t,e]),l.point(t,e)}function v(){l.lineStart(),s=[]}function b(){m(s[0][0],s[0][1]),l.lineEnd();var t,e,n,r,u=l.clean(),h=c.result(),d=h.length;if(s.pop(),a.push(s),s=null,d)if(1&u){if((e=(n=h[0]).length-1)>0){for(f||(i.polygonStart(),f=!0),i.lineStart(),t=0;t1&&2&u&&h.push(h.pop().concat(h.shift())),o.push(h.filter(bl))}return h}};function bl(t){return t.length>1}function xl(t,e){return((t=t.x)[0]<0?t[1]-cu-1e-6:cu-t[1])-((e=e.x)[0]<0?e[1]-cu-1e-6:cu-e[1])}var _l=vl((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?uu:-uu,u=pu(a-n);pu(u-uu)<1e-6?(t.point(n,r=(r+o)/2>0?cu:-cu),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),t.point(a,r),e=0):i!==s&&u>=uu&&(pu(n-i)<1e-6&&(n-=1e-6*i),pu(a-s)<1e-6&&(a-=1e-6*s),r=function(t,e,n,r){var i,a,o=wu(t-n);return pu(o)>1e-6?yu((wu(e)*(a=mu(r))*wu(n)-wu(r)*(i=mu(e))*wu(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*cu,r.point(-uu,i),r.point(0,i),r.point(uu,i),r.point(uu,0),r.point(uu,-i),r.point(0,-i),r.point(-uu,-i),r.point(-uu,0),r.point(-uu,i);else if(pu(t[0]-e[0])>1e-6){var a=t[0]0,i=pu(e)>1e-6;function a(t,n){return mu(t)*mu(n)>e}function o(t,n,r){var i=[1,0,0],a=Qu(Xu(t),Xu(n)),o=Ju(a,a),s=a[0],u=o-s*s;if(!u)return!r&&t;var c=e*o/u,l=-e*s/u,f=Qu(i,a),h=tc(i,c);Ku(h,tc(a,l));var d=f,p=Ju(h,d),y=Ju(d,d),g=p*p-y*(Ju(h,h)-1);if(!(g<0)){var m=Eu(g),v=tc(d,(-p-m)/y);if(Ku(v,h),v=Zu(v),!r)return v;var b,x=t[0],_=n[0],w=t[1],k=n[1];_0^v[1]<(pu(v[0]-x)<1e-6?w:k):w<=v[1]&&v[1]<=k:E>uu^(x<=v[0]&&v[0]<=_)){var A=tc(d,(-p+m)/y);return Ku(A,h),[v,Zu(A)]}}}function s(e,n){var i=r?t:uu-t,a=0;return e<-i?a|=1:e>i&&(a|=2),n<-i?a|=4:n>i&&(a|=8),a}return vl(a,(function(t){var e,n,u,c,l;return{lineStart:function(){c=u=!1,l=1},point:function(f,h){var d,p=[f,h],y=a(f,h),g=r?y?0:s(f,h):y?s(f+(f<0?uu:-uu),h):0;if(!e&&(c=u=y)&&t.lineStart(),y!==u&&(!(d=o(e,p))||fl(e,d)||fl(p,d))&&(p[0]+=1e-6,p[1]+=1e-6,y=a(p[0],p[1])),y!==u)l=0,y?(t.lineStart(),d=o(p,e),t.point(d[0],d[1])):(d=o(e,p),t.point(d[0],d[1]),t.lineEnd()),e=d;else if(i&&e&&r^y){var m;g&n||!(m=o(p,e,!0))||(l=0,r?(t.lineStart(),t.point(m[0][0],m[0][1]),t.point(m[1][0],m[1][1]),t.lineEnd()):(t.point(m[1][0],m[1][1]),t.lineEnd(),t.lineStart(),t.point(m[0][0],m[0][1])))}!y||e&&fl(e,p)||t.point(p[0],p[1]),e=p,u=y,n=g},lineEnd:function(){u&&t.lineEnd(),e=null},clean:function(){return l|(c&&u)<<1}}}),(function(e,r,i,a){sl(a,t,n,i,e,r)}),r?[0,-t]:[-uu,t-uu])};function kl(t,e,n,r){function i(i,a){return t<=i&&i<=n&&e<=a&&a<=r}function a(i,a,s,c){var l=0,f=0;if(null==i||(l=o(i,s))!==(f=o(a,s))||u(i,a)<0^s>0)do{c.point(0===l||3===l?t:n,l>1?r:e)}while((l=(l+s+4)%4)!==f);else c.point(a[0],a[1])}function o(r,i){return pu(r[0]-t)<1e-6?i>0?0:3:pu(r[0]-n)<1e-6?i>0?2:1:pu(r[1]-e)<1e-6?i>0?1:0:i>0?3:2}function s(t,e){return u(t.x,e.x)}function u(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 u,c,l,f,h,d,p,y,g,m,v,b=o,x=ll(),_={point:w,lineStart:function(){_.point=k,c&&c.push(l=[]),m=!0,g=!1,p=y=NaN},lineEnd:function(){u&&(k(f,h),d&&g&&x.rejoin(),u.push(x.result())),_.point=w,g&&b.lineEnd()},polygonStart:function(){b=x,u=[],c=[],v=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,i=c.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=v&&e,i=(u=R(u)).length;(n||i)&&(o.polygonStart(),n&&(o.lineStart(),a(null,null,1,o),o.lineEnd()),i&&dl(u,s,e,a,o),o.polygonEnd()),b=o,u=c=l=null}};function w(t,e){i(t,e)&&b.point(t,e)}function k(a,o){var s=i(a,o);if(c&&l.push([a,o]),m)f=a,h=o,d=s,m=!1,s&&(b.lineStart(),b.point(a,o));else if(s&&g)b.point(a,o);else{var u=[p=Math.max(-1e9,Math.min(1e9,p)),y=Math.max(-1e9,Math.min(1e9,y))],x=[a=Math.max(-1e9,Math.min(1e9,a)),o=Math.max(-1e9,Math.min(1e9,o))];!function(t,e,n,r,i,a){var o,s=t[0],u=t[1],c=0,l=1,f=e[0]-s,h=e[1]-u;if(o=n-s,f||!(o>0)){if(o/=f,f<0){if(o0){if(o>l)return;o>c&&(c=o)}if(o=i-s,f||!(o<0)){if(o/=f,f<0){if(o>l)return;o>c&&(c=o)}else if(f>0){if(o0)){if(o/=h,h<0){if(o0){if(o>l)return;o>c&&(c=o)}if(o=a-u,h||!(o<0)){if(o/=h,h<0){if(o>l)return;o>c&&(c=o)}else if(h>0){if(o0&&(t[0]=s+c*f,t[1]=u+c*h),l<1&&(e[0]=s+l*f,e[1]=u+l*h),!0}}}}}(u,x,t,e,n,r)?s&&(b.lineStart(),b.point(a,o),v=!1):(g||(b.lineStart(),b.point(u[0],u[1])),b.point(x[0],x[1]),s||b.lineEnd(),v=!1)}p=a,y=o,g=s}return _}}var El,Sl,Al,Tl=function(){var t,e,n,r=0,i=0,a=960,o=500;return n={stream:function(n){return t&&e===n?t:t=kl(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]]}}},Ml=iu(),Cl={sphere:Cu,point:Cu,lineStart:function(){Cl.point=Nl,Cl.lineEnd=Ol},lineEnd:Cu,polygonStart:Cu,polygonEnd:Cu};function Ol(){Cl.point=Cl.lineEnd=Cu}function Nl(t,e){El=t*=du,Sl=wu(e*=du),Al=mu(e),Cl.point=Dl}function Dl(t,e){t*=du;var n=wu(e*=du),r=mu(e),i=pu(t-El),a=mu(i),o=r*wu(i),s=Al*n-Sl*r*a,u=Sl*n+Al*r*a;Ml.add(gu(Eu(o*o+s*s),u)),El=t,Sl=n,Al=r}var Ll=function(t){return Ml.reset(),zu(t,Cl),+Ml},Fl=[null,null],Pl={type:"LineString",coordinates:Fl},Il=function(t,e){return Fl[0]=t,Fl[1]=e,Ll(Pl)},Rl={Feature:function(t,e){return jl(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r0&&(i=Il(t[a],t[a-1]))>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))<1e-12*i)return!0;n=r}return!1}function Ul(t,e){return!!ml(t.map($l),Vl(e))}function $l(t){return(t=t.map(Vl)).pop(),t}function Vl(t){return[t[0]*du,t[1]*du]}var Gl=function(t,e){return(t&&Rl.hasOwnProperty(t.type)?Rl[t.type]:jl)(t,e)};function Wl(t,e,n){var r=w(t,e-1e-6,n).concat(e);return function(t){return r.map((function(e){return[t,e]}))}}function Hl(t,e,n){var r=w(t,e-1e-6,n).concat(e);return function(t){return r.map((function(e){return[e,t]}))}}function ql(){var t,e,n,r,i,a,o,s,u,c,l,f,h=10,d=h,p=90,y=360,g=2.5;function m(){return{type:"MultiLineString",coordinates:v()}}function v(){return w(vu(r/p)*p,n,p).map(l).concat(w(vu(s/y)*y,o,y).map(f)).concat(w(vu(e/h)*h,t,h).filter((function(t){return pu(t%p)>1e-6})).map(u)).concat(w(vu(a/d)*d,i,d).filter((function(t){return pu(t%y)>1e-6})).map(c))}return m.lines=function(){return v().map((function(t){return{type:"LineString",coordinates:t}}))},m.outline=function(){return{type:"Polygon",coordinates:[l(r).concat(f(o).slice(1),l(n).reverse().slice(1),f(s).reverse().slice(1))]}},m.extent=function(t){return arguments.length?m.extentMajor(t).extentMinor(t):m.extentMinor()},m.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),m.precision(g)):[[r,s],[n,o]]},m.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),m.precision(g)):[[e,a],[t,i]]},m.step=function(t){return arguments.length?m.stepMajor(t).stepMinor(t):m.stepMinor()},m.stepMajor=function(t){return arguments.length?(p=+t[0],y=+t[1],m):[p,y]},m.stepMinor=function(t){return arguments.length?(h=+t[0],d=+t[1],m):[h,d]},m.precision=function(h){return arguments.length?(g=+h,u=Wl(a,i,90),c=Hl(e,t,g),l=Wl(s,o,90),f=Hl(r,n,g),m):g},m.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])}function Zl(){return ql()()}var Xl,Jl,Ql,Kl,tf=function(t,e){var n=t[0]*du,r=t[1]*du,i=e[0]*du,a=e[1]*du,o=mu(r),s=wu(r),u=mu(a),c=wu(a),l=o*mu(n),f=o*wu(n),h=u*mu(i),d=u*wu(i),p=2*Tu(Eu(Mu(a-r)+o*u*Mu(i-n))),y=wu(p),g=p?function(t){var e=wu(t*=p)/y,n=wu(p-t)/y,r=n*l+e*h,i=n*f+e*d,a=n*s+e*c;return[gu(i,r)*hu,gu(a,Eu(r*r+i*i))*hu]}:function(){return[n*hu,r*hu]};return g.distance=p,g},ef=function(t){return t},nf=iu(),rf=iu(),af={point:Cu,lineStart:Cu,lineEnd:Cu,polygonStart:function(){af.lineStart=of,af.lineEnd=cf},polygonEnd:function(){af.lineStart=af.lineEnd=af.point=Cu,nf.add(pu(rf)),rf.reset()},result:function(){var t=nf/2;return nf.reset(),t}};function of(){af.point=sf}function sf(t,e){af.point=uf,Xl=Ql=t,Jl=Kl=e}function uf(t,e){rf.add(Kl*t-Ql*e),Ql=t,Kl=e}function cf(){uf(Xl,Jl)}var lf,ff,hf,df,pf=af,yf=1/0,gf=yf,mf=-yf,vf=mf,bf={point:function(t,e){tmf&&(mf=t),evf&&(vf=e)},lineStart:Cu,lineEnd:Cu,polygonStart:Cu,polygonEnd:Cu,result:function(){var t=[[yf,gf],[mf,vf]];return mf=vf=-(gf=yf=1/0),t}},xf=0,_f=0,wf=0,kf=0,Ef=0,Sf=0,Af=0,Tf=0,Mf=0,Cf={point:Of,lineStart:Nf,lineEnd:Ff,polygonStart:function(){Cf.lineStart=Pf,Cf.lineEnd=If},polygonEnd:function(){Cf.point=Of,Cf.lineStart=Nf,Cf.lineEnd=Ff},result:function(){var t=Mf?[Af/Mf,Tf/Mf]:Sf?[kf/Sf,Ef/Sf]:wf?[xf/wf,_f/wf]:[NaN,NaN];return xf=_f=wf=kf=Ef=Sf=Af=Tf=Mf=0,t}};function Of(t,e){xf+=t,_f+=e,++wf}function Nf(){Cf.point=Df}function Df(t,e){Cf.point=Lf,Of(hf=t,df=e)}function Lf(t,e){var n=t-hf,r=e-df,i=Eu(n*n+r*r);kf+=i*(hf+t)/2,Ef+=i*(df+e)/2,Sf+=i,Of(hf=t,df=e)}function Ff(){Cf.point=Of}function Pf(){Cf.point=Rf}function If(){Bf(lf,ff)}function Rf(t,e){Cf.point=Bf,Of(lf=hf=t,ff=df=e)}function Bf(t,e){var n=t-hf,r=e-df,i=Eu(n*n+r*r);kf+=i*(hf+t)/2,Ef+=i*(df+e)/2,Sf+=i,Af+=(i=df*t-hf*e)*(hf+t),Tf+=i*(df+e),Mf+=3*i,Of(hf=t,df=e)}var jf=Cf;function zf(t){this._context=t}zf.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,fu)}},result:Cu};var Yf,Uf,$f,Vf,Gf,Wf=iu(),Hf={point:Cu,lineStart:function(){Hf.point=qf},lineEnd:function(){Yf&&Zf(Uf,$f),Hf.point=Cu},polygonStart:function(){Yf=!0},polygonEnd:function(){Yf=null},result:function(){var t=+Wf;return Wf.reset(),t}};function qf(t,e){Hf.point=Zf,Uf=Vf=t,$f=Gf=e}function Zf(t,e){Vf-=t,Gf-=e,Wf.add(Eu(Vf*Vf+Gf*Gf)),Vf=t,Gf=e}var Xf=Hf;function Jf(){this._string=[]}function Qf(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}Jf.prototype={_radius:4.5,_circle:Qf(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=Qf(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 Kf=function(t,e){var n,r,i=4.5;function a(t){return t&&("function"==typeof i&&r.pointRadius(+i.apply(this,arguments)),zu(t,n(r))),r.result()}return a.area=function(t){return zu(t,n(pf)),pf.result()},a.measure=function(t){return zu(t,n(Xf)),Xf.result()},a.bounds=function(t){return zu(t,n(bf)),bf.result()},a.centroid=function(t){return zu(t,n(jf)),jf.result()},a.projection=function(e){return arguments.length?(n=null==e?(t=null,ef):(t=e).stream,a):t},a.context=function(t){return arguments.length?(r=null==t?(e=null,new Jf):new zf(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:eh(t)}};function eh(t){return function(e){var n=new nh;for(var r in t)n[r]=t[r];return n.stream=e,n}}function nh(){}function rh(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),zu(n,t.stream(bf)),e(bf.result()),null!=r&&t.clipExtent(r),t}function ih(t,e,n){return rh(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 ah(t,e,n){return ih(t,[[0,0],e],n)}function oh(t,e,n){return rh(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 sh(t,e,n){return rh(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)}nh.prototype={constructor:nh,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 uh=mu(30*du),ch=function(t,e){return+e?function(t,e){function n(r,i,a,o,s,u,c,l,f,h,d,p,y,g){var m=c-r,v=l-i,b=m*m+v*v;if(b>4*e&&y--){var x=o+h,_=s+d,w=u+p,k=Eu(x*x+_*_+w*w),E=Tu(w/=k),S=pu(pu(w)-1)<1e-6||pu(a-f)<1e-6?(a+f)/2:gu(_,x),A=t(S,E),T=A[0],M=A[1],C=T-r,O=M-i,N=v*C-m*O;(N*N/b>e||pu((m*C+v*O)/b-.5)>.3||o*h+s*d+u*p2?t[2]%360*du:0,T()):[g*hu,m*hu,v*hu]},S.angle=function(t){return arguments.length?(b=t%360*du,T()):b*hu},S.precision=function(t){return arguments.length?(o=ch(s,E=t*t),M()):Eu(E)},S.fitExtent=function(t,e){return ih(S,t,e)},S.fitSize=function(t,e){return ah(S,t,e)},S.fitWidth=function(t,e){return oh(S,t,e)},S.fitHeight=function(t,e){return sh(S,t,e)},function(){return e=t.apply(this,arguments),S.invert=e.invert&&A,T()}}function yh(t){var e=0,n=uu/3,r=ph(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*du,n=t[1]*du):[e*hu,n*hu]},i}function gh(t,e){var n=wu(t),r=(n+wu(e))/2;if(pu(r)<1e-6)return function(t){var e=mu(t);function n(t,n){return[t*e,wu(n)/e]}return n.invert=function(t,n){return[t/e,Tu(n*e)]},n}(t);var i=1+n*(2*r-n),a=Eu(i)/r;function o(t,e){var n=Eu(i-2*r*wu(e))/r;return[n*wu(t*=r),a-n*mu(t)]}return o.invert=function(t,e){var n=a-e;return[gu(t,pu(n))/r*ku(n),Tu((i-(t*t+n*n)*r*r)/(2*r))]},o}var mh=function(){return yh(gh).scale(155.424).center([0,33.6442])},vh=function(){return mh().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])},bh=function(){var t,e,n,r,i,a,o=vh(),s=mh().rotate([154,0]).center([-2,58.5]).parallels([55,65]),u=mh().rotate([157,0]).center([-3,19.9]).parallels([8,18]),c={point:function(t,e){a=[t,e]}};function l(t){var e=t[0],o=t[1];return a=null,n.point(e,o),a||(r.point(e,o),a)||(i.point(e,o),a)}function f(){return t=e=null,l}return l.invert=function(t){var e=o.scale(),n=o.translate(),r=(t[0]-n[0])/e,i=(t[1]-n[1])/e;return(i>=.12&&i<.234&&r>=-.425&&r<-.214?s:i>=.166&&i<.234&&r>=-.214&&r<-.115?u:o).invert(t)},l.stream=function(n){return t&&e===n?t:(r=[o.stream(e=n),s.stream(n),u.stream(n)],i=r.length,t={point:function(t,e){for(var n=-1;++n0?e<1e-6-cu&&(e=1e-6-cu):e>cu-1e-6&&(e=cu-1e-6);var n=i/_u(Ch(e),r);return[n*wu(r*t),i-n*mu(r*t)]}return a.invert=function(t,e){var n=i-e,a=ku(r)*Eu(t*t+n*n);return[gu(t,pu(n))/r*ku(n),2*yu(_u(i/a,1/r))-cu]},a}var Nh=function(){return yh(Oh).scale(109.5).parallels([30,30])};function Dh(t,e){return[t,e]}Dh.invert=Dh;var Lh=function(){return dh(Dh).scale(152.63)};function Fh(t,e){var n=mu(t),r=t===e?wu(t):(n-mu(e))/(e-t),i=n/r+t;if(pu(r)<1e-6)return Dh;function a(t,e){var n=i-e,a=r*t;return[n*wu(a),i-n*mu(a)]}return a.invert=function(t,e){var n=i-e;return[gu(t,pu(n))/r*ku(n),i-ku(r)*Eu(t*t+n*n)]},a}var Ph=function(){return yh(Fh).scale(131.154).center([0,13.9389])},Ih=1.340264,Rh=-.081106,Bh=893e-6,jh=.003796,zh=Eu(3)/2;function Yh(t,e){var n=Tu(zh*wu(e)),r=n*n,i=r*r*r;return[t*mu(n)/(zh*(Ih+3*Rh*r+i*(7*Bh+9*jh*r))),n*(Ih+Rh*r+i*(Bh+jh*r))]}Yh.invert=function(t,e){for(var n,r=e,i=r*r,a=i*i*i,o=0;o<12&&(a=(i=(r-=n=(r*(Ih+Rh*i+a*(Bh+jh*i))-e)/(Ih+3*Rh*i+a*(7*Bh+9*jh*i)))*r)*i*i,!(pu(n)<1e-12));++o);return[zh*t*(Ih+3*Rh*i+a*(7*Bh+9*jh*i))/mu(r),Tu(wu(r)/zh)]};var Uh=function(){return dh(Yh).scale(177.158)};function $h(t,e){var n=mu(e),r=mu(t)*n;return[n*wu(t)/r,wu(e)/r]}$h.invert=_h(yu);var Vh=function(){return dh($h).scale(144.049).clipAngle(60)};function Gh(t,e,n,r){return 1===t&&1===e&&0===n&&0===r?ef:eh({point:function(i,a){this.stream.point(i*t+n,a*e+r)}})}var Wh=function(){var t,e,n,r,i,a,o=1,s=0,u=0,c=1,l=1,f=ef,h=null,d=ef;function p(){return r=i=null,a}return a={stream:function(t){return r&&i===t?r:r=f(d(i=t))},postclip:function(r){return arguments.length?(d=r,h=t=e=n=null,p()):d},clipExtent:function(r){return arguments.length?(d=null==r?(h=t=e=n=null,ef):kl(h=+r[0][0],t=+r[0][1],e=+r[1][0],n=+r[1][1]),p()):null==h?null:[[h,t],[e,n]]},scale:function(t){return arguments.length?(f=Gh((o=+t)*c,o*l,s,u),p()):o},translate:function(t){return arguments.length?(f=Gh(o*c,o*l,s=+t[0],u=+t[1]),p()):[s,u]},reflectX:function(t){return arguments.length?(f=Gh(o*(c=t?-1:1),o*l,s,u),p()):c<0},reflectY:function(t){return arguments.length?(f=Gh(o*c,o*(l=t?-1:1),s,u),p()):l<0},fitExtent:function(t,e){return ih(a,t,e)},fitSize:function(t,e){return ah(a,t,e)},fitWidth:function(t,e){return oh(a,t,e)},fitHeight:function(t,e){return sh(a,t,e)}}};function Hh(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),e*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}Hh.invert=function(t,e){var n,r=e,i=25;do{var a=r*r,o=a*a;r-=n=(r*(1.007226+a*(.015085+o*(.028874*a-.044475-.005916*o)))-e)/(1.007226+a*(.045255+o*(.259866*a-.311325-.005916*11*o)))}while(pu(n)>1e-6&&--i>0);return[t/(.8707+(a=r*r)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),r]};var qh=function(){return dh(Hh).scale(175.295)};function Zh(t,e){return[mu(e)*wu(t),wu(e)]}Zh.invert=_h(Tu);var Xh=function(){return dh(Zh).scale(249.5).clipAngle(90.000001)};function Jh(t,e){var n=mu(e),r=1+mu(t)*n;return[n*wu(t)/r,wu(e)/r]}Jh.invert=_h((function(t){return 2*yu(t)}));var Qh=function(){return dh(Jh).scale(250).clipAngle(142)};function Kh(t,e){return[xu(Su((cu+e)/2)),-t]}Kh.invert=function(t,e){return[-e,2*yu(bu(t))-cu]};var td=function(){var t=Mh(Kh),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 ed(t,e){return t.parent===e.parent?1:2}function nd(t,e){return t+e.x}function rd(t,e){return Math.max(t,e.y)}var id=function(){var t=ed,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(nd,0)/t.length}(n),e.y=function(t){return 1+t.reduce(rd,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),u=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(i),c=s.x-t(s,u)/2,l=u.x+t(u,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-c)/(l-c)*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 ad(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 od(t,e){var n,r,i,a,o,s=new ld(t),u=+t.value&&(s.value=t.value),c=[s];for(null==e&&(e=sd);n=c.pop();)if(u&&(n.value=+n.data.value),(i=e(n.data))&&(o=i.length))for(n.children=new Array(o),a=o-1;a>=0;--a)c.push(r=n.children[a]=new ld(i[a])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(cd)}function sd(t){return t.children}function ud(t){t.data=t.data.data}function cd(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=od.prototype={constructor:ld,count:function(){return this.eachAfter(ad)},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;for(t=n.pop(),e=r.pop();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 od(this).eachBefore(ud)}};var fd=Array.prototype.slice,hd=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 gd(t,e){for(var n=0;n(o*=o)?(r=(c+o-i)/(2*c),a=Math.sqrt(Math.max(0,o/c-r*r)),n.x=t.x-r*s-a*u,n.y=t.y-r*u+a*s):(r=(c+i-o)/(2*c),a=Math.sqrt(Math.max(0,i/c-r*r)),n.x=e.x+r*s-a*u,n.y=e.y+r*u+a*s)):(n.x=e.x+n.r,n.y=e.y)}function _d(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 wd(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 kd(t){this._=t,this.next=null,this.previous=null}function Ed(t){if(!(i=t.length))return 0;var e,n,r,i,a,o,s,u,c,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;xd(n,e,r=t[2]),e=new kd(e),n=new kd(n),r=new kd(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=Td(e),n):t},n.parentId=function(t){return arguments.length?(e=Td(t),n):e},n};function $d(t,e){return t.parent===e.parent?1:2}function Vd(t){var e=t.children;return e?e[0]:t.t}function Gd(t){var e=t.children;return e?e[e.length-1]:t.t}function Wd(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 Hd(t,e,n){return t.a.parent===e.parent?t.a:n}function qd(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}qd.prototype=Object.create(ld.prototype);var Zd=function(){var t=$d,e=1,n=1,r=null;function i(i){var u=function(t){for(var e,n,r,i,a,o=new qd(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 qd(r[i],i)),n.parent=e;return(o.parent=new qd(null,0)).children=[o],o}(i);if(u.eachAfter(a),u.parent.m=-u.z,u.eachBefore(o),r)i.eachBefore(s);else{var c=i,l=i,f=i;i.eachBefore((function(t){t.xl.x&&(l=t),t.depth>f.depth&&(f=t)}));var h=c===l?1:t(c,l)/2,d=h-c.x,p=e/(l.x+h+d),y=n/(f.depth||1);i.eachBefore((function(t){t.x=(t.x+d)*p,t.y=t.depth*y}))}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,u=a.parent.children[0],c=a.m,l=o.m,f=s.m,h=u.m;s=Gd(s),a=Vd(a),s&&a;)u=Vd(u),(o=Gd(o)).a=e,(i=s.z+f-a.z-c+t(s._,a._))>0&&(Wd(Hd(s,e,r),e,i),c+=i,l+=i),f+=s.m,c+=a.m,h+=u.m,l+=o.m;s&&!Gd(o)&&(o.t=s,o.m+=f-l),a&&!Vd(u)&&(u.t=a,u.m+=c-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},Xd=function(t,e,n,r,i){for(var a,o=t.children,s=-1,u=o.length,c=t.value&&(i-n)/t.value;++sh&&(h=s),g=l*l*y,(d=Math.max(h/g,g/f))>p){l-=s;break}p=d}m.push(o={value:l,dice:u1?e:1)},n}(Jd),tp=function(){var t=Kd,e=!1,n=1,r=1,i=[0],a=Md,o=Md,s=Md,u=Md,c=Md;function l(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(f),i=[0],e&&t.eachBefore(Pd),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=u)}for(var f=c[e],h=r/2+f,d=e+1,p=n-1;d>>1;c[y]u-a){var v=(i*m+o*g)/r;t(e,d,g,i,a,v,u),t(d,n,m,v,a,o,u)}else{var b=(a*m+u*g)/r;t(e,d,g,i,a,o,b),t(d,n,m,i,b,o,u)}}(0,u,t.value,e,n,r,i)},np=function(t,e,n,r,i){(1&t.depth?Xd:Id)(t,e,n,r,i)},rp=function t(e){function n(t,n,r,i,a){if((o=t._squarify)&&o.ratio===e)for(var o,s,u,c,l,f=-1,h=o.length,d=t.value;++f1?e:1)},n}(Jd),ip=function(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}},ap=function(t,e){var n=cn(+t,+e);return function(t){var e=n(t);return e-360*Math.floor(e/360)}},op=function(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}},sp=Math.SQRT2;function up(t){return((t=Math.exp(t))+1/t)/2}var cp=function(t,e){var n,r,i=t[0],a=t[1],o=t[2],s=e[0],u=e[1],c=e[2],l=s-i,f=u-a,h=l*l+f*f;if(h<1e-12)r=Math.log(c/o)/sp,n=function(t){return[i+t*l,a+t*f,o*Math.exp(sp*t*r)]};else{var d=Math.sqrt(h),p=(c*c-o*o+4*h)/(2*o*2*d),y=(c*c-o*o-4*h)/(2*c*2*d),g=Math.log(Math.sqrt(p*p+1)-p),m=Math.log(Math.sqrt(y*y+1)-y);r=(m-g)/sp,n=function(t){var e,n=t*r,s=up(g),u=o/(2*d)*(s*(e=sp*n+g,((e=Math.exp(2*e))-1)/(e+1))-function(t){return((t=Math.exp(t))-1/t)/2}(g));return[i+u*l,a+u*f,o*s/up(sp*n+g)]}}return n.duration=1e3*r,n};function lp(t){return function(e,n){var r=t((e=tn(e)).h,(n=tn(n)).h),i=ln(e.s,n.s),a=ln(e.l,n.l),o=ln(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(cn),hp=lp(ln);function dp(t,e){var n=ln((t=da(t)).l,(e=da(e)).l),r=ln(t.a,e.a),i=ln(t.b,e.b),a=ln(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 pp(t){return function(e,n){var r=t((e=_a(e)).h,(n=_a(n)).h),i=ln(e.c,n.c),a=ln(e.l,n.l),o=ln(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=pp(cn),gp=pp(ln);function mp(t){return function e(n){function r(e,r){var i=t((e=Ma(e)).h,(r=Ma(r)).h),a=ln(e.s,r.s),o=ln(e.l,r.l),s=ln(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 vp=mp(cn),bp=mp(ln);function xp(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 Ap=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)c.push(t[r[a[e]][2]]);for(e=+s;es!=c>s&&o<(u-n)*(s-r)/(c-r)+n&&(l=!l),u=n,c=r;return l},Mp=function(t){for(var e,n,r=-1,i=t.length,a=t[i-1],o=a[0],s=a[1],u=0;++r1);return t+n*a*Math.sqrt(-2*Math.log(i)/i)}}return n.source=t,n}(Cp),Dp=function t(e){function n(){var t=Np.source(e).apply(this,arguments);return function(){return Math.exp(t())}}return n.source=t,n}(Cp),Lp=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 Jp(t,e,n){var r=t[0],i=t[1],a=e[0],o=e[1];return i2?Qp:Jp,i=a=null,f}function f(e){return isNaN(e=+e)?n:(i||(i=r(o.map(t),s,u)))(t(c(e)))}return f.invert=function(n){return c(e((a||(a=r(s,o.map(t),wn)))(n)))},f.domain=function(t){return arguments.length?(o=jp.call(t,Wp),c===qp||(c=Xp(o)),l()):o.slice()},f.range=function(t){return arguments.length?(s=zp.call(t),l()):s.slice()},f.rangeRound=function(t){return s=zp.call(t),u=op,l()},f.clamp=function(t){return arguments.length?(c=t?Xp(o):qp,f):c!==qp},f.interpolate=function(t){return arguments.length?(u=t,l()):u},f.unknown=function(t){return arguments.length?(n=t,f):n},function(n,r){return t=n,e=r,l()}}function ey(t,e){return ty()(t,e)}var ny=function(t,e,n,r){var i,a=M(t,e,n);switch((r=Us(null==r?",f":r)).type){case"s":var o=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=nu(a,o))||(r.precision=i),Hs(r,o);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=ru(a,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=eu(a))||(r.precision=i-2*("%"===r.type))}return Ws(r)};function ry(t){var e=t.domain;return t.ticks=function(t){var n=e();return A(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return ny(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],u=i[o];return u0?r=T(s=Math.floor(s/r)*r,u=Math.ceil(u/r)*r,n):r<0&&(r=T(s=Math.ceil(s*r)/r,u=Math.floor(u*r)/r,n)),r>0?(i[a]=Math.floor(s/r)*r,i[o]=Math.ceil(u/r)*r,e(i)):r<0&&(i[a]=Math.ceil(s*r)/r,i[o]=Math.floor(u*r)/r,e(i)),t},t}function iy(){var t=ey(qp,qp);return t.copy=function(){return Kp(t,iy())},Ip.apply(t,arguments),ry(t)}function ay(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=jp.call(e,Wp),n):t.slice()},n.unknown=function(t){return arguments.length?(e=t,n):e},n.copy=function(){return ay(t).unknown(e)},t=arguments.length?jp.call(t,Wp):[0,1],ry(n)}var oy=function(t,e){var n,r=0,i=(t=t.slice()).length-1,a=t[r],o=t[i];return o0){for(;hu)break;y.push(f)}}else for(;h=1;--l)if(!((f=c*l)u)break;y.push(f)}}else y=A(h,d,Math.min(d-h,p)).map(n);return r?y.reverse():y},r.tickFormat=function(t,i){if(null==i&&(i=10===a?".0e":","),"function"!=typeof i&&(i=Ws(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?i[r-1]:e[0],r=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 Ay().domain([e,n]).range(a).unknown(t)},Ip.apply(ry(o),arguments)}function Ty(){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=zp.call(t),r=Math.min(e.length,n.length-1),i):e.slice()},i.range=function(t){return arguments.length?(n=zp.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 Ty().domain(e).range(n).unknown(t)},Ip.apply(i,arguments)}var My=new Date,Cy=new Date;function Oy(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 My.setTime(+e),Cy.setTime(+r),t(My),t(Cy),Math.floor(n(My,Cy))},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=Oy((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?Oy((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 Dy=Ny,Ly=Ny.range,Fy=Oy((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()})),Py=Fy,Iy=Fy.range;function Ry(t){return Oy((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-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/6048e5}))}var By=Ry(0),jy=Ry(1),zy=Ry(2),Yy=Ry(3),Uy=Ry(4),$y=Ry(5),Vy=Ry(6),Gy=By.range,Wy=jy.range,Hy=zy.range,qy=Yy.range,Zy=Uy.range,Xy=$y.range,Jy=Vy.range,Qy=Oy((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5}),(function(t){return t.getDate()-1})),Ky=Qy,tg=Qy.range,eg=Oy((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-6e4*t.getMinutes())}),(function(t,e){t.setTime(+t+36e5*e)}),(function(t,e){return(e-t)/36e5}),(function(t){return t.getHours()})),ng=eg,rg=eg.range,ig=Oy((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())}),(function(t,e){t.setTime(+t+6e4*e)}),(function(t,e){return(e-t)/6e4}),(function(t){return t.getMinutes()})),ag=ig,og=ig.range,sg=Oy((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,e){t.setTime(+t+1e3*e)}),(function(t,e){return(e-t)/1e3}),(function(t){return t.getUTCSeconds()})),ug=sg,cg=sg.range,lg=Oy((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));lg.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?Oy((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):lg:null};var fg=lg,hg=lg.range;function dg(t){return Oy((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)/6048e5}))}var pg=dg(0),yg=dg(1),gg=dg(2),mg=dg(3),vg=dg(4),bg=dg(5),xg=dg(6),_g=pg.range,wg=yg.range,kg=gg.range,Eg=mg.range,Sg=vg.range,Ag=bg.range,Tg=xg.range,Mg=Oy((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/864e5}),(function(t){return t.getUTCDate()-1})),Cg=Mg,Og=Mg.range,Ng=Oy((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()}));Ng.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Oy((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 Dg=Ng,Lg=Ng.range;function Fg(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 Pg(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 Ig(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function Rg(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,a=t.days,o=t.shortDays,s=t.months,u=t.shortMonths,c=Zg(i),l=Xg(i),f=Zg(a),h=Xg(a),d=Zg(o),p=Xg(o),y=Zg(s),g=Xg(s),m=Zg(u),v=Xg(u),b={a:function(t){return o[t.getDay()]},A:function(t){return a[t.getDay()]},b:function(t){return u[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:mm,e:mm,f:wm,H:vm,I:bm,j:xm,L:_m,m:km,M:Em,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Qm,s:Km,S:Sm,u:Am,U:Tm,V:Mm,w:Cm,W:Om,x:null,X:null,y:Nm,Y:Dm,Z:Lm,"%":Jm},x={a:function(t){return o[t.getUTCDay()]},A:function(t){return a[t.getUTCDay()]},b:function(t){return u[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:Fm,e:Fm,f:jm,H:Pm,I:Im,j:Rm,L:Bm,m:zm,M:Ym,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Qm,s:Km,S:Um,u:$m,U:Vm,V:Gm,w:Wm,W:Hm,x:null,X:null,y:qm,Y:Zm,Z:Xm,"%":Jm},_={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=m.exec(e.slice(n));return r?(t.m=v[r[0].toLowerCase()],n+r[0].length):-1},B:function(t,e,n){var r=y.exec(e.slice(n));return r?(t.m=g[r[0].toLowerCase()],n+r[0].length):-1},c:function(t,n,r){return E(t,e,n,r)},d:sm,e:sm,f:dm,H:cm,I:cm,j:um,L:hm,m:om,M:lm,p:function(t,e,n){var r=c.exec(e.slice(n));return r?(t.p=l[r[0].toLowerCase()],n+r[0].length):-1},q:am,Q:ym,s:gm,S:fm,u:Qg,U:Kg,V:tm,w:Jg,W:em,x:function(t,e,r){return E(t,n,e,r)},X:function(t,e,n){return E(t,r,e,n)},y:rm,Y:nm,Z:im,"%":pm};function w(t,e){return function(n){var r,i,a,o=[],s=-1,u=0,c=t.length;for(n instanceof Date||(n=new Date(+n));++s53)return null;"w"in a||(a.w=1),"Z"in a?(i=(r=Pg(Ig(a.y,0,1))).getUTCDay(),r=i>4||0===i?yg.ceil(r):yg(r),r=Cg.offset(r,7*(a.V-1)),a.y=r.getUTCFullYear(),a.m=r.getUTCMonth(),a.d=r.getUTCDate()+(a.w+6)%7):(i=(r=Fg(Ig(a.y,0,1))).getDay(),r=i>4||0===i?jy.ceil(r):jy(r),r=Ky.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?Pg(Ig(a.y,0,1)).getUTCDay():Fg(Ig(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,Pg(a)):Fg(a)}}function E(t,e,n,r){for(var i,a,o=0,s=e.length,u=n.length;o=u)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=_[i in $g?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 Bg,jg,zg,Yg,Ug,$g={"-":"",_:" ",0:"0"},Vg=/^\s*\d+/,Gg=/^%/,Wg=/[\\^$*+?|[\]().{}]/g;function Hg(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 im(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 am(t,e,n){var r=Vg.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function om(t,e,n){var r=Vg.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function sm(t,e,n){var r=Vg.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function um(t,e,n){var r=Vg.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function cm(t,e,n){var r=Vg.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function lm(t,e,n){var r=Vg.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function fm(t,e,n){var r=Vg.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function hm(t,e,n){var r=Vg.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function dm(t,e,n){var r=Vg.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function pm(t,e,n){var r=Gg.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function ym(t,e,n){var r=Vg.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function gm(t,e,n){var r=Vg.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function mm(t,e){return Hg(t.getDate(),e,2)}function vm(t,e){return Hg(t.getHours(),e,2)}function bm(t,e){return Hg(t.getHours()%12||12,e,2)}function xm(t,e){return Hg(1+Ky.count(Dy(t),t),e,3)}function _m(t,e){return Hg(t.getMilliseconds(),e,3)}function wm(t,e){return _m(t,e)+"000"}function km(t,e){return Hg(t.getMonth()+1,e,2)}function Em(t,e){return Hg(t.getMinutes(),e,2)}function Sm(t,e){return Hg(t.getSeconds(),e,2)}function Am(t){var e=t.getDay();return 0===e?7:e}function Tm(t,e){return Hg(By.count(Dy(t)-1,t),e,2)}function Mm(t,e){var n=t.getDay();return t=n>=4||0===n?Uy(t):Uy.ceil(t),Hg(Uy.count(Dy(t),t)+(4===Dy(t).getDay()),e,2)}function Cm(t){return t.getDay()}function Om(t,e){return Hg(jy.count(Dy(t)-1,t),e,2)}function Nm(t,e){return Hg(t.getFullYear()%100,e,2)}function Dm(t,e){return Hg(t.getFullYear()%1e4,e,4)}function Lm(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Hg(e/60|0,"0",2)+Hg(e%60,"0",2)}function Fm(t,e){return Hg(t.getUTCDate(),e,2)}function Pm(t,e){return Hg(t.getUTCHours(),e,2)}function Im(t,e){return Hg(t.getUTCHours()%12||12,e,2)}function Rm(t,e){return Hg(1+Cg.count(Dg(t),t),e,3)}function Bm(t,e){return Hg(t.getUTCMilliseconds(),e,3)}function jm(t,e){return Bm(t,e)+"000"}function zm(t,e){return Hg(t.getUTCMonth()+1,e,2)}function Ym(t,e){return Hg(t.getUTCMinutes(),e,2)}function Um(t,e){return Hg(t.getUTCSeconds(),e,2)}function $m(t){var e=t.getUTCDay();return 0===e?7:e}function Vm(t,e){return Hg(pg.count(Dg(t)-1,t),e,2)}function Gm(t,e){var n=t.getUTCDay();return t=n>=4||0===n?vg(t):vg.ceil(t),Hg(vg.count(Dg(t),t)+(4===Dg(t).getUTCDay()),e,2)}function Wm(t){return t.getUTCDay()}function Hm(t,e){return Hg(yg.count(Dg(t)-1,t),e,2)}function qm(t,e){return Hg(t.getUTCFullYear()%100,e,2)}function Zm(t,e){return Hg(t.getUTCFullYear()%1e4,e,4)}function Xm(){return"+0000"}function Jm(){return"%"}function Qm(t){return+t}function Km(t){return Math.floor(+t/1e3)}function tv(t){return Bg=Rg(t),jg=Bg.format,zg=Bg.parse,Yg=Bg.utcFormat,Ug=Bg.utcParse,Bg}function ev(t){return new Date(t)}function nv(t){return t instanceof Date?+t:+new Date(+t)}function rv(t,e,n,r,a,o,s,u,c){var l=ey(qp,qp),f=l.invert,h=l.domain,d=c(".%L"),p=c(":%S"),y=c("%I:%M"),g=c("%I %p"),m=c("%a %d"),v=c("%b %d"),b=c("%B"),x=c("%Y"),_=[[s,1,1e3],[s,5,5e3],[s,15,15e3],[s,30,3e4],[o,1,6e4],[o,5,3e5],[o,15,9e5],[o,30,18e5],[a,1,36e5],[a,3,108e5],[a,6,216e5],[a,12,432e5],[r,1,864e5],[r,2,1728e5],[n,1,6048e5],[e,1,2592e6],[e,3,7776e6],[t,1,31536e6]];function w(i){return(s(i)1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return Gb.h=360*t-100,Gb.s=1.5-1.5*e,Gb.l=.8-.9*e,Gb+""},Hb=He(),qb=Math.PI/3,Zb=2*Math.PI/3,Xb=function(t){var e;return t=(.5-t)*Math.PI,Hb.r=255*(e=Math.sin(t))*e,Hb.g=255*(e=Math.sin(t+qb))*e,Hb.b=255*(e=Math.sin(t+Zb))*e,Hb+""},Jb=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 Qb(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}var Kb=Qb(Cv("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),tx=Qb(Cv("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),ex=Qb(Cv("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),nx=Qb(Cv("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),rx=function(t){return we(ne(t).call(document.documentElement))},ix=0;function ax(){return new ox}function ox(){this._="@"+(++ix).toString(36)}ox.prototype=ax.prototype={constructor:ox,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 sx=function(t){return"string"==typeof t?new be([document.querySelectorAll(t)],[document.documentElement]):new be([null==t?[]:t],ve)},ux=function(t,e){null==e&&(e=Mn().touches);for(var n=0,r=e?e.length:0,i=new Array(r);n1?0:t<-1?mx:Math.acos(t)}function _x(t){return t>=1?vx:t<=-1?-vx:Math.asin(t)}function wx(t){return t.innerRadius}function kx(t){return t.outerRadius}function Ex(t){return t.startAngle}function Sx(t){return t.endAngle}function Ax(t){return t&&t.padAngle}function Tx(t,e,n,r,i,a,o,s){var u=n-t,c=r-e,l=o-i,f=s-a,h=f*u-l*c;if(!(h*h<1e-12))return[t+(h=(l*(e-a)-f*(t-i))/h)*u,e+h*c]}function Mx(t,e,n,r,i,a,o){var s=t-n,u=e-r,c=(o?a:-a)/gx(s*s+u*u),l=c*u,f=-c*s,h=t+l,d=e+f,p=n+l,y=r+f,g=(h+p)/2,m=(d+y)/2,v=p-h,b=y-d,x=v*v+b*b,_=i-a,w=h*y-p*d,k=(b<0?-1:1)*gx(dx(0,_*_*x-w*w)),E=(w*b-v*k)/x,S=(-w*v-b*k)/x,A=(w*b+v*k)/x,T=(-w*v+b*k)/x,M=E-g,C=S-m,O=A-g,N=T-m;return M*M+C*C>O*O+N*N&&(E=A,S=T),{cx:E,cy:S,x01:-l,y01:-f,x11:E*(i/_-1),y11:S*(i/_-1)}}var Cx=function(){var t=wx,e=kx,n=cx(0),r=null,i=Ex,a=Sx,o=Ax,s=null;function u(){var u,c,l=+t.apply(this,arguments),f=+e.apply(this,arguments),h=i.apply(this,arguments)-vx,d=a.apply(this,arguments)-vx,p=lx(d-h),y=d>h;if(s||(s=u=Yi()),f1e-12)if(p>bx-1e-12)s.moveTo(f*hx(h),f*yx(h)),s.arc(0,0,f,h,d,!y),l>1e-12&&(s.moveTo(l*hx(d),l*yx(d)),s.arc(0,0,l,d,h,y));else{var g,m,v=h,b=d,x=h,_=d,w=p,k=p,E=o.apply(this,arguments)/2,S=E>1e-12&&(r?+r.apply(this,arguments):gx(l*l+f*f)),A=px(lx(f-l)/2,+n.apply(this,arguments)),T=A,M=A;if(S>1e-12){var C=_x(S/l*yx(E)),O=_x(S/f*yx(E));(w-=2*C)>1e-12?(x+=C*=y?1:-1,_-=C):(w=0,x=_=(h+d)/2),(k-=2*O)>1e-12?(v+=O*=y?1:-1,b-=O):(k=0,v=b=(h+d)/2)}var N=f*hx(v),D=f*yx(v),L=l*hx(_),F=l*yx(_);if(A>1e-12){var P,I=f*hx(b),R=f*yx(b),B=l*hx(x),j=l*yx(x);if(p1e-12?M>1e-12?(g=Mx(B,j,N,D,f,M,y),m=Mx(I,R,L,F,f,M,y),s.moveTo(g.cx+g.x01,g.cy+g.y01),M1e-12&&w>1e-12?T>1e-12?(g=Mx(L,F,I,R,l,-T,y),m=Mx(N,D,B,j,l,-T,y),s.lineTo(g.cx+g.x01,g.cy+g.y01),T=l;--f)s.point(g[f],m[f]);s.lineEnd(),s.areaEnd()}y&&(g[c]=+t(h,c,u),m[c]=+n(h,c,u),s.point(e?+e(h,c,u):g[c],r?+r(h,c,u):m[c]))}if(d)return s=null,d+""||null}function c(){return Fx().defined(i).curve(o).context(a)}return u.x=function(n){return arguments.length?(t="function"==typeof n?n:cx(+n),e=null,u):t},u.x0=function(e){return arguments.length?(t="function"==typeof e?e:cx(+e),u):t},u.x1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:cx(+t),u):e},u.y=function(t){return arguments.length?(n="function"==typeof t?t:cx(+t),r=null,u):n},u.y0=function(t){return arguments.length?(n="function"==typeof t?t:cx(+t),u):n},u.y1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:cx(+t),u):r},u.lineX0=u.lineY0=function(){return c().x(t).y(n)},u.lineY1=function(){return c().x(t).y(r)},u.lineX1=function(){return c().x(e).y(n)},u.defined=function(t){return arguments.length?(i="function"==typeof t?t:cx(!!t),u):i},u.curve=function(t){return arguments.length?(o=t,null!=a&&(s=o(a)),u):o},u.context=function(t){return arguments.length?(null==t?a=s=null:s=o(a=t),u):a},u},Ix=function(t,e){return et?1:e>=t?0:NaN},Rx=function(t){return t},Bx=function(){var t=Rx,e=Ix,n=null,r=cx(0),i=cx(bx),a=cx(0);function o(o){var s,u,c,l,f,h=o.length,d=0,p=new Array(h),y=new Array(h),g=+r.apply(this,arguments),m=Math.min(bx,Math.max(-bx,i.apply(this,arguments)-g)),v=Math.min(Math.abs(m)/h,a.apply(this,arguments)),b=v*(m<0?-1:1);for(s=0;s0&&(d+=f);for(null!=e?p.sort((function(t,n){return e(y[t],y[n])})):null!=n&&p.sort((function(t,e){return n(o[t],o[e])})),s=0,c=d?(m-h*b)/d:0;s0?f*c:0)+b,y[u]={data:o[u],index:s,value:f,startAngle:g,endAngle:l,padAngle:v};return y}return o.value=function(e){return arguments.length?(t="function"==typeof e?e:cx(+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:cx(+t),o):r},o.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:cx(+t),o):i},o.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:cx(+t),o):a},o},jx=Yx(Nx);function zx(t){this._curve=t}function Yx(t){function e(e){return new zx(t(e))}return e._curve=t,e}function Ux(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(Yx(t)):e()._curve},t}zx.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 $x=function(){return Ux(Fx().curve(jx))},Vx=function(){var t=Px().curve(jx),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 Ux(n())},delete t.lineX0,t.lineEndAngle=function(){return Ux(r())},delete t.lineX1,t.lineInnerRadius=function(){return Ux(i())},delete t.lineY0,t.lineOuterRadius=function(){return Ux(a())},delete t.lineY1,t.curve=function(t){return arguments.length?e(Yx(t)):e()._curve},t},Gx=function(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]},Wx=Array.prototype.slice;function Hx(t){return t.source}function qx(t){return t.target}function Zx(t){var e=Hx,n=qx,r=Dx,i=Lx,a=null;function o(){var o,s=Wx.call(arguments),u=e.apply(this,s),c=n.apply(this,s);if(a||(a=o=Yi()),t(a,+r.apply(this,(s[0]=u,s)),+i.apply(this,s),+r.apply(this,(s[0]=c,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:cx(+t),o):r},o.y=function(t){return arguments.length?(i="function"==typeof t?t:cx(+t),o):i},o.context=function(t){return arguments.length?(a=null==t?null:t,o):a},o}function Xx(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e=(e+r)/2,n,e,i,r,i)}function Jx(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e,n=(n+i)/2,r,n,r,i)}function Qx(t,e,n,r,i){var a=Gx(e,n),o=Gx(e,n=(n+i)/2),s=Gx(r,n),u=Gx(r,i);t.moveTo(a[0],a[1]),t.bezierCurveTo(o[0],o[1],s[0],s[1],u[0],u[1])}function Kx(){return Zx(Xx)}function t_(){return Zx(Jx)}function e_(){var t=Zx(Qx);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}var n_={draw:function(t,e){var n=Math.sqrt(e/mx);t.moveTo(n,0),t.arc(0,0,n,0,bx)}},r_={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()}},i_=Math.sqrt(1/3),a_=2*i_,o_={draw:function(t,e){var n=Math.sqrt(e/a_),r=n*i_;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}},s_=Math.sin(mx/10)/Math.sin(7*mx/10),u_=Math.sin(bx/10)*s_,c_=-Math.cos(bx/10)*s_,l_={draw:function(t,e){var n=Math.sqrt(.8908130915292852*e),r=u_*n,i=c_*n;t.moveTo(0,-n),t.lineTo(r,i);for(var a=1;a<5;++a){var o=bx*a/5,s=Math.cos(o),u=Math.sin(o);t.lineTo(u*n,-s*n),t.lineTo(s*r-u*i,u*r+s*i)}t.closePath()}},f_={draw:function(t,e){var n=Math.sqrt(e),r=-n/2;t.rect(r,r,n,n)}},h_=Math.sqrt(3),d_={draw:function(t,e){var n=-Math.sqrt(e/(3*h_));t.moveTo(0,2*n),t.lineTo(-h_*n,-n),t.lineTo(h_*n,-n),t.closePath()}},p_=Math.sqrt(3)/2,y_=1/Math.sqrt(12),g_=3*(y_/2+1),m_={draw:function(t,e){var n=Math.sqrt(e/g_),r=n/2,i=n*y_,a=r,o=n*y_+n,s=-a,u=o;t.moveTo(r,i),t.lineTo(a,o),t.lineTo(s,u),t.lineTo(-.5*r-p_*i,p_*r+-.5*i),t.lineTo(-.5*a-p_*o,p_*a+-.5*o),t.lineTo(-.5*s-p_*u,p_*s+-.5*u),t.lineTo(-.5*r+p_*i,-.5*i-p_*r),t.lineTo(-.5*a+p_*o,-.5*o-p_*a),t.lineTo(-.5*s+p_*u,-.5*u-p_*s),t.closePath()}},v_=[n_,r_,o_,f_,l_,d_,m_],b_=function(){var t=cx(n_),e=cx(64),n=null;function r(){var r;if(n||(n=r=Yi()),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:cx(e),r):t},r.size=function(t){return arguments.length?(e="function"==typeof t?t:cx(+t),r):e},r.context=function(t){return arguments.length?(n=null==t?null:t,r):n},r},x_=function(){};function __(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 w_(t){this._context=t}w_.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:__(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:__(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};var k_=function(t){return new w_(t)};function E_(t){this._context=t}E_.prototype={areaStart:x_,areaEnd:x_,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:__(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};var S_=function(t){return new E_(t)};function A_(t){this._context=t}A_.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:__(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};var T_=function(t){return new A_(t)};function M_(t,e){this._basis=new w_(t),this._beta=e}M_.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,u=-1;++u<=n;)r=u/n,this._basis.point(this._beta*t[u]+(1-this._beta)*(i+r*o),this._beta*e[u]+(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 C_=function t(e){function n(t){return 1===e?new w_(t):new M_(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function O_(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 N_(t,e){this._context=t,this._k=(1-e)/6}N_.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:O_(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:O_(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 D_=function t(e){function n(t){return new N_(t,e)}return n.tension=function(e){return t(+e)},n}(0);function L_(t,e){this._context=t,this._k=(1-e)/6}L_.prototype={areaStart:x_,areaEnd:x_,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:O_(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 F_=function t(e){function n(t){return new L_(t,e)}return n.tension=function(e){return t(+e)},n}(0);function P_(t,e){this._context=t,this._k=(1-e)/6}P_.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:O_(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 I_=function t(e){function n(t){return new P_(t,e)}return n.tension=function(e){return t(+e)},n}(0);function R_(t,e,n){var r=t._x1,i=t._y1,a=t._x2,o=t._y2;if(t._l01_a>1e-12){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,u=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/u,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/u}if(t._l23_a>1e-12){var c=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*c+t._x1*t._l23_2a-e*t._l12_2a)/l,o=(o*c+t._y1*t._l23_2a-n*t._l12_2a)/l}t._context.bezierCurveTo(r,i,a,o,t._x2,t._y2)}function B_(t,e){this._context=t,this._alpha=e}B_.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:R_(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 j_=function t(e){function n(t){return e?new B_(t,e):new N_(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function z_(t,e){this._context=t,this._alpha=e}z_.prototype={areaStart:x_,areaEnd:x_,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:R_(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 Y_=function t(e){function n(t){return e?new z_(t,e):new L_(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function U_(t,e){this._context=t,this._alpha=e}U_.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:R_(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 $_=function t(e){function n(t){return e?new U_(t,e):new P_(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function V_(t){this._context=t}V_.prototype={areaStart:x_,areaEnd:x_,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 G_=function(t){return new V_(t)};function W_(t){return t<0?-1:1}function H_(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(W_(a)+W_(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function q_(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Z_(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 X_(t){this._context=t}function J_(t){this._context=new Q_(t)}function Q_(t){this._context=t}function K_(t){return new X_(t)}function tw(t){return new J_(t)}function ew(t){this._context=t}function nw(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 aw=function(t){return new iw(t,.5)};function ow(t){return new iw(t,0)}function sw(t){return new iw(t,1)}var uw=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 lw(t,e){return t[e]}var fw=function(){var t=cx([]),e=cw,n=uw,r=lw;function i(i){var a,o,s=t.apply(this,arguments),u=i.length,c=s.length,l=new Array(c);for(a=0;a0){for(var n,r,i,a=0,o=t[0].length;a0)for(var n,r,i,a,o,s,u=0,c=t[e[0]].length;u0?(r[0]=a,r[1]=a+=i):i<0?(r[1]=o,r[0]=o+=i):(r[0]=0,r[1]=i)},pw=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 vw=function(t){var e=t.map(bw);return cw(t).sort((function(t,n){return e[t]-e[n]}))};function bw(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-u,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-c,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]=[u+l*h,c+l*d]),f<1&&(t[1]=[u+f*h,c+f*d]),!0)}}}}}function jw(t,e,n,r,i){var a=t[1];if(a)return!0;var o,s,u=t[0],c=t.left,l=t.right,f=c[0],h=c[1],d=l[0],p=l[1],y=(f+d)/2,g=(h+p)/2;if(p===h){if(y=r)return;if(f>d){if(u){if(u[1]>=i)return}else u=[y,n];a=[y,i]}else{if(u){if(u[1]1)if(f>d){if(u){if(u[1]>=i)return}else u=[(n-s)/o,n];a=[(i-s)/o,i]}else{if(u){if(u[1]=r)return}else u=[e,o*e+s];a=[r,o*r+s]}else{if(u){if(u[0]=-sk)){var d=u*u+c*c,p=l*l+f*f,y=(f*d-c*p)/h,g=(u*p-l*d)/h,m=Vw.pop()||new Gw;m.arc=t,m.site=i,m.x=y+o,m.y=(m.cy=g+s)+Math.sqrt(y*y+g*g),t.circle=m;for(var v=null,b=ik._;b;)if(m.yok)s=s.L;else{if(!((i=a-ek(s,o))>ok)){r>-ok?(e=s.P,n=s):i>-ok?(e=s,n=s.N):e=n=s;break}if(!s.R){e=s;break}s=s.R}!function(t){rk[t.index]={site:t,halfedges:[]}}(t);var u=Xw(t);if(nk.insert(e,u),e||n){if(e===n)return Hw(e),n=Xw(e.site),nk.insert(u,n),u.edge=n.edge=Pw(e.site,u.site),Ww(e),void Ww(n);if(n){Hw(e),Hw(n);var c=e.site,l=c[0],f=c[1],h=t[0]-l,d=t[1]-f,p=n.site,y=p[0]-l,g=p[1]-f,m=2*(h*g-d*y),v=h*h+d*d,b=y*y+g*g,x=[(g*v-d*b)/m+l,(h*b-y*v)/m+f];Rw(n.edge,c,p,x),u.edge=Pw(c,t,null,x),n.edge=Pw(t,p,null,x),Ww(e),Ww(n)}else u.edge=Pw(e.site,u.site)}}function tk(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],u=n[1],c=u-e;if(!c)return s;var l=s-r,f=1/a-1/c,h=l/c;return f?(-h+Math.sqrt(h*h-2*f*(l*l/(-2*c)-u+c/2+i-a/2)))/f+r:(r+s)/2}function ek(t,e){var n=t.N;if(n)return tk(n,e);var r=t.site;return r[1]===e?r[0]:1/0}var nk,rk,ik,ak,ok=1e-6,sk=1e-12;function uk(t,e){return e[1]-t[1]||e[0]-t[0]}function ck(t,e){var n,r,i,a=t.sort(uk).pop();for(ak=[],rk=new Array(t.length),nk=new Fw,ik=new Fw;;)if(i=$w,a&&(!i||a[1]ok||Math.abs(i[0][1]-i[1][1])>ok)||delete ak[a]}(o,s,u,c),function(t,e,n,r){var i,a,o,s,u,c,l,f,h,d,p,y,g=rk.length,m=!0;for(i=0;iok||Math.abs(y-h)>ok)&&(u.splice(s,0,ak.push(Iw(o,d,Math.abs(p-t)ok?[t,Math.abs(f-t)ok?[Math.abs(h-r)ok?[n,Math.abs(f-n)ok?[Math.abs(h-e)=s)return null;var u=t-i.site[0],c=e-i.site[1],l=u*u+c*c;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 u=t-s[0],c=e-s[1],f=u*u+c*c;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 Ek=function(){var t,e,n=vk,r=bk,i=kk,a=_k,o=wk,s=[0,1/0],u=[[-1/0,-1/0],[1/0,1/0]],c=250,l=cp,f=lt("start","zoom","end"),h=0;function d(t){t.property("__zoom",xk).on("wheel.zoom",x).on("mousedown.zoom",_).on("dblclick.zoom",w).filter(o).on("touchstart.zoom",k).on("touchmove.zoom",E).on("touchend.zoom touchcancel.zoom",S).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(t,e){return(e=Math.max(s[0],Math.min(s[1],e)))===t.k?t:new dk(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 dk(t.k,r,i)}function g(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(){v(this,arguments).start()})).on("interrupt.zoom end.zoom",(function(){v(this,arguments).end()})).tween("zoom",(function(){var t=this,i=arguments,a=v(t,i),o=r.apply(t,i),s=null==n?g(o):"function"==typeof n?n.apply(t,i):n,u=Math.max(o[1][0]-o[0][0],o[1][1]-o[0][1]),c=t.__zoom,f="function"==typeof e?e.apply(t,i):e,h=l(c.invert(s).concat(u/c.k),f.invert(s).concat(u/f.k));return function(t){if(1===t)t=f;else{var e=h(t),n=u/e[2];t=new dk(n,s[0]-e[0]*n,s[1]-e[1]*n)}a.zoom(null,t)}}))}function v(t,e,n){return!n&&t.__zooming||new b(t,e)}function b(t,e){this.that=t,this.args=e,this.active=0,this.extent=r.apply(t,e),this.taps=0}function x(){if(n.apply(this,arguments)){var t=v(this,arguments),e=this.__zoom,r=Math.max(s[0],Math.min(s[1],e.k*Math.pow(2,a.apply(this,arguments)))),o=Nn(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)],ar(this),t.start()}mk(),t.wheel=setTimeout(c,150),t.zoom("mouse",i(y(p(e,r),t.mouse[0],t.mouse[1]),t.extent,u))}function c(){t.wheel=null,t.end()}}function _(){if(!e&&n.apply(this,arguments)){var t=v(this,arguments,!0),r=we(ue.view).on("mousemove.zoom",c,!0).on("mouseup.zoom",l,!0),a=Nn(this),o=ue.clientX,s=ue.clientY;Se(ue.view),gk(),t.mouse=[a,this.__zoom.invert(a)],ar(this),t.start()}function c(){if(mk(),!t.moved){var e=ue.clientX-o,n=ue.clientY-s;t.moved=e*e+n*n>h}t.zoom("mouse",i(y(t.that.__zoom,t.mouse[0]=Nn(t.that),t.mouse[1]),t.extent,u))}function l(){r.on("mousemove.zoom mouseup.zoom",null),Ae(ue.view,t.moved),mk(),t.end()}}function w(){if(n.apply(this,arguments)){var t=this.__zoom,e=Nn(this),a=t.invert(e),o=t.k*(ue.shiftKey?.5:2),s=i(y(p(t,o),e,a),r.apply(this,arguments),u);mk(),c>0?we(this).transition().duration(c).call(m,s,e):we(this).call(d.transform,s)}}function k(){if(n.apply(this,arguments)){var e,r,i,a,o=ue.touches,s=o.length,u=v(this,arguments,ue.changedTouches.length===s);for(gk(),r=0;rf&&M.push("'"+this.terminals_[S]+"'");O=p.showPosition?"Parse error on line "+(u+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(u+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:m,expected:M})}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):(c=p.yyleng,s=p.yytext,u=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(A=this.productions_[k[1]][1],C.$=i[i.length-A],C._$={first_line:a[a.length-(A||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(A||1)].first_column,last_column:a[a.length-1].last_column},v&&(C._$.range=[a[a.length-(A||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(C,[s,c,u,y.yy,k[1],i,a].concat(d))))return E;A&&(n=n.slice(0,-1*A*2),i=i.slice(0,-1*A),a=a.slice(0,-1*A)),n.push(this.productions_[k[1]][0]),i.push(C.$),a.push(C._$),T=o[n[n.length-2]][n[n.length-1]],n.push(T);break;case 3:return!0}}return!0}},A={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(){return this.next()||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 5;case 1:case 2:case 3:case 4:break;case 5:return this.begin("ID"),10;case 6:return e.yytext=e.yytext.trim(),this.begin("ALIAS"),42;case 7:return this.popState(),this.popState(),this.begin("LINE"),12;case 8:return this.popState(),this.popState(),5;case 9:return this.begin("LINE"),21;case 10:return this.begin("LINE"),23;case 11:return this.begin("LINE"),24;case 12:return this.begin("LINE"),25;case 13:return this.begin("LINE"),30;case 14:return this.begin("LINE"),27;case 15:return this.begin("LINE"),29;case 16:return this.popState(),13;case 17:return 22;case 18:return 37;case 19:return 38;case 20:return 33;case 21:return 31;case 22:return this.begin("ID"),16;case 23:return this.begin("ID"),17;case 24:return 19;case 25:return 6;case 26:return 15;case 27:return 36;case 28:return 5;case 29:return e.yytext=e.yytext.trim(),42;case 30:return 45;case 31:return 46;case 32:return 43;case 33:return 44;case 34:return 47;case 35:return 48;case 36:return 49;case 37:return 40;case 38:return 41;case 39:return 5;case 40:return"INVALID"}},rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/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,/^(?:[^#\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,;]+)/i,/^(?:->>)/i,/^(?:-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?::[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[2,3,16],inclusive:!1},ALIAS:{rules:[2,3,7,8],inclusive:!1},ID:{rules:[2,3,6],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,9,10,11,12,13,14,15,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40],inclusive:!0}}};function T(){this.yy={}}return S.lexer=A,T.prototype=S,S.Parser=T,new T}();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(14).readFileSync(n(15).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(13),n(6)(t))},function(t,e,n){var r=n(169);t.exports={Graph:r.Graph,json:n(272),alg:n(273),version:r.version}},function(t,e,n){var r;try{r={cloneDeep:n(284),constant:n(78),defaults:n(137),each:n(79),filter:n(111),find:n(285),flatten:n(139),forEach:n(109),forIn:n(290),has:n(85),isUndefined:n(122),last:n(291),map:n(123),mapValues:n(292),max:n(293),merge:n(295),min:n(300),minBy:n(301),now:n(302),pick:n(144),range:n(145),reduce:n(125),sortBy:n(309),uniqueId:n(146),values:n(130),zipObject:n(314)}}catch(t){}r||(r=window._),t.exports=r},function(t,e){var n=Array.isArray;t.exports=n},function(t,e,n){ /** * @license * Copyright (c) 2012-2013 Chris Pettitt * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ t.exports={graphlib:n(282),dagre:n(136),intersect:n(339),render:n(341),util:n(10),version:n(353)}},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){"use strict";var r=n(3),i=n(12).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,u=t.width/2,c=t.height/2;if(!o&&!s)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(s)*u>Math.abs(o)*c?(s<0&&(c=-c),n=c*o/s,r=c):(o<0&&(u=-u),n=u,r=u*s/o),{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};return arguments.length>=4&&(i.rank=n,i.order=r),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(170),constant:n(78),each:n(79),filter:n(111),has:n(85),isArray:n(4),isEmpty:n(247),isFunction:n(31),isUndefined:n(122),keys:n(25),map:n(123),reduce:n(125),size:n(250),transform:n(256),union:n(257),values:n(130)}}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(37);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){var r=n(92),i="object"==typeof self&&self&&self.Object===Object&&self,a=r||i||Function("return this")();t.exports=a},function(t,e,n){var r;try{r=n(2)}catch(t){}r||(r=window.graphlib),t.exports=r},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 u,c=[],l=!1,f=-1;function h(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&d())}function d(){if(!l){var t=s(h);l=!0;for(var e=c.length;e;){for(u=c,c=[];++f1)for(var n=1;n=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,u=0;u=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(168))},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},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,4],i=[2,4],a=[1,9],o=[1,11],s=[1,13],u=[1,14],c=[1,15],l=[1,16],f=[1,21],h=[1,17],d=[1,18],p=[1,19],y=[1,20],g=[1,22],m=[1,4,5,13,14,16,18,19,21,22,23,24,25,28],v=[1,4,5,11,12,13,14,16,18,19,21,22,23,24,25,28],b=[4,5,13,14,16,18,19,21,22,23,24,25,28],x={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,idStatement:10,DESCR:11,"--\x3e":12,HIDE_EMPTY:13,scale:14,WIDTH:15,COMPOSIT_STATE:16,STRUCT_START:17,STRUCT_STOP:18,STATE_DESCR:19,AS:20,ID:21,FORK:22,JOIN:23,CONCURRENT:24,note:25,notePosition:26,NOTE_TEXT:27,EDGE_STATE:28,left_of:29,right_of:30,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",11:"DESCR",12:"--\x3e",13:"HIDE_EMPTY",14:"scale",15:"WIDTH",16:"COMPOSIT_STATE",17:"STRUCT_START",18:"STRUCT_STOP",19:"STATE_DESCR",20:"AS",21:"ID",22:"FORK",23:"JOIN",24:"CONCURRENT",25:"note",27:"NOTE_TEXT",28:"EDGE_STATE",29:"left_of",30:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,4],[9,4],[10,1],[10,1],[26,1],[26,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 3:return r.setRootDoc(a[s]),a[s];case 4:this.$=[];break;case 5:"nl"!=a[s]&&(a[s-1].push(a[s]),this.$=a[s-1]);break;case 6:case 7:this.$=a[s];break;case 8:this.$="nl";break;case 9:this.$={stmt:"state",id:a[s],type:"default",description:""};break;case 10:this.$={stmt:"state",id:a[s-1],type:"default",description:r.trimColon(a[s])};break;case 11:this.$={stmt:"relation",state1:{stmt:"state",id:a[s-2],type:"default",description:""},state2:{stmt:"state",id:a[s],type:"default",description:""}};break;case 12:this.$={stmt:"relation",state1:{stmt:"state",id:a[s-3],type:"default",description:""},state2:{stmt:"state",id:a[s-1],type:"default",description:""},description:a[s].substr(1).trim()};break;case 16:this.$={stmt:"state",id:a[s-3],type:"default",description:"",doc:a[s-1]};break;case 17:var u=a[s],c=a[s-2].trim();if(a[s].match(":")){var l=a[s].split(":");u=l[0],c=[c,l[1]]}this.$={stmt:"state",id:u,type:"default",description:c};break;case 18:this.$={stmt:"state",id:a[s-3],type:"default",description:a[s-5],doc:a[s-1]};break;case 19:this.$={stmt:"state",id:a[s],type:"fork"};break;case 20:this.$={stmt:"state",id:a[s],type:"join"};break;case 21:this.$={stmt:"state",id:r.getDividerId(),type:"divider"};break;case 22:this.$={stmt:"state",id:a[s-1].trim(),note:{position:a[s-2].trim(),text:a[s].trim()}};break;case 24:case 25:this.$=a[s]}},table:[{3:1,4:e,5:n,6:r},{1:[3]},{3:5,4:e,5:n,6:r},{3:6,4:e,5:n,6:r},t([1,4,5,13,14,16,19,21,22,23,24,25,28],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:a,5:o,8:8,9:10,10:12,13:s,14:u,16:c,19:l,21:f,22:h,23:d,24:p,25:y,28:g},t(m,[2,5]),{9:23,10:12,13:s,14:u,16:c,19:l,21:f,22:h,23:d,24:p,25:y,28:g},t(m,[2,7]),t(m,[2,8]),t(m,[2,9],{11:[1,24],12:[1,25]}),t(m,[2,13]),{15:[1,26]},t(m,[2,15],{17:[1,27]}),{20:[1,28]},t(m,[2,19]),t(m,[2,20]),t(m,[2,21]),{26:29,27:[1,30],29:[1,31],30:[1,32]},t(v,[2,24]),t(v,[2,25]),t(m,[2,6]),t(m,[2,10]),{10:33,21:f,28:g},t(m,[2,14]),t(b,i,{7:34}),{21:[1,35]},{21:[1,36]},{20:[1,37]},{21:[2,26]},{21:[2,27]},t(m,[2,11],{11:[1,38]}),{4:a,5:o,8:8,9:10,10:12,13:s,14:u,16:c,18:[1,39],19:l,21:f,22:h,23:d,24:p,25:y,28:g},t(m,[2,17],{17:[1,40]}),{27:[1,41]},{21:[1,42]},t(m,[2,12]),t(m,[2,16]),t(b,i,{7:43}),t(m,[2,22]),t(m,[2,23]),{4:a,5:o,8:8,9:10,10:12,13:s,14:u,16:c,18:[1,44],19:l,21:f,22:h,23:d,24:p,25:y,28:g},t(m,[2,18])],defaultActions:{5:[2,1],6:[2,2],31:[2,26],32:[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="",u=0,c=0,l=0,f=2,h=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=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 y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,w,k,E,S,A,T,M,C={};;){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(S in M=[],o[w])this.terminals_[S]&&S>f&&M.push("'"+this.terminals_[S]+"'");O=p.showPosition?"Parse error on line "+(u+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(u+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:m,expected:M})}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):(c=p.yyleng,s=p.yytext,u=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(A=this.productions_[k[1]][1],C.$=i[i.length-A],C._$={first_line:a[a.length-(A||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(A||1)].first_column,last_column:a[a.length-1].last_column},v&&(C._$.range=[a[a.length-(A||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(C,[s,c,u,y.yy,k[1],i,a].concat(d))))return E;A&&(n=n.slice(0,-1*A*2),i=i.slice(0,-1*A),a=a.slice(0,-1*A)),n.push(this.productions_[k[1]][0]),i.push(C.$),a.push(C._$),T=o[n[n.length-2]][n[n.length-1]],n.push(T);break;case 3:return!0}}return!0}},_={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(){return this.next()||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 5;case 1:case 2:case 3:case 4:break;case 5:return this.pushState("SCALE"),14;case 6:return 15;case 7:this.popState();break;case 8:this.pushState("STATE");break;case 9:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),22;case 10:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),23;case 11:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),22;case 12:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),23;case 13:this.begin("STATE_STRING");break;case 14:return this.popState(),this.pushState("STATE_ID"),"AS";case 15:return this.popState(),"ID";case 16:this.popState();break;case 17:return"STATE_DESCR";case 18:return 16;case 19:this.popState();break;case 20:return this.popState(),this.pushState("struct"),17;case 21:return this.popState(),18;case 22:break;case 23:return this.begin("NOTE"),25;case 24:return this.popState(),this.pushState("NOTE_ID"),29;case 25:return this.popState(),this.pushState("NOTE_ID"),30;case 26:this.popState(),this.pushState("FLOATING_NOTE");break;case 27:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 28:break;case 29:return"NOTE_TEXT";case 30:return this.popState(),"ID";case 31:return this.popState(),this.pushState("NOTE_TEXT"),21;case 32:return this.popState(),e.yytext=e.yytext.substr(2).trim(),27;case 33:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),27;case 34:case 35:return 6;case 36:return 13;case 37:return 28;case 38:return 21;case 39:return e.yytext=e.yytext.trim(),11;case 40:return 12;case 41:return 24;case 42:return 5;case 43:return"INVALID"}},rules:[/^(?:[\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:[2,3],inclusive:!1},struct:{rules:[2,3,8,21,22,23,37,38,39,40,41],inclusive:!1},FLOATING_NOTE_ID:{rules:[30],inclusive:!1},FLOATING_NOTE:{rules:[27,28,29],inclusive:!1},NOTE_TEXT:{rules:[32,33],inclusive:!1},NOTE_ID:{rules:[31],inclusive:!1},NOTE:{rules:[24,25,26],inclusive:!1},SCALE:{rules:[6,7],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[15],inclusive:!1},STATE_STRING:{rules:[16,17],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[2,3,9,10,11,12,13,14,18,19,20],inclusive:!1},ID:{rules:[2,3],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,8,20,23,34,35,36,37,38,39,40,42,43],inclusive:!0}}};function w(){this.yy={}}return x.lexer=_,w.prototype=x,x.Parser=w,new w}();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(14).readFileSync(n(15).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(13),n(6)(t))},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 u(t){return"number"==typeof t||"[object Number]"===Object.prototype.toString.call(t)}function c(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;rgt(t)?(a=t+1,s-gt(t)):(a=t,s),{year:a,dayOfYear:o}}function Pt(t,e,n){var r,i,a=Lt(t.year(),e,n),o=Math.floor((t.dayOfYear()-a-1)/7)+1;return o<1?r=o+It(i=t.year()-1,e,n):o>It(t.year(),e,n)?(r=o-It(t.year(),e,n),i=t.year()+1):(i=t.year(),r=o),{week:r,year:i}}function It(t,e,n){var r=Lt(t,e,n),i=Lt(t+1,e,n);return(gt(t)-r+i)/7}function Rt(t,e){return t.slice(e,7).concat(t.slice(0,e))}V("w",["ww",2],"wo","week"),V("W",["WW",2],"Wo","isoWeek"),F("week","w"),F("isoWeek","W"),B("week",5),B("isoWeek",5),lt("w",Q),lt("ww",Q,q),lt("W",Q),lt("WW",Q,q),yt(["w","ww","W","WW"],(function(t,e,n,r){e[r.substr(0,1)]=k(t)})),V("d",0,"do","day"),V("dd",0,0,(function(t){return this.localeData().weekdaysMin(this,t)})),V("ddd",0,0,(function(t){return this.localeData().weekdaysShort(this,t)})),V("dddd",0,0,(function(t){return this.localeData().weekdays(this,t)})),V("e",0,0,"weekday"),V("E",0,0,"isoWeekday"),F("day","d"),F("weekday","e"),F("isoWeekday","E"),B("day",11),B("weekday",11),B("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)})),yt(["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})),yt(["d","e","E"],(function(t,e,n,r){e[r]=k(t)}));var Bt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),jt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),zt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Yt=ut,Ut=ut,$t=ut;function Vt(){function t(t,e){return e.length-t.length}var e,n,r,i,a,o=[],s=[],u=[],c=[];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),u.push(a),c.push(r),c.push(i),c.push(a);for(o.sort(t),s.sort(t),u.sort(t),c.sort(t),e=0;e<7;e++)s[e]=ht(s[e]),u[e]=ht(u[e]),c[e]=ht(c[e]);this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function Gt(){return this.hours()%12||12}function Wt(t,e){V(t,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)}))}function Ht(t,e){return e._meridiemParse}V("H",["HH",2],0,"hour"),V("h",["hh",2],0,Gt),V("k",["kk",2],0,(function(){return this.hours()||24})),V("hmm",0,0,(function(){return""+Gt.apply(this)+j(this.minutes(),2)})),V("hmmss",0,0,(function(){return""+Gt.apply(this)+j(this.minutes(),2)+j(this.seconds(),2)})),V("Hmm",0,0,(function(){return""+this.hours()+j(this.minutes(),2)})),V("Hmmss",0,0,(function(){return""+this.hours()+j(this.minutes(),2)+j(this.seconds(),2)})),Wt("a",!0),Wt("A",!1),F("hour","h"),B("hour",13),lt("a",Ht),lt("A",Ht),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"],3),pt(["k","kk"],(function(t,e,n){var r=k(t);e[3]=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[3]=k(t),p(n).bigHour=!0})),pt("hmm",(function(t,e,n){var r=t.length-2;e[3]=k(t.substr(0,r)),e[4]=k(t.substr(r)),p(n).bigHour=!0})),pt("hmmss",(function(t,e,n){var r=t.length-4,i=t.length-2;e[3]=k(t.substr(0,r)),e[4]=k(t.substr(r,2)),e[5]=k(t.substr(i)),p(n).bigHour=!0})),pt("Hmm",(function(t,e,n){var r=t.length-2;e[3]=k(t.substr(0,r)),e[4]=k(t.substr(r))})),pt("Hmmss",(function(t,e,n){var r=t.length-4,i=t.length-2;e[3]=k(t.substr(0,r)),e[4]=k(t.substr(r,2)),e[5]=k(t.substr(i))}));var qt,Zt=xt("Hours",!0),Xt={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:St,monthsShort:At,week:{dow:0,doy:6},weekdays:Bt,weekdaysMin:zt,weekdaysShort:jt,meridiemParse:/[ap]\.?m?\.?/i},Jt={},Qt={};function Kt(t){return t?t.toLowerCase().replace("_","-"):t}function te(e){var r=null;if(!Jt[e]&&void 0!==t&&t&&t.exports)try{r=qt._abbr,n(167)("./"+e),ee(r)}catch(e){}return Jt[e]}function ee(t,e){var n;return t&&((n=s(e)?re(t):ne(t,e))?qt=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),qt._abbr}function ne(t,e){if(null===e)return delete Jt[t],null;var n,r=Xt;if(e.abbr=t,null!=Jt[t])C("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=Jt[t]._config;else if(null!=e.parentLocale)if(null!=Jt[e.parentLocale])r=Jt[e.parentLocale]._config;else{if(null==(n=te(e.parentLocale)))return Qt[e.parentLocale]||(Qt[e.parentLocale]=[]),Qt[e.parentLocale].push({name:t,config:e}),null;r=n._config}return Jt[t]=new D(N(r,e)),Qt[t]&&Qt[t].forEach((function(t){ne(t.name,t.config)})),ee(t),Jt[t]}function re(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return qt;if(!a(t)){if(e=te(t))return e;t=[t]}return function(t){for(var e,n,r,i,a=0;a=e&&E(i,n,!0)>=e-1)break;e--}a++}return qt}(t)}function ie(t){var e,n=t._a;return n&&-2===p(t).overflow&&(e=n[1]<0||11kt(n[0],n[1])?2:n[3]<0||24It(n,a,o)?p(t)._overflowWeeks=!0:null!=u?p(t)._overflowWeekday=!0:(s=Ft(n,r,i,a,o),t._a[0]=s.year,t._dayOfYear=s.dayOfYear)}(t),null!=t._dayOfYear&&(o=ae(t._a[0],r[0]),(t._dayOfYear>gt(o)||0===t._dayOfYear)&&(p(t)._overflowDayOfYear=!0),n=Dt(o,0,t._dayOfYear),t._a[1]=n.getUTCMonth(),t._a[2]=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[3]&&0===t._a[4]&&0===t._a[5]&&0===t._a[6]&&(t._nextDay=!0,t._a[3]=0),t._d=(t._useUTC?Dt: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[3]=24),t._w&&void 0!==t._w.d&&t._w.d!==a&&(p(t).weekdayMismatch=!0)}}var se=/^\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)?)?$/,ue=/^\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)?)?$/,ce=/Z|[+-]\d\d(?::?\d\d)?/,le=[["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}/]],fe=[["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/]],he=/^\/?Date\((\-?\d+)/i;function de(t){var e,n,r,i,a,o,s=t._i,u=se.exec(s)||ue.exec(s);if(u){for(p(t).iso=!0,e=0,n=le.length;en.valueOf():n.valueOf()this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},on.isLocal=function(){return!!this.isValid()&&!this._isUTC},on.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},on.isUtc=Le,on.isUTC=Le,on.zoneAbbr=function(){return this._isUTC?"UTC":""},on.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},on.dates=A("dates accessor is deprecated. Use date instead.",Ke),on.months=A("months accessor is deprecated. Use month instead",Mt),on.years=A("years accessor is deprecated. Use year instead",bt),on.zone=A("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()})),on.isDSTShifted=A("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(v(t,this),(t=ve(t))._a){var e=t._isUTC?d(t._a):xe(t._a);this._isDSTShifted=this.isValid()&&0f&&M.push("'"+this.terminals_[S]+"'");O=p.showPosition?"Parse error on line "+(u+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(u+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:m,expected:M})}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):(c=p.yyleng,s=p.yytext,u=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(A=this.productions_[k[1]][1],C.$=i[i.length-A],C._$={first_line:a[a.length-(A||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(A||1)].first_column,last_column:a[a.length-1].last_column},v&&(C._$.range=[a[a.length-(A||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(C,[s,c,u,y.yy,k[1],i,a].concat(d))))return E;A&&(n=n.slice(0,-1*A*2),i=i.slice(0,-1*A),a=a.slice(0,-1*A)),n.push(this.productions_[k[1]][0]),i.push(C.$),a.push(C._$),T=o[n[n.length-2]][n[n.length-1]],n.push(T);break;case 3:return!0}}return!0}},Vt={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(){return this.next()||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:break;case 1:this.begin("string");break;case 2:this.popState();break;case 3:return"STR";case 4:return 63;case 5:return 72;case 6:return 64;case 7:return 77;case 8:return 65;case 9:return 66;case 10:return 67;case 11:case 12:return t.lex.firstGraph()&&this.begin("dir"),12;case 13:return 26;case 14:return 30;case 15:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 23:case 24:return this.popState(),13;case 25:return 78;case 26:return 86;case 27:return 35;case 28:return 83;case 29:return 34;case 30:return 8;case 31:return 79;case 32:return 97;case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 58:case 59:case 60:return 58;case 61:case 62:case 63:case 64:case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:return 57;case 73:return 39;case 74:return 40;case 75:return 41;case 76:return 42;case 77:return 43;case 78:return 44;case 79:return 45;case 80:return 46;case 81:return 84;case 82:return 87;case 83:return 98;case 84:return 95;case 85:return 88;case 86:case 87:return 96;case 88:return 89;case 89:return 49;case 90:return 69;case 91:return"SEP";case 92:return 68;case 93:return 82;case 94:return 51;case 95:return 50;case 96:return 53;case 97:return 52;case 98:return 93;case 99:return 94;case 100:return 59;case 101:return 37;case 102:return 38;case 103:return 28;case 104:return 29;case 105:return 47;case 106:return 48;case 107:return 104;case 108:return 9;case 109:return 10;case 110:return 11}},rules:[/^(?:%%[^\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*)/,/^(?:\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*--[x]\s*)/,/^(?:\s*-->\s*)/,/^(?:\s*<-->\s*)/,/^(?:\s*[x]--[x]\s*)/,/^(?:\s*[o]--[o]\s*)/,/^(?:\s*[o]\.-[o]\s*)/,/^(?:\s*<==>\s*)/,/^(?:\s*[o]==[o]\s*)/,/^(?:\s*[x]==[x]\s*)/,/^(?:\s*[x].-[x]\s*)/,/^(?:\s*[x]-\.-[x]\s*)/,/^(?:\s*<\.->\s*)/,/^(?:\s*<-\.->\s*)/,/^(?:\s*[o]-\.-[o]\s*)/,/^(?:\s*--[o]\s*)/,/^(?:\s*---\s*)/,/^(?:\s*-\.-[x]\s*)/,/^(?:\s*-\.->\s*)/,/^(?:\s*-\.-[o]\s*)/,/^(?:\s*-\.-\s*)/,/^(?:\s*.-[x]\s*)/,/^(?:\s*\.->\s*)/,/^(?:\s*\.-[o]\s*)/,/^(?:\s*\.-\s*)/,/^(?:\s*==[x]\s*)/,/^(?:\s*==>\s*)/,/^(?:\s*==[o]\s*)/,/^(?:\s*==[\=]\s*)/,/^(?:\s*<--\s*)/,/^(?:\s*[x]--\s*)/,/^(?:\s*[o]--\s*)/,/^(?:\s*<-\.\s*)/,/^(?:\s*[x]-\.\s*)/,/^(?:\s*[o]-\.\s*)/,/^(?:\s*<==\s*)/,/^(?:\s*[x]==\s*)/,/^(?:\s*[o]==\s*)/,/^(?:\s*--\s*)/,/^(?:\s*-\.\s*)/,/^(?:\s*==\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|\r\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{vertex:{rules:[],inclusive:!1},dir:{rules:[15,16,17,18,19,20,21,22,23,24],inclusive:!1},string:{rules:[2,3],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,8,9,10,11,12,13,14,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110],inclusive:!0}}};function Gt(){this.yy={}}return $t.lexer=Vt,Gt.prototype=$t,$t.Parser=Gt,new Gt}();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(14).readFileSync(n(15).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(13),n(6)(t))},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,8,10,11,12,13,14,15,16,17,19,21],n=[1,9],r=[1,10],i=[1,11],a=[1,12],o=[1,13],s=[1,14],u=[1,15],c=[1,17],l=[1,18],f={trace:function(){},yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,dateFormat:11,inclusiveEndDates:12,axisFormat:13,excludes:14,todayMarker:15,title:16,section:17,clickStatement:18,taskTxt:19,taskData:20,click:21,callbackname:22,callbackargs:23,href:24,clickStatementDebug:25,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",11:"dateFormat",12:"inclusiveEndDates",13:"axisFormat",14:"excludes",15:"todayMarker",16:"title",17:"section",19:"taskTxt",20:"taskData",21:"click",22:"callbackname",23:"callbackargs",24:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[18,2],[18,3],[18,3],[18,4],[18,3],[18,4],[18,2],[25,2],[25,3],[25,3],[25,4],[25,3],[25,4],[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:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:r.setDateFormat(a[s].substr(11)),this.$=a[s].substr(11);break;case 9:r.enableInclusiveEndDates(),this.$=a[s].substr(18);break;case 10:r.setAxisFormat(a[s].substr(11)),this.$=a[s].substr(11);break;case 11:r.setExcludes(a[s].substr(9)),this.$=a[s].substr(9);break;case 12:r.setTodayMarker(a[s].substr(12)),this.$=a[s].substr(12);break;case 13:r.setTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 14:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 16:r.addTask(a[s-1],a[s]),this.$="task";break;case 17:this.$=a[s-1],r.setClickEvent(a[s-1],a[s],null);break;case 18:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 19:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],null),r.setLink(a[s-2],a[s]);break;case 20:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-2],a[s-1]),r.setLink(a[s-3],a[s]);break;case 21:this.$=a[s-2],r.setClickEvent(a[s-2],a[s],null),r.setLink(a[s-2],a[s-1]);break;case 22:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-1],a[s]),r.setLink(a[s-3],a[s-2]);break;case 23:this.$=a[s-1],r.setLink(a[s-1],a[s]);break;case 24:case 30:this.$=a[s-1]+" "+a[s];break;case 25:case 26:case 28:this.$=a[s-2]+" "+a[s-1]+" "+a[s];break;case 27:case 29:this.$=a[s-3]+" "+a[s-2]+" "+a[s-1]+" "+a[s]}},table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:n,12:r,13:i,14:a,15:o,16:s,17:u,18:16,19:c,21:l},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:19,11:n,12:r,13:i,14:a,15:o,16:s,17:u,18:16,19:c,21:l},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),{20:[1,20]},{22:[1,21],24:[1,22]},t(e,[2,4]),t(e,[2,16]),t(e,[2,17],{23:[1,23],24:[1,24]}),t(e,[2,23],{22:[1,25]}),t(e,[2,18],{24:[1,26]}),t(e,[2,19]),t(e,[2,21],{23:[1,27]}),t(e,[2,20]),t(e,[2,22])],defaultActions:{},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="",u=0,c=0,l=0,f=2,h=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=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 y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,w,k,E,S,A,T,M,C={};;){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(S in M=[],o[w])this.terminals_[S]&&S>f&&M.push("'"+this.terminals_[S]+"'");O=p.showPosition?"Parse error on line "+(u+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(u+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:m,expected:M})}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):(c=p.yyleng,s=p.yytext,u=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(A=this.productions_[k[1]][1],C.$=i[i.length-A],C._$={first_line:a[a.length-(A||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(A||1)].first_column,last_column:a[a.length-1].last_column},v&&(C._$.range=[a[a.length-(A||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(C,[s,c,u,y.yy,k[1],i,a].concat(d))))return E;A&&(n=n.slice(0,-1*A*2),i=i.slice(0,-1*A),a=a.slice(0,-1*A)),n.push(this.productions_[k[1]][0]),i.push(C.$),a.push(C._$),T=o[n[n.length-2]][n[n.length-1]],n.push(T);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(){return this.next()||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 10;case 1:case 2:case 3:break;case 4:this.begin("href");break;case 5:this.popState();break;case 6:return 24;case 7:this.begin("callbackname");break;case 8:this.popState();break;case 9:this.popState(),this.begin("callbackargs");break;case 10:return 22;case 11:this.popState();break;case 12:return 23;case 13:this.begin("click");break;case 14:this.popState();break;case 15:return 21;case 16:return 4;case 17:return 11;case 18:return 12;case 19:return 13;case 20:return 14;case 21:return 15;case 22:return"date";case 23:return 16;case 24:return 17;case 25:return 19;case 26:return 20;case 27:return":";case 28:return 6;case 29:return"INVALID"}},rules:[/^(?:[\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:{callbackargs:{rules:[11,12],inclusive:!1},callbackname:{rules:[8,9,10],inclusive:!1},href:{rules:[5,6],inclusive:!1},click:{rules:[14,15],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,7,13,16,17,18,19,20,21,22,23,24,25,26,27,28,29],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(14).readFileSync(n(15).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(13),n(6)(t))},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,8,10,11,12,13],n=[1,9],r=[1,10],i=[1,11],a={trace:function(){},yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,title:11,section:12,taskName:13,taskData:14,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NL",11:"title",12:"section",13:"taskName",14:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,1],[9,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:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:r.setTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 9:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 10:r.addTask(a[s-1],a[s]),this.$="task"}},table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:n,12:r,13:i},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:12,11:n,12:r,13:i},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),t(e,[2,9]),{14:[1,13]},t(e,[2,4]),t(e,[2,10])],defaultActions:{},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="",u=0,c=0,l=0,f=2,h=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=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 y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,w,k,E,S,A,T,M,C={};;){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(S in M=[],o[w])this.terminals_[S]&&S>f&&M.push("'"+this.terminals_[S]+"'");O=p.showPosition?"Parse error on line "+(u+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(u+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:m,expected:M})}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):(c=p.yyleng,s=p.yytext,u=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(A=this.productions_[k[1]][1],C.$=i[i.length-A],C._$={first_line:a[a.length-(A||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(A||1)].first_column,last_column:a[a.length-1].last_column},v&&(C._$.range=[a[a.length-(A||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(C,[s,c,u,y.yy,k[1],i,a].concat(d))))return E;A&&(n=n.slice(0,-1*A*2),i=i.slice(0,-1*A),a=a.slice(0,-1*A)),n.push(this.productions_[k[1]][0]),i.push(C.$),a.push(C._$),T=o[n[n.length-2]][n[n.length-1]],n.push(T);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(){return this.next()||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 10;case 1:case 2:case 3:break;case 4:return 4;case 5:return 11;case 6:return 12;case 7:return 13;case 8:return 14;case 9:return":";case 10:return 6;case 11:return"INVALID"}},rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11],inclusive:!0}}};function s(){this.yy={}}return a.lexer=o,s.prototype=a,a.Parser=s,new s}();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(14).readFileSync(n(15).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(13),n(6)(t))},function(t,e,n){var r=n(95),i=n(74),a=n(19);t.exports=function(t){return a(t)?r(t):i(t)}},function(t,e,n){var r;if(!r)try{r=n(0)}catch(t){}r||(r=window.d3),t.exports=r},function(t,e,n){var r=n(181),i=n(187);t.exports=function(t,e){var n=i(t,e);return r(n)?n:void 0}},function(t,e,n){var r=n(32),i=n(183),a=n(184),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){t.exports=function(t){return t}},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,n){var r=n(28),i=n(9);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(11).Symbol;t.exports=r},function(t,e,n){(function(t){var r=n(11),i=n(203),a=e&&!e.nodeType&&e,o=a&&"object"==typeof t&&t&&!t.nodeType&&t,s=o&&o.exports===a?r.Buffer:void 0,u=(s?s.isBuffer:void 0)||i;t.exports=u}).call(this,n(6)(t))},function(t,e,n){var r=n(95),i=n(207),a=n(19);t.exports=function(t){return a(t)?r(t,!0):i(t)}},function(t,e,n){var r=n(212),i=n(69),a=n(213),o=n(104),s=n(214),u=n(28),c=n(93),l=c(r),f=c(i),h=c(a),d=c(o),p=c(s),y=u;(r&&"[object DataView]"!=y(new r(new ArrayBuffer(1)))||i&&"[object Map]"!=y(new i)||a&&"[object Promise]"!=y(a.resolve())||o&&"[object Set]"!=y(new o)||s&&"[object WeakMap]"!=y(new s))&&(y=function(t){var e=u(t),n="[object Object]"==e?t.constructor:void 0,r=n?c(n):"";if(r)switch(r){case l:return"[object DataView]";case f:return"[object Map]";case h:return"[object Promise]";case d:return"[object Set]";case p:return"[object WeakMap]"}return e}),t.exports=y},function(t,e,n){var r=n(28),i=n(16);t.exports=function(t){return"symbol"==typeof t||i(t)&&"[object Symbol]"==r(t)}},function(t,e,n){var r;try{r={defaults:n(137),each:n(79),isFunction:n(31),isPlainObject:n(141),pick:n(144),has:n(85),range:n(145),uniqueId:n(146)}}catch(t){}r||(r=window._),t.exports=r},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,13],n=[1,16],r=[1,14],i=[1,15],a=[1,17],o=[1,18],s=[1,20],u=[1,21],c=[1,22],l=[6,8],f=[1,31],h=[1,32],d=[1,33],p=[1,34],y=[1,35],g=[1,36],m=[6,8,14,20,28,31,32,33,34,35,36],v=[6,8,12,14,20,24,28,31,32,33,34,35,36,52,53,54],b=[28,52,53,54],x=[28,35,36,52,53,54],_=[28,31,32,33,34,52,53,54],w=[6,8,14],k=[1,59],E={trace:function(){},yy:{},symbols_:{error:2,mermaidDoc:3,graphConfig:4,CLASS_DIAGRAM:5,NEWLINE:6,statements:7,EOF:8,statement:9,className:10,alphaNumToken:11,GENERICTYPE:12,relationStatement:13,LABEL:14,classStatement:15,methodStatement:16,annotationStatement:17,clickStatement:18,CLASS:19,STRUCT_START:20,members:21,STRUCT_STOP:22,ANNOTATION_START:23,ANNOTATION_END:24,MEMBER:25,SEPARATOR:26,relation:27,STR:28,relationType:29,lineType:30,AGGREGATION:31,EXTENSION:32,COMPOSITION:33,DEPENDENCY:34,LINE:35,DOTTED_LINE:36,CALLBACK:37,LINK:38,commentToken:39,textToken:40,graphCodeTokens:41,textNoTagsToken:42,TAGSTART:43,TAGEND:44,"==":45,"--":46,PCT:47,DEFAULT:48,SPACE:49,MINUS:50,keywords:51,UNICODE_TEXT:52,NUM:53,ALPHA:54,$accept:0,$end:1},terminals_:{2:"error",5:"CLASS_DIAGRAM",6:"NEWLINE",8:"EOF",12:"GENERICTYPE",14:"LABEL",19:"CLASS",20:"STRUCT_START",22:"STRUCT_STOP",23:"ANNOTATION_START",24:"ANNOTATION_END",25:"MEMBER",26:"SEPARATOR",28:"STR",31:"AGGREGATION",32:"EXTENSION",33:"COMPOSITION",34:"DEPENDENCY",35:"LINE",36:"DOTTED_LINE",37:"CALLBACK",38:"LINK",41:"graphCodeTokens",43:"TAGSTART",44:"TAGEND",45:"==",46:"--",47:"PCT",48:"DEFAULT",49:"SPACE",50:"MINUS",51:"keywords",52:"UNICODE_TEXT",53:"NUM",54:"ALPHA"},productions_:[0,[3,1],[4,4],[7,1],[7,2],[7,3],[10,2],[10,1],[10,3],[10,2],[9,1],[9,2],[9,1],[9,1],[9,1],[9,1],[15,2],[15,5],[17,4],[21,1],[21,2],[16,1],[16,2],[16,1],[16,1],[13,3],[13,4],[13,4],[13,5],[27,3],[27,2],[27,2],[27,1],[29,1],[29,1],[29,1],[29,1],[30,1],[30,1],[18,3],[18,4],[18,3],[18,4],[39,1],[39,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[42,1],[42,1],[42,1],[42,1],[11,1],[11,1],[11,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 6:this.$=a[s-1]+a[s];break;case 7:this.$=a[s];break;case 8:this.$=a[s-2]+"~"+a[s-1]+a[s];break;case 9:this.$=a[s-1]+"~"+a[s];break;case 10:r.addRelation(a[s]);break;case 11:a[s-1].title=r.cleanupLabel(a[s]),r.addRelation(a[s-1]);break;case 16:r.addClass(a[s]);break;case 17:r.addClass(a[s-3]),r.addMembers(a[s-3],a[s-1]);break;case 18:r.addAnnotation(a[s],a[s-2]);break;case 19:this.$=[a[s]];break;case 20:a[s].push(a[s-1]),this.$=a[s];break;case 21:break;case 22:r.addMember(a[s-1],r.cleanupLabel(a[s]));break;case 23:case 24:break;case 25:this.$={id1:a[s-2],id2:a[s],relation:a[s-1],relationTitle1:"none",relationTitle2:"none"};break;case 26:this.$={id1:a[s-3],id2:a[s],relation:a[s-1],relationTitle1:a[s-2],relationTitle2:"none"};break;case 27:this.$={id1:a[s-3],id2:a[s],relation:a[s-2],relationTitle1:"none",relationTitle2:a[s-1]};break;case 28:this.$={id1:a[s-4],id2:a[s],relation:a[s-2],relationTitle1:a[s-3],relationTitle2:a[s-1]};break;case 29:this.$={type1:a[s-2],type2:a[s],lineType:a[s-1]};break;case 30:this.$={type1:"none",type2:a[s],lineType:a[s-1]};break;case 31:this.$={type1:a[s-1],type2:"none",lineType:a[s]};break;case 32:this.$={type1:"none",type2:"none",lineType:a[s]};break;case 33:this.$=r.relationType.AGGREGATION;break;case 34:this.$=r.relationType.EXTENSION;break;case 35:this.$=r.relationType.COMPOSITION;break;case 36:this.$=r.relationType.DEPENDENCY;break;case 37:this.$=r.lineType.LINE;break;case 38:this.$=r.lineType.DOTTED_LINE;break;case 39:this.$=a[s-2],r.setClickEvent(a[s-1],a[s],void 0);break;case 40:this.$=a[s-3],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 41:this.$=a[s-2],r.setLink(a[s-1],a[s],void 0);break;case 42:this.$=a[s-3],r.setLink(a[s-2],a[s-1],a[s])}},table:[{3:1,4:2,5:[1,3]},{1:[3]},{1:[2,1]},{6:[1,4]},{7:5,9:6,10:12,11:19,13:7,15:8,16:9,17:10,18:11,19:e,23:n,25:r,26:i,37:a,38:o,52:s,53:u,54:c},{8:[1,23]},{6:[1,24],8:[2,3]},t(l,[2,10],{14:[1,25]}),t(l,[2,12]),t(l,[2,13]),t(l,[2,14]),t(l,[2,15]),t(l,[2,21],{27:26,29:29,30:30,14:[1,28],28:[1,27],31:f,32:h,33:d,34:p,35:y,36:g}),{10:37,11:19,52:s,53:u,54:c},t(l,[2,23]),t(l,[2,24]),{11:38,52:s,53:u,54:c},{10:39,11:19,52:s,53:u,54:c},{10:40,11:19,52:s,53:u,54:c},t(m,[2,7],{11:19,10:41,12:[1,42],52:s,53:u,54:c}),t(v,[2,56]),t(v,[2,57]),t(v,[2,58]),{1:[2,2]},{7:43,8:[2,4],9:6,10:12,11:19,13:7,15:8,16:9,17:10,18:11,19:e,23:n,25:r,26:i,37:a,38:o,52:s,53:u,54:c},t(l,[2,11]),{10:44,11:19,28:[1,45],52:s,53:u,54:c},{27:46,29:29,30:30,31:f,32:h,33:d,34:p,35:y,36:g},t(l,[2,22]),{30:47,35:y,36:g},t(b,[2,32],{29:48,31:f,32:h,33:d,34:p}),t(x,[2,33]),t(x,[2,34]),t(x,[2,35]),t(x,[2,36]),t(_,[2,37]),t(_,[2,38]),t(l,[2,16],{20:[1,49]}),{24:[1,50]},{28:[1,51]},{28:[1,52]},t(m,[2,6]),t(m,[2,9],{11:19,10:53,52:s,53:u,54:c}),{8:[2,5]},t(w,[2,25]),{10:54,11:19,52:s,53:u,54:c},{10:55,11:19,28:[1,56],52:s,53:u,54:c},t(b,[2,31],{29:57,31:f,32:h,33:d,34:p}),t(b,[2,30]),{21:58,25:k},{10:60,11:19,52:s,53:u,54:c},t(l,[2,39],{28:[1,61]}),t(l,[2,41],{28:[1,62]}),t(m,[2,8]),t(w,[2,27]),t(w,[2,26]),{10:63,11:19,52:s,53:u,54:c},t(b,[2,29]),{22:[1,64]},{21:65,22:[2,19],25:k},t(l,[2,18]),t(l,[2,40]),t(l,[2,42]),t(w,[2,28]),t(l,[2,17]),{22:[2,20]}],defaultActions:{2:[2,1],23:[2,2],43:[2,5],65:[2,20]},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="",u=0,c=0,l=0,f=2,h=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=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 y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,w,k,E,S,A,T,M,C={};;){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(S in M=[],o[w])this.terminals_[S]&&S>f&&M.push("'"+this.terminals_[S]+"'");O=p.showPosition?"Parse error on line "+(u+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(u+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:m,expected:M})}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):(c=p.yyleng,s=p.yytext,u=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(A=this.productions_[k[1]][1],C.$=i[i.length-A],C._$={first_line:a[a.length-(A||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(A||1)].first_column,last_column:a[a.length-1].last_column},v&&(C._$.range=[a[a.length-(A||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(C,[s,c,u,y.yy,k[1],i,a].concat(d))))return E;A&&(n=n.slice(0,-1*A*2),i=i.slice(0,-1*A),a=a.slice(0,-1*A)),n.push(this.productions_[k[1]][0]),i.push(C.$),a.push(C._$),T=o[n[n.length-2]][n[n.length-1]],n.push(T);break;case 3:return!0}}return!0}},S={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(){return this.next()||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:break;case 1:return 6;case 2:break;case 3:return 5;case 4:return this.begin("struct"),20;case 5:return"EOF_IN_STRUCT";case 6:return"OPEN_IN_STRUCT";case 7:return this.popState(),22;case 8:break;case 9:return"MEMBER";case 10:return 19;case 11:return 37;case 12:return 38;case 13:return 23;case 14:return 24;case 15:this.begin("generic");break;case 16:this.popState();break;case 17:return"GENERICTYPE";case 18:this.begin("string");break;case 19:this.popState();break;case 20:return"STR";case 21:case 22:return 32;case 23:case 24:return 34;case 25:return 33;case 26:return 31;case 27:return 35;case 28:return 36;case 29:return 14;case 30:return 50;case 31:return"DOT";case 32:return"PLUS";case 33:return 47;case 34:case 35:return"EQUALS";case 36:return 54;case 37:return"PUNCTUATION";case 38:return 53;case 39:return 52;case 40:return 49;case 41:return 8}},rules:[/^(?:%%[^\n]*\n*)/,/^(?:\n+)/,/^(?:\s+)/,/^(?:classDiagram\b)/,/^(?:[\{])/,/^(?:$)/,/^(?:[\{])/,/^(?:\})/,/^(?:[\n])/,/^(?:[^\{\}\n]*)/,/^(?:class\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:[~])/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:--)/,/^(?:\.\.)/,/^(?::[^\n;]+)/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\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:[19,20],inclusive:!1},generic:{rules:[16,17],inclusive:!1},struct:{rules:[5,6,7,8,9],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,10,11,12,13,14,15,18,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41],inclusive:!0}}};function A(){this.yy={}}return E.lexer=S,A.prototype=E,E.Parser=A,new A}();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(14).readFileSync(n(15).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(13),n(6)(t))},function(t){t.exports=JSON.parse('{"name":"mermaid","version":"8.5.1","description":"Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.","main":"dist/mermaid.core.js","keywords":["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph"],"scripts":{"build:development":"webpack --progress --colors","build:production":"yarn build:development -p --config webpack.config.prod.babel.js","build":"yarn build:development && yarn build:production","postbuild":"documentation build src/mermaidAPI.js --shallow -f md --markdown-toc false -o docs/mermaidAPI.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","prepush":"yarn test","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","crypto-random-string":"^3.0.1","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","minify":"^4.1.1","moment-mini":"^2.22.1","scope-css":"^1.2.1"},"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"]}')},function(t,e,n){var r=n(51),i=n(52);t.exports=function(t,e,n,a){var o=!n;n||(n={});for(var s=-1,u=e.length;++s-1&&t%1==0&&t-1}(s)?s:(n=s.match(a))?(e=n[0],r.test(e)?"about:blank":s):"about:blank"}}},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="",u=0,c=0,l=0,f=2,h=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=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 y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,w,k,E,S,A,T,M,C={};;){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(S in M=[],o[w])this.terminals_[S]&&S>f&&M.push("'"+this.terminals_[S]+"'");O=p.showPosition?"Parse error on line "+(u+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(u+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:m,expected:M})}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):(c=p.yyleng,s=p.yytext,u=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(A=this.productions_[k[1]][1],C.$=i[i.length-A],C._$={first_line:a[a.length-(A||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(A||1)].first_column,last_column:a[a.length-1].last_column},v&&(C._$.range=[a[a.length-(A||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(C,[s,c,u,y.yy,k[1],i,a].concat(d))))return E;A&&(n=n.slice(0,-1*A*2),i=i.slice(0,-1*A),a=a.slice(0,-1*A)),n.push(this.productions_[k[1]][0]),i.push(C.$),a.push(C._$),T=o[n[n.length-2]][n[n.length-1]],n.push(T);break;case 3:return!0}}return!0}},u={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(){return this.next()||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_]+)/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 c(){this.yy={}}return s.lexer=u,c.prototype=s,s.Parser=c,new c}();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(14).readFileSync(n(15).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(13),n(6)(t))},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="",u=0,c=0,l=0,f=2,h=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=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 y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,w,k,E,S,A,T,M,C={};;){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(S in M=[],o[w])this.terminals_[S]&&S>f&&M.push("'"+this.terminals_[S]+"'");O=p.showPosition?"Parse error on line "+(u+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(u+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:m,expected:M})}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):(c=p.yyleng,s=p.yytext,u=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(A=this.productions_[k[1]][1],C.$=i[i.length-A],C._$={first_line:a[a.length-(A||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(A||1)].first_column,last_column:a[a.length-1].last_column},v&&(C._$.range=[a[a.length-(A||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(C,[s,c,u,y.yy,k[1],i,a].concat(d))))return E;A&&(n=n.slice(0,-1*A*2),i=i.slice(0,-1*A),a=a.slice(0,-1*A)),n.push(this.productions_[k[1]][0]),i.push(C.$),a.push(C._$),T=o[n[n.length-2]][n[n.length-1]],n.push(T);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(){return this.next()||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(14).readFileSync(n(15).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(13),n(6)(t))},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,12],n={trace:function(){},yy:{},symbols_:{error:2,start:3,pie:4,document:5,EOF:6,line:7,statement:8,NL:9,STR:10,VALUE:11,title:12,$accept:0,$end:1},terminals_:{2:"error",4:"pie",6:"EOF",9:"NL",10:"STR",11:"VALUE",12:"title"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,2],[8,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 4:break;case 6:r.addSection(a[s-1],r.cleanupValue(a[s]));break;case 7:r.setTitle(a[s].substr(6)),this.$=a[s].substr(6)}},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],12:[1,9]},{1:[2,1]},t(e,[2,3]),t(e,[2,4]),t(e,[2,5]),{11:[1,10]},t(e,[2,7]),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="",u=0,c=0,l=0,f=2,h=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=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 y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,w,k,E,S,A,T,M,C={};;){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(S in M=[],o[w])this.terminals_[S]&&S>f&&M.push("'"+this.terminals_[S]+"'");O=p.showPosition?"Parse error on line "+(u+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(u+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:m,expected:M})}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):(c=p.yyleng,s=p.yytext,u=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(A=this.productions_[k[1]][1],C.$=i[i.length-A],C._$={first_line:a[a.length-(A||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(A||1)].first_column,last_column:a[a.length-1].last_column},v&&(C._$.range=[a[a.length-(A||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(C,[s,c,u,y.yy,k[1],i,a].concat(d))))return E;A&&(n=n.slice(0,-1*A*2),i=i.slice(0,-1*A),a=a.slice(0,-1*A)),n.push(this.productions_[k[1]][0]),i.push(C.$),a.push(C._$),T=o[n[n.length-2]][n[n.length-1]],n.push(T);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(){return this.next()||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:case 1:break;case 2:return 4;case 3:return 9;case 4:return"space";case 5:return 12;case 6:this.begin("string");break;case 7:this.popState();break;case 8:return"STR";case 9:return"VALUE";case 10:return 6}},rules:[/^(?:%%[^\n]*)/i,/^(?:\s+)/i,/^(?:pie\b)/i,/^(?:[\s\n\r]+)/i,/^(?:[\s]+)/i,/^(?:title\s[^#\n;]+)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::[\s]*[\d]+(?:\.[\d]+)?)/i,/^(?:$)/i],conditions:{string:{rules:[7,8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,9,10],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(14).readFileSync(n(15).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(13),n(6)(t))},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,12],n=[1,7],r=[1,10],i=[1,11],a=[1,12],o=[1,13],s=[12,19,20],u=[15,16,17,18],c={trace:function(){},yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,statement:7,entityName:8,relSpec:9,":":10,role:11,ALPHANUM:12,cardinality:13,relType:14,ZERO_OR_ONE:15,ZERO_OR_MORE:16,ONE_OR_MORE:17,ONLY_ONE:18,NON_IDENTIFYING:19,IDENTIFYING:20,WORD:21,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",10:":",12:"ALPHANUM",15:"ZERO_OR_ONE",16:"ZERO_OR_MORE",17:"ONE_OR_MORE",18:"ONLY_ONE",19:"NON_IDENTIFYING",20:"IDENTIFYING",21:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,5],[8,1],[9,3],[13,1],[13,1],[13,1],[13,1],[14,1],[14,1],[11,1],[11,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 1:break;case 4:r.addEntity(a[s-4]),r.addEntity(a[s-2]),r.addRelationship(a[s-4],a[s],a[s-2],a[s-3]);break;case 5:this.$=a[s];break;case 6:this.$={cardA:a[s],relType:a[s-1],cardB:a[s-2]};break;case 7:this.$=r.Cardinality.ZERO_OR_ONE;break;case 8:this.$=r.Cardinality.ZERO_OR_MORE;break;case 9:this.$=r.Cardinality.ONE_OR_MORE;break;case 10:this.$=r.Cardinality.ONLY_ONE;break;case 11:this.$=r.Identification.NON_IDENTIFYING;break;case 12:this.$=r.Identification.IDENTIFYING;break;case 13:this.$=a[s].replace(/"/g,"");break;case 14:this.$=a[s]}},table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:6,12:n},{1:[2,1]},t(e,[2,3]),{9:8,13:9,15:r,16:i,17:a,18:o},t([10,15,16,17,18],[2,5]),{8:14,12:n},{14:15,19:[1,16],20:[1,17]},t(s,[2,7]),t(s,[2,8]),t(s,[2,9]),t(s,[2,10]),{10:[1,18]},{13:19,15:r,16:i,17:a,18:o},t(u,[2,11]),t(u,[2,12]),{11:20,12:[1,22],21:[1,21]},{12:[2,6]},t(e,[2,4]),t(e,[2,13]),t(e,[2,14])],defaultActions:{4:[2,1],19:[2,6]},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="",u=0,c=0,l=0,f=2,h=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=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 y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,w,k,E,S,A,T,M,C={};;){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(S in M=[],o[w])this.terminals_[S]&&S>f&&M.push("'"+this.terminals_[S]+"'");O=p.showPosition?"Parse error on line "+(u+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(u+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:m,expected:M})}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):(c=p.yyleng,s=p.yytext,u=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(A=this.productions_[k[1]][1],C.$=i[i.length-A],C._$={first_line:a[a.length-(A||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(A||1)].first_column,last_column:a[a.length-1].last_column},v&&(C._$.range=[a[a.length-(A||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(C,[s,c,u,y.yy,k[1],i,a].concat(d))))return E;A&&(n=n.slice(0,-1*A*2),i=i.slice(0,-1*A),a=a.slice(0,-1*A)),n.push(this.productions_[k[1]][0]),i.push(C.$),a.push(C._$),T=o[n[n.length-2]][n[n.length-1]],n.push(T);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(){return this.next()||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:break;case 1:return"SPACE";case 2:return 21;case 3:return 4;case 4:return 15;case 5:return 16;case 6:return 17;case 7:return 18;case 8:return 15;case 9:return 16;case 10:return 17;case 11:return 19;case 12:return 20;case 13:case 14:return 19;case 15:return 12;case 16:return e.yytext[0];case 17:return 6}},rules:[/^(?:\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:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17],inclusive:!0}}};function f(){this.yy={}}return c.lexer=l,f.prototype=c,c.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(14).readFileSync(n(15).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(13),n(6)(t))},function(t,e,n){"use strict";var r=n(8);function i(t){this._isDirected=!r.has(t,"directed")||t.directed,this._isMultigraph=!!r.has(t,"multigraph")&&t.multigraph,this._isCompound=!!r.has(t,"compound")&&t.compound,this._label=void 0,this._defaultNodeLabelFn=r.constant(void 0),this._defaultEdgeLabelFn=r.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children["\0"]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function a(t,e){t[e]?t[e]++:t[e]=1}function o(t,e){--t[e]||delete t[e]}function s(t,e,n,i){var a=""+e,o=""+n;if(!t&&a>o){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 c(t,e){return s(t,e.v,e.w,e.name)}t.exports=i,i.prototype._nodeCount=0,i.prototype._edgeCount=0,i.prototype.isDirected=function(){return this._isDirected},i.prototype.isMultigraph=function(){return this._isMultigraph},i.prototype.isCompound=function(){return this._isCompound},i.prototype.setGraph=function(t){return this._label=t,this},i.prototype.graph=function(){return this._label},i.prototype.setDefaultNodeLabel=function(t){return r.isFunction(t)||(t=r.constant(t)),this._defaultNodeLabelFn=t,this},i.prototype.nodeCount=function(){return this._nodeCount},i.prototype.nodes=function(){return r.keys(this._nodes)},i.prototype.sources=function(){var t=this;return r.filter(this.nodes(),(function(e){return r.isEmpty(t._in[e])}))},i.prototype.sinks=function(){var t=this;return r.filter(this.nodes(),(function(e){return r.isEmpty(t._out[e])}))},i.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},i.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]="\0",this._children[t]={},this._children["\0"][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)},i.prototype.node=function(t){return this._nodes[t]},i.prototype.hasNode=function(t){return r.has(this._nodes,t)},i.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},i.prototype.setParent=function(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(r.isUndefined(e))e="\0";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},i.prototype._removeFromParentsChildList=function(t){delete this._children[this._parent[t]][t]},i.prototype.parent=function(t){if(this._isCompound){var e=this._parent[t];if("\0"!==e)return e}},i.prototype.children=function(t){if(r.isUndefined(t)&&(t="\0"),this._isCompound){var e=this._children[t];if(e)return r.keys(e)}else{if("\0"===t)return this.nodes();if(this.hasNode(t))return[]}},i.prototype.predecessors=function(t){var e=this._preds[t];if(e)return r.keys(e)},i.prototype.successors=function(t){var e=this._sucs[t];if(e)return r.keys(e)},i.prototype.neighbors=function(t){var e=this.predecessors(t);if(e)return r.union(e,this.successors(t))},i.prototype.isLeaf=function(t){return 0===(this.isDirected()?this.successors(t):this.neighbors(t)).length},i.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},i.prototype.setDefaultEdgeLabel=function(t){return r.isFunction(t)||(t=r.constant(t)),this._defaultEdgeLabelFn=t,this},i.prototype.edgeCount=function(){return this._edgeCount},i.prototype.edges=function(){return r.values(this._edgeObjs)},i.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},i.prototype.setEdge=function(){var t,e,n,i,o=!1,c=arguments[0];"object"==typeof c&&null!==c&&"v"in c?(t=c.v,e=c.w,n=c.name,2===arguments.length&&(i=arguments[1],o=!0)):(t=c,e=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],o=!0)),t=""+t,e=""+e,r.isUndefined(n)||(n=""+n);var l=s(this._isDirected,t,e,n);if(r.has(this._edgeLabels,l))return o&&(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]=o?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,a(this._preds[e],t),a(this._sucs[t],e),this._in[e][l]=f,this._out[t][l]=f,this._edgeCount++,this},i.prototype.edge=function(t,e,n){var r=1===arguments.length?c(this._isDirected,arguments[0]):s(this._isDirected,t,e,n);return this._edgeLabels[r]},i.prototype.hasEdge=function(t,e,n){var i=1===arguments.length?c(this._isDirected,arguments[0]):s(this._isDirected,t,e,n);return r.has(this._edgeLabels,i)},i.prototype.removeEdge=function(t,e,n){var r=1===arguments.length?c(this._isDirected,arguments[0]):s(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],o(this._preds[e],t),o(this._sucs[t],e),delete this._in[e][r],delete this._out[t][r],this._edgeCount--),this},i.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}},i.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}},i.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(27)(n(11),"Map");t.exports=r},function(t,e,n){var r=n(188),i=n(195),a=n(197),o=n(198),s=n(199);function u(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(92),i=e&&!e.nodeType&&e,a=i&&"object"==typeof t&&t&&!t.nodeType&&t,o=a&&a.exports===i&&r.process,s=function(){try{return a&&a.require&&a.require("util").types||o&&o.binding&&o.binding("util")}catch(t){}}();t.exports=s}).call(this,n(6)(t))},function(t,e,n){var r=n(55),i=n(205),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(99),i=n(100),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(36);t.exports=function(t,e,n){for(var i=-1,a=t.length;++il))return!1;var h=u.get(t);if(h&&u.get(e))return h==e;var d=-1,p=!0,y=2&n?new r:void 0;for(u.set(t,e),u.set(e,t);++d0&&(a=u.removeMin(),(o=s[a]).distance!==Number.POSITIVE_INFINITY);)r(a).forEach(c);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(8);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(c&&a(e[0],e[1],c)&&(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,u=Math.sqrt(o*o+s*s);return aMath.abs(o)*c?(s<0&&(c=-c),n=0===s?0:c*o/s,r=c):(o<0&&(u=-u),n=u,r=0===o?0:u*s/o),{x:i+n,y:a+r}}},function(t,e,n){"use strict";var r=n(154),i=n(155),a=n(156);function o(t,e,n){if(!t)return t;if(!e)return t;"string"==typeof n&&(n={keyframes:n}),n||(n={keyframes:!1}),t=s(t,e+" $1$2");var i=e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");t=(t=(t=(t=t.replace(new RegExp("("+i+")\\s*\\1(?=[\\s\\r\\n,{])","g"),"$1")).replace(new RegExp("("+i+")\\s*:host","g"),"$1")).replace(new RegExp("("+i+")\\s*@","g"),"@")).replace(new RegExp("("+i+")\\s*:root","g"),":root");for(var a,o=[],u=/@keyframes\s+([a-zA-Z0-9_-]+)\s*{/g;null!==(a=u.exec(t));)o.indexOf(a[1])<0&&o.push(a[1]);var c=r(e);return o.forEach((function(e){var r=(!0===n.keyframes?c+"-":"string"==typeof n.keyframes?n.keyframes:"")+e;t=(t=t.replace(new RegExp("(@keyframes\\s+)"+e+"(\\s*{)","g"),"$1"+r+"$2")).replace(new RegExp("(animation(?:-name)?\\s*:[^;]*\\s*)"+e+"([\\s;}])","g"),"$1"+r+"$2")})),t=t.replace(new RegExp("("+i+" )(\\s*(?:to|from|[+-]?(?:(?:\\.\\d+)|(?:\\d+(?:\\.\\d*)?))%))(?=[\\s\\r\\n,{])","g"),"$2")}function s(t,e){var n=[];return t=a(t),t=(t=i.replace(t,!0,n)).replace(/([^\r\n,{}]+)(,(?=[^}]*{)|\s*{)/g,e),i.paste(t,n)}t.exports=o,o.replace=s},function(t,e){t.exports=function(t,e){return console.info("Intersect Node"),t.intersect(e)}},function(t,e,n){var r;r=function(){var t=JSON.parse('{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","¢":"cent","£":"pound","¤":"currency","¥":"yen","©":"(c)","ª":"a","®":"(r)","º":"o","À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Æ":"AE","Ç":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","Þ":"TH","ß":"ss","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","æ":"ae","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","þ":"th","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Č":"C","č":"c","Ď":"D","ď":"d","Đ":"DJ","đ":"dj","Ē":"E","ē":"e","Ė":"E","ė":"e","Ę":"e","ę":"e","Ě":"E","ě":"e","Ğ":"G","ğ":"g","Ģ":"G","ģ":"g","Ĩ":"I","ĩ":"i","Ī":"i","ī":"i","Į":"I","į":"i","İ":"I","ı":"i","Ķ":"k","ķ":"k","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ł":"L","ł":"l","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","Ő":"O","ő":"o","Œ":"OE","œ":"oe","Ŕ":"R","ŕ":"r","Ř":"R","ř":"r","Ś":"S","ś":"s","Ş":"S","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","Ť":"T","ť":"t","Ũ":"U","ũ":"u","Ū":"u","ū":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","Lj":"LJ","lj":"lj","Nj":"NJ","nj":"nj","Ș":"S","ș":"s","Ț":"T","ț":"t","˚":"o","Ά":"A","Έ":"E","Ή":"H","Ί":"I","Ό":"O","Ύ":"Y","Ώ":"W","ΐ":"i","Α":"A","Β":"B","Γ":"G","Δ":"D","Ε":"E","Ζ":"Z","Η":"H","Θ":"8","Ι":"I","Κ":"K","Λ":"L","Μ":"M","Ν":"N","Ξ":"3","Ο":"O","Π":"P","Ρ":"R","Σ":"S","Τ":"T","Υ":"Y","Φ":"F","Χ":"X","Ψ":"PS","Ω":"W","Ϊ":"I","Ϋ":"Y","ά":"a","έ":"e","ή":"h","ί":"i","ΰ":"y","α":"a","β":"b","γ":"g","δ":"d","ε":"e","ζ":"z","η":"h","θ":"8","ι":"i","κ":"k","λ":"l","μ":"m","ν":"n","ξ":"3","ο":"o","π":"p","ρ":"r","ς":"s","σ":"s","τ":"t","υ":"y","φ":"f","χ":"x","ψ":"ps","ω":"w","ϊ":"i","ϋ":"y","ό":"o","ύ":"y","ώ":"w","Ё":"Yo","Ђ":"DJ","Є":"Ye","І":"I","Ї":"Yi","Ј":"J","Љ":"LJ","Њ":"NJ","Ћ":"C","Џ":"DZ","А":"A","Б":"B","В":"V","Г":"G","Д":"D","Е":"E","Ж":"Zh","З":"Z","И":"I","Й":"J","К":"K","Л":"L","М":"M","Н":"N","О":"O","П":"P","Р":"R","С":"S","Т":"T","У":"U","Ф":"F","Х":"H","Ц":"C","Ч":"Ch","Ш":"Sh","Щ":"Sh","Ъ":"U","Ы":"Y","Ь":"","Э":"E","Ю":"Yu","Я":"Ya","а":"a","б":"b","в":"v","г":"g","д":"d","е":"e","ж":"zh","з":"z","и":"i","й":"j","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","р":"r","с":"s","т":"t","у":"u","ф":"f","х":"h","ц":"c","ч":"ch","ш":"sh","щ":"sh","ъ":"u","ы":"y","ь":"","э":"e","ю":"yu","я":"ya","ё":"yo","ђ":"dj","є":"ye","і":"i","ї":"yi","ј":"j","љ":"lj","њ":"nj","ћ":"c","ѝ":"u","џ":"dz","Ґ":"G","ґ":"g","Ғ":"GH","ғ":"gh","Қ":"KH","қ":"kh","Ң":"NG","ң":"ng","Ү":"UE","ү":"ue","Ұ":"U","ұ":"u","Һ":"H","һ":"h","Ә":"AE","ә":"ae","Ө":"OE","ө":"oe","฿":"baht","ა":"a","ბ":"b","გ":"g","დ":"d","ე":"e","ვ":"v","ზ":"z","თ":"t","ი":"i","კ":"k","ლ":"l","მ":"m","ნ":"n","ო":"o","პ":"p","ჟ":"zh","რ":"r","ს":"s","ტ":"t","უ":"u","ფ":"f","ქ":"k","ღ":"gh","ყ":"q","შ":"sh","ჩ":"ch","ც":"ts","ძ":"dz","წ":"ts","ჭ":"ch","ხ":"kh","ჯ":"j","ჰ":"h","Ẁ":"W","ẁ":"w","Ẃ":"W","ẃ":"w","Ẅ":"W","ẅ":"w","ẞ":"SS","Ạ":"A","ạ":"a","Ả":"A","ả":"a","Ấ":"A","ấ":"a","Ầ":"A","ầ":"a","Ẩ":"A","ẩ":"a","Ẫ":"A","ẫ":"a","Ậ":"A","ậ":"a","Ắ":"A","ắ":"a","Ằ":"A","ằ":"a","Ẳ":"A","ẳ":"a","Ẵ":"A","ẵ":"a","Ặ":"A","ặ":"a","Ẹ":"E","ẹ":"e","Ẻ":"E","ẻ":"e","Ẽ":"E","ẽ":"e","Ế":"E","ế":"e","Ề":"E","ề":"e","Ể":"E","ể":"e","Ễ":"E","ễ":"e","Ệ":"E","ệ":"e","Ỉ":"I","ỉ":"i","Ị":"I","ị":"i","Ọ":"O","ọ":"o","Ỏ":"O","ỏ":"o","Ố":"O","ố":"o","Ồ":"O","ồ":"o","Ổ":"O","ổ":"o","Ỗ":"O","ỗ":"o","Ộ":"O","ộ":"o","Ớ":"O","ớ":"o","Ờ":"O","ờ":"o","Ở":"O","ở":"o","Ỡ":"O","ỡ":"o","Ợ":"O","ợ":"o","Ụ":"U","ụ":"u","Ủ":"U","ủ":"u","Ứ":"U","ứ":"u","Ừ":"U","ừ":"u","Ử":"U","ử":"u","Ữ":"U","ữ":"u","Ự":"U","ự":"u","Ỳ":"Y","ỳ":"y","Ỵ":"Y","ỵ":"y","Ỷ":"Y","ỷ":"y","Ỹ":"Y","ỹ":"y","‘":"\'","’":"\'","“":"\\"","”":"\\"","†":"+","•":"*","…":"...","₠":"ecu","₢":"cruzeiro","₣":"french franc","₤":"lira","₥":"mill","₦":"naira","₧":"peseta","₨":"rupee","₩":"won","₪":"new shequel","₫":"dong","€":"euro","₭":"kip","₮":"tugrik","₯":"drachma","₰":"penny","₱":"peso","₲":"guarani","₳":"austral","₴":"hryvnia","₵":"cedi","₸":"kazakhstani tenge","₹":"indian rupee","₽":"russian ruble","₿":"bitcoin","℠":"sm","™":"tm","∂":"d","∆":"delta","∑":"sum","∞":"infinity","♥":"love","元":"yuan","円":"yen","﷼":"rial"}'),e=JSON.parse('{"vi":{"Đ":"D","đ":"d"}}');function n(n,r){if("string"!=typeof n)throw new Error("slugify: string argument expected");var i=e[(r="string"==typeof r?{replacement:r}:r||{}).locale]||{},a=n.split("").reduce((function(e,n){return e+(i[n]||t[n]||n).replace(r.remove||/[^\w\s$*_+~.()'"!\-:@]/g,"")}),"").trim().replace(/[-\s]+/g,r.replacement||"-");return r.lower?a.toLowerCase():a}return n.extend=function(e){for(var n in e)t[n]=e[n]},n},t.exports=r(),t.exports.default=r()},function(t,e,n){ /*! * Escaper v2.5.3 * https://github.com/kobezzza/Escaper * * Released under the MIT license * https://github.com/kobezzza/Escaper/blob/master/LICENSE * * Date: Tue, 23 Jan 2018 15:58:45 GMT */ !function(t){"use strict";var e,n="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},r=e={VERSION:[2,5,3],content:[],cache:{},snakeskinRgxp:null,symbols:null,replace:M,paste:O},i={'"':!0,"'":!0,"`":!0},a={"/":!0};for(var o in i){if(!i.hasOwnProperty(o))break;a[o]=!0}var s={"//":!0,"//*":!0,"//!":!0,"//#":!0,"//@":!0,"//$":!0},u={"/*":!0,"/**":!0,"/*!":!0,"/*#":!0,"/*@":!0,"/*$":!0},c=[],l={};for(var f in a){if(!a.hasOwnProperty(f))break;c.push(f),l[f]=!0}for(var h in s){if(!s.hasOwnProperty(h))break;c.push(h),l[h]=!0}for(var d in u){if(!u.hasOwnProperty(d))break;c.push(d),l[d]=!0}var p=[],y={g:!0,m:!0,i:!0,y:!0,u:!0};for(var g in y){if(!y.hasOwnProperty(g))break;p.push(g)}var m={"-":!0,"+":!0,"*":!0,"%":!0,"~":!0,">":!0,"<":!0,"^":!0,",":!0,";":!0,"=":!0,"|":!0,"&":!0,"!":!0,"?":!0,":":!0,"(":!0,"{":!0,"[":!0},v={return:!0,yield:!0,await:!0,typeof:!0,void:!0,instanceof:!0,delete:!0,in:!0,new:!0,of:!0};function b(t,e,n){for(var r in t){if(!t.hasOwnProperty(r))break;r in e==0&&(e[r]=n)}}var x=void 0,_=void 0,w=/[^\s/]/,k=/[a-z]/,E=/\s/,S=/[\r\n]/,A=/\${pos}/g,T={object:!0,function:!0};function M(t,r,o,f){x=x||e.symbols||"a-z",_=_||e.snakeskinRgxp||new RegExp("[!$"+x+"_]","i");var h=e.cache,d=e.content,g=Boolean(r&&T[void 0===r?"undefined":n(r)]),M=g?Object(r):{};function C(t){return M["@label"]?M["@label"].replace(A,t):"__ESCAPER_QUOT__"+t+"_"}var O=!1;"boolean"==typeof r&&(O=Boolean(r)),"@comments"in M&&(b(u,M,M["@comments"]),b(s,M,M["@comments"]),delete M["@comments"]),"@strings"in M&&(b(i,M,M["@strings"]),delete M["@strings"]),"@literals"in M&&(b(a,M,M["@literals"]),delete M["@literals"]),"@all"in M&&(b(l,M,M["@all"]),delete M["@all"]);for(var N="",D=-1;++D2&&u[j])&&(M[j]&&(V=t.substring(z,q+1),-1===M[j]?G="":(G=C(P.length),P.push(V)),t=t.substring(0,z)+G+t.substring(q+1),q+=G.length-V.length),j=!1);else{if(!I){if("/"===Z&&((s[J]||u[J])&&(j=s[Q]||u[Q]?Q:J),j)){z=q;continue}m[Z]||v[H]?(R=!0,H=""):w.test(Z)&&(R=!1),k.test(Z)?W+=Z:(H=W,W="");var K=!1;f&&("|"===Z&&_.test(X)?($=!0,R=!1,K=!0):$&&E.test(Z)&&($=!1,R=!0,K=!0)),K||(m[Z]?R=!0:w.test(Z)&&(R=!1))}if("/"!==I||B||("["===Z?Y=!0:"]"===Z&&(Y=!1)),!I&&U&&("}"===Z?U--:"{"===Z&&U++,U||(Z="`")),"`"!==I||B||"${"!==J||(Z="`",q++,U++),!l[Z]||"/"===Z&&!R||I){if(I&&("\\"===Z||B))B=!B;else if(l[Z]&&I===Z&&!B&&("/"!==I||!Y)){if("/"===Z)for(var tt=-1;++tt1)for(var n=1;n-1}},function(t,e,n){var r=n(48);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(47);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(47),i=n(69),a=n(70);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(31),i=n(185),a=n(9),o=n(93),s=/^\[object .+?Constructor\]$/,u=Function.prototype,c=Object.prototype,l=u.toString,f=c.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){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){var r=n(32),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(186),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(11)["__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(189),i=n(47),a=n(69);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(190),i=n(191),a=n(192),o=n(193),s=n(194);function u(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(114),i=n(263),a=n(267),o=n(115),s=n(268),u=n(82);t.exports=function(t,e,n){var c=-1,l=i,f=t.length,h=!0,d=[],p=d;if(n)h=!1,l=a;else if(f>=200){var y=e?null:s(t);if(y)return u(y);h=!1,l=o,p=new r}else p=e?[]:d;t:for(;++c-1}},function(t,e,n){var r=n(128),i=n(265),a=n(266);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(8);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=u.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(c)}return o}},function(t,e,n){var r;try{r=n(2)}catch(t){}r||(r=window.graphlib),t.exports=r},function(t,e,n){"use strict";var r=n(3),i=n(316),a=n(319),o=n(320),s=n(7).normalizeRanks,u=n(322),c=n(7).removeEmptyRanks,l=n(323),f=n(324),h=n(325),d=n(326),p=n(335),y=n(7),g=n(12).Graph;t.exports=function(t,e){var n=e&&e.debugTiming?y.time:y.notime;n("layout",(function(){var e=n(" buildLayoutGraph",(function(){return function(t){var e=new g({multigraph:!0,compound:!0}),n=A(t.graph());return e.setGraph(r.merge({},v,S(n,m),r.pick(n,b))),r.forEach(t.nodes(),(function(n){var i=A(t.node(n));e.setNode(n,r.defaults(S(i,x),_)),e.setParent(n,t.parent(n))})),r.forEach(t.edges(),(function(n){var i=A(t.edge(n));e.setEdge(n,r.merge({},k,S(i,w),r.pick(i,E)))})),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(y.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};y.addDummyNode(t,"edge-proxy",i,"_ep")}}))}(t)})),e(" removeEmptyRanks",(function(){c(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(){u(t)})),e(" addBorderSegments",(function(){f(t)})),e(" order",(function(){d(t)})),e(" insertSelfEdges",(function(){!function(t){var e=y.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){y.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,u=o.marginy||0;function c(t){var r=t.x,o=t.y,s=t.width,u=t.height;e=Math.min(e,r-s/2),n=Math.max(n,r+s/2),i=Math.min(i,o-u/2),a=Math.max(a,o+u/2)}r.forEach(t.nodes(),(function(e){c(t.node(e))})),r.forEach(t.edges(),(function(e){var n=t.edge(e);r.has(n,"x")&&c(n)})),e-=s,i-=u,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+u}(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(y.intersectRect(a,n)),i.points.push(y.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 m=["nodesep","edgesep","ranksep","marginx","marginy"],v={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"},E=["labelpos"];function S(t,e){return r.mapValues(r.pick(t,e),Number)}function A(t){var e={};return r.forEach(t,(function(t,n){e[n.toLowerCase()]=t})),e}},function(t,e,n){var r=n(91);t.exports=function(t){return r(t,5)}},function(t,e,n){var r=n(286)(n(287));t.exports=r},function(t,e,n){var r=n(20),i=n(19),a=n(25);t.exports=function(t){return function(e,n,o){var s=Object(e);if(!i(e)){var u=r(n,3);e=a(e),n=function(t){return u(s[t],t,s)}}var c=t(e,n,o);return c>-1?s[u?e[c]:c]:void 0}}},function(t,e,n){var r=n(128),i=n(20),a=n(288),o=Math.max;t.exports=function(t,e,n){var s=null==t?0:t.length;if(!s)return-1;var u=null==n?0:a(n);return u<0&&(u=o(s+u,0)),r(t,i(e,3),u)}},function(t,e,n){var r=n(138);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(9),i=n(36),a=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,c=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||u.test(t)?c(t.slice(2),n?2:8):o.test(t)?NaN:+t}},function(t,e,n){var r=n(81),i=n(110),a=n(34);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(52),i=n(80),a=n(20);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(87),i=n(294),a=n(29);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(296),i=n(299)((function(t,e,n){r(t,e,n)}));t.exports=i},function(t,e,n){var r=n(46),i=n(140),a=n(81),o=n(297),s=n(9),u=n(34),c=n(142);t.exports=function t(e,n,l,f,h){e!==n&&a(n,(function(a,u){if(h||(h=new r),s(a))o(e,n,u,l,t,f,h);else{var d=f?f(c(e,u),a,u+"",e,n,h):void 0;void 0===d&&(d=a),i(e,u,d)}}),u)}},function(t,e,n){var r=n(140),i=n(97),a=n(106),o=n(98),s=n(107),u=n(41),c=n(4),l=n(129),f=n(33),h=n(31),d=n(9),p=n(141),y=n(42),g=n(142),m=n(298);t.exports=function(t,e,n,v,b,x,_){var w=g(t,n),k=g(e,n),E=_.get(k);if(E)r(t,n,E);else{var S=x?x(w,k,n+"",t,e,_):void 0,A=void 0===S;if(A){var T=c(k),M=!T&&f(k),C=!T&&!M&&y(k);S=k,T||M||C?c(w)?S=w:l(w)?S=o(w):M?(A=!1,S=i(k,!0)):C?(A=!1,S=a(k,!0)):S=[]:p(k)||u(k)?(S=w,u(w)?S=m(w):d(w)&&!h(w)||(S=s(k))):A=!1}A&&(_.set(k,S),b(S,k,v,x,_),_.delete(k)),r(t,n,S)}}},function(t,e,n){var r=n(40),i=n(34);t.exports=function(t){return r(t,i(t))}},function(t,e,n){var r=n(60),i=n(61);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(59),i=n(20),a=n(124),o=n(311),s=n(54),u=n(312),c=n(29);t.exports=function(t,e,n){var l=-1;e=r(e.length?e:[c],s(i));var f=a(t,(function(t,n,i){return{criteria:r(e,(function(e){return e(t)})),index:++l,value:t}}));return o(f,(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(313);t.exports=function(t,e,n){for(var i=-1,a=t.criteria,o=e.criteria,s=a.length,u=n.length;++i=u?c:c*("desc"==n[i]?-1:1)}return t.index-e.index}},function(t,e,n){var r=n(36);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,u=null===e,c=e==e,l=r(e);if(!u&&!l&&!o&&t>e||o&&s&&c&&!u&&!l||i&&s&&c||!n&&c||!a)return 1;if(!i&&!o&&!l&&t0;--u)if(r=e[u].dequeue()){i=i.concat(s(t,e,n,r,!0));break}}return i}(n.graph,n.buckets,n.zeroIdx);return r.flatten(r.map(c,(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,u(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,u(e,n,o)})),t.removeNode(i.v),o}function u(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(3),i=n(7);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,u=e.w,c=t.node(u).rank,l=e.name,f=t.edge(e),h=f.labelRank;if(c!==s+1){for(t.removeEdge(e),a=0,++s;su.lim&&(c=u,l=!0);var f=r.filter(e.edges(),(function(e){return l===v(0,t.node(e.v),c)&&l!==v(0,t.node(e.w),c)}));return r.minBy(f,(function(t){return a(e,t)}))}function m(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 v(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=y,l.enterEdge=g,l.exchangeEdges=m},function(t,e,n){var r=n(3);t.exports=function(t){var e=function(t){var e={},n=0;return r.forEach(t.children(),(function i(a){var o=n;r.forEach(t.children(a),i),e[a]={low:o,lim:n++}})),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=[],u=Math.min(e[n].low,e[r].low),c=Math.max(e[n].lim,e[r].lim);i=n;do{i=t.parent(i),o.push(i)}while(i&&(e[i].low>u||c>e[i].lim));for(a=i,i=r;(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,u=0,c=o[u],l=!0;n!==i.w;){if(r=t.node(n),l){for(;(c=o[u])!==s&&t.node(c).maxRank=2),s=l.buildLayerMatrix(t);var g=a(t,s);g0;)e%2&&(n+=u[e+1]),u[e=e-1>>1]+=t.weight;c+=t.weight*n}))),c}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(3),i=n(7);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,o=i.partition(t,(function(t){return r.has(t,"barycenter")})),s=o.lhs,u=r.sortBy(o.rhs,(function(t){return-t.i})),c=[],l=0,f=0,h=0;s.sort((n=!!e,function(t,e){return t.barycentere.barycenter?1:n?e.i-t.i:t.i-e.i})),h=a(c,u,h),r.forEach(s,(function(t){h+=t.vs.length,c.push(t.vs),l+=t.barycenter*t.weight,f+=t.weight,h=a(c,u,h)}));var d={vs:r.flatten(c,!0)};return f&&(d.barycenter=l/f,d.weight=f),d}},function(t,e,n){var r=n(3),i=n(12).Graph;t.exports=function(t,e,n){var a=function(t){for(var e;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),u=t.parent(i);(s.rank===e||s.minRank<=e&&e<=s.maxRank)&&(o.setNode(i),o.setParent(i,u||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(3);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(3),i=n(7),a=n(336).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(3),i=n(12).Graph,a=n(7);function o(t,e){var n={};return r.reduce(e,(function(e,i){var a=0,o=0,s=e.length,c=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===c)&&(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)&&u(n,e,c)}))}))}return r.reduce(e,(function(e,n){var a,o=-1,s=0;return r.forEach(n,(function(r,u){if("border"===t.node(r).dummy){var c=t.predecessors(r);c.length&&(a=t.node(c[0]).order,i(n,s,u,o,a),s=u,o=a)}i(n,s,n.length,a,e.length)})),n})),n}function u(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 c(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 u=i(t);if(u.length)for(var l=((u=r.sortBy(u,(function(t){return s[t]}))).length-1)/2,f=Math.floor(l),h=Math.ceil(l);f<=h;++f){var d=u[f];o[t]===t&&e0}t.exports=function(t,e,r,i){var a,o,s,u,c,l,f,h,d,p,y,g,m;if(a=e.y-t.y,s=t.x-e.x,c=e.x*t.y-t.x*e.y,d=a*r.x+s*r.y+c,p=a*i.x+s*i.y+c,!(0!==d&&0!==p&&n(d,p)||(o=i.y-r.y,u=r.x-i.x,l=i.x*r.y-r.x*i.y,f=o*t.x+u*t.y+l,h=o*e.x+u*e.y+l,0!==f&&0!==h&&n(f,h)||0==(y=a*u-o*s))))return g=Math.abs(y/2),{x:(m=s*l-u*c)<0?(m-g)/y:(m+g)/y,y:(m=o*c-a*l)<0?(m-g)/y:(m+g)/y}}},function(t,e,n){var r=n(37),i=n(26),a=n(136).layout;t.exports=function(){var t=n(342),e=n(345),i=n(346),c=n(347),l=n(348),f=n(349),h=n(350),d=n(351),p=n(352),y=function(n,y){!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)}))}(y);var g=u(n,"output"),m=u(g,"clusters"),v=u(g,"edgePaths"),b=i(u(g,"edgeLabels"),y),x=t(u(g,"nodes"),y,d);a(y),l(x,y),f(b,y),c(v,y,p);var _=e(m,y);h(_,y),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}))}(y)};return y.createNodes=function(e){return arguments.length?(t=e,y):t},y.createClusters=function(t){return arguments.length?(e=t,y):e},y.createEdgeLabels=function(t){return arguments.length?(i=t,y):i},y.createEdgePaths=function(t){return arguments.length?(c=t,y):c},y.shapes=function(t){return arguments.length?(d=t,y):d},y.arrows=function(t){return arguments.length?(p=t,y):p},y};var o={paddingLeft:10,paddingRight:10,paddingTop:10,paddingBottom:10,rx:0,ry:0,shape:"rect"},s={arrowhead:"normal",curve:i.curveLinear};function u(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(37),i=n(89),a=n(10),o=n(26);t.exports=function(t,e,n){var s,u=e.nodes().filter((function(t){return!a.isSubgraph(e,t)})),c=t.selectAll("g.node").data(u,(function(t){return t})).classed("update",!0);return c.exit().remove(),c.enter().append("g").attr("class","node").style("opacity",0),(c=t.selectAll("g.node")).each((function(t){var s=e.node(t),u=o.select(this);a.applyClass(u,s.class,(u.classed("update")?"update ":"")+"node"),u.select("g.label").remove();var c=u.append("g").attr("class","label"),l=i(c,s),f=n[s.shape],h=r.pick(l.node().getBBox(),"width","height");s.elem=this,s.id&&u.attr("id",s.id),s.labelId&&c.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,c.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 y=p.node().getBBox();s.width=y.width,s.height=y.height})),s=c.exit?c.exit():c.selectAll(null),a.applyTransition(s,e).style("opacity",0).remove(),c}},function(t,e,n){var r=n(10);t.exports=function(t,e){for(var n=t.append("text"),i=function(t){for(var e,n="",r=!1,i=0;i=1&&(r={x:t.x,y:t.y}),a>0&&a<1&&(r={x:(1-a)*e.x+a*t.x,y:(1-a)*e.y+a*t.y})}}e=t})),r}(t)},A=function(t,e,n){var r;e[0]!==n&&(e=e.reverse()),e.forEach((function(t){_(t,r),r=t}));var i,a=25;r=void 0,e.forEach((function(t){if(r&&!i){var e=_(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),u={x:0,y:0};return u.x=Math.sin(s)*o+(e[0].x+i.x)/2,u.y=-Math.cos(s)*o+(e[0].y+i.y)/2,u},T=function(t,e){var n=t.trim();if(n)return"loose"!==e.securityLevel?Object(v.sanitizeUrl)(n):n},M=n(2),C=n.n(M),O=//gi,N=function(t){return t.replace(O,"#br#")},D=function(t){if(!t)return 1;var e=N(t);return(e=e.replace(/\\n/g,"#br#")).split("#br#")},L=function(t,e){var n=t,r=!0;return!e.flowchart||!1!==e.flowchart.htmlLabels&&"false"!==e.flowchart.htmlLabels||(r=!1),"loose"!==e.securityLevel&&r&&(n=function(t){return t.replace(/#br#/g,"
")}(n=(n=(n=N(n)).replace(//g,">")).replace(/=/g,"="))),n},F=O;function P(t){return(P="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 I,R=h(),B={},j=[],z=[],Y=[],U={},$={},V=0,G=!0,W=[],H=function(t,e,n,r){var i=t,a=e;i[0].match(/\d/)&&(i=""+i),a[0].match(/\d/)&&(a=""+a);var o={start:i,end:a,type:void 0,text:""};void 0!==(r=n.text)&&(o.text=L(r.trim(),R),'"'===o.text[0]&&'"'===o.text[o.text.length-1]&&(o.text=o.text.substring(1,o.text.length-1))),void 0!==n&&(o.type=n.type,o.stroke=n.stroke),j.push(o)},q=function(t,e){t.split(",").forEach((function(t){var n=t;t[0].match(/\d/)&&(n=""+n),void 0!==B[n]&&B[n].classes.push(e),void 0!==U[n]&&U[n].classes.push(e)}))},Z=function(t,e){t.split(",").forEach((function(t){void 0!==e&&($[t]=L(e,R))}))},X=function(t){var e=Object(a.select)(".mermaidTooltip");null===(e._groups||e)[0][0]&&(e=Object(a.select)("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),Object(a.select)(t).select("svg").selectAll("g.node").on("mouseover",(function(){var t=Object(a.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",n.left+(n.right-n.left)/2+"px").style("top",n.top-14+document.body.scrollTop+"px"),t.classed("hover",!0)}})).on("mouseout",(function(){e.transition().duration(500).style("opacity",0),Object(a.select)(this).classed("hover",!1)}))};W.push(X);var J=function(t){for(var e=0;e/)&&(I="LR"),I.match(/.*v/)&&(I="TB")},setClass:q,getTooltip:function(t){return $[t]},setClickEvent:function(t,e,n){t.split(",").forEach((function(t){!function(t,e){var n=t;t[0].match(/\d/)&&(n=""+n),"loose"===R.securityLevel&&void 0!==e&&void 0!==B[n]&&W.push((function(){var t=document.querySelector('[id="'.concat(n,'"]'));null!==t&&t.addEventListener("click",(function(){window[e](n)}),!1)}))}(t,e)})),Z(t,n),q(t,"clickable")},setLink:function(t,e,n){t.split(",").forEach((function(t){var n=t;t[0].match(/\d/)&&(n=""+n),void 0!==B[n]&&(B[n].link=T(e,R))})),Z(t,n),q(t,"clickable")},bindFunctions:function(t){W.forEach((function(e){e(t)}))},getDirection:function(){return I.trim()},getVertices:function(){return B},getEdges:function(){return j},getClasses:function(){return z},clear:function(){B={},z={},j=[],(W=[]).push(X),Y=[],U={},V=0,$=[],G=!0},defaultStyle:function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},addSubGraph:function(t,e,n){var r=t.trim(),i=n;t===n&&n.match(/\s/)&&(r=void 0);var a,o,s,u=[];a=u.concat.apply(u,e),o={boolean:{},number:{},string:{}},s=[],u=a.filter((function(t){var e=P(t);return""!==t.trim()&&(e in o?!o[e].hasOwnProperty(t)&&(o[e][t]=!0):!(s.indexOf(t)>=0)&&s.push(t))}));for(var c=0;c0&&function t(e,n){var r=Y[n].nodes;if(!((Q+=1)>2e3)){if(K[Q]=n,Y[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",Y.length-1)},getSubGraphs:function(){return Y},destructLink:function(t,e){var n,r=function(t){switch(t.trim()){case"--x":return{type:"arrow_cross",stroke:"normal"};case"--\x3e":return{type:"arrow_point",stroke:"normal"};case"<--\x3e":return{type:"double_arrow_point",stroke:"normal"};case"x--x":return{type:"double_arrow_cross",stroke:"normal"};case"o--o":return{type:"double_arrow_circle",stroke:"normal"};case"o.-o":return{type:"double_arrow_circle",stroke:"dotted"};case"<==>":return{type:"double_arrow_point",stroke:"thick"};case"o==o":return{type:"double_arrow_circle",stroke:"thick"};case"x==x":return{type:"double_arrow_cross",stroke:"thick"};case"x.-x":case"x-.-x":return{type:"double_arrow_cross",stroke:"dotted"};case"<.->":case"<-.->":return{type:"double_arrow_point",stroke:"dotted"};case"o-.-o":return{type:"double_arrow_circle",stroke:"dotted"};case"--o":return{type:"arrow_circle",stroke:"normal"};case"---":return{type:"arrow_open",stroke:"normal"};case"-.-x":return{type:"arrow_cross",stroke:"dotted"};case"-.->":return{type:"arrow_point",stroke:"dotted"};case"-.-o":return{type:"arrow_circle",stroke:"dotted"};case"-.-":return{type:"arrow_open",stroke:"dotted"};case".-x":return{type:"arrow_cross",stroke:"dotted"};case".->":return{type:"arrow_point",stroke:"dotted"};case".-o":return{type:"arrow_circle",stroke:"dotted"};case".-":return{type:"arrow_open",stroke:"dotted"};case"==x":return{type:"arrow_cross",stroke:"thick"};case"==>":return{type:"arrow_point",stroke:"thick"};case"==o":return{type:"arrow_circle",stroke:"thick"};case"===":return{type:"arrow_open",stroke:"thick"}}}(t);if(e){if((n=function(t){switch(t.trim()){case"<--":return{type:"arrow_point",stroke:"normal"};case"x--":return{type:"arrow_cross",stroke:"normal"};case"o--":return{type:"arrow_circle",stroke:"normal"};case"<-.":return{type:"arrow_point",stroke:"dotted"};case"x-.":return{type:"arrow_cross",stroke:"dotted"};case"o-.":return{type:"arrow_circle",stroke:"dotted"};case"<==":return{type:"arrow_point",stroke:"thick"};case"x==":return{type:"arrow_cross",stroke:"thick"};case"o==":return{type:"arrow_circle",stroke:"thick"};case"--":return{type:"arrow_open",stroke:"normal"};case"==":return{type:"arrow_open",stroke:"thick"};case"-.":return{type:"arrow_open",stroke:"dotted"}}}(e)).stroke!==r.stroke)return{type:"INVALID",stroke:"INVALID"};if("arrow_open"===n.type)n.type=r.type;else{if(n.type!==r.type)return{type:"INVALID",stroke:"INVALID"};n.type="double_"+n.type}return"double_arrow"===n.type&&(n.type="double_arrow_point"),n}return r},lex:{firstGraph:function(){return!!G&&(G=!1,!0)}}},et=n(22),nt=n.n(et),rt=n(5),it=n.n(rt),at=n(44),ot=n.n(at);function st(t,e,n){var r=.9*(e.width+e.height),i=[{x:r/2,y:0},{x:r,y:-r/2},{x:r/2,y:-r},{x:0,y:-r/2}],a=vt(t,r,r,i);return n.intersect=function(t){return it.a.intersect.polygon(n,i,t)},a}function ut(t,e,n){var r=e.height,i=r/4,a=e.width+2*i,o=[{x:i,y:0},{x:a-i,y:0},{x:a,y:-r/2},{x:a-i,y:-r},{x:i,y:-r},{x:0,y:-r/2}],s=vt(t,a,r,o);return n.intersect=function(t){return it.a.intersect.polygon(n,o,t)},s}function ct(t,e,n){var r=e.width,i=e.height,a=[{x:-i/2,y:0},{x:r,y:0},{x:r,y:-i},{x:-i/2,y:-i},{x:0,y:-i/2}],o=vt(t,r,i,a);return n.intersect=function(t){return it.a.intersect.polygon(n,a,t)},o}function lt(t,e,n){var r=e.width,i=e.height,a=[{x:-2*i/6,y:0},{x:r-i/6,y:0},{x:r+2*i/6,y:-i},{x:i/6,y:-i}],o=vt(t,r,i,a);return n.intersect=function(t){return it.a.intersect.polygon(n,a,t)},o}function ft(t,e,n){var r=e.width,i=e.height,a=[{x:2*i/6,y:0},{x:r+i/6,y:0},{x:r-2*i/6,y:-i},{x:-i/6,y:-i}],o=vt(t,r,i,a);return n.intersect=function(t){return it.a.intersect.polygon(n,a,t)},o}function ht(t,e,n){var r=e.width,i=e.height,a=[{x:-2*i/6,y:0},{x:r+2*i/6,y:0},{x:r-i/6,y:-i},{x:i/6,y:-i}],o=vt(t,r,i,a);return n.intersect=function(t){return it.a.intersect.polygon(n,a,t)},o}function dt(t,e,n){var r=e.width,i=e.height,a=[{x:i/6,y:0},{x:r-i/6,y:0},{x:r+2*i/6,y:-i},{x:-2*i/6,y:-i}],o=vt(t,r,i,a);return n.intersect=function(t){return it.a.intersect.polygon(n,a,t)},o}function pt(t,e,n){var r=e.width,i=e.height,a=[{x:0,y:0},{x:r+i/2,y:0},{x:r,y:-i/2},{x:r+i/2,y:-i},{x:0,y:-i}],o=vt(t,r,i,a);return n.intersect=function(t){return it.a.intersect.polygon(n,a,t)},o}function yt(t,e,n){var r=e.height,i=e.width+r/4,a=t.insert("rect",":first-child").attr("rx",r/2).attr("ry",r/2).attr("x",-i/2).attr("y",-r/2).attr("width",i).attr("height",r);return n.intersect=function(t){return it.a.intersect.rect(n,t)},a}function gt(t,e,n){var r=e.width,i=e.height,a=[{x:0,y:0},{x:r,y:0},{x:r,y:-i},{x:0,y:-i},{x:0,y:0},{x:-8,y:0},{x:r+8,y:0},{x:r+8,y:-i},{x:-8,y:-i},{x:-8,y:0}],o=vt(t,r,i,a);return n.intersect=function(t){return it.a.intersect.polygon(n,a,t)},o}function mt(t,e,n){var r=e.width,i=r/2,a=i/(2.5+r/50),o=e.height+a,s="M 0,"+a+" a "+i+","+a+" 0,0,0 "+r+" 0 a "+i+","+a+" 0,0,0 "+-r+" 0 l 0,"+o+" a "+i+","+a+" 0,0,0 "+r+" 0 l 0,"+-o,u=t.attr("label-offset-y",a).insert("path",":first-child").attr("d",s).attr("transform","translate("+-r/2+","+-(o/2+a)+")");return n.intersect=function(t){var e=it.a.intersect.rect(n,t),r=e.x-n.x;if(0!=i&&(Math.abs(r)n.height/2-a)){var o=a*a*(1-r*r/(i*i));0!=o&&(o=Math.sqrt(o)),o=a-o,t.y-n.y>0&&(o=-o),e.y+=o}return e},u}function vt(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+")")}var bt={},xt=function(t,e,n){var r=Object(a.select)('[id="'.concat(n,'"]'));Object.keys(t).forEach((function(n){var i=t[n],a="default";i.classes.length>0&&(a=i.classes.join(" "));var o,s=w(i.styles),u=void 0!==i.text?i.text:i.id;if(h().flowchart.htmlLabels){var c={label:u.replace(/fa[lrsb]?:fa-[\w-]+/g,(function(t){return"")}))};(o=ot()(r,c).node()).parentNode.removeChild(o)}else{var l=document.createElementNS("http://www.w3.org/2000/svg","text");l.setAttribute("style",s.labelStyle.replace("color:","fill:"));for(var f=u.split(F),d=0;d"):(s.labelType="text",s.label=o.text.replace(F,"\n"),void 0===o.style&&(s.style=s.style||"stroke: #333; stroke-width: 1.5px;fill:none"),s.labelStyle=s.labelStyle.replace("color:","fill:"))),e.setEdge(o.start,o.end,s,i)}))},wt=function(t,e){y.info("Drawing flowchart"),tt.clear();var n=nt.a.parser;n.yy=tt;try{n.parse(t)}catch(t){y.debug("Parsing failed")}var r=tt.getDirection();void 0===r&&(r="TD");for(var i,o=h().flowchart,s=o.nodeSpacing||50,u=o.rankSpacing||50,c=new C.a.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:r,nodesep:s,ranksep:u,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}})),l=tt.getSubGraphs(),f=l.length-1;f>=0;f--)i=l[f],tt.addVertex(i.id,i.title,"group",void 0,i.classes);var d=tt.getVertices(),p=tt.getEdges(),g=0;for(g=l.length-1;g>=0;g--){i=l[g],Object(a.selectAll)("cluster").append("text");for(var m=0;m"),y.info("vertexText"+i),function(t){var e,n=Object(a.select)(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=n.append("xhtml:div"),i=t.label,o=t.isNode?"nodeLabel":"edgeLabel";return r.html(''+i+""),(e=t.labelStyle)&&r.attr("style",e),r.style("display","inline-block"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),n.node()}({isNode:r,label:i.replace(/fa[lrsb]?:fa-[\w-]+/g,(function(t){return"")}))});var o=document.createElementNS("http://www.w3.org/2000/svg","text");o.setAttribute("style",e.replace("color:","fill:"));var s=[];s="string"==typeof i?i.split(/\\n|\n|/gi):Array.isArray(i)?i:[];for(var u=0;u0)t(a,n,r,i);else{var o=n.node(a);y.info("cp ",a," to ",i," with parent ",e),r.setNode(a,o),y.debug("Setting parent",a,n.parent(a)),i!==n.parent(a)&&r.setParent(a,n.parent(a)),e!==i&&a!==e?(y.debug("Setting parent",a,e),r.setParent(a,e)):(y.info("In copy ",e,"root",i,"data",n.node(e),i),y.debug("Not Setting parent for node=",a,"cluster!==rootId",e!==i,"node!==clusterId",a!==e));var s=n.edges(a);y.debug("Copying Edges",s),s.forEach((function(t){y.info("Edge",t);var a=n.edge(t.v,t.w,t.name);y.info("Edge data",a,i);try{!function(t,e){return y.info("Decendants of ",e," is ",Nt[e]),y.info("Edge is ",t),t.v!==e&&t.w!==e&&(Nt[e]?(y.info("Here "),Nt[e].indexOf(t.v)>=0||!!Lt(t.v,e)||!!Lt(t.w,e)||Nt[e].indexOf(t.w)>=0):(y.debug("Tilt, ",e,",not in decendants"),!1))}(t,i)?y.info("Skipping copy of edge ",t.v,"--\x3e",t.w," rootId: ",i," clusterId:",e):(y.info("Copying as ",t.v,t.w,a,t.name),r.setEdge(t.v,t.w,a,t.name),y.info("newGraph edges ",r.edges(),r.edge(r.edges()[0])))}catch(t){y.error(t)}}))}y.debug("Removing node",a),n.removeNode(a)}))},Pt=function t(e,n){y.trace("Searching",e);var r=n.children(e);if(r.length<1)return y.trace("This is a valid node",e),e;for(var i=0;i ",a),a}},It=function(t){return Ot[t]&&Ot[t].externalConnections&&Ot[t]?Ot[t].id:t},Rt=n(153);function Bt(t,e){return t*e>0}var jt=function(t,e,n,r){var i,a,o,s,u,c,l,f,h,d,p,y,g;if(i=e.y-t.y,o=t.x-e.x,u=e.x*t.y-t.x*e.y,h=i*n.x+o*n.y+u,d=i*r.x+o*r.y+u,!(0!==h&&0!==d&&Bt(h,d)||(a=r.y-n.y,s=n.x-r.x,c=r.x*n.y-n.x*r.y,l=a*t.x+s*t.y+c,f=a*e.x+s*e.y+c,0!==l&&0!==f&&Bt(l,f)||0==(p=i*s-a*o))))return y=Math.abs(p/2),{x:(g=o*c-s*u)<0?(g-y)/p:(g+y)/p,y:(g=a*u-i*c)<0?(g-y)/p:(g+y)/p}},zt=function(t,e){var n,r,i=t.x,a=t.y,o=e.x-i,s=e.y-a,u=t.width/2,c=t.height/2;return Math.abs(s)*u>Math.abs(o)*c?(s<0&&(c=-c),n=0===s?0:c*o/s,r=c):(o<0&&(u=-u),n=u,r=0===o?0:u*s/o),{x:i+n,y:a+r}},Yt=(n.n(Rt).a,function(t,e,n){return function(t,e,n,r){var i=t.x,a=t.y,o=i-r.x,s=a-r.y,u=Math.sqrt(e*e*s*s+n*n*o*o),c=Math.abs(e*n*o/u);r.x1&&a.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,u=Math.sqrt(o*o+s*s);return a"),e.labelStyle,!0,!0));if(h().flowchart.htmlLabels){var v=m.children[0],b=Object(a.select)(m);c=v.getBoundingClientRect(),b.attr("width",c.width),b.attr("height",c.height)}var x=e.padding/2;return Object(a.select)(m).attr("transform","translate( "+(c.width>g.width?0:(g.width-c.width)/2)+", "+(g.height+x+5)+")"),Object(a.select)(l).attr("transform","translate( "+(c.widthe.height/2-s)){var i=s*s*(1-r*r/(o*o));0!=i&&(i=Math.sqrt(i)),i=s-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),Mt(e,r),e.intersect=function(t){return Yt(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),Mt(e,i),e.intersect=function(t){return Yt(e,7,t)},n},note:function(t,e){var n=Tt(t,e,"node "+e.classes,!0),r=n.shapeSvg,i=n.bbox,a=n.halfPadding;y.info("Classes = ",e.classes);var o=r.insert("rect",":first-child");return o.attr("rx",e.rx).attr("ry",e.ry).attr("x",-i.width/2-a).attr("y",-i.height/2-a).attr("width",i.width+e.padding).attr("height",i.height+e.padding),Mt(e,o),e.intersect=function(t){return $t(e,t)},r},subroutine:function(t,e){var n=Tt(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=Ct(r,a,o,[{x:0,y:0},{x:a,y:0},{x:a,y:-o},{x:0,y:-o},{x:0,y:0},{x:-8,y:0},{x:a+8,y:0},{x:a+8,y:-o},{x:-8,y:-o},{x:-8,y:0}]);return Mt(e,s),e.intersect=function(t){return Ut(e,t)},r},fork:Vt,join:Vt},Wt={},Ht=function(t){var e=Wt[t.id];y.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+")")},qt={rect:function(t,e){y.trace("Creating subgraph rect for ",e.id,e);var n=t.insert("g").attr("class","cluster").attr("id",e.id),r=n.insert("rect",":first-child"),i=n.insert("g").attr("class","cluster-label"),o=i.node().appendChild(At(e.labelText,e.labelStyle,void 0,!0)),s=o.getBBox();if(h().flowchart.htmlLabels){var u=o.children[0],c=Object(a.select)(o);s=u.getBoundingClientRect(),c.attr("width",s.width),c.attr("height",s.height)}var l=0*e.padding,f=l/2;y.trace("Data ",e,JSON.stringify(e)),r.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-f).attr("y",e.y-e.height/2-f).attr("width",e.width+l).attr("height",e.height+l),i.attr("transform","translate("+(e.x-s.width/2)+", "+(e.y-e.height/2-e.padding/3+3)+")");var d=r.node().getBBox();return e.width=d.width,e.height=d.height,e.intersect=function(t){return zt(e,t)},n},roundedWithTitle:function(t,e){var n=t.insert("g").attr("class",e.classes).attr("id",e.id),r=n.insert("rect",":first-child"),i=n.insert("g").attr("class","cluster-label"),o=n.append("rect"),s=i.node().appendChild(At(e.labelText,e.labelStyle,void 0,!0)),u=s.getBBox();if(h().flowchart.htmlLabels){var c=s.children[0],l=Object(a.select)(s);u=c.getBoundingClientRect(),l.attr("width",u.width),l.attr("height",u.height)}u=s.getBBox();var f=0*e.padding,d=f/2;r.attr("class","outer").attr("x",e.x-e.width/2-d).attr("y",e.y-e.height/2-d).attr("width",e.width+f).attr("height",e.height+f),o.attr("class","inner").attr("x",e.x-e.width/2-d).attr("y",e.y-e.height/2-d+u.height-1).attr("width",e.width+f).attr("height",e.height+f-u.height-3),i.attr("transform","translate("+(e.x-u.width/2)+", "+(e.y-e.height/2-e.padding/3+(h().flowchart.htmlLabels?5:3))+")");var p=r.node().getBBox();return e.width=p.width,e.height=p.height,e.intersect=function(t){return zt(e,t)},n},noteGroup:function(t,e){var n=t.insert("g").attr("class","note-cluster").attr("id",e.id),r=n.insert("rect",":first-child"),i=0*e.padding,a=i/2;r.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2-a).attr("width",e.width+i).attr("height",e.height+i).attr("fill","none");var o=r.node().getBBox();return e.width=o.width,e.height=o.height,e.intersect=function(t){return zt(e,t)},n},divider:function(t,e){var n=t.insert("g").attr("class",e.classes).attr("id",e.id),r=n.insert("rect",":first-child"),i=0*e.padding,a=i/2;r.attr("class","divider").attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2).attr("width",e.width+i).attr("height",e.height+i);var o=r.node().getBBox();return e.width=o.width,e.height=o.height,e.intersect=function(t){return zt(e,t)},n}},Zt={},Xt={},Jt=function(t,e){var n=t.x,r=t.y,i=Math.abs(e.x-n),a=Math.abs(e.y-r),o=t.width/2,s=t.height/2;return i>o||a>s},Qt=function(t,e,n){y.trace("intersection o:",e," i:",n,t);var r=t.x,i=t.y,a=Math.abs(r-n.x),o=t.width/2,s=n.xMath.abs(r-e.x)*c?(s=h*l/f,{x:n.x0&&(y.trace("Cluster identified",e," Replacement id in edges: ",Pt(e,t)),Nt[e]=function t(e,n){for(var r=n.children(e),i=[].concat(r),a=0;a0&&(y.debug("Cluster identified",e,Nt),r.forEach((function(t){t.v!==e&&t.w!==e&&Lt(t.v,e)^Lt(t.w,e)&&(y.debug("Edge: ",t," leaves cluster ",e),y.debug("Decendants of ",e,": ",Nt[e]),Ot[e].externalConnections=!0)})))})),function t(e,n){if(y.debug("extractor - ",n,C.a.json.write(e),e.children("D")),n>10)y.error("Bailing out");else{for(var r=e.nodes(),i=!1,a=0;a0}if(i){y.debug("Nodes = ",r,n);for(var u=0;u0){y.debug("Cluster without external connections, without a parent and with children",c,n);var l=e.graph(),f=new C.a.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:"TB"===l.rankdir?"LR":"TB",nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}}));y.debug("Old graph before copy",C.a.json.write(e)),Ft(c,e,f,c),e.setNode(c,{clusterNode:!0,id:c,clusterData:Ot[c].clusterData,labelText:Ot[c].labelText,graph:f}),y.debug("New graph after copy",C.a.json.write(f)),y.debug("Old graph after copy",C.a.json.write(e))}else y.debug("Cluster ** ",c," **not meeting the criteria !externalConnections:",!Ot[c].externalConnections," no parent: ",!e.parent(c)," children ",e.children(c)&&e.children(c).length>0,e.children("D"),n),y.debug(Ot);else y.debug("Not a cluster",c,n)}r=e.nodes(),y.debug("New list of nodes",r);for(var h=0;h "+e.w+": "+JSON.stringify(e)),y.trace("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(t.edge(e)));var r=e.v,i=e.w;y.trace("Fix",Ot,"ids:",e.v,e.w,"Translateing: ",Ot[e.v],Ot[e.w]),(Ot[e.v]||Ot[e.w])&&(y.trace("Fixing and trixing - removing",e.v,e.w,e.name),r=It(e.v),i=It(e.w),t.removeEdge(e.v,e.w,e.name),r!==e.v&&(n.fromCluster=e.v),i!==e.w&&(n.toCluster=e.w),y.trace("Replacing with",r,i,e.name),t.setEdge(r,i,n,e.name))})),y.debug("Adjusted Graph",C.a.json.write(t)),y.trace(Ot)):y.debug("Opting out, no graph ")}(e),y.warn("Graph after:",C.a.json.write(e)),y.warn("Graph ever after:",e.graph()),function t(e,n,r,i){y.info("Graph in recursive render:",C.a.json.write(n),i);var o=n.graph().rankdir;y.warn("Dir in recursive render - dir:",o);var s=e.insert("g").attr("class","root");n.nodes()?y.trace("Recursive render",n.nodes()):y.trace("No nodes found for",n),n.edges().length>0&&y.trace("Recursive edges",n.edge(n.edges()[0]));var u=s.insert("g").attr("class","clusters"),c=s.insert("g").attr("class","edgePaths"),l=s.insert("g").attr("class","edgeLabels"),f=s.insert("g").attr("class","nodes");return n.nodes().forEach((function(e){var a=n.node(e);if(void 0!==i){var s=JSON.parse(JSON.stringify(i.clusterData));y.trace("Setting data for cluster",s),n.setNode(i.id,s),n.setParent(e,i.id,s)}if(y.trace("(Insert) Node "+e+": "+JSON.stringify(n.node(e))),a&&a.clusterNode){y.trace("Cluster identified",e,a,n.node(e));var u=t(f,a.graph,r,n.node(e));Mt(a,u),function(t,e){Wt[e.id]=t}(u,a),y.warn("Recursive render complete",u,a)}else n.children(e).length>0?(y.trace("Cluster - the non recursive path",e,a.id,a,n),y.trace(Pt(a.id,n)),Ot[a.id]={id:Pt(a.id,n),node:a}):(y.trace("Node - the non recursive path",e,a.id,a),function(t,e,n){Wt[e.id]=Gt[e.shape](t,e,n)}(f,n.node(e),o))})),n.edges().forEach((function(t){var e=n.edge(t.v,t.w,t.name);y.trace("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),y.trace("Edge "+t.v+" -> "+t.w+": ",t," ",JSON.stringify(n.edge(t))),y.trace("Fix",Ot,"ids:",t.v,t.w,"Translateing: ",Ot[t.v],Ot[t.w]),function(t,e){var n=At(e.label,e.labelStyle),r=t.insert("g").attr("class","edgeLabel"),i=r.insert("g").attr("class","label");i.node().appendChild(n);var o=n.getBBox();if(h().flowchart.htmlLabels){var s=n.children[0],u=Object(a.select)(n);o=s.getBoundingClientRect(),u.attr("width",o.width),u.attr("height",o.height)}i.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),Xt[e.id]=r,e.width=o.width,e.height=o.height}(l,e)})),n.edges().forEach((function(t){y.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t))})),y.info("#############################################"),y.info("### Layout ###"),y.info("#############################################"),y.info(n),Et.a.layout(n),y.trace("Graph after layout:",C.a.json.write(n)),n.nodes().forEach((function(t){var e=n.node(t);y.trace("Position "+t+": "+JSON.stringify(n.node(t))),y.info("Position "+t+": ("+e.x,","+e.y,") width: ",e.width," height: ",e.height),e&&e.clusterNode?Ht(e):n.children(t).length>0?(function(t,e){y.trace("Inserting cluster");var n=e.shape||"rect";Zt[e.id]=qt[n](t,e)}(u,e),Ot[e.id].node=e):Ht(e)})),n.edges().forEach((function(t){var e=n.edge(t);y.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(e),e),function(t,e,n,r,i,o){var s=n.points,u=o.node(e.v),c=o.node(e.w);if(c.intersect&&u.intersect&&((s=s.slice(1,n.points.length-1)).unshift(u.intersect(s[0])),y.info("Last point",s[s.length-1],c,c.intersect(s[s.length-1])),s.push(c.intersect(s[s.length-1]))),n.toCluster){var l;y.trace("edge",n),y.trace("to cluster",r[n.toCluster]),s=[];var f=!1;n.points.forEach((function(t){var e=r[n.toCluster].node;if(Jt(e,t)||f)f||s.push(t);else{y.trace("inside",n.toCluster,t,l);var i=Qt(e,l,t);y.trace("intersect",i),s.push(i),f=!0}l=t}))}if(n.fromCluster){y.trace("edge",n),y.trace("from cluster",r[n.toCluster]);for(var d,p=[],g=!1,m=s.length-1;m>=0;m--){var v=s[m],b=r[n.fromCluster].node;if(Jt(b,v)||g)y.trace("Outside point",v),g||p.unshift(v);else{y.trace("inside",n.toCluster,v);var x=Qt(b,d,v);p.unshift(x),g=!0}d=v}s=p}var _=s.filter((function(t){return!Number.isNaN(t.y)})),w=Object(a.line)().x((function(t){return t.x})).y((function(t){return t.y})).curve(a.curveBasis),k=t.append("path").attr("d",w(_)).attr("id",n.id).attr("class","transition"+(n.classes?" "+n.classes:"")),E="";switch(h().state.arrowMarkerAbsolute&&(E=(E=(E=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),y.info("arrowType",n.arrowType),n.arrowType){case"arrow_cross":k.attr("marker-end","url("+E+"#"+i+"-crossEnd)");break;case"double_arrow_cross":k.attr("marker-end","url("+E+"#"+i+"-crossEnd)"),k.attr("marker-start","url("+E+"#"+i+"-crossStart)");break;case"arrow_point":k.attr("marker-end","url("+E+"#"+i+"-pointEnd)");break;case"double_arrow_point":k.attr("marker-end","url("+E+"#"+i+"-pointEnd)"),k.attr("marker-start","url("+E+"#"+i+"-pointStart)");break;case"arrow_barb":k.attr("marker-end","url("+E+"#"+i+"-barbEnd)");break;case"double_arrow_barb":k.attr("marker-end","url("+E+"#"+i+"-barnEnd)"),k.attr("marker-start","url("+E+"#"+i+"-barbStart)");break;case"arrow_circle":k.attr("marker-end","url("+E+"#"+i+"-circleEnd)");break;case"double_arrow_circle":k.attr("marker-end","url("+E+"#"+i+"-circleEnd)"),k.attr("marker-start","url("+E+"#"+i+"-circleStart)")}}(c,t,e,Ot,r,n),function(t){y.info("Moving label",t.id,t.label,Xt[t.id]),t.label&&Xt[t.id].attr("transform","translate("+t.x+", "+t.y+")")}(e)})),s}(t,e,r)},te={},ee=function(t,e,n){var r=Object(a.select)('[id="'.concat(n,'"]'));Object.keys(t).forEach((function(n){var i=t[n],a="default";i.classes.length>0&&(a=i.classes.join(" "));var o,s=w(i.styles),u=void 0!==i.text?i.text:i.id;if(h().flowchart.htmlLabels){var c={label:u.replace(/fa[lrsb]?:fa-[\w-]+/g,(function(t){return"")}))};(o=ot()(r,c).node()).parentNode.removeChild(o)}else{var l=document.createElementNS("http://www.w3.org/2000/svg","text");l.setAttribute("style",s.labelStyle.replace("color:","fill:"));for(var f=u.split(F),d=0;d=0;f--)i=l[f],y.info("Subgraph - ",i),tt.addVertex(i.id,i.title,"group",void 0,i.classes);var d=tt.getVertices(),p=tt.getEdges();y.info(p);var g=0;for(g=l.length-1;g>=0;g--){i=l[g],Object(a.selectAll)("cluster").append("text");for(var m=0;m>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},a}}return me.push({from:t,to:e,message:n,type:r}),!0},ke={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},Ee=function(t,e,n){var r={actor:t,placement:e,message:n},i=[].concat(t,t);ve.push(r),me.push({from:i[0],to:i[1],message:n,type:ke.NOTE,placement:e})},Se=function(t){be=t},Ae={addActor:_e,addMessage:function(t,e,n,r){me.push({from:t,to:e,message:n,answer:r})},addSignal:we,enableSequenceNumbers:function(){xe=!0},showSequenceNumbers:function(){return xe},getMessages:function(){return me},getActors:function(){return ge},getActor:function(t){return ge[t]},getActorKeys:function(){return Object.keys(ge)},getTitle:function(){return be},clear:function(){ge={},me=[]},LINETYPE:ke,ARROWTYPE:{FILLED:0,OPEN:1},PLACEMENT:{LEFTOF:0,RIGHTOF:1,OVER:2},addNote:Ee,setTitle:Se,apply:function t(e){if(e instanceof Array)e.forEach((function(e){t(e)}));else switch(e.type){case"addActor":_e(e.actor,e.actor,e.description);break;case"activeStart":case"activeEnd":we(e.actor,void 0,void 0,e.signalType);break;case"addNote":Ee(e.actor,e.placement,e.text);break;case"addMessage":we(e.from,e.to,e.msg,e.signalType);break;case"loopStart":we(void 0,void 0,e.loopText,e.signalType);break;case"loopEnd":we(void 0,void 0,void 0,e.signalType);break;case"rectStart":we(void 0,void 0,e.color,e.signalType);break;case"rectEnd":we(void 0,void 0,void 0,e.signalType);break;case"optStart":we(void 0,void 0,e.optText,e.signalType);break;case"optEnd":we(void 0,void 0,void 0,e.signalType);break;case"altStart":case"else":we(void 0,void 0,e.altText,e.signalType);break;case"altEnd":we(void 0,void 0,void 0,e.signalType);break;case"setTitle":Se(e.text);break;case"parStart":case"and":we(void 0,void 0,e.parText,e.signalType);break;case"parEnd":we(void 0,void 0,void 0,e.signalType)}}};de.parser.yy=Ae;var Te,Me,Ce={diagramMarginX:50,diagramMarginY:30,actorMargin:50,width:150,height:65,actorFontSize:14,actorFontFamily:'"Open-Sans", "sans-serif"',noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial',noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial',boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!1,bottomMarginAdj:1,activationWidth:10,textPlacement:"tspan",showSequenceNumbers:!1},Oe={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],init:function(){this.sequenceItems=[],this.activations=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},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 u=i.sequenceItems.length-a+1;i.updateVal(s,"starty",e-u*Ce.boxMargin,Math.min),i.updateVal(s,"stopy",r+u*Ce.boxMargin,Math.max),i.updateVal(Oe.data,"startx",t-u*Ce.boxMargin,Math.min),i.updateVal(Oe.data,"stopx",n+u*Ce.boxMargin,Math.max),"activation"!==o&&(i.updateVal(s,"startx",t-u*Ce.boxMargin,Math.min),i.updateVal(s,"stopx",n+u*Ce.boxMargin,Math.max),i.updateVal(Oe.data,"starty",e-u*Ce.boxMargin,Math.min),i.updateVal(Oe.data,"stopy",r+u*Ce.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(Oe.data,"startx",i,Math.min),this.updateVal(Oe.data,"starty",o,Math.min),this.updateVal(Oe.data,"stopx",a,Math.max),this.updateVal(Oe.data,"stopy",s,Math.max),this.updateBounds(i,o,a,s)},newActivation:function(t,e){var n=de.parser.yy.getActors()[t.from.actor],r=Le(t.from.actor).length,i=n.x+Ce.width/2+(r-1)*Ce.activationWidth/2;this.activations.push({startx:i,starty:this.verticalPos+2,stopx:i+Ce.activationWidth,stopy:void 0,actor:t.from.actor,anchored:fe(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]},newLoop:function(t,e){this.sequenceItems.push({startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t,fill: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(Oe.getVerticalPos()),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 this.data}},Ne=function(t,e,n,r,i){var a={x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0};a.x=e,a.y=n,a.width=i||Ce.width,a.class="note";var o=t.append("g"),s=ue(o,a),u=function(t,e,n,r,i){var a=0,o=0,s={left:"start",start:"start",center:"middle",middle:"middle",right:"end",end:"end"},u=t.split(F),c=!0,l=!1,f=void 0;try{for(var h,d=u[Symbol.iterator]();!(c=(h=d.next()).done);c=!0){var p=h.value,y={x:0,y:0,fill:void 0,"text-anchor":"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0},g=s[Ce.noteAlign]||"middle";switch(g){case"start":y.x=e+Ce.noteMargin;break;case"middle":y.x=e+i/2;break;case"end":y.x=e+i-Ce.noteMargin}y.y=n+a,y.dy="1em",y.text=p,y.class="noteText";var m=ce(r,y).style("text-anchor",g).style("font-size",Ce.noteFontSize).style("font-family",Ce.noteFontFamily).attr("dominant-baseline","central").attr("alignment-baseline","central");a+=(m._groups||m)[0][0].getBBox().height,m.attr("y",n+(o+a+2*Ce.noteMargin)/2),o=a}}catch(t){l=!0,f=t}finally{try{c||null==d.return||d.return()}finally{if(l)throw f}}return a}(r.message,e,n,o,a.width);Oe.insert(e,n,e+a.width,n+2*Ce.noteMargin+u),s.attr("height",u+2*Ce.noteMargin),Oe.bumpVerticalPos(u+2*Ce.noteMargin)},De=function(t,e,n,r){for(var i=0,a=0,o=0;o=6&&n.indexOf("weekends")>=0||n.indexOf(t.format("dddd").toLowerCase())>=0||n.indexOf(t.format(e.trim()))>=0},Ke=function(t,e,n){if(n.length&&!t.manualEndTime){var r=p()(t.startTime,e,!0);r.add(1,"d");var i=p()(t.endTime,e,!0),a=tn(r,i,e,n);t.endTime=i.toDate(),t.renderEndTime=a}},tn=function(t,e,n,r){for(var i=!1,a=null;t<=e;)i||(a=e.toDate()),(i=Qe(t,n,r))&&e.add(1,"d"),t.add(1,"d");return a},en=function(t,e,n){n=n.trim();var r=/^after\s+([\d\w- ]+)/.exec(n.trim());if(null!==r){var i=null;if(r[1].split(" ").forEach((function(t){var e=cn(t);void 0!==e&&(i?e.endTime>i.endTime&&(i=e):i=e)})),i)return i.endTime;var a=new Date;return a.setHours(0,0,0,0),a}var o=p()(n,e.trim(),!0);return o.isValid()?o.toDate():(y.debug("Invalid date:"+n),y.debug("With date format:"+e.trim()),new Date)},nn=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()},rn=function(t,e,n,r){r=r||!1,n=n.trim();var i=p()(n,e.trim(),!0);return i.isValid()?(r&&i.add(1,"d"),i.toDate()):nn(/^([\d]+)([wdhms])/.exec(n.trim()),p()(t))},an=0,on=function(t){return void 0===t?"task"+(an+=1):t},sn=[],un={},cn=function(t){var e=un[t];return sn[e]},ln=function(){for(var t=function(t){var e=sn[t],n="";switch(sn[t].raw.startTime.type){case"prevTaskEnd":var r=cn(e.prevTaskId);e.startTime=r.endTime;break;case"getStartDate":(n=en(0,Ye,sn[t].raw.startTime.startData))&&(sn[t].startTime=n)}return sn[t].startTime&&(sn[t].endTime=rn(sn[t].startTime,Ye,sn[t].raw.endTime.data,Je),sn[t].endTime&&(sn[t].processed=!0,sn[t].manualEndTime=p()(sn[t].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),Ke(sn[t],Ye,Ve))),sn[t].processed},e=!0,n=0;n0){var r=t.split("~");n=r[0],e=r[1]}return{className:n,type:e}},kn=function(t){var e=wn(t);void 0===bn[e.className]&&(bn[e.className]={id:e.className,type:e.type,cssClasses:[],methods:[],members:[],annotations:[],domId:"classid-"+e.className+"-"+xn},xn++)},En=function(t){for(var e=Object.keys(bn),n=0;n>")?r.annotations.push(i.substring(2,i.length-2)):i.indexOf(")")>0?r.methods.push(i):i&&r.members.push(i)}},An=function(t,e){t.split(",").forEach((function(t){var n=t;t[0].match(/\d/)&&(n="classid-"+n),void 0!==bn[n]&&bn[n].cssClasses.push(e)}))},Tn={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},Mn=function(t){var e=Object(a.select)(".mermaidTooltip");null===(e._groups||e)[0][0]&&(e=Object(a.select)("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),Object(a.select)(t).select("svg").selectAll("g.node").on("mouseover",(function(){var t=Object(a.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",n.left+(n.right-n.left)/2+"px").style("top",n.top-14+document.body.scrollTop+"px"),t.classed("hover",!0)}})).on("mouseout",(function(){e.transition().duration(500).style("opacity",0),Object(a.select)(this).classed("hover",!1)}))};_n.push(Mn);var Cn={addClass:kn,bindFunctions:function(t){_n.forEach((function(e){e(t)}))},clear:function(){vn=[],bn={},(_n=[]).push(Mn)},getClass:function(t){return bn[t]},getClasses:function(){return bn},addAnnotation:function(t,e){var n=wn(t).className;bn[n].annotations.push(e)},getRelations:function(){return vn},addRelation:function(t){y.debug("Adding relation: "+JSON.stringify(t)),kn(t.id1),kn(t.id2),t.id1=wn(t.id1).className,t.id2=wn(t.id2).className,vn.push(t)},addMember:Sn,addMembers:function(t,e){Array.isArray(e)&&(e.reverse(),e.forEach((function(e){return Sn(t,e)})))},cleanupLabel:function(t){return":"===t.substring(0,1)?t.substr(1).trim():t.trim()},lineType:{LINE:0,DOTTED_LINE:1},relationType:Tn,setClickEvent:function(t,e,n){t.split(",").forEach((function(t){!function(t,e,n){var r=t,i=En(r);"loose"===mn.securityLevel&&void 0!==e&&void 0!==bn[r]&&(n&&(bn[r].tooltip=L(n,mn)),_n.push((function(){var t=document.querySelector('[id="'.concat(i,'"]'));null!==t&&t.addEventListener("click",(function(){window[e](i)}),!1)})))}(t,e,n)})),An(t,"clickable")},setCssClass:An,setLink:function(t,e,n){t.split(",").forEach((function(t){var r=t;t[0].match(/\d/)&&(r="classid-"+r),void 0!==bn[r]&&(bn[r].link=T(e,mn),n&&(bn[r].tooltip=L(n,mn)))})),An(t,"clickable")},lookUpDomId:En},On=n(38),Nn=n.n(On),Dn=0,Ln=function(t,e,n,r){var i=function(t){var e=t.match(/^(\+|-|~|#)?(\w+)(~\w+~|\[\])?\s+(\w+)$/),n=t.match(/^(\+|-|~|#)?(\w+)\s?\(\s*(\w+(~\w+~|\[\])?\s*(\w+)?)?\s*\)\s?([*|$])?\s?(\w+(~\w+~|\[\])?)?\s*$/);return e?function(t){return{displayText:(t[1]?t[1].trim():"")+(t[2]?t[2].trim():"")+(t[3]?Fn(t[3]):"")+" "+(t[4]?t[4].trim():""),cssStyle:""}}(e):n?function(t){var e=t[1]?t[1].trim():"",n=t[2]?t[2].trim():"",r=t[3]?Fn(t[3]):"",i=t[6]?t[6].trim():"";return{displayText:e+n+"("+r+")"+(t[7]?" : "+Fn(t[7]).trim():""),cssStyle:Pn(i)}}(n):function(t){var e="",n="",r="",i=t.indexOf("("),a=t.indexOf(")");if(i>1&&a>i&&a<=t.length){var o=t.match(/(\+|-|~|#)?(\w+)/),s=o[1]?o[1].trim():"",u=o[2],c=t.substring(i+1,a),l=t.substring(a,a+1);n=Pn(l),a<(e=s+u+"("+Fn(c.trim())+")").length&&""!==(r=t.substring(a+2).trim())&&(r=" : "+Fn(r))}else e=Fn(t);return{displayText:e+r,cssStyle:n}}(t)}(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)},Fn=function t(e){var n=e;return-1!=e.indexOf("~")?t(n=(n=n.replace("~","<")).replace("~",">")):n},Pn=function(t){switch(t){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}},In=function(t,e,n){y.info("Rendering class "+e);var r="classGroup ";e.cssClasses.length>0&&(r+=e.cssClasses.join(" "));var i,a=e.id,o={id:a,label:e.id,width:0,height:0},s=t.append("g").attr("id",En(a)).attr("class",r);i=e.link?s.append("svg:a").attr("xlink:href",e.link).attr("target","_blank").append("text").attr("y",n.textHeight+n.padding).attr("x",0):s.append("text").attr("y",n.textHeight+n.padding).attr("x",0);var u=!0;e.annotations.forEach((function(t){var e=i.append("tspan").text("«"+t+"»");u||e.attr("dy",n.textHeight),u=!1}));var c=e.id;void 0!==e.type&&""!==e.type&&(c+="<"+e.type+">");var l=i.append("tspan").text(c).attr("class","title");u||l.attr("dy",n.textHeight);var f=i.node().getBBox().height,h=s.append("line").attr("x1",0).attr("y1",n.padding+f+n.dividerMargin/2).attr("y2",n.padding+f+n.dividerMargin/2),d=s.append("text").attr("x",n.padding).attr("y",f+n.dividerMargin+n.textHeight).attr("fill","white").attr("class","classText");u=!0,e.members.forEach((function(t){Ln(d,t,u,n),u=!1}));var p=d.node().getBBox(),g=s.append("line").attr("x1",0).attr("y1",n.padding+f+n.dividerMargin+p.height).attr("y2",n.padding+f+n.dividerMargin+p.height),m=s.append("text").attr("x",n.padding).attr("y",f+2*n.dividerMargin+p.height+n.textHeight).attr("fill","white").attr("class","classText");u=!0,e.methods.forEach((function(t){Ln(m,t,u,n),u=!1}));var v=s.node().getBBox(),b=s.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",v.width+2*n.padding).attr("height",v.height+n.padding+.5*n.dividerMargin).node().getBBox().width;return i.node().childNodes.forEach((function(t){t.setAttribute("x",(b-t.getBBox().width)/2)})),e.tooltip&&i.insert("title").text(e.tooltip),h.attr("x2",b),g.attr("x2",b),o.width=b,o.height=v.height+n.padding+.5*n.dividerMargin,o};On.parser.yy=Cn;var Rn={},Bn={dividerMargin:10,padding:5,textHeight:10},jn=function(t){for(var e=Object.keys(Rn),n=0;n0&&o.length>0){var u={stmt:"state",id:(k++,"id-"+Math.random().toString(36).substr(2,12)+"-"+k),type:"divider",doc:Un(o)};i.push(Un(u)),n.doc=i}n.doc.forEach((function(e){return t(n,e,!0)}))}}({id:"root"},{id:"root",doc:$n},!0),{id:"root",doc:$n}},extract:function(t){var e;e=t.doc?t.doc:t,y.info(e),qn(),y.info("Extract",e),e.forEach((function(t){"state"===t.stmt&&Hn(t.id,t.type,t.doc,t.description,t.note),"relation"===t.stmt&&Zn(t.state1.id,t.state2.id,t.description)}))},trimColon:function(t){return t&&":"===t[0]?t.substr(1).trim():t.trim()}},tr=n(17),er=n.n(tr),nr={},rr=function(t,e,n){var r,i=h().state.padding,a=2*h().state.padding,o=t.node().getBBox(),s=o.width,u=o.x,c=t.append("text").attr("x",0).attr("y",h().state.titleShift).attr("font-size",h().state.fontSize).attr("class","state-title").text(e.id),l=c.node().getBBox().width+a,f=Math.max(l,s);f===s&&(f+=a);var d=t.node().getBBox();e.doc,r=u-i,l>s&&(r=(s-f)/2+i),Math.abs(u-d.x)s&&(r=u-(l-s)/2);var p=1-h().state.textHeight;return t.insert("rect",":first-child").attr("x",r).attr("y",p).attr("class",n?"alt-composit":"composit").attr("width",f).attr("height",d.height+h().state.textHeight+h().state.titleShift+1).attr("rx","0"),c.attr("x",r+i),l<=s&&c.attr("x",u+(f-a)/2-l/2+i),t.insert("rect",":first-child").attr("x",r).attr("y",h().state.titleShift-h().state.textHeight-h().state.padding).attr("width",f).attr("height",3*h().state.textHeight).attr("rx",h().state.radius),t.insert("rect",":first-child").attr("x",r).attr("y",h().state.titleShift-h().state.textHeight-h().state.padding).attr("width",f).attr("height",d.height+3+2*h().state.textHeight).attr("rx",h().state.radius),t},ir=function(t,e){var n=e.id,r={id:n,label:e.id,width:0,height:0},i=t.append("g").attr("id",n).attr("class","stateGroup");"start"===e.type&&function(t){t.append("circle").style("stroke","black").style("fill","black").attr("r",h().state.sizeUnit).attr("cx",h().state.padding+h().state.sizeUnit).attr("cy",h().state.padding+h().state.sizeUnit)}(i),"end"===e.type&&function(t){t.append("circle").style("stroke","black").style("fill","white").attr("r",h().state.sizeUnit+h().state.miniPadding).attr("cx",h().state.padding+h().state.sizeUnit+h().state.miniPadding).attr("cy",h().state.padding+h().state.sizeUnit+h().state.miniPadding),t.append("circle").style("stroke","black").style("fill","black").attr("r",h().state.sizeUnit).attr("cx",h().state.padding+h().state.sizeUnit+2).attr("cy",h().state.padding+h().state.sizeUnit+2)}(i),"fork"!==e.type&&"join"!==e.type||function(t,e){var n=h().state.forkWidth,r=h().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",h().state.padding).attr("y",h().state.padding)}(i,e),"note"===e.type&&function(t,e){e.attr("class","state-note");var n=e.append("rect").attr("x",0).attr("y",h().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,"
"),s=(o=o.replace(/\n/g,"
")).split(F),u=1.25*h().state.noteMargin,c=!0,l=!1,f=void 0;try{for(var d,p=s[Symbol.iterator]();!(c=(d=p.next()).done);c=!0){var y=d.value.trim();if(y.length>0){var g=a.append("tspan");g.text(y),0===u&&(u+=g.node().getBBox().height),i+=u,g.attr("x",0+h().state.noteMargin),g.attr("y",0+i+1.25*h().state.noteMargin)}}}catch(t){l=!0,f=t}finally{try{c||null==p.return||p.return()}finally{if(l)throw f}}return{textWidth:a.node().getBBox().width,textHeight:i}}(t,0,0,e.append("g")),i=r.textWidth,a=r.textHeight;n.attr("height",a+2*h().state.noteMargin),n.attr("width",i+2*h().state.noteMargin)}(e.note.text,i),"divider"===e.type&&function(t){t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",h().state.textHeight).attr("class","divider").attr("x2",2*h().state.textHeight).attr("y1",0).attr("y2",0)}(i),"default"===e.type&&0===e.descriptions.length&&function(t,e){var n=t.append("text").attr("x",2*h().state.padding).attr("y",h().state.textHeight+2*h().state.padding).attr("font-size",h().state.fontSize).attr("class","state-title").text(e.id).node().getBBox();t.insert("rect",":first-child").attr("x",h().state.padding).attr("y",h().state.padding).attr("width",n.width+2*h().state.padding).attr("height",n.height+2*h().state.padding).attr("rx",h().state.radius)}(i,e),"default"===e.type&&e.descriptions.length>0&&function(t,e){var n=t.append("text").attr("x",2*h().state.padding).attr("y",h().state.textHeight+1.3*h().state.padding).attr("font-size",h().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),r=n.height,i=t.append("text").attr("x",h().state.padding).attr("y",r+.4*h().state.padding+h().state.dividerMargin+h().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*h().state.padding).text(e);n||r.attr("dy",h().state.textHeight)}(i,t,o),o=!1),a=!1}));var s=t.append("line").attr("x1",h().state.padding).attr("y1",h().state.padding+r+h().state.dividerMargin/2).attr("y2",h().state.padding+r+h().state.dividerMargin/2).attr("class","descr-divider"),u=i.node().getBBox(),c=Math.max(u.width,n.width);s.attr("x2",c+3*h().state.padding),t.insert("rect",":first-child").attr("x",h().state.padding).attr("y",h().state.padding).attr("width",c+2*h().state.padding).attr("height",u.height+r+2*h().state.padding).attr("rx",h().state.radius)}(i,e);var a=i.node().getBBox();return r.width=a.width+2*h().state.padding,r.height=a.height+2*h().state.padding,function(t,e){nr[t]=e}(n,r),r},ar=0;tr.parser.yy=Kn;var or={},sr=function(t,e){Yn=h().state,tr.parser.yy.clear(),tr.parser.parse(t),y.debug("Rendering diagram "+t);var n=Object(a.select)("[id='".concat(e,"']"));n.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z"),new C.a.Graph({multigraph:!0,compound:!0,rankdir:"RL"}).setDefaultEdgeLabel((function(){return{}})),function t(e,n,r,i){var o,s=new C.a.Graph({compound:!0,multigraph:!0}),u=!0;for(o=0;o "+t.w+": "+JSON.stringify(s.edge(t))),function(t,e,n){e.points=e.points.filter((function(t){return!Number.isNaN(t.y)}));var r=e.points,i=Object(a.line)().x((function(t){return t.x})).y((function(t){return t.y})).curve(a.curveBasis),o=t.append("path").attr("d",i(r)).attr("id","edge"+ar).attr("class","transition"),s="";if(h().state.arrowMarkerAbsolute&&(s=(s=(s=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),o.attr("marker-end","url("+s+"#"+function(t){switch(t){case Kn.relationType.AGGREGATION:return"aggregation";case Kn.relationType.EXTENSION:return"extension";case Kn.relationType.COMPOSITION:return"composition";case Kn.relationType.DEPENDENCY:return"dependency"}}(Kn.relationType.DEPENDENCY)+"End)"),void 0!==n.title){for(var u=t.append("g").attr("class","stateLabel"),c=S(e.points),l=c.x,f=c.y,d=D(n.title),p=0,g=[],m=0,v=0,b=0;b<=d.length;b++){var x=u.append("text").attr("text-anchor","middle").text(d[b]).attr("x",l).attr("y",f+p),_=x.node().getBBox();if(m=Math.max(m,_.width),v=Math.min(v,_.x),y.info(_.x,l,f+p),0===p){var w=x.node().getBBox();p=w.height,y.info("Title height",p,f)}g.push(x)}var k=p*d.length;if(d.length>1){var E=(d.length-1)*p*.5;g.forEach((function(t,e){return t.attr("y",f+e*p-E)})),k=p*d.length}var A=u.node().getBBox();u.insert("rect",":first-child").attr("class","box").attr("x",l-m/2-h().state.padding/2).attr("y",f-k/2-h().state.padding/2-3.5).attr("width",m+h().state.padding).attr("height",k+h().state.padding),y.info(A)}ar++}(n,s.edge(t),s.edge(t).relation))})),k=w.getBBox();var E={id:r||"root",label:r||"root",width:0,height:0};return E.width=k.width+2*Yn.padding,E.height=k.height+2*Yn.padding,y.debug("Doc rendered",E,s),E}(Kn.getRootDoc(),n,void 0,!1);var r=Yn.padding,i=n.node().getBBox(),o=i.width+2*r,s=i.height+2*r;Yn.useMaxWidth?(n.attr("width","100%"),n.attr("style","max-width: ".concat(1.75*o,"px;"))):n.attr("width",1.75*o),n.attr("viewBox","".concat(i.x-Yn.padding," ").concat(i.y-Yn.padding," ")+o+" "+s)},ur={},cr={},lr=function(t,e,n,r){if("root"!==n.id){var i="rect";!0===n.start&&(i="start"),!1===n.start&&(i="end"),"default"!==n.type&&(i=n.type),cr[n.id]||(cr[n.id]={id:n.id,shape:i,description:n.id,classes:"statediagram-state"}),n.description&&(Array.isArray(cr[n.id].description)?(cr[n.id].shape="rectWithTitle",cr[n.id].description.push(n.description)):cr[n.id].description.length>0?(cr[n.id].shape="rectWithTitle",cr[n.id].description===n.id?cr[n.id].description=[n.description]:cr[n.id].description=[cr[n.id].description,n.description]):(cr[n.id].shape="rect",cr[n.id].description=n.description)),!cr[n.id].type&&n.doc&&(y.info("Setting cluser for ",n.id),cr[n.id].type="group",cr[n.id].shape="divider"===n.type?"divider":"roundedWithTitle",cr[n.id].classes=cr[n.id].classes+" "+(r?"statediagram-cluster statediagram-cluster-alt":"statediagram-cluster"));var a={labelStyle:"",shape:cr[n.id].shape,labelText:cr[n.id].description,classes:cr[n.id].classes,style:"",id:n.id,type:cr[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:cr[n.id].type,padding:15},s={labelStyle:"",shape:"noteGroup",labelText:n.note.text,classes:cr[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 u=n.id,c=o.id;"left of"===n.note.position&&(u=o.id,c=n.id),t.setEdge(u,c,{arrowhead:"none",arrowType:"",style:"fill:none",labelStyle:"",classes:"note-edge",arrowheadStyle:"fill: #333",labelpos:"c",labelType:"text"})}else t.setNode(n.id,a)}e&&"root"!==e.id&&(y.info("Setting node ",n.id," to be child of its parent ",e.id),t.setParent(n.id,e.id)),n.doc&&(y.info("Adding nodes children "),hr(t,n,n.doc,!r))},fr=0,hr=function(t,e,n,r){y.trace("items",n),n.forEach((function(n){if("state"===n.stmt||"default"===n.stmt)lr(t,e,n,r);else if("relation"===n.stmt){lr(t,e,n.state1,r),lr(t,e,n.state2,r);var i={id:"edge"+fr,arrowhead:"normal",arrowType:"arrow_barb",style:"fill:none",labelStyle:"",label:n.description,arrowheadStyle:"fill: #333",labelpos:"c",labelType:"text"},a=n.state1.id,o=n.state2.id;t.setEdge(a,o,i,fr),fr++}}))},dr=function(t,e){y.info("Drawing state diagram (v2)",e),Kn.clear(),cr={};var n=er.a.parser;n.yy=Kn;try{n.parse(t)}catch(t){y.debug("Parsing failed")}var r=Kn.getDirection();void 0===r&&(r="LR");var i=h().state,o=i.nodeSpacing||50,s=i.rankSpacing||50,u=new C.a.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:"TB",nodesep:o,ranksep:s,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}}));y.info(Kn.getRootDocV2()),Kn.extract(Kn.getRootDocV2()),y.info(Kn.getRootDocV2()),lr(u,void 0,Kn.getRootDocV2(),!0);var c=Object(a.select)('[id="'.concat(e,'"]')),l=Object(a.select)("#"+e+" g");Kt(l,u,["barb"],"statediagram",e);var f=c.node().getBBox(),d=f.width+16,p=f.height+16;c.attr("width",1.75*d),c.attr("class","statediagram");var g=c.node().getBBox();i.useMaxWidth?(c.attr("width","100%"),c.attr("style","max-width: ".concat(d,"px;"))):(c.attr("height",p),c.attr("width",d));var m="".concat(g.x-8," ").concat(g.y-8," ").concat(d," ").concat(p);if(y.debug("viewBox ".concat(m)),c.attr("viewBox",m),!i.htmlLabels)for(var v=document.querySelectorAll('[id="'+e+'"] .edgeLabel .label'),b=0;be.seq&&_r(e,t)}(e,n))y.debug("Already merged");else{if(_r(e,n))gr[mr]=gr[t],yr=pr[gr[mr]];else{var r={id:xr(),message:"merged branch "+t+" into "+mr,seq:br++,parent:[null==yr?null:yr.id,gr[t]]};yr=r,pr[r.id]=r,gr[mr]=r.id}y.debug(gr),y.debug("in mergeBranch")}},checkout:function(t){y.debug("in checkout");var e=gr[mr=t];yr=pr[e]},reset:function(t){y.debug("in reset",t);var e=t.split(":")[0],n=parseInt(t.split(":")[1]),r="HEAD"===e?yr:pr[gr[e]];for(y.debug(r,n);n>0;)if(n--,!(r=pr[r.parent])){var i="Critical error - unique parent commit not found during reset";throw y.error(i),i}yr=r,gr[mr]=r.id},prettyPrint:function(){y.debug(pr),function t(e){var n=e.reduce((function(t,e){return t.seq>e.seq?t:e}),e[0]),r="";e.forEach((function(t){r+=t===n?"\t*":"\t|"}));var i,a,o,s=[r,n.id,n.seq];for(var u in gr)gr[u]===n.id&&s.push(u);if(y.debug(s.join(" ")),Array.isArray(n.parent)){var c=pr[n.parent[0]];kr(e,n,c),e.push(pr[n.parent[1]])}else{if(null==n.parent)return;var l=pr[n.parent];kr(e,n,l)}i=e,a=function(t){return t.id},o=Object.create(null),t(e=i.reduce((function(t,e){var n=a(e);return o[n]||(o[n]=!0,t.push(e)),t}),[]))}([Sr()[0]])},clear:function(){pr={},gr={master:yr=null},mr="master",br=0},getBranchesAsObjArray:function(){var t=[];for(var e in gr)t.push({name:e,commit:pr[gr[e]]});return t},getBranches:function(){return gr},getCommits:function(){return pr},getCommitsArray:Sr,getCurrentBranch:function(){return mr},getDirection:function(){return vr},getHead:function(){return yr}},Tr=n(64),Mr=n.n(Tr),Cr={},Or={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}},Nr={};function Dr(t,e,n,r){var i=x(r,a.curveBasis),o=Or.branchColors[n%Or.branchColors.length],s=Object(a.line)().x((function(t){return Math.round(t.x)})).y((function(t){return Math.round(t.y)})).curve(i);t.append("svg:path").attr("d",s(e)).style("stroke",o).style("stroke-width",Or.lineStrokeWidth).style("fill","none")}function Lr(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 Fr(t,e,n,r,i){y.debug("svgDrawLineForCommits: ",e,n);var a=Lr(t.select("#node-"+e+" circle")),o=Lr(t.select("#node-"+n+" circle"));switch(r){case"LR":if(a.left-o.left>Or.nodeSpacing){var s={x:a.left-Or.nodeSpacing,y:o.top+o.height/2};Dr(t,[s,{x:o.left+o.width,y:o.top+o.height/2}],i,"linear"),Dr(t,[{x:a.left,y:a.top+a.height/2},{x:a.left-Or.nodeSpacing/2,y:a.top+a.height/2},{x:a.left-Or.nodeSpacing/2,y:s.y},s],i)}else Dr(t,[{x:a.left,y:a.top+a.height/2},{x:a.left-Or.nodeSpacing/2,y:a.top+a.height/2},{x:a.left-Or.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>Or.nodeSpacing){var u={x:o.left+o.width/2,y:a.top+a.height+Or.nodeSpacing};Dr(t,[u,{x:o.left+o.width/2,y:o.top}],i,"linear"),Dr(t,[{x:a.left+a.width/2,y:a.top+a.height},{x:a.left+a.width/2,y:a.top+a.height+Or.nodeSpacing/2},{x:o.left+o.width/2,y:u.y-Or.nodeSpacing/2},u],i)}else Dr(t,[{x:a.left+a.width/2,y:a.top+a.height},{x:a.left+a.width/2,y:a.top+Or.nodeSpacing/2},{x:o.left+o.width/2,y:o.top-Or.nodeSpacing/2},{x:o.left+o.width/2,y:o.top}],i)}}function Pr(t,e){return t.select(e).node().cloneNode(!0)}function Ir(t,e,n,r){var i,a=Object.keys(Cr).length;if("string"==typeof e)do{if(i=Cr[e],y.debug("in renderCommitHistory",i.id,i.seq),t.select("#node-"+e).size()>0)return;t.append((function(){return Pr(t,"#def-commit")})).attr("class","commit").attr("id",(function(){return"node-"+i.id})).attr("transform",(function(){switch(r){case"LR":return"translate("+(i.seq*Or.nodeSpacing+Or.leftMargin)+", "+Er*Or.branchOffset+")";case"BT":return"translate("+(Er*Or.branchOffset+Or.leftMargin)+", "+(a-i.seq)*Or.nodeSpacing+")"}})).attr("fill",Or.nodeFillColor).attr("stroke",Or.nodeStrokeColor).attr("stroke-width",Or.nodeStrokeWidth);var o=void 0;for(var s in n)if(n[s].commit===i){o=n[s];break}o&&(y.debug("found branch ",o.name),t.select("#node-"+i.id+" p").append("xhtml:span").attr("class","branch-label").text(o.name+", ")),t.select("#node-"+i.id+" p").append("xhtml:span").attr("class","commit-id").text(i.id),""!==i.message&&"BT"===r&&t.select("#node-"+i.id+" p").append("xhtml:span").attr("class","commit-msg").text(", "+i.message),e=i.parent}while(e&&Cr[e]);Array.isArray(e)&&(y.debug("found merge commmit",e),Ir(t,e[0],n,r),Er++,Ir(t,e[1],n,r),Er--)}function Rr(t,e,n,r){for(r=r||0;e.seq>0&&!e.lineDrawn;)"string"==typeof e.parent?(Fr(t,e.id,e.parent,n,r),e.lineDrawn=!0,e=Cr[e.parent]):Array.isArray(e.parent)&&(Fr(t,e.id,e.parent[0],n,r),Fr(t,e.id,e.parent[1],n,r+1),Rr(t,Cr[e.parent[1]],n,r+1),e.lineDrawn=!0,e=Cr[e.parent[0]])}var Br,jr="",zr=!1,Yr={setMessage:function(t){y.debug("Setting message to: "+t),jr=t},getMessage:function(){return jr},setInfo:function(t){zr=t},getInfo:function(){return zr}},Ur=n(65),$r=n.n(Ur),Vr={},Gr={},Wr="",Hr={addSection:function(t,e){void 0===Gr[t]&&(Gr[t]=e,y.debug("Added new section :",t))},getSections:function(){return Gr},cleanupValue:function(t){return":"===t.substring(0,1)?(t=t.substring(1).trim(),Number(t.trim())):Number(t.trim())},clear:function(){Gr={},Wr=""},setTitle:function(t){Wr=t},getTitle:function(){return Wr}},qr=n(66),Zr=n.n(qr),Xr={},Jr={},Qr=[],Kr="",ti={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"},addEntity:function(t){void 0===Jr[t]&&(Jr[t]=t,y.debug("Added new entity :",t))},getEntities:function(){return Jr},addRelationship:function(t,e,n,r){var i={entityA:t,roleA:e,entityB:n,relSpec:r};Qr.push(i),y.debug("Added new relationship :",i)},getRelationships:function(){return Qr},clear:function(){Jr={},Qr=[],Kr=""},setTitle:function(t){Kr=t},getTitle:function(){return Kr}},ei=n(67),ni=n.n(ei),ri={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"},ii=ri,ai={},oi=function(t){return(t.entityA+t.roleA+t.entityB).replace(/\s/g,"")},si=0,ui=function(t,e){y.info("Drawing ER diagram"),ti.clear();var n=ni.a.parser;n.yy=ti;try{n.parse(t)}catch(t){y.debug("Parsing failed")}var r,i=Object(a.select)("[id='".concat(e,"']"));(function(t,e){var n;t.append("defs").append("marker").attr("id",ri.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",ri.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",ri.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",ri.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",ri.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",ri.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",ri.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",ri.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")})(i,ai),r=new C.a.Graph({multigraph:!0,directed:!0,compound:!1}).setGraph({rankdir:ai.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel((function(){return{}}));var o,s,u,c,l=(o=i,s=ti.getEntities(),u=r,Object.keys(s).forEach((function(t){var e=o.append("g").attr("id",t);c=void 0===c?t:c;var n="entity-"+t,r=e.append("text").attr("id",n).attr("x",0).attr("y",0).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("style","font-family: "+h().fontFamily+"; font-size: "+ai.fontSize+"px").text(t),i=r.node().getBBox(),a=Math.max(ai.minEntityWidth,i.width+2*ai.entityPadding),s=Math.max(ai.minEntityHeight,i.height+2*ai.entityPadding);r.attr("transform","translate("+a/2+","+s/2+")");var l=e.insert("rect","#"+n).attr("fill",ai.fill).attr("fill-opacity","100%").attr("stroke",ai.stroke).attr("x",0).attr("y",0).attr("width",a).attr("height",s).node().getBBox();u.setNode(t,{width:l.width,height:l.height,shape:"rect",id:t})})),c),f=function(t,e){return t.forEach((function(t){e.setEdge(t.entityA,t.entityB,{relationship:t},oi(t))})),t}(ti.getRelationships(),r);Et.a.layout(r),function(t,e){e.nodes().forEach((function(n){void 0!==n&&void 0!==e.node(n)&&t.select("#"+n).attr("transform","translate("+(e.node(n).x-e.node(n).width/2)+","+(e.node(n).y-e.node(n).height/2)+" )")}))}(i,r),f.forEach((function(t){!function(t,e,n,r){si++;var i=n.edge(e.entityA,e.entityB,oi(e)),o=Object(a.line)().x((function(t){return t.x})).y((function(t){return t.y})).curve(a.curveBasis),s=t.insert("path","#"+r).attr("d",o(i.points)).attr("stroke",ai.stroke).attr("fill","none");e.relSpec.relType===ti.Identification.NON_IDENTIFYING&&s.attr("stroke-dasharray","8,8");var u="";switch(ai.arrowMarkerAbsolute&&(u=(u=(u=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),e.relSpec.cardA){case ti.Cardinality.ZERO_OR_ONE:s.attr("marker-end","url("+u+"#"+ii.ZERO_OR_ONE_END+")");break;case ti.Cardinality.ZERO_OR_MORE:s.attr("marker-end","url("+u+"#"+ii.ZERO_OR_MORE_END+")");break;case ti.Cardinality.ONE_OR_MORE:s.attr("marker-end","url("+u+"#"+ii.ONE_OR_MORE_END+")");break;case ti.Cardinality.ONLY_ONE:s.attr("marker-end","url("+u+"#"+ii.ONLY_ONE_END+")")}switch(e.relSpec.cardB){case ti.Cardinality.ZERO_OR_ONE:s.attr("marker-start","url("+u+"#"+ii.ZERO_OR_ONE_START+")");break;case ti.Cardinality.ZERO_OR_MORE:s.attr("marker-start","url("+u+"#"+ii.ZERO_OR_MORE_START+")");break;case ti.Cardinality.ONE_OR_MORE:s.attr("marker-start","url("+u+"#"+ii.ONE_OR_MORE_START+")");break;case ti.Cardinality.ONLY_ONE:s.attr("marker-start","url("+u+"#"+ii.ONLY_ONE_START+")")}var c=s.node().getTotalLength(),l=s.node().getPointAtLength(.5*c),f="rel"+si,d=t.append("text").attr("id",f).attr("x",l.x).attr("y",l.y).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("style","font-family: "+h().fontFamily+"; font-size: "+ai.fontSize+"px").text(e.roleA).node().getBBox();t.insert("rect","#"+f).attr("x",l.x-d.width/2).attr("y",l.y-d.height/2).attr("width",d.width).attr("height",d.height).attr("fill","white").attr("fill-opacity","85%")}(i,t,r,l)}));var d=ai.diagramPadding,p=i.node().getBBox(),g=p.width+2*d,m=p.height+2*d;i.attr("height",m),i.attr("width","100%"),i.attr("style","max-width: ".concat(g,"px;")),i.attr("viewBox","".concat(p.x-d," ").concat(p.y-d," ").concat(g," ").concat(m))},ci=n(24),li=n.n(ci);function fi(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e/gi),d=0;d3?function(t){var e=Object(a.arc)().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(15/2.2);t.append("path").attr("d",e).attr("transform","translate("+i.cx+","+(i.cy+2)+")")}(o):i.score<3?function(t){var e=Object(a.arc)().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(15/2.2);t.append("path").attr("d",e).attr("transform","translate("+i.cx+","+(i.cy+7)+")")}(o):function(t){t.append("line").attr("stroke",2).attr("x1",i.cx-5).attr("y1",i.cy+7).attr("x2",i.cx+5).attr("y2",i.cy+7).attr("class","task-line").attr("stroke-width","1px").attr("stroke","#666")}(o);var c={x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0};c.x=e.x,c.y=e.y,c.fill=e.fill,c.width=n.width,c.height=n.height,c.class="task",c.rx=3,c.ry=3,bi(u,c);var l=e.x+14;e.people.forEach((function(t){var n=e.actors[t],r={cx:l,cy:e.y,r:7,fill:n,stroke:"#000",title:t};xi(u,r),l+=10})),wi(n)(e.task,u,c.x,c.y,c.width,c.height,{class:"task"},n,e.colour)};ci.parser.yy=vi;var Ai={leftMargin:150,diagramMarginX:50,diagramMarginY:20,taskMargin:50,width:150,height:50,taskFontSize:14,taskFontFamily:'"Open-Sans", "sans-serif"',boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"]},Ti={},Mi=Ai.leftMargin,Ci={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},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;this.sequenceItems.forEach((function(o){a++;var s=i.sequenceItems.length-a+1;i.updateVal(o,"starty",e-s*Ai.boxMargin,Math.min),i.updateVal(o,"stopy",r+s*Ai.boxMargin,Math.max),i.updateVal(Ci.data,"startx",t-s*Ai.boxMargin,Math.min),i.updateVal(Ci.data,"stopx",n+s*Ai.boxMargin,Math.max),i.updateVal(o,"startx",t-s*Ai.boxMargin,Math.min),i.updateVal(o,"stopx",n+s*Ai.boxMargin,Math.max),i.updateVal(Ci.data,"starty",e-s*Ai.boxMargin,Math.min),i.updateVal(Ci.data,"stopy",r+s*Ai.boxMargin,Math.max)}))},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(Ci.data,"startx",i,Math.min),this.updateVal(Ci.data,"starty",o,Math.min),this.updateVal(Ci.data,"stopx",a,Math.max),this.updateVal(Ci.data,"stopy",s,Math.max),this.updateBounds(i,o,a,s)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return this.data}},Oi=Ai.sectionFills,Ni=Ai.sectionColours;function Di(t){return(Di="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)}for(var Li={},Fi=0,Pi=["default","forest","dark","neutral"];FiRi.maxTextSize&&(i="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: "+Ri.fontFamily).append("svg").attr("id",t).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg").append("g");else{var o=document.getElementById(t);o&&o.remove();var c=document.querySelector("#d"+t);c&&(c.innerHTML=""),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=i,i=function(t){return t.replace(/style.*:\S*#.*;/g,(function(t){return t.substring(0,t.length-1)})).replace(/classDef.*:\S*#.*;/g,(function(t){return t.substring(0,t.length-1)})).replace(/#\w+;/g,(function(t){var e=t.substring(1,t.length-1);return/^\+?\d+$/.test(e)?"fl°°"+e+"¶ß":"fl°"+e+"¶ß"}))}(i);var l=Object(a.select)("#d"+t).node(),f=E(i),h=l.firstChild,d=h.firstChild,p=Li[Ri.theme];if(void 0===p&&(p=""),void 0!==Ri.themeCSS&&(p+="\n".concat(Ri.themeCSS)),void 0!==Ri.fontFamily&&(p+="\n:root { --mermaid-font-family: ".concat(Ri.fontFamily,"}")),void 0!==Ri.altFontFamily&&(p+="\n:root { --mermaid-alt-font-family: ".concat(Ri.altFontFamily,"}")),"flowchart"===f||"flowchart-v2"===f){var g=function(t){y.info("Extracting classes"),tt.clear();var e=nt.a.parser;return e.yy=tt,e.parse(t),tt.getClasses()}(i);for(var m in g)p+="\n.".concat(m," > * { ").concat(g[m].styles.join(" !important; ")," !important; }"),g[m].textStyles&&(p+="\n.".concat(m," tspan { ").concat(g[m].textStyles.join(" !important; ")," !important; }"))}var v=document.createElement("style");v.innerHTML=s()(p,"#".concat(t)),h.insertBefore(v,d);var b=document.createElement("style"),x=window.getComputedStyle(h);switch(b.innerHTML="#".concat(t," {\n color: ").concat(x.color,";\n font: ").concat(x.font,";\n }"),h.insertBefore(b,d),f){case"git":Ri.flowchart.arrowMarkerAbsolute=Ri.arrowMarkerAbsolute,function(t){Nr=t}(Ri.git),function(t,e,n){try{var r=Mr.a.parser;r.yy=Ar,r.yy.clear(),y.debug("in gitgraph renderer",t+"\n","id:",e,!1),r.parse(t+"\n"),Or=Object.assign(Or,Nr,Ar.getOptions()),y.debug("effective options",Or);var i=Ar.getDirection();Cr=Ar.getCommits();var o=Ar.getBranchesAsObjArray();"BT"===i&&(Or.nodeLabel.x=o.length*Or.branchOffset,Or.nodeLabel.width="100%",Or.nodeLabel.y=-2*Or.nodeRadius);var s=Object(a.select)('[id="'.concat(e,'"]'));for(var u in function(t){t.append("defs").append("g").attr("id","def-commit").append("circle").attr("r",Or.nodeRadius).attr("cx",0).attr("cy",0),t.select("#def-commit").append("foreignObject").attr("width",Or.nodeLabel.width).attr("height",Or.nodeLabel.height).attr("x",Or.nodeLabel.x).attr("y",Or.nodeLabel.y).attr("class","node-label").attr("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility").append("p").html("")}(s),Er=1,o){var c=o[u];Ir(s,c.commit.id,o,i),Rr(s,c.commit,i),Er++}s.attr("height",(function(){return"BT"===i?Object.keys(Cr).length*Or.nodeSpacing:(o.length+1)*Or.branchOffset}))}catch(t){y.error("Error while rendering gitgraph"),y.error(t.message)}}(i,t);break;case"flowchart":Ri.flowchart.arrowMarkerAbsolute=Ri.arrowMarkerAbsolute,function(t){for(var e=Object.keys(t),n=0;ne&&(n.starty=e-6,e+=12),function(t,e,n,r,i){var a={x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0},o=e.anchored;a.x=e.startx,a.y=e.starty,a.class="activation"+i%3,a.width=e.stopx-e.startx,a.height=n-e.starty,ie(o,a)}(0,n,e,0,Le(t.from.actor).length),Oe.insert(n.startx,e-10,n.stopx,e)}(t,Oe.getVerticalPos());break;case de.parser.yy.LINETYPE.LOOP_START:Oe.bumpVerticalPos(Ce.boxMargin),Oe.newLoop(t.message),Oe.bumpVerticalPos(Ce.boxMargin+Ce.boxTextMargin);break;case de.parser.yy.LINETYPE.LOOP_END:e=Oe.endLoop(),he(o,e,"loop",Ce),Oe.bumpVerticalPos(Ce.boxMargin);break;case de.parser.yy.LINETYPE.RECT_START:Oe.bumpVerticalPos(Ce.boxMargin),Oe.newLoop(void 0,t.message),Oe.bumpVerticalPos(Ce.boxMargin);break;case de.parser.yy.LINETYPE.RECT_END:var c=Oe.endLoop();(function(t,e){ie(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()})(o,c),Oe.bumpVerticalPos(Ce.boxMargin);break;case de.parser.yy.LINETYPE.OPT_START:Oe.bumpVerticalPos(Ce.boxMargin),Oe.newLoop(t.message),Oe.bumpVerticalPos(Ce.boxMargin+Ce.boxTextMargin);break;case de.parser.yy.LINETYPE.OPT_END:e=Oe.endLoop(),he(o,e,"opt",Ce),Oe.bumpVerticalPos(Ce.boxMargin);break;case de.parser.yy.LINETYPE.ALT_START:Oe.bumpVerticalPos(Ce.boxMargin),Oe.newLoop(t.message),Oe.bumpVerticalPos(Ce.boxMargin+Ce.boxTextMargin);break;case de.parser.yy.LINETYPE.ALT_ELSE:Oe.bumpVerticalPos(Ce.boxMargin),e=Oe.addSectionToLoop(t.message),Oe.bumpVerticalPos(Ce.boxMargin);break;case de.parser.yy.LINETYPE.ALT_END:e=Oe.endLoop(),he(o,e,"alt",Ce),Oe.bumpVerticalPos(Ce.boxMargin);break;case de.parser.yy.LINETYPE.PAR_START:Oe.bumpVerticalPos(Ce.boxMargin),Oe.newLoop(t.message),Oe.bumpVerticalPos(Ce.boxMargin+Ce.boxTextMargin);break;case de.parser.yy.LINETYPE.PAR_AND:Oe.bumpVerticalPos(Ce.boxMargin),e=Oe.addSectionToLoop(t.message),Oe.bumpVerticalPos(Ce.boxMargin);break;case de.parser.yy.LINETYPE.PAR_END:e=Oe.endLoop(),he(o,e,"par",Ce),Oe.bumpVerticalPos(Ce.boxMargin);break;default:try{Oe.bumpVerticalPos(Ce.messageMargin);var l=Fe(t.from),f=Fe(t.to),d=l[0]<=f[0]?1:0,p=l[0]0&&(e=t.classes.join(" "));for(var n=0,r=0;rn-e?n+a+1.5*gn.leftPadding>c?e+r-5:n+r+5:(n-e)/2+e+r})).attr("y",(function(t,r){return r*e+gn.barHeight/2+(gn.fontSize/2-2)+n})).attr("text-height",i).attr("class",(function(t){var e=s(t.startTime),n=s(t.endTime);t.milestone&&(n=e+i);var r=this.getBBox().width,a="";t.classes.length>0&&(a=t.classes.join(" "));for(var o=0,l=0;ln-e?n+r+1.5*gn.leftPadding>c?a+" taskTextOutsideLeft taskTextOutside"+o+" "+f:a+" taskTextOutsideRight taskTextOutside"+o+" "+f+" width-"+r:a+" taskText taskText"+o+" "+f+" width-"+r}))}(t,i,c,h,r,0,e),function(t,e){for(var n=[],r=0,i=0;i0&&a.setAttribute("dy","1em"),a.textContent=e[i],r.appendChild(a)}return r})).attr("x",10).attr("y",(function(i,a){if(!(a>0))return i[1]*t/2+e;for(var o=0;o "+t.w+": "+JSON.stringify(i.edge(t))),function(t,e,n,r){var i=function(t){switch(t){case Tn.AGGREGATION:return"aggregation";case Tn.EXTENSION:return"extension";case Tn.COMPOSITION:return"composition";case Tn.DEPENDENCY:return"dependency"}};e.points=e.points.filter((function(t){return!Number.isNaN(t.y)}));var o,s,u=e.points,c=Object(a.line)().x((function(t){return t.x})).y((function(t){return t.y})).curve(a.curveBasis),l=t.append("path").attr("d",c(u)).attr("id","edge"+Dn).attr("class","relation"),f="";r.arrowMarkerAbsolute&&(f=(f=(f=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),1==n.relation.lineType&&l.attr("class","relation dashed-line"),"none"!==n.relation.type1&&l.attr("marker-start","url("+f+"#"+i(n.relation.type1)+"Start)"),"none"!==n.relation.type2&&l.attr("marker-end","url("+f+"#"+i(n.relation.type2)+"End)");var h,d,p,g,m=e.points.length,v=S(e.points);if(o=v.x,s=v.y,m%2!=0&&m>1){var b=A("none"!==n.relation.type1,e.points,e.points[0]),x=A("none"!==n.relation.type2,e.points,e.points[m-1]);y.debug("cardinality_1_point "+JSON.stringify(b)),y.debug("cardinality_2_point "+JSON.stringify(x)),h=b.x,d=b.y,p=x.x,g=x.y}if(void 0!==n.title){var _=t.append("g").attr("class","classLabel"),w=_.append("text").attr("class","label").attr("x",o).attr("y",s).attr("fill","red").attr("text-anchor","middle").text(n.title);window.label=w;var k=w.node().getBBox();_.insert("rect",":first-child").attr("class","box").attr("x",k.x-r.padding/2).attr("y",k.y-r.padding/2).attr("width",k.width+r.padding).attr("height",k.height+r.padding)}y.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",h).attr("y",d).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",p).attr("y",g).attr("fill","black").attr("font-size","6").text(n.relationTitle2),Dn++}(r,i.edge(t),i.edge(t).relation,Bn))}));var f=r.node().getBBox(),h=f.width+40,d=f.height+40;Bn.useMaxWidth?(r.attr("width","100%"),r.attr("style","max-width: ".concat(h,"px;"))):(r.attr("height",d),r.attr("width",h));var p="".concat(f.x-20," ").concat(f.y-20," ").concat(h," ").concat(d);y.debug("viewBox ".concat(p)),r.attr("viewBox",p)}(i,t);break;case"state":Ri.state,sr(i,t);break;case"stateDiagram":(function(t){for(var e=Object.keys(t),n=0;n/gi," "),r=t.append("text");r.attr("x",e.x),r.attr("y",e.y),r.attr("fill",e.fill),r.style("text-anchor",e.anchor),void 0!==e.class&&r.attr("class",e.class);var i=r.append("tspan");i.attr("x",e.x+2*e.textMargin),i.text(n)}(t,{x:40,y:e+7,fill:"#666",text:n}),e+=20}))}(n),Ci.insert(0,0,Mi,50*Object.keys(Ti).length),function(t,e,n){for(var r="",i=0+(2*Ai.height+Ai.diagramMarginY),a=0,o="#CCC",s="black",u=0;u *").attr("xmlns","http://www.w3.org/1999/xhtml");var _=Object(a.select)("#d"+t).node().innerHTML;if(Ri.arrowMarkerAbsolute&&"false"!==Ri.arrowMarkerAbsolute||(_=_.replace(/marker-end="url\(.*?#/g,'marker-end="url(#',"g")),_=function(t){return t.replace(/fl°°/g,(function(){return"&#"})).replace(/fl°/g,(function(){return"&"})).replace(/¶ß/g,(function(){return";"}))}(_),void 0!==n)switch(f){case"flowchart":case"flowchart-v2":n(_,tt.bindFunctions);break;case"gantt":n(_,dn.bindFunctions);break;case"class":n(_,Cn.bindFunctions);break;default:n(_)}else y.debug("CB = undefined!");var w=Object(a.select)("#d"+t).node();return null!==w&&"function"==typeof w.remove&&Object(a.select)("#d"+t).node().remove(),_},parse:function(t){var e,n=E(t);switch(y.debug("Type "+n),n){case"git":(e=Mr.a).parser.yy=Ar;break;case"flowchart":case"flowchart-v2":tt.clear(),(e=nt.a).parser.yy=tt;break;case"sequence":(e=pe.a).parser.yy=Ae;break;case"gantt":(e=je.a).parser.yy=dn;break;case"class":(e=Nn.a).parser.yy=Cn;break;case"state":case"stateDiagram":(e=er.a).parser.yy=Kn;break;case"info":y.debug("info info info"),(e=$r.a).parser.yy=Yr;break;case"pie":y.debug("pie"),(e=Zr.a).parser.yy=Hr;break;case"er":y.debug("er"),(e=ni.a).parser.yy=ti;break;case"journey":y.debug("Journey"),(e=li.a).parser.yy=vi}e.parser.yy.parseError=function(t,e){throw{str:t,hash:e}},e.parse(t)},initialize:function(t){y.debug("Initializing mermaidAPI ",u.version),"object"===Di(t)&&function(t){for(var e=Object.keys(t),n=0;n=2?( /*! sequence config was passed as #1 */ void 0!==arguments[0]&&(zi.sequenceConfig=arguments[0]),t=arguments[1]):t=arguments[0],"function"==typeof arguments[arguments.length-1]?(e=arguments[arguments.length-1],y.debug("Callback function found")):void 0!==r.mermaid&&("function"==typeof r.mermaid.callback?(e=r.mermaid.callback,y.debug("Callback function found")):y.debug("No Callback function found")),t=void 0===t?document.querySelectorAll(".mermaid"):"string"==typeof t?document.querySelectorAll(t):t instanceof window.Node?[t]:t,y.debug("Start On Load before: "+zi.startOnLoad),void 0!==zi.startOnLoad&&(y.debug("Start On Load inner: "+zi.startOnLoad),Bi.initialize({startOnLoad:zi.startOnLoad})),void 0!==zi.ganttConfig&&Bi.initialize({gantt:zi.ganttConfig});for(var a=function(r){var a=t[r]; /*! Check if previously processed */if(a.getAttribute("data-processed"))return"continue";a.setAttribute("data-processed",!0);var o="mermaid-".concat(Date.now());n=i(n=a.innerHTML).trim().replace(//gi,"
"),Bi.render(o,n,(function(t,n){a.innerHTML=t,void 0!==e&&e(o),n&&n(a)}),a)},o=0;o