diff --git a/DrawIOWrapper/README.md b/DrawIOWrapper/README.md deleted file mode 100644 index 22e4ea9..0000000 --- a/DrawIOWrapper/README.md +++ /dev/null @@ -1,24 +0,0 @@ -# DrawIOWrapper -This is an example project, generated by AntOS Development Kit - -## Howto - -1. Open the project.apj file with AntOSDK (simply double Click on it) -2. Modify the UI in *assets/scheme.html* -3. Modify application code in *coffees/main.coffee* -4. Modify CSS style in *css/main.css* -5. Other files need to be copied: put in to assets - -## Set up build target - -Click **Menu> Build > Build Option** or simply hit **ALT-Y** - -In the build options dialog, add or remove files that need to be -included into the build - -Click **Save** - -## Build application -* To build: **Menu > Build > Build** or **ALT-C** -* To build and run: **Menu > Build > Build and Run** or **CTRL-R** -* To release: **Menu > Build > Build release** or **ALT-P** \ No newline at end of file diff --git a/DrawIOWrapper/assets/scheme.html b/DrawIOWrapper/assets/scheme.html deleted file mode 100644 index 840a4be..0000000 --- a/DrawIOWrapper/assets/scheme.html +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/DrawIOWrapper/build/debug/README.md b/DrawIOWrapper/build/debug/README.md deleted file mode 100644 index 22e4ea9..0000000 --- a/DrawIOWrapper/build/debug/README.md +++ /dev/null @@ -1,24 +0,0 @@ -# DrawIOWrapper -This is an example project, generated by AntOS Development Kit - -## Howto - -1. Open the project.apj file with AntOSDK (simply double Click on it) -2. Modify the UI in *assets/scheme.html* -3. Modify application code in *coffees/main.coffee* -4. Modify CSS style in *css/main.css* -5. Other files need to be copied: put in to assets - -## Set up build target - -Click **Menu> Build > Build Option** or simply hit **ALT-Y** - -In the build options dialog, add or remove files that need to be -included into the build - -Click **Save** - -## Build application -* To build: **Menu > Build > Build** or **ALT-C** -* To build and run: **Menu > Build > Build and Run** or **CTRL-R** -* To release: **Menu > Build > Build release** or **ALT-P** \ No newline at end of file diff --git a/DrawIOWrapper/build/debug/main.js b/DrawIOWrapper/build/debug/main.js deleted file mode 100644 index 1e1deff..0000000 --- a/DrawIOWrapper/build/debug/main.js +++ /dev/null @@ -1,15 +0,0 @@ -(function() { - var DrawIOWrapper; - - DrawIOWrapper = class DrawIOWrapper extends this.OS.GUI.BaseApplication { - constructor(args) { - super("DrawIOWrapper", args); - } - - main() {} - - }; - - this.OS.register("DrawIOWrapper", DrawIOWrapper); - -}).call(this); diff --git a/DrawIOWrapper/build/debug/package.json b/DrawIOWrapper/build/debug/package.json deleted file mode 100644 index 2cabed6..0000000 --- a/DrawIOWrapper/build/debug/package.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "app":"DrawIOWrapper", - "name":"DrawIOWrapper", - "description":"", - "info":{ - "author": "", - "email": "" - }, - "version":"0.0.1-a", - "category":"Other", - "iconclass":"fa fa-adn", - "mimes":["none"] -} \ No newline at end of file diff --git a/DrawIOWrapper/build/debug/scheme.html b/DrawIOWrapper/build/debug/scheme.html deleted file mode 100644 index 840a4be..0000000 --- a/DrawIOWrapper/build/debug/scheme.html +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/DrawIOWrapper/coffees/main.coffee b/DrawIOWrapper/coffees/main.coffee deleted file mode 100644 index 90473dc..0000000 --- a/DrawIOWrapper/coffees/main.coffee +++ /dev/null @@ -1,7 +0,0 @@ -class DrawIOWrapper extends this.OS.GUI.BaseApplication - constructor: ( args ) -> - super "DrawIOWrapper", args - - main: () -> - -this.OS.register "DrawIOWrapper", DrawIOWrapper \ No newline at end of file diff --git a/DrawIOWrapper/package.json b/DrawIOWrapper/package.json deleted file mode 100644 index a3f1421..0000000 --- a/DrawIOWrapper/package.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "app":"DrawIOWrapper", - "name":"DrawIOWrapper", - "description":"", - "info":{ - "author": "", - "email": "" - }, - "version":"0.0.1-a", - "category":"Other", - "iconclass":"fa fa-adn", - "mimes":["none"] -} diff --git a/DrawIOWrapper/project.apj b/DrawIOWrapper/project.apj deleted file mode 100644 index be50388..0000000 --- a/DrawIOWrapper/project.apj +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "DrawIOWrapper", - "root": "home://workspace/DrawIOWrapper", - "css": [], - "javascripts": [], - "coffees": ["coffees/main.coffee"], - "copies": ["assets/scheme.html", "package.json", "README.md"] -} \ No newline at end of file diff --git a/GraphEditor/assets/scheme.html b/GraphEditor/assets/scheme.html index 25cd28e..1f1d548 100644 --- a/GraphEditor/assets/scheme.html +++ b/GraphEditor/assets/scheme.html @@ -9,6 +9,6 @@ - + \ No newline at end of file diff --git a/GraphEditor/build/debug/main.css b/GraphEditor/build/debug/main.css index 8ea2949..f06d399 100644 --- a/GraphEditor/build/debug/main.css +++ b/GraphEditor/build/debug/main.css @@ -4,6 +4,7 @@ afx-app-window[data-id="graph_editor_win"] div[data-id="preview"] display: flex; align-items: center; justify-content: center; + background-color: white; } afx-app-window[data-id="graph_editor_win"] afx-button button { @@ -20,4 +21,4 @@ afx-app-window[data-id="graph_editor_win"] div[data-id="btn-container"]{ bottom:10px; right: 10px; display: inline; -} +} diff --git a/GraphEditor/build/debug/main.js b/GraphEditor/build/debug/main.js index e905219..8372782 100644 --- a/GraphEditor/build/debug/main.js +++ b/GraphEditor/build/debug/main.js @@ -1,2294 +1,41 @@ -(function() { - // Copyright 2017-2018 Xuan Sang LE - - // AnTOS Web desktop is is licensed under the GNU General Public - // License v3.0, see the LICENCE file for more information - - // This program is free software: you can redistribute it and/or - // modify it under the terms of the GNU General Public License as - // published by the Free Software Foundation, either version 3 of - // the License, or (at your option) any later version. - - // This program is distributed in the hope that it will be useful, - // but WITHOUT ANY WARRANTY; without even the implied warranty of - // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - // General Public License for more details. - - // You should have received a copy of the GNU General Public License - //along with this program. If not, see https://www.gnu.org/licenses/. - var GraphEditor; - - GraphEditor = class GraphEditor extends this.OS.GUI.BaseApplication { - constructor(args) { - super("GraphEditor", args); - } - - main() { - var me; - me = this; - //mermaid.initialize { startOnLoad: false } - mermaid.initialize({ - theme: 'forest' - }); - this.currfile = this.args && this.args.length > 0 ? this.args[0].asFileHandler() : "Untitled".asFileHandler(); - this.currfile.dirty = false; - 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: true, - enableLiveAutocompletion: true, - fontSize: "10pt" - }); - //@.editor.completers.push { getCompletions: ( editor, session, pos, prefix, callback ) -> } - this.editor.getSession().setUseWrapMode(true); - this.editor.session.setMode("ace/mode/text"); - this.editor.setTheme("ace/theme/monokai"); - this.editor.on("input", function() { - if (me.editormux) { - me.editormux = false; - return false; - } - if (!me.currfile.dirty) { - return me.currfile.dirty = true; - } - }); - if (!me.currfile.basename) { - me.editormux = true; - me.editor.setValue(GraphEditor.dummymermaid); - me.renderSVG(false); - } - this.editor.container.addEventListener("keydown", function(e) { - if (e.keyCode === 13) { - return me.renderSVG(true); - } - }, true); - this.bindKey("CTRL-R", function() { - return me.renderSVG(false); - }); - this.bindKey("ALT-G", function() { - return me.export("SVG"); - }); - this.bindKey("ALT-P", function() { - return me.export("PNG"); - }); - this.bindKey("ALT-N", function() { - return me.actionFile(`${me.name}-New`); - }); - this.bindKey("ALT-O", function() { - return me.actionFile(`${me.name}-Open`); - }); - this.bindKey("CTRL-S", function() { - return me.actionFile(`${me.name}-Save`); - }); - this.bindKey("ALT-W", function() { - return me.actionFile(`${me.name}-Saveas`); - }); - this.bindKey("CTRL-M", function() { - return me.svgToCanvas(function() {}); - }); - this.on("hboxchange", function() { - me.editor.resize(); - return me.calibrate(); - }); - this.on("focus", function() { - return me.editor.focus(); - }); - (this.find("btn-zoomin")).set("onbtclick", function(e) { - if (me.pan) { - return me.pan.zoomIn(); - } - }); - (this.find("btn-zoomout")).set("onbtclick", function(e) { - if (me.pan) { - return me.pan.zoomOut(); - } - }); - (this.find("btn-reset")).set("onbtclick", function(e) { - if (me.pan) { - return me.pan.resetZoom(); - } - }); - return this.open(this.currfile); - } - - menu() { - var me, menu; - me = this; - menu = [ - { - text: "__(File)", - child: [ - { - 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)", - child: [ - { - text: "SVG", - shortcut: "A-G" - }, - { - text: "PNG", - shortcut: "A-P" - } - ], - onmenuselect: function(e) { - return me.export(e.item.data.text); - } - } - ], - onmenuselect: function(e) { - return me.actionFile(e.item.data.dataid); - } - } - ]; - return menu; - } - - open(file) { - var me; - if (file.path === "Untitled") { - return; - } - me = this; - file.dirty = false; - return file.read(function(d) { - me.currfile = file; - me.editormux = true; - me.currfile.dirty = false; - me.editor.setValue(d); - me.scheme.set("apptitle", `${me.currfile.basename}`); - return me.renderSVG(false); - }); - } - - save(file) { - var me; - me = this; - return file.write("text/plain", function(d) { - if (d.error) { - return me.error(__("Error saving file {0}", file.basename)); - } - file.dirty = false; - file.text = file.basename; - return me.scheme.set("apptitle", `${me.currfile.basename}`); - }); - } - - actionFile(e) { - var me, saveas; - me = this; - saveas = function() { - return me.openDialog("FileDiaLog", function(d, n) { - me.currfile.setPath(`${d}/${n}`); - return me.save(me.currfile); - }, __("Save as"), { - file: me.currfile - }); - }; - switch (e) { - case `${this.name}-Open`: - return this.openDialog("FileDiaLog", function(d, f) { - return me.open(`${d}/${f}`.asFileHandler()); - }, __("Open file")); - case `${this.name}-Save`: - this.currfile.cache = this.editor.getValue(); - if (this.currfile.basename) { - return this.save(this.currfile); - } - return saveas(); - case `${this.name}-Saveas`: - this.currfile.cache = this.editor.getValue(); - return saveas(); - case `${this.name}-Render`: - return me.renderSVG(false); - case `${this.name}-New`: - this.currfile = "Untitled".asFileHandler(); - this.currfile.cache = ""; - this.currfile.dirty = false; - this.editormux = true; - return this.editor.setValue(""); - } - } - - export(t) { - var me; - me = this; - return me.openDialog("FileDiaLog", function(d, n) { - var e, fp; - fp = `${d}/${n}`.asFileHandler(); - try { - switch (t) { - case "SVG": - fp.cache = me.svgtext(); - return fp.write("text/plain", function(r) { - if (r.error) { - return me.error(__("Cannot export to {0}: {1}", t, r.error)); - } - return me.notify(__("File exported")); - }); - case "PNG": - // toDataURL("image/png") - return me.svgToCanvas(function(canvas) { - var e; - try { - fp.cache = canvas.toDataURL("image/png"); - return fp.write("base64", function(r) { - if (r.error) { - return me.error(__("Cannot export to {0}: {1}", t, r.error)); - } - return me.notify(__("File exported")); - }); - } catch (error) { - e = error; - return me.error(__("Cannot export to PNG in this browser: {0}", e.message)); - } - }); - } - } catch (error) { - e = error; - return me.error(__("Cannot export: {0}", e.message)); - } - }, __("Export as"), { - file: me.currfile - }); - } - - renderSVG(silent) { - var e, id, me, text; - me = this; - id = Math.floor(Math.random() * 100000) + 1; - //if silent - // mermaid.parseError = (e, h) -> - //else - // mermaid.parseError = (e, h) -> - // me.error e - text = this.editor.getValue(); - try { - mermaid.parse(text); - } catch (error) { - e = error; - if (!silent) { - me.error(__("Syntax error: {0}", e.str)); - } - return; - } - return mermaid.render(`c${id}`, text, function(text, f) { - var svg; - me.preview.innerHTML = text; - $(me.preview).append(me.btctn); - me.calibrate(); - svg = $(me.preview).children("svg")[0]; - $(svg).attr("style", ""); - return me.pan = svgPanZoom(svg, { - zoomEnabled: true, - controlIconsEnabled: false, - fit: true, - center: true, - minZoom: 0.1 - }); - //rd $($.parseHTML text). - }, me.preview); - } - - svgtext() { - var serializer, svg; - svg = $(this.preview).children("svg")[0]; - $("g.label", svg).each(function(i) { - return $(this).css("font-family", "Ubuntu").css("font-size", "13px"); - }); - $("text", svg).each(function(j) { - return $(this).css("font-family", "Ubuntu").css("font-size", "13px"); - }); - serializer = new XMLSerializer(); - return serializer.serializeToString(svg); - } - - svgToCanvas(f) { - var DOMURL, img, me, svgBlob, svgStr, url; - me = this; - img = new Image(); - svgStr = this.svgtext(); - DOMURL = window.URL || window.webkitURL || window; - svgBlob = new Blob([svgStr], { - type: 'image/svg+xml;charset=utf-8' - }); - url = DOMURL.createObjectURL(svgBlob); - img.onload = function() { - var canvas; - canvas = me.find("offscreen"); - canvas.width = img.width; - canvas.height = img.height; - canvas.getContext("2d").drawImage(img, 0, 0, img.width, img.height); - return f(canvas); - }; - return img.src = url; - } - - calibrate() { - var prs, svg; - svg = ($(this.preview)).children("svg")[0]; - if (svg) { - prs = [$(this.preview).width(), $(this.preview).height()]; - $(svg).attr("width", prs[0] + "px"); - return $(svg).attr("height", prs[1] + "px"); - } - } - - cleanup(evt) { - var me; - if (!this.currfile) { - return; - } - if (!this.currfile.dirty) { - return; - } - me = this; - evt.preventDefault(); - return this.openDialog("YesNoDialog", function(d) { - if (d) { - me.currfile.dirty = false; - return me.quit(); - } - }, __("Quit"), { - text: __("Quit without saving ?") - }); - } - - }; - - GraphEditor.dummymermaid = "graph TD;\n A-->B;\n A-->C;\n B-->D;\n C-->D;"; - - GraphEditor.dependencies = ["ace/ace"]; - - this.OS.register("GraphEditor", GraphEditor); - -}).call(this); - -// svg-pan-zoom v3.5.2 -// https://github.com/ariutta/svg-pan-zoom -(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o0?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"),ace.config.set("basePath","/scripts/ace"),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,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=["os://scripts/ace/ace.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]),t="undefined"!=typeof self?self:this,e=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 Ot(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 Ct=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)||Ct(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 Oe||(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 Oe||(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(Oe,$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(Oe,{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(Oe,{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 Cn(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],O=0,C=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(O=F[0]-L[0],C=F[1]-L[1],b){case ei:case ti:x&&(O=Math.max(S-n,Math.min(T-u,O)),i=n+O,f=u+O),_&&(C=Math.max(A-o,Math.min(M-h,C)),s=o+C,d=h+C);break;case ni:x<0?(O=Math.max(S-n,Math.min(T-n,O)),i=n+O,f=u):x>0&&(O=Math.max(S-u,Math.min(T-u,O)),i=n,f=u+O),_<0?(C=Math.max(A-o,Math.min(M-o,C)),s=o+C,d=h):_>0&&(C=Math.max(A-h,Math.min(M-h,C)),s=o,d=h+C);break;case ri:x&&(i=Math.max(S,Math.min(T,n-O*x)),f=Math.max(S,Math.min(T,u+O*x))),_&&(s=Math.max(A,Math.min(M,o-C*_)),d=Math.max(A,Math.min(M,h+C*_)))}f0&&(n=i-O),_<0?h=d-C:_>0&&(o=s-C),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-O*x,n=i+O*x),_&&(h=d-C*_,o=s+C*_),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,Oi=Mi/2,Ci=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)-Oi,h=i.apply(this,s)-Oi,d=l*Ai(f),p=l*Ti(f),y=+n.apply(this,(s[0]=c,s)),g=r.apply(this,s)-Oi,m=i.apply(this,s)-Oi;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=O,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(Ca.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(Ca.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),Oo=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),Co=Math.PI,No=Co/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(Co*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 Ou(){}function Cu(t,e){t&&Du.hasOwnProperty(t.type)&&Du[t.type](t,e)}var Nu={Feature:function(t,e){Cu(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:Ou,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,Oc+=o*(Rc+(Rc=r)),Cc+=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,Oc+=l*(Rc+(Rc=r)),Cc+=l*(Bc+(Bc=i)),Nc+=l*(jc+(jc=a)),$c(Rc,Bc,jc)}var Qc=function(t){Ec=Sc=Ac=Tc=Mc=Oc=Cc=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=Oc,n=Cc,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 O=Qu(a,M);ec(O);var C=(A^k>=0?-1:1)*Tu(O[2]);(r>C||r===C&&(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(),Ol={sphere:Ou,point:Ou,lineStart:function(){Ol.point=Nl,Ol.lineEnd=Cl},lineEnd:Ou,polygonStart:Ou,polygonEnd:Ou};function Cl(){Ol.point=Ol.lineEnd=Ou}function Nl(t,e){El=t*=du,Sl=wu(e*=du),Al=mu(e),Ol.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,Ol),+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:Ou,lineStart:Ou,lineEnd:Ou,polygonStart:function(){af.lineStart=of,af.lineEnd=cf},polygonEnd:function(){af.lineStart=af.lineEnd=af.point=Ou,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:Ou,lineEnd:Ou,polygonStart:Ou,polygonEnd:Ou,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,Of={point:Cf,lineStart:Nf,lineEnd:Ff,polygonStart:function(){Of.lineStart=Pf,Of.lineEnd=If},polygonEnd:function(){Of.point=Cf,Of.lineStart=Nf,Of.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 Cf(t,e){xf+=t,_f+=e,++wf}function Nf(){Of.point=Df}function Df(t,e){Of.point=Lf,Cf(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,Cf(hf=t,df=e)}function Ff(){Of.point=Cf}function Pf(){Of.point=Rf}function If(){Bf(lf,ff)}function Rf(t,e){Of.point=Bf,Cf(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,Cf(hf=t,df=e)}var jf=Of;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:Ou};var Yf,Uf,$f,Vf,Gf,Wf=iu(),Hf={point:Ou,lineStart:function(){Hf.point=qf},lineEnd:function(){Yf&&Zf(Uf,$f),Hf.point=Ou},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],O=T-r,C=M-i,N=v*O-m*C;(N*N/b>e||pu((m*O+v*C)/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(Oh(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(Ch).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}(Op),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}(Op),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,Oy=new Date;function Cy(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),Oy.setTime(+r),t(My),t(Oy),Math.floor(n(My,Oy))},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=Cy((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?Cy((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=Cy((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 Cy((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=Cy((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=Cy((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=Cy((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=Cy((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=Cy((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?Cy((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 Cy((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=Cy((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})),Og=Mg,Cg=Mg.range,Ng=Cy((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?Cy((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:Om,W:Cm,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=Og.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 Om(t){return t.getDay()}function Cm(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+Og.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(Ov("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),tx=Qb(Ov("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),ex=Qb(Ov("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),nx=Qb(Ov("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,O=S-m,C=A-g,N=T-m;return M*M+O*O>C*C+N*N&&(E=A,S=T),{cx:E,cy:S,x01:-l,y01:-f,x11:E*(i/_-1),y11:S*(i/_-1)}}var Ox=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 O=_x(S/l*yx(E)),C=_x(S/f*yx(E));(w-=2*O)>1e-12?(x+=O*=y?1:-1,_-=O):(w=0,x=_=(h+d)/2),(k-=2*C)>1e-12?(v+=C*=y?1:-1,b-=C):(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 O_=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 C_(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:C_(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:C_(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:C_(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:C_(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]+"'");C=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(C,{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],O.$=i[i.length-A],O._$={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&&(O._$.range=[a[a.length-(A||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(O,[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(O.$),a.push(O._$),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){ /** - * Initialization + * @license + * Copyright (c) 2012-2013 Chris Pettitt * - * @param {SVGElement} viewport - * @param {Object} options - */ -ShadowViewport.prototype.init = function(viewport, options) { - // DOM Elements - this.viewport = viewport - this.options = options - - // State cache - this.originalState = {zoom: 1, x: 0, y: 0} - this.activeState = {zoom: 1, x: 0, y: 0} - - this.updateCTMCached = Utils.proxy(this.updateCTM, this) - - // Create a custom requestAnimationFrame taking in account refreshRate - this.requestAnimationFrame = Utils.createRequestAnimationFrame(this.options.refreshRate) - - // ViewBox - this.viewBox = {x: 0, y: 0, width: 0, height: 0} - this.cacheViewBox() - - // Process CTM - var newCTM = this.processCTM() - - // Update viewport CTM and cache zoom and pan - this.setCTM(newCTM) - - // Update CTM in this frame - this.updateCTM() -} - -/** - * Cache initial viewBox value - * If no viewBox is defined, then use viewport size/position instead for viewBox values - */ -ShadowViewport.prototype.cacheViewBox = function() { - var svgViewBox = this.options.svg.getAttribute('viewBox') - - if (svgViewBox) { - var viewBoxValues = svgViewBox.split(/[\s\,]/).filter(function(v){return v}).map(parseFloat) - - // Cache viewbox x and y offset - this.viewBox.x = viewBoxValues[0] - this.viewBox.y = viewBoxValues[1] - this.viewBox.width = viewBoxValues[2] - this.viewBox.height = viewBoxValues[3] - - var zoom = Math.min(this.options.width / this.viewBox.width, this.options.height / this.viewBox.height) - - // Update active state - this.activeState.zoom = zoom - this.activeState.x = (this.options.width - this.viewBox.width * zoom) / 2 - this.activeState.y = (this.options.height - this.viewBox.height * zoom) / 2 - - // Force updating CTM - this.updateCTMOnNextFrame() - - this.options.svg.removeAttribute('viewBox') - } else { - this.simpleViewBoxCache() - } -} - -/** - * Recalculate viewport sizes and update viewBox cache - */ -ShadowViewport.prototype.simpleViewBoxCache = function() { - var bBox = this.viewport.getBBox() - - this.viewBox.x = bBox.x - this.viewBox.y = bBox.y - this.viewBox.width = bBox.width - this.viewBox.height = bBox.height -} - -/** - * Returns a viewbox object. Safe to alter + * 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: * - * @return {Object} viewbox object - */ -ShadowViewport.prototype.getViewBox = function() { - return Utils.extend({}, this.viewBox) -} - -/** - * Get initial zoom and pan values. Save them into originalState - * Parses viewBox attribute to alter initial sizes + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. * - * @return {CTM} CTM object based on options + * 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. */ -ShadowViewport.prototype.processCTM = function() { - var newCTM = this.getCTM() - - if (this.options.fit || this.options.contain) { - var newScale; - if (this.options.fit) { - newScale = Math.min(this.options.width/this.viewBox.width, this.options.height/this.viewBox.height); - } else { - newScale = Math.max(this.options.width/this.viewBox.width, this.options.height/this.viewBox.height); - } - - newCTM.a = newScale; //x-scale - newCTM.d = newScale; //y-scale - newCTM.e = -this.viewBox.x * newScale; //x-transform - newCTM.f = -this.viewBox.y * newScale; //y-transform - } - - if (this.options.center) { - var offsetX = (this.options.width - (this.viewBox.width + this.viewBox.x * 2) * newCTM.a) * 0.5 - , offsetY = (this.options.height - (this.viewBox.height + this.viewBox.y * 2) * newCTM.a) * 0.5 - - newCTM.e = offsetX - newCTM.f = offsetY - } - - // Cache initial values. Based on activeState and fix+center opitons - this.originalState.zoom = newCTM.a - this.originalState.x = newCTM.e - this.originalState.y = newCTM.f - - return newCTM -} - -/** - * Return originalState object. Safe to alter +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,O={};;){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 C="";for(S in M=[],o[w])this.terminals_[S]&&S>f&&M.push("'"+this.terminals_[S]+"'");C=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(C,{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],O.$=i[i.length-A],O._$={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&&(O._$.range=[a[a.length-(A||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(O,[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(O.$),a.push(O._$),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])O("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]+"'");C=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(C,{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],O.$=i[i.length-A],O._$={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&&(O._$.range=[a[a.length-(A||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(O,[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(O.$),a.push(O._$),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,O={};;){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 C="";for(S in M=[],o[w])this.terminals_[S]&&S>f&&M.push("'"+this.terminals_[S]+"'");C=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(C,{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],O.$=i[i.length-A],O._$={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&&(O._$.range=[a[a.length-(A||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(O,[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(O.$),a.push(O._$),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,O={};;){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 C="";for(S in M=[],o[w])this.terminals_[S]&&S>f&&M.push("'"+this.terminals_[S]+"'");C=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(C,{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],O.$=i[i.length-A],O._$={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&&(O._$.range=[a[a.length-(A||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(O,[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(O.$),a.push(O._$),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,O={};;){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 C="";for(S in M=[],o[w])this.terminals_[S]&&S>f&&M.push("'"+this.terminals_[S]+"'");C=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(C,{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],O.$=i[i.length-A],O._$={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&&(O._$.range=[a[a.length-(A||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(O,[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(O.$),a.push(O._$),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,O={};;){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 C="";for(S in M=[],o[w])this.terminals_[S]&&S>f&&M.push("'"+this.terminals_[S]+"'");C=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(C,{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],O.$=i[i.length-A],O._$={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&&(O._$.range=[a[a.length-(A||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(O,[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(O.$),a.push(O._$),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,O={};;){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 C="";for(S in M=[],o[w])this.terminals_[S]&&S>f&&M.push("'"+this.terminals_[S]+"'");C=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(C,{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],O.$=i[i.length-A],O._$={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&&(O._$.range=[a[a.length-(A||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(O,[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(O.$),a.push(O._$),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,O={};;){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 C="";for(S in M=[],o[w])this.terminals_[S]&&S>f&&M.push("'"+this.terminals_[S]+"'");C=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(C,{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],O.$=i[i.length-A],O._$={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&&(O._$.range=[a[a.length-(A||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(O,[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(O.$),a.push(O._$),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,O={};;){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 C="";for(S in M=[],o[w])this.terminals_[S]&&S>f&&M.push("'"+this.terminals_[S]+"'");C=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(C,{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],O.$=i[i.length-A],O._$={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&&(O._$.range=[a[a.length-(A||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(O,[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(O.$),a.push(O._$),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 * - * @return {Object} - */ -ShadowViewport.prototype.getOriginalState = function() { - return Utils.extend({}, this.originalState) -} - -/** - * Return actualState object. Safe to alter + * Released under the MIT license + * https://github.com/kobezzza/Escaper/blob/master/LICENSE * - * @return {Object} + * Date: Tue, 23 Jan 2018 15:58:45 GMT */ -ShadowViewport.prototype.getState = function() { - return Utils.extend({}, this.activeState) -} - -/** - * Get zoom scale - * - * @return {Float} zoom scale - */ -ShadowViewport.prototype.getZoom = function() { - return this.activeState.zoom -} - -/** - * Get zoom scale for pubilc usage - * - * @return {Float} zoom scale - */ -ShadowViewport.prototype.getRelativeZoom = function() { - return this.activeState.zoom / this.originalState.zoom -} - -/** - * Compute zoom scale for pubilc usage - * - * @return {Float} zoom scale - */ -ShadowViewport.prototype.computeRelativeZoom = function(scale) { - return scale / this.originalState.zoom -} - -/** - * Get pan - * - * @return {Object} - */ -ShadowViewport.prototype.getPan = function() { - return {x: this.activeState.x, y: this.activeState.y} -} - -/** - * Return cached viewport CTM value that can be safely modified - * - * @return {SVGMatrix} - */ -ShadowViewport.prototype.getCTM = function() { - var safeCTM = this.options.svg.createSVGMatrix() - - // Copy values manually as in FF they are not itterable - safeCTM.a = this.activeState.zoom - safeCTM.b = 0 - safeCTM.c = 0 - safeCTM.d = this.activeState.zoom - safeCTM.e = this.activeState.x - safeCTM.f = this.activeState.y - - return safeCTM -} - -/** - * Set a new CTM - * - * @param {SVGMatrix} newCTM - */ -ShadowViewport.prototype.setCTM = function(newCTM) { - var willZoom = this.isZoomDifferent(newCTM) - , willPan = this.isPanDifferent(newCTM) - - if (willZoom || willPan) { - // Before zoom - if (willZoom) { - // If returns false then cancel zooming - if (this.options.beforeZoom(this.getRelativeZoom(), this.computeRelativeZoom(newCTM.a)) === false) { - newCTM.a = newCTM.d = this.activeState.zoom - willZoom = false - } else { - this.updateCache(newCTM); - this.options.onZoom(this.getRelativeZoom()) - } - } - - // Before pan - if (willPan) { - var preventPan = this.options.beforePan(this.getPan(), {x: newCTM.e, y: newCTM.f}) - // If prevent pan is an object - , preventPanX = false - , preventPanY = false - - // If prevent pan is Boolean false - if (preventPan === false) { - // Set x and y same as before - newCTM.e = this.getPan().x - newCTM.f = this.getPan().y - - preventPanX = preventPanY = true - } else if (Utils.isObject(preventPan)) { - // Check for X axes attribute - if (preventPan.x === false) { - // Prevent panning on x axes - newCTM.e = this.getPan().x - preventPanX = true - } else if (Utils.isNumber(preventPan.x)) { - // Set a custom pan value - newCTM.e = preventPan.x - } - - // Check for Y axes attribute - if (preventPan.y === false) { - // Prevent panning on x axes - newCTM.f = this.getPan().y - preventPanY = true - } else if (Utils.isNumber(preventPan.y)) { - // Set a custom pan value - newCTM.f = preventPan.y - } - } - - // Update willPan flag - // Check if newCTM is still different - if ((preventPanX && preventPanY) || !this.isPanDifferent(newCTM)) { - willPan = false - } else { - this.updateCache(newCTM); - this.options.onPan(this.getPan()); - } - } - - // Check again if should zoom or pan - if (willZoom || willPan) { - this.updateCTMOnNextFrame() - } - } -} - -ShadowViewport.prototype.isZoomDifferent = function(newCTM) { - return this.activeState.zoom !== newCTM.a -} - -ShadowViewport.prototype.isPanDifferent = function(newCTM) { - return this.activeState.x !== newCTM.e || this.activeState.y !== newCTM.f -} - - -/** - * Update cached CTM and active state - * - * @param {SVGMatrix} newCTM - */ -ShadowViewport.prototype.updateCache = function(newCTM) { - this.activeState.zoom = newCTM.a - this.activeState.x = newCTM.e - this.activeState.y = newCTM.f -} - -ShadowViewport.prototype.pendingUpdate = false - -/** - * Place a request to update CTM on next Frame - */ -ShadowViewport.prototype.updateCTMOnNextFrame = function() { - if (!this.pendingUpdate) { - // Lock - this.pendingUpdate = true - - // Throttle next update - this.requestAnimationFrame.call(window, this.updateCTMCached) - } -} - -/** - * Update viewport CTM with cached CTM - */ -ShadowViewport.prototype.updateCTM = function() { - var ctm = this.getCTM() - - // Updates SVG element - SvgUtils.setCTM(this.viewport, ctm, this.defs) - - // Free the lock - this.pendingUpdate = false - - // Notify about the update - if(this.options.onUpdatedCTM) { - this.options.onUpdatedCTM(ctm) - } -} - -module.exports = function(viewport, options){ - return new ShadowViewport(viewport, options) -} - -},{"./svg-utilities":5,"./utilities":7}],4:[function(require,module,exports){ -var Wheel = require('./uniwheel') -, ControlIcons = require('./control-icons') -, Utils = require('./utilities') -, SvgUtils = require('./svg-utilities') -, ShadowViewport = require('./shadow-viewport') - -var SvgPanZoom = function(svg, options) { - this.init(svg, options) -} - -var optionsDefaults = { - viewportSelector: '.svg-pan-zoom_viewport' // Viewport selector. Can be querySelector string or SVGElement -, panEnabled: true // enable or disable panning (default enabled) -, controlIconsEnabled: false // insert icons to give user an option in addition to mouse events to control pan/zoom (default disabled) -, zoomEnabled: true // enable or disable zooming (default enabled) -, dblClickZoomEnabled: true // enable or disable zooming by double clicking (default enabled) -, mouseWheelZoomEnabled: true // enable or disable zooming by mouse wheel (default enabled) -, preventMouseEventsDefault: true // enable or disable preventDefault for mouse events -, zoomScaleSensitivity: 0.1 // Zoom sensitivity -, minZoom: 0.5 // Minimum Zoom level -, maxZoom: 10 // Maximum Zoom level -, fit: true // enable or disable viewport fit in SVG (default true) -, contain: false // enable or disable viewport contain the svg (default false) -, center: true // enable or disable viewport centering in SVG (default true) -, refreshRate: 'auto' // Maximum number of frames per second (altering SVG's viewport) -, beforeZoom: null -, onZoom: null -, beforePan: null -, onPan: null -, customEventsHandler: null -, eventsListenerElement: null -, onUpdatedCTM: null -} - -SvgPanZoom.prototype.init = function(svg, options) { - var that = this - - this.svg = svg - this.defs = svg.querySelector('defs') - - // Add default attributes to SVG - SvgUtils.setupSvgAttributes(this.svg) - - // Set options - this.options = Utils.extend(Utils.extend({}, optionsDefaults), options) - - // Set default state - this.state = 'none' - - // Get dimensions - var boundingClientRectNormalized = SvgUtils.getBoundingClientRectNormalized(svg) - this.width = boundingClientRectNormalized.width - this.height = boundingClientRectNormalized.height - - // Init shadow viewport - this.viewport = ShadowViewport(SvgUtils.getOrCreateViewport(this.svg, this.options.viewportSelector), { - svg: this.svg - , width: this.width - , height: this.height - , fit: this.options.fit - , contain: this.options.contain - , center: this.options.center - , refreshRate: this.options.refreshRate - // Put callbacks into functions as they can change through time - , beforeZoom: function(oldScale, newScale) { - if (that.viewport && that.options.beforeZoom) {return that.options.beforeZoom(oldScale, newScale)} - } - , onZoom: function(scale) { - if (that.viewport && that.options.onZoom) {return that.options.onZoom(scale)} - } - , beforePan: function(oldPoint, newPoint) { - if (that.viewport && that.options.beforePan) {return that.options.beforePan(oldPoint, newPoint)} - } - , onPan: function(point) { - if (that.viewport && that.options.onPan) {return that.options.onPan(point)} - } - , onUpdatedCTM: function(ctm) { - if (that.viewport && that.options.onUpdatedCTM) {return that.options.onUpdatedCTM(ctm)} - } - }) - - // Wrap callbacks into public API context - var publicInstance = this.getPublicInstance() - publicInstance.setBeforeZoom(this.options.beforeZoom) - publicInstance.setOnZoom(this.options.onZoom) - publicInstance.setBeforePan(this.options.beforePan) - publicInstance.setOnPan(this.options.onPan) - publicInstance.setOnUpdatedCTM(this.options.onUpdatedCTM) - - if (this.options.controlIconsEnabled) { - ControlIcons.enable(this) - } - - // Init events handlers - this.lastMouseWheelEventTime = Date.now() - this.setupHandlers() -} - -/** - * Register event handlers - */ -SvgPanZoom.prototype.setupHandlers = function() { - var that = this - , prevEvt = null // use for touchstart event to detect double tap - ; - - this.eventListeners = { - // Mouse down group - mousedown: function(evt) { - var result = that.handleMouseDown(evt, prevEvt); - prevEvt = evt - return result; - } - , touchstart: function(evt) { - var result = that.handleMouseDown(evt, prevEvt); - prevEvt = evt - return result; - } - - // Mouse up group - , mouseup: function(evt) { - return that.handleMouseUp(evt); - } - , touchend: function(evt) { - return that.handleMouseUp(evt); - } - - // Mouse move group - , mousemove: function(evt) { - return that.handleMouseMove(evt); - } - , touchmove: function(evt) { - return that.handleMouseMove(evt); - } - - // Mouse leave group - , mouseleave: function(evt) { - return that.handleMouseUp(evt); - } - , touchleave: function(evt) { - return that.handleMouseUp(evt); - } - , touchcancel: function(evt) { - return that.handleMouseUp(evt); - } - } - - // Init custom events handler if available - if (this.options.customEventsHandler != null) { // jshint ignore:line - this.options.customEventsHandler.init({ - svgElement: this.svg - , eventsListenerElement: this.options.eventsListenerElement - , instance: this.getPublicInstance() - }) - - // Custom event handler may halt builtin listeners - var haltEventListeners = this.options.customEventsHandler.haltEventListeners - if (haltEventListeners && haltEventListeners.length) { - for (var i = haltEventListeners.length - 1; i >= 0; i--) { - if (this.eventListeners.hasOwnProperty(haltEventListeners[i])) { - delete this.eventListeners[haltEventListeners[i]] - } - } - } - } - - // Bind eventListeners - for (var event in this.eventListeners) { - // Attach event to eventsListenerElement or SVG if not available - (this.options.eventsListenerElement || this.svg) - .addEventListener(event, this.eventListeners[event], false) - } - - // Zoom using mouse wheel - if (this.options.mouseWheelZoomEnabled) { - this.options.mouseWheelZoomEnabled = false // set to false as enable will set it back to true - this.enableMouseWheelZoom() - } -} - -/** - * Enable ability to zoom using mouse wheel - */ -SvgPanZoom.prototype.enableMouseWheelZoom = function() { - if (!this.options.mouseWheelZoomEnabled) { - var that = this - - // Mouse wheel listener - this.wheelListener = function(evt) { - return that.handleMouseWheel(evt); - } - - // Bind wheelListener - Wheel.on(this.options.eventsListenerElement || this.svg, this.wheelListener, false) - - this.options.mouseWheelZoomEnabled = true - } -} - -/** - * Disable ability to zoom using mouse wheel - */ -SvgPanZoom.prototype.disableMouseWheelZoom = function() { - if (this.options.mouseWheelZoomEnabled) { - Wheel.off(this.options.eventsListenerElement || this.svg, this.wheelListener, false) - this.options.mouseWheelZoomEnabled = false - } -} - -/** - * Handle mouse wheel event - * - * @param {Event} evt - */ -SvgPanZoom.prototype.handleMouseWheel = function(evt) { - if (!this.options.zoomEnabled || this.state !== 'none') { - return; - } - - if (this.options.preventMouseEventsDefault){ - if (evt.preventDefault) { - evt.preventDefault(); - } else { - evt.returnValue = false; - } - } - - // Default delta in case that deltaY is not available - var delta = evt.deltaY || 1 - , timeDelta = Date.now() - this.lastMouseWheelEventTime - , divider = 3 + Math.max(0, 30 - timeDelta) - - // Update cache - this.lastMouseWheelEventTime = Date.now() - - // Make empirical adjustments for browsers that give deltaY in pixels (deltaMode=0) - if ('deltaMode' in evt && evt.deltaMode === 0 && evt.wheelDelta) { - delta = evt.deltaY === 0 ? 0 : Math.abs(evt.wheelDelta) / evt.deltaY - } - - delta = -0.3 < delta && delta < 0.3 ? delta : (delta > 0 ? 1 : -1) * Math.log(Math.abs(delta) + 10) / divider - - var inversedScreenCTM = this.svg.getScreenCTM().inverse() - , relativeMousePoint = SvgUtils.getEventPoint(evt, this.svg).matrixTransform(inversedScreenCTM) - , zoom = Math.pow(1 + this.options.zoomScaleSensitivity, (-1) * delta); // multiplying by neg. 1 so as to make zoom in/out behavior match Google maps behavior - - this.zoomAtPoint(zoom, relativeMousePoint) -} - -/** - * Zoom in at a SVG point - * - * @param {SVGPoint} point - * @param {Float} zoomScale Number representing how much to zoom - * @param {Boolean} zoomAbsolute Default false. If true, zoomScale is treated as an absolute value. - * Otherwise, zoomScale is treated as a multiplied (e.g. 1.10 would zoom in 10%) - */ -SvgPanZoom.prototype.zoomAtPoint = function(zoomScale, point, zoomAbsolute) { - var originalState = this.viewport.getOriginalState() - - if (!zoomAbsolute) { - // Fit zoomScale in set bounds - if (this.getZoom() * zoomScale < this.options.minZoom * originalState.zoom) { - zoomScale = (this.options.minZoom * originalState.zoom) / this.getZoom() - } else if (this.getZoom() * zoomScale > this.options.maxZoom * originalState.zoom) { - zoomScale = (this.options.maxZoom * originalState.zoom) / this.getZoom() - } - } else { - // Fit zoomScale in set bounds - zoomScale = Math.max(this.options.minZoom * originalState.zoom, Math.min(this.options.maxZoom * originalState.zoom, zoomScale)) - // Find relative scale to achieve desired scale - zoomScale = zoomScale/this.getZoom() - } - - var oldCTM = this.viewport.getCTM() - , relativePoint = point.matrixTransform(oldCTM.inverse()) - , modifier = this.svg.createSVGMatrix().translate(relativePoint.x, relativePoint.y).scale(zoomScale).translate(-relativePoint.x, -relativePoint.y) - , newCTM = oldCTM.multiply(modifier) - - if (newCTM.a !== oldCTM.a) { - this.viewport.setCTM(newCTM) - } -} - -/** - * Zoom at center point - * - * @param {Float} scale - * @param {Boolean} absolute Marks zoom scale as relative or absolute - */ -SvgPanZoom.prototype.zoom = function(scale, absolute) { - this.zoomAtPoint(scale, SvgUtils.getSvgCenterPoint(this.svg, this.width, this.height), absolute) -} - -/** - * Zoom used by public instance - * - * @param {Float} scale - * @param {Boolean} absolute Marks zoom scale as relative or absolute - */ -SvgPanZoom.prototype.publicZoom = function(scale, absolute) { - if (absolute) { - scale = this.computeFromRelativeZoom(scale) - } - - this.zoom(scale, absolute) -} - -/** - * Zoom at point used by public instance - * - * @param {Float} scale - * @param {SVGPoint|Object} point An object that has x and y attributes - * @param {Boolean} absolute Marks zoom scale as relative or absolute - */ -SvgPanZoom.prototype.publicZoomAtPoint = function(scale, point, absolute) { - if (absolute) { - // Transform zoom into a relative value - scale = this.computeFromRelativeZoom(scale) - } - - // If not a SVGPoint but has x and y then create a SVGPoint - if (Utils.getType(point) !== 'SVGPoint') { - if('x' in point && 'y' in point) { - point = SvgUtils.createSVGPoint(this.svg, point.x, point.y) - } else { - throw new Error('Given point is invalid') - } - } - - this.zoomAtPoint(scale, point, absolute) -} - -/** - * Get zoom scale - * - * @return {Float} zoom scale - */ -SvgPanZoom.prototype.getZoom = function() { - return this.viewport.getZoom() -} - -/** - * Get zoom scale for public usage - * - * @return {Float} zoom scale - */ -SvgPanZoom.prototype.getRelativeZoom = function() { - return this.viewport.getRelativeZoom() -} - -/** - * Compute actual zoom from public zoom - * - * @param {Float} zoom - * @return {Float} zoom scale - */ -SvgPanZoom.prototype.computeFromRelativeZoom = function(zoom) { - return zoom * this.viewport.getOriginalState().zoom -} - -/** - * Set zoom to initial state - */ -SvgPanZoom.prototype.resetZoom = function() { - var originalState = this.viewport.getOriginalState() - - this.zoom(originalState.zoom, true); -} - -/** - * Set pan to initial state - */ -SvgPanZoom.prototype.resetPan = function() { - this.pan(this.viewport.getOriginalState()); -} - -/** - * Set pan and zoom to initial state - */ -SvgPanZoom.prototype.reset = function() { - this.resetZoom() - this.resetPan() -} - -/** - * Handle double click event - * See handleMouseDown() for alternate detection method - * - * @param {Event} evt - */ -SvgPanZoom.prototype.handleDblClick = function(evt) { - if (this.options.preventMouseEventsDefault) { - if (evt.preventDefault) { - evt.preventDefault() - } else { - evt.returnValue = false - } - } - - // Check if target was a control button - if (this.options.controlIconsEnabled) { - var targetClass = evt.target.getAttribute('class') || '' - if (targetClass.indexOf('svg-pan-zoom-control') > -1) { - return false - } - } - - var zoomFactor - - if (evt.shiftKey) { - zoomFactor = 1/((1 + this.options.zoomScaleSensitivity) * 2) // zoom out when shift key pressed - } else { - zoomFactor = (1 + this.options.zoomScaleSensitivity) * 2 - } - - var point = SvgUtils.getEventPoint(evt, this.svg).matrixTransform(this.svg.getScreenCTM().inverse()) - this.zoomAtPoint(zoomFactor, point) -} - -/** - * Handle click event - * - * @param {Event} evt - */ -SvgPanZoom.prototype.handleMouseDown = function(evt, prevEvt) { - if (this.options.preventMouseEventsDefault) { - if (evt.preventDefault) { - evt.preventDefault() - } else { - evt.returnValue = false - } - } - - Utils.mouseAndTouchNormalize(evt, this.svg) - - // Double click detection; more consistent than ondblclick - if (this.options.dblClickZoomEnabled && Utils.isDblClick(evt, prevEvt)){ - this.handleDblClick(evt) - } else { - // Pan mode - this.state = 'pan' - this.firstEventCTM = this.viewport.getCTM() - this.stateOrigin = SvgUtils.getEventPoint(evt, this.svg).matrixTransform(this.firstEventCTM.inverse()) - } -} - -/** - * Handle mouse move event - * - * @param {Event} evt - */ -SvgPanZoom.prototype.handleMouseMove = function(evt) { - if (this.options.preventMouseEventsDefault) { - if (evt.preventDefault) { - evt.preventDefault() - } else { - evt.returnValue = false - } - } - - if (this.state === 'pan' && this.options.panEnabled) { - // Pan mode - var point = SvgUtils.getEventPoint(evt, this.svg).matrixTransform(this.firstEventCTM.inverse()) - , viewportCTM = this.firstEventCTM.translate(point.x - this.stateOrigin.x, point.y - this.stateOrigin.y) - - this.viewport.setCTM(viewportCTM) - } -} - -/** - * Handle mouse button release event - * - * @param {Event} evt - */ -SvgPanZoom.prototype.handleMouseUp = function(evt) { - if (this.options.preventMouseEventsDefault) { - if (evt.preventDefault) { - evt.preventDefault() - } else { - evt.returnValue = false - } - } - - if (this.state === 'pan') { - // Quit pan mode - this.state = 'none' - } -} - -/** - * Adjust viewport size (only) so it will fit in SVG - * Does not center image - */ -SvgPanZoom.prototype.fit = function() { - var viewBox = this.viewport.getViewBox() - , newScale = Math.min(this.width/viewBox.width, this.height/viewBox.height) - - this.zoom(newScale, true) -} - -/** - * Adjust viewport size (only) so it will contain the SVG - * Does not center image - */ -SvgPanZoom.prototype.contain = function() { - var viewBox = this.viewport.getViewBox() - , newScale = Math.max(this.width/viewBox.width, this.height/viewBox.height) - - this.zoom(newScale, true) -} - -/** - * Adjust viewport pan (only) so it will be centered in SVG - * Does not zoom/fit/contain image - */ -SvgPanZoom.prototype.center = function() { - var viewBox = this.viewport.getViewBox() - , offsetX = (this.width - (viewBox.width + viewBox.x * 2) * this.getZoom()) * 0.5 - , offsetY = (this.height - (viewBox.height + viewBox.y * 2) * this.getZoom()) * 0.5 - - this.getPublicInstance().pan({x: offsetX, y: offsetY}) -} - -/** - * Update content cached BorderBox - * Use when viewport contents change - */ -SvgPanZoom.prototype.updateBBox = function() { - this.viewport.simpleViewBoxCache() -} - -/** - * Pan to a rendered position - * - * @param {Object} point {x: 0, y: 0} - */ -SvgPanZoom.prototype.pan = function(point) { - var viewportCTM = this.viewport.getCTM() - viewportCTM.e = point.x - viewportCTM.f = point.y - this.viewport.setCTM(viewportCTM) -} - -/** - * Relatively pan the graph by a specified rendered position vector - * - * @param {Object} point {x: 0, y: 0} - */ -SvgPanZoom.prototype.panBy = function(point) { - var viewportCTM = this.viewport.getCTM() - viewportCTM.e += point.x - viewportCTM.f += point.y - this.viewport.setCTM(viewportCTM) -} - -/** - * Get pan vector - * - * @return {Object} {x: 0, y: 0} - */ -SvgPanZoom.prototype.getPan = function() { - var state = this.viewport.getState() - - return {x: state.x, y: state.y} -} - -/** - * Recalculates cached svg dimensions and controls position - */ -SvgPanZoom.prototype.resize = function() { - // Get dimensions - var boundingClientRectNormalized = SvgUtils.getBoundingClientRectNormalized(this.svg) - this.width = boundingClientRectNormalized.width - this.height = boundingClientRectNormalized.height - - // Recalculate original state - var viewport = this.viewport - viewport.options.width = this.width - viewport.options.height = this.height - viewport.processCTM() - - // Reposition control icons by re-enabling them - if (this.options.controlIconsEnabled) { - this.getPublicInstance().disableControlIcons() - this.getPublicInstance().enableControlIcons() - } -} - -/** - * Unbind mouse events, free callbacks and destroy public instance - */ -SvgPanZoom.prototype.destroy = function() { - var that = this - - // Free callbacks - this.beforeZoom = null - this.onZoom = null - this.beforePan = null - this.onPan = null - this.onUpdatedCTM = null - - // Destroy custom event handlers - if (this.options.customEventsHandler != null) { // jshint ignore:line - this.options.customEventsHandler.destroy({ - svgElement: this.svg - , eventsListenerElement: this.options.eventsListenerElement - , instance: this.getPublicInstance() - }) - } - - // Unbind eventListeners - for (var event in this.eventListeners) { - (this.options.eventsListenerElement || this.svg) - .removeEventListener(event, this.eventListeners[event], false) - } - - // Unbind wheelListener - this.disableMouseWheelZoom() - - // Remove control icons - this.getPublicInstance().disableControlIcons() - - // Reset zoom and pan - this.reset() - - // Remove instance from instancesStore - instancesStore = instancesStore.filter(function(instance){ - return instance.svg !== that.svg - }) - - // Delete options and its contents - delete this.options - - // Delete viewport to make public shadow viewport functions uncallable - delete this.viewport - - // Destroy public instance and rewrite getPublicInstance - delete this.publicInstance - delete this.pi - this.getPublicInstance = function(){ - return null - } -} - -/** - * Returns a public instance object - * - * @return {Object} Public instance object - */ -SvgPanZoom.prototype.getPublicInstance = function() { - var that = this - - // Create cache - if (!this.publicInstance) { - this.publicInstance = this.pi = { - // Pan - enablePan: function() {that.options.panEnabled = true; return that.pi} - , disablePan: function() {that.options.panEnabled = false; return that.pi} - , isPanEnabled: function() {return !!that.options.panEnabled} - , pan: function(point) {that.pan(point); return that.pi} - , panBy: function(point) {that.panBy(point); return that.pi} - , getPan: function() {return that.getPan()} - // Pan event - , setBeforePan: function(fn) {that.options.beforePan = fn === null ? null : Utils.proxy(fn, that.publicInstance); return that.pi} - , setOnPan: function(fn) {that.options.onPan = fn === null ? null : Utils.proxy(fn, that.publicInstance); return that.pi} - // Zoom and Control Icons - , enableZoom: function() {that.options.zoomEnabled = true; return that.pi} - , disableZoom: function() {that.options.zoomEnabled = false; return that.pi} - , isZoomEnabled: function() {return !!that.options.zoomEnabled} - , enableControlIcons: function() { - if (!that.options.controlIconsEnabled) { - that.options.controlIconsEnabled = true - ControlIcons.enable(that) - } - return that.pi - } - , disableControlIcons: function() { - if (that.options.controlIconsEnabled) { - that.options.controlIconsEnabled = false; - ControlIcons.disable(that) - } - return that.pi - } - , isControlIconsEnabled: function() {return !!that.options.controlIconsEnabled} - // Double click zoom - , enableDblClickZoom: function() {that.options.dblClickZoomEnabled = true; return that.pi} - , disableDblClickZoom: function() {that.options.dblClickZoomEnabled = false; return that.pi} - , isDblClickZoomEnabled: function() {return !!that.options.dblClickZoomEnabled} - // Mouse wheel zoom - , enableMouseWheelZoom: function() {that.enableMouseWheelZoom(); return that.pi} - , disableMouseWheelZoom: function() {that.disableMouseWheelZoom(); return that.pi} - , isMouseWheelZoomEnabled: function() {return !!that.options.mouseWheelZoomEnabled} - // Zoom scale and bounds - , setZoomScaleSensitivity: function(scale) {that.options.zoomScaleSensitivity = scale; return that.pi} - , setMinZoom: function(zoom) {that.options.minZoom = zoom; return that.pi} - , setMaxZoom: function(zoom) {that.options.maxZoom = zoom; return that.pi} - // Zoom event - , setBeforeZoom: function(fn) {that.options.beforeZoom = fn === null ? null : Utils.proxy(fn, that.publicInstance); return that.pi} - , setOnZoom: function(fn) {that.options.onZoom = fn === null ? null : Utils.proxy(fn, that.publicInstance); return that.pi} - // Zooming - , zoom: function(scale) {that.publicZoom(scale, true); return that.pi} - , zoomBy: function(scale) {that.publicZoom(scale, false); return that.pi} - , zoomAtPoint: function(scale, point) {that.publicZoomAtPoint(scale, point, true); return that.pi} - , zoomAtPointBy: function(scale, point) {that.publicZoomAtPoint(scale, point, false); return that.pi} - , zoomIn: function() {this.zoomBy(1 + that.options.zoomScaleSensitivity); return that.pi} - , zoomOut: function() {this.zoomBy(1 / (1 + that.options.zoomScaleSensitivity)); return that.pi} - , getZoom: function() {return that.getRelativeZoom()} - // CTM update - , setOnUpdatedCTM: function(fn) {that.options.onUpdatedCTM = fn === null ? null : Utils.proxy(fn, that.publicInstance); return that.pi} - // Reset - , resetZoom: function() {that.resetZoom(); return that.pi} - , resetPan: function() {that.resetPan(); return that.pi} - , reset: function() {that.reset(); return that.pi} - // Fit, Contain and Center - , fit: function() {that.fit(); return that.pi} - , contain: function() {that.contain(); return that.pi} - , center: function() {that.center(); return that.pi} - // Size and Resize - , updateBBox: function() {that.updateBBox(); return that.pi} - , resize: function() {that.resize(); return that.pi} - , getSizes: function() { - return { - width: that.width - , height: that.height - , realZoom: that.getZoom() - , viewBox: that.viewport.getViewBox() - } - } - // Destroy - , destroy: function() {that.destroy(); return that.pi} - } - } - - return this.publicInstance -} - -/** - * Stores pairs of instances of SvgPanZoom and SVG - * Each pair is represented by an object {svg: SVGSVGElement, instance: SvgPanZoom} - * - * @type {Array} - */ -var instancesStore = [] - -var svgPanZoom = function(elementOrSelector, options){ - var svg = Utils.getSvg(elementOrSelector) - - if (svg === null) { - return null - } else { - // Look for existent instance - for(var i = instancesStore.length - 1; i >= 0; i--) { - if (instancesStore[i].svg === svg) { - return instancesStore[i].instance.getPublicInstance() - } - } - - // If instance not found - create one - instancesStore.push({ - svg: svg - , instance: new SvgPanZoom(svg, options) - }) - - // Return just pushed instance - return instancesStore[instancesStore.length - 1].instance.getPublicInstance() - } -} - -module.exports = svgPanZoom; - -},{"./control-icons":2,"./shadow-viewport":3,"./svg-utilities":5,"./uniwheel":6,"./utilities":7}],5:[function(require,module,exports){ -var Utils = require('./utilities') - , _browser = 'unknown' - ; - -// http://stackoverflow.com/questions/9847580/how-to-detect-safari-chrome-ie-firefox-and-opera-browser -if (/*@cc_on!@*/false || !!document.documentMode) { // internet explorer - _browser = 'ie'; -} - -module.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' - - /** - * Get svg dimensions: width and height - * - * @param {SVGSVGElement} svg - * @return {Object} {width: 0, height: 0} +!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:C},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 O(t){return M["@label"]?M["@label"].replace(A,t):"__ESCAPER_QUOT__"+t+"_"}var C=!1;"boolean"==typeof r&&(C=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=O(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),O=!T&&!M&&y(k);S=k,T||M||O?c(w)?S=w:l(w)?S=o(w):M?(A=!1,S=i(k,!0)):O?(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),O=n.n(M),C=//gi,N=function(t){return t.replace(C,"#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=C;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 O.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 Ct[t]&&Ct[t].externalConnections&&Ct[t]?Ct[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=Ot(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]),Ct[e].externalConnections=!0)})))})),function t(e,n){if(y.debug("extractor - ",n,O.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 O.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",O.a.json.write(e)),Ft(c,e,f,c),e.setNode(c,{clusterNode:!0,id:c,clusterData:Ct[c].clusterData,labelText:Ct[c].labelText,graph:f}),y.debug("New graph after copy",O.a.json.write(f)),y.debug("Old graph after copy",O.a.json.write(e))}else y.debug("Cluster ** ",c," **not meeting the criteria !externalConnections:",!Ct[c].externalConnections," no parent: ",!e.parent(c)," children ",e.children(c)&&e.children(c).length>0,e.children("D"),n),y.debug(Ct);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",Ct,"ids:",e.v,e.w,"Translateing: ",Ct[e.v],Ct[e.w]),(Ct[e.v]||Ct[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",O.a.json.write(t)),y.trace(Ct)):y.debug("Opting out, no graph ")}(e),y.warn("Graph after:",O.a.json.write(e)),y.warn("Graph ever after:",e.graph()),function t(e,n,r,i){y.info("Graph in recursive render:",O.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)),Ct[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",Ct,"ids:",t.v,t.w,"Translateing: ",Ct[t.v],Ct[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:",O.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),Ct[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,Ct,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,Oe={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},Ce={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*Oe.boxMargin,Math.min),i.updateVal(s,"stopy",r+u*Oe.boxMargin,Math.max),i.updateVal(Ce.data,"startx",t-u*Oe.boxMargin,Math.min),i.updateVal(Ce.data,"stopx",n+u*Oe.boxMargin,Math.max),"activation"!==o&&(i.updateVal(s,"startx",t-u*Oe.boxMargin,Math.min),i.updateVal(s,"stopx",n+u*Oe.boxMargin,Math.max),i.updateVal(Ce.data,"starty",e-u*Oe.boxMargin,Math.min),i.updateVal(Ce.data,"stopy",r+u*Oe.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(Ce.data,"startx",i,Math.min),this.updateVal(Ce.data,"starty",o,Math.min),this.updateVal(Ce.data,"stopx",a,Math.max),this.updateVal(Ce.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+Oe.width/2+(r-1)*Oe.activationWidth/2;this.activations.push({startx:i,starty:this.verticalPos+2,stopx:i+Oe.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(Ce.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||Oe.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[Oe.noteAlign]||"middle";switch(g){case"start":y.x=e+Oe.noteMargin;break;case"middle":y.x=e+i/2;break;case"end":y.x=e+i-Oe.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",Oe.noteFontSize).style("font-family",Oe.noteFontFamily).attr("dominant-baseline","central").attr("alignment-baseline","central");a+=(m._groups||m)[0][0].getBBox().height,m.attr("y",n+(o+a+2*Oe.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);Ce.insert(e,n,e+a.width,n+2*Oe.noteMargin+u),s.attr("height",u+2*Oe.noteMargin),Ce.bumpVerticalPos(u+2*Oe.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 On={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},Cn=n(38),Nn=n.n(Cn),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};Cn.parser.yy=On;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 O.a.Graph({multigraph:!0,compound:!0,rankdir:"RL"}).setDefaultEdgeLabel((function(){return{}})),function t(e,n,r,i){var o,s=new O.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 O.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),Or={},Cr={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=Cr.branchColors[n%Cr.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",Cr.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>Cr.nodeSpacing){var s={x:a.left-Cr.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-Cr.nodeSpacing/2,y:a.top+a.height/2},{x:a.left-Cr.nodeSpacing/2,y:s.y},s],i)}else Dr(t,[{x:a.left,y:a.top+a.height/2},{x:a.left-Cr.nodeSpacing/2,y:a.top+a.height/2},{x:a.left-Cr.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>Cr.nodeSpacing){var u={x:o.left+o.width/2,y:a.top+a.height+Cr.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+Cr.nodeSpacing/2},{x:o.left+o.width/2,y:u.y-Cr.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+Cr.nodeSpacing/2},{x:o.left+o.width/2,y:o.top-Cr.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(Or).length;if("string"==typeof e)do{if(i=Or[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*Cr.nodeSpacing+Cr.leftMargin)+", "+Er*Cr.branchOffset+")";case"BT":return"translate("+(Er*Cr.branchOffset+Cr.leftMargin)+", "+(a-i.seq)*Cr.nodeSpacing+")"}})).attr("fill",Cr.nodeFillColor).attr("stroke",Cr.nodeStrokeColor).attr("stroke-width",Cr.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&&Or[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=Or[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,Or[e.parent[1]],n,r+1),e.lineDrawn=!0,e=Or[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 O.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,Oi={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(Oi.data,"startx",t-s*Ai.boxMargin,Math.min),i.updateVal(Oi.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(Oi.data,"starty",e-s*Ai.boxMargin,Math.min),i.updateVal(Oi.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(Oi.data,"startx",i,Math.min),this.updateVal(Oi.data,"starty",o,Math.min),this.updateVal(Oi.data,"stopx",a,Math.max),this.updateVal(Oi.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}},Ci=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"),Cr=Object.assign(Cr,Nr,Ar.getOptions()),y.debug("effective options",Cr);var i=Ar.getDirection();Or=Ar.getCommits();var o=Ar.getBranchesAsObjArray();"BT"===i&&(Cr.nodeLabel.x=o.length*Cr.branchOffset,Cr.nodeLabel.width="100%",Cr.nodeLabel.y=-2*Cr.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",Cr.nodeRadius).attr("cx",0).attr("cy",0),t.select("#def-commit").append("foreignObject").attr("width",Cr.nodeLabel.width).attr("height",Cr.nodeLabel.height).attr("x",Cr.nodeLabel.x).attr("y",Cr.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(Or).length*Cr.nodeSpacing:(o.length+1)*Cr.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),Ce.insert(n.startx,e-10,n.stopx,e)}(t,Ce.getVerticalPos());break;case de.parser.yy.LINETYPE.LOOP_START:Ce.bumpVerticalPos(Oe.boxMargin),Ce.newLoop(t.message),Ce.bumpVerticalPos(Oe.boxMargin+Oe.boxTextMargin);break;case de.parser.yy.LINETYPE.LOOP_END:e=Ce.endLoop(),he(o,e,"loop",Oe),Ce.bumpVerticalPos(Oe.boxMargin);break;case de.parser.yy.LINETYPE.RECT_START:Ce.bumpVerticalPos(Oe.boxMargin),Ce.newLoop(void 0,t.message),Ce.bumpVerticalPos(Oe.boxMargin);break;case de.parser.yy.LINETYPE.RECT_END:var c=Ce.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),Ce.bumpVerticalPos(Oe.boxMargin);break;case de.parser.yy.LINETYPE.OPT_START:Ce.bumpVerticalPos(Oe.boxMargin),Ce.newLoop(t.message),Ce.bumpVerticalPos(Oe.boxMargin+Oe.boxTextMargin);break;case de.parser.yy.LINETYPE.OPT_END:e=Ce.endLoop(),he(o,e,"opt",Oe),Ce.bumpVerticalPos(Oe.boxMargin);break;case de.parser.yy.LINETYPE.ALT_START:Ce.bumpVerticalPos(Oe.boxMargin),Ce.newLoop(t.message),Ce.bumpVerticalPos(Oe.boxMargin+Oe.boxTextMargin);break;case de.parser.yy.LINETYPE.ALT_ELSE:Ce.bumpVerticalPos(Oe.boxMargin),e=Ce.addSectionToLoop(t.message),Ce.bumpVerticalPos(Oe.boxMargin);break;case de.parser.yy.LINETYPE.ALT_END:e=Ce.endLoop(),he(o,e,"alt",Oe),Ce.bumpVerticalPos(Oe.boxMargin);break;case de.parser.yy.LINETYPE.PAR_START:Ce.bumpVerticalPos(Oe.boxMargin),Ce.newLoop(t.message),Ce.bumpVerticalPos(Oe.boxMargin+Oe.boxTextMargin);break;case de.parser.yy.LINETYPE.PAR_AND:Ce.bumpVerticalPos(Oe.boxMargin),e=Ce.addSectionToLoop(t.message),Ce.bumpVerticalPos(Oe.boxMargin);break;case de.parser.yy.LINETYPE.PAR_END:e=Ce.endLoop(),he(o,e,"par",Oe),Ce.bumpVerticalPos(Oe.boxMargin);break;default:try{Ce.bumpVerticalPos(Oe.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),Oi.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(_,On.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=On;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 0) { - for (var i = svgChildren.length; i > 0; i--) { - // Move everything into viewport except defs - if (svgChildren[svgChildren.length - i].nodeName !== 'defs') { - viewport.appendChild(svgChildren[svgChildren.length - i]); - } - } - } - svg.appendChild(viewport); - } - - // Parse class names - var classNames = []; - if (viewport.getAttribute('class')) { - classNames = viewport.getAttribute('class').split(' ') - } - - // Set class (if not set already) - if (!~classNames.indexOf('svg-pan-zoom_viewport')) { - classNames.push('svg-pan-zoom_viewport') - viewport.setAttribute('class', classNames.join(' ')) - } - - return viewport - } - - /** - * Set SVG attributes - * - * @param {SVGSVGElement} svg - */ - , setupSvgAttributes: function(svg) { - // Setting default attributes - svg.setAttribute('xmlns', this.svgNS); - svg.setAttributeNS(this.xmlnsNS, 'xmlns:xlink', this.xlinkNS); - svg.setAttributeNS(this.xmlnsNS, 'xmlns:ev', this.evNS); - - // Needed for Internet Explorer, otherwise the viewport overflows - if (svg.parentNode !== null) { - var style = svg.getAttribute('style') || ''; - if (style.toLowerCase().indexOf('overflow') === -1) { - svg.setAttribute('style', 'overflow: hidden; ' + style); - } - } - } - -/** - * How long Internet Explorer takes to finish updating its display (ms). - */ -, internetExplorerRedisplayInterval: 300 - -/** - * Forces the browser to redisplay all SVG elements that rely on an - * element defined in a 'defs' section. It works globally, for every - * available defs element on the page. - * The throttling is intentionally global. - * - * This is only needed for IE. It is as a hack to make markers (and 'use' elements?) - * visible after pan/zoom when there are multiple SVGs on the page. - * See bug report: https://connect.microsoft.com/IE/feedback/details/781964/ - * also see svg-pan-zoom issue: https://github.com/ariutta/svg-pan-zoom/issues/62 - */ -, refreshDefsGlobal: Utils.throttle(function() { - var allDefs = document.querySelectorAll('defs'); - var allDefsCount = allDefs.length; - for (var i = 0; i < allDefsCount; i++) { - var thisDefs = allDefs[i]; - thisDefs.parentNode.insertBefore(thisDefs, thisDefs); - } - }, this.internetExplorerRedisplayInterval) - - /** - * Sets the current transform matrix of an element - * - * @param {SVGElement} element - * @param {SVGMatrix} matrix CTM - * @param {SVGElement} defs - */ -, setCTM: function(element, matrix, defs) { - var that = this - , s = 'matrix(' + matrix.a + ',' + matrix.b + ',' + matrix.c + ',' + matrix.d + ',' + matrix.e + ',' + matrix.f + ')'; - - element.setAttributeNS(null, 'transform', s); - if ('transform' in element.style) { - element.style.transform = s; - } else if ('-ms-transform' in element.style) { - element.style['-ms-transform'] = s; - } else if ('-webkit-transform' in element.style) { - element.style['-webkit-transform'] = s; - } - - // IE has a bug that makes markers disappear on zoom (when the matrix "a" and/or "d" elements change) - // see http://stackoverflow.com/questions/17654578/svg-marker-does-not-work-in-ie9-10 - // and http://srndolha.wordpress.com/2013/11/25/svg-line-markers-may-disappear-in-internet-explorer-11/ - if (_browser === 'ie' && !!defs) { - // this refresh is intended for redisplaying the SVG during zooming - defs.parentNode.insertBefore(defs, defs); - // this refresh is intended for redisplaying the other SVGs on a page when panning a given SVG - // it is also needed for the given SVG itself, on zoomEnd, if the SVG contains any markers that - // are located under any other element(s). - window.setTimeout(function() { - that.refreshDefsGlobal(); - }, that.internetExplorerRedisplayInterval); - } - } - - /** - * Instantiate an SVGPoint object with given event coordinates - * - * @param {Event} evt - * @param {SVGSVGElement} svg - * @return {SVGPoint} point - */ -, getEventPoint: function(evt, svg) { - var point = svg.createSVGPoint() - - Utils.mouseAndTouchNormalize(evt, svg) - - point.x = evt.clientX - point.y = evt.clientY - - return point - } - - /** - * Get SVG center point - * - * @param {SVGSVGElement} svg - * @return {SVGPoint} - */ -, getSvgCenterPoint: function(svg, width, height) { - return this.createSVGPoint(svg, width / 2, height / 2) - } - - /** - * Create a SVGPoint with given x and y - * - * @param {SVGSVGElement} svg - * @param {Number} x - * @param {Number} y - * @return {SVGPoint} - */ -, createSVGPoint: function(svg, x, y) { - var point = svg.createSVGPoint() - point.x = x - point.y = y - - return point - } -} - -},{"./utilities":7}],6:[function(require,module,exports){ -// uniwheel 0.1.2 (customized) -// A unified cross browser mouse wheel event handler -// https://github.com/teemualap/uniwheel - -module.exports = (function(){ - - //Full details: https://developer.mozilla.org/en-US/docs/Web/Reference/Events/wheel - - var prefix = "", _addEventListener, _removeEventListener, onwheel, support, fns = []; - - // detect event model - if ( window.addEventListener ) { - _addEventListener = "addEventListener"; - _removeEventListener = "removeEventListener"; - } else { - _addEventListener = "attachEvent"; - _removeEventListener = "detachEvent"; - prefix = "on"; - } - - // detect available wheel event - support = "onwheel" in document.createElement("div") ? "wheel" : // Modern browsers support "wheel" - document.onmousewheel !== undefined ? "mousewheel" : // Webkit and IE support at least "mousewheel" - "DOMMouseScroll"; // let's assume that remaining browsers are older Firefox - - - function createCallback(element,callback,capture) { - - var fn = function(originalEvent) { - - !originalEvent && ( originalEvent = window.event ); - - // create a normalized event object - var event = { - // keep a ref to the original event object - originalEvent: originalEvent, - target: originalEvent.target || originalEvent.srcElement, - type: "wheel", - deltaMode: originalEvent.type == "MozMousePixelScroll" ? 0 : 1, - deltaX: 0, - delatZ: 0, - preventDefault: function() { - originalEvent.preventDefault ? - originalEvent.preventDefault() : - originalEvent.returnValue = false; - } - }; - - // calculate deltaY (and deltaX) according to the event - if ( support == "mousewheel" ) { - event.deltaY = - 1/40 * originalEvent.wheelDelta; - // Webkit also support wheelDeltaX - originalEvent.wheelDeltaX && ( event.deltaX = - 1/40 * originalEvent.wheelDeltaX ); - } else { - event.deltaY = originalEvent.detail; - } - - // it's time to fire the callback - return callback( event ); - - }; - - fns.push({ - element: element, - fn: fn, - capture: capture - }); - - return fn; - } - - function getCallback(element,capture) { - for (var i = 0; i < fns.length; i++) { - if (fns[i].element === element && fns[i].capture === capture) { - return fns[i].fn; - } - } - return function(){}; - } - - function removeCallback(element,capture) { - for (var i = 0; i < fns.length; i++) { - if (fns[i].element === element && fns[i].capture === capture) { - return fns.splice(i,1); - } - } - } - - function _addWheelListener( elem, eventName, callback, useCapture ) { - - var cb; - - if (support === "wheel") { - cb = callback; - } else { - cb = createCallback(elem,callback,useCapture); - } - - elem[ _addEventListener ]( prefix + eventName, cb, useCapture || false ); - - } - - function _removeWheelListener( elem, eventName, callback, useCapture ) { - - var cb; - - if (support === "wheel") { - cb = callback; - } else { - cb = getCallback(elem,useCapture); - } - - elem[ _removeEventListener ]( prefix + eventName, cb, useCapture || false ); - - removeCallback(elem,useCapture); - - } - - function addWheelListener( elem, callback, useCapture ) { - _addWheelListener( elem, support, callback, useCapture ); - - // handle MozMousePixelScroll in older Firefox - if( support == "DOMMouseScroll" ) { - _addWheelListener( elem, "MozMousePixelScroll", callback, useCapture); - } - } - - function removeWheelListener(elem,callback,useCapture){ - _removeWheelListener(elem,support,callback,useCapture); - - // handle MozMousePixelScroll in older Firefox - if( support == "DOMMouseScroll" ) { - _removeWheelListener(elem, "MozMousePixelScroll", callback, useCapture); - } - } - - return { - on: addWheelListener, - off: removeWheelListener - }; - -})(); - -},{}],7:[function(require,module,exports){ -module.exports = { - /** - * Extends an object - * - * @param {Object} target object to extend - * @param {Object} source object to take properties from - * @return {Object} extended object - */ - extend: function(target, source) { - target = target || {}; - for (var prop in source) { - // Go recursively - if (this.isObject(source[prop])) { - target[prop] = this.extend(target[prop], source[prop]) - } else { - target[prop] = source[prop] - } - } - return target; - } - - /** - * Checks if an object is a DOM element - * - * @param {Object} o HTML element or String - * @return {Boolean} returns true if object is a DOM element - */ -, isElement: function(o){ - return ( - o instanceof HTMLElement || o instanceof SVGElement || o instanceof SVGSVGElement || //DOM2 - (o && typeof o === 'object' && o !== null && o.nodeType === 1 && typeof o.nodeName === 'string') - ); - } - - /** - * Checks if an object is an Object - * - * @param {Object} o Object - * @return {Boolean} returns true if object is an Object - */ -, isObject: function(o){ - return Object.prototype.toString.call(o) === '[object Object]'; - } - - /** - * Checks if variable is Number - * - * @param {Integer|Float} n - * @return {Boolean} returns true if variable is Number - */ -, isNumber: function(n) { - return !isNaN(parseFloat(n)) && isFinite(n); - } - - /** - * Search for an SVG element - * - * @param {Object|String} elementOrSelector DOM Element or selector String - * @return {Object|Null} SVG or null - */ -, getSvg: function(elementOrSelector) { - var element - , svg; - - if (!this.isElement(elementOrSelector)) { - // If selector provided - if (typeof elementOrSelector === 'string' || elementOrSelector instanceof String) { - // Try to find the element - element = document.querySelector(elementOrSelector) - - if (!element) { - throw new Error('Provided selector did not find any elements. Selector: ' + elementOrSelector) - return null - } - } else { - throw new Error('Provided selector is not an HTML object nor String') - return null - } - } else { - element = elementOrSelector - } - - if (element.tagName.toLowerCase() === 'svg') { - svg = element; - } else { - if (element.tagName.toLowerCase() === 'object') { - svg = element.contentDocument.documentElement; - } else { - if (element.tagName.toLowerCase() === 'embed') { - svg = element.getSVGDocument().documentElement; - } else { - if (element.tagName.toLowerCase() === 'img') { - throw new Error('Cannot script an SVG in an "img" element. Please use an "object" element or an in-line SVG.'); - } else { - throw new Error('Cannot get SVG.'); - } - return null - } - } - } - - return svg - } - - /** - * Attach a given context to a function - * @param {Function} fn Function - * @param {Object} context Context - * @return {Function} Function with certain context - */ -, proxy: function(fn, context) { - return function() { - return fn.apply(context, arguments) - } - } - - /** - * Returns object type - * Uses toString that returns [object SVGPoint] - * And than parses object type from string - * - * @param {Object} o Any object - * @return {String} Object type - */ -, getType: function(o) { - return Object.prototype.toString.apply(o).replace(/^\[object\s/, '').replace(/\]$/, '') - } - - /** - * If it is a touch event than add clientX and clientY to event object - * - * @param {Event} evt - * @param {SVGSVGElement} svg - */ -, mouseAndTouchNormalize: function(evt, svg) { - // If no clientX then fallback - if (evt.clientX === void 0 || evt.clientX === null) { - // Fallback - evt.clientX = 0 - evt.clientY = 0 - - // If it is a touch event - if (evt.touches !== void 0 && evt.touches.length) { - if (evt.touches[0].clientX !== void 0) { - evt.clientX = evt.touches[0].clientX - evt.clientY = evt.touches[0].clientY - } else if (evt.touches[0].pageX !== void 0) { - var rect = svg.getBoundingClientRect(); - - evt.clientX = evt.touches[0].pageX - rect.left - evt.clientY = evt.touches[0].pageY - rect.top - } - // If it is a custom event - } else if (evt.originalEvent !== void 0) { - if (evt.originalEvent.clientX !== void 0) { - evt.clientX = evt.originalEvent.clientX - evt.clientY = evt.originalEvent.clientY - } - } - } - } - - /** - * Check if an event is a double click/tap - * TODO: For touch gestures use a library (hammer.js) that takes in account other events - * (touchmove and touchend). It should take in account tap duration and traveled distance - * - * @param {Event} evt - * @param {Event} prevEvt Previous Event - * @return {Boolean} - */ -, isDblClick: function(evt, prevEvt) { - // Double click detected by browser - if (evt.detail === 2) { - return true; - } - // Try to compare events - else if (prevEvt !== void 0 && prevEvt !== null) { - var timeStampDiff = evt.timeStamp - prevEvt.timeStamp // should be lower than 250 ms - , touchesDistance = Math.sqrt(Math.pow(evt.clientX - prevEvt.clientX, 2) + Math.pow(evt.clientY - prevEvt.clientY, 2)) - - return timeStampDiff < 250 && touchesDistance < 10 - } - - // Nothing found - return false; - } - - /** - * Returns current timestamp as an integer - * - * @return {Number} - */ -, now: Date.now || function() { - return new Date().getTime(); - } - - // From underscore. - // Returns a function, that, when invoked, will only be triggered at most once - // during a given window of time. Normally, the throttled function will run - // as much as it can, without ever going more than once per `wait` duration; - // but if you'd like to disable the execution on the leading edge, pass - // `{leading: false}`. To disable execution on the trailing edge, ditto. -// jscs:disable -// jshint ignore:start -, throttle: function(func, wait, options) { - var that = this; - var context, args, result; - var timeout = null; - var previous = 0; - if (!options) options = {}; - var later = function() { - previous = options.leading === false ? 0 : that.now(); - timeout = null; - result = func.apply(context, args); - if (!timeout) context = args = null; - }; - return function() { - var now = that.now(); - if (!previous && options.leading === false) previous = now; - var remaining = wait - (now - previous); - context = this; - args = arguments; - if (remaining <= 0 || remaining > wait) { - clearTimeout(timeout); - timeout = null; - previous = now; - result = func.apply(context, args); - if (!timeout) context = args = null; - } else if (!timeout && options.trailing !== false) { - timeout = setTimeout(later, remaining); - } - return result; - }; - } -// jshint ignore:end -// jscs:enable - - /** - * Create a requestAnimationFrame simulation - * - * @param {Number|String} refreshRate - * @return {Function} - */ -, createRequestAnimationFrame: function(refreshRate) { - var timeout = null - - // Convert refreshRate to timeout - if (refreshRate !== 'auto' && refreshRate < 60 && refreshRate > 1) { - timeout = Math.floor(1000 / refreshRate) - } - - if (timeout === null) { - return window.requestAnimationFrame || requestTimeout(33) - } else { - return requestTimeout(timeout) - } - } -} - -/** - * Create a callback that will execute after a given timeout - * - * @param {Function} timeout - * @return {Function} - */ -function requestTimeout(timeout) { - return function(callback) { - window.setTimeout(callback, timeout) - } -} - -},{}]},{},[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(n){var r={};function a(t){if(r[t])return r[t].exports;var e=r[t]={i:t,l:!1,exports:{}};return n[t].call(e.exports,e,e.exports,a),e.l=!0,e.exports}return a.m=n,a.c=r,a.d=function(t,e,n){a.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},a.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(e,"a",e),e},a.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},a.p="",a(a.s=204)}([function(t,e,qn){(function(Wn){var t;t=function(){"use strict";var t,a;function h(){return t.apply(null,arguments)}function o(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function u(t){return null!=t&&"[object Object]"===Object.prototype.toString.call(t)}function l(t){return void 0===t}function c(t){return"number"==typeof t||"[object Number]"===Object.prototype.toString.call(t)}function d(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function f(t,e){var n,r=[];for(n=0;n>>0,r=0;rLt(t)?(i=t+1,s=o-Lt(t)):(i=t,s=o),{year:i,dayOfYear:s}}function zt(t,e,n){var r,a,i=It(t.year(),e,n),s=Math.floor((t.dayOfYear()-i-1)/7)+1;return s<1?r=s+Wt(a=t.year()-1,e,n):s>Wt(t.year(),e,n)?(r=s-Wt(t.year(),e,n),a=t.year()+1):(a=t.year(),r=s),{week:r,year:a}}function Wt(t,e,n){var r=It(t,e,n),a=It(t+1,e,n);return(Lt(t)-r+a)/7}z("w",["ww",2],"wo","week"),z("W",["WW",2],"Wo","isoWeek"),j("week","w"),j("isoWeek","W"),H("week",5),H("isoWeek",5),ut("w",Z),ut("ww",Z,V),ut("W",Z),ut("WW",Z,V),ft(["w","ww","W","WW"],function(t,e,n,r){e[r.substr(0,1)]=w(t)});z("d",0,"do","day"),z("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),z("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),z("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),z("e",0,0,"weekday"),z("E",0,0,"isoWeekday"),j("day","d"),j("weekday","e"),j("isoWeekday","E"),H("day",11),H("weekday",11),H("isoWeekday",11),ut("d",Z),ut("e",Z),ut("E",Z),ut("dd",function(t,e){return e.weekdaysMinRegex(t)}),ut("ddd",function(t,e){return e.weekdaysShortRegex(t)}),ut("dddd",function(t,e){return e.weekdaysRegex(t)}),ft(["dd","ddd","dddd"],function(t,e,n,r){var a=n._locale.weekdaysParse(t,r,n._strict);null!=a?e.d=a:y(n).invalidWeekday=t}),ft(["d","e","E"],function(t,e,n,r){e[r]=w(t)});var qt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");var Ut="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");var Vt="Su_Mo_Tu_We_Th_Fr_Sa".split("_");var $t=st;var Gt=st;var Jt=st;function Zt(){function t(t,e){return e.length-t.length}var e,n,r,a,i,s=[],o=[],u=[],l=[];for(e=0;e<7;e++)n=m([2e3,1]).day(e),r=this.weekdaysMin(n,""),a=this.weekdaysShort(n,""),i=this.weekdays(n,""),s.push(r),o.push(a),u.push(i),l.push(r),l.push(a),l.push(i);for(s.sort(t),o.sort(t),u.sort(t),l.sort(t),e=0;e<7;e++)o[e]=ct(o[e]),u[e]=ct(u[e]),l[e]=ct(l[e]);this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+s.join("|")+")","i")}function Kt(){return this.hours()%12||12}function Xt(t,e){z(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function Qt(t,e){return e._meridiemParse}z("H",["HH",2],0,"hour"),z("h",["hh",2],0,Kt),z("k",["kk",2],0,function(){return this.hours()||24}),z("hmm",0,0,function(){return""+Kt.apply(this)+P(this.minutes(),2)}),z("hmmss",0,0,function(){return""+Kt.apply(this)+P(this.minutes(),2)+P(this.seconds(),2)}),z("Hmm",0,0,function(){return""+this.hours()+P(this.minutes(),2)}),z("Hmmss",0,0,function(){return""+this.hours()+P(this.minutes(),2)+P(this.seconds(),2)}),Xt("a",!0),Xt("A",!1),j("hour","h"),H("hour",13),ut("a",Qt),ut("A",Qt),ut("H",Z),ut("h",Z),ut("k",Z),ut("HH",Z,V),ut("hh",Z,V),ut("kk",Z,V),ut("hmm",K),ut("hmmss",X),ut("Hmm",K),ut("Hmmss",X),ht(["H","HH"],yt),ht(["k","kk"],function(t,e,n){var r=w(t);e[yt]=24===r?0:r}),ht(["a","A"],function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t}),ht(["h","hh"],function(t,e,n){e[yt]=w(t),y(n).bigHour=!0}),ht("hmm",function(t,e,n){var r=t.length-2;e[yt]=w(t.substr(0,r)),e[gt]=w(t.substr(r)),y(n).bigHour=!0}),ht("hmmss",function(t,e,n){var r=t.length-4,a=t.length-2;e[yt]=w(t.substr(0,r)),e[gt]=w(t.substr(r,2)),e[vt]=w(t.substr(a)),y(n).bigHour=!0}),ht("Hmm",function(t,e,n){var r=t.length-2;e[yt]=w(t.substr(0,r)),e[gt]=w(t.substr(r))}),ht("Hmmss",function(t,e,n){var r=t.length-4,a=t.length-2;e[yt]=w(t.substr(0,r)),e[gt]=w(t.substr(r,2)),e[vt]=w(t.substr(a))});var te,ee=Yt("Hours",!0),ne={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:jt,monthsShort:Ct,week:{dow:0,doy:6},weekdays:qt,weekdaysMin:Vt,weekdaysShort:Ut,meridiemParse:/[ap]\.?m?\.?/i},re={},ae={};function ie(t){return t?t.toLowerCase().replace("_","-"):t}function se(t){var e=null;if(!re[t]&&void 0!==Wn&&Wn&&Wn.exports)try{e=te._abbr;qn(207)("./"+t),oe(e)}catch(t){}return re[t]}function oe(t,e){var n;return t&&(n=l(e)?le(t):ue(t,e))&&(te=n),te._abbr}function ue(t,e){if(null!==e){var n=ne;if(e.abbr=t,null!=re[t])Y("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."),n=re[t]._config;else if(null!=e.parentLocale){if(null==re[e.parentLocale])return ae[e.parentLocale]||(ae[e.parentLocale]=[]),ae[e.parentLocale].push({name:t,config:e}),null;n=re[e.parentLocale]._config}return re[t]=new S(A(n,e)),ae[t]&&ae[t].forEach(function(t){ue(t.name,t.config)}),oe(t),re[t]}return delete re[t],null}function le(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return te;if(!o(t)){if(e=se(t))return e;t=[t]}return function(t){for(var e,n,r,a,i=0;i=e&&s(a,n,!0)>=e-1)break;e--}i++}return null}(t)}function ce(t){var e,n=t._a;return n&&-2===y(t).overflow&&(e=n[pt]<0||11St(n[_t],n[pt])?mt:n[yt]<0||24Wt(n,i,s)?y(t)._overflowWeeks=!0:null!=u?y(t)._overflowWeekday=!0:(o=Rt(n,r,a,i,s),t._a[_t]=o.year,t._dayOfYear=o.dayOfYear)}(t),null!=t._dayOfYear&&(i=de(t._a[_t],r[_t]),(t._dayOfYear>Lt(i)||0===t._dayOfYear)&&(y(t)._overflowDayOfYear=!0),n=Nt(i,0,t._dayOfYear),t._a[pt]=n.getUTCMonth(),t._a[mt]=n.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=s[e]=r[e];for(;e<7;e++)t._a[e]=s[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[yt]&&0===t._a[gt]&&0===t._a[vt]&&0===t._a[Mt]&&(t._nextDay=!0,t._a[yt]=0),t._d=(t._useUTC?Nt:function(t,e,n,r,a,i,s){var o=new Date(t,e,n,r,a,i,s);return t<100&&0<=t&&isFinite(o.getFullYear())&&o.setFullYear(t),o}).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[yt]=24),t._w&&void 0!==t._w.d&&t._w.d!==a&&(y(t).weekdayMismatch=!0)}}var fe=/^\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)?)?$/,_e=/^\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)?)?$/,pe=/Z|[+-]\d\d(?::?\d\d)?/,me=[["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}/]],ye=[["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/]],ge=/^\/?Date\((\-?\d+)/i;function ve(t){var e,n,r,a,i,s,o=t._i,u=fe.exec(o)||_e.exec(o);if(u){for(y(t).iso=!0,e=0,n=me.length;en.valueOf():n.valueOf()this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},ln.isLocal=function(){return!!this.isValid()&&!this._isUTC},ln.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},ln.isUtc=Ie,ln.isUTC=Ie,ln.zoneAbbr=function(){return this._isUTC?"UTC":""},ln.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},ln.dates=n("dates accessor is deprecated. Use date instead.",nn),ln.months=n("months accessor is deprecated. Use month instead",Ot),ln.years=n("years accessor is deprecated. Use year instead",Dt),ln.zone=n("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()}),ln.isDSTShifted=n("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!l(this._isDSTShifted))return this._isDSTShifted;var t={};if(M(t,this),(t=xe(t))._a){var e=t._isUTC?m(t._a):Ye(t._a);this._isDSTShifted=this.isValid()&&0Y.width){var l=a.text();if(a.text(""),l){var c,d;if(-1!==l.indexOf(" "))c=" ",d=l.split(" ");else{c="";var h,f,_=l.length,p=Math.ceil(s/Y.width),m=Math.floor(_/p);_<=m*p||p++,d=[];for(var y=0;yY.width&&w&&""!==w&&(k={string:w,width:x,offset:M+=x},v.push(k),a.text(""),a.text(L),y===d.length-1&&(b=L,a.text(b),D=n.getComputedTextLength())),y===d.length-1){a.text("");b&&""!==b&&(0>>1,Os=[["ary",vs],["bind",hs],["bindKey",fs],["curry",ps],["curryRight",ms],["flip",ks],["partial",ys],["partialRight",gs],["rearg",Ms]],Hs="[object Arguments]",Ps="[object Array]",Bs="[object AsyncFunction]",Ns="[object Boolean]",Is="[object Date]",Rs="[object DOMException]",zs="[object Error]",Ws="[object Function]",qs="[object GeneratorFunction]",Us="[object Map]",Vs="[object Number]",$s="[object Null]",Gs="[object Object]",Js="[object Promise]",Zs="[object Proxy]",Ks="[object RegExp]",Xs="[object Set]",Qs="[object String]",to="[object Symbol]",eo="[object Undefined]",no="[object WeakMap]",ro="[object WeakSet]",ao="[object ArrayBuffer]",io="[object DataView]",so="[object Float32Array]",oo="[object Float64Array]",uo="[object Int8Array]",lo="[object Int16Array]",co="[object Int32Array]",ho="[object Uint8Array]",fo="[object Uint8ClampedArray]",_o="[object Uint16Array]",po="[object Uint32Array]",mo=/\b__p \+= '';/g,yo=/\b(__p \+=) '' \+/g,go=/(__e\(.*?\)|\b__t\)) \+\n'';/g,vo=/&(?:amp|lt|gt|quot|#39);/g,Mo=/[&<>"']/g,ko=RegExp(vo.source),bo=RegExp(Mo.source),Lo=/<%-([\s\S]+?)%>/g,wo=/<%([\s\S]+?)%>/g,xo=/<%=([\s\S]+?)%>/g,Do=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Yo=/^\w*$/,To=/^\./,Ao=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,So=/[\\^$.*+?()[\]{}|]/g,Eo=RegExp(So.source),jo=/^\s+|\s+$/g,Co=/^\s+/,Fo=/\s+$/,Oo=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ho=/\{\n\/\* \[wrapped with (.+)\] \*/,Po=/,? & /,Bo=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,No=/\\(\\)?/g,Io=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ro=/\w*$/,zo=/^[-+]0x[0-9a-f]+$/i,Wo=/^0b[01]+$/i,qo=/^\[object .+?Constructor\]$/,Uo=/^0o[0-7]+$/i,Vo=/^(?:0|[1-9]\d*)$/,$o=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Go=/($^)/,Jo=/['\n\r\u2028\u2029\\]/g,t="\\ud800-\\udfff",e="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",n="\\u2700-\\u27bf",r="a-z\\xdf-\\xf6\\xf8-\\xff",a="A-Z\\xc0-\\xd6\\xd8-\\xde",i="\\ufe0e\\ufe0f",s="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",o="['’]",u="["+t+"]",l="["+s+"]",c="["+e+"]",d="\\d+",h="["+n+"]",f="["+r+"]",_="[^"+t+s+d+n+r+a+"]",p="\\ud83c[\\udffb-\\udfff]",m="[^"+t+"]",y="(?:\\ud83c[\\udde6-\\uddff]){2}",g="[\\ud800-\\udbff][\\udc00-\\udfff]",v="["+a+"]",M="\\u200d",k="(?:"+f+"|"+_+")",b="(?:"+v+"|"+_+")",L="(?:['’](?:d|ll|m|re|s|t|ve))?",w="(?:['’](?:D|LL|M|RE|S|T|VE))?",x="(?:"+c+"|"+p+")"+"?",D="["+i+"]?",Y=D+x+("(?:"+M+"(?:"+[m,y,g].join("|")+")"+D+x+")*"),T="(?:"+[h,y,g].join("|")+")"+Y,A="(?:"+[m+c+"?",c,y,g,u].join("|")+")",Zo=RegExp(o,"g"),Ko=RegExp(c,"g"),S=RegExp(p+"(?="+p+")|"+A+Y,"g"),Xo=RegExp([v+"?"+f+"+"+L+"(?="+[l,v,"$"].join("|")+")",b+"+"+w+"(?="+[l,v+k,"$"].join("|")+")",v+"?"+k+"+"+L,v+"+"+w,"\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)","\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)",d,T].join("|"),"g"),E=RegExp("["+M+t+e+i+"]"),Qo=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,tu=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],eu=-1,nu={};nu[so]=nu[oo]=nu[uo]=nu[lo]=nu[co]=nu[ho]=nu[fo]=nu[_o]=nu[po]=!0,nu[Hs]=nu[Ps]=nu[ao]=nu[Ns]=nu[io]=nu[Is]=nu[zs]=nu[Ws]=nu[Us]=nu[Vs]=nu[Gs]=nu[Ks]=nu[Xs]=nu[Qs]=nu[no]=!1;var ru={};ru[Hs]=ru[Ps]=ru[ao]=ru[io]=ru[Ns]=ru[Is]=ru[so]=ru[oo]=ru[uo]=ru[lo]=ru[co]=ru[Us]=ru[Vs]=ru[Gs]=ru[Ks]=ru[Xs]=ru[Qs]=ru[to]=ru[ho]=ru[fo]=ru[_o]=ru[po]=!0,ru[zs]=ru[Ws]=ru[no]=!1;var j={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},au=parseFloat,iu=parseInt,C="object"==typeof R&&R&&R.Object===Object&&R,F="object"==typeof self&&self&&self.Object===Object&&self,su=C||F||Function("return this")(),O="object"==typeof W&&W&&!W.nodeType&&W,H=O&&"object"==typeof z&&z&&!z.nodeType&&z,ou=H&&H.exports===O,P=ou&&C.process,B=function(){try{return P&&P.binding&&P.binding("util")}catch(t){}}(),uu=B&&B.isArrayBuffer,lu=B&&B.isDate,cu=B&&B.isMap,du=B&&B.isRegExp,hu=B&&B.isSet,fu=B&&B.isTypedArray;function _u(t,e){return t.set(e[0],e[1]),t}function pu(t,e){return t.add(e),t}function mu(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function yu(t,e,n,r){for(var a=-1,i=null==t?0:t.length;++a":">",'"':""","'":"'"});function Vu(t){return"\\"+j[t]}function $u(t){return E.test(t)}function Gu(t){var n=-1,r=Array(t.size);return t.forEach(function(t,e){r[++n]=[e,t]}),r}function Ju(e,n){return function(t){return e(n(t))}}function Zu(t,e){for(var n=-1,r=t.length,a=0,i=[];++n",""":'"',"'":"'"});var el=function t(e){var n,T=(e=null==e?su:el.defaults(su.Object(),e,el.pick(su,tu))).Array,r=e.Date,a=e.Error,m=e.Function,i=e.Math,w=e.Object,y=e.RegExp,c=e.String,A=e.TypeError,s=T.prototype,o=m.prototype,u=w.prototype,l=e["__core-js_shared__"],d=o.toString,x=u.hasOwnProperty,h=0,f=(n=/[^.]+$/.exec(l&&l.keys&&l.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",_=u.toString,p=d.call(w),g=su._,v=y("^"+d.call(x).replace(So,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),M=ou?e.Buffer:ts,k=e.Symbol,b=e.Uint8Array,L=M?M.allocUnsafe:ts,D=Ju(w.getPrototypeOf,w),Y=w.create,S=u.propertyIsEnumerable,E=s.splice,j=k?k.isConcatSpreadable:ts,C=k?k.iterator:ts,F=k?k.toStringTag:ts,O=function(){try{var t=In(w,"defineProperty");return t({},"",{}),t}catch(t){}}(),H=e.clearTimeout!==su.clearTimeout&&e.clearTimeout,P=r&&r.now!==su.Date.now&&r.now,B=e.setTimeout!==su.setTimeout&&e.setTimeout,N=i.ceil,I=i.floor,R=w.getOwnPropertySymbols,z=M?M.isBuffer:ts,W=e.isFinite,q=s.join,U=Ju(w.keys,w),V=i.max,$=i.min,G=r.now,J=e.parseInt,Z=i.random,K=s.reverse,X=In(e,"DataView"),Q=In(e,"Map"),tt=In(e,"Promise"),et=In(e,"Set"),nt=In(e,"WeakMap"),rt=In(w,"create"),at=nt&&new nt,it={},st=fr(X),ot=fr(Q),ut=fr(tt),lt=fr(et),ct=fr(nt),dt=k?k.prototype:ts,ht=dt?dt.valueOf:ts,ft=dt?dt.toString:ts;function _t(t){if(Sa(t)&&!va(t)&&!(t instanceof gt)){if(t instanceof yt)return t;if(x.call(t,"__wrapped__"))return _r(t)}return new yt(t)}var pt=function(){function n(){}return function(t){if(!Aa(t))return{};if(Y)return Y(t);n.prototype=t;var e=new n;return n.prototype=ts,e}}();function mt(){}function yt(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=ts}function gt(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=js,this.__views__=[]}function vt(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e=es&&(i=Ru,s=!1,e=new bt(e));t:for(;++a>>0,e>>>=0;for(var i=T(a);++r>>1,s=t[i];null!==s&&!Pa(s)&&(n?s<=e:s=ws)return arguments[0]}else r=0;return n.apply(ts,arguments)}}function ur(t,e){var n=-1,r=t.length,a=r-1;for(e=e===ts?r:e;++n>>0)?(t=$a(t))&&("string"==typeof e||null!=e&&!Fa(e))&&!(e=Pe(e))&&$u(t)?Je(Qu(t),0,n):t.split(e,n):[]},_t.spread=function(r,a){if("function"!=typeof r)throw new A(rs);return a=null==a?0:V(Wa(a),0),we(function(t){var e=t[a],n=Je(t,0,a);return e&&xu(n,e),mu(r,this,n)})},_t.tail=function(t){var e=null==t?0:t.length;return e?Ee(t,1,e):[]},_t.take=function(t,e,n){return t&&t.length?Ee(t,0,(e=n||e===ts?1:Wa(e))<0?0:e):[]},_t.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?Ee(t,(e=r-(e=n||e===ts?1:Wa(e)))<0?0:e,r):[]},_t.takeRightWhile=function(t,e){return t&&t.length?Re(t,Pn(e,3),!1,!0):[]},_t.takeWhile=function(t,e){return t&&t.length?Re(t,Pn(e,3)):[]},_t.tap=function(t,e){return e(t),t},_t.throttle=function(t,e,n){var r=!0,a=!0;if("function"!=typeof t)throw new A(rs);return Aa(n)&&(r="leading"in n?!!n.leading:r,a="trailing"in n?!!n.trailing:a),sa(t,e,{leading:r,maxWait:e,trailing:a})},_t.thru=zr,_t.toArray=Ra,_t.toPairs=fi,_t.toPairsIn=_i,_t.toPath=function(t){return va(t)?wu(t,hr):Pa(t)?[t]:rn(dr($a(t)))},_t.toPlainObject=Va,_t.transform=function(t,r,a){var e=va(t),n=e||La(t)||Ba(t);if(r=Pn(r,4),null==a){var i=t&&t.constructor;a=n?e?new i:[]:Aa(t)&&Da(i)?pt(D(t)):{}}return(n?gu:Gt)(t,function(t,e,n){return r(a,t,e,n)}),a},_t.unary=function(t){return na(t,1)},_t.union=Sr,_t.unionBy=Er,_t.unionWith=jr,_t.uniq=function(t){return t&&t.length?Be(t):[]},_t.uniqBy=function(t,e){return t&&t.length?Be(t,Pn(e,2)):[]},_t.uniqWith=function(t,e){return e="function"==typeof e?e:ts,t&&t.length?Be(t,ts,e):[]},_t.unset=function(t,e){return null==t||Ne(t,e)},_t.unzip=Cr,_t.unzipWith=Fr,_t.update=function(t,e,n){return null==t?t:Ie(t,e,Ve(n))},_t.updateWith=function(t,e,n,r){return r="function"==typeof r?r:ts,null==t?t:Ie(t,e,Ve(n),r)},_t.values=pi,_t.valuesIn=function(t){return null==t?[]:Iu(t,oi(t))},_t.without=Or,_t.words=Di,_t.wrap=function(t,e){return ha(Ve(e),t)},_t.xor=Hr,_t.xorBy=Pr,_t.xorWith=Br,_t.zip=Nr,_t.zipObject=function(t,e){return qe(t||[],e||[],At)},_t.zipObjectDeep=function(t,e){return qe(t||[],e||[],Ye)},_t.zipWith=Ir,_t.entries=fi,_t.entriesIn=_i,_t.extend=Ja,_t.extendWith=Za,Hi(_t,_t),_t.add=Vi,_t.attempt=Yi,_t.camelCase=mi,_t.capitalize=yi,_t.ceil=$i,_t.clamp=function(t,e,n){return n===ts&&(n=e,e=ts),n!==ts&&(n=(n=Ua(n))==n?n:0),e!==ts&&(e=(e=Ua(e))==e?e:0),Ot(Ua(t),e,n)},_t.clone=function(t){return Ht(t,ls)},_t.cloneDeep=function(t){return Ht(t,os|ls)},_t.cloneDeepWith=function(t,e){return Ht(t,os|ls,e="function"==typeof e?e:ts)},_t.cloneWith=function(t,e){return Ht(t,ls,e="function"==typeof e?e:ts)},_t.conformsTo=function(t,e){return null==e||Pt(t,e,si(e))},_t.deburr=gi,_t.defaultTo=function(t,e){return null==t||t!=t?e:t},_t.divide=Gi,_t.endsWith=function(t,e,n){t=$a(t),e=Pe(e);var r=t.length,a=n=n===ts?r:Ot(Wa(n),0,r);return 0<=(n-=e.length)&&t.slice(n,a)==e},_t.eq=pa,_t.escape=function(t){return(t=$a(t))&&bo.test(t)?t.replace(Mo,Uu):t},_t.escapeRegExp=function(t){return(t=$a(t))&&Eo.test(t)?t.replace(So,"\\$&"):t},_t.every=function(t,e,n){var r=va(t)?Mu:zt;return n&&Gn(t,e,n)&&(e=ts),r(t,Pn(e,3))},_t.find=Ur,_t.findIndex=gr,_t.findKey=function(t,e){return Au(t,Pn(e,3),Gt)},_t.findLast=Vr,_t.findLastIndex=vr,_t.findLastKey=function(t,e){return Au(t,Pn(e,3),Jt)},_t.floor=Ji,_t.forEach=$r,_t.forEachRight=Gr,_t.forIn=function(t,e){return null==t?t:Vt(t,Pn(e,3),oi)},_t.forInRight=function(t,e){return null==t?t:$t(t,Pn(e,3),oi)},_t.forOwn=function(t,e){return t&&Gt(t,Pn(e,3))},_t.forOwnRight=function(t,e){return t&&Jt(t,Pn(e,3))},_t.get=ei,_t.gt=ma,_t.gte=ya,_t.has=function(t,e){return null!=t&&qn(t,e,ee)},_t.hasIn=ni,_t.head=kr,_t.identity=ji,_t.includes=function(t,e,n,r){t=ka(t)?t:pi(t),n=n&&!r?Wa(n):0;var a=t.length;return n<0&&(n=V(a+n,0)),Ha(t)?n<=a&&-1=$(a=e,i=n)&&r=this.__values__.length;return{done:t,value:t?ts:this.__values__[this.__index__++]}},_t.prototype.plant=function(t){for(var e,n=this;n instanceof mt;){var r=_r(n);r.__index__=0,r.__values__=ts,e?a.__wrapped__=r:e=r;var a=r;n=n.__wrapped__}return a.__wrapped__=t,e},_t.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof gt){var e=t;return this.__actions__.length&&(e=new gt(this)),(e=e.reverse()).__actions__.push({func:zr,args:[Ar],thisArg:ts}),new yt(e,this.__chain__)}return this.thru(Ar)},_t.prototype.toJSON=_t.prototype.valueOf=_t.prototype.value=function(){return ze(this.__wrapped__,this.__actions__)},_t.prototype.first=_t.prototype.head,C&&(_t.prototype[C]=function(){return this}),_t}();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(su._=el,define(function(){return el})):H?((H.exports=el)._=el,O._=el):su._=el}).call(this)}).call(W,e(18),e(3)(t))},function(t,e,n){var r=n(179),a=n(240),i=n(13);t.exports=function(t){return i(t)?r(t):a(t)}},function(t,e,n){var r=n(5).Symbol;t.exports=r},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,n){var r=n(269),a=n(270),i=n(271),s=n(272),o=n(273);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e>>1;i(t[a],e)<0?n=a+1:r=a}return n},right:function(t,e,n,r){for(arguments.length<3&&(n=0),arguments.length<4&&(r=t.length);n>>1;0e;)a.push(r/i);else for(;(r=t+n*++s)=_.length)return h?h.call(f,t):d?t.sort(d):t;for(var e,a,i,s,o=-1,u=t.length,l=_[r++],c=new g;++o=_.length)return t;var a=[],i=e[r++];return t.forEach(function(t,e){a.push({key:t,values:n(e,r)})}),i?a.sort(function(t,e){return i(t.key,e.key)}):a}(p(F.map,t,0),0)},f.key=function(t){return _.push(t),f},f.sortKeys=function(t){return e[_.length-1]=t,f},f.sortValues=function(t){return d=t,f},f.rollup=function(t){return h=t,f},f},F.set=function(t){var e=new D;if(t)for(var n=0,r=t.length;n>16,t>>8&255,255&t)}function se(t){return ie(t)+""}Xt.brighter=function(t){return new $t(Math.min(100,this.l+Gt*(arguments.length?t:1)),this.a,this.b)},Xt.darker=function(t){return new $t(Math.max(0,this.l-Gt*(arguments.length?t:1)),this.a,this.b)},Xt.rgb=function(){return Qt(this.l,this.a,this.b)};var oe=(F.rgb=ae).prototype=new It;function ue(t){return t<16?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function le(t,e,n){var r,a,i,s=0,o=0,u=0;if(r=/([a-z]+)\((.*)\)/.exec(t=t.toLowerCase()))switch(a=r[2].split(","),r[1]){case"hsl":return n(parseFloat(a[0]),parseFloat(a[1])/100,parseFloat(a[2])/100);case"rgb":return e(fe(a[0]),fe(a[1]),fe(a[2]))}return(i=_e.get(t))?e(i.r,i.g,i.b):(null==t||"#"!==t.charAt(0)||isNaN(i=parseInt(t.slice(1),16))||(4===t.length?(s=(3840&i)>>4,s|=s>>4,o=240&i,o|=o>>4,u=15&i,u|=u<<4):7===t.length&&(s=(16711680&i)>>16,o=(65280&i)>>8,u=255&i)),e(s,o,u))}function ce(t,e,n){var r,a,i=Math.min(t/=255,e/=255,n/=255),s=Math.max(t,e,n),o=s-i,u=(s+i)/2;return o?(a=u<.5?o/(s+i):o/(2-s-i),r=t==s?(e-n)/o+(e=e.t&&e.c(t-e.t)&&(e.c=null),e=e.n;return t}function De(){for(var t,e=ge,n=1/0;e;)e.c?(e.t=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,Se=F.map({b:function(t){return t.toString(2)},c:function(t){return String.fromCharCode(t)},o:function(t){return t.toString(8)},x:function(t){return t.toString(16)},X:function(t){return t.toString(16).toUpperCase()},g:function(t,e){return t.toPrecision(e)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},r:function(t,e){return(t=F.round(t,Ye(t,e))).toFixed(Math.max(0,Math.min(20,Ye(t*(1+1e-15),e))))}});function Ee(t){return t+""}var je=F.time={},Ce=Date;function Fe(){this._=new Date(1e));)i=u[a=(a+1)%u.length];return r.reverse().join(o)}:H,function(t){var e=Ae.exec(t),c=e[1]||" ",d=e[2]||">",h=e[3]||"-",n=e[4]||"",f=e[5],_=+e[6],p=e[7],m=e[8],y=e[9],g=1,v="",M="",k=!1,b=!0;switch(m&&(m=+m.substring(1)),(f||"0"===c&&"="===d)&&(f=c="0",d="="),y){case"n":p=!0,y="g";break;case"%":g=100,M="%",y="f";break;case"p":g=100,M="%",y="r";break;case"b":case"o":case"x":case"X":"#"===n&&(v="0"+y.toLowerCase());case"c":b=!1;case"d":k=!0,m=0;break;case"s":g=-1,y="r"}"$"===n&&(v=r[0],M=r[1]),"r"!=y||m||(y="g"),null!=m&&("g"==y?m=Math.max(1,Math.min(21,m)):"e"!=y&&"f"!=y||(m=Math.max(0,Math.min(20,m)))),y=Se.get(y)||Ee;var L=f&&p;return function(t){var e=M;if(k&&t%1)return"";var n=t<0||0===t&&1/t<0?(t=-t,"-"):"-"===h?"":h;if(g<0){var r=F.formatPrefix(t,m);t=r.scale(t),e=r.symbol+M}else t*=g;var a,i,s=(t=y(t,m)).lastIndexOf(".");if(s<0){var o=b?t.lastIndexOf("e"):-1;o<0?(a=t,i=""):(a=t.substring(0,o),i=t.substring(o))}else a=t.substring(0,s),i=w+t.substring(s+1);!f&&p&&(a=x(a,1/0));var u=v.length+a.length+i.length+(L?0:n.length),l=u<_?new Array(u=_-u+1).join(c):"";return L&&(a=x(l+a,l.length?_-i.length:1/0)),n+=v,t=a+i,("<"===d?n+t+l:">"===d?l+n+t:"^"===d?l.substring(0,u>>=1)+n+t+l.substring(u):n+(L?t:l+t))+e}}),timeFormat:function(t){var e=t.dateTime,n=t.date,r=t.time,a=t.periods,i=t.days,s=t.shortDays,o=t.months,u=t.shortMonths;function l(o){var u=o.length;function t(t){for(var e,n,r,a=[],i=-1,s=0;++iv(c,h)&&(h=t):v(t,h)>v(c,h)&&(c=t):c<=h?(tv(c,h)&&(h=t):v(t,h)>v(c,h)&&(c=t)}else y(t,e);p=n,_=t}function t(){m.point=s}function e(){l[0]=c,l[1]=h,m.point=y,p=null}function n(t,e){if(p){var n=t-_;i+=180bt&&(c=-(h=180)),l[0]=c,l[1]=h,p=null}function v(t,e){return(e-=t)<0?e+360:e}function M(t,e){return t[0]-e[0]}function k(t,e){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:tv(o[0],o[1])&&(o[1]=i[1]),v(i[0],o[1])>v(o[0],o[1])&&(o[0]=i[0])):n.push(o=i);for(var r,a,i,s=-1/0,o=(e=0,n[a=n.length-1]);e<=a;o=i,++e)i=n[e],(r=v(o[1],i[0]))>s&&(s=r,c=i[0],h=o[1])}return u=l=null,c===1/0||d===1/0?[[NaN,NaN],[NaN,NaN]]:[[c,d],[h,f]]}}(),F.geo.centroid=function(t){yn=gn=vn=Mn=kn=bn=Ln=wn=xn=Dn=Yn=0,F.geo.stream(t,Nn);var e=xn,n=Dn,r=Yn,a=e*e+n*n+r*r;return abt?Math.atan((Math.sin(r)*(o=Math.cos(i))*Math.sin(a)-Math.sin(i)*(s=Math.cos(r))*Math.sin(n))/(s*o*u)):(r+i)/2,d.point(p,_),d.lineEnd(),d.lineStart(),d.point(l,_),h=0),d.point(f=t,_=e),p=l},lineEnd:function(){d.lineEnd(),f=_=NaN},clean:function(){return 2-h}}},function(t,e,n,r){var a;if(null==t)a=n*Yt,r.point(-wt,a),r.point(0,a),r.point(wt,a),r.point(wt,0),r.point(wt,-a),r.point(0,-a),r.point(-wt,-a),r.point(-wt,0),r.point(-wt,a);else if(C(t[0]-e[0])>bt){var i=t[0]r&&0bt;return Zn(p,function(o){var u,l,c,d,h;return{lineStart:function(){d=c=!1,h=1},point:function(t,e){var n,r=[t,e],a=p(t,e),i=f?a?0:y(t,e):a?y(t+(t<0?wt:-wt),e):0;if(!u&&(d=c=a)&&o.lineStart(),a!==c&&(n=m(u,r),(Bn(u,n)||Bn(r,n))&&(r[0]+=bt,r[1]+=bt,a=p(r[0],r[1]))),a!==c)h=0,a?(o.lineStart(),n=m(r,u),o.point(n[0],n[1])):(n=m(u,r),o.point(n[0],n[1]),o.lineEnd()),u=n;else if(_&&u&&f^a){var s;i&l||!(s=m(r,u,!0))||(h=0,f?(o.lineStart(),o.point(s[0][0],s[0][1]),o.point(s[1][0],s[1][1]),o.lineEnd()):(o.point(s[1][0],s[1][1]),o.lineEnd(),o.lineStart(),o.point(s[0][0],s[0][1])))}!a||u&&Bn(u,r)||o.point(r[0],r[1]),u=r,c=a,l=i},lineEnd:function(){c&&o.lineEnd(),u=null},clean:function(){return h|(d&&c)<<1}}},Fr(a,6*Tt),f?[0,-a]:[-wt,a-wt]);function p(t,e){return Math.cos(t)*Math.cos(e)>D}function m(t,e,n){var r=[1,0,0],a=Cn(En(t),En(e)),i=jn(a,a),s=a[0],o=i-s*s;if(!o)return!n&&t;var u=D*i/o,l=-D*s/o,c=Cn(r,a),d=On(r,u);Fn(d,On(a,l));var h=c,f=jn(d,h),_=jn(h,h),p=f*f-_*(jn(d,d)-1);if(!(p<0)){var m=Math.sqrt(p),y=On(h,(-f-m)/_);if(Fn(y,d),y=Pn(y),!n)return y;var g,v=t[0],M=e[0],k=t[1],b=e[1];Mbt}).map(l)).concat(F.range(Math.ceil(s/_)*_,i,_).filter(function(t){return C(t%m)>bt}).map(c))}return g.lines=function(){return t().map(function(t){return{type:"LineString",coordinates:t}})},g.outline=function(){return{type:"Polygon",coordinates:[d(a).concat(h(o).slice(1),d(r).reverse().slice(1),h(u).reverse().slice(1))]}},g.extent=function(t){return arguments.length?g.majorExtent(t).minorExtent(t):g.minorExtent()},g.majorExtent=function(t){return arguments.length?(a=+t[0][0],r=+t[1][0],u=+t[0][1],o=+t[1][1],r=l)return}else i={x:m,y:u};n={x:m,y:l}}else{if(i){if(i.y=l)return}else i={x:(u-a)/r,y:u};n={x:(l-a)/r,y:l}}else{if(i){if(i.y=o)return}else i={x:s,y:r*s+a};n={x:o,y:r*o+a}}else{if(i){if(i.xbt||C(a-n)>bt)&&(o.splice(s,0,new Ya((y=i.site,g=c,v=C(r-d)=s&&r.x<=u&&r.y>=o&&r.y<=l?[[s,l],[u,l],[u,o],[s,o]]:[]).point=a[e]}),i}function d(t){return t.map(function(t,e){return{x:Math.round(r(t,e)/bt)*bt,y:Math.round(a(t,e)/bt)*bt,i:e}})}return i.links=function(e){return Ca(d(e)).edges.filter(function(t){return t.l&&t.r}).map(function(t){return{source:e[t.l.i],target:e[t.r.i]}})},i.triangles=function(h){var f=[];return Ca(d(h)).cells.forEach(function(t,e){for(var n,r,a,i,s=t.site,o=t.edges.sort(Ma),u=-1,l=o.length,c=o[l-1].edge,d=c.l===s?c.r:c.l;++ui&&(a=r.slice(i,a),o[s]?o[s]+=a:o[++s]=a),(e=e[0])===(n=n[0])?o[s]?o[s]+=n:o[++s]=n:(o[++s]=null,u.push({i:s,x:Ia(e,n)})),i=Wa.lastIndex;return iu&&(u=e.x),e.y>l&&(l=e.y),n.push(e.x),r.push(e.y);else for(a=0;aa&&(r=n,a=e);return r}function Bi(t){return t.reduce(Ni,0)}function Ni(t,e){return t+e[1]}function Ii(t,e){return Ri(t,Math.ceil(Math.log(e.length)/Math.LN2+1))}function Ri(t,e){for(var n=-1,r=+t[0],a=(t[1]-r)/e,i=[];++n<=e;)i[n]=a*n+r;return i}function zi(t){return[F.min(t),F.max(t)]}function Wi(t,e){return t.value-e.value}function qi(t,e){var n=t._pack_next;(t._pack_next=e)._pack_prev=t,(e._pack_next=n)._pack_prev=e}function Ui(t,e){(t._pack_next=e)._pack_prev=t}function Vi(t,e){var n=e.x-t.x,r=e.y-t.y,a=t.r+e.r;return n*n+r*r<.999*a*a}function $i(t){if((e=t.children)&&(u=e.length)){var e,n,r,a,i,s,o,u,l=1/0,c=-1/0,d=1/0,h=-1/0;if(e.forEach(Gi),(n=e[0]).x=-n.r,n.y=0,v(n),1=s[0]&&r<=s[1]&&((n=a[F.bisect(o,r,1,l)-1]).y+=c,n.push(t[e]));return a}return n.value=function(t){return arguments.length?(h=t,n):h},n.range=function(t){return arguments.length?(f=pe(t),n):f},n.bins=function(e){return arguments.length?(_="number"==typeof e?function(t){return Ri(t,e)}:pe(e),n):_},n.frequency=function(t){return arguments.length?(d=!!t,n):d},n},F.layout.pack=function(){var u,l=F.layout.hierarchy().sort(Wi),c=0,d=[1,1];function e(t,e){var n=l.call(this,t,e),r=n[0],a=d[0],i=d[1],s=null==u?Math.sqrt:"function"==typeof u?u:function(){return u};if(r.x=r.y=0,wi(r,function(t){t.r=+s(t.value)}),wi(r,$i),c){var o=c*(u?1:Math.max(2*r.r/a,2*r.r/i))/2;wi(r,function(t){t.r+=o}),wi(r,$i),wi(r,function(t){t.r-=o})}return function t(e,n,r,a){var i=e.children;e.x=n+=a*e.x;e.y=r+=a*e.y;e.r*=a;if(i)for(var s=-1,o=i.length;++ss.x&&(s=t),t.depth>o.depth&&(o=t)});var u=p(i,s)/2-i.x,l=h[0]/(s.x+p(s,i)/2+u),c=h[1]/(o.depth||1);Li(r,function(t){t.x=(t.x+u)*l,t.y=t.depth*c})}return n}function _(t){var e=t.children,n=t.parent.children,r=t.i?n[t.i-1]:null;if(e.length){!function(t){var e,n=0,r=0,a=t.children,i=a.length;for(;0<=--i;)(e=a[i]).z+=n,e.m+=n,n+=e.s+(r+=e.c)}(t);var a=(e[0].z+e[e.length-1].z)/2;r?(t.z=r.z+p(t._,r._),t.m=t.z-a):t.z=a}else r&&(t.z=r.z+p(t._,r._));t.parent.A=function(t,e,n){if(e){for(var r,a=t,i=t,s=e,o=a.parent.children[0],u=a.m,l=i.m,c=s.m,d=o.m;s=Qi(s),a=Xi(a),s&&a;)o=Xi(o),(i=Qi(i)).a=t,0<(r=s.z+c-a.z-u+p(s._,a._))&&(ts((f=t,_=n,(h=s).a.parent===f.parent?h.a:_),t,r),u+=r,l+=r),c+=s.m,u+=a.m,d+=o.m,l+=i.m;s&&!Qi(i)&&(i.t=s,i.m+=c-l),a&&!Xi(o)&&(o.t=a,o.m+=u-d,n=t)}var h,f,_;return n}(t,r,t.parent.A||n[0])}function m(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function y(t){t.x*=h[0],t.y=t.depth*h[1]}return e.separation=function(t){return arguments.length?(p=t,e):p},e.size=function(t){return arguments.length?(f=null==(h=t)?y:null,e):f?null:h},e.nodeSize=function(t){return arguments.length?(f=null==(h=t)?null:y,e):f?h:null},bi(e,d)},F.layout.cluster=function(){var c=F.layout.hierarchy().sort(null).value(null),d=Ki,h=[1,1],f=!1;function e(t,e){var a,n=c.call(this,t,e),r=n[0],i=0;wi(r,function(t){var e,n,r=t.children;r&&r.length?(t.x=(n=r).reduce(function(t,e){return t+e.x},0)/n.length,t.y=(e=r,1+F.max(e,function(t){return t.y}))):(t.x=a?i+=d(t,a):0,t.y=0,a=t)});var s=function t(e){var n=e.children;return n&&n.length?t(n[0]):e}(r),o=function t(e){var n,r=e.children;return r&&(n=r.length)?t(r[n-1]):e}(r),u=s.x-d(s,o)/2,l=o.x+d(o,s)/2;return wi(r,f?function(t){t.x=(t.x-r.x)*h[0],t.y=(r.y-t.y)*h[1]}:function(t){t.x=(t.x-u)/(l-u)*h[0],t.y=(1-(r.y?t.y/r.y:1))*h[1]}),n}return e.separation=function(t){return arguments.length?(d=t,e):d},e.size=function(t){return arguments.length?(f=null==(h=t),e):f?null:h},e.nodeSize=function(t){return arguments.length?(f=null!=(h=t),e):f?h:null},bi(e,c)},F.layout.treemap=function(){var r,a=F.layout.hierarchy(),c=Math.round,i=[1,1],s=null,d=es,o=!1,h="squarify",u=.5*(1+Math.sqrt(5));function f(t,e){for(var n,r,a=-1,i=t.length;++an.dy)&&(l=n.dy);++in.dx)&&(l=n.dx);++ir;i--);e=e.slice(a,i)}return e};a.tickFormat=function(t,n){if(!arguments.length)return ys;arguments.length<2?n=ys:"function"!=typeof n&&(n=F.format(n));var r=Math.max(1,u*t/a.ticks().length);return function(t){var e=t/h(Math.round(d(t)));return e*urect,.s>rect").attr("width",L[1]-L[0])}function S(t){t.select(".extent").attr("y",w[0]),t.selectAll(".extent,.e>rect,.w>rect").attr("height",w[1]-w[0])}function o(){var d,n,r=this,t=F.select(F.event.target),a=M.of(r,arguments),i=F.select(r),e=t.datum(),s=!/^(n|s)$/.test(e)&&k,o=!/^(e|w)$/.test(e)&&b,h=t.classed("extent"),u=gt(r),f=F.mouse(r),l=F.select(O(r)).on("keydown.brush",function(){32==F.event.keyCode&&(h||(d=null,f[0]-=L[1],f[1]-=w[1],h=2),P())}).on("keyup.brush",function(){32==F.event.keyCode&&2==h&&(f[0]+=L[1],f[1]+=w[1],h=0,P())});if(F.event.changedTouches?l.on("touchmove.brush",p).on("touchend.brush",y):l.on("mousemove.brush",p).on("mouseup.brush",y),i.interrupt().selectAll("*").interrupt(),h)f[0]=L[0]-f[0],f[1]=w[0]-f[1];else if(e){var c=+/w$/.test(e),_=+/^n/.test(e);n=[L[1-c]-f[0],w[1-_]-f[1]],f[0]=L[c],f[1]=w[_]}else F.event.altKey&&(d=f.slice());function p(){var t=F.mouse(r),e=!1;n&&(t[0]+=n[0],t[1]+=n[1]),h||(F.event.altKey?(d||(d=[(L[0]+L[1])/2,(w[0]+w[1])/2]),f[0]=L[+(t[0]e[0].length)){if(e=n,r=i,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,a[i])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,a[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return 0)/,/^(?:\^)/,/^(?:v\b)/,/^(?:\s*--[x]\s*)/,/^(?:\s*-->\s*)/,/^(?:\s*--[o]\s*)/,/^(?:\s*---\s*)/,/^(?:\s*-\.-[x]\s*)/,/^(?:\s*-\.->\s*)/,/^(?:\s*-\.-[o]\s*)/,/^(?:\s*-\.-\s*)/,/^(?:\s*.-[x]\s*)/,/^(?:\s*\.->\s*)/,/^(?:\s*\.-[o]\s*)/,/^(?:\s*\.-\s*)/,/^(?:\s*==[x]\s*)/,/^(?:\s*==>\s*)/,/^(?:\s*==[o]\s*)/,/^(?:\s*==[\=]\s*)/,/^(?:\s*--\s*)/,/^(?:\s*-\.\s*)/,/^(?:\s*==\s*)/,/^(?:\(-)/,/^(?:-\))/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:[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])/,/^(?:\|)/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:\{)/,/^(?:\})/,/^(?:")/,/^(?:\n+)/,/^(?:\s)/,/^(?:$)/],conditions:{string:{rules:[2,3],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70],inclusive:!0}}};function Yt(){this.yy={}}return xt.lexer=Dt,new((Yt.prototype=xt).Parser=Yt)}();r.parser=e,r.Parser=e.Parser,r.parse=function(){return e.parse.apply(e,arguments)},r.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),n.exit(1));var e=a(8).readFileSync(a(9).normalize(t[1]),"utf8");return r.parser.parse(e)},void 0!==t&&a.c[a.s]===t&&r.main(n.argv.slice(1))}).call(r,a(7),a(3)(t))},function(t,r,a){"use strict";(function(n,t){var e=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,5],n=[1,6],r=[1,12],a=[1,13],i=[1,14],s=[1,15],o=[1,16],u=[1,17],l=[1,18],c=[1,19],d=[1,20],h=[1,21],f=[1,22],_=[8,16,17,18,19,20,21,22,23,24,25,26],p=[1,37],m=[1,33],y=[1,34],g=[1,35],v=[1,36],M=[8,10,16,17,18,19,20,21,22,23,24,25,26,28,32,37,39,40,45,57,58],k=[10,28],b=[10,28,37,57,58],L=[2,49],w=[1,45],x=[1,48],D=[1,49],Y=[1,52],T=[2,65],A=[1,65],S=[1,66],E=[1,67],j=[1,68],C=[1,69],F=[1,70],O=[1,71],H=[1,72],P=[1,73],B=[8,16,17,18,19,20,21,22,23,24,25,26,47],N=[10,28,37],I={trace:function(){},yy:{},symbols_:{error:2,expressions:3,graph:4,EOF:5,graphStatement:6,idStatement:7,"{":8,stmt_list:9,"}":10,strict:11,GRAPH:12,DIGRAPH:13,textNoTags:14,textNoTagsToken:15,ALPHA:16,NUM:17,COLON:18,PLUS:19,EQUALS:20,MULT:21,DOT:22,BRKT:23,SPACE:24,MINUS:25,keywords:26,stmt:27,";":28,node_stmt:29,edge_stmt:30,attr_stmt:31,"=":32,subgraph:33,attr_list:34,NODE:35,EDGE:36,"[":37,a_list:38,"]":39,",":40,edgeRHS:41,node_id:42,edgeop:43,port:44,":":45,compass_pt:46,SUBGRAPH:47,n:48,ne:49,e:50,se:51,s:52,sw:53,w:54,nw:55,c:56,ARROW_POINT:57,ARROW_OPEN:58,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",8:"{",10:"}",11:"strict",12:"GRAPH",13:"DIGRAPH",16:"ALPHA",17:"NUM",18:"COLON",19:"PLUS",20:"EQUALS",21:"MULT",22:"DOT",23:"BRKT",24:"SPACE",25:"MINUS",26:"keywords",28:";",32:"=",35:"NODE",36:"EDGE",37:"[",39:"]",40:",",45:":",47:"SUBGRAPH",48:"n",49:"ne",50:"e",51:"se",52:"s",53:"sw",54:"w",55:"nw",56:"c",57:"ARROW_POINT",58:"ARROW_OPEN"},productions_:[0,[3,2],[4,5],[4,6],[4,4],[6,1],[6,1],[7,1],[14,1],[14,2],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[9,1],[9,3],[27,1],[27,1],[27,1],[27,3],[27,1],[31,2],[31,2],[31,2],[34,4],[34,3],[34,3],[34,2],[38,5],[38,5],[38,3],[30,3],[30,3],[30,2],[30,2],[41,3],[41,3],[41,2],[41,2],[29,2],[29,1],[42,2],[42,1],[44,4],[44,2],[44,2],[33,5],[33,4],[33,3],[46,1],[46,1],[46,1],[46,1],[46,1],[46,1],[46,1],[46,1],[46,1],[46,0],[43,1],[43,1]],performAction:function(t,e,n,r,a,i,s){var o=i.length-1;switch(a){case 1:this.$=i[o-1];break;case 2:this.$=i[o-4];break;case 3:this.$=i[o-5];break;case 4:this.$=i[o-3];break;case 8:case 10:case 11:this.$=i[o];break;case 9:this.$=i[o-1]+""+i[o];break;case 12:case 13:case 14:case 15:case 16:case 18:case 19:case 20:this.$=i[o];break;case 17:this.$="
";break;case 39:this.$="oy";break;case 40:r.addLink(i[o-1],i[o].id,i[o].op),this.$="oy";break;case 42:r.addLink(i[o-1],i[o].id,i[o].op),this.$={op:i[o-2],id:i[o-1]};break;case 44:this.$={op:i[o-1],id:i[o]};break;case 48:r.addVertex(i[o-1]),this.$=i[o-1];break;case 49:r.addVertex(i[o]),this.$=i[o];break;case 66:this.$="arrow";break;case 67:this.$="arrow_open"}},table:[{3:1,4:2,6:3,11:[1,4],12:e,13:n},{1:[3]},{5:[1,7]},{7:8,8:[1,9],14:10,15:11,16:r,17:a,18:i,19:s,20:o,21:u,22:l,23:c,24:d,25:h,26:f},{6:23,12:e,13:n},t(_,[2,5]),t(_,[2,6]),{1:[2,1]},{8:[1,24]},{7:30,8:p,9:25,12:m,14:10,15:11,16:r,17:a,18:i,19:s,20:o,21:u,22:l,23:c,24:d,25:h,26:f,27:26,29:27,30:28,31:29,33:31,35:y,36:g,42:32,47:v},t([8,10,28,32,37,39,40,45,57,58],[2,7],{15:38,16:r,17:a,18:i,19:s,20:o,21:u,22:l,23:c,24:d,25:h,26:f}),t(M,[2,8]),t(M,[2,10]),t(M,[2,11]),t(M,[2,12]),t(M,[2,13]),t(M,[2,14]),t(M,[2,15]),t(M,[2,16]),t(M,[2,17]),t(M,[2,18]),t(M,[2,19]),t(M,[2,20]),{7:39,14:10,15:11,16:r,17:a,18:i,19:s,20:o,21:u,22:l,23:c,24:d,25:h,26:f},{7:30,8:p,9:40,12:m,14:10,15:11,16:r,17:a,18:i,19:s,20:o,21:u,22:l,23:c,24:d,25:h,26:f,27:26,29:27,30:28,31:29,33:31,35:y,36:g,42:32,47:v},{10:[1,41]},{10:[2,21],28:[1,42]},t(k,[2,23]),t(k,[2,24]),t(k,[2,25]),t(b,L,{44:44,32:[1,43],45:w}),t(k,[2,27],{41:46,43:47,57:x,58:D}),t(k,[2,47],{43:47,34:50,41:51,37:Y,57:x,58:D}),{34:53,37:Y},{34:54,37:Y},{34:55,37:Y},{7:56,8:[1,57],14:10,15:11,16:r,17:a,18:i,19:s,20:o,21:u,22:l,23:c,24:d,25:h,26:f},{7:30,8:p,9:58,12:m,14:10,15:11,16:r,17:a,18:i,19:s,20:o,21:u,22:l,23:c,24:d,25:h,26:f,27:26,29:27,30:28,31:29,33:31,35:y,36:g,42:32,47:v},t(M,[2,9]),{8:[1,59]},{10:[1,60]},{5:[2,4]},{7:30,8:p,9:61,12:m,14:10,15:11,16:r,17:a,18:i,19:s,20:o,21:u,22:l,23:c,24:d,25:h,26:f,27:26,29:27,30:28,31:29,33:31,35:y,36:g,42:32,47:v},{7:62,14:10,15:11,16:r,17:a,18:i,19:s,20:o,21:u,22:l,23:c,24:d,25:h,26:f},t(b,[2,48]),t(b,T,{14:10,15:11,7:63,46:64,16:r,17:a,18:i,19:s,20:o,21:u,22:l,23:c,24:d,25:h,26:f,48:A,49:S,50:E,51:j,52:C,53:F,54:O,55:H,56:P}),t(k,[2,41],{34:74,37:Y}),{7:77,8:p,14:10,15:11,16:r,17:a,18:i,19:s,20:o,21:u,22:l,23:c,24:d,25:h,26:f,33:76,42:75,47:v},t(B,[2,66]),t(B,[2,67]),t(k,[2,46]),t(k,[2,40],{34:78,37:Y}),{7:81,14:10,15:11,16:r,17:a,18:i,19:s,20:o,21:u,22:l,23:c,24:d,25:h,26:f,38:79,39:[1,80]},t(k,[2,28]),t(k,[2,29]),t(k,[2,30]),{8:[1,82]},{7:30,8:p,9:83,12:m,14:10,15:11,16:r,17:a,18:i,19:s,20:o,21:u,22:l,23:c,24:d,25:h,26:f,27:26,29:27,30:28,31:29,33:31,35:y,36:g,42:32,47:v},{10:[1,84]},{7:30,8:p,9:85,12:m,14:10,15:11,16:r,17:a,18:i,19:s,20:o,21:u,22:l,23:c,24:d,25:h,26:f,27:26,29:27,30:28,31:29,33:31,35:y,36:g,42:32,47:v},{5:[2,2]},{10:[2,22]},t(k,[2,26]),t(b,[2,51],{45:[1,86]}),t(b,[2,52]),t(b,[2,56]),t(b,[2,57]),t(b,[2,58]),t(b,[2,59]),t(b,[2,60]),t(b,[2,61]),t(b,[2,62]),t(b,[2,63]),t(b,[2,64]),t(k,[2,38]),t(N,[2,44],{43:47,41:87,57:x,58:D}),t(N,[2,45],{43:47,41:88,57:x,58:D}),t(b,L,{44:44,45:w}),t(k,[2,39]),{39:[1,89]},t(k,[2,34],{34:90,37:Y}),{32:[1,91]},{7:30,8:p,9:92,12:m,14:10,15:11,16:r,17:a,18:i,19:s,20:o,21:u,22:l,23:c,24:d,25:h,26:f,27:26,29:27,30:28,31:29,33:31,35:y,36:g,42:32,47:v},{10:[1,93]},t(b,[2,55]),{10:[1,94]},t(b,T,{46:95,48:A,49:S,50:E,51:j,52:C,53:F,54:O,55:H,56:P}),t(N,[2,42]),t(N,[2,43]),t(k,[2,33],{34:96,37:Y}),t(k,[2,32]),{7:97,14:10,15:11,16:r,17:a,18:i,19:s,20:o,21:u,22:l,23:c,24:d,25:h,26:f},{10:[1,98]},t(b,[2,54]),{5:[2,3]},t(b,[2,50]),t(k,[2,31]),{28:[1,99],39:[2,37],40:[1,100]},t(b,[2,53]),{7:81,14:10,15:11,16:r,17:a,18:i,19:s,20:o,21:u,22:l,23:c,24:d,25:h,26:f,38:101},{7:81,14:10,15:11,16:r,17:a,18:i,19:s,20:o,21:u,22:l,23:c,24:d,25:h,26:f,38:102},{39:[2,35]},{39:[2,36]}],defaultActions:{7:[2,1],41:[2,4],60:[2,2],61:[2,22],94:[2,3],101:[2,35],102:[2,36]},parseError:function(t,e){if(!e.recoverable){var n=function(t,e){this.message=t,this.hash=e};throw n.prototype=Error,new n(t,e)}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],a=[null],i=[],s=this.table,o="",u=0,l=0,c=0,d=1,h=i.slice.call(arguments,1),f=Object.create(this.lexer),_={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(_.yy[p]=this.yy[p]);f.setInput(t,_.yy),_.yy.lexer=f,_.yy.parser=this,void 0===f.yylloc&&(f.yylloc={});var m=f.yylloc;i.push(m);var y=f.options&&f.options.ranges;"function"==typeof _.yy.parseError?this.parseError=_.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var g,v,M,k,b,L,w,x,D,Y,T={};;){if(M=n[n.length-1],this.defaultActions[M]?k=this.defaultActions[M]:(null==g&&(Y=void 0,"number"!=typeof(Y=r.pop()||f.lex()||d)&&(Y instanceof Array&&(Y=(r=Y).pop()),Y=e.symbols_[Y]||Y),g=Y),k=s[M]&&s[M][g]),void 0===k||!k.length||!k[0]){var A="";for(L in D=[],s[M])this.terminals_[L]&&2e[0].length)){if(e=n,r=i,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,a[i])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,a[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return 0)/,/^(?:--[o])/,/^(?:--)/,/^(?:-)/,/^(?:\+)/,/^(?:=)/,/^(?:[\u0021-\u0027\u002A-\u002E\u003F\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC_])/,/^(?:\|)/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:\{)/,/^(?:\})/,/^(?:")/,/^(?:\s)/,/^(?:\n)/,/^(?:$)/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42],inclusive:!0}}};function z(){this.yy={}}return I.lexer=R,new((z.prototype=I).Parser=z)}();r.parser=e,r.Parser=e.Parser,r.parse=function(){return e.parse.apply(e,arguments)},r.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),n.exit(1));var e=a(8).readFileSync(a(9).normalize(t[1]),"utf8");return r.parser.parse(e)},void 0!==t&&a.c[a.s]===t&&r.main(n.argv.slice(1))}).call(r,a(7),a(3)(t))},function(t,e,n){var r;r=function(t,e){return function(n){var r={};function a(t){if(r[t])return r[t].exports;var e=r[t]={i:t,l:!1,exports:{}};return n[t].call(e.exports,e,e.exports,a),e.l=!0,e.exports}return a.m=n,a.c=r,a.d=function(t,e,n){a.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},a.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(e,"a",e),e},a.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},a.p="",a(a.s=5)}([function(t,e){t.exports=n(19)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.addDummyNode=s,e.simplify=u,e.asNonCompoundGraph=l,e.successorWeights=c,e.predecessorWeights=d,e.intersectRect=h,e.buildLayerMatrix=f,e.normalizeRanks=_,e.removeEmptyRanks=p,e.addBorderNode=m,e.maxRank=y,e.partition=g,e.time=v,e.notime=M;var r,a=n(0),o=(r=a)&&r.__esModule?r:{default:r},i=n(2);function s(t,e,n,r){for(var a=void 0;a=o.default.uniqueId(r),t.hasNode(a););return n.dummy=e,t.setNode(a,n),a}function u(r){var a=(new i.Graph).setGraph(r.graph());return o.default.each(r.nodes(),function(t){a.setNode(t,r.node(t))}),o.default.each(r.edges(),function(t){var e=a.edge(t.v,t.w)||{weight:0,minlen:1},n=r.edge(t);a.setEdge(t.v,t.w,{weight:e.weight+n.weight,minlen:Math.max(e.minlen,n.minlen)})}),a}function l(e){var n=new i.Graph({multigraph:e.isMultigraph()}).setGraph(e.graph());return o.default.each(e.nodes(),function(t){e.children(t).length||n.setNode(t,e.node(t))}),o.default.each(e.edges(),function(t){n.setEdge(t,e.edge(t))}),n}function c(n){var t=o.default.map(n.nodes(),function(t){var e={};return o.default.each(n.outEdges(t),function(t){e[t.w]=(e[t.w]||0)+n.edge(t).weight}),e});return o.default.zipObject(n.nodes(),t)}function d(n){var t=o.default.map(n.nodes(),function(t){var e={};return o.default.each(n.inEdges(t),function(t){e[t.v]=(e[t.v]||0)+n.edge(t).weight}),e});return o.default.zipObject(n.nodes(),t)}function h(t,e){var n=t.x,r=t.y,a=e.x-n,i=e.y-r,s=t.width/2,o=t.height/2;if(!a&&!i)throw new Error("Not possible to find intersection inside of the rectangle");var u=void 0,l=void 0;return Math.abs(i)*s>Math.abs(a)*o?(i<0&&(o=-o),u=o*a/i,l=o):(a<0&&(s=-s),l=(u=s)*i/a),{x:n+u,y:r+l}}function f(r){var a=o.default.map(o.default.range(y(r)+1),function(){return[]});return o.default.each(r.nodes(),function(t){var e=r.node(t),n=e.rank;o.default.isUndefined(n)||(a[n][e.order]=t)}),a}function _(n){var r=o.default.min(o.default.map(n.nodes(),function(t){return n.node(t).rank}));o.default.each(n.nodes(),function(t){var e=n.node(t);o.default.has(e,"rank")&&(e.rank-=r)})}function p(n){var r=o.default.min(o.default.map(n.nodes(),function(t){return n.node(t).rank})),a=[];o.default.each(n.nodes(),function(t){var e=n.node(t).rank-r;a[e]||(a[e]=[]),a[e].push(t)});var i=0,s=n.graph().nodeRankFactor;o.default.each(a,function(t,e){o.default.isUndefined(t)&&e%s!=0?--i:i&&o.default.each(t,function(t){n.node(t).rank+=i})})}function m(t,e,n,r){var a={width:0,height:0};return 4<=arguments.length&&(a.rank=n,a.order=r),s(t,"border",a,e)}function y(n){return o.default.max(o.default.map(n.nodes(),function(t){var e=n.node(t).rank;if(!o.default.isUndefined(e))return e}))}function g(t,e){var n={lhs:[],rhs:[]};return o.default.each(t,function(t){e(t)?n.lhs.push(t):n.rhs.push(t)}),n}function v(t,e){var n=o.default.now();try{return e()}finally{console.log(t+" time: "+(o.default.now()-n)+"ms")}}function M(t,e){return e()}e.default={addDummyNode:s,simplify:u,asNonCompoundGraph:l,successorWeights:c,predecessorWeights:d,intersectRect:h,buildLayerMatrix:f,normalizeRanks:_,removeEmptyRanks:p,addBorderNode:m,maxRank:y,partition:g,time:v,notime:M}},function(t,e){t.exports=n(29)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.longestPath=i,e.slack=o;var r,a=n(0),s=(r=a)&&r.__esModule?r:{default:r};function i(a){var i={};s.default.each(a.sources(),function e(t){var n=a.node(t);if(s.default.has(i,t))return n.rank;i[t]=!0;var r=s.default.min(s.default.map(a.outEdges(t),function(t){return e(t.w)-a.edge(t).minlen}))||0;return n.rank=r})}function o(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}e.default={longestPath:i,slack:o}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,a=n(0),o=(r=a)&&r.__esModule?r:{default:r},i=n(2),u=n(3);function s(i,s){return o.default.each(i.nodes(),function r(a){o.default.each(s.nodeEdges(a),function(t){var e=t.v,n=a===e?t.w:e;i.hasNode(n)||(0,u.slack)(s,t)||(i.setNode(n,{}),i.setEdge(a,n,{}),r(n))})}),i.nodeCount()}function l(e,n){return o.default.minBy(n.edges(),function(t){if(e.hasNode(t.v)!==e.hasNode(t.w))return(0,u.slack)(n,t)})}function c(t,e,n){o.default.each(t.nodes(),function(t){e.node(t).rank+=n})}e.default=function(t){var e=new i.Graph({directed:!1}),n=t.nodes()[0],r=t.nodeCount();e.setNode(n,{});for(var a=void 0;s(e,t)s.lim&&(o=s,u=!0);var l=_.default.filter(n.edges(),function(t){return u===g(e,e.node(t.v),o)&&u!==g(e,e.node(t.w),o)});return _.default.minBy(l,function(t){return(0,c.slack)(n,t)})}function y(t,e,n,r){var a,i,s,o,u=n.v,l=n.w;t.removeEdge(u,l),t.setEdge(r.v,r.w,{}),f(t),h(t,e),a=t,i=e,s=_.default.find(a.nodes(),function(t){return!i.node(t).parent}),o=(o=d(a,s)).slice(1),_.default.each(o,function(t){var e=a.node(t).parent,n=i.edge(t,e),r=!1;n||(n=i.edge(e,t),r=!0),i.node(t).rank=i.node(e).rank+(r?n.minlen:-n.minlen)})}function g(t,e,n){return n.low<=e.lim&&e.lim<=n.lim}u.initLowLimValues=f,u.initCutValues=h,u.calcCutValue=l,u.leaveEdge=p,u.enterEdge=m,u.exchangeEdges=y,e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,a=n(0),s=(r=a)&&r.__esModule?r:{default:r};e.default=function(l){var r,a,i,c=(r=l,a={},i=0,s.default.each(r.children(),function t(e){var n=i;s.default.each(r.children(e),t),a[e]={low:n,lim:i++}}),a);s.default.each(l.graph().dummyChains,function(t){for(var e=l.node(t),n=e.edgeObj,r=function(t,e,n,r){var a=[],i=[],s=Math.min(e[n].low,e[r].low),o=Math.max(e[n].lim,e[r].lim),u=void 0,l=void 0;for(u=n;u=t.parent(u),a.push(u),u&&(e[u].low>s||o>e[u].lim););for(l=u,u=r;(u=t.parent(u))!==l;)i.push(u);return{path:a.concat(i.reverse()),lca:l}}(l,c,n.v,n.w),a=r.path,i=r.lca,s=0,o=a[s],u=!0;t!==n.w;){if(e=l.node(t),u){for(;(o=a[s])!==i&&l.node(o).maxRank>1]+=t.weight;u+=t.weight*n})),u}e.default=function(t,e){for(var n=0,r=1;r=i.barycenter)&&(n=t,a=r=0,(e=i).weight&&(r+=e.barycenter*e.weight,a+=e.weight),n.weight&&(r+=n.barycenter*n.weight,a+=n.weight),e.vs=n.vs.concat(e.vs),e.barycenter=r/a,e.weight=a,e.i=Math.min(n.i,e.i),n.merged=!0)}}function r(e){return function(t){t.in.push(e),0==--t.indegree&&n.push(t)}}for(;n.length;){var a=n.pop();t.push(a),s.default.each(a.in.reverse(),e(a)),s.default.each(a.out,r(a))}return s.default.chain(t).filter(function(t){return!t.merged}).map(function(t){return s.default.pick(t,["vs","i","barycenter","weight"])}).value()}(s.default.filter(r,function(t){return!t.indegree}))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var d=r(n(0)),h=r(n(1));function r(t){return t&&t.__esModule?t:{default:t}}function f(t,e,n){for(var r=void 0;e.length&&(r=d.default.last(e)).i<=n;)e.pop(),t.push(r.vs),n++;return n}e.default=function(t,e){var n,r=h.default.partition(t,function(t){return d.default.has(t,"barycenter")}),a=r.lhs,i=d.default.sortBy(r.rhs,function(t){return-t.i}),s=[],o=0,u=0,l=0;a.sort((n=!!e,function(t,e){return t.barycentere.barycenter?1:n?e.i-t.i:t.i-e.i})),l=f(s,i,l),d.default.each(a,function(t){l+=t.vs.length,s.push(t.vs),o+=t.barycenter*t.weight,u+=t.weight,l=f(s,i,l)});var c={vs:d.default.flatten(s,!0)};return u&&(c.barycenter=o/u,c.weight=u),c}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,a=n(0),u=(r=a)&&r.__esModule?r:{default:r},l=n(2);e.default=function(i,n,r){var s=function(t){for(var e=void 0;t.hasNode(e=u.default.uniqueId("_root")););return e}(i),o=new l.Graph({compound:!0}).setGraph({root:s}).setDefaultNodeLabel(function(t){return i.node(t)});return u.default.each(i.nodes(),function(a){var t=i.node(a),e=i.parent(a);(t.rank===n||t.minRank<=n&&n<=t.maxRank)&&(o.setNode(a),o.setParent(a,e||s),u.default.each(i[r](a),function(t){var e=t.v===a?t.w:t.v,n=o.edge(e,a),r=u.default.isUndefined(n)?0:n.weight;o.setEdge(e,a,{weight:i.edge(t).weight+r})}),u.default.has(t,"minRank")&&o.setNode(a,{borderLeft:t.borderLeft[n],borderRight:t.borderRight[n]}))}),o}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,a=n(0),u=(r=a)&&r.__esModule?r:{default:r};e.default=function(a,i,t){var s={},o=void 0;u.default.each(t,function(t){for(var e=a.parent(t),n=void 0,r=void 0;e;){if((n=a.parent(e))?(r=s[n],s[n]=e):(r=o,o=e),r&&r!==e)return void i.setEdge(r,e);e=n}})}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=r(n(0)),o=r(n(1)),u=n(27);function r(t){return t&&t.__esModule?t:{default:t}}e.default=function(n){var r,t,a,i;n=o.default.asNonCompoundGraph(n),r=n,t=o.default.buildLayerMatrix(r),a=r.graph().ranksep,i=0,s.default.each(t,function(t){var e=s.default.max(s.default.map(t,function(t){return r.node(t).height}));s.default.each(t,function(t){r.node(t).y=i+e/2}),i+=e+a}),s.default.each((0,u.positionX)(n),function(t,e){n.node(e).x=t})}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.positionX=i;var v=a(n(0)),M=n(2),r=a(n(1));function a(t){return t&&t.__esModule?t:{default:t}}function l(l,t){var c={};return v.default.reduce(t,function(t,r){var i=0,s=0,o=t.length,u=v.default.last(r);return v.default.each(r,function(t,e){var n=function(e,t){if(e.node(t).dummy)return v.default.find(e.predecessors(t),function(t){return e.node(t).dummy})}(l,t),a=n?l.node(n).order:o;(n||t===u)&&(v.default.each(r.slice(s,e+1),function(r){v.default.each(l.predecessors(r),function(t){var e=l.node(t),n=e.order;!(na)&&d(s,t,i)})})}return v.default.reduce(t,function(r,a){var i=-1,s=void 0,o=0;return v.default.each(a,function(t,e){if("border"===u.node(t).dummy){var n=u.predecessors(t);n.length&&(s=u.node(n[0]).order,l(a,o,e,i,s),o=e,i=s)}l(a,o,a.length,s,r.length)}),a}),s}function d(t,e,n){if(n",main:"dist/dagre-layout.js",keywords:["graph","layout","dagre"],scripts:{lint:"standard",jest:"jest --coverage",karma:"node -r babel-register node_modules/.bin/karma start",test:"yarn lint && yarn jest && yarn karma --single-run",bench:"node -r babel-register src/bench.js",build:"node -r babel-register node_modules/.bin/webpack --progress --colors","build:watch":"yarn build --watch",upgrade:"yarn-upgrade-all"},dependencies:{graphlib:"^2.1.1",lodash:"^4.17.4"},devDependencies:{"babel-core":"^6.26.0","babel-loader":"^7.1.2","babel-preset-env":"^1.6.0","babel-preset-es2015":"^6.24.1",benchmark:"^2.1.4",chai:"^4.1.2",coveralls:"^2.13.1",jest:"^21.0.1",karma:"^1.7.1","karma-chrome-launcher":"^2.2.0","karma-firefox-launcher":"^1.0.1","karma-mocha":"^1.3.0","karma-safari-launcher":"^1.0.0",mocha:"^3.5.0",sprintf:"^0.1.5",standard:"^10.0.3",webpack:"^3.5.6","webpack-node-externals":"^1.6.0","yarn-upgrade-all":"^0.1.8"},repository:{type:"git",url:"https://github.com/tylingsoft/dagre-layout.git"},license:"MIT",files:["dist/","lib/","index.js"],standard:{ignore:["dist/**/*.js","coverage/**/*.js"]},jest:{testRegex:"test/.+?-test\\.js",testPathIgnorePatterns:["test/bundle-test\\.js"]}}}]).default},t.exports=r(n(19),n(29))},function(t,e,n){var r=n(4),a=n(164);t.exports=function(e,t,n,r){return function(t,n,i,e){var s,o,u={},l=new a,r=function(t){var e=t.v!==s?t.v:t.w,n=u[e],r=i(t),a=o.distance+r;if(r<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+t+" Weight: "+r);athis._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)},r.prototype._heapify=function(t){var e=this._arr,n=2*t,r=n+1,a=t;n>1].prioritye[0].length)){if(e=n,r=i,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,a[i])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,a[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return 0:\n,;]+?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\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,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\->:\n,;]+)/i,/^(?:->>)/i,/^(?:-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?::[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[2,3,15],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,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],inclusive:!0}}};function w(){this.yy={}}return b.lexer=L,new((w.prototype=b).Parser=w)}();r.parser=e,r.Parser=e.Parser,r.parse=function(){return e.parse.apply(e,arguments)},r.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),n.exit(1));var e=a(8).readFileSync(a(9).normalize(t[1]),"utf8");return r.parser.parse(e)},void 0!==t&&a.c[a.s]===t&&r.main(n.argv.slice(1))}).call(r,a(7),a(3)(t))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.apply=e.setTitle=e.addNote=e.PLACEMENT=e.ARROWTYPE=e.LINETYPE=e.clear=e.getTitle=e.getActorKeys=e.getActor=e.getActors=e.getMessages=e.addSignal=e.addMessage=e.addActor=void 0;var a=n(1),i={},s=[],o=[],r="",u=e.addActor=function(t,e,n){var r=i[t];r&&e===r.name&&null==n||(null==n&&(n=e),i[t]={name:e,description:n})},l=e.addMessage=function(t,e,n,r){s.push({from:t,to:e,message:n,answer:r})},c=e.addSignal=function(t,e,n,r){a.logger.debug("Adding message from="+t+" to="+e+" message="+n+" type="+r),s.push({from:t,to:e,message:n,type:r})},d=e.getMessages=function(){return s},h=e.getActors=function(){return i},f=e.getActor=function(t){return i[t]},_=e.getActorKeys=function(){return Object.keys(i)},p=e.getTitle=function(){return r},m=e.clear=function(){i={},s=[]},y=e.LINETYPE={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21},g=e.ARROWTYPE={FILLED:0,OPEN:1},v=e.PLACEMENT={LEFTOF:0,RIGHTOF:1,OVER:2},M=e.addNote=function(t,e,n){var r={actor:t,placement:e,message:n},a=[].concat(t,t);o.push(r),s.push({from:a[0],to:a[1],message:n,type:y.NOTE,placement:e})},k=e.setTitle=function(t){r=t},b=e.apply=function e(t){if(t instanceof Array)t.forEach(function(t){e(t)});else switch(t.type){case"addActor":u(t.actor,t.actor,t.description);break;case"activeStart":case"activeEnd":c(t.actor,void 0,void 0,t.signalType);break;case"addNote":M(t.actor,t.placement,t.text);break;case"addMessage":c(t.from,t.to,t.msg,t.signalType);break;case"loopStart":c(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":c(void 0,void 0,void 0,t.signalType);break;case"optStart":c(void 0,void 0,t.optText,t.signalType);break;case"optEnd":c(void 0,void 0,void 0,t.signalType);break;case"altStart":case"else":c(void 0,void 0,t.altText,t.signalType);break;case"altEnd":c(void 0,void 0,void 0,t.signalType);break;case"setTitle":k(t.text);break;case"parStart":case"and":c(void 0,void 0,t.parText,t.signalType);break;case"parEnd":c(void 0,void 0,void 0,t.signalType)}};e.default={addActor:u,addMessage:l,addSignal:c,getMessages:d,getActors:h,getActor:f,getActorKeys:_,getTitle:p,clear:m,LINETYPE:y,ARROWTYPE:g,PLACEMENT:v,addNote:M,setTitle:k,apply:b}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getInfo=e.setInfo=e.getMessage=e.setMessage=void 0;var r=n(1),a="",i=!1,s=e.setMessage=function(t){r.logger.debug("Setting message to: "+t),a=t},o=e.getMessage=function(){return a},u=e.setInfo=function(t){i=t},l=e.getInfo=function(){return i};e.default={setMessage:s,getMessage:o,setInfo:u,getInfo:l}},function(t,r,a){"use strict";(function(n,t){var e=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,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,message:11,say:12,TXT:13,$accept:0,$end:1},terminals_:{2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo",12:"say",13:"TXT"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1],[8,1],[11,2]],performAction:function(t,e,n,r,a,i,s){var o=i.length-1;switch(a){case 1:return r;case 4:break;case 6:r.setInfo(!0);break;case 7:r.setMessage(i[o]);break;case 8:this.$=i[o-1].substring(1).trim().replace(/\\n/gm,"\n")}},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],11:9,12:[1,10]},{1:[2,1]},t(e,[2,3]),t(e,[2,4]),t(e,[2,5]),t(e,[2,6]),t(e,[2,7]),{13:[1,11]},t(e,[2,8])],defaultActions:{4:[2,1]},parseError:function(t,e){if(!e.recoverable){var n=function(t,e){this.message=t,this.hash=e};throw n.prototype=Error,new n(t,e)}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],a=[null],i=[],s=this.table,o="",u=0,l=0,c=0,d=1,h=i.slice.call(arguments,1),f=Object.create(this.lexer),_={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(_.yy[p]=this.yy[p]);f.setInput(t,_.yy),_.yy.lexer=f,_.yy.parser=this,void 0===f.yylloc&&(f.yylloc={});var m=f.yylloc;i.push(m);var y=f.options&&f.options.ranges;"function"==typeof _.yy.parseError?this.parseError=_.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var g,v,M,k,b,L,w,x,D,Y,T={};;){if(M=n[n.length-1],this.defaultActions[M]?k=this.defaultActions[M]:(null==g&&(Y=void 0,"number"!=typeof(Y=r.pop()||f.lex()||d)&&(Y instanceof Array&&(Y=(r=Y).pop()),Y=e.symbols_[Y]||Y),g=Y),k=s[M]&&s[M][g]),void 0===k||!k.length||!k[0]){var A="";for(L in D=[],s[M])this.terminals_[L]&&2e[0].length)){if(e=n,r=i,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,a[i])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,a[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return 0e[0].length)){if(e=n,r=i,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,a[i])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,a[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return 0e[0].length)){if(e=n,r=i,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,a[i])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,a[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return 0)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:--)/,/^(?:\.\.)/,/^(?::[^#\n;]+)/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:[A-Za-z]+)/,/^(?:[!"#$%&'*+,-.`?\\_\/])/,/^(?:[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:[10,11],inclusive:!1},struct:{rules:[5,6,7],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,8,9,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32],inclusive:!0}}};function L(){this.yy={}}return k.lexer=b,new((L.prototype=k).Parser=L)}();r.parser=e,r.Parser=e.Parser,r.parse=function(){return e.parse.apply(e,arguments)},r.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),n.exit(1));var e=a(8).readFileSync(a(9).normalize(t[1]),"utf8");return r.parser.parse(e)},void 0!==t&&a.c[a.s]===t&&r.main(n.argv.slice(1))}).call(r,a(7),a(3)(t))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.relationType=e.lineType=e.cleanupLabel=e.addMembers=e.addRelation=e.getRelations=e.getClasses=e.getClass=e.clear=e.addClass=void 0;var r=n(1),a=[],i={},s=e.addClass=function(t){void 0===i[t]&&(i[t]={id:t,methods:[],members:[]})},o=e.clear=function(){a=[],i={}},u=e.getClass=function(t){return i[t]},l=e.getClasses=function(){return i},c=e.getRelations=function(){return a},d=e.addRelation=function(t){r.logger.warn("Adding relation: "+JSON.stringify(t)),s(t.id1),s(t.id2),a.push(t)},h=e.addMembers=function(t,e){var n=i[t];"string"==typeof e&&(")"===e.substr(-1)?n.methods.push(e):n.members.push(e))},f=e.cleanupLabel=function(t){return":"===t.substring(0,1)?t.substr(2).trim():t.trim()},_=e.lineType={LINE:0,DOTTED_LINE:1},p=e.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3};e.default={addClass:s,clear:o,getClass:u,getClasses:l,getRelations:c,addRelation:d,addMembers:h,cleanupLabel:f,lineType:_,relationType:p}},function(t,r,a){"use strict";(function(n,t){var e=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],a=[7,11,12,15,17,19,20,21],i=[2,20],s=[1,32],o={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,a,i,s){var o=i.length-1;switch(a){case 1:return i[o-1];case 2:return r.setDirection(i[o-3]),i[o-1];case 4:r.setOptions(i[o-1]),this.$=i[o];break;case 5:i[o-1]+=i[o],this.$=i[o-1];break;case 7:this.$=[];break;case 8:i[o-1].push(i[o]),this.$=i[o-1];break;case 9:this.$=i[o-1];break;case 11:r.commit(i[o]);break;case 12:r.branch(i[o]);break;case 13:r.checkout(i[o]);break;case 14:r.merge(i[o]);break;case 15:r.reset(i[o]);break;case 16:this.$="";break;case 17:this.$=i[o];break;case 18:this.$=i[o-1]+":"+i[o];break;case 19:this.$=i[o-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(a,[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(a,[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:i,25:31,26:s},{12:i,25:33,26:s},{12:[2,18]},{12:i,25:34,26:s},{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=function(t,e){this.message=t,this.hash=e};throw n.prototype=Error,new n(t,e)}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],a=[null],i=[],s=this.table,o="",u=0,l=0,c=0,d=1,h=i.slice.call(arguments,1),f=Object.create(this.lexer),_={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(_.yy[p]=this.yy[p]);f.setInput(t,_.yy),_.yy.lexer=f,_.yy.parser=this,void 0===f.yylloc&&(f.yylloc={});var m=f.yylloc;i.push(m);var y=f.options&&f.options.ranges;"function"==typeof _.yy.parseError?this.parseError=_.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var g,v,M,k,b,L,w,x,D,Y,T={};;){if(M=n[n.length-1],this.defaultActions[M]?k=this.defaultActions[M]:(null==g&&(Y=void 0,"number"!=typeof(Y=r.pop()||f.lex()||d)&&(Y instanceof Array&&(Y=(r=Y).pop()),Y=e.symbols_[Y]||Y),g=Y),k=s[M]&&s[M][g]),void 0===k||!k.length||!k[0]){var A="";for(L in D=[],s[M])this.terminals_[L]&&2e[0].length)){if(e=n,r=i,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,a[i])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,a[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return 0\u20D2|\u205F\u200A|\u219D\u0338|\u2202\u0338|\u2220\u20D2|\u2229\uFE00|\u222A\uFE00|\u223C\u20D2|\u223D\u0331|\u223E\u0333|\u2242\u0338|\u224B\u0338|\u224D\u20D2|\u224E\u0338|\u224F\u0338|\u2250\u0338|\u2261\u20E5|\u2264\u20D2|\u2265\u20D2|\u2266\u0338|\u2267\u0338|\u2268\uFE00|\u2269\uFE00|\u226A\u0338|\u226A\u20D2|\u226B\u0338|\u226B\u20D2|\u227F\u0338|\u2282\u20D2|\u2283\u20D2|\u228A\uFE00|\u228B\uFE00|\u228F\u0338|\u2290\u0338|\u2293\uFE00|\u2294\uFE00|\u22B4\u20D2|\u22B5\u20D2|\u22D8\u0338|\u22D9\u0338|\u22DA\uFE00|\u22DB\uFE00|\u22F5\u0338|\u22F9\u0338|\u2933\u0338|\u29CF\u0338|\u29D0\u0338|\u2A6D\u0338|\u2A70\u0338|\u2A7D\u0338|\u2A7E\u0338|\u2AA1\u0338|\u2AA2\u0338|\u2AAC\uFE00|\u2AAD\uFE00|\u2AAF\u0338|\u2AB0\u0338|\u2AC5\u0338|\u2AC6\u0338|\u2ACB\uFE00|\u2ACC\uFE00|\u2AFD\u20E5|[\xA0-\u0113\u0116-\u0122\u0124-\u012B\u012E-\u014D\u0150-\u017E\u0192\u01B5\u01F5\u0237\u02C6\u02C7\u02D8-\u02DD\u0311\u0391-\u03A1\u03A3-\u03A9\u03B1-\u03C9\u03D1\u03D2\u03D5\u03D6\u03DC\u03DD\u03F0\u03F1\u03F5\u03F6\u0401-\u040C\u040E-\u044F\u0451-\u045C\u045E\u045F\u2002-\u2005\u2007-\u2010\u2013-\u2016\u2018-\u201A\u201C-\u201E\u2020-\u2022\u2025\u2026\u2030-\u2035\u2039\u203A\u203E\u2041\u2043\u2044\u204F\u2057\u205F-\u2063\u20AC\u20DB\u20DC\u2102\u2105\u210A-\u2113\u2115-\u211E\u2122\u2124\u2127-\u2129\u212C\u212D\u212F-\u2131\u2133-\u2138\u2145-\u2148\u2153-\u215E\u2190-\u219B\u219D-\u21A7\u21A9-\u21AE\u21B0-\u21B3\u21B5-\u21B7\u21BA-\u21DB\u21DD\u21E4\u21E5\u21F5\u21FD-\u2205\u2207-\u2209\u220B\u220C\u220F-\u2214\u2216-\u2218\u221A\u221D-\u2238\u223A-\u2257\u2259\u225A\u225C\u225F-\u2262\u2264-\u228B\u228D-\u229B\u229D-\u22A5\u22A7-\u22B0\u22B2-\u22BB\u22BD-\u22DB\u22DE-\u22E3\u22E6-\u22F7\u22F9-\u22FE\u2305\u2306\u2308-\u2310\u2312\u2313\u2315\u2316\u231C-\u231F\u2322\u2323\u232D\u232E\u2336\u233D\u233F\u237C\u23B0\u23B1\u23B4-\u23B6\u23DC-\u23DF\u23E2\u23E7\u2423\u24C8\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2550-\u256C\u2580\u2584\u2588\u2591-\u2593\u25A1\u25AA\u25AB\u25AD\u25AE\u25B1\u25B3-\u25B5\u25B8\u25B9\u25BD-\u25BF\u25C2\u25C3\u25CA\u25CB\u25EC\u25EF\u25F8-\u25FC\u2605\u2606\u260E\u2640\u2642\u2660\u2663\u2665\u2666\u266A\u266D-\u266F\u2713\u2717\u2720\u2736\u2758\u2772\u2773\u27C8\u27C9\u27E6-\u27ED\u27F5-\u27FA\u27FC\u27FF\u2902-\u2905\u290C-\u2913\u2916\u2919-\u2920\u2923-\u292A\u2933\u2935-\u2939\u293C\u293D\u2945\u2948-\u294B\u294E-\u2976\u2978\u2979\u297B-\u297F\u2985\u2986\u298B-\u2996\u299A\u299C\u299D\u29A4-\u29B7\u29B9\u29BB\u29BC\u29BE-\u29C5\u29C9\u29CD-\u29D0\u29DC-\u29DE\u29E3-\u29E5\u29EB\u29F4\u29F6\u2A00-\u2A02\u2A04\u2A06\u2A0C\u2A0D\u2A10-\u2A17\u2A22-\u2A27\u2A29\u2A2A\u2A2D-\u2A31\u2A33-\u2A3C\u2A3F\u2A40\u2A42-\u2A4D\u2A50\u2A53-\u2A58\u2A5A-\u2A5D\u2A5F\u2A66\u2A6A\u2A6D-\u2A75\u2A77-\u2A9A\u2A9D-\u2AA2\u2AA4-\u2AB0\u2AB3-\u2AC8\u2ACB\u2ACC\u2ACF-\u2ADB\u2AE4\u2AE6-\u2AE9\u2AEB-\u2AF3\u2AFD\uFB00-\uFB04]|\uD835[\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDD6B]/g,d={"­":"shy","‌":"zwnj","‍":"zwj","‎":"lrm","⁣":"ic","⁢":"it","⁡":"af","‏":"rlm","​":"ZeroWidthSpace","⁠":"NoBreak","̑":"DownBreve","⃛":"tdot","⃜":"DotDot","\t":"Tab","\n":"NewLine"," ":"puncsp"," ":"MediumSpace"," ":"thinsp"," ":"hairsp"," ":"emsp13"," ":"ensp"," ":"emsp14"," ":"emsp"," ":"numsp"," ":"nbsp","  ":"ThickSpace","‾":"oline",_:"lowbar","‐":"dash","–":"ndash","—":"mdash","―":"horbar",",":"comma",";":"semi","⁏":"bsemi",":":"colon","⩴":"Colone","!":"excl","¡":"iexcl","?":"quest","¿":"iquest",".":"period","‥":"nldr","…":"mldr","·":"middot","'":"apos","‘":"lsquo","’":"rsquo","‚":"sbquo","‹":"lsaquo","›":"rsaquo",'"':"quot","“":"ldquo","”":"rdquo","„":"bdquo","«":"laquo","»":"raquo","(":"lpar",")":"rpar","[":"lsqb","]":"rsqb","{":"lcub","}":"rcub","⌈":"lceil","⌉":"rceil","⌊":"lfloor","⌋":"rfloor","⦅":"lopar","⦆":"ropar","⦋":"lbrke","⦌":"rbrke","⦍":"lbrkslu","⦎":"rbrksld","⦏":"lbrksld","⦐":"rbrkslu","⦑":"langd","⦒":"rangd","⦓":"lparlt","⦔":"rpargt","⦕":"gtlPar","⦖":"ltrPar","⟦":"lobrk","⟧":"robrk","⟨":"lang","⟩":"rang","⟪":"Lang","⟫":"Rang","⟬":"loang","⟭":"roang","❲":"lbbrk","❳":"rbbrk","‖":"Vert","§":"sect","¶":"para","@":"commat","*":"ast","/":"sol",undefined:null,"&":"amp","#":"num","%":"percnt","‰":"permil","‱":"pertenk","†":"dagger","‡":"Dagger","•":"bull","⁃":"hybull","′":"prime","″":"Prime","‴":"tprime","⁗":"qprime","‵":"bprime","⁁":"caret","`":"grave","´":"acute","˜":"tilde","^":"Hat","¯":"macr","˘":"breve","˙":"dot","¨":"die","˚":"ring","˝":"dblac","¸":"cedil","˛":"ogon","ˆ":"circ","ˇ":"caron","°":"deg","©":"copy","®":"reg","℗":"copysr","℘":"wp","℞":"rx","℧":"mho","℩":"iiota","←":"larr","↚":"nlarr","→":"rarr","↛":"nrarr","↑":"uarr","↓":"darr","↔":"harr","↮":"nharr","↕":"varr","↖":"nwarr","↗":"nearr","↘":"searr","↙":"swarr","↝":"rarrw","↝̸":"nrarrw","↞":"Larr","↟":"Uarr","↠":"Rarr","↡":"Darr","↢":"larrtl","↣":"rarrtl","↤":"mapstoleft","↥":"mapstoup","↦":"map","↧":"mapstodown","↩":"larrhk","↪":"rarrhk","↫":"larrlp","↬":"rarrlp","↭":"harrw","↰":"lsh","↱":"rsh","↲":"ldsh","↳":"rdsh","↵":"crarr","↶":"cularr","↷":"curarr","↺":"olarr","↻":"orarr","↼":"lharu","↽":"lhard","↾":"uharr","↿":"uharl","⇀":"rharu","⇁":"rhard","⇂":"dharr","⇃":"dharl","⇄":"rlarr","⇅":"udarr","⇆":"lrarr","⇇":"llarr","⇈":"uuarr","⇉":"rrarr","⇊":"ddarr","⇋":"lrhar","⇌":"rlhar","⇐":"lArr","⇍":"nlArr","⇑":"uArr","⇒":"rArr","⇏":"nrArr","⇓":"dArr","⇔":"iff","⇎":"nhArr","⇕":"vArr","⇖":"nwArr","⇗":"neArr","⇘":"seArr","⇙":"swArr","⇚":"lAarr","⇛":"rAarr","⇝":"zigrarr","⇤":"larrb","⇥":"rarrb","⇵":"duarr","⇽":"loarr","⇾":"roarr","⇿":"hoarr","∀":"forall","∁":"comp","∂":"part","∂̸":"npart","∃":"exist","∄":"nexist","∅":"empty","∇":"Del","∈":"in","∉":"notin","∋":"ni","∌":"notni","϶":"bepsi","∏":"prod","∐":"coprod","∑":"sum","+":"plus","±":"pm","÷":"div","×":"times","<":"lt","≮":"nlt","<⃒":"nvlt","=":"equals","≠":"ne","=⃥":"bne","⩵":"Equal",">":"gt","≯":"ngt",">⃒":"nvgt","¬":"not","|":"vert","¦":"brvbar","−":"minus","∓":"mp","∔":"plusdo","⁄":"frasl","∖":"setmn","∗":"lowast","∘":"compfn","√":"Sqrt","∝":"prop","∞":"infin","∟":"angrt","∠":"ang","∠⃒":"nang","∡":"angmsd","∢":"angsph","∣":"mid","∤":"nmid","∥":"par","∦":"npar","∧":"and","∨":"or","∩":"cap","∩︀":"caps","∪":"cup","∪︀":"cups","∫":"int","∬":"Int","∭":"tint","⨌":"qint","∮":"oint","∯":"Conint","∰":"Cconint","∱":"cwint","∲":"cwconint","∳":"awconint","∴":"there4","∵":"becaus","∶":"ratio","∷":"Colon","∸":"minusd","∺":"mDDot","∻":"homtht","∼":"sim","≁":"nsim","∼⃒":"nvsim","∽":"bsim","∽̱":"race","∾":"ac","∾̳":"acE","∿":"acd","≀":"wr","≂":"esim","≂̸":"nesim","≃":"sime","≄":"nsime","≅":"cong","≇":"ncong","≆":"simne","≈":"ap","≉":"nap","≊":"ape","≋":"apid","≋̸":"napid","≌":"bcong","≍":"CupCap","≭":"NotCupCap","≍⃒":"nvap","≎":"bump","≎̸":"nbump","≏":"bumpe","≏̸":"nbumpe","≐":"doteq","≐̸":"nedot","≑":"eDot","≒":"efDot","≓":"erDot","≔":"colone","≕":"ecolon","≖":"ecir","≗":"cire","≙":"wedgeq","≚":"veeeq","≜":"trie","≟":"equest","≡":"equiv","≢":"nequiv","≡⃥":"bnequiv","≤":"le","≰":"nle","≤⃒":"nvle","≥":"ge","≱":"nge","≥⃒":"nvge","≦":"lE","≦̸":"nlE","≧":"gE","≧̸":"ngE","≨︀":"lvnE","≨":"lnE","≩":"gnE","≩︀":"gvnE","≪":"ll","≪̸":"nLtv","≪⃒":"nLt","≫":"gg","≫̸":"nGtv","≫⃒":"nGt","≬":"twixt","≲":"lsim","≴":"nlsim","≳":"gsim","≵":"ngsim","≶":"lg","≸":"ntlg","≷":"gl","≹":"ntgl","≺":"pr","⊀":"npr","≻":"sc","⊁":"nsc","≼":"prcue","⋠":"nprcue","≽":"sccue","⋡":"nsccue","≾":"prsim","≿":"scsim","≿̸":"NotSucceedsTilde","⊂":"sub","⊄":"nsub","⊂⃒":"vnsub","⊃":"sup","⊅":"nsup","⊃⃒":"vnsup","⊆":"sube","⊈":"nsube","⊇":"supe","⊉":"nsupe","⊊︀":"vsubne","⊊":"subne","⊋︀":"vsupne","⊋":"supne","⊍":"cupdot","⊎":"uplus","⊏":"sqsub","⊏̸":"NotSquareSubset","⊐":"sqsup","⊐̸":"NotSquareSuperset","⊑":"sqsube","⋢":"nsqsube","⊒":"sqsupe","⋣":"nsqsupe","⊓":"sqcap","⊓︀":"sqcaps","⊔":"sqcup","⊔︀":"sqcups","⊕":"oplus","⊖":"ominus","⊗":"otimes","⊘":"osol","⊙":"odot","⊚":"ocir","⊛":"oast","⊝":"odash","⊞":"plusb","⊟":"minusb","⊠":"timesb","⊡":"sdotb","⊢":"vdash","⊬":"nvdash","⊣":"dashv","⊤":"top","⊥":"bot","⊧":"models","⊨":"vDash","⊭":"nvDash","⊩":"Vdash","⊮":"nVdash","⊪":"Vvdash","⊫":"VDash","⊯":"nVDash","⊰":"prurel","⊲":"vltri","⋪":"nltri","⊳":"vrtri","⋫":"nrtri","⊴":"ltrie","⋬":"nltrie","⊴⃒":"nvltrie","⊵":"rtrie","⋭":"nrtrie","⊵⃒":"nvrtrie","⊶":"origof","⊷":"imof","⊸":"mumap","⊹":"hercon","⊺":"intcal","⊻":"veebar","⊽":"barvee","⊾":"angrtvb","⊿":"lrtri","⋀":"Wedge","⋁":"Vee","⋂":"xcap","⋃":"xcup","⋄":"diam","⋅":"sdot","⋆":"Star","⋇":"divonx","⋈":"bowtie","⋉":"ltimes","⋊":"rtimes","⋋":"lthree","⋌":"rthree","⋍":"bsime","⋎":"cuvee","⋏":"cuwed","⋐":"Sub","⋑":"Sup","⋒":"Cap","⋓":"Cup","⋔":"fork","⋕":"epar","⋖":"ltdot","⋗":"gtdot","⋘":"Ll","⋘̸":"nLl","⋙":"Gg","⋙̸":"nGg","⋚︀":"lesg","⋚":"leg","⋛":"gel","⋛︀":"gesl","⋞":"cuepr","⋟":"cuesc","⋦":"lnsim","⋧":"gnsim","⋨":"prnsim","⋩":"scnsim","⋮":"vellip","⋯":"ctdot","⋰":"utdot","⋱":"dtdot","⋲":"disin","⋳":"isinsv","⋴":"isins","⋵":"isindot","⋵̸":"notindot","⋶":"notinvc","⋷":"notinvb","⋹":"isinE","⋹̸":"notinE","⋺":"nisd","⋻":"xnis","⋼":"nis","⋽":"notnivc","⋾":"notnivb","⌅":"barwed","⌆":"Barwed","⌌":"drcrop","⌍":"dlcrop","⌎":"urcrop","⌏":"ulcrop","⌐":"bnot","⌒":"profline","⌓":"profsurf","⌕":"telrec","⌖":"target","⌜":"ulcorn","⌝":"urcorn","⌞":"dlcorn","⌟":"drcorn","⌢":"frown","⌣":"smile","⌭":"cylcty","⌮":"profalar","⌶":"topbot","⌽":"ovbar","⌿":"solbar","⍼":"angzarr","⎰":"lmoust","⎱":"rmoust","⎴":"tbrk","⎵":"bbrk","⎶":"bbrktbrk","⏜":"OverParenthesis","⏝":"UnderParenthesis","⏞":"OverBrace","⏟":"UnderBrace","⏢":"trpezium","⏧":"elinters","␣":"blank","─":"boxh","│":"boxv","┌":"boxdr","┐":"boxdl","└":"boxur","┘":"boxul","├":"boxvr","┤":"boxvl","┬":"boxhd","┴":"boxhu","┼":"boxvh","═":"boxH","║":"boxV","╒":"boxdR","╓":"boxDr","╔":"boxDR","╕":"boxdL","╖":"boxDl","╗":"boxDL","╘":"boxuR","╙":"boxUr","╚":"boxUR","╛":"boxuL","╜":"boxUl","╝":"boxUL","╞":"boxvR","╟":"boxVr","╠":"boxVR","╡":"boxvL","╢":"boxVl","╣":"boxVL","╤":"boxHd","╥":"boxhD","╦":"boxHD","╧":"boxHu","╨":"boxhU","╩":"boxHU","╪":"boxvH","╫":"boxVh","╬":"boxVH","▀":"uhblk","▄":"lhblk","█":"block","░":"blk14","▒":"blk12","▓":"blk34","□":"squ","▪":"squf","▫":"EmptyVerySmallSquare","▭":"rect","▮":"marker","▱":"fltns","△":"xutri","▴":"utrif","▵":"utri","▸":"rtrif","▹":"rtri","▽":"xdtri","▾":"dtrif","▿":"dtri","◂":"ltrif","◃":"ltri","◊":"loz","○":"cir","◬":"tridot","◯":"xcirc","◸":"ultri","◹":"urtri","◺":"lltri","◻":"EmptySmallSquare","◼":"FilledSmallSquare","★":"starf","☆":"star","☎":"phone","♀":"female","♂":"male","♠":"spades","♣":"clubs","♥":"hearts","♦":"diams","♪":"sung","✓":"check","✗":"cross","✠":"malt","✶":"sext","❘":"VerticalSeparator","⟈":"bsolhsub","⟉":"suphsol","⟵":"xlarr","⟶":"xrarr","⟷":"xharr","⟸":"xlArr","⟹":"xrArr","⟺":"xhArr","⟼":"xmap","⟿":"dzigrarr","⤂":"nvlArr","⤃":"nvrArr","⤄":"nvHarr","⤅":"Map","⤌":"lbarr","⤍":"rbarr","⤎":"lBarr","⤏":"rBarr","⤐":"RBarr","⤑":"DDotrahd","⤒":"UpArrowBar","⤓":"DownArrowBar","⤖":"Rarrtl","⤙":"latail","⤚":"ratail","⤛":"lAtail","⤜":"rAtail","⤝":"larrfs","⤞":"rarrfs","⤟":"larrbfs","⤠":"rarrbfs","⤣":"nwarhk","⤤":"nearhk","⤥":"searhk","⤦":"swarhk","⤧":"nwnear","⤨":"toea","⤩":"tosa","⤪":"swnwar","⤳":"rarrc","⤳̸":"nrarrc","⤵":"cudarrr","⤶":"ldca","⤷":"rdca","⤸":"cudarrl","⤹":"larrpl","⤼":"curarrm","⤽":"cularrp","⥅":"rarrpl","⥈":"harrcir","⥉":"Uarrocir","⥊":"lurdshar","⥋":"ldrushar","⥎":"LeftRightVector","⥏":"RightUpDownVector","⥐":"DownLeftRightVector","⥑":"LeftUpDownVector","⥒":"LeftVectorBar","⥓":"RightVectorBar","⥔":"RightUpVectorBar","⥕":"RightDownVectorBar","⥖":"DownLeftVectorBar","⥗":"DownRightVectorBar","⥘":"LeftUpVectorBar","⥙":"LeftDownVectorBar","⥚":"LeftTeeVector","⥛":"RightTeeVector","⥜":"RightUpTeeVector","⥝":"RightDownTeeVector","⥞":"DownLeftTeeVector","⥟":"DownRightTeeVector","⥠":"LeftUpTeeVector","⥡":"LeftDownTeeVector","⥢":"lHar","⥣":"uHar","⥤":"rHar","⥥":"dHar","⥦":"luruhar","⥧":"ldrdhar","⥨":"ruluhar","⥩":"rdldhar","⥪":"lharul","⥫":"llhard","⥬":"rharul","⥭":"lrhard","⥮":"udhar","⥯":"duhar","⥰":"RoundImplies","⥱":"erarr","⥲":"simrarr","⥳":"larrsim","⥴":"rarrsim","⥵":"rarrap","⥶":"ltlarr","⥸":"gtrarr","⥹":"subrarr","⥻":"suplarr","⥼":"lfisht","⥽":"rfisht","⥾":"ufisht","⥿":"dfisht","⦚":"vzigzag","⦜":"vangrt","⦝":"angrtvbd","⦤":"ange","⦥":"range","⦦":"dwangle","⦧":"uwangle","⦨":"angmsdaa","⦩":"angmsdab","⦪":"angmsdac","⦫":"angmsdad","⦬":"angmsdae","⦭":"angmsdaf","⦮":"angmsdag","⦯":"angmsdah","⦰":"bemptyv","⦱":"demptyv","⦲":"cemptyv","⦳":"raemptyv","⦴":"laemptyv","⦵":"ohbar","⦶":"omid","⦷":"opar","⦹":"operp","⦻":"olcross","⦼":"odsold","⦾":"olcir","⦿":"ofcir","⧀":"olt","⧁":"ogt","⧂":"cirscir","⧃":"cirE","⧄":"solb","⧅":"bsolb","⧉":"boxbox","⧍":"trisb","⧎":"rtriltri","⧏":"LeftTriangleBar","⧏̸":"NotLeftTriangleBar","⧐":"RightTriangleBar","⧐̸":"NotRightTriangleBar","⧜":"iinfin","⧝":"infintie","⧞":"nvinfin","⧣":"eparsl","⧤":"smeparsl","⧥":"eqvparsl","⧫":"lozf","⧴":"RuleDelayed","⧶":"dsol","⨀":"xodot","⨁":"xoplus","⨂":"xotime","⨄":"xuplus","⨆":"xsqcup","⨍":"fpartint","⨐":"cirfnint","⨑":"awint","⨒":"rppolint","⨓":"scpolint","⨔":"npolint","⨕":"pointint","⨖":"quatint","⨗":"intlarhk","⨢":"pluscir","⨣":"plusacir","⨤":"simplus","⨥":"plusdu","⨦":"plussim","⨧":"plustwo","⨩":"mcomma","⨪":"minusdu","⨭":"loplus","⨮":"roplus","⨯":"Cross","⨰":"timesd","⨱":"timesbar","⨳":"smashp","⨴":"lotimes","⨵":"rotimes","⨶":"otimesas","⨷":"Otimes","⨸":"odiv","⨹":"triplus","⨺":"triminus","⨻":"tritime","⨼":"iprod","⨿":"amalg","⩀":"capdot","⩂":"ncup","⩃":"ncap","⩄":"capand","⩅":"cupor","⩆":"cupcap","⩇":"capcup","⩈":"cupbrcap","⩉":"capbrcup","⩊":"cupcup","⩋":"capcap","⩌":"ccups","⩍":"ccaps","⩐":"ccupssm","⩓":"And","⩔":"Or","⩕":"andand","⩖":"oror","⩗":"orslope","⩘":"andslope","⩚":"andv","⩛":"orv","⩜":"andd","⩝":"ord","⩟":"wedbar","⩦":"sdote","⩪":"simdot","⩭":"congdot","⩭̸":"ncongdot","⩮":"easter","⩯":"apacir","⩰":"apE","⩰̸":"napE","⩱":"eplus","⩲":"pluse","⩳":"Esim","⩷":"eDDot","⩸":"equivDD","⩹":"ltcir","⩺":"gtcir","⩻":"ltquest","⩼":"gtquest","⩽":"les","⩽̸":"nles","⩾":"ges","⩾̸":"nges","⩿":"lesdot","⪀":"gesdot","⪁":"lesdoto","⪂":"gesdoto","⪃":"lesdotor","⪄":"gesdotol","⪅":"lap","⪆":"gap","⪇":"lne","⪈":"gne","⪉":"lnap","⪊":"gnap","⪋":"lEg","⪌":"gEl","⪍":"lsime","⪎":"gsime","⪏":"lsimg","⪐":"gsiml","⪑":"lgE","⪒":"glE","⪓":"lesges","⪔":"gesles","⪕":"els","⪖":"egs","⪗":"elsdot","⪘":"egsdot","⪙":"el","⪚":"eg","⪝":"siml","⪞":"simg","⪟":"simlE","⪠":"simgE","⪡":"LessLess","⪡̸":"NotNestedLessLess","⪢":"GreaterGreater","⪢̸":"NotNestedGreaterGreater","⪤":"glj","⪥":"gla","⪦":"ltcc","⪧":"gtcc","⪨":"lescc","⪩":"gescc","⪪":"smt","⪫":"lat","⪬":"smte","⪬︀":"smtes","⪭":"late","⪭︀":"lates","⪮":"bumpE","⪯":"pre","⪯̸":"npre","⪰":"sce","⪰̸":"nsce","⪳":"prE","⪴":"scE","⪵":"prnE","⪶":"scnE","⪷":"prap","⪸":"scap","⪹":"prnap","⪺":"scnap","⪻":"Pr","⪼":"Sc","⪽":"subdot","⪾":"supdot","⪿":"subplus","⫀":"supplus","⫁":"submult","⫂":"supmult","⫃":"subedot","⫄":"supedot","⫅":"subE","⫅̸":"nsubE","⫆":"supE","⫆̸":"nsupE","⫇":"subsim","⫈":"supsim","⫋︀":"vsubnE","⫋":"subnE","⫌︀":"vsupnE","⫌":"supnE","⫏":"csub","⫐":"csup","⫑":"csube","⫒":"csupe","⫓":"subsup","⫔":"supsub","⫕":"subsub","⫖":"supsup","⫗":"suphsub","⫘":"supdsub","⫙":"forkv","⫚":"topfork","⫛":"mlcp","⫤":"Dashv","⫦":"Vdashl","⫧":"Barv","⫨":"vBar","⫩":"vBarv","⫫":"Vbar","⫬":"Not","⫭":"bNot","⫮":"rnmid","⫯":"cirmid","⫰":"midcir","⫱":"topcir","⫲":"nhpar","⫳":"parsim","⫽":"parsl","⫽⃥":"nparsl","♭":"flat","♮":"natur","♯":"sharp","¤":"curren","¢":"cent",$:"dollar","£":"pound","¥":"yen","€":"euro","¹":"sup1","½":"half","⅓":"frac13","¼":"frac14","⅕":"frac15","⅙":"frac16","⅛":"frac18","²":"sup2","⅔":"frac23","⅖":"frac25","³":"sup3","¾":"frac34","⅗":"frac35","⅜":"frac38","⅘":"frac45","⅚":"frac56","⅝":"frac58","⅞":"frac78","𝒶":"ascr","𝕒":"aopf","𝔞":"afr","𝔸":"Aopf","𝔄":"Afr","𝒜":"Ascr","ª":"ordf","á":"aacute","Á":"Aacute","à":"agrave","À":"Agrave","ă":"abreve","Ă":"Abreve","â":"acirc","Â":"Acirc","å":"aring","Å":"angst","ä":"auml","Ä":"Auml","ã":"atilde","Ã":"Atilde","ą":"aogon","Ą":"Aogon","ā":"amacr","Ā":"Amacr","æ":"aelig","Æ":"AElig","𝒷":"bscr","𝕓":"bopf","𝔟":"bfr","𝔹":"Bopf","ℬ":"Bscr","𝔅":"Bfr","𝔠":"cfr","𝒸":"cscr","𝕔":"copf","ℭ":"Cfr","𝒞":"Cscr","ℂ":"Copf","ć":"cacute","Ć":"Cacute","ĉ":"ccirc","Ĉ":"Ccirc","č":"ccaron","Č":"Ccaron","ċ":"cdot","Ċ":"Cdot","ç":"ccedil","Ç":"Ccedil","℅":"incare","𝔡":"dfr","ⅆ":"dd","𝕕":"dopf","𝒹":"dscr","𝒟":"Dscr","𝔇":"Dfr","ⅅ":"DD","𝔻":"Dopf","ď":"dcaron","Ď":"Dcaron","đ":"dstrok","Đ":"Dstrok","ð":"eth","Ð":"ETH","ⅇ":"ee","ℯ":"escr","𝔢":"efr","𝕖":"eopf","ℰ":"Escr","𝔈":"Efr","𝔼":"Eopf","é":"eacute","É":"Eacute","è":"egrave","È":"Egrave","ê":"ecirc","Ê":"Ecirc","ě":"ecaron","Ě":"Ecaron","ë":"euml","Ë":"Euml","ė":"edot","Ė":"Edot","ę":"eogon","Ę":"Eogon","ē":"emacr","Ē":"Emacr","𝔣":"ffr","𝕗":"fopf","𝒻":"fscr","𝔉":"Ffr","𝔽":"Fopf","ℱ":"Fscr","ff":"fflig","ffi":"ffilig","ffl":"ffllig","fi":"filig",fj:"fjlig","fl":"fllig","ƒ":"fnof","ℊ":"gscr","𝕘":"gopf","𝔤":"gfr","𝒢":"Gscr","𝔾":"Gopf","𝔊":"Gfr","ǵ":"gacute","ğ":"gbreve","Ğ":"Gbreve","ĝ":"gcirc","Ĝ":"Gcirc","ġ":"gdot","Ġ":"Gdot","Ģ":"Gcedil","𝔥":"hfr","ℎ":"planckh","𝒽":"hscr","𝕙":"hopf","ℋ":"Hscr","ℌ":"Hfr","ℍ":"Hopf","ĥ":"hcirc","Ĥ":"Hcirc","ℏ":"hbar","ħ":"hstrok","Ħ":"Hstrok","𝕚":"iopf","𝔦":"ifr","𝒾":"iscr","ⅈ":"ii","𝕀":"Iopf","ℐ":"Iscr","ℑ":"Im","í":"iacute","Í":"Iacute","ì":"igrave","Ì":"Igrave","î":"icirc","Î":"Icirc","ï":"iuml","Ï":"Iuml","ĩ":"itilde","Ĩ":"Itilde","İ":"Idot","į":"iogon","Į":"Iogon","ī":"imacr","Ī":"Imacr","ij":"ijlig","IJ":"IJlig","ı":"imath","𝒿":"jscr","𝕛":"jopf","𝔧":"jfr","𝒥":"Jscr","𝔍":"Jfr","𝕁":"Jopf","ĵ":"jcirc","Ĵ":"Jcirc","ȷ":"jmath","𝕜":"kopf","𝓀":"kscr","𝔨":"kfr","𝒦":"Kscr","𝕂":"Kopf","𝔎":"Kfr","ķ":"kcedil","Ķ":"Kcedil","𝔩":"lfr","𝓁":"lscr","ℓ":"ell","𝕝":"lopf","ℒ":"Lscr","𝔏":"Lfr","𝕃":"Lopf","ĺ":"lacute","Ĺ":"Lacute","ľ":"lcaron","Ľ":"Lcaron","ļ":"lcedil","Ļ":"Lcedil","ł":"lstrok","Ł":"Lstrok","ŀ":"lmidot","Ŀ":"Lmidot","𝔪":"mfr","𝕞":"mopf","𝓂":"mscr","𝔐":"Mfr","𝕄":"Mopf","ℳ":"Mscr","𝔫":"nfr","𝕟":"nopf","𝓃":"nscr","ℕ":"Nopf","𝒩":"Nscr","𝔑":"Nfr","ń":"nacute","Ń":"Nacute","ň":"ncaron","Ň":"Ncaron","ñ":"ntilde","Ñ":"Ntilde","ņ":"ncedil","Ņ":"Ncedil","№":"numero","ŋ":"eng","Ŋ":"ENG","𝕠":"oopf","𝔬":"ofr","ℴ":"oscr","𝒪":"Oscr","𝔒":"Ofr","𝕆":"Oopf","º":"ordm","ó":"oacute","Ó":"Oacute","ò":"ograve","Ò":"Ograve","ô":"ocirc","Ô":"Ocirc","ö":"ouml","Ö":"Ouml","ő":"odblac","Ő":"Odblac","õ":"otilde","Õ":"Otilde","ø":"oslash","Ø":"Oslash","ō":"omacr","Ō":"Omacr","œ":"oelig","Œ":"OElig","𝔭":"pfr","𝓅":"pscr","𝕡":"popf","ℙ":"Popf","𝔓":"Pfr","𝒫":"Pscr","𝕢":"qopf","𝔮":"qfr","𝓆":"qscr","𝒬":"Qscr","𝔔":"Qfr","ℚ":"Qopf","ĸ":"kgreen","𝔯":"rfr","𝕣":"ropf","𝓇":"rscr","ℛ":"Rscr","ℜ":"Re","ℝ":"Ropf","ŕ":"racute","Ŕ":"Racute","ř":"rcaron","Ř":"Rcaron","ŗ":"rcedil","Ŗ":"Rcedil","𝕤":"sopf","𝓈":"sscr","𝔰":"sfr","𝕊":"Sopf","𝔖":"Sfr","𝒮":"Sscr","Ⓢ":"oS","ś":"sacute","Ś":"Sacute","ŝ":"scirc","Ŝ":"Scirc","š":"scaron","Š":"Scaron","ş":"scedil","Ş":"Scedil","ß":"szlig","𝔱":"tfr","𝓉":"tscr","𝕥":"topf","𝒯":"Tscr","𝔗":"Tfr","𝕋":"Topf","ť":"tcaron","Ť":"Tcaron","ţ":"tcedil","Ţ":"Tcedil","™":"trade","ŧ":"tstrok","Ŧ":"Tstrok","𝓊":"uscr","𝕦":"uopf","𝔲":"ufr","𝕌":"Uopf","𝔘":"Ufr","𝒰":"Uscr","ú":"uacute","Ú":"Uacute","ù":"ugrave","Ù":"Ugrave","ŭ":"ubreve","Ŭ":"Ubreve","û":"ucirc","Û":"Ucirc","ů":"uring","Ů":"Uring","ü":"uuml","Ü":"Uuml","ű":"udblac","Ű":"Udblac","ũ":"utilde","Ũ":"Utilde","ų":"uogon","Ų":"Uogon","ū":"umacr","Ū":"Umacr","𝔳":"vfr","𝕧":"vopf","𝓋":"vscr","𝔙":"Vfr","𝕍":"Vopf","𝒱":"Vscr","𝕨":"wopf","𝓌":"wscr","𝔴":"wfr","𝒲":"Wscr","𝕎":"Wopf","𝔚":"Wfr","ŵ":"wcirc","Ŵ":"Wcirc","𝔵":"xfr","𝓍":"xscr","𝕩":"xopf","𝕏":"Xopf","𝔛":"Xfr","𝒳":"Xscr","𝔶":"yfr","𝓎":"yscr","𝕪":"yopf","𝒴":"Yscr","𝔜":"Yfr","𝕐":"Yopf","ý":"yacute","Ý":"Yacute","ŷ":"ycirc","Ŷ":"Ycirc","ÿ":"yuml","Ÿ":"Yuml","𝓏":"zscr","𝔷":"zfr","𝕫":"zopf","ℨ":"Zfr","ℤ":"Zopf","𝒵":"Zscr","ź":"zacute","Ź":"Zacute","ž":"zcaron","Ž":"Zcaron","ż":"zdot","Ż":"Zdot","Ƶ":"imped","þ":"thorn","Þ":"THORN","ʼn":"napos","α":"alpha","Α":"Alpha","β":"beta","Β":"Beta","γ":"gamma","Γ":"Gamma","δ":"delta","Δ":"Delta","ε":"epsi","ϵ":"epsiv","Ε":"Epsilon","ϝ":"gammad","Ϝ":"Gammad","ζ":"zeta","Ζ":"Zeta","η":"eta","Η":"Eta","θ":"theta","ϑ":"thetav","Θ":"Theta","ι":"iota","Ι":"Iota","κ":"kappa","ϰ":"kappav","Κ":"Kappa","λ":"lambda","Λ":"Lambda","μ":"mu","µ":"micro","Μ":"Mu","ν":"nu","Ν":"Nu","ξ":"xi","Ξ":"Xi","ο":"omicron","Ο":"Omicron","π":"pi","ϖ":"piv","Π":"Pi","ρ":"rho","ϱ":"rhov","Ρ":"Rho","σ":"sigma","Σ":"Sigma","ς":"sigmaf","τ":"tau","Τ":"Tau","υ":"upsi","Υ":"Upsilon","ϒ":"Upsi","φ":"phi","ϕ":"phiv","Φ":"Phi","χ":"chi","Χ":"Chi","ψ":"psi","Ψ":"Psi","ω":"omega","Ω":"ohm","а":"acy","А":"Acy","б":"bcy","Б":"Bcy","в":"vcy","В":"Vcy","г":"gcy","Г":"Gcy","ѓ":"gjcy","Ѓ":"GJcy","д":"dcy","Д":"Dcy","ђ":"djcy","Ђ":"DJcy","е":"iecy","Е":"IEcy","ё":"iocy","Ё":"IOcy","є":"jukcy","Є":"Jukcy","ж":"zhcy","Ж":"ZHcy","з":"zcy","З":"Zcy","ѕ":"dscy","Ѕ":"DScy","и":"icy","И":"Icy","і":"iukcy","І":"Iukcy","ї":"yicy","Ї":"YIcy","й":"jcy","Й":"Jcy","ј":"jsercy","Ј":"Jsercy","к":"kcy","К":"Kcy","ќ":"kjcy","Ќ":"KJcy","л":"lcy","Л":"Lcy","љ":"ljcy","Љ":"LJcy","м":"mcy","М":"Mcy","н":"ncy","Н":"Ncy","њ":"njcy","Њ":"NJcy","о":"ocy","О":"Ocy","п":"pcy","П":"Pcy","р":"rcy","Р":"Rcy","с":"scy","С":"Scy","т":"tcy","Т":"Tcy","ћ":"tshcy","Ћ":"TSHcy","у":"ucy","У":"Ucy","ў":"ubrcy","Ў":"Ubrcy","ф":"fcy","Ф":"Fcy","х":"khcy","Х":"KHcy","ц":"tscy","Ц":"TScy","ч":"chcy","Ч":"CHcy","џ":"dzcy","Џ":"DZcy","ш":"shcy","Ш":"SHcy","щ":"shchcy","Щ":"SHCHcy","ъ":"hardcy","Ъ":"HARDcy","ы":"ycy","Ы":"Ycy","ь":"softcy","Ь":"SOFTcy","э":"ecy","Э":"Ecy","ю":"yucy","Ю":"YUcy","я":"yacy","Я":"YAcy","ℵ":"aleph","ℶ":"beth","ℷ":"gimel","ℸ":"daleth"},h=/["&'<>`]/g,r={'"':""","&":"&","'":"'","<":"<",">":">","`":"`"},a=/&#(?:[xX][^a-fA-F0-9]|[^0-9xX])/,f=/[\0-\x08\x0B\x0E-\x1F\x7F-\x9F\uFDD0-\uFDEF\uFFFE\uFFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDFFE\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,i=/&#([0-9]+)(;?)|&#[xX]([a-fA-F0-9]+)(;?)|&([0-9a-zA-Z]+);|&(Aacute|Agrave|Atilde|Ccedil|Eacute|Egrave|Iacute|Igrave|Ntilde|Oacute|Ograve|Oslash|Otilde|Uacute|Ugrave|Yacute|aacute|agrave|atilde|brvbar|ccedil|curren|divide|eacute|egrave|frac12|frac14|frac34|iacute|igrave|iquest|middot|ntilde|oacute|ograve|oslash|otilde|plusmn|uacute|ugrave|yacute|AElig|Acirc|Aring|Ecirc|Icirc|Ocirc|THORN|Ucirc|acirc|acute|aelig|aring|cedil|ecirc|icirc|iexcl|laquo|micro|ocirc|pound|raquo|szlig|thorn|times|ucirc|Auml|COPY|Euml|Iuml|Ouml|QUOT|Uuml|auml|cent|copy|euml|iuml|macr|nbsp|ordf|ordm|ouml|para|quot|sect|sup1|sup2|sup3|uuml|yuml|AMP|ETH|REG|amp|deg|eth|not|reg|shy|uml|yen|GT|LT|gt|lt)([=a-zA-Z0-9])?/g,m={aacute:"á",Aacute:"Á",abreve:"ă",Abreve:"Ă",ac:"∾",acd:"∿",acE:"∾̳",acirc:"â",Acirc:"Â",acute:"´",acy:"а",Acy:"А",aelig:"æ",AElig:"Æ",af:"⁡",afr:"𝔞",Afr:"𝔄",agrave:"à",Agrave:"À",alefsym:"ℵ",aleph:"ℵ",alpha:"α",Alpha:"Α",amacr:"ā",Amacr:"Ā",amalg:"⨿",amp:"&",AMP:"&",and:"∧",And:"⩓",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",Aogon:"Ą",aopf:"𝕒",Aopf:"𝔸",ap:"≈",apacir:"⩯",ape:"≊",apE:"⩰",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",aring:"å",Aring:"Å",ascr:"𝒶",Ascr:"𝒜",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",atilde:"ã",Atilde:"Ã",auml:"ä",Auml:"Ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",Bcy:"Б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",beta:"β",Beta:"Β",beth:"ℶ",between:"≬",bfr:"𝔟",Bfr:"𝔅",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bNot:"⫭",bopf:"𝕓",Bopf:"𝔹",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxhD:"╥",boxHd:"╤",boxHD:"╦",boxhu:"┴",boxhU:"╨",boxHu:"╧",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpe:"≏",bumpE:"⪮",bumpeq:"≏",Bumpeq:"≎",cacute:"ć",Cacute:"Ć",cap:"∩",Cap:"⋒",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",ccaron:"č",Ccaron:"Č",ccedil:"ç",Ccedil:"Ç",ccirc:"ĉ",Ccirc:"Ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",Cdot:"Ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",chcy:"ч",CHcy:"Ч",check:"✓",checkmark:"✓",chi:"χ",Chi:"Χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cire:"≗",cirE:"⧃",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",colone:"≔",Colone:"⩴",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",cscr:"𝒸",Cscr:"𝒞",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",Cup:"⋓",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",dArr:"⇓",Darr:"↡",dash:"‐",dashv:"⊣",Dashv:"⫤",dbkarow:"⤏",dblac:"˝",dcaron:"ď",Dcaron:"Ď",dcy:"д",Dcy:"Д",dd:"ⅆ",DD:"ⅅ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",delta:"δ",Delta:"Δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",Dfr:"𝔇",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",DJcy:"Ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",Dopf:"𝔻",dot:"˙",Dot:"¨",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",downarrow:"↓",Downarrow:"⇓",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",Dscr:"𝒟",dscy:"ѕ",DScy:"Ѕ",dsol:"⧶",dstrok:"đ",Dstrok:"Đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",DZcy:"Џ",dzigrarr:"⟿",eacute:"é",Eacute:"É",easter:"⩮",ecaron:"ě",Ecaron:"Ě",ecir:"≖",ecirc:"ê",Ecirc:"Ê",ecolon:"≕",ecy:"э",Ecy:"Э",eDDot:"⩷",edot:"ė",eDot:"≑",Edot:"Ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",Efr:"𝔈",eg:"⪚",egrave:"è",Egrave:"È",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",Emacr:"Ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",eng:"ŋ",ENG:"Ŋ",ensp:" ",eogon:"ę",Eogon:"Ę",eopf:"𝕖",Eopf:"𝔼",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",Epsilon:"Ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",esim:"≂",Esim:"⩳",eta:"η",Eta:"Η",eth:"ð",ETH:"Ð",euml:"ë",Euml:"Ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",fcy:"ф",Fcy:"Ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",Ffr:"𝔉",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",Fopf:"𝔽",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",gamma:"γ",Gamma:"Γ",gammad:"ϝ",Gammad:"Ϝ",gap:"⪆",gbreve:"ğ",Gbreve:"Ğ",Gcedil:"Ģ",gcirc:"ĝ",Gcirc:"Ĝ",gcy:"г",Gcy:"Г",gdot:"ġ",Gdot:"Ġ",ge:"≥",gE:"≧",gel:"⋛",gEl:"⪌",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",Gfr:"𝔊",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",GJcy:"Ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",Gopf:"𝔾",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",gscr:"ℊ",Gscr:"𝒢",gsim:"≳",gsime:"⪎",gsiml:"⪐",gt:">",Gt:"≫",GT:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",HARDcy:"Ъ",harr:"↔",hArr:"⇔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",hcirc:"ĥ",Hcirc:"Ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",hstrok:"ħ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",iacute:"í",Iacute:"Í",ic:"⁣",icirc:"î",Icirc:"Î",icy:"и",Icy:"И",Idot:"İ",iecy:"е",IEcy:"Е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",igrave:"ì",Igrave:"Ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",IJlig:"IJ",Im:"ℑ",imacr:"ī",Imacr:"Ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",Int:"∬",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",iocy:"ё",IOcy:"Ё",iogon:"į",Iogon:"Į",iopf:"𝕚",Iopf:"𝕀",iota:"ι",Iota:"Ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",itilde:"ĩ",Itilde:"Ĩ",iukcy:"і",Iukcy:"І",iuml:"ï",Iuml:"Ï",jcirc:"ĵ",Jcirc:"Ĵ",jcy:"й",Jcy:"Й",jfr:"𝔧",Jfr:"𝔍",jmath:"ȷ",jopf:"𝕛",Jopf:"𝕁",jscr:"𝒿",Jscr:"𝒥",jsercy:"ј",Jsercy:"Ј",jukcy:"є",Jukcy:"Є",kappa:"κ",Kappa:"Κ",kappav:"ϰ",kcedil:"ķ",Kcedil:"Ķ",kcy:"к",Kcy:"К",kfr:"𝔨",Kfr:"𝔎",kgreen:"ĸ",khcy:"х",KHcy:"Х",kjcy:"ќ",KJcy:"Ќ",kopf:"𝕜",Kopf:"𝕂",kscr:"𝓀",Kscr:"𝒦",lAarr:"⇚",lacute:"ĺ",Lacute:"Ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",Lambda:"Λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larr:"←",lArr:"⇐",Larr:"↞",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",lAtail:"⤛",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",Lcaron:"Ľ",lcedil:"ļ",Lcedil:"Ļ",lceil:"⌈",lcub:"{",lcy:"л",Lcy:"Л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",leftarrow:"←",Leftarrow:"⇐",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",Leftrightarrow:"⇔",LeftRightArrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",leg:"⋚",lEg:"⪋",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",Lfr:"𝔏",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",LJcy:"Љ",ll:"≪",Ll:"⋘",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",lmidot:"ŀ",Lmidot:"Ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",Longleftarrow:"⟸",LongLeftArrow:"⟵",longleftrightarrow:"⟷",Longleftrightarrow:"⟺",LongLeftRightArrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",Longrightarrow:"⟹",LongRightArrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",Lopf:"𝕃",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",Lstrok:"Ł",lt:"<",Lt:"≪",LT:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",Map:"⤅",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",Mcy:"М",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",mfr:"𝔪",Mfr:"𝔐",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",Mopf:"𝕄",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",mu:"μ",Mu:"Μ",multimap:"⊸",mumap:"⊸",nabla:"∇",nacute:"ń",Nacute:"Ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",Ncaron:"Ň",ncedil:"ņ",Ncedil:"Ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",Ncy:"Н",ndash:"–",ne:"≠",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",nfr:"𝔫",Nfr:"𝔑",nge:"≱",ngE:"≧̸",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",ngt:"≯",nGt:"≫⃒",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",NJcy:"Њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nle:"≰",nlE:"≦̸",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nlt:"≮",nLt:"≪⃒",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",not:"¬",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrarr:"↛",nrArr:"⇏",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",Nscr:"𝒩",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsube:"⊈",nsubE:"⫅̸",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupe:"⊉",nsupE:"⫆̸",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntilde:"ñ",Ntilde:"Ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",Nu:"Ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",oacute:"ó",Oacute:"Ó",oast:"⊛",ocir:"⊚",ocirc:"ô",Ocirc:"Ô",ocy:"о",Ocy:"О",odash:"⊝",odblac:"ő",Odblac:"Ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",OElig:"Œ",ofcir:"⦿",ofr:"𝔬",Ofr:"𝔒",ogon:"˛",ograve:"ò",Ograve:"Ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",Omacr:"Ō",omega:"ω",Omega:"Ω",omicron:"ο",Omicron:"Ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",Oopf:"𝕆",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",or:"∨",Or:"⩔",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",oscr:"ℴ",Oscr:"𝒪",oslash:"ø",Oslash:"Ø",osol:"⊘",otilde:"õ",Otilde:"Õ",otimes:"⊗",Otimes:"⨷",otimesas:"⨶",ouml:"ö",Ouml:"Ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",pcy:"п",Pcy:"П",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",Pfr:"𝔓",phi:"φ",Phi:"Φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",Pi:"Π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",pr:"≺",Pr:"⪻",prap:"⪷",prcue:"≼",pre:"⪯",prE:"⪳",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",Pscr:"𝒫",psi:"ψ",Psi:"Ψ",puncsp:" ",qfr:"𝔮",Qfr:"𝔔",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",qscr:"𝓆",Qscr:"𝒬",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",racute:"ŕ",Racute:"Ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarr:"→",rArr:"⇒",Rarr:"↠",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",Rarrtl:"⤖",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",Rcaron:"Ř",rcedil:"ŗ",Rcedil:"Ŗ",rceil:"⌉",rcub:"}",rcy:"р",Rcy:"Р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",Rho:"Ρ",rhov:"ϱ",RightAngleBracket:"⟩",rightarrow:"→",Rightarrow:"⇒",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",sacute:"ś",Sacute:"Ś",sbquo:"‚",sc:"≻",Sc:"⪼",scap:"⪸",scaron:"š",Scaron:"Š",sccue:"≽",sce:"⪰",scE:"⪴",scedil:"ş",Scedil:"Ş",scirc:"ŝ",Scirc:"Ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",Scy:"С",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",Sfr:"𝔖",sfrown:"⌢",sharp:"♯",shchcy:"щ",SHCHcy:"Щ",shcy:"ш",SHcy:"Ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",sigma:"σ",Sigma:"Σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",SOFTcy:"Ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",Sopf:"𝕊",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",Sscr:"𝒮",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",Star:"⋆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",sube:"⊆",subE:"⫅",subedot:"⫃",submult:"⫁",subne:"⊊",subnE:"⫋",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup:"⊃",Sup:"⋑",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supe:"⊇",supE:"⫆",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supne:"⊋",supnE:"⫌",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",tau:"τ",Tau:"Τ",tbrk:"⎴",tcaron:"ť",Tcaron:"Ť",tcedil:"ţ",Tcedil:"Ţ",tcy:"т",Tcy:"Т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",Tfr:"𝔗",there4:"∴",therefore:"∴",Therefore:"∴",theta:"θ",Theta:"Θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",thorn:"þ",THORN:"Þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",Topf:"𝕋",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",Tscr:"𝒯",tscy:"ц",TScy:"Ц",tshcy:"ћ",TSHcy:"Ћ",tstrok:"ŧ",Tstrok:"Ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uacute:"ú",Uacute:"Ú",uarr:"↑",uArr:"⇑",Uarr:"↟",Uarrocir:"⥉",ubrcy:"ў",Ubrcy:"Ў",ubreve:"ŭ",Ubreve:"Ŭ",ucirc:"û",Ucirc:"Û",ucy:"у",Ucy:"У",udarr:"⇅",udblac:"ű",Udblac:"Ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",Ufr:"𝔘",ugrave:"ù",Ugrave:"Ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",Umacr:"Ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",uogon:"ų",Uogon:"Ų",uopf:"𝕦",Uopf:"𝕌",uparrow:"↑",Uparrow:"⇑",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",updownarrow:"↕",Updownarrow:"⇕",UpDownArrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",upsilon:"υ",Upsilon:"Υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",Uring:"Ů",urtri:"◹",uscr:"𝓊",Uscr:"𝒰",utdot:"⋰",utilde:"ũ",Utilde:"Ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uuml:"ü",Uuml:"Ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",vcy:"в",Vcy:"В",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",vee:"∨",Vee:"⋁",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",vfr:"𝔳",Vfr:"𝔙",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",Vopf:"𝕍",vprop:"∝",vrtri:"⊳",vscr:"𝓋",Vscr:"𝒱",vsubne:"⊊︀",vsubnE:"⫋︀",vsupne:"⊋︀",vsupnE:"⫌︀",Vvdash:"⊪",vzigzag:"⦚",wcirc:"ŵ",Wcirc:"Ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",wfr:"𝔴",Wfr:"𝔚",wopf:"𝕨",Wopf:"𝕎",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",Wscr:"𝒲",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",Xfr:"𝔛",xharr:"⟷",xhArr:"⟺",xi:"ξ",Xi:"Ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",Xopf:"𝕏",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",xscr:"𝓍",Xscr:"𝒳",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacute:"ý",Yacute:"Ý",yacy:"я",YAcy:"Я",ycirc:"ŷ",Ycirc:"Ŷ",ycy:"ы",Ycy:"Ы",yen:"¥",yfr:"𝔶",Yfr:"𝔜",yicy:"ї",YIcy:"Ї",yopf:"𝕪",Yopf:"𝕐",yscr:"𝓎",Yscr:"𝒴",yucy:"ю",YUcy:"Ю",yuml:"ÿ",Yuml:"Ÿ",zacute:"ź",Zacute:"Ź",zcaron:"ž",Zcaron:"Ž",zcy:"з",Zcy:"З",zdot:"ż",Zdot:"Ż",zeetrf:"ℨ",ZeroWidthSpace:"​",zeta:"ζ",Zeta:"Ζ",zfr:"𝔷",Zfr:"ℨ",zhcy:"ж",ZHcy:"Ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",zscr:"𝓏",Zscr:"𝒵",zwj:"‍",zwnj:"‌"},y={aacute:"á",Aacute:"Á",acirc:"â",Acirc:"Â",acute:"´",aelig:"æ",AElig:"Æ",agrave:"à",Agrave:"À",amp:"&",AMP:"&",aring:"å",Aring:"Å",atilde:"ã",Atilde:"Ã",auml:"ä",Auml:"Ä",brvbar:"¦",ccedil:"ç",Ccedil:"Ç",cedil:"¸",cent:"¢",copy:"©",COPY:"©",curren:"¤",deg:"°",divide:"÷",eacute:"é",Eacute:"É",ecirc:"ê",Ecirc:"Ê",egrave:"è",Egrave:"È",eth:"ð",ETH:"Ð",euml:"ë",Euml:"Ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",GT:">",iacute:"í",Iacute:"Í",icirc:"î",Icirc:"Î",iexcl:"¡",igrave:"ì",Igrave:"Ì",iquest:"¿",iuml:"ï",Iuml:"Ï",laquo:"«",lt:"<",LT:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",ntilde:"ñ",Ntilde:"Ñ",oacute:"ó",Oacute:"Ó",ocirc:"ô",Ocirc:"Ô",ograve:"ò",Ograve:"Ò",ordf:"ª",ordm:"º",oslash:"ø",Oslash:"Ø",otilde:"õ",Otilde:"Õ",ouml:"ö",Ouml:"Ö",para:"¶",plusmn:"±",pound:"£",quot:'"',QUOT:'"',raquo:"»",reg:"®",REG:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",thorn:"þ",THORN:"Þ",times:"×",uacute:"ú",Uacute:"Ú",ucirc:"û",Ucirc:"Û",ugrave:"ù",Ugrave:"Ù",uml:"¨",uuml:"ü",Uuml:"Ü",yacute:"ý",Yacute:"Ý",yen:"¥",yuml:"ÿ"},s={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"},_=[1,2,3,4,5,6,7,8,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,64976,64977,64978,64979,64980,64981,64982,64983,64984,64985,64986,64987,64988,64989,64990,64991,64992,64993,64994,64995,64996,64997,64998,64999,65e3,65001,65002,65003,65004,65005,65006,65007,65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111],p=String.fromCharCode,g={}.hasOwnProperty,v=function(t,e){return g.call(t,e)},M=function(t,e){if(!t)return e;var n,r={};for(n in e)r[n]=v(t,n)?t[n]:e[n];return r},k=function(t,e){var n="";return 55296<=t&&t<=57343||1114111>>10&1023|55296),t=56320|1023&t),n+=p(t))},b=function(t){return"&#x"+t.toString(16).toUpperCase()+";"},L=function(t){return"&#"+t+";"},w=function(t){throw Error("Parse error: "+t)},x=function(t,e){(e=M(e,x.options)).strict&&f.test(t)&&w("forbidden code point");var n=e.encodeEverything,r=e.useNamedReferences,a=e.allowUnsafeSymbols,i=e.decimal?L:b,s=function(t){return i(t.charCodeAt(0))};return n?(t=t.replace(u,function(t){return r&&v(d,t)?"&"+d[t]+";":s(t)}),r&&(t=t.replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒").replace(/fj/g,"fj")),r&&(t=t.replace(c,function(t){return"&"+d[t]+";"}))):r?(a||(t=t.replace(h,function(t){return"&"+d[t]+";"})),t=(t=t.replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒")).replace(c,function(t){return"&"+d[t]+";"})):a||(t=t.replace(h,s)),t.replace(o,function(t){var e=t.charCodeAt(0),n=t.charCodeAt(1);return i(1024*(e-55296)+n-56320+65536)}).replace(l,s)};x.options={allowUnsafeSymbols:!1,encodeEverything:!1,strict:!1,useNamedReferences:!1,decimal:!1};var D=function(t,_){var p=(_=M(_,D.options)).strict;return p&&a.test(t)&&w("malformed character reference"),t.replace(i,function(t,e,n,r,a,i,s,o){var u,l,c,d,h,f;return e?(c=e,l=n,p&&!l&&w("character reference was not terminated by a semicolon"),u=parseInt(c,10),k(u,p)):r?(d=r,l=a,p&&!l&&w("character reference was not terminated by a semicolon"),u=parseInt(d,16),k(u,p)):i?v(m,h=i)?m[h]:(p&&w("named character reference was not terminated by a semicolon"),t):(h=s,(f=o)&&_.isAttributeValue?(p&&"="==f&&w("`&` did not start a character reference"),t):(p&&w("named character reference was not terminated by a semicolon"),y[h]+(f||"")))})};D.options={isAttributeValue:!1,strict:!1};var Y={version:"1.1.1",encode:x,decode:D,escape:function(t){return t.replace(h,function(t){return r[t]})},unescape:D};void 0===(S=function(){return Y}.call(E,j,E,T))||(T.exports=S)}()}).call(E,j(3)(t),j(18))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decodeEntities=e.encodeEntities=e.version=void 0;var i="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},h=n(1),f=E(n(157)),_=E(n(158)),p=E(n(208)),m=E(n(222)),y=E(n(224)),r=E(n(171)),a=E(n(160)),s=E(n(161)),o=E(n(168)),u=E(n(169)),l=E(n(170)),g=E(n(225)),c=E(n(172)),d=E(n(173)),v=E(n(174)),M=E(n(226)),k=E(n(175)),b=E(n(176)),L=E(n(227)),w=E(n(201)),x=E(n(6)),D=E(n(203)),Y=E(n(346)),T=E(n(348)),A=E(n(350)),S=E(n(352));function E(t){return t&&t.__esModule?t:{default:t}}var j={dark:Y.default,default:T.default,forest:A.default,neutral:S.default},C={theme:T.default,logLevel:5,startOnLoad:!0,arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!0,useMaxWidth:!0},sequenceDiagram:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:3,axisFormatter:[["%I:%M",function(t){return t.getHours()}],["w. %U",function(t){return 1===t.getDay()}],["%a %d",function(t){return t.getDay()&&1!==t.getDate()}],["%b %d",function(t){return 1!==t.getDate()}],["%m-%y",function(t){return t.getMonth()}]]},classDiagram:{},gitGraph:{},info:{}};(0,h.setLogLevel)(C.logLevel);var F=e.version=function(){return D.default.version},O=e.encodeEntities=function(t){var e=t;return e=(e=(e=e.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+"¶ß"})},H=e.decodeEntities=function(t){var e=t;return e=(e=(e=e.replace(/fl°°/g,function(){return"&#"})).replace(/fl°/g,function(){return"&"})).replace(/¶ß/g,function(){return";"})},P=function(t,e,n,r){if(void 0!==r)r.innerHTML="",x.default.select(r).append("div").attr("id","d"+t).append("svg").attr("id",t).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg").append("g");else{var a=document.querySelector("#d"+t);a&&(a.innerHTML=""),x.default.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=e,e=O(e);var i=x.default.select("#d"+t).node();switch(_.default.detectType(e)){case"gitGraph":C.flowchart.arrowMarkerAbsolute=C.arrowMarkerAbsolute,L.default.setConf(C.gitGraph),L.default.draw(e,t,!1);break;case"graph":C.flowchart.arrowMarkerAbsolute=C.arrowMarkerAbsolute,p.default.setConf(C.flowchart),p.default.draw(e,t,!1);break;case"dotGraph":C.flowchart.arrowMarkerAbsolute=C.arrowMarkerAbsolute,p.default.setConf(C.flowchart),p.default.draw(e,t,!0);break;case"sequenceDiagram":C.sequenceDiagram.arrowMarkerAbsolute=C.arrowMarkerAbsolute,m.default.setConf(C.sequenceDiagram),m.default.draw(e,t);break;case"gantt":C.gantt.arrowMarkerAbsolute=C.arrowMarkerAbsolute,g.default.setConf(C.gantt),g.default.draw(e,t);break;case"classDiagram":C.classDiagram.arrowMarkerAbsolute=C.arrowMarkerAbsolute,M.default.setConf(C.classDiagram),M.default.draw(e,t);break;case"info":C.info.arrowMarkerAbsolute=C.arrowMarkerAbsolute,y.default.draw(e,t,F())}var s=i.firstChild,o=document.createElement("style"),u=window.getComputedStyle(s);o.innerHTML="\n "+(j[C.theme]||T.default)+"\nsvg {\n color: "+u.color+";\n font: "+u.font+";\n}\n ",s.insertBefore(o,s.firstChild),x.default.select("#d"+t).selectAll("foreignobject div").attr("xmlns","http://www.w3.org/1999/xhtml");var l="";C.arrowMarkerAbsolute&&(l=(l=(l=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)"));var c=x.default.select("#d"+t).node().innerHTML.replace(/url\(#arrowhead/g,"url("+l+"#arrowhead","g");c=H(c),void 0!==n?n(c,f.default.bindFunctions):h.logger.warn("CB = undefined!");var d=x.default.select("#d"+t).node();return null!==d&&"function"==typeof d.remove&&x.default.select("#d"+t).node().remove(),c};var B=function(t){for(var e=Object.keys(t),n=0;n'});else{for(var s=document.createElementNS("http://www.w3.org/2000/svg","text"),o=n.split(/
/),u=0;u'+t.text+""):(e.labelType="text",e.style="stroke: #333; stroke-width: 1.5px;fill:none",e.label=t.text.replace(/
/g,"\n"))):e.label=t.text.replace(/
/g,"\n")),a.setEdge(t.start,t.end,e,i)})},i=e.getClasses=function(t,e){var n=void 0;Y.default.clear(),(n=e?A.default.parser:T.default.parser).yy=Y.default,n.parse(t);var r=Y.default.getClasses();return void 0===r.default&&(r.default={id:"default"},r.default.styles=[],r.default.clusterStyles=["rx:4px","fill: rgb(255, 255, 222)","rx: 4px","stroke: rgb(170, 170, 51)","stroke-width: 1px"],r.default.nodeLabelStyles=["fill:#000","stroke:none","font-weight:300",'font-family:"Helvetica Neue",Helvetica,Arial,sans-serf',"font-size:14px"],r.default.edgeLabelStyles=["fill:#000","stroke:none","font-weight:300",'font-family:"Helvetica Neue",Helvetica,Arial,sans-serf',"font-size:14px"]),r},s=e.draw=function(t,e,n){j.logger.debug("Drawing flowchart");var r=void 0;Y.default.clear(),(r=n?A.default.parser:T.default.parser).yy=Y.default;try{r.parse(t)}catch(t){j.logger.debug("Parsing failed")}var a=Y.default.getDirection();void 0===a&&(a="TD");for(var i=new E.default.graphlib.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:a,marginx:20,marginy:20}).setDefaultEdgeLabel(function(){return{}}),s=void 0,o=Y.default.getSubGraphs(),u=o.length-1;0<=u;u--)s=o[u],Y.default.addVertex(s.id,s.title,"group",void 0);var l=Y.default.getVertices(),c=Y.default.getEdges(),d=0;for(d=o.length-1;0<=d;d--){s=o[d],S.default.selectAll("cluster").append("text");for(var h=0;hMath.abs(a)*o?(i<0&&(o=-o),u=0===i?0:o*a/i,l=o):(a<0&&(s=-s),u=s,l=0===a?0:s*i/a),{x:n+u,y:r+l}}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var a=r(n(1)),i=r(n(11)),s=r(n(5)),o=r(n(12)),u=r(n(14)),l=r(n(0)),c=n(27);e.default={d3:a.default,graphlib:i.default,dagre:s.default,intersect:o.default,render:u.default,util:l.default,version:c.version}},function(t,e){t.exports=n(29)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var a=r(n(6)),i=r(n(7)),s=r(n(3)),o=r(n(8)),u=r(n(9));e.default={node:a.default,circle:i.default,ellipse:s.default,polygon:o.default,rect:u.default}},function(t,e,n){"use strict";function y(t,e){return 0g.width?(l.remove(),s=t.append("g"),c=(l=m.default.drawText(s,u,2*i.width-g.noteMargin))[0][0].getBBox().height,o.attr("width",2*i.width),v.insert(e,n,e+2*i.width,n+2*g.noteMargin+c)):v.insert(e,n,e+i.width,n+2*g.noteMargin+c),o.attr("height",c+2*g.noteMargin),v.bumpVerticalPos(c+2*g.noteMargin)},k=e.drawActors=function(t,e,n,r){for(var a=0;an&&(r.starty=n-6,n+=12),m.default.drawActivation(d,r,n,g),v.insert(r.startx,n-10,r.stopx,n);break;case y.parser.yy.LINETYPE.LOOP_START:v.bumpVerticalPos(g.boxMargin),v.newLoop(t.message),v.bumpVerticalPos(g.boxMargin+g.boxTextMargin);break;case y.parser.yy.LINETYPE.LOOP_END:a=v.endLoop(),m.default.drawLoop(d,a,"loop",g),v.bumpVerticalPos(g.boxMargin);break;case y.parser.yy.LINETYPE.OPT_START:v.bumpVerticalPos(g.boxMargin),v.newLoop(t.message),v.bumpVerticalPos(g.boxMargin+g.boxTextMargin);break;case y.parser.yy.LINETYPE.OPT_END:a=v.endLoop(),m.default.drawLoop(d,a,"opt",g),v.bumpVerticalPos(g.boxMargin);break;case y.parser.yy.LINETYPE.ALT_START:v.bumpVerticalPos(g.boxMargin),v.newLoop(t.message),v.bumpVerticalPos(g.boxMargin+g.boxTextMargin);break;case y.parser.yy.LINETYPE.ALT_ELSE:v.bumpVerticalPos(g.boxMargin),a=v.addSectionToLoop(t.message),v.bumpVerticalPos(g.boxMargin);break;case y.parser.yy.LINETYPE.ALT_END:a=v.endLoop(),m.default.drawLoop(d,a,"alt",g),v.bumpVerticalPos(g.boxMargin);break;case y.parser.yy.LINETYPE.PAR_START:v.bumpVerticalPos(g.boxMargin),v.newLoop(t.message),v.bumpVerticalPos(g.boxMargin+g.boxTextMargin);break;case y.parser.yy.LINETYPE.PAR_AND:v.bumpVerticalPos(g.boxMargin),a=v.addSectionToLoop(t.message),v.bumpVerticalPos(g.boxMargin);break;case y.parser.yy.LINETYPE.PAR_END:a=v.endLoop(),m.default.drawLoop(d,a,"par",g),v.bumpVerticalPos(g.boxMargin);break;default:try{v.bumpVerticalPos(g.messageMargin);var i=b(t.from),s=b(t.to),o=i[0]<=s[0]?1:0,u=i[0]/gi," "),a=t.append("text");a.attr("x",e.x),a.attr("y",e.y),a.style("text-anchor",e.anchor),a.attr("fill",e.fill),void 0!==e.class&&a.attr("class",e.class);var i=a.append("tspan");return i.attr("x",e.x+2*e.textMargin),i.attr("fill",e.fill),i.text(r),void 0!==a.textwrap&&a.textwrap({x:e.x,y:e.y,width:n,height:1800},e.textMargin),a},o=e.drawLabel=function(t,e){var n,r,a,i,s,o=t.append("polygon");o.attr("points",(n=e.x,r=e.y,n+","+r+" "+(n+(a=50))+","+r+" "+(n+a)+","+(r+(i=20)-(s=7))+" "+(n+a-1.2*s)+","+(r+i)+" "+n+","+(r+i))),o.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,l(t,e)},c=-1,r=e.drawActor=function(t,e,n,r,a){var i=e+a.width/2,s=t.append("g");0===n&&(c++,s.append("line").attr("id","actor"+c).attr("x1",i).attr("y1",5).attr("x2",i).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999"));var o=_();o.x=e,o.y=n,o.fill="#eaeaea",o.width=a.width,o.height=a.height,o.class="actor",o.rx=3,o.ry=3,u(s,o),p(a)(r,s,o.x,o.y,o.width,o.height,{class:"actor"})},a=e.anchorElement=function(t){return t.append("g")},i=e.drawActivation=function(t,e,n){var r=_(),a=e.anchored;r.x=e.startx,r.y=e.starty,r.fill="#f4f4f4",r.width=e.stopx-e.startx,r.height=n-e.starty,u(a,r)},s=e.drawLoop=function(t,n,e,r){var a=t.append("g"),i=function(t,e,n,r){return a.append("line").attr("x1",t).attr("y1",e).attr("x2",n).attr("y2",r).attr("class","loopLine")};i(n.startx,n.starty,n.stopx,n.starty),i(n.stopx,n.starty,n.stopx,n.stopy),i(n.startx,n.stopy,n.stopx,n.stopy),i(n.startx,n.starty,n.startx,n.stopy),void 0!==n.sections&&n.sections.forEach(function(t){i(n.startx,t,n.stopx,t).style("stroke-dasharray","3, 3")});var s=f();s.text=e,s.x=n.startx,s.y=n.starty,s.labelMargin=15,s.class="labelText",o(a,s),(s=f()).text="[ "+n.title+" ]",s.x=n.startx+(n.stopx-n.startx)/2,s.y=n.starty+1.5*r.boxMargin,s.anchor="middle",s.class="loopText",l(a,s),void 0!==n.sectionTitles&&n.sectionTitles.forEach(function(t,e){""!==t&&(s.text="[ "+t+" ]",s.y=n.sections[e]+1.5*r.boxMargin,l(a,s))})},d=e.insertArrowHead=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},h=e.insertArrowCrossHead=function(t){var e=t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);e.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),e.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},f=e.getTextObj=function(){return{x:0,y:0,fill:"black","text-anchor":"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0}},_=e.getNoteRect=function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},p=function(){function e(t,e,n,r,a,i,s){c(e.append("text").attr("x",n+a/2).attr("y",r+i/2+5).style("text-anchor","middle").text(t),s)}function l(t,e,n,r,a,i,s){var o=e.append("text").attr("x",n+a/2).attr("y",r).style("text-anchor","middle");if(o.append("tspan").attr("x",n+a/2).attr("dy","0").text(t),void 0!==o.textwrap){o.textwrap({x:n+a/2,y:r,width:a,height:i},0);var u=o.selectAll("tspan");0o?e+a-5:n+a+5:(n-e)/2+e+a}).attr("y",function(t,e){return e*n+y.barHeight/2+(y.fontSize/2-2)+r}).attr("text-height",e).attr("class",function(t){for(var e=h(t.startTime),n=h(t.endTime),r=this.getBBox().width,a=0,i=0;io?"taskTextOutsideLeft taskTextOutside"+a+" "+s:"taskTextOutsideRight taskTextOutside"+a+" "+s:"taskText taskText"+a+" "+s})}(t,a,i,s,r,0,e),function(r,a){for(var i=[],s=0,t=0;t "+t.w+": "+JSON.stringify(a.edge(t))),function(t,e,n){var r=function(t){switch(t){case y.default.relationType.AGGREGATION:return"aggregation";case y.default.relationType.EXTENSION:return"extension";case y.default.relationType.COMPOSITION:return"composition";case y.default.relationType.DEPENDENCY:return"dependency"}},a=e.points,i=g.default.svg.line().x(function(t){return t.x}).y(function(t){return t.y}).interpolate("basis"),s=t.append("path").attr("d",i(a)).attr("id","edge"+M).attr("class","relation"),o="";v.arrowMarkerAbsolute&&(o=(o=(o=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),"none"!==n.relation.type1&&s.attr("marker-start","url("+o+"#"+r(n.relation.type1)+"Start)"),"none"!==n.relation.type2&&s.attr("marker-end","url("+o+"#"+r(n.relation.type2)+"End)");var u=void 0,l=void 0,c=e.points.length;if(c%2!=0){var d=e.points[Math.floor(c/2)],h=e.points[Math.ceil(c/2)];u=(d.x+h.x)/2,l=(d.y+h.y)/2}else{var f=e.points[Math.floor(c/2)];u=f.x,l=f.y}if(void 0!==n.title){var _=t.append("g").attr("class","classLabel"),p=_.append("text").attr("class","label").attr("x",u).attr("y",l).attr("fill","red").attr("text-anchor","middle").text(n.title),m=(window.label=p).node().getBBox();_.insert("rect",":first-child").attr("class","box").attr("x",m.x-v.padding/2).attr("y",m.y-v.padding/2).attr("width",m.width+v.padding).attr("height",m.height+v.padding)}M++}(r,a.edge(t),a.edge(t).relation)}),r.attr("height","100%"),r.attr("width","100%"),r.attr("viewBox","0 0 "+(a.graph().width+20)+" "+(a.graph().height+20))};e.default={setConf:a,draw:i}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.draw=e.setConf=void 0;var u=r(n(177)),l=r(n(245)),c=r(n(2)),d=r(n(265)),h=r(n(327)),f=r(n(201)),_=r(n(176)),p=r(n(6)),m=n(1);function r(t){return t&&t.__esModule?t:{default:t}}var y={},g=void 0,v={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}},M={},a=e.setConf=function(t){M=t};function k(t,e,n,r){r=r||"basis";var a=v.branchColors[n%v.branchColors.length],i=p.default.svg.line().x(function(t){return Math.round(t.x)}).y(function(t){return Math.round(t.y)}).interpolate(r);t.append("svg:path").attr("d",i(e)).style("stroke",a).style("stroke-width",v.lineStrokeWidth).style("fill","none")}function b(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 L(t,e,n,r,a){m.logger.debug("svgDrawLineForCommits: ",e,n);var i=b(t.select("#node-"+e+" circle")),s=b(t.select("#node-"+n+" circle"));switch(r){case"LR":if(i.left-s.left>v.nodeSpacing){var o={x:i.left-v.nodeSpacing,y:s.top+s.height/2};k(t,[o,{x:s.left+s.width,y:s.top+s.height/2}],a,"linear"),k(t,[{x:i.left,y:i.top+i.height/2},{x:i.left-v.nodeSpacing/2,y:i.top+i.height/2},{x:i.left-v.nodeSpacing/2,y:o.y},o],a)}else k(t,[{x:i.left,y:i.top+i.height/2},{x:i.left-v.nodeSpacing/2,y:i.top+i.height/2},{x:i.left-v.nodeSpacing/2,y:s.top+s.height/2},{x:s.left+s.width,y:s.top+s.height/2}],a);break;case"BT":if(s.top-i.top>v.nodeSpacing){var u={x:s.left+s.width/2,y:i.top+i.height+v.nodeSpacing};k(t,[u,{x:s.left+s.width/2,y:s.top}],a,"linear"),k(t,[{x:i.left+i.width/2,y:i.top+i.height},{x:i.left+i.width/2,y:i.top+i.height+v.nodeSpacing/2},{x:s.left+s.width/2,y:u.y-v.nodeSpacing/2},u],a)}else k(t,[{x:i.left+i.width/2,y:i.top+i.height},{x:i.left+i.width/2,y:i.top+v.nodeSpacing/2},{x:s.left+s.width/2,y:s.top-v.nodeSpacing/2},{x:s.left+s.width/2,y:s.top}],a)}}var i=e.draw=function(t,e,n){try{var r=_.default.parser;r.yy=f.default,m.logger.debug("in gitgraph renderer",t,e,n),r.parse(t+"\n"),v=(0,l.default)(v,M,f.default.getOptions()),m.logger.debug("effective options",v);var a=f.default.getDirection();y=f.default.getCommits();var i=f.default.getBranchesAsObjArray();"BT"===a&&(v.nodeLabel.x=i.length*v.branchOffset,v.nodeLabel.width="100%",v.nodeLabel.y=-2*v.nodeRadius);var s=p.default.select("#"+e);(o=s).append("defs").append("g").attr("id","def-commit").append("circle").attr("r",v.nodeRadius).attr("cx",0).attr("cy",0),o.select("#def-commit").append("foreignObject").attr("width",v.nodeLabel.width).attr("height",v.nodeLabel.height).attr("x",v.nodeLabel.x).attr("y",v.nodeLabel.y).attr("class","node-label").attr("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility").append("xhtml:p").html(""),g=1,(0,u.default)(i,function(t){!function t(e,n,r,a){var i=void 0,s=Object.keys(y).length;if((0,h.default)(n))do{if(i=y[n],m.logger.debug("in renderCommitHistory",i.id,i.seq),0=i)return arguments[0]}else r=0;return n.apply(void 0,arguments)}}},function(t,e,n){var a=n(22),i=n(13),s=n(31),o=n(14);t.exports=function(t,e,n){if(!o(n))return!1;var r=typeof e;return!!("number"==r?i(n)&&s(e,n.length):"string"==r&&e in n)&&a(n[e],t)}},function(t,e,n){var r=n(179),a=n(263),i=n(13);t.exports=function(t){return i(t)?r(t,!0):a(t)}},function(t,e,n){var a=n(14),i=n(185),s=n(264),o=Object.prototype.hasOwnProperty;t.exports=function(t){if(!a(t))return s(t);var e=i(t),n=[];for(var r in t)("constructor"!=r||!e&&o.call(t,r))&&n.push(r);return n}},function(t,e){t.exports=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}},function(t,e,n){var r=n(266)(n(323));t.exports=r},function(t,e,n){var o=n(15),u=n(13),l=n(20);t.exports=function(s){return function(t,e,n){var r=Object(t);if(!u(t)){var a=o(e,3);t=l(t),e=function(t){return a(r[t],t,r)}}var i=s(t,e,n);return-1=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 - + \ No newline at end of file diff --git a/GraphEditor/build/release/GraphEditor.zip b/GraphEditor/build/release/GraphEditor.zip new file mode 100644 index 0000000..d384842 Binary files /dev/null and b/GraphEditor/build/release/GraphEditor.zip differ diff --git a/GraphEditor/coffees/main.coffee b/GraphEditor/coffees/main.coffee index 686e16b..0acd432 100644 --- a/GraphEditor/coffees/main.coffee +++ b/GraphEditor/coffees/main.coffee @@ -15,76 +15,76 @@ # You should have received a copy of the GNU General Public License #along with this program. If not, see https://www.gnu.org/licenses/. -class GraphEditor extends this.OS.GUI.BaseApplication +class GraphEditor extends this.OS.application.BaseApplication constructor: ( args ) -> super "GraphEditor", args main: () -> - me = @ + #mermaid.initialize { startOnLoad: false } mermaid.initialize { theme: 'forest' } - @currfile = if @args and @args.length > 0 then @args[0].asFileHandler() else "Untitled".asFileHandler() + @currfile = if @args and @args.length > 0 then @args[0].path.asFileHandle() else "Untitled".asFileHandle() @currfile.dirty = false @datarea = @find "datarea" @preview = @find "preview" @btctn = @find "btn-container" - @.editor = ace.edit @datarea - @.editor.setOptions { + ace.config.set("basePath", "/scripts/ace") + @editor = ace.edit @datarea + @editor.setOptions { enableBasicAutocompletion: true, enableLiveAutocompletion: true, - fontSize: "10pt" + fontSize: "11pt" } - #@.editor.completers.push { getCompletions: ( editor, session, pos, prefix, callback ) -> } @editor.getSession().setUseWrapMode true @editor.session.setMode "ace/mode/text" @editor.setTheme "ace/theme/monokai" - @editor.on "input", () -> - if me.editormux - me.editormux = false + @editor.on "input", () => + if @editormux + @editormux = false return false - if not me.currfile.dirty - me.currfile.dirty = true + if not @currfile.dirty + @currfile.dirty = true - if not me.currfile.basename - me.editormux = true - me.editor.setValue GraphEditor.dummymermaid - me.renderSVG false + if not @currfile.basename + @editormux = true + @editor.setValue GraphEditor.dummymermaid + @renderSVG false - @editor.container.addEventListener "keydown", (e) -> - me.renderSVG true if e.keyCode is 13 + @editor.container.addEventListener "keydown", (e) => + @renderSVG true if e.keyCode is 13 , true - @bindKey "CTRL-R", () -> me.renderSVG false - @bindKey "ALT-G", () -> me.export "SVG" - @bindKey "ALT-P", () -> me.export "PNG" - @bindKey "ALT-N", () -> me.actionFile "#{me.name}-New" - @bindKey "ALT-O", () -> me.actionFile "#{me.name}-Open" - @bindKey "CTRL-S", () -> me.actionFile "#{me.name}-Save" - @bindKey "ALT-W", () -> me.actionFile "#{me.name}-Saveas" - @bindKey "CTRL-M", () -> me.svgToCanvas(()->) + @bindKey "CTRL-R", () => @renderSVG false + @bindKey "ALT-G", () => @export "SVG" + @bindKey "ALT-P", () => @export "PNG" + @bindKey "ALT-N", () => @actionFile "#{@name}-New" + @bindKey "ALT-O", () => @actionFile "#{@name}-Open" + @bindKey "CTRL-S", () => @actionFile "#{@name}-Save" + @bindKey "ALT-W", () => @actionFile "#{@name}-Saveas" + @bindKey "CTRL-M", () => @svgToCanvas(()->) - @on "hboxchange", () -> - me.editor.resize() - me.calibrate() - @on "focus", () -> me.editor.focus() - (@find "btn-zoomin").set "onbtclick", (e) -> - me.pan.zoomIn() if me.pan - (@find "btn-zoomout").set "onbtclick", (e) -> - me.pan.zoomOut() if me.pan - (@find "btn-reset").set "onbtclick", (e) -> - me.pan.resetZoom() if me.pan + @on "hboxchange", () => + @editor.resize() + @calibrate() + @on "focus", () => @editor.focus() + (@find "btn-zoomin").onbtclick = (e) => + @pan.zoomIn() if @pan + (@find "btn-zoomout").onbtclick = (e) => + @pan.zoomOut() if @pan + (@find "btn-reset").onbtclick = (e) => + @pan.resetZoom() if @pan @open @currfile menu: () -> - me = @ + menu = [{ text: "__(File)", - child: [ + nodes: [ { text: "__(New)", dataid: "#{@name}-New", shortcut: "A-N" }, { text: "__(Open)", dataid: "#{@name}-Open", shortcut: "A-O" }, { text: "__(Save)", dataid: "#{@name}-Save", shortcut: "C-S" }, @@ -92,47 +92,53 @@ class GraphEditor extends this.OS.GUI.BaseApplication { text: "__(Render)", dataid: "#{@name}-Render", shortcut: "C-R" }, { text: "__(Export as)", - child: [ + nodes: [ { text: "SVG", shortcut: "A-G" }, { text: "PNG", shortcut: "A-P" } ], - onmenuselect: (e) -> me.export e.item.data.text + onchildselect: (e) => @export e.data.item.data.text }, ], - onmenuselect: (e) -> me.actionFile e.item.data.dataid + onchildselect: (e) => @actionFile e.data.item.data.dataid }] menu open: (file) -> return if file.path is "Untitled" - me = @ + file.dirty = false - file.read (d) -> - me.currfile = file - me.editormux = true - me.currfile.dirty = false - me.editor.setValue d - me.scheme.set "apptitle", "#{me.currfile.basename}" - me.renderSVG false + file.read().then (d) => + @currfile = file + @editormux = true + @currfile.dirty = false + @editor.setValue d + @scheme.apptitle = "#{@currfile.basename}" + @renderSVG false + .catch (e) => @error e.toString(), e save: (file) -> - me = @ - file.write "text/plain", (d) -> - return me.error __("Error saving file {0}", file.basename) if d.error + + file.write "text/plain" + .then (d) => file.dirty = false file.text = file.basename - me.scheme.set "apptitle", "#{me.currfile.basename}" + @scheme.apptitle = "#{@currfile.basename}" + .catch (e) => @error e.toString(), e actionFile: (e) -> - me = @ - saveas = () -> - me.openDialog "FileDiaLog", (d, n) -> - me.currfile.setPath "#{d}/#{n}" - me.save me.currfile - , __("Save as"), { file: me.currfile } + + saveas = () => + @openDialog "FileDialog",{title: __("Save as"), file: @currfile } + .then (d) => + @currfile.setPath "#{d.file.path}/#{d.name}" + @save @currfile + .catch (e) => @error e.toString(), e + switch e when "#{@name}-Open" - @openDialog "FileDiaLog", ( d, f ) -> - me.open "#{d}/#{f}".asFileHandler() - , __("Open file") + @openDialog "FileDialog", { title: __("Open file")} + .then ( d, f ) => + @open d.file.path.asFileHandle() + .catch (e) => @error e.toString(), e + when "#{@name}-Save" @currfile.cache = @editor.getValue() return @save @currfile if @currfile.basename @@ -141,61 +147,63 @@ class GraphEditor extends this.OS.GUI.BaseApplication @currfile.cache = @editor.getValue() saveas() when "#{@name}-Render" - me.renderSVG false + @renderSVG false when "#{@name}-New" - @currfile = "Untitled".asFileHandler() + @currfile = "Untitled".asFileHandle() @currfile.cache = "" @currfile.dirty = false @editormux = true @editor.setValue("") export: (t) -> - me = @ - me.openDialog "FileDiaLog", (d, n) -> - fp = "#{d}/#{n}".asFileHandler() + @openDialog "FileDialog", {title: __("Export as"), file: @currfile } + .then (d) => + fp = "#{d.file.path}/#{d.name}".asFileHandle() try switch t when "SVG" - fp.cache = me.svgtext() - fp.write "text/plain", (r) -> - return me.error __("Cannot export to {0}: {1}", t, r.error) if r.error - me.notify __("File exported") + fp.cache = @svgtext() + fp.write "text/plain" + .then (r) => + @notify __("File exported") + .catch (e) => @error __("Cannot export to {0}: {1}", t, e.toString()), e when "PNG" # toDataURL("image/png") - me.svgToCanvas (canvas) -> + @svgToCanvas (canvas) => try fp.cache = canvas.toDataURL "image/png" - fp.write "base64", (r) -> - return me.error __("Cannot export to {0}: {1}", t, r.error) if r.error - me.notify __("File exported") + fp.write "base64" + .then (r) => + @notify __("File exported") + .catch (e) => @error __("Cannot export to {0}: {1}", t, e.toString()), e catch e - me.error __("Cannot export to PNG in this browser: {0}", e.message) + @error __("Cannot export to PNG in this browser: {0}", e.toString()), e catch e - me.error __("Cannot export: {0}", e.message) - , __("Export as"), { file: me.currfile } + @error __("Cannot export: {0}", e.message), e + .catch (e) => @error e.toString(), e renderSVG: (silent) -> - me = @ + id = Math.floor(Math.random() * 100000) + 1 #if silent # mermaid.parseError = (e, h) -> #else # mermaid.parseError = (e, h) -> - # me.error e + # @error e text = @editor.getValue() try mermaid.parse text catch e - me.error __("Syntax error: {0}", e.str) if not silent + @error __("Syntax error: {0}", e.toString()), e if not silent return - mermaid.render "c#{id}", text, (text, f) -> - me.preview.innerHTML = text - $(me.preview).append me.btctn - me.calibrate() - svg = $(me.preview).children("svg")[0] - $(svg).attr("style", "") - me.pan = svgPanZoom svg, { + mermaid.render "c#{id}", text, (text, f) => + @preview.innerHTML = text + $(@preview).append @btctn + @calibrate() + svg = $(@preview).children("svg")[0] + #$(svg).attr("style", "") + @pan = svgPanZoom svg, { zoomEnabled: true, controlIconsEnabled: false, fit: true, @@ -203,15 +211,15 @@ class GraphEditor extends this.OS.GUI.BaseApplication minZoom: 0.1 } #rd $($.parseHTML text). - , me.preview + , @preview svgtext: () -> svg = $(@preview).children("svg")[0] - $("g.label",svg).each (i) -> + $("g.label",svg).each (i) => $(@) .css("font-family","Ubuntu") .css("font-size", "13px") - $("text", svg).each (j) -> + $("text", svg).each (j) => $(@) .css("font-family","Ubuntu") .css("font-size", "13px") @@ -219,14 +227,13 @@ class GraphEditor extends this.OS.GUI.BaseApplication return serializer.serializeToString(svg) svgToCanvas: (f) -> - me = @ img = new Image() svgStr = @svgtext() DOMURL = window.URL || window.webkitURL || window svgBlob = new Blob [svgStr], { type: 'image/svg+xml;charset=utf-8' } url = DOMURL.createObjectURL svgBlob - img.onload = () -> - canvas = me.find "offscreen" + img.onload = () => + canvas = @find "offscreen" canvas.width = img.width canvas.height = img.height canvas.getContext("2d").drawImage img, 0, 0, img.width, img.height @@ -243,20 +250,28 @@ class GraphEditor extends this.OS.GUI.BaseApplication cleanup: (evt) -> return unless @currfile return unless @currfile.dirty - me = @ evt.preventDefault() - @.openDialog "YesNoDialog", (d) -> - if d - me.currfile.dirty = false - me.quit() - , __("Quit"), { text: __("Quit without saving ?") } + @ask {title: __("Quit"), text: __("Quit without saving ?") } + .then (d) => + if d + @currfile.dirty = false + @quit() GraphEditor.dummymermaid = """ -graph TD; - A-->B; - A-->C; - B-->D; - C-->D; +classDiagram +Class01 <|-- AveryLongClass : Cool +Class03 *-- Class04 +Class05 o-- Class06 +Class07 .. Class08 +Class09 --> C2 : Where am i? +Class09 --* C3 +Class09 --|> Class07 +Class07 : equals() +Class07 : Object[] elementData +Class01 : size() +Class01 : int chimp +Class01 : int gorilla +Class08 <--> C2: Cool label """ GraphEditor.dependencies = [ "os://scripts/ace/ace.js" diff --git a/GraphEditor/css/main.css b/GraphEditor/css/main.css index b1e78f8..c69c46b 100644 --- a/GraphEditor/css/main.css +++ b/GraphEditor/css/main.css @@ -3,6 +3,7 @@ afx-app-window[data-id="graph_editor_win"] div[data-id="preview"] display: flex; align-items: center; justify-content: center; + background-color: white; } afx-app-window[data-id="graph_editor_win"] afx-button button { @@ -19,4 +20,4 @@ afx-app-window[data-id="graph_editor_win"] div[data-id="btn-container"]{ bottom:10px; right: 10px; display: inline; -} +} diff --git a/GraphEditor/javascripts/mermaid.min.js b/GraphEditor/javascripts/mermaid.min.js new file mode 100644 index 0000000..84eff85 --- /dev/null +++ b/GraphEditor/javascripts/mermaid.min.js @@ -0,0 +1,42 @@ +!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}}};var 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>=T?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=k?10:a>=E?5:a>=T?2:1)}function M(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),a=r/i;return a>=k?i*=10:a>=E?i*=5:a>=T&&(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*(C(t,.75)-C(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},I=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},Y=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}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 Tt(t){return function(){this.removeAttributeNS(t.space,t.local)}}function At(t,e){return function(){this.setAttribute(t,e)}}function St(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 Ot(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 Nt=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function Ct(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)||Nt(t).getComputedStyle(t,null).getPropertyValue(e)}function It(t){return function(){delete this[t]}}function Pt(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 Yt(t)}function Yt(t){this._node=t,this._names=Bt(t.getAttribute("class")||"")}function zt(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}};function Ht(){this.textContent=""}function Wt(t){return function(){this.textContent=t}}function qt(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function Xt(){this.innerHTML=""}function Zt(t){return function(){this.innerHTML=t}}function Jt(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function Qt(){this.nextSibling&&this.parentNode.appendChild(this)}function Kt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function te(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===_t&&e.documentElement.namespaceURI===_t?e.createElement(t):e.createElementNS(n,t)}}function ee(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}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;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(se={mouseenter:"mouseover",mouseleave:"mouseout"}));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?Ct:"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?It:"function"==typeof e?Rt:Pt)(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=Ie.exec(t))?new qe(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Pe.exec(t))?Ve(e[1],e[2],e[3],e[4]):(e=Re.exec(t))?Ve(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]):Ye.hasOwnProperty(t)?Ge(Ye[t]):"transparent"===t?new qe(NaN,NaN,NaN,0):null}function Ge(t){return new qe(t>>16&255,t>>8&255,255&t,1)}function Ve(t,e,n,r){return r<=0&&(t=e=n=NaN),new qe(t,e,n,r)}function He(t){return t instanceof Oe||(t=$e(t)),t?new qe((t=t.rgb()).r,t.g,t.b,t.opacity):new qe}function We(t,e,n,r){return 1===arguments.length?He(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 Xe(){return"#"+Je(this.r)+Je(this.g)+Je(this.b)}function Ze(){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 Oe||(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}Se(Oe,$e,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:ze,formatHex:ze,formatHsl:function(){return Ke(this).formatHsl()},formatRgb:Ue,toString:Ue}),Se(qe,We,Me(Oe,{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:Xe,formatHex:Xe,formatRgb:Ze,toString:Ze})),Se(en,tn,Me(Oe,{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){return 1==(t=+t)?fn: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)}}function fn(t,e){var n=e-t;return n?un(t,n):sn(isNaN(t)?e:t)}var hn=function t(e){var n=ln(e);function r(t,e){var r=n((t=We(t)).r,(e=We(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=fn(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 dn(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:_n(n,r)})),a=En.lastIndex;return a=0&&e._call.call(null,t),e=e._next;--Ln}function Hn(){Rn=(Pn=jn.now())+Bn,Ln=Fn=0;try{Vn()}finally{Ln=0,function(){var t,e,n=Tn,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Tn=e);An=t,qn(r)}(),Rn=0}}function Wn(){var t=jn.now(),e=t-Pn;e>1e3&&(Bn-=e,Pn=t)}function qn(t){Ln||(Fn&&(Fn=clearTimeout(Fn)),t-Rn>24?(t<1/0&&(Fn=setTimeout(Hn,t-jn.now()-Bn)),In&&(In=clearInterval(In))):(In||(Pn=jn.now(),In=setInterval(Wn,1e3)),Ln=1,Yn(Hn)))}$n.prototype=Gn.prototype={constructor:$n,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||An===this||(An?An._next=this:Tn=this,An=this),this._call=t,this._time=n,qn()},stop:function(){this._call&&(this._call=null,this._time=1/0,qn())}};var Xn=function(t,e,n){var r=new $n;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r},Zn=lt("start","end","cancel","interrupt"),Jn=[],Qn=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 Xn(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 tr(t,e){var n=er(t,e);if(n.state>3)throw new Error("too late; already running");return n}function er(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}var nr,rr,ir,ar,or=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}},sr=180/Math.PI,ur={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},cr=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:_n(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:_n(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:_n(t,n)},{i:s-2,x:_n(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)?Kn:tr;return function(){var o=a(this,t),s=o.on;s!==r&&(i=(r=s).copy()).on(e,n),o.on=i}}var Lr=_e.prototype.constructor;function Fr(t){return function(){this.style.removeProperty(t)}}function Ir(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)&&Ir(t,a,n)),r}return a._value=e,a}function Rr(t){return function(e){this.textContent=t.call(this,e)}}function Br(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&Rr(r)),e}return r._value=t,r}var jr=0;function Yr(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function zr(t){return _e().transition(t)}function Ur(){return++jr}var $r=_e.prototype;function Gr(t){return t*t*t}function Vr(t){return--t*t*t+1}function Hr(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}Yr.prototype=zr.prototype={constructor:Yr,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 Yr([[t]],Xr,e,+r);return null},Jr=function(t){return function(){return t}},Qr=function(t,e,n){this.target=t,this.type=e,this.selection=n};function Kr(){ue.stopImmediatePropagation()}var ti=function(){ue.preventDefault(),ue.stopImmediatePropagation()},ei={name:"drag"},ni={name:"space"},ri={name:"handle"},ii={name:"center"};function ai(t){return[+t[0],+t[1]]}function oi(t){return[ai(t[0]),ai(t[1])]}function si(t){return function(e){return Cn(e,ue.touches,t)}}var ui={name:"x",handles:["w","e"].map(gi),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]]}},ci={name:"y",handles:["n","s"].map(gi),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]]}},li={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(gi),input:function(t){return null==t?null:oi(t)},output:function(t){return t}},fi={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"},hi={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},di={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},pi={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},yi={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function gi(t){return{type:t}}function mi(){return!ue.ctrlKey&&!ue.button}function vi(){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 bi(){return navigator.maxTouchPoints||"ontouchstart"in this}function xi(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function _i(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function wi(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function ki(){return Ai(ui)}function Ei(){return Ai(ci)}var Ti=function(){return Ai(li)};function Ai(t){var e,n=vi,r=mi,i=bi,a=!0,o=lt("start","brush","end"),s=6;function u(e){var n=e.property("__brush",y).selectAll(".overlay").data([gi("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",fi.overlay).merge(n).each((function(){var t=xi(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([gi("selection")]).enter().append("rect").attr("class","selection").attr("cursor",fi.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 fi[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=xi(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)?ei:a&&ue.altKey?ii:ri,x=t===ci?null:pi[v],_=t===ui?null:yi[v],w=xi(m),k=w.extent,E=w.selection,T=k[0][0],A=k[0][1],S=k[1][0],M=k[1][1],O=0,N=0,C=x&&_&&a&&ue.shiftKey,D=ue.touches?si(ue.changedTouches[0].identifier):Dn,L=D(m),F=L,I=l(m,arguments,!0).beforestart();"overlay"===v?(E&&(p=!0),w.selection=E=[[n=t===ci?T:L[0],o=t===ui?A:L[1]],[u=t===ci?S:n,h=t===ui?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 P=we(m).attr("pointer-events","none"),R=P.selectAll(".overlay").attr("cursor",fi[v]);if(ue.touches)I.moved=j,I.ended=z;else{var B=we(ue.view).on("mousemove.brush",j,!0).on("mouseup.brush",z,!0);a&&B.on("keydown.brush",U,!0).on("keyup.brush",$,!0),Te(ue.view)}Kr(),or(m),c.call(m),I.start()}function j(){var t=D(m);!C||y||g||(Math.abs(t[0]-F[0])>Math.abs(t[1]-F[1])?g=!0:y=!0),F=t,p=!0,ti(),Y()}function Y(){var t;switch(O=F[0]-L[0],N=F[1]-L[1],b){case ni:case ei:x&&(O=Math.max(T-n,Math.min(S-u,O)),i=n+O,f=u+O),_&&(N=Math.max(A-o,Math.min(M-h,N)),s=o+N,d=h+N);break;case ri:x<0?(O=Math.max(T-n,Math.min(S-n,O)),i=n+O,f=u):x>0&&(O=Math.max(T-u,Math.min(S-u,O)),i=n,f=u+O),_<0?(N=Math.max(A-o,Math.min(M-o,N)),s=o+N,d=h):_>0&&(N=Math.max(A-h,Math.min(M-h,N)),s=o,d=h+N);break;case ii:x&&(i=Math.max(T,Math.min(S,n-O*x)),f=Math.max(T,Math.min(S,u+O*x))),_&&(s=Math.max(A,Math.min(M,o-N*_)),d=Math.max(A,Math.min(M,h+N*_)))}f0&&(n=i-O),_<0?h=d-N:_>0&&(o=s-N),b=ni,R.attr("cursor",fi.selection),Y());break;default:return}ti()}function $(){switch(ue.keyCode){case 16:C&&(y=g=C=!1,Y());break;case 18:b===ii&&(x<0?u=f:x>0&&(n=i),_<0?h=d:_>0&&(o=s),b=ri,Y());break;case 32:b===ni&&(ue.altKey?(x&&(u=f-O*x,n=i+O*x),_&&(h=d-N*_,o=s+N*_),b=ii):(x<0?u=f:x>0&&(n=i),_<0?h=d:_>0&&(o=s),b=ri),R.attr("cursor",fi[v]),Y());break;default:return}ti()}}function d(){l(this,arguments).moved()}function p(){l(this,arguments).ended()}function y(){var e=this.__brush||{selection:null};return e.extent=oi(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=Mn(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();or(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 Qr(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:Jr(oi(t)),u):n},u.filter=function(t){return arguments.length?(r="function"==typeof t?t:Jr(!!t),u):r},u.touchable=function(t){return arguments.length?(i="function"==typeof t?t:Jr(!!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 Si=Math.cos,Mi=Math.sin,Oi=Math.PI,Ni=Oi/2,Ci=2*Oi,Di=Math.max;function Li(t){return function(e,n){return t(e.source.value+e.target.value,n.source.value+n.target.value)}}var Fi=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((Ri-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);else;},arc:function(t,e,n,r,i,a){t=+t,e=+e,a=!!a;var o=(n=+n)*Math.cos(r),s=n*Math.sin(r),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%Bi+Bi),f>ji?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>=Ri)+","+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 Ui=zi;function $i(t){return t.source}function Gi(t){return t.target}function Vi(t){return t.radius}function Hi(t){return t.startAngle}function Wi(t){return t.endAngle}var qi=function(){var t=$i,e=Gi,n=Vi,r=Hi,i=Wi,a=null;function o(){var o,s=Ii.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)-Ni,h=i.apply(this,s)-Ni,d=l*Si(f),p=l*Mi(f),y=+n.apply(this,(s[0]=c,s)),g=r.apply(this,s)-Ni,m=i.apply(this,s)-Ni;if(a||(a=o=Ui()),a.moveTo(d,p),a.arc(0,0,l,f,h),f===g&&h===m||(a.quadraticCurveTo(0,0,y*Si(g),y*Mi(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 Xi(){}function Zi(t,e){var n=new Xi;if(t instanceof Xi)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=Ji(),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,ea,na),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 Ki(){return{}}function ta(t,e,n){t[e]=n}function ea(){return Ji()}function na(t,e,n){t.set(e,n)}function ra(){}var ia=Ji.prototype;function aa(t,e){var n=new ra;if(t instanceof ra)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 ma(t){return t>6/29?t*t*t:6/29*3*(6/29)*(t-4/29)}function va(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function ba(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function xa(t){if(t instanceof ka)return new ka(t.h,t.c,t.l,t.opacity);if(t instanceof ya||(t=ha(t)),0===t.a&&0===t.b)return new ka(NaN,0r!=d>r&&n<(h-c)*(r-l)/(d-l)+c&&(i=-i)}return i}function Ra(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 Ba=function(){},ja=[[],[[[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]]],[]],Ya=function(){var t=1,e=1,n=O,r=s;function i(t){var e=n(t);if(Array.isArray(e))e=e.slice().sort(La);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;a=s=-1,c=n[0]>=r,ja[c<<1].forEach(p);for(;++a=r,ja[u|c<<1].forEach(p);ja[c<<0].forEach(p);for(;++s=r,l=n[s*t]>=r,ja[c<<1|l<<2].forEach(p);++a=r,f=l,l=n[s*t+a+1]>=r,ja[u|c<<1|l<<2|f<<3].forEach(p);ja[c|l<<3].forEach(p)}a=-1,l=n[s*t]>=r,ja[l<<2].forEach(p);for(;++a=r,ja[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]}}ja[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)?Fa(Da.call(t)):Fa(t),i):n},i.smooth=function(t){return arguments.length?(r=t?s:Ba,i):r===s},i};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[s-a+o*r]),e.data[s-n+o*r]=u/Math.min(s+1,r-1+a-s,a))}function Ua(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 $a(t){return t[0]}function Ga(t){return t[1]}function Va(){return 1}var Ha=function(){var t=$a,e=Ga,n=Va,r=960,i=500,a=20,o=2,s=3*a,u=r+2*s>>o,c=i+2*s>>o,l=Fa(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),Ua({width:u,height:c,data:f},{width:u,height:c,data:i},a>>o),za({width:u,height:c,data:i},{width:u,height:c,data:f},a>>o),Ua({width:u,height:c,data:f},{width:u,height:c,data:i},a>>o),za({width:u,height:c,data:i},{width:u,height:c,data:f},a>>o),Ua({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 Ya().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:Fa(+e),f):t},f.y=function(t){return arguments.length?(e="function"==typeof t?t:Fa(+t),f):e},f.weight=function(t){return arguments.length?(n="function"==typeof t?t:Fa(+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)?Fa(Da.call(t)):Fa(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},Wa=function(t){return function(){return t}};function qa(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 Xa(){return!ue.ctrlKey&&!ue.button}function Za(){return this.parentNode}function Ja(t){return null==t?{x:ue.x,y:ue.y}:t}function Qa(){return navigator.maxTouchPoints||"ontouchstart"in this}qa.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var Ka=function(){var t,e,n,r,i=Xa,a=Za,o=Ja,s=Qa,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),Dn,this,arguments);o&&(we(ue.view).on("mousemove.drag",p,!0).on("mouseup.drag",y,!0),Te(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;t9999?"+"+io(e,6):io(e,4))+"-"+io(t.getUTCMonth()+1,2)+"-"+io(t.getUTCDate(),2)+(a?"T"+io(n,2)+":"+io(r,2)+":"+io(i,2)+"."+io(a,3)+"Z":i?"T"+io(n,2)+":"+io(r,2)+":"+io(i,2)+"Z":r||n?"T"+io(n,2)+":"+io(r,2)+"Z":"")}var oo=function(t){var e=new RegExp('["'+t+"\n\r]"),n=t.charCodeAt(0);function r(t,e){var r,i=[],a=t.length,o=0,s=0,u=a<=0,c=!1;function l(){if(u)return eo;if(c)return c=!1,to;var e,r,i=o;if(34===t.charCodeAt(i)){for(;o++=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(;o=(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 _s=function(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i};function ws(t){return t[0]}function ks(t){return t[1]}function Es(t,e,n){var r=new Ts(null==e?ws:e,null==n?ks:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function Ts(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 As(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var Ss=Es.prototype=Ts.prototype;function Ms(t){return t.x+t.vx}function Os(t){return t.y+t.vy}Ss.copy=function(){var t,e,n=new Ts(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=As(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]=As(e));return n},Ss.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return xs(this.cover(e,n),e,n,t)},Ss.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)},Ss.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)}}},Bs=function(){var t,e,n,r,i=vs(-30),a=1,o=1/0,s=.81;function u(r){var i,a=t.length,o=Es(t,Fs,Is).visitAfter(l);for(n=r,i=0;i=o)){(t.data!==e||t.next)&&(0===l&&(d+=(l=bs())*l),0===f&&(d+=(f=bs())*f),d1?r[0]+r.slice(2):r,+t.slice(n+1)]},$s=function(t){return(t=Us(Math.abs(t)))?t[1]:NaN},Gs=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Vs(t){if(!(e=Gs.exec(t)))throw new Error("invalid format: "+t);var e;return new Hs({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 Hs(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+""}Vs.prototype=Hs.prototype,Hs.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 Ws,qs,Xs,Zs,Js=function(t,e){var n=Us(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")},Qs={"%":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 Js(100*t,e)},r:Js,s:function(t,e){var n=Us(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(Ws=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")+Us(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)}},Ks=function(t){return t},tu=Array.prototype.map,eu=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"],nu=function(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?Ks:(e=tu.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?Ks:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(tu.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=Vs(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"):Qs[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:"",_=Qs[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?eu[8+Ws/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 T=h.length+t.length+k.length,A=T>1)+h+t+k+A.slice(T);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=Vs(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor($s(e)/3))),i=Math.pow(10,-r),a=eu[8+r/3];return function(t){return n(i*t)+a}}}};function ru(t){return qs=nu(t),Xs=qs.format,Zs=qs.formatPrefix,qs}ru({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});var iu=function(t){return Math.max(0,-$s(Math.abs(t)))},au=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor($s(e)/3)))-$s(Math.abs(t)))},ou=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,$s(e)-$s(t))+1},su=function(){return new uu};function uu(){this.reset()}uu.prototype={constructor:uu,reset:function(){this.s=this.t=0},add:function(t){lu(cu,t,this.t),lu(this,cu.s,this.s),this.s?this.t+=cu.t:this.s=cu.t},valueOf:function(){return this.s}};var cu=new uu;function lu(t,e,n){var r=t.s=e+n,i=r-e,a=r-i;t.t=e-a+(n-i)}var fu=Math.PI,hu=fu/2,du=fu/4,pu=2*fu,yu=180/fu,gu=fu/180,mu=Math.abs,vu=Math.atan,bu=Math.atan2,xu=Math.cos,_u=Math.ceil,wu=Math.exp,ku=(Math.floor,Math.log),Eu=Math.pow,Tu=Math.sin,Au=Math.sign||function(t){return t>0?1:t<0?-1:0},Su=Math.sqrt,Mu=Math.tan;function Ou(t){return t>1?0:t<-1?fu:Math.acos(t)}function Nu(t){return t>1?hu:t<-1?-hu:Math.asin(t)}function Cu(t){return(t=Tu(t/2))*t}function Du(){}function Lu(t,e){t&&Iu.hasOwnProperty(t.type)&&Iu[t.type](t,e)}var Fu={Feature:function(t,e){Lu(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=xu(e=(e*=gu)/2+du),o=Tu(e),s=Uu*o,u=zu*a+s*xu(i),c=s*r*Tu(i);Gu.add(bu(c,u)),Yu=t,zu=a,Uu=o}var Ju=function(t){return Vu.reset(),$u(t,Hu),2*Vu};function Qu(t){return[bu(t[1],t[0]),Nu(t[2])]}function Ku(t){var e=t[0],n=t[1],r=xu(n);return[r*xu(e),r*Tu(e),Tu(n)]}function tc(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function ec(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 nc(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function rc(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function ic(t){var e=Su(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var ac,oc,sc,uc,cc,lc,fc,hc,dc,pc,yc=su(),gc={point:mc,lineStart:bc,lineEnd:xc,polygonStart:function(){gc.point=_c,gc.lineStart=wc,gc.lineEnd=kc,yc.reset(),Hu.polygonStart()},polygonEnd:function(){Hu.polygonEnd(),gc.point=mc,gc.lineStart=bc,gc.lineEnd=xc,Gu<0?(ac=-(sc=180),oc=-(uc=90)):yc>1e-6?uc=90:yc<-1e-6&&(oc=-90),pc[0]=ac,pc[1]=sc},sphere:function(){ac=-(sc=180),oc=-(uc=90)}};function mc(t,e){dc.push(pc=[ac=t,sc=t]),euc&&(uc=e)}function vc(t,e){var n=Ku([t*gu,e*gu]);if(hc){var r=ec(hc,n),i=ec([r[1],-r[0],0],r);ic(i),i=Qu(i);var a,o=t-cc,s=o>0?1:-1,u=i[0]*yu*s,c=mu(o)>180;c^(s*ccuc&&(uc=a):c^(s*cc<(u=(u+360)%360-180)&&uuc&&(uc=e)),c?tEc(ac,sc)&&(sc=t):Ec(t,sc)>Ec(ac,sc)&&(ac=t):sc>=ac?(tsc&&(sc=t)):t>cc?Ec(ac,t)>Ec(ac,sc)&&(sc=t):Ec(t,sc)>Ec(ac,sc)&&(ac=t)}else dc.push(pc=[ac=t,sc=t]);euc&&(uc=e),hc=n,cc=t}function bc(){gc.point=vc}function xc(){pc[0]=ac,pc[1]=sc,gc.point=mc,hc=null}function _c(t,e){if(hc){var n=t-cc;yc.add(mu(n)>180?n+(n>0?360:-360):n)}else lc=t,fc=e;Hu.point(t,e),vc(t,e)}function wc(){Hu.lineStart()}function kc(){_c(lc,fc),Hu.lineEnd(),mu(yc)>1e-6&&(ac=-(sc=180)),pc[0]=ac,pc[1]=sc,hc=null}function Ec(t,e){return(e-=t)<0?e+360:e}function Tc(t,e){return t[0]-e[0]}function Ac(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:eEc(r[0],r[1])&&(r[1]=i[1]),Ec(i[0],r[1])>Ec(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=Ec(r[1],i[0]))>o&&(o=s,ac=i[0],sc=r[1])}return dc=pc=null,ac===1/0||oc===1/0?[[NaN,NaN],[NaN,NaN]]:[[ac,oc],[sc,uc]]},Gc={sphere:Du,point:Vc,lineStart:Wc,lineEnd:Zc,polygonStart:function(){Gc.lineStart=Jc,Gc.lineEnd=Qc},polygonEnd:function(){Gc.lineStart=Wc,Gc.lineEnd=Zc}};function Vc(t,e){t*=gu;var n=xu(e*=gu);Hc(n*xu(t),n*Tu(t),Tu(e))}function Hc(t,e,n){++Sc,Oc+=(t-Oc)/Sc,Nc+=(e-Nc)/Sc,Cc+=(n-Cc)/Sc}function Wc(){Gc.point=qc}function qc(t,e){t*=gu;var n=xu(e*=gu);Yc=n*xu(t),zc=n*Tu(t),Uc=Tu(e),Gc.point=Xc,Hc(Yc,zc,Uc)}function Xc(t,e){t*=gu;var n=xu(e*=gu),r=n*xu(t),i=n*Tu(t),a=Tu(e),o=bu(Su((o=zc*a-Uc*i)*o+(o=Uc*r-Yc*a)*o+(o=Yc*i-zc*r)*o),Yc*r+zc*i+Uc*a);Mc+=o,Dc+=o*(Yc+(Yc=r)),Lc+=o*(zc+(zc=i)),Fc+=o*(Uc+(Uc=a)),Hc(Yc,zc,Uc)}function Zc(){Gc.point=Vc}function Jc(){Gc.point=Kc}function Qc(){tl(Bc,jc),Gc.point=Vc}function Kc(t,e){Bc=t,jc=e,t*=gu,e*=gu,Gc.point=tl;var n=xu(e);Yc=n*xu(t),zc=n*Tu(t),Uc=Tu(e),Hc(Yc,zc,Uc)}function tl(t,e){t*=gu;var n=xu(e*=gu),r=n*xu(t),i=n*Tu(t),a=Tu(e),o=zc*a-Uc*i,s=Uc*r-Yc*a,u=Yc*i-zc*r,c=Su(o*o+s*s+u*u),l=Nu(c),f=c&&-l/c;Ic+=f*o,Pc+=f*s,Rc+=f*u,Mc+=l,Dc+=l*(Yc+(Yc=r)),Lc+=l*(zc+(zc=i)),Fc+=l*(Uc+(Uc=a)),Hc(Yc,zc,Uc)}var el=function(t){Sc=Mc=Oc=Nc=Cc=Dc=Lc=Fc=Ic=Pc=Rc=0,$u(t,Gc);var e=Ic,n=Pc,r=Rc,i=e*e+n*n+r*r;return i<1e-12&&(e=Dc,n=Lc,r=Fc,Mc<1e-6&&(e=Oc,n=Nc,r=Cc),(i=e*e+n*n+r*r)<1e-12)?[NaN,NaN]:[bu(n,e)*yu,Nu(r/Su(i))*yu]},nl=function(t){return function(){return t}},rl=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 il(t,e){return[mu(t)>fu?t+Math.round(-t/pu)*pu:t,e]}function al(t,e,n){return(t%=pu)?e||n?rl(sl(t),ul(e,n)):sl(t):e||n?ul(e,n):il}function ol(t){return function(e,n){return[(e+=t)>fu?e-pu:e<-fu?e+pu:e,n]}}function sl(t){var e=ol(t);return e.invert=ol(-t),e}function ul(t,e){var n=xu(t),r=Tu(t),i=xu(e),a=Tu(e);function o(t,e){var o=xu(e),s=xu(t)*o,u=Tu(t)*o,c=Tu(e),l=c*n+s*r;return[bu(u*i-l*a,s*n-c*r),Nu(l*i+u*a)]}return o.invert=function(t,e){var o=xu(e),s=xu(t)*o,u=Tu(t)*o,c=Tu(e),l=c*i-u*a;return[bu(u*i+c*a,s*n+l*r),Nu(l*n-s*r)]},o}il.invert=il;var cl=function(t){function e(e){return(e=t(e[0]*gu,e[1]*gu))[0]*=yu,e[1]*=yu,e}return t=al(t[0]*gu,t[1]*gu,t.length>2?t[2]*gu:0),e.invert=function(e){return(e=t.invert(e[0]*gu,e[1]*gu))[0]*=yu,e[1]*=yu,e},e};function ll(t,e,n,r,i,a){if(n){var o=xu(e),s=Tu(e),u=r*n;null==i?(i=e+r*pu,a=e-u/2):(i=fl(o,i),a=fl(o,a),(r>0?ia)&&(i+=r*pu));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}}},pl=function(t,e){return mu(t[0]-e[0])<1e-6&&mu(t[1]-e[1])<1e-6};function yl(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 gl=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(pl(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 ml(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r=0?1:-1,T=E*k,A=T>fu,S=y*_;if(vl.add(bu(S*E*Tu(T),g*w+S*xu(T))),o+=A?k+E*pu:k,A^d>=n^b>=n){var M=ec(Ku(h),Ku(v));ic(M);var O=ec(a,M);ic(O);var N=(A^k>=0?-1:1)*Nu(O[2]);(r>N||r===N&&(M[0]||M[1]))&&(s+=A^k>=0?1:-1)}}return(o<-1e-6||o<1e-6&&vl<-1e-6)^1&s},_l=function(t,e,n,r){return function(i){var a,o,s,u=e(i),c=dl(),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=xl(a,r);o.length?(f||(i.polygonStart(),f=!0),gl(o,kl,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(wl))}return h}};function wl(t){return t.length>1}function kl(t,e){return((t=t.x)[0]<0?t[1]-hu-1e-6:hu-t[1])-((e=e.x)[0]<0?e[1]-hu-1e-6:hu-e[1])}var El=_l((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?fu:-fu,u=mu(a-n);mu(u-fu)<1e-6?(t.point(n,r=(r+o)/2>0?hu:-hu),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),t.point(a,r),e=0):i!==s&&u>=fu&&(mu(n-i)<1e-6&&(n-=1e-6*i),mu(a-s)<1e-6&&(a-=1e-6*s),r=function(t,e,n,r){var i,a,o=Tu(t-n);return mu(o)>1e-6?vu((Tu(e)*(a=xu(r))*Tu(n)-Tu(r)*(i=xu(e))*Tu(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*hu,r.point(-fu,i),r.point(0,i),r.point(fu,i),r.point(fu,0),r.point(fu,-i),r.point(0,-i),r.point(-fu,-i),r.point(-fu,0),r.point(-fu,i);else if(mu(t[0]-e[0])>1e-6){var a=t[0]0,i=mu(e)>1e-6;function a(t,n){return xu(t)*xu(n)>e}function o(t,n,r){var i=[1,0,0],a=ec(Ku(t),Ku(n)),o=tc(a,a),s=a[0],u=o-s*s;if(!u)return!r&&t;var c=e*o/u,l=-e*s/u,f=ec(i,a),h=rc(i,c);nc(h,rc(a,l));var d=f,p=tc(h,d),y=tc(d,d),g=p*p-y*(tc(h,h)-1);if(!(g<0)){var m=Su(g),v=rc(d,(-p-m)/y);if(nc(v,h),v=Qu(v),!r)return v;var b,x=t[0],_=n[0],w=t[1],k=n[1];_0^v[1]<(mu(v[0]-x)<1e-6?w:k):w<=v[1]&&v[1]<=k:E>fu^(x<=v[0]&&v[0]<=_)){var A=rc(d,(-p+m)/y);return nc(A,h),[v,Qu(A)]}}}function s(e,n){var i=r?t:fu-t,a=0;return e<-i?a|=1:e>i&&(a|=2),n<-i?a|=4:n>i&&(a|=8),a}return _l(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?fu:-fu),h):0;if(!e&&(c=u=y)&&t.lineStart(),y!==u&&(!(d=o(e,p))||pl(e,d)||pl(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&&pl(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){ll(a,t,n,i,e,r)}),r?[0,-t]:[-fu,t-fu])};function Al(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 mu(r[0]-t)<1e-6?i>0?0:3:mu(r[0]-n)<1e-6?i>0?2:1:mu(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=dl(),_={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&&gl(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 Sl,Ml,Ol,Nl=function(){var t,e,n,r=0,i=0,a=960,o=500;return n={stream:function(n){return t&&e===n?t:t=Al(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]]}}},Cl=su(),Dl={sphere:Du,point:Du,lineStart:function(){Dl.point=Fl,Dl.lineEnd=Ll},lineEnd:Du,polygonStart:Du,polygonEnd:Du};function Ll(){Dl.point=Dl.lineEnd=Du}function Fl(t,e){Sl=t*=gu,Ml=Tu(e*=gu),Ol=xu(e),Dl.point=Il}function Il(t,e){t*=gu;var n=Tu(e*=gu),r=xu(e),i=mu(t-Sl),a=xu(i),o=r*Tu(i),s=Ol*n-Ml*r*a,u=Ml*n+Ol*r*a;Cl.add(bu(Su(o*o+s*s),u)),Sl=t,Ml=n,Ol=r}var Pl=function(t){return Cl.reset(),$u(t,Dl),+Cl},Rl=[null,null],Bl={type:"LineString",coordinates:Rl},jl=function(t,e){return Rl[0]=t,Rl[1]=e,Pl(Bl)},Yl={Feature:function(t,e){return Ul(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r0&&(i=jl(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 Vl(t,e){return!!xl(t.map(Hl),Wl(e))}function Hl(t){return(t=t.map(Wl)).pop(),t}function Wl(t){return[t[0]*gu,t[1]*gu]}var ql=function(t,e){return(t&&Yl.hasOwnProperty(t.type)?Yl[t.type]:Ul)(t,e)};function Xl(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 Zl(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 Jl(){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(_u(r/p)*p,n,p).map(l).concat(w(_u(s/y)*y,o,y).map(f)).concat(w(_u(e/h)*h,t,h).filter((function(t){return mu(t%p)>1e-6})).map(u)).concat(w(_u(a/d)*d,i,d).filter((function(t){return mu(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=Xl(a,i,90),c=Zl(e,t,g),l=Xl(s,o,90),f=Zl(r,n,g),m):g},m.extentMajor([[-180,1e-6-90],[180,90-1e-6]]).extentMinor([[-180,-80-1e-6],[180,80+1e-6]])}function Ql(){return Jl()()}var Kl,tf,ef,nf,rf=function(t,e){var n=t[0]*gu,r=t[1]*gu,i=e[0]*gu,a=e[1]*gu,o=xu(r),s=Tu(r),u=xu(a),c=Tu(a),l=o*xu(n),f=o*Tu(n),h=u*xu(i),d=u*Tu(i),p=2*Nu(Su(Cu(a-r)+o*u*Cu(i-n))),y=Tu(p),g=p?function(t){var e=Tu(t*=p)/y,n=Tu(p-t)/y,r=n*l+e*h,i=n*f+e*d,a=n*s+e*c;return[bu(i,r)*yu,bu(a,Su(r*r+i*i))*yu]}:function(){return[n*yu,r*yu]};return g.distance=p,g},af=function(t){return t},of=su(),sf=su(),uf={point:Du,lineStart:Du,lineEnd:Du,polygonStart:function(){uf.lineStart=cf,uf.lineEnd=hf},polygonEnd:function(){uf.lineStart=uf.lineEnd=uf.point=Du,of.add(mu(sf)),sf.reset()},result:function(){var t=of/2;return of.reset(),t}};function cf(){uf.point=lf}function lf(t,e){uf.point=ff,Kl=ef=t,tf=nf=e}function ff(t,e){sf.add(nf*t-ef*e),ef=t,nf=e}function hf(){ff(Kl,tf)}var df=uf,pf=1/0,yf=pf,gf=-pf,mf=gf;var vf,bf,xf,_f,wf={point:function(t,e){tgf&&(gf=t);emf&&(mf=e)},lineStart:Du,lineEnd:Du,polygonStart:Du,polygonEnd:Du,result:function(){var t=[[pf,yf],[gf,mf]];return gf=mf=-(yf=pf=1/0),t}},kf=0,Ef=0,Tf=0,Af=0,Sf=0,Mf=0,Of=0,Nf=0,Cf=0,Df={point:Lf,lineStart:Ff,lineEnd:Rf,polygonStart:function(){Df.lineStart=Bf,Df.lineEnd=jf},polygonEnd:function(){Df.point=Lf,Df.lineStart=Ff,Df.lineEnd=Rf},result:function(){var t=Cf?[Of/Cf,Nf/Cf]:Mf?[Af/Mf,Sf/Mf]:Tf?[kf/Tf,Ef/Tf]:[NaN,NaN];return kf=Ef=Tf=Af=Sf=Mf=Of=Nf=Cf=0,t}};function Lf(t,e){kf+=t,Ef+=e,++Tf}function Ff(){Df.point=If}function If(t,e){Df.point=Pf,Lf(xf=t,_f=e)}function Pf(t,e){var n=t-xf,r=e-_f,i=Su(n*n+r*r);Af+=i*(xf+t)/2,Sf+=i*(_f+e)/2,Mf+=i,Lf(xf=t,_f=e)}function Rf(){Df.point=Lf}function Bf(){Df.point=Yf}function jf(){zf(vf,bf)}function Yf(t,e){Df.point=zf,Lf(vf=xf=t,bf=_f=e)}function zf(t,e){var n=t-xf,r=e-_f,i=Su(n*n+r*r);Af+=i*(xf+t)/2,Sf+=i*(_f+e)/2,Mf+=i,Of+=(i=_f*t-xf*e)*(xf+t),Nf+=i*(_f+e),Cf+=3*i,Lf(xf=t,_f=e)}var Uf=Df;function $f(t){this._context=t}$f.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,pu)}},result:Du};var Gf,Vf,Hf,Wf,qf,Xf=su(),Zf={point:Du,lineStart:function(){Zf.point=Jf},lineEnd:function(){Gf&&Qf(Vf,Hf),Zf.point=Du},polygonStart:function(){Gf=!0},polygonEnd:function(){Gf=null},result:function(){var t=+Xf;return Xf.reset(),t}};function Jf(t,e){Zf.point=Qf,Vf=Wf=t,Hf=qf=e}function Qf(t,e){Wf-=t,qf-=e,Xf.add(Su(Wf*Wf+qf*qf)),Wf=t,qf=e}var Kf=Zf;function th(){this._string=[]}function eh(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}th.prototype={_radius:4.5,_circle:eh(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=eh(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 nh=function(t,e){var n,r,i=4.5;function a(t){return t&&("function"==typeof i&&r.pointRadius(+i.apply(this,arguments)),$u(t,n(r))),r.result()}return a.area=function(t){return $u(t,n(df)),df.result()},a.measure=function(t){return $u(t,n(Kf)),Kf.result()},a.bounds=function(t){return $u(t,n(wf)),wf.result()},a.centroid=function(t){return $u(t,n(Uf)),Uf.result()},a.projection=function(e){return arguments.length?(n=null==e?(t=null,af):(t=e).stream,a):t},a.context=function(t){return arguments.length?(r=null==t?(e=null,new th):new $f(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)},rh=function(t){return{stream:ih(t)}};function ih(t){return function(e){var n=new ah;for(var r in t)n[r]=t[r];return n.stream=e,n}}function ah(){}function oh(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),$u(n,t.stream(wf)),e(wf.result()),null!=r&&t.clipExtent(r),t}function sh(t,e,n){return oh(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 uh(t,e,n){return sh(t,[[0,0],e],n)}function ch(t,e,n){return oh(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 lh(t,e,n){return oh(t,(function(n){var r=+e,i=r/(n[1][1]-n[0][1]),a=-i*n[0][0],o=(r-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([a,o])}),n)}ah.prototype={constructor:ah,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var fh=xu(30*gu),hh=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=Su(x*x+_*_+w*w),E=Nu(w/=k),T=mu(mu(w)-1)<1e-6||mu(a-f)<1e-6?(a+f)/2:bu(_,x),A=t(T,E),S=A[0],M=A[1],O=S-r,N=M-i,C=v*O-m*N;(C*C/b>e||mu((m*O+v*N)/b-.5)>.3||o*h+s*d+u*p2?t[2]%360*gu:0,S()):[g*yu,m*yu,v*yu]},T.angle=function(t){return arguments.length?(b=t%360*gu,S()):b*yu},T.precision=function(t){return arguments.length?(o=hh(s,E=t*t),M()):Su(E)},T.fitExtent=function(t,e){return sh(T,t,e)},T.fitSize=function(t,e){return uh(T,t,e)},T.fitWidth=function(t,e){return ch(T,t,e)},T.fitHeight=function(t,e){return lh(T,t,e)},function(){return e=t.apply(this,arguments),T.invert=e.invert&&A,S()}}function vh(t){var e=0,n=fu/3,r=mh(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*gu,n=t[1]*gu):[e*yu,n*yu]},i}function bh(t,e){var n=Tu(t),r=(n+Tu(e))/2;if(mu(r)<1e-6)return function(t){var e=xu(t);function n(t,n){return[t*e,Tu(n)/e]}return n.invert=function(t,n){return[t/e,Nu(n*e)]},n}(t);var i=1+n*(2*r-n),a=Su(i)/r;function o(t,e){var n=Su(i-2*r*Tu(e))/r;return[n*Tu(t*=r),a-n*xu(t)]}return o.invert=function(t,e){var n=a-e;return[bu(t,mu(n))/r*Au(n),Nu((i-(t*t+n*n)*r*r)/(2*r))]},o}var xh=function(){return vh(bh).scale(155.424).center([0,33.6442])},_h=function(){return xh().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])};var wh=function(){var t,e,n,r,i,a,o=_h(),s=xh().rotate([154,0]).center([-2,58.5]).parallels([55,65]),u=xh().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-hu&&(e=1e-6-hu):e>hu-1e-6&&(e=hu-1e-6);var n=i/Eu(Dh(e),r);return[n*Tu(r*t),i-n*xu(r*t)]}return a.invert=function(t,e){var n=i-e,a=Au(r)*Su(t*t+n*n);return[bu(t,mu(n))/r*Au(n),2*vu(Eu(i/a,1/r))-hu]},a}var Fh=function(){return vh(Lh).scale(109.5).parallels([30,30])};function Ih(t,e){return[t,e]}Ih.invert=Ih;var Ph=function(){return gh(Ih).scale(152.63)};function Rh(t,e){var n=xu(t),r=t===e?Tu(t):(n-xu(e))/(e-t),i=n/r+t;if(mu(r)<1e-6)return Ih;function a(t,e){var n=i-e,a=r*t;return[n*Tu(a),i-n*xu(a)]}return a.invert=function(t,e){var n=i-e;return[bu(t,mu(n))/r*Au(n),i-Au(r)*Su(t*t+n*n)]},a}var Bh=function(){return vh(Rh).scale(131.154).center([0,13.9389])},jh=1.340264,Yh=-.081106,zh=893e-6,Uh=.003796,$h=Su(3)/2;function Gh(t,e){var n=Nu($h*Tu(e)),r=n*n,i=r*r*r;return[t*xu(n)/($h*(jh+3*Yh*r+i*(7*zh+9*Uh*r))),n*(jh+Yh*r+i*(zh+Uh*r))]}Gh.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*(jh+Yh*i+a*(zh+Uh*i))-e)/(jh+3*Yh*i+a*(7*zh+9*Uh*i)))*r)*i*i,!(mu(n)<1e-12));++o);return[$h*t*(jh+3*Yh*i+a*(7*zh+9*Uh*i))/xu(r),Nu(Tu(r)/$h)]};var Vh=function(){return gh(Gh).scale(177.158)};function Hh(t,e){var n=xu(e),r=xu(t)*n;return[n*Tu(t)/r,Tu(e)/r]}Hh.invert=Eh(vu);var Wh=function(){return gh(Hh).scale(144.049).clipAngle(60)};function qh(t,e,n,r){return 1===t&&1===e&&0===n&&0===r?af:ih({point:function(i,a){this.stream.point(i*t+n,a*e+r)}})}var Xh=function(){var t,e,n,r,i,a,o=1,s=0,u=0,c=1,l=1,f=af,h=null,d=af;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,af):Al(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=qh((o=+t)*c,o*l,s,u),p()):o},translate:function(t){return arguments.length?(f=qh(o*c,o*l,s=+t[0],u=+t[1]),p()):[s,u]},reflectX:function(t){return arguments.length?(f=qh(o*(c=t?-1:1),o*l,s,u),p()):c<0},reflectY:function(t){return arguments.length?(f=qh(o*c,o*(l=t?-1:1),s,u),p()):l<0},fitExtent:function(t,e){return sh(a,t,e)},fitSize:function(t,e){return uh(a,t,e)},fitWidth:function(t,e){return ch(a,t,e)},fitHeight:function(t,e){return lh(a,t,e)}}};function Zh(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)))]}Zh.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(mu(n)>1e-6&&--i>0);return[t/(.8707+(a=r*r)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),r]};var Jh=function(){return gh(Zh).scale(175.295)};function Qh(t,e){return[xu(e)*Tu(t),Tu(e)]}Qh.invert=Eh(Nu);var Kh=function(){return gh(Qh).scale(249.5).clipAngle(90+1e-6)};function td(t,e){var n=xu(e),r=1+xu(t)*n;return[n*Tu(t)/r,Tu(e)/r]}td.invert=Eh((function(t){return 2*vu(t)}));var ed=function(){return gh(td).scale(250).clipAngle(142)};function nd(t,e){return[ku(Mu((hu+e)/2)),-t]}nd.invert=function(t,e){return[-e,2*vu(wu(t))-hu]};var rd=function(){var t=Ch(nd),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 id(t,e){return t.parent===e.parent?1:2}function ad(t,e){return t+e.x}function od(t,e){return Math.max(t,e.y)}var sd=function(){var t=id,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(ad,0)/t.length}(n),e.y=function(t){return 1+t.reduce(od,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 ud(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 cd(t,e){var n,r,i,a,o,s=new dd(t),u=+t.value&&(s.value=t.value),c=[s];for(null==e&&(e=ld);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 dd(i[a])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(hd)}function ld(t){return t.children}function fd(t){t.data=t.data.data}function hd(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function dd(t){this.data=t,this.depth=this.height=0,this.parent=null}dd.prototype=cd.prototype={constructor:dd,count:function(){return this.eachAfter(ud)},each:function(t){var e,n,r,i,a=this,o=[a];do{for(e=o.reverse(),o=[];a=e.pop();)if(t(a),n=a.children)for(r=0,i=n.length;r=0;--n)i.push(e[n]);return this},sum:function(t){return this.eachAfter((function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;t=n.pop(),e=r.pop();for(;t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){var t=[];return this.each((function(e){t.push(e)})),t},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(n){n!==t&&e.push({source:n.parent,target:n})})),e},copy:function(){return cd(this).eachBefore(fd)}};var pd=Array.prototype.slice;var yd=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}(pd.call(t))).length,a=[];r0&&n*n>r*r+i*i}function bd(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 Ed(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 Td(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 Ad(t){this._=t,this.next=null,this.previous=null}function Sd(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;kd(n,e,r=t[2]),e=new Ad(e),n=new Ad(n),r=new Ad(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=Nd(e),n):t},n.parentId=function(t){return arguments.length?(e=Nd(t),n):e},n};function Hd(t,e){return t.parent===e.parent?1:2}function Wd(t){var e=t.children;return e?e[0]:t.t}function qd(t){var e=t.children;return e?e[e.length-1]:t.t}function Xd(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 Zd(t,e,n){return t.a.parent===e.parent?t.a:n}function Jd(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}Jd.prototype=Object.create(dd.prototype);var Qd=function(){var t=Hd,e=1,n=1,r=null;function i(i){var u=function(t){for(var e,n,r,i,a,o=new Jd(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 Jd(r[i],i)),n.parent=e;return(o.parent=new Jd(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=qd(s),a=Wd(a),s&&a;)u=Wd(u),(o=qd(o)).a=e,(i=s.z+f-a.z-c+t(s._,a._))>0&&(Xd(Zd(s,e,r),e,i),c+=i,l+=i),f+=s.m,c+=a.m,h+=u.m,l+=o.m;s&&!qd(o)&&(o.t=s,o.m+=f-l),a&&!Wd(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},Kd=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}(tp),rp=function(){var t=np,e=!1,n=1,r=1,i=[0],a=Cd,o=Cd,s=Cd,u=Cd,c=Cd;function l(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(f),i=[0],e&&t.eachBefore(Bd),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)}var f=c[e],h=r/2+f,d=e+1,p=n-1;for(;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)},ap=function(t,e,n,r,i){(1&t.depth?Kd:jd)(t,e,n,r,i)},op=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}(tp),sp=function(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}},up=function(t,e){var n=cn(+t,+e);return function(t){var e=n(t);return e-360*Math.floor(e/360)}},cp=function(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}},lp=Math.SQRT2;function fp(t){return((t=Math.exp(t))+1/t)/2}var hp=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)/lp,n=function(t){return[i+t*l,a+t*f,o*Math.exp(lp*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)/lp,n=function(t){var e,n=t*r,s=fp(g),u=o/(2*d)*(s*(e=lp*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/fp(lp*n+g)]}}return n.duration=1e3*r,n};function dp(t){return function(e,n){var r=t((e=tn(e)).h,(n=tn(n)).h),i=fn(e.s,n.s),a=fn(e.l,n.l),o=fn(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 pp=dp(cn),yp=dp(fn);function gp(t,e){var n=fn((t=pa(t)).l,(e=pa(e)).l),r=fn(t.a,e.a),i=fn(t.b,e.b),a=fn(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 mp(t){return function(e,n){var r=t((e=wa(e)).h,(n=wa(n)).h),i=fn(e.c,n.c),a=fn(e.l,n.l),o=fn(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 vp=mp(cn),bp=mp(fn);function xp(t){return function e(n){function r(e,r){var i=t((e=Na(e)).h,(r=Na(r)).h),a=fn(e.s,r.s),o=fn(e.l,r.l),s=fn(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 _p=xp(cn),wp=xp(fn);function kp(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 Op=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},Cp=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}(Dp),Ip=function t(e){function n(){var t=Fp.source(e).apply(this,arguments);return function(){return Math.exp(t())}}return n.source=t,n}(Dp),Pp=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 ty(t,e,n){var r=t[0],i=t[1],a=e[0],o=e[1];return i2?ey:ty,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),_n)))(n)))},f.domain=function(t){return arguments.length?(o=Up.call(t,Xp),c===Jp||(c=Kp(o)),l()):o.slice()},f.range=function(t){return arguments.length?(s=$p.call(t),l()):s.slice()},f.rangeRound=function(t){return s=$p.call(t),u=cp,l()},f.clamp=function(t){return arguments.length?(c=t?Kp(o):Jp,f):c!==Jp},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 iy(t,e){return ry()(t,e)}var ay=function(t,e,n,r){var i,a=M(t,e,n);switch((r=Vs(null==r?",f":r)).type){case"s":var o=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=au(a,o))||(r.precision=i),Zs(r,o);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=ou(a,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=iu(a))||(r.precision=i-2*("%"===r.type))}return Xs(r)};function oy(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 ay(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=S(s=Math.floor(s/r)*r,u=Math.ceil(u/r)*r,n):r<0&&(r=S(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 sy(){var t=iy(Jp,Jp);return t.copy=function(){return ny(t,sy())},jp.apply(t,arguments),oy(t)}function uy(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=Up.call(e,Xp),n):t.slice()},n.unknown=function(t){return arguments.length?(e=t,n):e},n.copy=function(){return uy(t).unknown(e)},t=arguments.length?Up.call(t,Xp):[0,1],oy(n)}var cy=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=Xs(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 Oy().domain([e,n]).range(a).unknown(t)},jp.apply(oy(o),arguments)}function Ny(){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=$p.call(t),r=Math.min(e.length,n.length-1),i):e.slice()},i.range=function(t){return arguments.length?(n=$p.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 Ny().domain(e).range(n).unknown(t)},jp.apply(i,arguments)}var Cy=new Date,Dy=new Date;function Ly(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 Cy.setTime(+e),Dy.setTime(+r),t(Cy),t(Dy),Math.floor(n(Cy,Dy))},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 Fy=Ly((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()}));Fy.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Ly((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 Iy=Fy,Py=Fy.range,Ry=Ly((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()})),By=Ry,jy=Ry.range;function Yy(t){return Ly((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 zy=Yy(0),Uy=Yy(1),$y=Yy(2),Gy=Yy(3),Vy=Yy(4),Hy=Yy(5),Wy=Yy(6),qy=zy.range,Xy=Uy.range,Zy=$y.range,Jy=Gy.range,Qy=Vy.range,Ky=Hy.range,tg=Wy.range,eg=Ly((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})),ng=eg,rg=eg.range,ig=Ly((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()})),ag=ig,og=ig.range,sg=Ly((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()})),ug=sg,cg=sg.range,lg=Ly((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()})),fg=lg,hg=lg.range,dg=Ly((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));dg.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?Ly((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):dg:null};var pg=dg,yg=dg.range;function gg(t){return Ly((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 mg=gg(0),vg=gg(1),bg=gg(2),xg=gg(3),_g=gg(4),wg=gg(5),kg=gg(6),Eg=mg.range,Tg=vg.range,Ag=bg.range,Sg=xg.range,Mg=_g.range,Og=wg.range,Ng=kg.range,Cg=Ly((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})),Dg=Cg,Lg=Cg.range,Fg=Ly((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()}));Fg.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Ly((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 Ig=Fg,Pg=Fg.range;function Rg(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 Bg(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 jg(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function Yg(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=Qg(i),l=Kg(i),f=Qg(a),h=Kg(a),d=Qg(o),p=Kg(o),y=Qg(s),g=Kg(s),m=Qg(u),v=Kg(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:xm,e:xm,f:Tm,H:_m,I:wm,j:km,L:Em,m:Am,M:Sm,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:ev,s:nv,S:Mm,u:Om,U:Nm,V:Cm,w:Dm,W:Lm,x:null,X:null,y:Fm,Y:Im,Z:Pm,"%":tv},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:Rm,e:Rm,f:Um,H:Bm,I:jm,j:Ym,L:zm,m:$m,M:Gm,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:ev,s:nv,S:Vm,u:Hm,U:Wm,V:qm,w:Xm,W:Zm,x:null,X:null,y:Jm,Y:Qm,Z:Km,"%":tv},_={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:lm,e:lm,f:gm,H:hm,I:hm,j:fm,L:ym,m:cm,M:dm,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:um,Q:vm,s:bm,S:pm,u:em,U:nm,V:rm,w:tm,W:im,x:function(t,e,r){return E(t,n,e,r)},X:function(t,e,n){return E(t,r,e,n)},y:om,Y:am,Z:sm,"%":mm};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=Bg(jg(a.y,0,1))).getUTCDay(),r=i>4||0===i?vg.ceil(r):vg(r),r=Dg.offset(r,7*(a.V-1)),a.y=r.getUTCFullYear(),a.m=r.getUTCMonth(),a.d=r.getUTCDate()+(a.w+6)%7):(i=(r=Rg(jg(a.y,0,1))).getDay(),r=i>4||0===i?Uy.ceil(r):Uy(r),r=ng.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?Bg(jg(a.y,0,1)).getUTCDay():Rg(jg(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,Bg(a)):Rg(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 Hg?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 zg,Ug,$g,Gg,Vg,Hg={"-":"",_:" ",0:"0"},Wg=/^\s*\d+/,qg=/^%/,Xg=/[\\^$*+?|[\]().{}]/g;function Zg(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 sm(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 um(t,e,n){var r=Wg.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function cm(t,e,n){var r=Wg.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function lm(t,e,n){var r=Wg.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function fm(t,e,n){var r=Wg.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function hm(t,e,n){var r=Wg.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function dm(t,e,n){var r=Wg.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function pm(t,e,n){var r=Wg.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function ym(t,e,n){var r=Wg.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function gm(t,e,n){var r=Wg.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function mm(t,e,n){var r=qg.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function vm(t,e,n){var r=Wg.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function bm(t,e,n){var r=Wg.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function xm(t,e){return Zg(t.getDate(),e,2)}function _m(t,e){return Zg(t.getHours(),e,2)}function wm(t,e){return Zg(t.getHours()%12||12,e,2)}function km(t,e){return Zg(1+ng.count(Iy(t),t),e,3)}function Em(t,e){return Zg(t.getMilliseconds(),e,3)}function Tm(t,e){return Em(t,e)+"000"}function Am(t,e){return Zg(t.getMonth()+1,e,2)}function Sm(t,e){return Zg(t.getMinutes(),e,2)}function Mm(t,e){return Zg(t.getSeconds(),e,2)}function Om(t){var e=t.getDay();return 0===e?7:e}function Nm(t,e){return Zg(zy.count(Iy(t)-1,t),e,2)}function Cm(t,e){var n=t.getDay();return t=n>=4||0===n?Vy(t):Vy.ceil(t),Zg(Vy.count(Iy(t),t)+(4===Iy(t).getDay()),e,2)}function Dm(t){return t.getDay()}function Lm(t,e){return Zg(Uy.count(Iy(t)-1,t),e,2)}function Fm(t,e){return Zg(t.getFullYear()%100,e,2)}function Im(t,e){return Zg(t.getFullYear()%1e4,e,4)}function Pm(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Zg(e/60|0,"0",2)+Zg(e%60,"0",2)}function Rm(t,e){return Zg(t.getUTCDate(),e,2)}function Bm(t,e){return Zg(t.getUTCHours(),e,2)}function jm(t,e){return Zg(t.getUTCHours()%12||12,e,2)}function Ym(t,e){return Zg(1+Dg.count(Ig(t),t),e,3)}function zm(t,e){return Zg(t.getUTCMilliseconds(),e,3)}function Um(t,e){return zm(t,e)+"000"}function $m(t,e){return Zg(t.getUTCMonth()+1,e,2)}function Gm(t,e){return Zg(t.getUTCMinutes(),e,2)}function Vm(t,e){return Zg(t.getUTCSeconds(),e,2)}function Hm(t){var e=t.getUTCDay();return 0===e?7:e}function Wm(t,e){return Zg(mg.count(Ig(t)-1,t),e,2)}function qm(t,e){var n=t.getUTCDay();return t=n>=4||0===n?_g(t):_g.ceil(t),Zg(_g.count(Ig(t),t)+(4===Ig(t).getUTCDay()),e,2)}function Xm(t){return t.getUTCDay()}function Zm(t,e){return Zg(vg.count(Ig(t)-1,t),e,2)}function Jm(t,e){return Zg(t.getUTCFullYear()%100,e,2)}function Qm(t,e){return Zg(t.getUTCFullYear()%1e4,e,4)}function Km(){return"+0000"}function tv(){return"%"}function ev(t){return+t}function nv(t){return Math.floor(+t/1e3)}function rv(t){return zg=Yg(t),Ug=zg.format,$g=zg.parse,Gg=zg.utcFormat,Vg=zg.utcParse,zg}rv({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function iv(t){return new Date(t)}function av(t){return t instanceof Date?+t:+new Date(+t)}function ov(t,e,n,r,a,o,s,u,c){var l=iy(Jp,Jp),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 qb.h=360*t-100,qb.s=1.5-1.5*e,qb.l=.8-.9*e,qb+""},Zb=We(),Jb=Math.PI/3,Qb=2*Math.PI/3,Kb=function(t){var e;return t=(.5-t)*Math.PI,Zb.r=255*(e=Math.sin(t))*e,Zb.g=255*(e=Math.sin(t+Jb))*e,Zb.b=255*(e=Math.sin(t+Qb))*e,Zb+""},tx=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 ex(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}var nx=ex(Dv("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),rx=ex(Dv("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),ix=ex(Dv("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),ax=ex(Dv("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),ox=function(t){return we(ne(t).call(document.documentElement))},sx=0;function ux(){return new cx}function cx(){this._="@"+(++sx).toString(36)}cx.prototype=ux.prototype={constructor:cx,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 lx=function(t){return"string"==typeof t?new be([document.querySelectorAll(t)],[document.documentElement]):new be([null==t?[]:t],ve)},fx=function(t,e){null==e&&(e=On().touches);for(var n=0,r=e?e.length:0,i=new Array(r);n1?0:t<-1?xx:Math.acos(t)}function Ex(t){return t>=1?_x:t<=-1?-_x:Math.asin(t)}function Tx(t){return t.innerRadius}function Ax(t){return t.outerRadius}function Sx(t){return t.startAngle}function Mx(t){return t.endAngle}function Ox(t){return t&&t.padAngle}function Nx(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 Cx(t,e,n,r,i,a,o){var s=t-n,u=e-r,c=(o?a:-a)/bx(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)*bx(gx(0,_*_*x-w*w)),E=(w*b-v*k)/x,T=(-w*v-b*k)/x,A=(w*b+v*k)/x,S=(-w*v+b*k)/x,M=E-g,O=T-m,N=A-g,C=S-m;return M*M+O*O>N*N+C*C&&(E=A,T=S),{cx:E,cy:T,x01:-l,y01:-f,x11:E*(i/_-1),y11:T*(i/_-1)}}var Dx=function(){var t=Tx,e=Ax,n=hx(0),r=null,i=Sx,a=Mx,o=Ox,s=null;function u(){var u,c,l=+t.apply(this,arguments),f=+e.apply(this,arguments),h=i.apply(this,arguments)-_x,d=a.apply(this,arguments)-_x,p=dx(d-h),y=d>h;if(s||(s=u=Ui()),f1e-12)if(p>wx-1e-12)s.moveTo(f*yx(h),f*vx(h)),s.arc(0,0,f,h,d,!y),l>1e-12&&(s.moveTo(l*yx(d),l*vx(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,T=E>1e-12&&(r?+r.apply(this,arguments):bx(l*l+f*f)),A=mx(dx(f-l)/2,+n.apply(this,arguments)),S=A,M=A;if(T>1e-12){var O=Ex(T/l*vx(E)),N=Ex(T/f*vx(E));(w-=2*O)>1e-12?(x+=O*=y?1:-1,_-=O):(w=0,x=_=(h+d)/2),(k-=2*N)>1e-12?(v+=N*=y?1:-1,b-=N):(k=0,v=b=(h+d)/2)}var C=f*yx(v),D=f*vx(v),L=l*yx(_),F=l*vx(_);if(A>1e-12){var I,P=f*yx(b),R=f*vx(b),B=l*yx(x),j=l*vx(x);if(p1e-12?M>1e-12?(g=Cx(B,j,C,D,f,M,y),m=Cx(P,R,L,F,f,M,y),s.moveTo(g.cx+g.x01,g.cy+g.y01),M1e-12&&w>1e-12?S>1e-12?(g=Cx(L,F,P,R,l,-S,y),m=Cx(C,D,B,j,l,-S,y),s.lineTo(g.cx+g.x01,g.cy+g.y01),S=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 Rx().defined(i).curve(o).context(a)}return u.x=function(n){return arguments.length?(t="function"==typeof n?n:hx(+n),e=null,u):t},u.x0=function(e){return arguments.length?(t="function"==typeof e?e:hx(+e),u):t},u.x1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:hx(+t),u):e},u.y=function(t){return arguments.length?(n="function"==typeof t?t:hx(+t),r=null,u):n},u.y0=function(t){return arguments.length?(n="function"==typeof t?t:hx(+t),u):n},u.y1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:hx(+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:hx(!!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},jx=function(t,e){return et?1:e>=t?0:NaN},Yx=function(t){return t},zx=function(){var t=Yx,e=jx,n=null,r=hx(0),i=hx(wx),a=hx(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(wx,Math.max(-wx,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:hx(+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:hx(+t),o):r},o.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:hx(+t),o):i},o.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:hx(+t),o):a},o},Ux=Gx(Fx);function $x(t){this._curve=t}function Gx(t){function e(e){return new $x(t(e))}return e._curve=t,e}function Vx(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(Gx(t)):e()._curve},t}$x.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 Hx=function(){return Vx(Rx().curve(Ux))},Wx=function(){var t=Bx().curve(Ux),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 Vx(n())},delete t.lineX0,t.lineEndAngle=function(){return Vx(r())},delete t.lineX1,t.lineInnerRadius=function(){return Vx(i())},delete t.lineY0,t.lineOuterRadius=function(){return Vx(a())},delete t.lineY1,t.curve=function(t){return arguments.length?e(Gx(t)):e()._curve},t},qx=function(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]},Xx=Array.prototype.slice;function Zx(t){return t.source}function Jx(t){return t.target}function Qx(t){var e=Zx,n=Jx,r=Ix,i=Px,a=null;function o(){var o,s=Xx.call(arguments),u=e.apply(this,s),c=n.apply(this,s);if(a||(a=o=Ui()),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:hx(+t),o):r},o.y=function(t){return arguments.length?(i="function"==typeof t?t:hx(+t),o):i},o.context=function(t){return arguments.length?(a=null==t?null:t,o):a},o}function Kx(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e=(e+r)/2,n,e,i,r,i)}function t_(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e,n=(n+i)/2,r,n,r,i)}function e_(t,e,n,r,i){var a=qx(e,n),o=qx(e,n=(n+i)/2),s=qx(r,n),u=qx(r,i);t.moveTo(a[0],a[1]),t.bezierCurveTo(o[0],o[1],s[0],s[1],u[0],u[1])}function n_(){return Qx(Kx)}function r_(){return Qx(t_)}function i_(){var t=Qx(e_);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}var a_={draw:function(t,e){var n=Math.sqrt(e/xx);t.moveTo(n,0),t.arc(0,0,n,0,wx)}},o_={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()}},s_=Math.sqrt(1/3),u_=2*s_,c_={draw:function(t,e){var n=Math.sqrt(e/u_),r=n*s_;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}},l_=Math.sin(xx/10)/Math.sin(7*xx/10),f_=Math.sin(wx/10)*l_,h_=-Math.cos(wx/10)*l_,d_={draw:function(t,e){var n=Math.sqrt(.8908130915292852*e),r=f_*n,i=h_*n;t.moveTo(0,-n),t.lineTo(r,i);for(var a=1;a<5;++a){var o=wx*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()}},p_={draw:function(t,e){var n=Math.sqrt(e),r=-n/2;t.rect(r,r,n,n)}},y_=Math.sqrt(3),g_={draw:function(t,e){var n=-Math.sqrt(e/(3*y_));t.moveTo(0,2*n),t.lineTo(-y_*n,-n),t.lineTo(y_*n,-n),t.closePath()}},m_=Math.sqrt(3)/2,v_=1/Math.sqrt(12),b_=3*(v_/2+1),x_={draw:function(t,e){var n=Math.sqrt(e/b_),r=n/2,i=n*v_,a=r,o=n*v_+n,s=-a,u=o;t.moveTo(r,i),t.lineTo(a,o),t.lineTo(s,u),t.lineTo(-.5*r-m_*i,m_*r+-.5*i),t.lineTo(-.5*a-m_*o,m_*a+-.5*o),t.lineTo(-.5*s-m_*u,m_*s+-.5*u),t.lineTo(-.5*r+m_*i,-.5*i-m_*r),t.lineTo(-.5*a+m_*o,-.5*o-m_*a),t.lineTo(-.5*s+m_*u,-.5*u-m_*s),t.closePath()}},__=[a_,o_,c_,p_,d_,g_,x_],w_=function(){var t=hx(a_),e=hx(64),n=null;function r(){var r;if(n||(n=r=Ui()),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:hx(e),r):t},r.size=function(t){return arguments.length?(e="function"==typeof t?t:hx(+t),r):e},r.context=function(t){return arguments.length?(n=null==t?null:t,r):n},r},k_=function(){};function E_(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 T_(t){this._context=t}T_.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:E_(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:E_(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};var A_=function(t){return new T_(t)};function S_(t){this._context=t}S_.prototype={areaStart:k_,areaEnd:k_,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:E_(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};var M_=function(t){return new S_(t)};function O_(t){this._context=t}O_.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:E_(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};var N_=function(t){return new O_(t)};function C_(t,e){this._basis=new T_(t),this._beta=e}C_.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 D_=function t(e){function n(t){return 1===e?new T_(t):new C_(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function L_(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 F_(t,e){this._context=t,this._k=(1-e)/6}F_.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:L_(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:L_(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 F_(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:k_,areaEnd:k_,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:L_(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 R_=function t(e){function n(t){return new P_(t,e)}return n.tension=function(e){return t(+e)},n}(0);function B_(t,e){this._context=t,this._k=(1-e)/6}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._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:L_(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 j_=function t(e){function n(t){return new B_(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Y_(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 z_(t,e){this._context=t,this._alpha=e}z_.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:Y_(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 U_=function t(e){function n(t){return e?new z_(t,e):new F_(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function $_(t,e){this._context=t,this._alpha=e}$_.prototype={areaStart:k_,areaEnd:k_,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:Y_(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 G_=function t(e){function n(t){return e?new $_(t,e):new P_(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function V_(t,e){this._context=t,this._alpha=e}V_.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:Y_(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 H_=function t(e){function n(t){return e?new V_(t,e):new B_(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function W_(t){this._context=t}W_.prototype={areaStart:k_,areaEnd:k_,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 q_=function(t){return new W_(t)};function X_(t){return t<0?-1:1}function Z_(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(X_(a)+X_(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function J_(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Q_(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 K_(t){this._context=t}function tw(t){this._context=new ew(t)}function ew(t){this._context=t}function nw(t){return new K_(t)}function rw(t){return new tw(t)}function iw(t){this._context=t}function aw(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 uw=function(t){return new sw(t,.5)};function cw(t){return new sw(t,0)}function lw(t){return new sw(t,1)}var fw=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 dw(t,e){return t[e]}var pw=function(){var t=hx([]),e=hw,n=fw,r=dw;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)},mw=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 _w=function(t){var e=t.map(ww);return hw(t).sort((function(t,n){return e[t]-e[n]}))};function ww(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 Uw(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]=-lk)){var d=u*u+c*c,p=l*l+f*f,y=(f*d-c*p)/h,g=(u*p-l*d)/h,m=Ww.pop()||new qw;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=sk._;b;)if(m.yck)s=s.L;else{if(!((i=a-ik(s,o))>ck)){r>-ck?(e=s.P,n=s):i>-ck?(e=s,n=s.N):e=n=s;break}if(!s.R){e=s;break}s=s.R}!function(t){ok[t.index]={site:t,halfedges:[]}}(t);var u=Kw(t);if(ak.insert(e,u),e||n){if(e===n)return Zw(e),n=Kw(e.site),ak.insert(u,n),u.edge=n.edge=Bw(e.site,u.site),Xw(e),void Xw(n);if(n){Zw(e),Zw(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];Yw(n.edge,c,p,x),u.edge=Bw(c,t,null,x),n.edge=Bw(t,p,null,x),Xw(e),Xw(n)}else u.edge=Bw(e.site,u.site)}}function rk(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 ik(t,e){var n=t.N;if(n)return rk(n,e);var r=t.site;return r[1]===e?r[0]:1/0}var ak,ok,sk,uk,ck=1e-6,lk=1e-12;function fk(t,e){return e[1]-t[1]||e[0]-t[0]}function hk(t,e){var n,r,i,a=t.sort(fk).pop();for(uk=[],ok=new Array(t.length),ak=new Rw,sk=new Rw;;)if(i=Hw,a&&(!i||a[1]ck||Math.abs(i[0][1]-i[1][1])>ck)||delete uk[a]}(o,s,u,c),function(t,e,n,r){var i,a,o,s,u,c,l,f,h,d,p,y,g=ok.length,m=!0;for(i=0;ick||Math.abs(y-h)>ck)&&(u.splice(s,0,uk.push(jw(o,d,Math.abs(p-t)ck?[t,Math.abs(f-t)ck?[Math.abs(h-r)ck?[n,Math.abs(f-n)ck?[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 Sk=function(){var t,e,n=_k,r=wk,i=Ak,a=Ek,o=Tk,s=[0,1/0],u=[[-1/0,-1/0],[1/0,1/0]],c=250,l=hp,f=lt("start","zoom","end"),h=0;function d(t){t.property("__zoom",kk).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",T).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 gk(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 gk(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 gk(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=Dn(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)],or(this),t.start()}xk(),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=Dn(this),o=ue.clientX,s=ue.clientY;Te(ue.view),bk(),t.mouse=[a,this.__zoom.invert(a)],or(this),t.start()}function c(){if(xk(),!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]=Dn(t.that),t.mouse[1]),t.extent,u))}function l(){r.on("mousemove.zoom mouseup.zoom",null),Ae(ue.view,t.moved),xk(),t.end()}}function w(){if(n.apply(this,arguments)){var t=this.__zoom,e=Dn(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);xk(),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(bk(),r=0;rf&&M.push("'"+this.terminals_[T]+"'");N=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(N,{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],O.$=i[i.length-A],O._$={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&&(O._$.range=[a[a.length-(A||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(O,[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(O.$),a.push(O._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);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(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 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 S(){this.yy={}}return T.lexer=A,S.prototype=T,T.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(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");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);return{x:i+n,y:a+r}},buildLayerMatrix:function(t){var e=r.map(r.range(o(t)+1),(function(){return[]}));return r.forEach(t.nodes(),(function(n){var i=t.node(n),a=i.rank;r.isUndefined(a)||(e[a][i.order]=n)})),e},normalizeRanks:function(t){var e=r.min(r.map(t.nodes(),(function(e){return t.node(e).rank})));r.forEach(t.nodes(),(function(n){var i=t.node(n);r.has(i,"rank")&&(i.rank-=e)}))},removeEmptyRanks:function(t){var e=r.min(r.map(t.nodes(),(function(e){return t.node(e).rank}))),n=[];r.forEach(t.nodes(),(function(r){var i=t.node(r).rank-e;n[i]||(n[i]=[]),n[i].push(r)}));var i=0,a=t.graph().nodeRankFactor;r.forEach(n,(function(e,n){r.isUndefined(e)&&n%a!=0?--i:i&&r.forEach(e,(function(e){t.node(e).rank+=i}))}))},addBorderNode:function(t,e,n,r){var i={width:0,height:0};arguments.length>=4&&(i.rank=n,i.order=r);return a(t,"border",i,e)},maxRank:o,partition:function(t,e){var n={lhs:[],rhs:[]};return r.forEach(t,(function(t){e(t)?n.lhs.push(t):n.rhs.push(t)})),n},time:function(t,e){var n=r.now();try{return e()}finally{console.log(t+" time: "+(r.now()-n)+"ms")}},notime:function(t,e){return e()}}},function(t,e,n){var r;try{r={clone:n(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,T,A,S,M,O={};;){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 N="";for(T in M=[],o[w])this.terminals_[T]&&T>f&&M.push("'"+this.terminals_[T]+"'");N=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(N,{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],O.$=i[i.length-A],O._$={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&&(O._$.range=[a[a.length-(A||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(O,[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(O.$),a.push(O._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);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(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 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 It(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+Pt(i=t.year()-1,e,n):o>Pt(t.year(),e,n)?(r=o-Pt(t.year(),e,n),i=t.year()+1):(i=t.year(),r=o),{week:r,year:i}}function Pt(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))}G("w",["ww",2],"wo","week"),G("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)})),G("d",0,"do","day"),G("dd",0,0,(function(t){return this.localeData().weekdaysMin(this,t)})),G("ddd",0,0,(function(t){return this.localeData().weekdaysShort(this,t)})),G("dddd",0,0,(function(t){return this.localeData().weekdays(this,t)})),G("e",0,0,"weekday"),G("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("_"),Yt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),zt=ut,Ut=ut,$t=ut;function Gt(){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 Vt(){return this.hours()%12||12}function Ht(t,e){G(t,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)}))}function Wt(t,e){return e._meridiemParse}G("H",["HH",2],0,"hour"),G("h",["hh",2],0,Vt),G("k",["kk",2],0,(function(){return this.hours()||24})),G("hmm",0,0,(function(){return""+Vt.apply(this)+j(this.minutes(),2)})),G("hmmss",0,0,(function(){return""+Vt.apply(this)+j(this.minutes(),2)+j(this.seconds(),2)})),G("Hmm",0,0,(function(){return""+this.hours()+j(this.minutes(),2)})),G("Hmmss",0,0,(function(){return""+this.hours()+j(this.minutes(),2)+j(this.seconds(),2)})),Ht("a",!0),Ht("A",!1),F("hour","h"),B("hour",13),lt("a",Wt),lt("A",Wt),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,Xt=xt("Hours",!0),Zt={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:Tt,monthsShort:At,week:{dow:0,doy:6},weekdays:Bt,weekdaysMin:Yt,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=Zt;if(e.abbr=t,null!=Jt[t])O("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(C(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||24Pt(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_[T]+"'");N=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(N,{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],O.$=i[i.length-A],O._$={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&&(O._$.range=[a[a.length-(A||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(O,[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(O.$),a.push(O._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},Gt={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,r){switch(n){case 0: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 Vt(){this.yy={}}return $t.lexer=Gt,Vt.prototype=$t,$t.Parser=Vt,new Vt}();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,T,A,S,M,O={};;){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 N="";for(T in M=[],o[w])this.terminals_[T]&&T>f&&M.push("'"+this.terminals_[T]+"'");N=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(N,{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],O.$=i[i.length-A],O._$={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&&(O._$.range=[a[a.length-(A||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(O,[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(O.$),a.push(O._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},h={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 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,T,A,S,M,O={};;){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 N="";for(T in M=[],o[w])this.terminals_[T]&&T>f&&M.push("'"+this.terminals_[T]+"'");N=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(N,{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],O.$=i[i.length-A],O._$={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&&(O._$.range=[a[a.length-(A||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(O,[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(O.$),a.push(O._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},o={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"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,T,A,S,M,O={};;){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 N="";for(T in M=[],o[w])this.terminals_[T]&&T>f&&M.push("'"+this.terminals_[T]+"'");N=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(N,{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],O.$=i[i.length-A],O._$={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&&(O._$.range=[a[a.length-(A||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(O,[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(O.$),a.push(O._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},T={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,r){switch(n){case 0: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=T,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,T,A,S,M,O={};;){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 N="";for(T in M=[],o[w])this.terminals_[T]&&T>f&&M.push("'"+this.terminals_[T]+"'");N=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(N,{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],O.$=i[i.length-A],O._$={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&&(O._$.range=[a[a.length-(A||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(O,[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(O.$),a.push(O._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);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(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 12;case 1:case 2:case 3:break;case 4:return 4;case 5:return 15;case 6:return 17;case 7:return 20;case 8:return 21;case 9:return 19;case 10:case 11:return 8;case 12:return 5;case 13:return 26;case 14:this.begin("options");break;case 15:this.popState();break;case 16:return 11;case 17:this.begin("string");break;case 18:this.popState();break;case 19:return 23;case 20:return 18;case 21:return 7}},rules:[/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:gitGraph\b)/i,/^(?:commit\b)/i,/^(?:branch\b)/i,/^(?:merge\b)/i,/^(?:reset\b)/i,/^(?:checkout\b)/i,/^(?:LR\b)/i,/^(?:BT\b)/i,/^(?::)/i,/^(?:\^)/i,/^(?:options\r?\n)/i,/^(?:end\r?\n)/i,/^(?:[^\n]+\r?\n)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[a-zA-Z][a-zA-Z0-9_]+)/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){a.length;switch(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,T,A,S,M,O={};;){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 N="";for(T in M=[],o[w])this.terminals_[T]&&T>f&&M.push("'"+this.terminals_[T]+"'");N=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(N,{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],O.$=i[i.length-A],O._$={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&&(O._$.range=[a[a.length-(A||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(O,[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(O.$),a.push(O._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},r={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 4;case 1:return 9;case 2:return"space";case 3:return 10;case 4:return 6;case 5:return"TXT"}},rules:[/^(?:info\b)/i,/^(?:[\s\n\r]+)/i,/^(?:[\s]+)/i,/^(?:showInfo\b)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5],inclusive:!0}}};function i(){this.yy={}}return n.lexer=r,i.prototype=n,n.Parser=i,new i}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(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,T,A,S,M,O={};;){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 N="";for(T in M=[],o[w])this.terminals_[T]&&T>f&&M.push("'"+this.terminals_[T]+"'");N=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(N,{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],O.$=i[i.length-A],O._$={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&&(O._$.range=[a[a.length-(A||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(O,[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(O.$),a.push(O._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},r={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0: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,T,A,S,M,O={};;){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 N="";for(T in M=[],o[w])this.terminals_[T]&&T>f&&M.push("'"+this.terminals_[T]+"'");N=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(N,{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],O.$=i[i.length-A],O._$={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&&(O._$.range=[a[a.length-(A||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(O,[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(O.$),a.push(O._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},l={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0: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);t.exports=i;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)}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{var t=a&&a.require&&a.require("util").types;return t||o&&o.binding&&o.binding("util")}catch(t){}}();t.exports=s}).call(this,n(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);return{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),t=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:N},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/,T=/[\r\n]/,A=/\${pos}/g,S={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&&S[void 0===r?"undefined":n(r)]),M=g?Object(r):{};function O(t){return M["@label"]?M["@label"].replace(A,t):"__ESCAPER_QUOT__"+t+"_"}var N=!1;"boolean"==typeof r&&(N=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 C="",D=-1;++D2&&u[j])&&(M[j]&&(G=t.substring(Y,q+1),-1===M[j]?V="":(V=O(I.length),I.push(G)),t=t.substring(0,Y)+V+t.substring(q+1),q+=V.length-G.length),j=!1);else{if(!P){if("/"===X&&((s[J]||u[J])&&(j=s[Q]||u[Q]?Q:J),j)){Y=q;continue}m[X]||v[W]?(R=!0,W=""):w.test(X)&&(R=!1),k.test(X)?H+=X:(W=H,H="");var K=!1;f&&("|"===X&&_.test(Z)?($=!0,R=!1,K=!0):$&&E.test(X)&&($=!1,R=!0,K=!0)),K||(m[X]?R=!0:w.test(X)&&(R=!1))}if("/"!==P||B||("["===X?z=!0:"]"===X&&(z=!1)),!P&&U&&("}"===X?U--:"{"===X&&U++,U||(X="`")),"`"!==P||B||"${"!==J||(X="`",q++,U++),!l[X]||"/"===X&&!R||P){if(P&&("\\"===X||B))B=!B;else if(l[X]&&P===X&&!B&&("/"!==P||!z)){if("/"===X)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,T(n,m),r.pick(n,b))),r.forEach(t.nodes(),(function(n){var i=A(t.node(n));e.setNode(n,r.defaults(T(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,T(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 T(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 T=x?x(w,k,n+"",t,e,_):void 0,A=void 0===T;if(A){var S=c(k),M=!S&&f(k),O=!S&&!M&&y(k);T=k,S||M||O?c(w)?T=w:l(w)?T=o(w):M?(A=!1,T=i(k,!0)):O?(A=!1,T=a(k,!0)):T=[]:p(k)||u(k)?(T=w,u(w)?T=m(w):d(w)&&!h(w)||(T=s(k))):A=!1}A&&(_.set(k,T),b(T,k,v,x,_),_.delete(k)),r(t,n,T)}}},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)return;for(t.removeEdge(e),a=0,++s;su.lim&&(c=u,l=!0);var f=r.filter(e.edges(),(function(e){return l===v(t,t.node(e.v),c)&&l!==v(t,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;function i(a){var o=n;r.forEach(t.children(a),i),e[a]={low:o,lim:n++}}return r.forEach(t.children(),i),e}(t);r.forEach(t.graph().dummyChains,(function(n){for(var r=t.node(n),i=r.edgeObj,a=function(t,e,n,r){var i,a,o=[],s=[],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));a=i,i=r;for(;(i=t.parent(i))!==a;)s.push(i);return{path:o.concat(s.reverse()),lca:a}}(t,e,i.v,i.w),o=a.path,s=a.lca,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=i.partition(t,(function(t){return r.has(t,"barycenter")})),o=n.lhs,s=r.sortBy(n.rhs,(function(t){return-t.i})),u=[],c=0,l=0,f=0;o.sort((h=!!e,function(t,e){return t.barycentere.barycenter?1:h?e.i-t.i:t.i-e.i})),f=a(u,s,f),r.forEach(o,(function(t){f+=t.vs.length,u.push(t.vs),c+=t.barycenter*t.weight,l+=t.weight,f=a(u,s,f)}));var h;var d={vs:r.flatten(u,!0)};l&&(d.barycenter=c/l,d.weight=l);return d}},function(t,e,n){var r=n(3),i=n(12).Graph;t.exports=function(t,e,n){var a=function(t){var e;for(;t.hasNode(e=r.uniqueId("_root")););return e}(t),o=new i({compound:!0}).setGraph({root:a}).setDefaultNodeLabel((function(e){return t.node(e)}));return r.forEach(t.nodes(),(function(i){var s=t.node(i),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))return;if(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))return;if(0===(y=a*u-o*s))return;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);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);return 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)},L=function(t,e,n){var r;e[0]!==n&&(e=e.reverse()),e.forEach((function(t){A(t,r),r=t}));var i,a=25;r=void 0,e.forEach((function(t){if(r&&!i){var e=A(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},F=function(t,e){var n=t.trim();if(n)return"loose"!==e.securityLevel?Object(k.sanitizeUrl)(n):n},I=n(2),P=n.n(I),R=//gi,B=function(t){return t.replace(R,"#br#")},j=function(t){return t.replace(/#br#/g,"
")},Y=function(t){if(!t)return 1;var e=B(t);return(e=e.replace(/\\n/g,"#br#")).split("#br#")},z=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=(n=(n=B(n)).replace(//g,">")).replace(/=/g,"="),n=j(n)),n},U=R;function $(t){return($="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 G,V=h(),H={},W=[],q=[],X=[],Z={},J={},Q=0,K=!0,tt=[],et=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=z(r.trim(),V),'"'===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),W.push(o)},nt=function(t,e){t.split(",").forEach((function(t){var n=t;t[0].match(/\d/)&&(n=""+n),void 0!==H[n]&&H[n].classes.push(e),void 0!==Z[n]&&Z[n].classes.push(e)}))},rt=function(t,e){t.split(",").forEach((function(t){void 0!==e&&(J[t]=z(e,V))}))},it=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)}))};tt.push(it);var at=function(t){for(var e=0;e/)&&(G="LR"),G.match(/.*v/)&&(G="TB")},setClass:nt,getTooltip:function(t){return J[t]},setClickEvent:function(t,e,n){t.split(",").forEach((function(t){!function(t,e){var n=t;t[0].match(/\d/)&&(n=""+n),"loose"===V.securityLevel&&void 0!==e&&void 0!==H[n]&&tt.push((function(){var t=document.querySelector('[id="'.concat(n,'"]'));null!==t&&t.addEventListener("click",(function(){window[e](n)}),!1)}))}(t,e)})),rt(t,n),nt(t,"clickable")},setLink:function(t,e,n){t.split(",").forEach((function(t){var n=t;t[0].match(/\d/)&&(n=""+n),void 0!==H[n]&&(H[n].link=F(e,V))})),rt(t,n),nt(t,"clickable")},bindFunctions:function(t){tt.forEach((function(e){e(t)}))},getDirection:function(){return G.trim()},getVertices:function(){return H},getEdges:function(){return W},getClasses:function(){return q},clear:function(){H={},q={},W=[],(tt=[]).push(it),X=[],Z={},Q=0,J=[],K=!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=$(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=X[n].nodes;if(!((ot+=1)>2e3)){if(st[ot]=n,X[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",X.length-1)},getSubGraphs:function(){return X},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!!K&&(K=!1,!0)}}},ct=n(22),lt=n.n(ct),ft=n(5),ht=n.n(ft),dt=n(44),pt=n.n(dt);function yt(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=At(t,r,r,i);return n.intersect=function(t){return ht.a.intersect.polygon(n,i,t)},a}function gt(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=At(t,a,r,o);return n.intersect=function(t){return ht.a.intersect.polygon(n,o,t)},s}function mt(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=At(t,r,i,a);return n.intersect=function(t){return ht.a.intersect.polygon(n,a,t)},o}function vt(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=At(t,r,i,a);return n.intersect=function(t){return ht.a.intersect.polygon(n,a,t)},o}function bt(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=At(t,r,i,a);return n.intersect=function(t){return ht.a.intersect.polygon(n,a,t)},o}function xt(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=At(t,r,i,a);return n.intersect=function(t){return ht.a.intersect.polygon(n,a,t)},o}function _t(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=At(t,r,i,a);return n.intersect=function(t){return ht.a.intersect.polygon(n,a,t)},o}function wt(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=At(t,r,i,a);return n.intersect=function(t){return ht.a.intersect.polygon(n,a,t)},o}function kt(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 ht.a.intersect.rect(n,t)},a}function Et(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=At(t,r,i,a);return n.intersect=function(t){return ht.a.intersect.polygon(n,a,t)},o}function Tt(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=ht.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 At(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 St={addToRender:function(t){t.shapes().question=yt,t.shapes().hexagon=gt,t.shapes().stadium=kt,t.shapes().subroutine=Et,t.shapes().cylinder=Tt,t.shapes().rect_left_inv_arrow=mt,t.shapes().lean_right=vt,t.shapes().lean_left=bt,t.shapes().trapezoid=xt,t.shapes().inv_trapezoid=_t,t.shapes().rect_right_inv_arrow=wt},addToRenderV2:function(t){t({question:yt}),t({hexagon:gt}),t({stadium:kt}),t({subroutine:Et}),t({cylinder:Tt}),t({rect_left_inv_arrow:mt}),t({lean_right:vt}),t({lean_left:bt}),t({trapezoid:xt}),t({inv_trapezoid:_t}),t({rect_right_inv_arrow:wt})}},Mt={},Ot=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=S(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=pt()(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(U),d=0;d"):(s.labelType="text",s.label=o.text.replace(U,"\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)}))},Ct=function(t){for(var e=Object.keys(t),n=0;n=0;f--)i=l[f],ut.addVertex(i.id,i.title,"group",void 0,i.classes);var d=ut.getVertices(),p=ut.getEdges(),y=0;for(y=l.length-1;y>=0;y--){i=l[y],Object(a.selectAll)("cluster").append("text");for(var g=0;g"),x.info("vertexText"+i),function(t){var e,n,r=Object(a.select)(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),i=r.append("xhtml:div"),o=t.label,s=t.isNode?"nodeLabel":"edgeLabel";return i.html(''+o+""),e=i,(n=t.labelStyle)&&e.attr("style",n),i.style("display","inline-block"),i.style("white-space","nowrap"),i.attr("xmlns","http://www.w3.org/1999/xhtml"),r.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);x.info("cp ",a," to ",i," with parent ",e),r.setNode(a,o),x.debug("Setting parent",a,n.parent(a)),i!==n.parent(a)&&r.setParent(a,n.parent(a)),e!==i&&a!==e?(x.debug("Setting parent",a,e),r.setParent(a,e)):(x.info("In copy ",e,"root",i,"data",n.node(e),i),x.debug("Not Setting parent for node=",a,"cluster!==rootId",e!==i,"node!==clusterId",a!==e));var s=n.edges(a);x.debug("Copying Edges",s),s.forEach((function(t){x.info("Edge",t);var a=n.edge(t.v,t.w,t.name);x.info("Edge data",a,i);try{!function(t,e){return x.info("Decendants of ",e," is ",$t[e]),x.info("Edge is ",t),t.v!==e&&(t.w!==e&&($t[e]?(x.info("Here "),$t[e].indexOf(t.v)>=0||(!!Vt(t.v,e)||(!!Vt(t.w,e)||$t[e].indexOf(t.w)>=0))):(x.debug("Tilt, ",e,",not in decendants"),!1)))}(t,i)?x.info("Skipping copy of edge ",t.v,"--\x3e",t.w," rootId: ",i," clusterId:",e):(x.info("Copying as ",t.v,t.w,a,t.name),r.setEdge(t.v,t.w,a,t.name),x.info("newGraph edges ",r.edges(),r.edge(r.edges()[0])))}catch(t){x.error(t)}}))}x.debug("Removing node",a),n.removeNode(a)}))},Wt=function t(e,n){x.trace("Searching",e);var r=n.children(e);if(r.length<1)return x.trace("This is a valid node",e),e;for(var i=0;i ",a),a}},qt=function(t){return Ut[t]&&Ut[t].externalConnections&&Ut[t]?Ut[t].id:t},Xt=function(t,e){!t||e>10?x.debug("Opting out, no graph "):(x.debug("Opting in, graph "),t.nodes().forEach((function(e){t.children(e).length>0&&(x.trace("Cluster identified",e," Replacement id in edges: ",Wt(e,t)),$t[e]=function t(e,n){for(var r=n.children(e),i=[].concat(r),a=0;a0&&(x.debug("Cluster identified",e,$t),r.forEach((function(t){t.v!==e&&t.w!==e&&(Vt(t.v,e)^Vt(t.w,e)&&(x.debug("Edge: ",t," leaves cluster ",e),x.debug("Decendants of ",e,": ",$t[e]),Ut[e].externalConnections=!0))})))})),Zt(t,0),t.edges().forEach((function(e){var n=t.edge(e);x.trace("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),x.trace("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(t.edge(e)));var r=e.v,i=e.w;x.trace("Fix",Ut,"ids:",e.v,e.w,"Translateing: ",Ut[e.v],Ut[e.w]),(Ut[e.v]||Ut[e.w])&&(x.trace("Fixing and trixing - removing",e.v,e.w,e.name),r=qt(e.v),i=qt(e.w),t.removeEdge(e.v,e.w,e.name),r!==e.v&&(n.fromCluster=e.v),i!==e.w&&(n.toCluster=e.w),x.trace("Replacing with",r,i,e.name),t.setEdge(r,i,n,e.name))})),x.debug("Adjusted Graph",P.a.json.write(t)),x.trace(Ut))},Zt=function t(e,n){if(x.debug("extractor - ",n,P.a.json.write(e),e.children("D")),n>10)x.error("Bailing out");else{for(var r=e.nodes(),i=!1,a=0;a0}if(i){x.debug("Nodes = ",r,n);for(var u=0;u0){x.debug("Cluster without external connections, without a parent and with children",c,n);var l=e.graph(),f=new P.a.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:"TB"===l.rankdir?"LR":"TB",nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}}));x.debug("Old graph before copy",P.a.json.write(e)),Ht(c,e,f,c),e.setNode(c,{clusterNode:!0,id:c,clusterData:Ut[c].clusterData,labelText:Ut[c].labelText,graph:f}),x.debug("New graph after copy",P.a.json.write(f)),x.debug("Old graph after copy",P.a.json.write(e))}else x.debug("Cluster ** ",c," **not meeting the criteria !externalConnections:",!Ut[c].externalConnections," no parent: ",!e.parent(c)," children ",e.children(c)&&e.children(c).length>0,e.children("D"),n),x.debug(Ut);else x.debug("Not a cluster",c,n)}r=e.nodes(),x.debug("New list of nodes",r);for(var h=0;h0}var ee=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&&te(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&&te(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}},ne=function(t,e,n){var r=t.x,i=t.y,a=[],o=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;e.forEach((function(t){o=Math.min(o,t.x),s=Math.min(s,t.y)}));for(var u=r-t.width/2-o,c=i-t.height/2-s,l=0;l1&&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 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}},ie={node:n.n(Jt).a,circle:Kt,ellipse:Qt,polygon:ne,rect:re},ae=function(t,e,n){var r=t.insert("g").attr("class","node default").attr("id",e.id),i=70,a=10;"LR"===n&&(i=10,a=70);var o=r.append("rect").style("stroke","black").style("fill","black").attr("x",-1*i/2).attr("y",-1*a/2).attr("width",i).attr("height",a).attr("class","fork-join");return Yt(e,o),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(t){return ie.rect(e,t)},r},oe={question:function(t,e){var n=jt(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding+(i.height+e.padding),o=[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}];x.info("Question main (Circle)");var s=zt(r,a,a,o);return Yt(e,s),e.intersect=function(t){return x.warn("Intersect called"),ie.polygon(e,o,t)},r},rect:function(t,e){var n=jt(t,e,"node "+e.classes,!0),r=n.shapeSvg,i=n.bbox,a=n.halfPadding;x.trace("Classes = ",e.classes);var o=r.insert("rect",":first-child");return o.attr("class","basic label-container").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),Yt(e,o),e.intersect=function(t){return ie.rect(e,t)},r},rectWithTitle:function(t,e){var n;n=e.classes?"node "+e.classes:"node default";var r=t.insert("g").attr("class",n).attr("id",e.id),i=r.insert("rect",":first-child"),o=r.insert("line"),s=r.insert("g").attr("class","label"),u=e.labelText.flat();x.info("Label text",u[0]);var c,l=s.node().appendChild(Bt(u[0],e.labelStyle,!0,!0));if(h().flowchart.htmlLabels){var f=l.children[0],d=Object(a.select)(l);c=f.getBoundingClientRect(),d.attr("width",c.width),d.attr("height",c.height)}x.info("Text 2",u);var p=u.slice(1,u.length),y=l.getBBox(),g=s.node().appendChild(Bt(p.join("
"),e.labelStyle,!0,!0));if(h().flowchart.htmlLabels){var m=g.children[0],v=Object(a.select)(g);c=m.getBoundingClientRect(),v.attr("width",c.width),v.attr("height",c.height)}var b=e.padding/2;return Object(a.select)(g).attr("transform","translate( "+(c.width>y.width?0:(y.width-c.width)/2)+", "+(y.height+b+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),Yt(e,r),e.intersect=function(t){return ie.circle(e,7,t)},n},end:function(t,e){var n=t.insert("g").attr("class","node default").attr("id",e.id),r=n.insert("circle",":first-child"),i=n.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),r.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),Yt(e,i),e.intersect=function(t){return ie.circle(e,7,t)},n},note:function(t,e){var n=jt(t,e,"node "+e.classes,!0),r=n.shapeSvg,i=n.bbox,a=n.halfPadding;x.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),Yt(e,o),e.intersect=function(t){return ie.rect(e,t)},r},subroutine:function(t,e){var n=jt(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=zt(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 Yt(e,s),e.intersect=function(t){return ie.polygon(e,t)},r},fork:ae,join:ae},se={},ue=function(t){var e=se[t.id];x.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+")")},ce={rect:function(t,e){x.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(Bt(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;x.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 re(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(Bt(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 re(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 re(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 re(e,t)},n}},le={},fe={},he=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},de=function(t,e,n){x.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&&x.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));x.trace("Setting data for cluster",s),n.setNode(i.id,s),n.setParent(e,i.id,s)}if(x.trace("(Insert) Node "+e+": "+JSON.stringify(n.node(e))),a&&a.clusterNode){x.trace("Cluster identified",e,a,n.node(e));var u=t(f,a.graph,r,n.node(e));Yt(a,u),function(t,e){se[e.id]=t}(u,a),x.warn("Recursive render complete",u,a)}else n.children(e).length>0?(x.trace("Cluster - the non recursive path",e,a.id,a,n),x.trace(Wt(a.id,n)),Ut[a.id]={id:Wt(a.id,n),node:a}):(x.trace("Node - the non recursive path",e,a.id,a),function(t,e,n){se[e.id]=oe[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);x.trace("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),x.trace("Edge "+t.v+" -> "+t.w+": ",t," ",JSON.stringify(n.edge(t))),x.trace("Fix",Ut,"ids:",t.v,t.w,"Translateing: ",Ut[t.v],Ut[t.w]),function(t,e){var n=Bt(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+")"),fe[e.id]=r,e.width=o.width,e.height=o.height}(l,e)})),n.edges().forEach((function(t){x.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t))})),x.info("#############################################"),x.info("### Layout ###"),x.info("#############################################"),x.info(n),It.a.layout(n),x.trace("Graph after layout:",P.a.json.write(n)),n.nodes().forEach((function(t){var e=n.node(t);x.trace("Position "+t+": "+JSON.stringify(n.node(t))),x.info("Position "+t+": ("+e.x,","+e.y,") width: ",e.width," height: ",e.height),e&&e.clusterNode?ue(e):n.children(t).length>0?(!function(t,e){x.trace("Inserting cluster");var n=e.shape||"rect";le[e.id]=ce[n](t,e)}(u,e),Ut[e.id].node=e):ue(e)})),n.edges().forEach((function(t){var e=n.edge(t);x.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])),x.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;x.trace("edge",n),x.trace("to cluster",r[n.toCluster]),s=[];var f=!1;n.points.forEach((function(t){var e=r[n.toCluster].node;if(he(e,t)||f)f||s.push(t);else{x.trace("inside",n.toCluster,t,l);var i=de(e,l,t);x.trace("intersect",i),s.push(i),f=!0}l=t}))}if(n.fromCluster){x.trace("edge",n),x.trace("from cluster",r[n.toCluster]);for(var d,p=[],y=!1,g=s.length-1;g>=0;g--){var m=s[g],v=r[n.fromCluster].node;if(he(v,m)||y)x.trace("Outside point",m),y||p.unshift(m);else{x.trace("inside",n.toCluster,m);var b=de(v,d,m);p.unshift(b),y=!0}d=m}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,"\\)")),x.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,Ut,r,n),function(t){(x.info("Moving label",t.id,t.label,fe[t.id]),t.label)&&fe[t.id].attr("transform","translate("+t.x+", "+t.y+")")}(e)})),s},ye=function(t,e,n,r,i){Rt(t,n,r,i),se={},fe={},le={},$t={},Gt={},Ut={},x.warn("Graph before:",P.a.json.write(e)),Xt(e),x.warn("Graph after:",P.a.json.write(e)),x.warn("Graph ever after:",e.graph()),pe(t,e,r)},ge={},me=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=S(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=pt()(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(U),d=0;d=0;f--)i=l[f],x.info("Subgraph - ",i),ut.addVertex(i.id,i.title,"group",void 0,i.classes);var d=ut.getVertices(),p=ut.getEdges();x.info(p);var y=0;for(y=l.length-1;y>=0;y--){i=l[y],Object(a.selectAll)("cluster").append("text");for(var g=0;g>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},a}}return Le.push({from:t,to:e,message:n,type:r}),!0},je={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},Ye=function(t,e,n){var r={actor:t,placement:e,message:n},i=[].concat(t,t);Fe.push(r),Le.push({from:i[0],to:i[1],message:n,type:je.NOTE,placement:e})},ze=function(t){Ie=t},Ue={addActor:Re,addMessage:function(t,e,n,r){Le.push({from:t,to:e,message:n,answer:r})},addSignal:Be,enableSequenceNumbers:function(){Pe=!0},showSequenceNumbers:function(){return Pe},getMessages:function(){return Le},getActors:function(){return De},getActor:function(t){return De[t]},getActorKeys:function(){return Object.keys(De)},getTitle:function(){return Ie},clear:function(){De={},Le=[]},LINETYPE:je,ARROWTYPE:{FILLED:0,OPEN:1},PLACEMENT:{LEFTOF:0,RIGHTOF:1,OVER:2},addNote:Ye,setTitle:ze,apply:function t(e){if(e instanceof Array)e.forEach((function(e){t(e)}));else switch(e.type){case"addActor":Re(e.actor,e.actor,e.description);break;case"activeStart":case"activeEnd":Be(e.actor,void 0,void 0,e.signalType);break;case"addNote":Ye(e.actor,e.placement,e.text);break;case"addMessage":Be(e.from,e.to,e.msg,e.signalType);break;case"loopStart":Be(void 0,void 0,e.loopText,e.signalType);break;case"loopEnd":Be(void 0,void 0,void 0,e.signalType);break;case"rectStart":Be(void 0,void 0,e.color,e.signalType);break;case"rectEnd":Be(void 0,void 0,void 0,e.signalType);break;case"optStart":Be(void 0,void 0,e.optText,e.signalType);break;case"optEnd":Be(void 0,void 0,void 0,e.signalType);break;case"altStart":case"else":Be(void 0,void 0,e.altText,e.signalType);break;case"altEnd":Be(void 0,void 0,void 0,e.signalType);break;case"setTitle":ze(e.text);break;case"parStart":case"and":Be(void 0,void 0,e.parText,e.signalType);break;case"parEnd":Be(void 0,void 0,void 0,e.signalType)}}};function $e(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);ee&&(n.starty=e-6,e+=12),Me.drawActivation(o,n,e,Ge,qe(t.from.actor).length),Ve.insert(n.startx,e-10,n.stopx,e)}(t,Ve.getVerticalPos());break;case Oe.parser.yy.LINETYPE.LOOP_START:Ve.bumpVerticalPos(Ge.boxMargin),Ve.newLoop(t.message),Ve.bumpVerticalPos(Ge.boxMargin+Ge.boxTextMargin);break;case Oe.parser.yy.LINETYPE.LOOP_END:e=Ve.endLoop(),Me.drawLoop(o,e,"loop",Ge),Ve.bumpVerticalPos(Ge.boxMargin);break;case Oe.parser.yy.LINETYPE.RECT_START:Ve.bumpVerticalPos(Ge.boxMargin),Ve.newLoop(void 0,t.message),Ve.bumpVerticalPos(Ge.boxMargin);break;case Oe.parser.yy.LINETYPE.RECT_END:var c=Ve.endLoop();Me.drawBackgroundRect(o,c),Ve.bumpVerticalPos(Ge.boxMargin);break;case Oe.parser.yy.LINETYPE.OPT_START:Ve.bumpVerticalPos(Ge.boxMargin),Ve.newLoop(t.message),Ve.bumpVerticalPos(Ge.boxMargin+Ge.boxTextMargin);break;case Oe.parser.yy.LINETYPE.OPT_END:e=Ve.endLoop(),Me.drawLoop(o,e,"opt",Ge),Ve.bumpVerticalPos(Ge.boxMargin);break;case Oe.parser.yy.LINETYPE.ALT_START:Ve.bumpVerticalPos(Ge.boxMargin),Ve.newLoop(t.message),Ve.bumpVerticalPos(Ge.boxMargin+Ge.boxTextMargin);break;case Oe.parser.yy.LINETYPE.ALT_ELSE:Ve.bumpVerticalPos(Ge.boxMargin),e=Ve.addSectionToLoop(t.message),Ve.bumpVerticalPos(Ge.boxMargin);break;case Oe.parser.yy.LINETYPE.ALT_END:e=Ve.endLoop(),Me.drawLoop(o,e,"alt",Ge),Ve.bumpVerticalPos(Ge.boxMargin);break;case Oe.parser.yy.LINETYPE.PAR_START:Ve.bumpVerticalPos(Ge.boxMargin),Ve.newLoop(t.message),Ve.bumpVerticalPos(Ge.boxMargin+Ge.boxTextMargin);break;case Oe.parser.yy.LINETYPE.PAR_AND:Ve.bumpVerticalPos(Ge.boxMargin),e=Ve.addSectionToLoop(t.message),Ve.bumpVerticalPos(Ge.boxMargin);break;case Oe.parser.yy.LINETYPE.PAR_END:e=Ve.endLoop(),Me.drawLoop(o,e,"par",Ge),Ve.bumpVerticalPos(Ge.boxMargin);break;default:try{Ve.bumpVerticalPos(Ge.messageMargin);var l=Xe(t.from),f=Xe(t.to),d=l[0]<=f[0]?1:0,p=l[0]=6&&n.indexOf("weekends")>=0||(n.indexOf(t.format("dddd").toLowerCase())>=0||n.indexOf(t.format(e.trim()))>=0)},_n=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=wn(r,i,e,n);t.endTime=i.toDate(),t.renderEndTime=a}},wn=function(t,e,n,r){for(var i=!1,a=null;t<=e;)i||(a=e.toDate()),(i=xn(t,n,r))&&e.add(1,"d"),t.add(1,"d");return a},kn=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=Nn(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():(x.debug("Invalid date:"+n),x.debug("With date format:"+e.trim()),new Date)},En=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()},Tn=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()):En(/^([\d]+)([wdhms])/.exec(n.trim()),p()(t))},An=0,Sn=function(t){return void 0===t?"task"+(An+=1):t},Mn=[],On={},Nn=function(t){var e=On[t];return Mn[e]},Cn=function(){for(var t=function(t){var e=Mn[t],n="";switch(Mn[t].raw.startTime.type){case"prevTaskEnd":var r=Nn(e.prevTaskId);e.startTime=r.endTime;break;case"getStartDate":(n=kn(0,cn,Mn[t].raw.startTime.startData))&&(Mn[t].startTime=n)}return Mn[t].startTime&&(Mn[t].endTime=Tn(Mn[t].startTime,cn,Mn[t].raw.endTime.data,bn),Mn[t].endTime&&(Mn[t].processed=!0,Mn[t].manualEndTime=p()(Mn[t].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),_n(Mn[t],cn,hn))),Mn[t].processed},e=!0,n=0;n0&&(e=t.classes.join(" "));for(var n=0,r=0;rn-e?n+a+1.5*Rn.leftPadding>c?e+r-5:n+r+5:(n-e)/2+e+r})).attr("y",(function(t,r){return r*e+Rn.barHeight/2+(Rn.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*Rn.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;o0){var r=t.split("~");n=r[0],e=r[1]}return{className:n,type:e}},Hn=function(t){var e=Vn(t);void 0===Un[e.className]&&(Un[e.className]={id:e.className,type:e.type,cssClasses:[],methods:[],members:[],annotations:[],domId:"classid-"+e.className+"-"+$n},$n++)},Wn=function(t){for(var e=Object.keys(Un),n=0;n>")?r.annotations.push(i.substring(2,i.length-2)):i.indexOf(")")>0?r.methods.push(i):i&&r.members.push(i)}},Xn=function(t,e){t.split(",").forEach((function(t){var n=t;t[0].match(/\d/)&&(n="classid-"+n),void 0!==Un[n]&&Un[n].cssClasses.push(e)}))},Zn=function(t,e,n){var r=t,i=Wn(r);"loose"===Yn.securityLevel&&void 0!==e&&void 0!==Un[r]&&(n&&(Un[r].tooltip=z(n,Yn)),Gn.push((function(){var t=document.querySelector('[id="'.concat(i,'"]'));null!==t&&t.addEventListener("click",(function(){window[e](i)}),!1)})))},Jn={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},Qn=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)}))};Gn.push(Qn);var Kn={addClass:Hn,bindFunctions:function(t){Gn.forEach((function(e){e(t)}))},clear:function(){zn=[],Un={},(Gn=[]).push(Qn)},getClass:function(t){return Un[t]},getClasses:function(){return Un},addAnnotation:function(t,e){var n=Vn(t).className;Un[n].annotations.push(e)},getRelations:function(){return zn},addRelation:function(t){x.debug("Adding relation: "+JSON.stringify(t)),Hn(t.id1),Hn(t.id2),t.id1=Vn(t.id1).className,t.id2=Vn(t.id2).className,zn.push(t)},addMember:qn,addMembers:function(t,e){Array.isArray(e)&&(e.reverse(),e.forEach((function(e){return qn(t,e)})))},cleanupLabel:function(t){return":"===t.substring(0,1)?t.substr(1).trim():t.trim()},lineType:{LINE:0,DOTTED_LINE:1},relationType:Jn,setClickEvent:function(t,e,n){t.split(",").forEach((function(t){Zn(t,e,n)})),Xn(t,"clickable")},setCssClass:Xn,setLink:function(t,e,n){t.split(",").forEach((function(t){var r=t;t[0].match(/\d/)&&(r="classid-"+r),void 0!==Un[r]&&(Un[r].link=F(e,Yn),n&&(Un[r].tooltip=z(n,Yn)))})),Xn(t,"clickable")},lookUpDomId:Wn},tr=n(38),er=n.n(tr),nr=0,rr=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?ir(e):n?ar(n):or(t)},ir=function(t){return{displayText:(t[1]?t[1].trim():"")+(t[2]?t[2].trim():"")+(t[3]?ur(t[3]):"")+" "+(t[4]?t[4].trim():""),cssStyle:""}},ar=function(t){var e=t[1]?t[1].trim():"",n=t[2]?t[2].trim():"",r=t[3]?ur(t[3]):"",i=t[6]?t[6].trim():"";return{displayText:e+n+"("+r+")"+(t[7]?" : "+ur(t[7]).trim():""),cssStyle:cr(i)}},or=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=cr(l),a<(e=s+u+"("+ur(c.trim())+")").length&&""!==(r=t.substring(a+2).trim())&&(r=" : "+ur(r))}else e=ur(t);return{displayText:e+r,cssStyle:n}},sr=function(t,e,n,r){var i=rr(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)},ur=function t(e){var n=e;return-1!=e.indexOf("~")?t(n=(n=n.replace("~","<")).replace("~",">")):n},cr=function(t){switch(t){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}},lr=function(t,e,n){x.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",Wn(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){sr(d,t,u,n),u=!1}));var p=d.node().getBBox(),y=s.append("line").attr("x1",0).attr("y1",n.padding+f+n.dividerMargin+p.height).attr("y2",n.padding+f+n.dividerMargin+p.height),g=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){sr(g,t,u,n),u=!1}));var m=s.node().getBBox(),v=s.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",m.width+2*n.padding).attr("height",m.height+n.padding+.5*n.dividerMargin).node().getBBox().width;return i.node().childNodes.forEach((function(t){t.setAttribute("x",(v-t.getBBox().width)/2)})),e.tooltip&&i.insert("title").text(e.tooltip),h.attr("x2",v),y.attr("x2",v),o.width=v,o.height=m.height+n.padding+.5*n.dividerMargin,o},fr=function(t,e,n,r){var i=function(t){switch(t){case Jn.AGGREGATION:return"aggregation";case Jn.EXTENSION:return"extension";case Jn.COMPOSITION:return"composition";case Jn.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"+nr).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,y,g=e.points.length,m=D(e.points);if(o=m.x,s=m.y,g%2!=0&&g>1){var v=L("none"!==n.relation.type1,e.points,e.points[0]),b=L("none"!==n.relation.type2,e.points,e.points[g-1]);x.debug("cardinality_1_point "+JSON.stringify(v)),x.debug("cardinality_2_point "+JSON.stringify(b)),h=v.x,d=v.y,p=b.x,y=b.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)}(x.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",y).attr("fill","black").attr("font-size","6").text(n.relationTitle2);nr++};tr.parser.yy=Kn;var hr={},dr={dividerMargin:10,padding:5,textHeight:10},pr=function(t){for(var e=Object.keys(hr),n=0;n "+t.w+": "+JSON.stringify(i.edge(t))),fr(r,i.edge(t),i.edge(t).relation,dr))}));var f=r.node().getBBox(),h=f.width+40,d=f.height+40;dr.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);x.debug("viewBox ".concat(p)),r.attr("viewBox",p)};function mr(t){return(mr="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 vr,br=function(t){return JSON.parse(JSON.stringify(t))},xr=[],_r={root:{relations:[],states:{},documents:{}}},wr=_r.root,kr=0,Er=function(t,e,n,r,i){void 0===wr.states[t]?wr.states[t]={id:t,descriptions:[],type:e,doc:n,note:i}:(wr.states[t].doc||(wr.states[t].doc=n),wr.states[t].type||(wr.states[t].type=e)),r&&(x.info("Adding state ",t,r),"string"==typeof r&&Sr(t,r.trim()),"object"===mr(r)&&r.forEach((function(e){return Sr(t,e.trim())}))),i&&(wr.states[t].note=i)},Tr=function(){wr=(_r={root:{relations:[],states:{},documents:{}}}).root,wr=_r.root,kr=0,0,Or=[]},Ar=function(t,e,n){var r=t,i=e,a="default",o="default";"[*]"===t&&(r="start"+ ++kr,a="start"),"[*]"===e&&(i="end"+kr,o="end"),Er(r,a),Er(i,o),wr.relations.push({id1:r,id2:i,title:n})},Sr=function(t,e){var n=wr.states[t],r=e;":"===r[0]&&(r=r.substr(1).trim()),n.descriptions.push(r)},Mr=0,Or=[],Nr={addState:Er,clear:Tr,getState:function(t){return wr.states[t]},getStates:function(){return wr.states},getRelations:function(){return wr.relations},getClasses:function(){return Or},getDirection:function(){return"TB"},addRelation:Ar,getDividerId:function(){return"divider-id-"+ ++Mr},cleanupLabel:function(t){return":"===t.substring(0,1)?t.substr(2).trim():t.trim()},lineType:{LINE:0,DOTTED_LINE:1},relationType:{AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},logDocuments:function(){x.info("Documents = ",_r)},getRootDoc:function(){return xr},setRootDoc:function(t){x.info("Setting root doc",t),xr=t},getRootDocV2:function(){return function t(e,n,r){if("relation"===n.stmt)t(e,n.state1,!0),t(e,n.state2,!1);else if("state"===n.stmt&&"[*]"===n.id&&(n.id=r?e.id+"_start":e.id+"_end",n.start=r),n.doc){var i=[],a=0,o=[];for(a=0;a0&&o.length>0){var u={stmt:"state",id:O(),type:"divider",doc:br(o)};i.push(br(u)),n.doc=i}n.doc.forEach((function(e){return t(n,e,!0)}))}}({id:"root"},{id:"root",doc:xr},!0),{id:"root",doc:xr}},extract:function(t){var e;e=t.doc?t.doc:t,x.info(e),Tr(),x.info("Extract",e),e.forEach((function(t){"state"===t.stmt&&Er(t.id,t.type,t.doc,t.description,t.note),"relation"===t.stmt&&Ar(t.state1.id,t.state2.id,t.description)}))},trimColon:function(t){return t&&":"===t[0]?t.substr(1).trim():t.trim()}},Cr=n(17),Dr=n.n(Cr),Lr={},Fr=function(t,e){Lr[t]=e},Ir=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);return 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),t},Pr=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},Rr=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(U),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");if(g.text(y),0===u)u+=g.node().getBBox().height;i+=u,g.attr("x",e+h().state.noteMargin),g.attr("y",n+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;return n.attr("height",a+2*h().state.noteMargin),n.attr("width",i+2*h().state.noteMargin),n},Br=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&&Rr(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),r=n.node().getBBox();t.insert("rect",":first-child").attr("x",h().state.padding).attr("y",h().state.padding).attr("width",r.width+2*h().state.padding).attr("height",r.height+2*h().state.padding).attr("rx",h().state.radius)}(i,e),"default"===e.type&&e.descriptions.length>0&&Ir(i,e);var a=i.node().getBBox();return r.width=a.width+2*h().state.padding,r.height=a.height+2*h().state.padding,Fr(n,r),r},jr=0;Cr.parser.yy=Nr;var Yr={},zr=function t(e,n,r,i){var o,s=new P.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"+jr).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 Nr.relationType.AGGREGATION:return"aggregation";case Nr.relationType.EXTENSION:return"extension";case Nr.relationType.COMPOSITION:return"composition";case Nr.relationType.DEPENDENCY:return"dependency"}}(Nr.relationType.DEPENDENCY)+"End)"),void 0!==n.title){for(var u=t.append("g").attr("class","stateLabel"),c=D(e.points),l=c.x,f=c.y,d=Y(n.title),p=0,y=[],g=0,m=0,v=0;v<=d.length;v++){var b=u.append("text").attr("text-anchor","middle").text(d[v]).attr("x",l).attr("y",f+p),_=b.node().getBBox();if(g=Math.max(g,_.width),m=Math.min(m,_.x),x.info(_.x,l,f+p),0===p){var w=b.node().getBBox();p=w.height,x.info("Title height",p,f)}y.push(b)}var k=p*d.length;if(d.length>1){var E=(d.length-1)*p*.5;y.forEach((function(t,e){return t.attr("y",f+e*p-E)})),k=p*d.length}var T=u.node().getBBox();u.insert("rect",":first-child").attr("class","box").attr("x",l-g/2-h().state.padding/2).attr("y",f-k/2-h().state.padding/2-3.5).attr("width",g+h().state.padding).attr("height",k+h().state.padding),x.info(T)}jr++}(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*vr.padding,E.height=k.height+2*vr.padding,x.debug("Doc rendered",E,s),E},Ur=function(){},$r=function(t,e){vr=h().state,Cr.parser.yy.clear(),Cr.parser.parse(t),x.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 P.a.Graph({multigraph:!0,compound:!0,rankdir:"RL"}).setDefaultEdgeLabel((function(){return{}}));var r=Nr.getRootDoc();zr(r,n,void 0,!1);var i=vr.padding,o=n.node().getBBox(),s=o.width+2*i,u=o.height+2*i;vr.useMaxWidth?(n.attr("width","100%"),n.attr("style","max-width: ".concat(1.75*s,"px;"))):n.attr("width",1.75*s),n.attr("viewBox","".concat(o.x-vr.padding," ").concat(o.y-vr.padding," ")+s+" "+u)},Gr={},Vr={},Hr=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),Vr[n.id]||(Vr[n.id]={id:n.id,shape:i,description:n.id,classes:"statediagram-state"}),n.description&&(Array.isArray(Vr[n.id].description)?(Vr[n.id].shape="rectWithTitle",Vr[n.id].description.push(n.description)):Vr[n.id].description.length>0?(Vr[n.id].shape="rectWithTitle",Vr[n.id].description===n.id?Vr[n.id].description=[n.description]:Vr[n.id].description=[Vr[n.id].description,n.description]):(Vr[n.id].shape="rect",Vr[n.id].description=n.description)),!Vr[n.id].type&&n.doc&&(x.info("Setting cluser for ",n.id),Vr[n.id].type="group",Vr[n.id].shape="divider"===n.type?"divider":"roundedWithTitle",Vr[n.id].classes=Vr[n.id].classes+" "+(r?"statediagram-cluster statediagram-cluster-alt":"statediagram-cluster"));var a={labelStyle:"",shape:Vr[n.id].shape,labelText:Vr[n.id].description,classes:Vr[n.id].classes,style:"",id:n.id,type:Vr[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:Vr[n.id].type,padding:15},s={labelStyle:"",shape:"noteGroup",labelText:n.note.text,classes:Vr[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&&(x.info("Setting node ",n.id," to be child of its parent ",e.id),t.setParent(n.id,e.id)),n.doc&&(x.info("Adding nodes children "),qr(t,n,n.doc,!r))},Wr=0,qr=function(t,e,n,r){x.trace("items",n),n.forEach((function(n){if("state"===n.stmt||"default"===n.stmt)Hr(t,e,n,r);else if("relation"===n.stmt){Hr(t,e,n.state1,r),Hr(t,e,n.state2,r);var i={id:"edge"+Wr,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,Wr),Wr++}}))},Xr=function(t){for(var e=Object.keys(t),n=0;ne.seq?t:e}),t[0]),n="";t.forEach((function(t){n+=t===e?"\t*":"\t|"}));var r,i,a,o=[n,e.id,e.seq];for(var s in Kr)Kr[s]===e.id&&o.push(s);if(x.debug(o.join(" ")),Array.isArray(e.parent)){var u=Jr[e.parent[0]];oi(t,e,u),t.push(Jr[e.parent[1]])}else{if(null==e.parent)return;var c=Jr[e.parent];oi(t,e,c)}r=t,i=function(t){return t.id},a=Object.create(null),si(t=r.reduce((function(t,e){var n=i(e);return a[n]||(a[n]=!0,t.push(e)),t}),[]))}var ui,ci=function(){var t=Object.keys(Jr).map((function(t){return Jr[t]}));return t.forEach((function(t){x.debug(t.id)})),t.sort((function(t,e){return e.seq-t.seq})),t},li={setDirection:function(t){ei=t},setOptions:function(t){x.debug("options str",t),t=(t=t&&t.trim())||"{}";try{ai=JSON.parse(t)}catch(t){x.error("error while parsing gitGraph options",t.message)}},getOptions:function(){return ai},commit:function(t){var e={id:ri(),message:t,seq:ni++,parent:null==Qr?null:Qr.id};Qr=e,Jr[e.id]=e,Kr[ti]=e.id,x.debug("in pushCommit "+e.id)},branch:function(t){Kr[t]=null!=Qr?Qr.id:null,x.debug("in createBranch")},merge:function(t){var e=Jr[Kr[ti]],n=Jr[Kr[t]];if(function(t,e){return t.seq>e.seq&&ii(e,t)}(e,n))x.debug("Already merged");else{if(ii(e,n))Kr[ti]=Kr[t],Qr=Jr[Kr[ti]];else{var r={id:ri(),message:"merged branch "+t+" into "+ti,seq:ni++,parent:[null==Qr?null:Qr.id,Kr[t]]};Qr=r,Jr[r.id]=r,Kr[ti]=r.id}x.debug(Kr),x.debug("in mergeBranch")}},checkout:function(t){x.debug("in checkout");var e=Kr[ti=t];Qr=Jr[e]},reset:function(t){x.debug("in reset",t);var e=t.split(":")[0],n=parseInt(t.split(":")[1]),r="HEAD"===e?Qr:Jr[Kr[e]];for(x.debug(r,n);n>0;)if(n--,!(r=Jr[r.parent])){var i="Critical error - unique parent commit not found during reset";throw x.error(i),i}Qr=r,Kr[ti]=r.id},prettyPrint:function(){x.debug(Jr),si([ci()[0]])},clear:function(){Jr={},Kr={master:Qr=null},ti="master",ni=0},getBranchesAsObjArray:function(){var t=[];for(var e in Kr)t.push({name:e,commit:Jr[Kr[e]]});return t},getBranches:function(){return Kr},getCommits:function(){return Jr},getCommitsArray:ci,getCurrentBranch:function(){return ti},getDirection:function(){return ei},getHead:function(){return Qr}},fi=n(64),hi=n.n(fi),di={},pi={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}},yi={};function gi(t,e,n,r){var i=T(r,a.curveBasis),o=pi.branchColors[n%pi.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",pi.lineStrokeWidth).style("fill","none")}function mi(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 vi(t,e,n,r,i){x.debug("svgDrawLineForCommits: ",e,n);var a=mi(t.select("#node-"+e+" circle")),o=mi(t.select("#node-"+n+" circle"));switch(r){case"LR":if(a.left-o.left>pi.nodeSpacing){var s={x:a.left-pi.nodeSpacing,y:o.top+o.height/2};gi(t,[s,{x:o.left+o.width,y:o.top+o.height/2}],i,"linear"),gi(t,[{x:a.left,y:a.top+a.height/2},{x:a.left-pi.nodeSpacing/2,y:a.top+a.height/2},{x:a.left-pi.nodeSpacing/2,y:s.y},s],i)}else gi(t,[{x:a.left,y:a.top+a.height/2},{x:a.left-pi.nodeSpacing/2,y:a.top+a.height/2},{x:a.left-pi.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>pi.nodeSpacing){var u={x:o.left+o.width/2,y:a.top+a.height+pi.nodeSpacing};gi(t,[u,{x:o.left+o.width/2,y:o.top}],i,"linear"),gi(t,[{x:a.left+a.width/2,y:a.top+a.height},{x:a.left+a.width/2,y:a.top+a.height+pi.nodeSpacing/2},{x:o.left+o.width/2,y:u.y-pi.nodeSpacing/2},u],i)}else gi(t,[{x:a.left+a.width/2,y:a.top+a.height},{x:a.left+a.width/2,y:a.top+pi.nodeSpacing/2},{x:o.left+o.width/2,y:o.top-pi.nodeSpacing/2},{x:o.left+o.width/2,y:o.top}],i)}}function bi(t,e){return t.select(e).node().cloneNode(!0)}function xi(t,e,n,r){var i,a=Object.keys(di).length;if("string"==typeof e)do{if(i=di[e],x.debug("in renderCommitHistory",i.id,i.seq),t.select("#node-"+e).size()>0)return;t.append((function(){return bi(t,"#def-commit")})).attr("class","commit").attr("id",(function(){return"node-"+i.id})).attr("transform",(function(){switch(r){case"LR":return"translate("+(i.seq*pi.nodeSpacing+pi.leftMargin)+", "+ui*pi.branchOffset+")";case"BT":return"translate("+(ui*pi.branchOffset+pi.leftMargin)+", "+(a-i.seq)*pi.nodeSpacing+")"}})).attr("fill",pi.nodeFillColor).attr("stroke",pi.nodeStrokeColor).attr("stroke-width",pi.nodeStrokeWidth);var o=void 0;for(var s in n)if(n[s].commit===i){o=n[s];break}o&&(x.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&&di[e]);Array.isArray(e)&&(x.debug("found merge commmit",e),xi(t,e[0],n,r),ui++,xi(t,e[1],n,r),ui--)}function _i(t,e,n,r){for(r=r||0;e.seq>0&&!e.lineDrawn;)"string"==typeof e.parent?(vi(t,e.id,e.parent,n,r),e.lineDrawn=!0,e=di[e.parent]):Array.isArray(e.parent)&&(vi(t,e.id,e.parent[0],n,r),vi(t,e.id,e.parent[1],n,r+1),_i(t,di[e.parent[1]],n,r+1),e.lineDrawn=!0,e=di[e.parent[0]])}var wi,ki=function(t){yi=t},Ei=function(t,e,n){try{var r=hi.a.parser;r.yy=li,r.yy.clear(),x.debug("in gitgraph renderer",t+"\n","id:",e,n),r.parse(t+"\n"),pi=Object.assign(pi,yi,li.getOptions()),x.debug("effective options",pi);var i=li.getDirection();di=li.getCommits();var o=li.getBranchesAsObjArray();"BT"===i&&(pi.nodeLabel.x=o.length*pi.branchOffset,pi.nodeLabel.width="100%",pi.nodeLabel.y=-2*pi.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",pi.nodeRadius).attr("cx",0).attr("cy",0),t.select("#def-commit").append("foreignObject").attr("width",pi.nodeLabel.width).attr("height",pi.nodeLabel.height).attr("x",pi.nodeLabel.x).attr("y",pi.nodeLabel.y).attr("class","node-label").attr("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility").append("p").html("")}(s),ui=1,o){var c=o[u];xi(s,c.commit.id,o,i),_i(s,c.commit,i),ui++}s.attr("height",(function(){return"BT"===i?Object.keys(di).length*pi.nodeSpacing:(o.length+1)*pi.branchOffset}))}catch(t){x.error("Error while rendering gitgraph"),x.error(t.message)}},Ti="",Ai=!1,Si={setMessage:function(t){x.debug("Setting message to: "+t),Ti=t},getMessage:function(){return Ti},setInfo:function(t){Ai=t},getInfo:function(){return Ai}},Mi=n(65),Oi=n.n(Mi),Ni={},Ci=function(t){Object.keys(t).forEach((function(e){Ni[e]=t[e]}))},Di=function(t,e,n){try{var r=Oi.a.parser;r.yy=Si,x.debug("Renering info diagram\n"+t),r.parse(t),x.debug("Parsed info diagram");var i=Object(a.select)("#"+e);i.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size","32px").style("text-anchor","middle").text("v "+n),i.attr("height",100),i.attr("width",400)}catch(t){x.error("Error while rendering info diagram"),x.error(t.message)}},Li={},Fi="",Ii={addSection:function(t,e){void 0===Li[t]&&(Li[t]=e,x.debug("Added new section :",t))},getSections:function(){return Li},cleanupValue:function(t){return":"===t.substring(0,1)?(t=t.substring(1).trim(),Number(t.trim())):Number(t.trim())},clear:function(){Li={},Fi=""},setTitle:function(t){Fi=t},getTitle:function(){return Fi}},Pi=n(66),Ri=n.n(Pi),Bi={},ji=function(t){Object.keys(t).forEach((function(e){Bi[e]=t[e]}))},Yi=function(t,e){try{var n=Ri.a.parser;n.yy=Ii,x.debug("Rendering info diagram\n"+t),n.yy.clear(),n.parse(t),x.debug("Parsed info diagram");var r=document.getElementById(e);void 0===(wi=r.parentElement.offsetWidth)&&(wi=1200),void 0!==Bi.useWidth&&(wi=Bi.useWidth);r.setAttribute("height","100%"),r.setAttribute("viewBox","0 0 "+wi+" 450");var i=wi,o=Math.min(i,450)/2-40,s=Object(a.select)("#"+e).append("svg").attr("width",i).attr("height",450).append("g").attr("transform","translate("+i/2+",225)"),u=Ii.getSections(),c=0;Object.keys(u).forEach((function(t){c+=u[t]})),x.info(u);var l=Object(a.scaleOrdinal)().domain(u).range(a.schemeSet2),f=Object(a.pie)().value((function(t){return t.value}))(Object(a.entries)(u)),h=Object(a.arc)().innerRadius(0).outerRadius(o);s.selectAll("mySlices").data(f).enter().append("path").attr("d",h).attr("fill",(function(t){return l(t.data.key)})).attr("stroke","black").style("stroke-width","2px").style("opacity",.7),s.selectAll("mySlices").data(f).enter().append("text").text((function(t){return(t.data.value/c*100).toFixed(0)+"%"})).attr("transform",(function(t){return"translate("+h.centroid(t)+")"})).style("text-anchor","middle").attr("class","slice").style("font-size",17),s.append("text").text(n.yy.getTitle()).attr("x",0).attr("y",-200).attr("class","pieTitleText");var d=s.selectAll(".legend").data(l.domain()).enter().append("g").attr("class","legend").attr("transform",(function(t,e){return"translate(216,"+(22*e-22*l.domain().length/2)+")"}));d.append("rect").attr("width",18).attr("height",18).style("fill",l).style("stroke",l),d.append("text").attr("x",22).attr("y",14).text((function(t){return t}))}catch(t){x.error("Error while rendering info diagram"),x.error(t.message)}},zi={},Ui=[],$i="",Gi={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===zi[t]&&(zi[t]=t,x.debug("Added new entity :",t))},getEntities:function(){return zi},addRelationship:function(t,e,n,r){var i={entityA:t,roleA:e,entityB:n,relSpec:r};Ui.push(i),x.debug("Added new relationship :",i)},getRelationships:function(){return Ui},clear:function(){zi={},Ui=[],$i=""},setTitle:function(t){$i=t},getTitle:function(){return $i}},Vi=n(67),Hi=n.n(Vi),Wi={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"},qi=Wi,Xi=function(t,e){var n;t.append("defs").append("marker").attr("id",Wi.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",Wi.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",Wi.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",Wi.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",Wi.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",Wi.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",Wi.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",Wi.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")},Zi={},Ji=function(t){return(t.entityA+t.roleA+t.entityB).replace(/\s/g,"")},Qi=0,Ki=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");return i.attr("x",e.x+2*e.textMargin),i.text(n),r},pa=-1,ya=function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},ga=function(){function t(t,e,n,i,a,o,s,u){r(e.append("text").attr("x",n+a/2).attr("y",i+o/2+5).style("font-color",u).style("text-anchor","middle").text(t),s)}function e(t,e,n,i,a,o,s,u,c){for(var l=u.taskFontSize,f=u.taskFontFamily,h=t.split(//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("+s.cx+","+(s.cy+2)+")")}(u):s.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("+s.cx+","+(s.cy+7)+")")}(u):function(t){t.append("line").attr("stroke",2).attr("x1",s.cx-5).attr("y1",s.cy+7).attr("x2",s.cx+5).attr("y2",s.cy+7).attr("class","task-line").attr("stroke-width","1px").attr("stroke","#666")}(u);var c=ya();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,fa(i,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};ha(i,r),l+=10})),ga(n)(e.task,i,c.x,c.y,c.width,c.height,{class:"task"},n,e.colour)},_a=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")};ea.parser.yy=la;var wa={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"]},ka={};var Ea=wa.leftMargin,Ta={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,a=this,o=0;this.sequenceItems.forEach((function(s){o++;var u=a.sequenceItems.length-o+1;a.updateVal(s,"starty",e-u*wa.boxMargin,Math.min),a.updateVal(s,"stopy",r+u*wa.boxMargin,Math.max),a.updateVal(Ta.data,"startx",t-u*wa.boxMargin,Math.min),a.updateVal(Ta.data,"stopx",n+u*wa.boxMargin,Math.max),"activation"!==i&&(a.updateVal(s,"startx",t-u*wa.boxMargin,Math.min),a.updateVal(s,"stopx",n+u*wa.boxMargin,Math.max),a.updateVal(Ta.data,"starty",e-u*wa.boxMargin,Math.min),a.updateVal(Ta.data,"stopy",r+u*wa.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(Ta.data,"startx",i,Math.min),this.updateVal(Ta.data,"starty",o,Math.min),this.updateVal(Ta.data,"stopx",a,Math.max),this.updateVal(Ta.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}},Aa=wa.sectionFills,Sa=wa.sectionColours,Ma=function(t,e,n){for(var r="",i=n+(2*wa.height+wa.diagramMarginY),a=0,o="#CCC",s="black",u=0;uPa.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: "+Pa.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){var e=t;return e=(e=(e=e.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=N(i),h=l.firstChild,d=h.firstChild,p=Da[Pa.theme];if(void 0===p&&(p=""),void 0!==Pa.themeCSS&&(p+="\n".concat(Pa.themeCSS)),void 0!==Pa.fontFamily&&(p+="\n:root { --mermaid-font-family: ".concat(Pa.fontFamily,"}")),void 0!==Pa.altFontFamily&&(p+="\n:root { --mermaid-alt-font-family: ".concat(Pa.altFontFamily,"}")),"flowchart"===f||"flowchart-v2"===f){var y=Dt(i);for(var g in y)p+="\n.".concat(g," > * { ").concat(y[g].styles.join(" !important; ")," !important; }"),y[g].textStyles&&(p+="\n.".concat(g," tspan { ").concat(y[g].textStyles.join(" !important; ")," !important; }"))}var m=document.createElement("style");m.innerHTML=s()(p,"#".concat(t)),h.insertBefore(m,d);var v=document.createElement("style"),b=window.getComputedStyle(h);switch(v.innerHTML="#".concat(t," {\n color: ").concat(b.color,";\n font: ").concat(b.font,";\n }"),h.insertBefore(v,d),f){case"git":Pa.flowchart.arrowMarkerAbsolute=Pa.arrowMarkerAbsolute,ki(Pa.git),Ei(i,t,!1);break;case"flowchart":Pa.flowchart.arrowMarkerAbsolute=Pa.arrowMarkerAbsolute,Ct(Pa.flowchart),Lt(i,t,!1);break;case"flowchart-v2":Pa.flowchart.arrowMarkerAbsolute=Pa.arrowMarkerAbsolute,be(Pa.flowchart),xe(i,t,!1);break;case"sequence":Pa.sequence.arrowMarkerAbsolute=Pa.arrowMarkerAbsolute,Pa.sequenceDiagram?(tn(Object.assign(Pa.sequence,Pa.sequenceDiagram)),console.error("`mermaid config.sequenceDiagram` has been renamed to `config.sequence`. Please update your mermaid config.")):tn(Pa.sequence),en(i,t);break;case"gantt":Pa.gantt.arrowMarkerAbsolute=Pa.arrowMarkerAbsolute,Bn(Pa.gantt),jn(i,t);break;case"class":Pa.class.arrowMarkerAbsolute=Pa.arrowMarkerAbsolute,yr(Pa.class),gr(i,t);break;case"state":Ur(Pa.state),$r(i,t);break;case"stateDiagram":Xr(Pa.state),Zr(i,t);break;case"info":Pa.class.arrowMarkerAbsolute=Pa.arrowMarkerAbsolute,Ci(Pa.class),Di(i,t,u.version);break;case"pie":Pa.class.arrowMarkerAbsolute=Pa.arrowMarkerAbsolute,ji(Pa.class),Yi(i,t,u.version);break;case"er":Ki(Pa.er),ta(i,t,u.version);break;case"journey":Oa(Pa.journey),Na(i,t,u.version)}Object(a.select)('[id="'.concat(t,'"]')).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");var _=Object(a.select)("#d"+t).node().innerHTML;if(Pa.arrowMarkerAbsolute&&"false"!==Pa.arrowMarkerAbsolute||(_=_.replace(/marker-end="url\(.*?#/g,'marker-end="url(#',"g")),_=function(t){var e=t;return e=(e=(e=e.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(_,ut.bindFunctions);break;case"gantt":n(_,Fn.bindFunctions);break;case"class":n(_,Kn.bindFunctions);break;default:n(_)}else x.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=N(t);switch(x.debug("Type "+n),n){case"git":(e=hi.a).parser.yy=li;break;case"flowchart":case"flowchart-v2":ut.clear(),(e=lt.a).parser.yy=ut;break;case"sequence":(e=Ne.a).parser.yy=Ue;break;case"gantt":(e=rn.a).parser.yy=Fn;break;case"class":(e=er.a).parser.yy=Kn;break;case"state":case"stateDiagram":(e=Dr.a).parser.yy=Nr;break;case"info":x.debug("info info info"),(e=Oi.a).parser.yy=Si;break;case"pie":x.debug("pie"),(e=Ri.a).parser.yy=Ii;break;case"er":x.debug("er"),(e=Hi.a).parser.yy=Gi;break;case"journey":x.debug("Journey"),(e=na.a).parser.yy=la}e.parser.yy.parseError=function(t,e){throw{str:t,hash:e}},e.parse(t)},initialize:function(t){x.debug("Initializing mermaidAPI ",u.version),"object"===Ca(t)&&function(t){for(var e=Object.keys(t),n=0;n=2?( +/*! sequence config was passed as #1 */ +void 0!==arguments[0]&&(ja.sequenceConfig=arguments[0]),t=arguments[1]):t=arguments[0],"function"==typeof arguments[arguments.length-1]?(e=arguments[arguments.length-1],x.debug("Callback function found")):void 0!==r.mermaid&&("function"==typeof r.mermaid.callback?(e=r.mermaid.callback,x.debug("Callback function found")):x.debug("No Callback function found")),t=void 0===t?document.querySelectorAll(".mermaid"):"string"==typeof t?document.querySelectorAll(t):t instanceof window.Node?[t]:t,x.debug("Start On Load before: "+ja.startOnLoad),void 0!==ja.startOnLoad&&(x.debug("Start On Load inner: "+ja.startOnLoad),Ra.initialize({startOnLoad:ja.startOnLoad})),void 0!==ja.ganttConfig&&Ra.initialize({gantt:ja.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,"
"),Ra.render(o,n,(function(t,n){a.innerHTML=t,void 0!==e&&e(o),n&&n(a)}),a)},o=0;o>>0,r=0;rLt(t)?(i=t+1,s=o-Lt(t)):(i=t,s=o),{year:i,dayOfYear:s}}function zt(t,e,n){var r,a,i=It(t.year(),e,n),s=Math.floor((t.dayOfYear()-i-1)/7)+1;return s<1?r=s+Wt(a=t.year()-1,e,n):s>Wt(t.year(),e,n)?(r=s-Wt(t.year(),e,n),a=t.year()+1):(a=t.year(),r=s),{week:r,year:a}}function Wt(t,e,n){var r=It(t,e,n),a=It(t+1,e,n);return(Lt(t)-r+a)/7}z("w",["ww",2],"wo","week"),z("W",["WW",2],"Wo","isoWeek"),j("week","w"),j("isoWeek","W"),H("week",5),H("isoWeek",5),ut("w",Z),ut("ww",Z,V),ut("W",Z),ut("WW",Z,V),ft(["w","ww","W","WW"],function(t,e,n,r){e[r.substr(0,1)]=w(t)});z("d",0,"do","day"),z("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),z("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),z("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),z("e",0,0,"weekday"),z("E",0,0,"isoWeekday"),j("day","d"),j("weekday","e"),j("isoWeekday","E"),H("day",11),H("weekday",11),H("isoWeekday",11),ut("d",Z),ut("e",Z),ut("E",Z),ut("dd",function(t,e){return e.weekdaysMinRegex(t)}),ut("ddd",function(t,e){return e.weekdaysShortRegex(t)}),ut("dddd",function(t,e){return e.weekdaysRegex(t)}),ft(["dd","ddd","dddd"],function(t,e,n,r){var a=n._locale.weekdaysParse(t,r,n._strict);null!=a?e.d=a:y(n).invalidWeekday=t}),ft(["d","e","E"],function(t,e,n,r){e[r]=w(t)});var qt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");var Ut="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");var Vt="Su_Mo_Tu_We_Th_Fr_Sa".split("_");var $t=st;var Gt=st;var Jt=st;function Zt(){function t(t,e){return e.length-t.length}var e,n,r,a,i,s=[],o=[],u=[],l=[];for(e=0;e<7;e++)n=m([2e3,1]).day(e),r=this.weekdaysMin(n,""),a=this.weekdaysShort(n,""),i=this.weekdays(n,""),s.push(r),o.push(a),u.push(i),l.push(r),l.push(a),l.push(i);for(s.sort(t),o.sort(t),u.sort(t),l.sort(t),e=0;e<7;e++)o[e]=ct(o[e]),u[e]=ct(u[e]),l[e]=ct(l[e]);this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+s.join("|")+")","i")}function Kt(){return this.hours()%12||12}function Xt(t,e){z(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function Qt(t,e){return e._meridiemParse}z("H",["HH",2],0,"hour"),z("h",["hh",2],0,Kt),z("k",["kk",2],0,function(){return this.hours()||24}),z("hmm",0,0,function(){return""+Kt.apply(this)+P(this.minutes(),2)}),z("hmmss",0,0,function(){return""+Kt.apply(this)+P(this.minutes(),2)+P(this.seconds(),2)}),z("Hmm",0,0,function(){return""+this.hours()+P(this.minutes(),2)}),z("Hmmss",0,0,function(){return""+this.hours()+P(this.minutes(),2)+P(this.seconds(),2)}),Xt("a",!0),Xt("A",!1),j("hour","h"),H("hour",13),ut("a",Qt),ut("A",Qt),ut("H",Z),ut("h",Z),ut("k",Z),ut("HH",Z,V),ut("hh",Z,V),ut("kk",Z,V),ut("hmm",K),ut("hmmss",X),ut("Hmm",K),ut("Hmmss",X),ht(["H","HH"],yt),ht(["k","kk"],function(t,e,n){var r=w(t);e[yt]=24===r?0:r}),ht(["a","A"],function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t}),ht(["h","hh"],function(t,e,n){e[yt]=w(t),y(n).bigHour=!0}),ht("hmm",function(t,e,n){var r=t.length-2;e[yt]=w(t.substr(0,r)),e[gt]=w(t.substr(r)),y(n).bigHour=!0}),ht("hmmss",function(t,e,n){var r=t.length-4,a=t.length-2;e[yt]=w(t.substr(0,r)),e[gt]=w(t.substr(r,2)),e[vt]=w(t.substr(a)),y(n).bigHour=!0}),ht("Hmm",function(t,e,n){var r=t.length-2;e[yt]=w(t.substr(0,r)),e[gt]=w(t.substr(r))}),ht("Hmmss",function(t,e,n){var r=t.length-4,a=t.length-2;e[yt]=w(t.substr(0,r)),e[gt]=w(t.substr(r,2)),e[vt]=w(t.substr(a))});var te,ee=Yt("Hours",!0),ne={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:jt,monthsShort:Ct,week:{dow:0,doy:6},weekdays:qt,weekdaysMin:Vt,weekdaysShort:Ut,meridiemParse:/[ap]\.?m?\.?/i},re={},ae={};function ie(t){return t?t.toLowerCase().replace("_","-"):t}function se(t){var e=null;if(!re[t]&&void 0!==Wn&&Wn&&Wn.exports)try{e=te._abbr;qn(207)("./"+t),oe(e)}catch(t){}return re[t]}function oe(t,e){var n;return t&&(n=l(e)?le(t):ue(t,e))&&(te=n),te._abbr}function ue(t,e){if(null!==e){var n=ne;if(e.abbr=t,null!=re[t])Y("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."),n=re[t]._config;else if(null!=e.parentLocale){if(null==re[e.parentLocale])return ae[e.parentLocale]||(ae[e.parentLocale]=[]),ae[e.parentLocale].push({name:t,config:e}),null;n=re[e.parentLocale]._config}return re[t]=new S(A(n,e)),ae[t]&&ae[t].forEach(function(t){ue(t.name,t.config)}),oe(t),re[t]}return delete re[t],null}function le(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return te;if(!o(t)){if(e=se(t))return e;t=[t]}return function(t){for(var e,n,r,a,i=0;i=e&&s(a,n,!0)>=e-1)break;e--}i++}return null}(t)}function ce(t){var e,n=t._a;return n&&-2===y(t).overflow&&(e=n[pt]<0||11St(n[_t],n[pt])?mt:n[yt]<0||24Wt(n,i,s)?y(t)._overflowWeeks=!0:null!=u?y(t)._overflowWeekday=!0:(o=Rt(n,r,a,i,s),t._a[_t]=o.year,t._dayOfYear=o.dayOfYear)}(t),null!=t._dayOfYear&&(i=de(t._a[_t],r[_t]),(t._dayOfYear>Lt(i)||0===t._dayOfYear)&&(y(t)._overflowDayOfYear=!0),n=Nt(i,0,t._dayOfYear),t._a[pt]=n.getUTCMonth(),t._a[mt]=n.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=s[e]=r[e];for(;e<7;e++)t._a[e]=s[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[yt]&&0===t._a[gt]&&0===t._a[vt]&&0===t._a[Mt]&&(t._nextDay=!0,t._a[yt]=0),t._d=(t._useUTC?Nt:function(t,e,n,r,a,i,s){var o=new Date(t,e,n,r,a,i,s);return t<100&&0<=t&&isFinite(o.getFullYear())&&o.setFullYear(t),o}).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[yt]=24),t._w&&void 0!==t._w.d&&t._w.d!==a&&(y(t).weekdayMismatch=!0)}}var fe=/^\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)?)?$/,_e=/^\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)?)?$/,pe=/Z|[+-]\d\d(?::?\d\d)?/,me=[["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}/]],ye=[["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/]],ge=/^\/?Date\((\-?\d+)/i;function ve(t){var e,n,r,a,i,s,o=t._i,u=fe.exec(o)||_e.exec(o);if(u){for(y(t).iso=!0,e=0,n=me.length;en.valueOf():n.valueOf()this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},ln.isLocal=function(){return!!this.isValid()&&!this._isUTC},ln.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},ln.isUtc=Ie,ln.isUTC=Ie,ln.zoneAbbr=function(){return this._isUTC?"UTC":""},ln.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},ln.dates=n("dates accessor is deprecated. Use date instead.",nn),ln.months=n("months accessor is deprecated. Use month instead",Ot),ln.years=n("years accessor is deprecated. Use year instead",Dt),ln.zone=n("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()}),ln.isDSTShifted=n("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!l(this._isDSTShifted))return this._isDSTShifted;var t={};if(M(t,this),(t=xe(t))._a){var e=t._isUTC?m(t._a):Ye(t._a);this._isDSTShifted=this.isValid()&&0Y.width){var l=a.text();if(a.text(""),l){var c,d;if(-1!==l.indexOf(" "))c=" ",d=l.split(" ");else{c="";var h,f,_=l.length,p=Math.ceil(s/Y.width),m=Math.floor(_/p);_<=m*p||p++,d=[];for(var y=0;yY.width&&w&&""!==w&&(k={string:w,width:x,offset:M+=x},v.push(k),a.text(""),a.text(L),y===d.length-1&&(b=L,a.text(b),D=n.getComputedTextLength())),y===d.length-1){a.text("");b&&""!==b&&(0>>1,Os=[["ary",vs],["bind",hs],["bindKey",fs],["curry",ps],["curryRight",ms],["flip",ks],["partial",ys],["partialRight",gs],["rearg",Ms]],Hs="[object Arguments]",Ps="[object Array]",Bs="[object AsyncFunction]",Ns="[object Boolean]",Is="[object Date]",Rs="[object DOMException]",zs="[object Error]",Ws="[object Function]",qs="[object GeneratorFunction]",Us="[object Map]",Vs="[object Number]",$s="[object Null]",Gs="[object Object]",Js="[object Promise]",Zs="[object Proxy]",Ks="[object RegExp]",Xs="[object Set]",Qs="[object String]",to="[object Symbol]",eo="[object Undefined]",no="[object WeakMap]",ro="[object WeakSet]",ao="[object ArrayBuffer]",io="[object DataView]",so="[object Float32Array]",oo="[object Float64Array]",uo="[object Int8Array]",lo="[object Int16Array]",co="[object Int32Array]",ho="[object Uint8Array]",fo="[object Uint8ClampedArray]",_o="[object Uint16Array]",po="[object Uint32Array]",mo=/\b__p \+= '';/g,yo=/\b(__p \+=) '' \+/g,go=/(__e\(.*?\)|\b__t\)) \+\n'';/g,vo=/&(?:amp|lt|gt|quot|#39);/g,Mo=/[&<>"']/g,ko=RegExp(vo.source),bo=RegExp(Mo.source),Lo=/<%-([\s\S]+?)%>/g,wo=/<%([\s\S]+?)%>/g,xo=/<%=([\s\S]+?)%>/g,Do=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Yo=/^\w*$/,To=/^\./,Ao=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,So=/[\\^$.*+?()[\]{}|]/g,Eo=RegExp(So.source),jo=/^\s+|\s+$/g,Co=/^\s+/,Fo=/\s+$/,Oo=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ho=/\{\n\/\* \[wrapped with (.+)\] \*/,Po=/,? & /,Bo=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,No=/\\(\\)?/g,Io=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ro=/\w*$/,zo=/^[-+]0x[0-9a-f]+$/i,Wo=/^0b[01]+$/i,qo=/^\[object .+?Constructor\]$/,Uo=/^0o[0-7]+$/i,Vo=/^(?:0|[1-9]\d*)$/,$o=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Go=/($^)/,Jo=/['\n\r\u2028\u2029\\]/g,t="\\ud800-\\udfff",e="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",n="\\u2700-\\u27bf",r="a-z\\xdf-\\xf6\\xf8-\\xff",a="A-Z\\xc0-\\xd6\\xd8-\\xde",i="\\ufe0e\\ufe0f",s="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",o="['’]",u="["+t+"]",l="["+s+"]",c="["+e+"]",d="\\d+",h="["+n+"]",f="["+r+"]",_="[^"+t+s+d+n+r+a+"]",p="\\ud83c[\\udffb-\\udfff]",m="[^"+t+"]",y="(?:\\ud83c[\\udde6-\\uddff]){2}",g="[\\ud800-\\udbff][\\udc00-\\udfff]",v="["+a+"]",M="\\u200d",k="(?:"+f+"|"+_+")",b="(?:"+v+"|"+_+")",L="(?:['’](?:d|ll|m|re|s|t|ve))?",w="(?:['’](?:D|LL|M|RE|S|T|VE))?",x="(?:"+c+"|"+p+")"+"?",D="["+i+"]?",Y=D+x+("(?:"+M+"(?:"+[m,y,g].join("|")+")"+D+x+")*"),T="(?:"+[h,y,g].join("|")+")"+Y,A="(?:"+[m+c+"?",c,y,g,u].join("|")+")",Zo=RegExp(o,"g"),Ko=RegExp(c,"g"),S=RegExp(p+"(?="+p+")|"+A+Y,"g"),Xo=RegExp([v+"?"+f+"+"+L+"(?="+[l,v,"$"].join("|")+")",b+"+"+w+"(?="+[l,v+k,"$"].join("|")+")",v+"?"+k+"+"+L,v+"+"+w,"\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)","\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)",d,T].join("|"),"g"),E=RegExp("["+M+t+e+i+"]"),Qo=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,tu=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],eu=-1,nu={};nu[so]=nu[oo]=nu[uo]=nu[lo]=nu[co]=nu[ho]=nu[fo]=nu[_o]=nu[po]=!0,nu[Hs]=nu[Ps]=nu[ao]=nu[Ns]=nu[io]=nu[Is]=nu[zs]=nu[Ws]=nu[Us]=nu[Vs]=nu[Gs]=nu[Ks]=nu[Xs]=nu[Qs]=nu[no]=!1;var ru={};ru[Hs]=ru[Ps]=ru[ao]=ru[io]=ru[Ns]=ru[Is]=ru[so]=ru[oo]=ru[uo]=ru[lo]=ru[co]=ru[Us]=ru[Vs]=ru[Gs]=ru[Ks]=ru[Xs]=ru[Qs]=ru[to]=ru[ho]=ru[fo]=ru[_o]=ru[po]=!0,ru[zs]=ru[Ws]=ru[no]=!1;var j={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},au=parseFloat,iu=parseInt,C="object"==typeof R&&R&&R.Object===Object&&R,F="object"==typeof self&&self&&self.Object===Object&&self,su=C||F||Function("return this")(),O="object"==typeof W&&W&&!W.nodeType&&W,H=O&&"object"==typeof z&&z&&!z.nodeType&&z,ou=H&&H.exports===O,P=ou&&C.process,B=function(){try{return P&&P.binding&&P.binding("util")}catch(t){}}(),uu=B&&B.isArrayBuffer,lu=B&&B.isDate,cu=B&&B.isMap,du=B&&B.isRegExp,hu=B&&B.isSet,fu=B&&B.isTypedArray;function _u(t,e){return t.set(e[0],e[1]),t}function pu(t,e){return t.add(e),t}function mu(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function yu(t,e,n,r){for(var a=-1,i=null==t?0:t.length;++a":">",'"':""","'":"'"});function Vu(t){return"\\"+j[t]}function $u(t){return E.test(t)}function Gu(t){var n=-1,r=Array(t.size);return t.forEach(function(t,e){r[++n]=[e,t]}),r}function Ju(e,n){return function(t){return e(n(t))}}function Zu(t,e){for(var n=-1,r=t.length,a=0,i=[];++n",""":'"',"'":"'"});var el=function t(e){var n,T=(e=null==e?su:el.defaults(su.Object(),e,el.pick(su,tu))).Array,r=e.Date,a=e.Error,m=e.Function,i=e.Math,w=e.Object,y=e.RegExp,c=e.String,A=e.TypeError,s=T.prototype,o=m.prototype,u=w.prototype,l=e["__core-js_shared__"],d=o.toString,x=u.hasOwnProperty,h=0,f=(n=/[^.]+$/.exec(l&&l.keys&&l.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",_=u.toString,p=d.call(w),g=su._,v=y("^"+d.call(x).replace(So,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),M=ou?e.Buffer:ts,k=e.Symbol,b=e.Uint8Array,L=M?M.allocUnsafe:ts,D=Ju(w.getPrototypeOf,w),Y=w.create,S=u.propertyIsEnumerable,E=s.splice,j=k?k.isConcatSpreadable:ts,C=k?k.iterator:ts,F=k?k.toStringTag:ts,O=function(){try{var t=In(w,"defineProperty");return t({},"",{}),t}catch(t){}}(),H=e.clearTimeout!==su.clearTimeout&&e.clearTimeout,P=r&&r.now!==su.Date.now&&r.now,B=e.setTimeout!==su.setTimeout&&e.setTimeout,N=i.ceil,I=i.floor,R=w.getOwnPropertySymbols,z=M?M.isBuffer:ts,W=e.isFinite,q=s.join,U=Ju(w.keys,w),V=i.max,$=i.min,G=r.now,J=e.parseInt,Z=i.random,K=s.reverse,X=In(e,"DataView"),Q=In(e,"Map"),tt=In(e,"Promise"),et=In(e,"Set"),nt=In(e,"WeakMap"),rt=In(w,"create"),at=nt&&new nt,it={},st=fr(X),ot=fr(Q),ut=fr(tt),lt=fr(et),ct=fr(nt),dt=k?k.prototype:ts,ht=dt?dt.valueOf:ts,ft=dt?dt.toString:ts;function _t(t){if(Sa(t)&&!va(t)&&!(t instanceof gt)){if(t instanceof yt)return t;if(x.call(t,"__wrapped__"))return _r(t)}return new yt(t)}var pt=function(){function n(){}return function(t){if(!Aa(t))return{};if(Y)return Y(t);n.prototype=t;var e=new n;return n.prototype=ts,e}}();function mt(){}function yt(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=ts}function gt(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=js,this.__views__=[]}function vt(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e=es&&(i=Ru,s=!1,e=new bt(e));t:for(;++a>>0,e>>>=0;for(var i=T(a);++r>>1,s=t[i];null!==s&&!Pa(s)&&(n?s<=e:s=ws)return arguments[0]}else r=0;return n.apply(ts,arguments)}}function ur(t,e){var n=-1,r=t.length,a=r-1;for(e=e===ts?r:e;++n>>0)?(t=$a(t))&&("string"==typeof e||null!=e&&!Fa(e))&&!(e=Pe(e))&&$u(t)?Je(Qu(t),0,n):t.split(e,n):[]},_t.spread=function(r,a){if("function"!=typeof r)throw new A(rs);return a=null==a?0:V(Wa(a),0),we(function(t){var e=t[a],n=Je(t,0,a);return e&&xu(n,e),mu(r,this,n)})},_t.tail=function(t){var e=null==t?0:t.length;return e?Ee(t,1,e):[]},_t.take=function(t,e,n){return t&&t.length?Ee(t,0,(e=n||e===ts?1:Wa(e))<0?0:e):[]},_t.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?Ee(t,(e=r-(e=n||e===ts?1:Wa(e)))<0?0:e,r):[]},_t.takeRightWhile=function(t,e){return t&&t.length?Re(t,Pn(e,3),!1,!0):[]},_t.takeWhile=function(t,e){return t&&t.length?Re(t,Pn(e,3)):[]},_t.tap=function(t,e){return e(t),t},_t.throttle=function(t,e,n){var r=!0,a=!0;if("function"!=typeof t)throw new A(rs);return Aa(n)&&(r="leading"in n?!!n.leading:r,a="trailing"in n?!!n.trailing:a),sa(t,e,{leading:r,maxWait:e,trailing:a})},_t.thru=zr,_t.toArray=Ra,_t.toPairs=fi,_t.toPairsIn=_i,_t.toPath=function(t){return va(t)?wu(t,hr):Pa(t)?[t]:rn(dr($a(t)))},_t.toPlainObject=Va,_t.transform=function(t,r,a){var e=va(t),n=e||La(t)||Ba(t);if(r=Pn(r,4),null==a){var i=t&&t.constructor;a=n?e?new i:[]:Aa(t)&&Da(i)?pt(D(t)):{}}return(n?gu:Gt)(t,function(t,e,n){return r(a,t,e,n)}),a},_t.unary=function(t){return na(t,1)},_t.union=Sr,_t.unionBy=Er,_t.unionWith=jr,_t.uniq=function(t){return t&&t.length?Be(t):[]},_t.uniqBy=function(t,e){return t&&t.length?Be(t,Pn(e,2)):[]},_t.uniqWith=function(t,e){return e="function"==typeof e?e:ts,t&&t.length?Be(t,ts,e):[]},_t.unset=function(t,e){return null==t||Ne(t,e)},_t.unzip=Cr,_t.unzipWith=Fr,_t.update=function(t,e,n){return null==t?t:Ie(t,e,Ve(n))},_t.updateWith=function(t,e,n,r){return r="function"==typeof r?r:ts,null==t?t:Ie(t,e,Ve(n),r)},_t.values=pi,_t.valuesIn=function(t){return null==t?[]:Iu(t,oi(t))},_t.without=Or,_t.words=Di,_t.wrap=function(t,e){return ha(Ve(e),t)},_t.xor=Hr,_t.xorBy=Pr,_t.xorWith=Br,_t.zip=Nr,_t.zipObject=function(t,e){return qe(t||[],e||[],At)},_t.zipObjectDeep=function(t,e){return qe(t||[],e||[],Ye)},_t.zipWith=Ir,_t.entries=fi,_t.entriesIn=_i,_t.extend=Ja,_t.extendWith=Za,Hi(_t,_t),_t.add=Vi,_t.attempt=Yi,_t.camelCase=mi,_t.capitalize=yi,_t.ceil=$i,_t.clamp=function(t,e,n){return n===ts&&(n=e,e=ts),n!==ts&&(n=(n=Ua(n))==n?n:0),e!==ts&&(e=(e=Ua(e))==e?e:0),Ot(Ua(t),e,n)},_t.clone=function(t){return Ht(t,ls)},_t.cloneDeep=function(t){return Ht(t,os|ls)},_t.cloneDeepWith=function(t,e){return Ht(t,os|ls,e="function"==typeof e?e:ts)},_t.cloneWith=function(t,e){return Ht(t,ls,e="function"==typeof e?e:ts)},_t.conformsTo=function(t,e){return null==e||Pt(t,e,si(e))},_t.deburr=gi,_t.defaultTo=function(t,e){return null==t||t!=t?e:t},_t.divide=Gi,_t.endsWith=function(t,e,n){t=$a(t),e=Pe(e);var r=t.length,a=n=n===ts?r:Ot(Wa(n),0,r);return 0<=(n-=e.length)&&t.slice(n,a)==e},_t.eq=pa,_t.escape=function(t){return(t=$a(t))&&bo.test(t)?t.replace(Mo,Uu):t},_t.escapeRegExp=function(t){return(t=$a(t))&&Eo.test(t)?t.replace(So,"\\$&"):t},_t.every=function(t,e,n){var r=va(t)?Mu:zt;return n&&Gn(t,e,n)&&(e=ts),r(t,Pn(e,3))},_t.find=Ur,_t.findIndex=gr,_t.findKey=function(t,e){return Au(t,Pn(e,3),Gt)},_t.findLast=Vr,_t.findLastIndex=vr,_t.findLastKey=function(t,e){return Au(t,Pn(e,3),Jt)},_t.floor=Ji,_t.forEach=$r,_t.forEachRight=Gr,_t.forIn=function(t,e){return null==t?t:Vt(t,Pn(e,3),oi)},_t.forInRight=function(t,e){return null==t?t:$t(t,Pn(e,3),oi)},_t.forOwn=function(t,e){return t&&Gt(t,Pn(e,3))},_t.forOwnRight=function(t,e){return t&&Jt(t,Pn(e,3))},_t.get=ei,_t.gt=ma,_t.gte=ya,_t.has=function(t,e){return null!=t&&qn(t,e,ee)},_t.hasIn=ni,_t.head=kr,_t.identity=ji,_t.includes=function(t,e,n,r){t=ka(t)?t:pi(t),n=n&&!r?Wa(n):0;var a=t.length;return n<0&&(n=V(a+n,0)),Ha(t)?n<=a&&-1=$(a=e,i=n)&&r=this.__values__.length;return{done:t,value:t?ts:this.__values__[this.__index__++]}},_t.prototype.plant=function(t){for(var e,n=this;n instanceof mt;){var r=_r(n);r.__index__=0,r.__values__=ts,e?a.__wrapped__=r:e=r;var a=r;n=n.__wrapped__}return a.__wrapped__=t,e},_t.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof gt){var e=t;return this.__actions__.length&&(e=new gt(this)),(e=e.reverse()).__actions__.push({func:zr,args:[Ar],thisArg:ts}),new yt(e,this.__chain__)}return this.thru(Ar)},_t.prototype.toJSON=_t.prototype.valueOf=_t.prototype.value=function(){return ze(this.__wrapped__,this.__actions__)},_t.prototype.first=_t.prototype.head,C&&(_t.prototype[C]=function(){return this}),_t}();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(su._=el,define(function(){return el})):H?((H.exports=el)._=el,O._=el):su._=el}).call(this)}).call(W,e(18),e(3)(t))},function(t,e,n){var r=n(179),a=n(240),i=n(13);t.exports=function(t){return i(t)?r(t):a(t)}},function(t,e,n){var r=n(5).Symbol;t.exports=r},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,n){var r=n(269),a=n(270),i=n(271),s=n(272),o=n(273);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e>>1;i(t[a],e)<0?n=a+1:r=a}return n},right:function(t,e,n,r){for(arguments.length<3&&(n=0),arguments.length<4&&(r=t.length);n>>1;0e;)a.push(r/i);else for(;(r=t+n*++s)=_.length)return h?h.call(f,t):d?t.sort(d):t;for(var e,a,i,s,o=-1,u=t.length,l=_[r++],c=new g;++o=_.length)return t;var a=[],i=e[r++];return t.forEach(function(t,e){a.push({key:t,values:n(e,r)})}),i?a.sort(function(t,e){return i(t.key,e.key)}):a}(p(F.map,t,0),0)},f.key=function(t){return _.push(t),f},f.sortKeys=function(t){return e[_.length-1]=t,f},f.sortValues=function(t){return d=t,f},f.rollup=function(t){return h=t,f},f},F.set=function(t){var e=new D;if(t)for(var n=0,r=t.length;n>16,t>>8&255,255&t)}function se(t){return ie(t)+""}Xt.brighter=function(t){return new $t(Math.min(100,this.l+Gt*(arguments.length?t:1)),this.a,this.b)},Xt.darker=function(t){return new $t(Math.max(0,this.l-Gt*(arguments.length?t:1)),this.a,this.b)},Xt.rgb=function(){return Qt(this.l,this.a,this.b)};var oe=(F.rgb=ae).prototype=new It;function ue(t){return t<16?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function le(t,e,n){var r,a,i,s=0,o=0,u=0;if(r=/([a-z]+)\((.*)\)/.exec(t=t.toLowerCase()))switch(a=r[2].split(","),r[1]){case"hsl":return n(parseFloat(a[0]),parseFloat(a[1])/100,parseFloat(a[2])/100);case"rgb":return e(fe(a[0]),fe(a[1]),fe(a[2]))}return(i=_e.get(t))?e(i.r,i.g,i.b):(null==t||"#"!==t.charAt(0)||isNaN(i=parseInt(t.slice(1),16))||(4===t.length?(s=(3840&i)>>4,s|=s>>4,o=240&i,o|=o>>4,u=15&i,u|=u<<4):7===t.length&&(s=(16711680&i)>>16,o=(65280&i)>>8,u=255&i)),e(s,o,u))}function ce(t,e,n){var r,a,i=Math.min(t/=255,e/=255,n/=255),s=Math.max(t,e,n),o=s-i,u=(s+i)/2;return o?(a=u<.5?o/(s+i):o/(2-s-i),r=t==s?(e-n)/o+(e=e.t&&e.c(t-e.t)&&(e.c=null),e=e.n;return t}function De(){for(var t,e=ge,n=1/0;e;)e.c?(e.t=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,Se=F.map({b:function(t){return t.toString(2)},c:function(t){return String.fromCharCode(t)},o:function(t){return t.toString(8)},x:function(t){return t.toString(16)},X:function(t){return t.toString(16).toUpperCase()},g:function(t,e){return t.toPrecision(e)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},r:function(t,e){return(t=F.round(t,Ye(t,e))).toFixed(Math.max(0,Math.min(20,Ye(t*(1+1e-15),e))))}});function Ee(t){return t+""}var je=F.time={},Ce=Date;function Fe(){this._=new Date(1e));)i=u[a=(a+1)%u.length];return r.reverse().join(o)}:H,function(t){var e=Ae.exec(t),c=e[1]||" ",d=e[2]||">",h=e[3]||"-",n=e[4]||"",f=e[5],_=+e[6],p=e[7],m=e[8],y=e[9],g=1,v="",M="",k=!1,b=!0;switch(m&&(m=+m.substring(1)),(f||"0"===c&&"="===d)&&(f=c="0",d="="),y){case"n":p=!0,y="g";break;case"%":g=100,M="%",y="f";break;case"p":g=100,M="%",y="r";break;case"b":case"o":case"x":case"X":"#"===n&&(v="0"+y.toLowerCase());case"c":b=!1;case"d":k=!0,m=0;break;case"s":g=-1,y="r"}"$"===n&&(v=r[0],M=r[1]),"r"!=y||m||(y="g"),null!=m&&("g"==y?m=Math.max(1,Math.min(21,m)):"e"!=y&&"f"!=y||(m=Math.max(0,Math.min(20,m)))),y=Se.get(y)||Ee;var L=f&&p;return function(t){var e=M;if(k&&t%1)return"";var n=t<0||0===t&&1/t<0?(t=-t,"-"):"-"===h?"":h;if(g<0){var r=F.formatPrefix(t,m);t=r.scale(t),e=r.symbol+M}else t*=g;var a,i,s=(t=y(t,m)).lastIndexOf(".");if(s<0){var o=b?t.lastIndexOf("e"):-1;o<0?(a=t,i=""):(a=t.substring(0,o),i=t.substring(o))}else a=t.substring(0,s),i=w+t.substring(s+1);!f&&p&&(a=x(a,1/0));var u=v.length+a.length+i.length+(L?0:n.length),l=u<_?new Array(u=_-u+1).join(c):"";return L&&(a=x(l+a,l.length?_-i.length:1/0)),n+=v,t=a+i,("<"===d?n+t+l:">"===d?l+n+t:"^"===d?l.substring(0,u>>=1)+n+t+l.substring(u):n+(L?t:l+t))+e}}),timeFormat:function(t){var e=t.dateTime,n=t.date,r=t.time,a=t.periods,i=t.days,s=t.shortDays,o=t.months,u=t.shortMonths;function l(o){var u=o.length;function t(t){for(var e,n,r,a=[],i=-1,s=0;++iv(c,h)&&(h=t):v(t,h)>v(c,h)&&(c=t):c<=h?(tv(c,h)&&(h=t):v(t,h)>v(c,h)&&(c=t)}else y(t,e);p=n,_=t}function t(){m.point=s}function e(){l[0]=c,l[1]=h,m.point=y,p=null}function n(t,e){if(p){var n=t-_;i+=180bt&&(c=-(h=180)),l[0]=c,l[1]=h,p=null}function v(t,e){return(e-=t)<0?e+360:e}function M(t,e){return t[0]-e[0]}function k(t,e){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:tv(o[0],o[1])&&(o[1]=i[1]),v(i[0],o[1])>v(o[0],o[1])&&(o[0]=i[0])):n.push(o=i);for(var r,a,i,s=-1/0,o=(e=0,n[a=n.length-1]);e<=a;o=i,++e)i=n[e],(r=v(o[1],i[0]))>s&&(s=r,c=i[0],h=o[1])}return u=l=null,c===1/0||d===1/0?[[NaN,NaN],[NaN,NaN]]:[[c,d],[h,f]]}}(),F.geo.centroid=function(t){yn=gn=vn=Mn=kn=bn=Ln=wn=xn=Dn=Yn=0,F.geo.stream(t,Nn);var e=xn,n=Dn,r=Yn,a=e*e+n*n+r*r;return abt?Math.atan((Math.sin(r)*(o=Math.cos(i))*Math.sin(a)-Math.sin(i)*(s=Math.cos(r))*Math.sin(n))/(s*o*u)):(r+i)/2,d.point(p,_),d.lineEnd(),d.lineStart(),d.point(l,_),h=0),d.point(f=t,_=e),p=l},lineEnd:function(){d.lineEnd(),f=_=NaN},clean:function(){return 2-h}}},function(t,e,n,r){var a;if(null==t)a=n*Yt,r.point(-wt,a),r.point(0,a),r.point(wt,a),r.point(wt,0),r.point(wt,-a),r.point(0,-a),r.point(-wt,-a),r.point(-wt,0),r.point(-wt,a);else if(C(t[0]-e[0])>bt){var i=t[0]r&&0bt;return Zn(p,function(o){var u,l,c,d,h;return{lineStart:function(){d=c=!1,h=1},point:function(t,e){var n,r=[t,e],a=p(t,e),i=f?a?0:y(t,e):a?y(t+(t<0?wt:-wt),e):0;if(!u&&(d=c=a)&&o.lineStart(),a!==c&&(n=m(u,r),(Bn(u,n)||Bn(r,n))&&(r[0]+=bt,r[1]+=bt,a=p(r[0],r[1]))),a!==c)h=0,a?(o.lineStart(),n=m(r,u),o.point(n[0],n[1])):(n=m(u,r),o.point(n[0],n[1]),o.lineEnd()),u=n;else if(_&&u&&f^a){var s;i&l||!(s=m(r,u,!0))||(h=0,f?(o.lineStart(),o.point(s[0][0],s[0][1]),o.point(s[1][0],s[1][1]),o.lineEnd()):(o.point(s[1][0],s[1][1]),o.lineEnd(),o.lineStart(),o.point(s[0][0],s[0][1])))}!a||u&&Bn(u,r)||o.point(r[0],r[1]),u=r,c=a,l=i},lineEnd:function(){c&&o.lineEnd(),u=null},clean:function(){return h|(d&&c)<<1}}},Fr(a,6*Tt),f?[0,-a]:[-wt,a-wt]);function p(t,e){return Math.cos(t)*Math.cos(e)>D}function m(t,e,n){var r=[1,0,0],a=Cn(En(t),En(e)),i=jn(a,a),s=a[0],o=i-s*s;if(!o)return!n&&t;var u=D*i/o,l=-D*s/o,c=Cn(r,a),d=On(r,u);Fn(d,On(a,l));var h=c,f=jn(d,h),_=jn(h,h),p=f*f-_*(jn(d,d)-1);if(!(p<0)){var m=Math.sqrt(p),y=On(h,(-f-m)/_);if(Fn(y,d),y=Pn(y),!n)return y;var g,v=t[0],M=e[0],k=t[1],b=e[1];Mbt}).map(l)).concat(F.range(Math.ceil(s/_)*_,i,_).filter(function(t){return C(t%m)>bt}).map(c))}return g.lines=function(){return t().map(function(t){return{type:"LineString",coordinates:t}})},g.outline=function(){return{type:"Polygon",coordinates:[d(a).concat(h(o).slice(1),d(r).reverse().slice(1),h(u).reverse().slice(1))]}},g.extent=function(t){return arguments.length?g.majorExtent(t).minorExtent(t):g.minorExtent()},g.majorExtent=function(t){return arguments.length?(a=+t[0][0],r=+t[1][0],u=+t[0][1],o=+t[1][1],r=l)return}else i={x:m,y:u};n={x:m,y:l}}else{if(i){if(i.y=l)return}else i={x:(u-a)/r,y:u};n={x:(l-a)/r,y:l}}else{if(i){if(i.y=o)return}else i={x:s,y:r*s+a};n={x:o,y:r*o+a}}else{if(i){if(i.xbt||C(a-n)>bt)&&(o.splice(s,0,new Ya((y=i.site,g=c,v=C(r-d)=s&&r.x<=u&&r.y>=o&&r.y<=l?[[s,l],[u,l],[u,o],[s,o]]:[]).point=a[e]}),i}function d(t){return t.map(function(t,e){return{x:Math.round(r(t,e)/bt)*bt,y:Math.round(a(t,e)/bt)*bt,i:e}})}return i.links=function(e){return Ca(d(e)).edges.filter(function(t){return t.l&&t.r}).map(function(t){return{source:e[t.l.i],target:e[t.r.i]}})},i.triangles=function(h){var f=[];return Ca(d(h)).cells.forEach(function(t,e){for(var n,r,a,i,s=t.site,o=t.edges.sort(Ma),u=-1,l=o.length,c=o[l-1].edge,d=c.l===s?c.r:c.l;++ui&&(a=r.slice(i,a),o[s]?o[s]+=a:o[++s]=a),(e=e[0])===(n=n[0])?o[s]?o[s]+=n:o[++s]=n:(o[++s]=null,u.push({i:s,x:Ia(e,n)})),i=Wa.lastIndex;return iu&&(u=e.x),e.y>l&&(l=e.y),n.push(e.x),r.push(e.y);else for(a=0;aa&&(r=n,a=e);return r}function Bi(t){return t.reduce(Ni,0)}function Ni(t,e){return t+e[1]}function Ii(t,e){return Ri(t,Math.ceil(Math.log(e.length)/Math.LN2+1))}function Ri(t,e){for(var n=-1,r=+t[0],a=(t[1]-r)/e,i=[];++n<=e;)i[n]=a*n+r;return i}function zi(t){return[F.min(t),F.max(t)]}function Wi(t,e){return t.value-e.value}function qi(t,e){var n=t._pack_next;(t._pack_next=e)._pack_prev=t,(e._pack_next=n)._pack_prev=e}function Ui(t,e){(t._pack_next=e)._pack_prev=t}function Vi(t,e){var n=e.x-t.x,r=e.y-t.y,a=t.r+e.r;return n*n+r*r<.999*a*a}function $i(t){if((e=t.children)&&(u=e.length)){var e,n,r,a,i,s,o,u,l=1/0,c=-1/0,d=1/0,h=-1/0;if(e.forEach(Gi),(n=e[0]).x=-n.r,n.y=0,v(n),1=s[0]&&r<=s[1]&&((n=a[F.bisect(o,r,1,l)-1]).y+=c,n.push(t[e]));return a}return n.value=function(t){return arguments.length?(h=t,n):h},n.range=function(t){return arguments.length?(f=pe(t),n):f},n.bins=function(e){return arguments.length?(_="number"==typeof e?function(t){return Ri(t,e)}:pe(e),n):_},n.frequency=function(t){return arguments.length?(d=!!t,n):d},n},F.layout.pack=function(){var u,l=F.layout.hierarchy().sort(Wi),c=0,d=[1,1];function e(t,e){var n=l.call(this,t,e),r=n[0],a=d[0],i=d[1],s=null==u?Math.sqrt:"function"==typeof u?u:function(){return u};if(r.x=r.y=0,wi(r,function(t){t.r=+s(t.value)}),wi(r,$i),c){var o=c*(u?1:Math.max(2*r.r/a,2*r.r/i))/2;wi(r,function(t){t.r+=o}),wi(r,$i),wi(r,function(t){t.r-=o})}return function t(e,n,r,a){var i=e.children;e.x=n+=a*e.x;e.y=r+=a*e.y;e.r*=a;if(i)for(var s=-1,o=i.length;++ss.x&&(s=t),t.depth>o.depth&&(o=t)});var u=p(i,s)/2-i.x,l=h[0]/(s.x+p(s,i)/2+u),c=h[1]/(o.depth||1);Li(r,function(t){t.x=(t.x+u)*l,t.y=t.depth*c})}return n}function _(t){var e=t.children,n=t.parent.children,r=t.i?n[t.i-1]:null;if(e.length){!function(t){var e,n=0,r=0,a=t.children,i=a.length;for(;0<=--i;)(e=a[i]).z+=n,e.m+=n,n+=e.s+(r+=e.c)}(t);var a=(e[0].z+e[e.length-1].z)/2;r?(t.z=r.z+p(t._,r._),t.m=t.z-a):t.z=a}else r&&(t.z=r.z+p(t._,r._));t.parent.A=function(t,e,n){if(e){for(var r,a=t,i=t,s=e,o=a.parent.children[0],u=a.m,l=i.m,c=s.m,d=o.m;s=Qi(s),a=Xi(a),s&&a;)o=Xi(o),(i=Qi(i)).a=t,0<(r=s.z+c-a.z-u+p(s._,a._))&&(ts((f=t,_=n,(h=s).a.parent===f.parent?h.a:_),t,r),u+=r,l+=r),c+=s.m,u+=a.m,d+=o.m,l+=i.m;s&&!Qi(i)&&(i.t=s,i.m+=c-l),a&&!Xi(o)&&(o.t=a,o.m+=u-d,n=t)}var h,f,_;return n}(t,r,t.parent.A||n[0])}function m(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function y(t){t.x*=h[0],t.y=t.depth*h[1]}return e.separation=function(t){return arguments.length?(p=t,e):p},e.size=function(t){return arguments.length?(f=null==(h=t)?y:null,e):f?null:h},e.nodeSize=function(t){return arguments.length?(f=null==(h=t)?null:y,e):f?h:null},bi(e,d)},F.layout.cluster=function(){var c=F.layout.hierarchy().sort(null).value(null),d=Ki,h=[1,1],f=!1;function e(t,e){var a,n=c.call(this,t,e),r=n[0],i=0;wi(r,function(t){var e,n,r=t.children;r&&r.length?(t.x=(n=r).reduce(function(t,e){return t+e.x},0)/n.length,t.y=(e=r,1+F.max(e,function(t){return t.y}))):(t.x=a?i+=d(t,a):0,t.y=0,a=t)});var s=function t(e){var n=e.children;return n&&n.length?t(n[0]):e}(r),o=function t(e){var n,r=e.children;return r&&(n=r.length)?t(r[n-1]):e}(r),u=s.x-d(s,o)/2,l=o.x+d(o,s)/2;return wi(r,f?function(t){t.x=(t.x-r.x)*h[0],t.y=(r.y-t.y)*h[1]}:function(t){t.x=(t.x-u)/(l-u)*h[0],t.y=(1-(r.y?t.y/r.y:1))*h[1]}),n}return e.separation=function(t){return arguments.length?(d=t,e):d},e.size=function(t){return arguments.length?(f=null==(h=t),e):f?null:h},e.nodeSize=function(t){return arguments.length?(f=null!=(h=t),e):f?h:null},bi(e,c)},F.layout.treemap=function(){var r,a=F.layout.hierarchy(),c=Math.round,i=[1,1],s=null,d=es,o=!1,h="squarify",u=.5*(1+Math.sqrt(5));function f(t,e){for(var n,r,a=-1,i=t.length;++an.dy)&&(l=n.dy);++in.dx)&&(l=n.dx);++ir;i--);e=e.slice(a,i)}return e};a.tickFormat=function(t,n){if(!arguments.length)return ys;arguments.length<2?n=ys:"function"!=typeof n&&(n=F.format(n));var r=Math.max(1,u*t/a.ticks().length);return function(t){var e=t/h(Math.round(d(t)));return e*urect,.s>rect").attr("width",L[1]-L[0])}function S(t){t.select(".extent").attr("y",w[0]),t.selectAll(".extent,.e>rect,.w>rect").attr("height",w[1]-w[0])}function o(){var d,n,r=this,t=F.select(F.event.target),a=M.of(r,arguments),i=F.select(r),e=t.datum(),s=!/^(n|s)$/.test(e)&&k,o=!/^(e|w)$/.test(e)&&b,h=t.classed("extent"),u=gt(r),f=F.mouse(r),l=F.select(O(r)).on("keydown.brush",function(){32==F.event.keyCode&&(h||(d=null,f[0]-=L[1],f[1]-=w[1],h=2),P())}).on("keyup.brush",function(){32==F.event.keyCode&&2==h&&(f[0]+=L[1],f[1]+=w[1],h=0,P())});if(F.event.changedTouches?l.on("touchmove.brush",p).on("touchend.brush",y):l.on("mousemove.brush",p).on("mouseup.brush",y),i.interrupt().selectAll("*").interrupt(),h)f[0]=L[0]-f[0],f[1]=w[0]-f[1];else if(e){var c=+/w$/.test(e),_=+/^n/.test(e);n=[L[1-c]-f[0],w[1-_]-f[1]],f[0]=L[c],f[1]=w[_]}else F.event.altKey&&(d=f.slice());function p(){var t=F.mouse(r),e=!1;n&&(t[0]+=n[0],t[1]+=n[1]),h||(F.event.altKey?(d||(d=[(L[0]+L[1])/2,(w[0]+w[1])/2]),f[0]=L[+(t[0]e[0].length)){if(e=n,r=i,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,a[i])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,a[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return 0)/,/^(?:\^)/,/^(?:v\b)/,/^(?:\s*--[x]\s*)/,/^(?:\s*-->\s*)/,/^(?:\s*--[o]\s*)/,/^(?:\s*---\s*)/,/^(?:\s*-\.-[x]\s*)/,/^(?:\s*-\.->\s*)/,/^(?:\s*-\.-[o]\s*)/,/^(?:\s*-\.-\s*)/,/^(?:\s*.-[x]\s*)/,/^(?:\s*\.->\s*)/,/^(?:\s*\.-[o]\s*)/,/^(?:\s*\.-\s*)/,/^(?:\s*==[x]\s*)/,/^(?:\s*==>\s*)/,/^(?:\s*==[o]\s*)/,/^(?:\s*==[\=]\s*)/,/^(?:\s*--\s*)/,/^(?:\s*-\.\s*)/,/^(?:\s*==\s*)/,/^(?:\(-)/,/^(?:-\))/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:[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])/,/^(?:\|)/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:\{)/,/^(?:\})/,/^(?:")/,/^(?:\n+)/,/^(?:\s)/,/^(?:$)/],conditions:{string:{rules:[2,3],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70],inclusive:!0}}};function Yt(){this.yy={}}return xt.lexer=Dt,new((Yt.prototype=xt).Parser=Yt)}();r.parser=e,r.Parser=e.Parser,r.parse=function(){return e.parse.apply(e,arguments)},r.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),n.exit(1));var e=a(8).readFileSync(a(9).normalize(t[1]),"utf8");return r.parser.parse(e)},void 0!==t&&a.c[a.s]===t&&r.main(n.argv.slice(1))}).call(r,a(7),a(3)(t))},function(t,r,a){"use strict";(function(n,t){var e=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,5],n=[1,6],r=[1,12],a=[1,13],i=[1,14],s=[1,15],o=[1,16],u=[1,17],l=[1,18],c=[1,19],d=[1,20],h=[1,21],f=[1,22],_=[8,16,17,18,19,20,21,22,23,24,25,26],p=[1,37],m=[1,33],y=[1,34],g=[1,35],v=[1,36],M=[8,10,16,17,18,19,20,21,22,23,24,25,26,28,32,37,39,40,45,57,58],k=[10,28],b=[10,28,37,57,58],L=[2,49],w=[1,45],x=[1,48],D=[1,49],Y=[1,52],T=[2,65],A=[1,65],S=[1,66],E=[1,67],j=[1,68],C=[1,69],F=[1,70],O=[1,71],H=[1,72],P=[1,73],B=[8,16,17,18,19,20,21,22,23,24,25,26,47],N=[10,28,37],I={trace:function(){},yy:{},symbols_:{error:2,expressions:3,graph:4,EOF:5,graphStatement:6,idStatement:7,"{":8,stmt_list:9,"}":10,strict:11,GRAPH:12,DIGRAPH:13,textNoTags:14,textNoTagsToken:15,ALPHA:16,NUM:17,COLON:18,PLUS:19,EQUALS:20,MULT:21,DOT:22,BRKT:23,SPACE:24,MINUS:25,keywords:26,stmt:27,";":28,node_stmt:29,edge_stmt:30,attr_stmt:31,"=":32,subgraph:33,attr_list:34,NODE:35,EDGE:36,"[":37,a_list:38,"]":39,",":40,edgeRHS:41,node_id:42,edgeop:43,port:44,":":45,compass_pt:46,SUBGRAPH:47,n:48,ne:49,e:50,se:51,s:52,sw:53,w:54,nw:55,c:56,ARROW_POINT:57,ARROW_OPEN:58,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",8:"{",10:"}",11:"strict",12:"GRAPH",13:"DIGRAPH",16:"ALPHA",17:"NUM",18:"COLON",19:"PLUS",20:"EQUALS",21:"MULT",22:"DOT",23:"BRKT",24:"SPACE",25:"MINUS",26:"keywords",28:";",32:"=",35:"NODE",36:"EDGE",37:"[",39:"]",40:",",45:":",47:"SUBGRAPH",48:"n",49:"ne",50:"e",51:"se",52:"s",53:"sw",54:"w",55:"nw",56:"c",57:"ARROW_POINT",58:"ARROW_OPEN"},productions_:[0,[3,2],[4,5],[4,6],[4,4],[6,1],[6,1],[7,1],[14,1],[14,2],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[9,1],[9,3],[27,1],[27,1],[27,1],[27,3],[27,1],[31,2],[31,2],[31,2],[34,4],[34,3],[34,3],[34,2],[38,5],[38,5],[38,3],[30,3],[30,3],[30,2],[30,2],[41,3],[41,3],[41,2],[41,2],[29,2],[29,1],[42,2],[42,1],[44,4],[44,2],[44,2],[33,5],[33,4],[33,3],[46,1],[46,1],[46,1],[46,1],[46,1],[46,1],[46,1],[46,1],[46,1],[46,0],[43,1],[43,1]],performAction:function(t,e,n,r,a,i,s){var o=i.length-1;switch(a){case 1:this.$=i[o-1];break;case 2:this.$=i[o-4];break;case 3:this.$=i[o-5];break;case 4:this.$=i[o-3];break;case 8:case 10:case 11:this.$=i[o];break;case 9:this.$=i[o-1]+""+i[o];break;case 12:case 13:case 14:case 15:case 16:case 18:case 19:case 20:this.$=i[o];break;case 17:this.$="
";break;case 39:this.$="oy";break;case 40:r.addLink(i[o-1],i[o].id,i[o].op),this.$="oy";break;case 42:r.addLink(i[o-1],i[o].id,i[o].op),this.$={op:i[o-2],id:i[o-1]};break;case 44:this.$={op:i[o-1],id:i[o]};break;case 48:r.addVertex(i[o-1]),this.$=i[o-1];break;case 49:r.addVertex(i[o]),this.$=i[o];break;case 66:this.$="arrow";break;case 67:this.$="arrow_open"}},table:[{3:1,4:2,6:3,11:[1,4],12:e,13:n},{1:[3]},{5:[1,7]},{7:8,8:[1,9],14:10,15:11,16:r,17:a,18:i,19:s,20:o,21:u,22:l,23:c,24:d,25:h,26:f},{6:23,12:e,13:n},t(_,[2,5]),t(_,[2,6]),{1:[2,1]},{8:[1,24]},{7:30,8:p,9:25,12:m,14:10,15:11,16:r,17:a,18:i,19:s,20:o,21:u,22:l,23:c,24:d,25:h,26:f,27:26,29:27,30:28,31:29,33:31,35:y,36:g,42:32,47:v},t([8,10,28,32,37,39,40,45,57,58],[2,7],{15:38,16:r,17:a,18:i,19:s,20:o,21:u,22:l,23:c,24:d,25:h,26:f}),t(M,[2,8]),t(M,[2,10]),t(M,[2,11]),t(M,[2,12]),t(M,[2,13]),t(M,[2,14]),t(M,[2,15]),t(M,[2,16]),t(M,[2,17]),t(M,[2,18]),t(M,[2,19]),t(M,[2,20]),{7:39,14:10,15:11,16:r,17:a,18:i,19:s,20:o,21:u,22:l,23:c,24:d,25:h,26:f},{7:30,8:p,9:40,12:m,14:10,15:11,16:r,17:a,18:i,19:s,20:o,21:u,22:l,23:c,24:d,25:h,26:f,27:26,29:27,30:28,31:29,33:31,35:y,36:g,42:32,47:v},{10:[1,41]},{10:[2,21],28:[1,42]},t(k,[2,23]),t(k,[2,24]),t(k,[2,25]),t(b,L,{44:44,32:[1,43],45:w}),t(k,[2,27],{41:46,43:47,57:x,58:D}),t(k,[2,47],{43:47,34:50,41:51,37:Y,57:x,58:D}),{34:53,37:Y},{34:54,37:Y},{34:55,37:Y},{7:56,8:[1,57],14:10,15:11,16:r,17:a,18:i,19:s,20:o,21:u,22:l,23:c,24:d,25:h,26:f},{7:30,8:p,9:58,12:m,14:10,15:11,16:r,17:a,18:i,19:s,20:o,21:u,22:l,23:c,24:d,25:h,26:f,27:26,29:27,30:28,31:29,33:31,35:y,36:g,42:32,47:v},t(M,[2,9]),{8:[1,59]},{10:[1,60]},{5:[2,4]},{7:30,8:p,9:61,12:m,14:10,15:11,16:r,17:a,18:i,19:s,20:o,21:u,22:l,23:c,24:d,25:h,26:f,27:26,29:27,30:28,31:29,33:31,35:y,36:g,42:32,47:v},{7:62,14:10,15:11,16:r,17:a,18:i,19:s,20:o,21:u,22:l,23:c,24:d,25:h,26:f},t(b,[2,48]),t(b,T,{14:10,15:11,7:63,46:64,16:r,17:a,18:i,19:s,20:o,21:u,22:l,23:c,24:d,25:h,26:f,48:A,49:S,50:E,51:j,52:C,53:F,54:O,55:H,56:P}),t(k,[2,41],{34:74,37:Y}),{7:77,8:p,14:10,15:11,16:r,17:a,18:i,19:s,20:o,21:u,22:l,23:c,24:d,25:h,26:f,33:76,42:75,47:v},t(B,[2,66]),t(B,[2,67]),t(k,[2,46]),t(k,[2,40],{34:78,37:Y}),{7:81,14:10,15:11,16:r,17:a,18:i,19:s,20:o,21:u,22:l,23:c,24:d,25:h,26:f,38:79,39:[1,80]},t(k,[2,28]),t(k,[2,29]),t(k,[2,30]),{8:[1,82]},{7:30,8:p,9:83,12:m,14:10,15:11,16:r,17:a,18:i,19:s,20:o,21:u,22:l,23:c,24:d,25:h,26:f,27:26,29:27,30:28,31:29,33:31,35:y,36:g,42:32,47:v},{10:[1,84]},{7:30,8:p,9:85,12:m,14:10,15:11,16:r,17:a,18:i,19:s,20:o,21:u,22:l,23:c,24:d,25:h,26:f,27:26,29:27,30:28,31:29,33:31,35:y,36:g,42:32,47:v},{5:[2,2]},{10:[2,22]},t(k,[2,26]),t(b,[2,51],{45:[1,86]}),t(b,[2,52]),t(b,[2,56]),t(b,[2,57]),t(b,[2,58]),t(b,[2,59]),t(b,[2,60]),t(b,[2,61]),t(b,[2,62]),t(b,[2,63]),t(b,[2,64]),t(k,[2,38]),t(N,[2,44],{43:47,41:87,57:x,58:D}),t(N,[2,45],{43:47,41:88,57:x,58:D}),t(b,L,{44:44,45:w}),t(k,[2,39]),{39:[1,89]},t(k,[2,34],{34:90,37:Y}),{32:[1,91]},{7:30,8:p,9:92,12:m,14:10,15:11,16:r,17:a,18:i,19:s,20:o,21:u,22:l,23:c,24:d,25:h,26:f,27:26,29:27,30:28,31:29,33:31,35:y,36:g,42:32,47:v},{10:[1,93]},t(b,[2,55]),{10:[1,94]},t(b,T,{46:95,48:A,49:S,50:E,51:j,52:C,53:F,54:O,55:H,56:P}),t(N,[2,42]),t(N,[2,43]),t(k,[2,33],{34:96,37:Y}),t(k,[2,32]),{7:97,14:10,15:11,16:r,17:a,18:i,19:s,20:o,21:u,22:l,23:c,24:d,25:h,26:f},{10:[1,98]},t(b,[2,54]),{5:[2,3]},t(b,[2,50]),t(k,[2,31]),{28:[1,99],39:[2,37],40:[1,100]},t(b,[2,53]),{7:81,14:10,15:11,16:r,17:a,18:i,19:s,20:o,21:u,22:l,23:c,24:d,25:h,26:f,38:101},{7:81,14:10,15:11,16:r,17:a,18:i,19:s,20:o,21:u,22:l,23:c,24:d,25:h,26:f,38:102},{39:[2,35]},{39:[2,36]}],defaultActions:{7:[2,1],41:[2,4],60:[2,2],61:[2,22],94:[2,3],101:[2,35],102:[2,36]},parseError:function(t,e){if(!e.recoverable){var n=function(t,e){this.message=t,this.hash=e};throw n.prototype=Error,new n(t,e)}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],a=[null],i=[],s=this.table,o="",u=0,l=0,c=0,d=1,h=i.slice.call(arguments,1),f=Object.create(this.lexer),_={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(_.yy[p]=this.yy[p]);f.setInput(t,_.yy),_.yy.lexer=f,_.yy.parser=this,void 0===f.yylloc&&(f.yylloc={});var m=f.yylloc;i.push(m);var y=f.options&&f.options.ranges;"function"==typeof _.yy.parseError?this.parseError=_.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var g,v,M,k,b,L,w,x,D,Y,T={};;){if(M=n[n.length-1],this.defaultActions[M]?k=this.defaultActions[M]:(null==g&&(Y=void 0,"number"!=typeof(Y=r.pop()||f.lex()||d)&&(Y instanceof Array&&(Y=(r=Y).pop()),Y=e.symbols_[Y]||Y),g=Y),k=s[M]&&s[M][g]),void 0===k||!k.length||!k[0]){var A="";for(L in D=[],s[M])this.terminals_[L]&&2e[0].length)){if(e=n,r=i,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,a[i])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,a[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return 0)/,/^(?:--[o])/,/^(?:--)/,/^(?:-)/,/^(?:\+)/,/^(?:=)/,/^(?:[\u0021-\u0027\u002A-\u002E\u003F\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC_])/,/^(?:\|)/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:\{)/,/^(?:\})/,/^(?:")/,/^(?:\s)/,/^(?:\n)/,/^(?:$)/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42],inclusive:!0}}};function z(){this.yy={}}return I.lexer=R,new((z.prototype=I).Parser=z)}();r.parser=e,r.Parser=e.Parser,r.parse=function(){return e.parse.apply(e,arguments)},r.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),n.exit(1));var e=a(8).readFileSync(a(9).normalize(t[1]),"utf8");return r.parser.parse(e)},void 0!==t&&a.c[a.s]===t&&r.main(n.argv.slice(1))}).call(r,a(7),a(3)(t))},function(t,e,n){var r;r=function(t,e){return function(n){var r={};function a(t){if(r[t])return r[t].exports;var e=r[t]={i:t,l:!1,exports:{}};return n[t].call(e.exports,e,e.exports,a),e.l=!0,e.exports}return a.m=n,a.c=r,a.d=function(t,e,n){a.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},a.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(e,"a",e),e},a.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},a.p="",a(a.s=5)}([function(t,e){t.exports=n(19)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.addDummyNode=s,e.simplify=u,e.asNonCompoundGraph=l,e.successorWeights=c,e.predecessorWeights=d,e.intersectRect=h,e.buildLayerMatrix=f,e.normalizeRanks=_,e.removeEmptyRanks=p,e.addBorderNode=m,e.maxRank=y,e.partition=g,e.time=v,e.notime=M;var r,a=n(0),o=(r=a)&&r.__esModule?r:{default:r},i=n(2);function s(t,e,n,r){for(var a=void 0;a=o.default.uniqueId(r),t.hasNode(a););return n.dummy=e,t.setNode(a,n),a}function u(r){var a=(new i.Graph).setGraph(r.graph());return o.default.each(r.nodes(),function(t){a.setNode(t,r.node(t))}),o.default.each(r.edges(),function(t){var e=a.edge(t.v,t.w)||{weight:0,minlen:1},n=r.edge(t);a.setEdge(t.v,t.w,{weight:e.weight+n.weight,minlen:Math.max(e.minlen,n.minlen)})}),a}function l(e){var n=new i.Graph({multigraph:e.isMultigraph()}).setGraph(e.graph());return o.default.each(e.nodes(),function(t){e.children(t).length||n.setNode(t,e.node(t))}),o.default.each(e.edges(),function(t){n.setEdge(t,e.edge(t))}),n}function c(n){var t=o.default.map(n.nodes(),function(t){var e={};return o.default.each(n.outEdges(t),function(t){e[t.w]=(e[t.w]||0)+n.edge(t).weight}),e});return o.default.zipObject(n.nodes(),t)}function d(n){var t=o.default.map(n.nodes(),function(t){var e={};return o.default.each(n.inEdges(t),function(t){e[t.v]=(e[t.v]||0)+n.edge(t).weight}),e});return o.default.zipObject(n.nodes(),t)}function h(t,e){var n=t.x,r=t.y,a=e.x-n,i=e.y-r,s=t.width/2,o=t.height/2;if(!a&&!i)throw new Error("Not possible to find intersection inside of the rectangle");var u=void 0,l=void 0;return Math.abs(i)*s>Math.abs(a)*o?(i<0&&(o=-o),u=o*a/i,l=o):(a<0&&(s=-s),l=(u=s)*i/a),{x:n+u,y:r+l}}function f(r){var a=o.default.map(o.default.range(y(r)+1),function(){return[]});return o.default.each(r.nodes(),function(t){var e=r.node(t),n=e.rank;o.default.isUndefined(n)||(a[n][e.order]=t)}),a}function _(n){var r=o.default.min(o.default.map(n.nodes(),function(t){return n.node(t).rank}));o.default.each(n.nodes(),function(t){var e=n.node(t);o.default.has(e,"rank")&&(e.rank-=r)})}function p(n){var r=o.default.min(o.default.map(n.nodes(),function(t){return n.node(t).rank})),a=[];o.default.each(n.nodes(),function(t){var e=n.node(t).rank-r;a[e]||(a[e]=[]),a[e].push(t)});var i=0,s=n.graph().nodeRankFactor;o.default.each(a,function(t,e){o.default.isUndefined(t)&&e%s!=0?--i:i&&o.default.each(t,function(t){n.node(t).rank+=i})})}function m(t,e,n,r){var a={width:0,height:0};return 4<=arguments.length&&(a.rank=n,a.order=r),s(t,"border",a,e)}function y(n){return o.default.max(o.default.map(n.nodes(),function(t){var e=n.node(t).rank;if(!o.default.isUndefined(e))return e}))}function g(t,e){var n={lhs:[],rhs:[]};return o.default.each(t,function(t){e(t)?n.lhs.push(t):n.rhs.push(t)}),n}function v(t,e){var n=o.default.now();try{return e()}finally{console.log(t+" time: "+(o.default.now()-n)+"ms")}}function M(t,e){return e()}e.default={addDummyNode:s,simplify:u,asNonCompoundGraph:l,successorWeights:c,predecessorWeights:d,intersectRect:h,buildLayerMatrix:f,normalizeRanks:_,removeEmptyRanks:p,addBorderNode:m,maxRank:y,partition:g,time:v,notime:M}},function(t,e){t.exports=n(29)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.longestPath=i,e.slack=o;var r,a=n(0),s=(r=a)&&r.__esModule?r:{default:r};function i(a){var i={};s.default.each(a.sources(),function e(t){var n=a.node(t);if(s.default.has(i,t))return n.rank;i[t]=!0;var r=s.default.min(s.default.map(a.outEdges(t),function(t){return e(t.w)-a.edge(t).minlen}))||0;return n.rank=r})}function o(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}e.default={longestPath:i,slack:o}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,a=n(0),o=(r=a)&&r.__esModule?r:{default:r},i=n(2),u=n(3);function s(i,s){return o.default.each(i.nodes(),function r(a){o.default.each(s.nodeEdges(a),function(t){var e=t.v,n=a===e?t.w:e;i.hasNode(n)||(0,u.slack)(s,t)||(i.setNode(n,{}),i.setEdge(a,n,{}),r(n))})}),i.nodeCount()}function l(e,n){return o.default.minBy(n.edges(),function(t){if(e.hasNode(t.v)!==e.hasNode(t.w))return(0,u.slack)(n,t)})}function c(t,e,n){o.default.each(t.nodes(),function(t){e.node(t).rank+=n})}e.default=function(t){var e=new i.Graph({directed:!1}),n=t.nodes()[0],r=t.nodeCount();e.setNode(n,{});for(var a=void 0;s(e,t)s.lim&&(o=s,u=!0);var l=_.default.filter(n.edges(),function(t){return u===g(e,e.node(t.v),o)&&u!==g(e,e.node(t.w),o)});return _.default.minBy(l,function(t){return(0,c.slack)(n,t)})}function y(t,e,n,r){var a,i,s,o,u=n.v,l=n.w;t.removeEdge(u,l),t.setEdge(r.v,r.w,{}),f(t),h(t,e),a=t,i=e,s=_.default.find(a.nodes(),function(t){return!i.node(t).parent}),o=(o=d(a,s)).slice(1),_.default.each(o,function(t){var e=a.node(t).parent,n=i.edge(t,e),r=!1;n||(n=i.edge(e,t),r=!0),i.node(t).rank=i.node(e).rank+(r?n.minlen:-n.minlen)})}function g(t,e,n){return n.low<=e.lim&&e.lim<=n.lim}u.initLowLimValues=f,u.initCutValues=h,u.calcCutValue=l,u.leaveEdge=p,u.enterEdge=m,u.exchangeEdges=y,e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,a=n(0),s=(r=a)&&r.__esModule?r:{default:r};e.default=function(l){var r,a,i,c=(r=l,a={},i=0,s.default.each(r.children(),function t(e){var n=i;s.default.each(r.children(e),t),a[e]={low:n,lim:i++}}),a);s.default.each(l.graph().dummyChains,function(t){for(var e=l.node(t),n=e.edgeObj,r=function(t,e,n,r){var a=[],i=[],s=Math.min(e[n].low,e[r].low),o=Math.max(e[n].lim,e[r].lim),u=void 0,l=void 0;for(u=n;u=t.parent(u),a.push(u),u&&(e[u].low>s||o>e[u].lim););for(l=u,u=r;(u=t.parent(u))!==l;)i.push(u);return{path:a.concat(i.reverse()),lca:l}}(l,c,n.v,n.w),a=r.path,i=r.lca,s=0,o=a[s],u=!0;t!==n.w;){if(e=l.node(t),u){for(;(o=a[s])!==i&&l.node(o).maxRank>1]+=t.weight;u+=t.weight*n})),u}e.default=function(t,e){for(var n=0,r=1;r=i.barycenter)&&(n=t,a=r=0,(e=i).weight&&(r+=e.barycenter*e.weight,a+=e.weight),n.weight&&(r+=n.barycenter*n.weight,a+=n.weight),e.vs=n.vs.concat(e.vs),e.barycenter=r/a,e.weight=a,e.i=Math.min(n.i,e.i),n.merged=!0)}}function r(e){return function(t){t.in.push(e),0==--t.indegree&&n.push(t)}}for(;n.length;){var a=n.pop();t.push(a),s.default.each(a.in.reverse(),e(a)),s.default.each(a.out,r(a))}return s.default.chain(t).filter(function(t){return!t.merged}).map(function(t){return s.default.pick(t,["vs","i","barycenter","weight"])}).value()}(s.default.filter(r,function(t){return!t.indegree}))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var d=r(n(0)),h=r(n(1));function r(t){return t&&t.__esModule?t:{default:t}}function f(t,e,n){for(var r=void 0;e.length&&(r=d.default.last(e)).i<=n;)e.pop(),t.push(r.vs),n++;return n}e.default=function(t,e){var n,r=h.default.partition(t,function(t){return d.default.has(t,"barycenter")}),a=r.lhs,i=d.default.sortBy(r.rhs,function(t){return-t.i}),s=[],o=0,u=0,l=0;a.sort((n=!!e,function(t,e){return t.barycentere.barycenter?1:n?e.i-t.i:t.i-e.i})),l=f(s,i,l),d.default.each(a,function(t){l+=t.vs.length,s.push(t.vs),o+=t.barycenter*t.weight,u+=t.weight,l=f(s,i,l)});var c={vs:d.default.flatten(s,!0)};return u&&(c.barycenter=o/u,c.weight=u),c}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,a=n(0),u=(r=a)&&r.__esModule?r:{default:r},l=n(2);e.default=function(i,n,r){var s=function(t){for(var e=void 0;t.hasNode(e=u.default.uniqueId("_root")););return e}(i),o=new l.Graph({compound:!0}).setGraph({root:s}).setDefaultNodeLabel(function(t){return i.node(t)});return u.default.each(i.nodes(),function(a){var t=i.node(a),e=i.parent(a);(t.rank===n||t.minRank<=n&&n<=t.maxRank)&&(o.setNode(a),o.setParent(a,e||s),u.default.each(i[r](a),function(t){var e=t.v===a?t.w:t.v,n=o.edge(e,a),r=u.default.isUndefined(n)?0:n.weight;o.setEdge(e,a,{weight:i.edge(t).weight+r})}),u.default.has(t,"minRank")&&o.setNode(a,{borderLeft:t.borderLeft[n],borderRight:t.borderRight[n]}))}),o}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,a=n(0),u=(r=a)&&r.__esModule?r:{default:r};e.default=function(a,i,t){var s={},o=void 0;u.default.each(t,function(t){for(var e=a.parent(t),n=void 0,r=void 0;e;){if((n=a.parent(e))?(r=s[n],s[n]=e):(r=o,o=e),r&&r!==e)return void i.setEdge(r,e);e=n}})}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=r(n(0)),o=r(n(1)),u=n(27);function r(t){return t&&t.__esModule?t:{default:t}}e.default=function(n){var r,t,a,i;n=o.default.asNonCompoundGraph(n),r=n,t=o.default.buildLayerMatrix(r),a=r.graph().ranksep,i=0,s.default.each(t,function(t){var e=s.default.max(s.default.map(t,function(t){return r.node(t).height}));s.default.each(t,function(t){r.node(t).y=i+e/2}),i+=e+a}),s.default.each((0,u.positionX)(n),function(t,e){n.node(e).x=t})}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.positionX=i;var v=a(n(0)),M=n(2),r=a(n(1));function a(t){return t&&t.__esModule?t:{default:t}}function l(l,t){var c={};return v.default.reduce(t,function(t,r){var i=0,s=0,o=t.length,u=v.default.last(r);return v.default.each(r,function(t,e){var n=function(e,t){if(e.node(t).dummy)return v.default.find(e.predecessors(t),function(t){return e.node(t).dummy})}(l,t),a=n?l.node(n).order:o;(n||t===u)&&(v.default.each(r.slice(s,e+1),function(r){v.default.each(l.predecessors(r),function(t){var e=l.node(t),n=e.order;!(na)&&d(s,t,i)})})}return v.default.reduce(t,function(r,a){var i=-1,s=void 0,o=0;return v.default.each(a,function(t,e){if("border"===u.node(t).dummy){var n=u.predecessors(t);n.length&&(s=u.node(n[0]).order,l(a,o,e,i,s),o=e,i=s)}l(a,o,a.length,s,r.length)}),a}),s}function d(t,e,n){if(n",main:"dist/dagre-layout.js",keywords:["graph","layout","dagre"],scripts:{lint:"standard",jest:"jest --coverage",karma:"node -r babel-register node_modules/.bin/karma start",test:"yarn lint && yarn jest && yarn karma --single-run",bench:"node -r babel-register src/bench.js",build:"node -r babel-register node_modules/.bin/webpack --progress --colors","build:watch":"yarn build --watch",upgrade:"yarn-upgrade-all"},dependencies:{graphlib:"^2.1.1",lodash:"^4.17.4"},devDependencies:{"babel-core":"^6.26.0","babel-loader":"^7.1.2","babel-preset-env":"^1.6.0","babel-preset-es2015":"^6.24.1",benchmark:"^2.1.4",chai:"^4.1.2",coveralls:"^2.13.1",jest:"^21.0.1",karma:"^1.7.1","karma-chrome-launcher":"^2.2.0","karma-firefox-launcher":"^1.0.1","karma-mocha":"^1.3.0","karma-safari-launcher":"^1.0.0",mocha:"^3.5.0",sprintf:"^0.1.5",standard:"^10.0.3",webpack:"^3.5.6","webpack-node-externals":"^1.6.0","yarn-upgrade-all":"^0.1.8"},repository:{type:"git",url:"https://github.com/tylingsoft/dagre-layout.git"},license:"MIT",files:["dist/","lib/","index.js"],standard:{ignore:["dist/**/*.js","coverage/**/*.js"]},jest:{testRegex:"test/.+?-test\\.js",testPathIgnorePatterns:["test/bundle-test\\.js"]}}}]).default},t.exports=r(n(19),n(29))},function(t,e,n){var r=n(4),a=n(164);t.exports=function(e,t,n,r){return function(t,n,i,e){var s,o,u={},l=new a,r=function(t){var e=t.v!==s?t.v:t.w,n=u[e],r=i(t),a=o.distance+r;if(r<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+t+" Weight: "+r);athis._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)},r.prototype._heapify=function(t){var e=this._arr,n=2*t,r=n+1,a=t;n>1].prioritye[0].length)){if(e=n,r=i,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,a[i])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,a[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return 0:\n,;]+?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\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,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\->:\n,;]+)/i,/^(?:->>)/i,/^(?:-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?::[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[2,3,15],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,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],inclusive:!0}}};function w(){this.yy={}}return b.lexer=L,new((w.prototype=b).Parser=w)}();r.parser=e,r.Parser=e.Parser,r.parse=function(){return e.parse.apply(e,arguments)},r.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),n.exit(1));var e=a(8).readFileSync(a(9).normalize(t[1]),"utf8");return r.parser.parse(e)},void 0!==t&&a.c[a.s]===t&&r.main(n.argv.slice(1))}).call(r,a(7),a(3)(t))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.apply=e.setTitle=e.addNote=e.PLACEMENT=e.ARROWTYPE=e.LINETYPE=e.clear=e.getTitle=e.getActorKeys=e.getActor=e.getActors=e.getMessages=e.addSignal=e.addMessage=e.addActor=void 0;var a=n(1),i={},s=[],o=[],r="",u=e.addActor=function(t,e,n){var r=i[t];r&&e===r.name&&null==n||(null==n&&(n=e),i[t]={name:e,description:n})},l=e.addMessage=function(t,e,n,r){s.push({from:t,to:e,message:n,answer:r})},c=e.addSignal=function(t,e,n,r){a.logger.debug("Adding message from="+t+" to="+e+" message="+n+" type="+r),s.push({from:t,to:e,message:n,type:r})},d=e.getMessages=function(){return s},h=e.getActors=function(){return i},f=e.getActor=function(t){return i[t]},_=e.getActorKeys=function(){return Object.keys(i)},p=e.getTitle=function(){return r},m=e.clear=function(){i={},s=[]},y=e.LINETYPE={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21},g=e.ARROWTYPE={FILLED:0,OPEN:1},v=e.PLACEMENT={LEFTOF:0,RIGHTOF:1,OVER:2},M=e.addNote=function(t,e,n){var r={actor:t,placement:e,message:n},a=[].concat(t,t);o.push(r),s.push({from:a[0],to:a[1],message:n,type:y.NOTE,placement:e})},k=e.setTitle=function(t){r=t},b=e.apply=function e(t){if(t instanceof Array)t.forEach(function(t){e(t)});else switch(t.type){case"addActor":u(t.actor,t.actor,t.description);break;case"activeStart":case"activeEnd":c(t.actor,void 0,void 0,t.signalType);break;case"addNote":M(t.actor,t.placement,t.text);break;case"addMessage":c(t.from,t.to,t.msg,t.signalType);break;case"loopStart":c(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":c(void 0,void 0,void 0,t.signalType);break;case"optStart":c(void 0,void 0,t.optText,t.signalType);break;case"optEnd":c(void 0,void 0,void 0,t.signalType);break;case"altStart":case"else":c(void 0,void 0,t.altText,t.signalType);break;case"altEnd":c(void 0,void 0,void 0,t.signalType);break;case"setTitle":k(t.text);break;case"parStart":case"and":c(void 0,void 0,t.parText,t.signalType);break;case"parEnd":c(void 0,void 0,void 0,t.signalType)}};e.default={addActor:u,addMessage:l,addSignal:c,getMessages:d,getActors:h,getActor:f,getActorKeys:_,getTitle:p,clear:m,LINETYPE:y,ARROWTYPE:g,PLACEMENT:v,addNote:M,setTitle:k,apply:b}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getInfo=e.setInfo=e.getMessage=e.setMessage=void 0;var r=n(1),a="",i=!1,s=e.setMessage=function(t){r.logger.debug("Setting message to: "+t),a=t},o=e.getMessage=function(){return a},u=e.setInfo=function(t){i=t},l=e.getInfo=function(){return i};e.default={setMessage:s,getMessage:o,setInfo:u,getInfo:l}},function(t,r,a){"use strict";(function(n,t){var e=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,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,message:11,say:12,TXT:13,$accept:0,$end:1},terminals_:{2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo",12:"say",13:"TXT"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1],[8,1],[11,2]],performAction:function(t,e,n,r,a,i,s){var o=i.length-1;switch(a){case 1:return r;case 4:break;case 6:r.setInfo(!0);break;case 7:r.setMessage(i[o]);break;case 8:this.$=i[o-1].substring(1).trim().replace(/\\n/gm,"\n")}},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],11:9,12:[1,10]},{1:[2,1]},t(e,[2,3]),t(e,[2,4]),t(e,[2,5]),t(e,[2,6]),t(e,[2,7]),{13:[1,11]},t(e,[2,8])],defaultActions:{4:[2,1]},parseError:function(t,e){if(!e.recoverable){var n=function(t,e){this.message=t,this.hash=e};throw n.prototype=Error,new n(t,e)}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],a=[null],i=[],s=this.table,o="",u=0,l=0,c=0,d=1,h=i.slice.call(arguments,1),f=Object.create(this.lexer),_={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(_.yy[p]=this.yy[p]);f.setInput(t,_.yy),_.yy.lexer=f,_.yy.parser=this,void 0===f.yylloc&&(f.yylloc={});var m=f.yylloc;i.push(m);var y=f.options&&f.options.ranges;"function"==typeof _.yy.parseError?this.parseError=_.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var g,v,M,k,b,L,w,x,D,Y,T={};;){if(M=n[n.length-1],this.defaultActions[M]?k=this.defaultActions[M]:(null==g&&(Y=void 0,"number"!=typeof(Y=r.pop()||f.lex()||d)&&(Y instanceof Array&&(Y=(r=Y).pop()),Y=e.symbols_[Y]||Y),g=Y),k=s[M]&&s[M][g]),void 0===k||!k.length||!k[0]){var A="";for(L in D=[],s[M])this.terminals_[L]&&2e[0].length)){if(e=n,r=i,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,a[i])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,a[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return 0e[0].length)){if(e=n,r=i,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,a[i])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,a[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return 0e[0].length)){if(e=n,r=i,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,a[i])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,a[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return 0)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:--)/,/^(?:\.\.)/,/^(?::[^#\n;]+)/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:[A-Za-z]+)/,/^(?:[!"#$%&'*+,-.`?\\_\/])/,/^(?:[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:[10,11],inclusive:!1},struct:{rules:[5,6,7],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,8,9,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32],inclusive:!0}}};function L(){this.yy={}}return k.lexer=b,new((L.prototype=k).Parser=L)}();r.parser=e,r.Parser=e.Parser,r.parse=function(){return e.parse.apply(e,arguments)},r.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),n.exit(1));var e=a(8).readFileSync(a(9).normalize(t[1]),"utf8");return r.parser.parse(e)},void 0!==t&&a.c[a.s]===t&&r.main(n.argv.slice(1))}).call(r,a(7),a(3)(t))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.relationType=e.lineType=e.cleanupLabel=e.addMembers=e.addRelation=e.getRelations=e.getClasses=e.getClass=e.clear=e.addClass=void 0;var r=n(1),a=[],i={},s=e.addClass=function(t){void 0===i[t]&&(i[t]={id:t,methods:[],members:[]})},o=e.clear=function(){a=[],i={}},u=e.getClass=function(t){return i[t]},l=e.getClasses=function(){return i},c=e.getRelations=function(){return a},d=e.addRelation=function(t){r.logger.warn("Adding relation: "+JSON.stringify(t)),s(t.id1),s(t.id2),a.push(t)},h=e.addMembers=function(t,e){var n=i[t];"string"==typeof e&&(")"===e.substr(-1)?n.methods.push(e):n.members.push(e))},f=e.cleanupLabel=function(t){return":"===t.substring(0,1)?t.substr(2).trim():t.trim()},_=e.lineType={LINE:0,DOTTED_LINE:1},p=e.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3};e.default={addClass:s,clear:o,getClass:u,getClasses:l,getRelations:c,addRelation:d,addMembers:h,cleanupLabel:f,lineType:_,relationType:p}},function(t,r,a){"use strict";(function(n,t){var e=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],a=[7,11,12,15,17,19,20,21],i=[2,20],s=[1,32],o={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,a,i,s){var o=i.length-1;switch(a){case 1:return i[o-1];case 2:return r.setDirection(i[o-3]),i[o-1];case 4:r.setOptions(i[o-1]),this.$=i[o];break;case 5:i[o-1]+=i[o],this.$=i[o-1];break;case 7:this.$=[];break;case 8:i[o-1].push(i[o]),this.$=i[o-1];break;case 9:this.$=i[o-1];break;case 11:r.commit(i[o]);break;case 12:r.branch(i[o]);break;case 13:r.checkout(i[o]);break;case 14:r.merge(i[o]);break;case 15:r.reset(i[o]);break;case 16:this.$="";break;case 17:this.$=i[o];break;case 18:this.$=i[o-1]+":"+i[o];break;case 19:this.$=i[o-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(a,[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(a,[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:i,25:31,26:s},{12:i,25:33,26:s},{12:[2,18]},{12:i,25:34,26:s},{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=function(t,e){this.message=t,this.hash=e};throw n.prototype=Error,new n(t,e)}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],a=[null],i=[],s=this.table,o="",u=0,l=0,c=0,d=1,h=i.slice.call(arguments,1),f=Object.create(this.lexer),_={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(_.yy[p]=this.yy[p]);f.setInput(t,_.yy),_.yy.lexer=f,_.yy.parser=this,void 0===f.yylloc&&(f.yylloc={});var m=f.yylloc;i.push(m);var y=f.options&&f.options.ranges;"function"==typeof _.yy.parseError?this.parseError=_.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var g,v,M,k,b,L,w,x,D,Y,T={};;){if(M=n[n.length-1],this.defaultActions[M]?k=this.defaultActions[M]:(null==g&&(Y=void 0,"number"!=typeof(Y=r.pop()||f.lex()||d)&&(Y instanceof Array&&(Y=(r=Y).pop()),Y=e.symbols_[Y]||Y),g=Y),k=s[M]&&s[M][g]),void 0===k||!k.length||!k[0]){var A="";for(L in D=[],s[M])this.terminals_[L]&&2e[0].length)){if(e=n,r=i,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,a[i])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,a[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return 0\u20D2|\u205F\u200A|\u219D\u0338|\u2202\u0338|\u2220\u20D2|\u2229\uFE00|\u222A\uFE00|\u223C\u20D2|\u223D\u0331|\u223E\u0333|\u2242\u0338|\u224B\u0338|\u224D\u20D2|\u224E\u0338|\u224F\u0338|\u2250\u0338|\u2261\u20E5|\u2264\u20D2|\u2265\u20D2|\u2266\u0338|\u2267\u0338|\u2268\uFE00|\u2269\uFE00|\u226A\u0338|\u226A\u20D2|\u226B\u0338|\u226B\u20D2|\u227F\u0338|\u2282\u20D2|\u2283\u20D2|\u228A\uFE00|\u228B\uFE00|\u228F\u0338|\u2290\u0338|\u2293\uFE00|\u2294\uFE00|\u22B4\u20D2|\u22B5\u20D2|\u22D8\u0338|\u22D9\u0338|\u22DA\uFE00|\u22DB\uFE00|\u22F5\u0338|\u22F9\u0338|\u2933\u0338|\u29CF\u0338|\u29D0\u0338|\u2A6D\u0338|\u2A70\u0338|\u2A7D\u0338|\u2A7E\u0338|\u2AA1\u0338|\u2AA2\u0338|\u2AAC\uFE00|\u2AAD\uFE00|\u2AAF\u0338|\u2AB0\u0338|\u2AC5\u0338|\u2AC6\u0338|\u2ACB\uFE00|\u2ACC\uFE00|\u2AFD\u20E5|[\xA0-\u0113\u0116-\u0122\u0124-\u012B\u012E-\u014D\u0150-\u017E\u0192\u01B5\u01F5\u0237\u02C6\u02C7\u02D8-\u02DD\u0311\u0391-\u03A1\u03A3-\u03A9\u03B1-\u03C9\u03D1\u03D2\u03D5\u03D6\u03DC\u03DD\u03F0\u03F1\u03F5\u03F6\u0401-\u040C\u040E-\u044F\u0451-\u045C\u045E\u045F\u2002-\u2005\u2007-\u2010\u2013-\u2016\u2018-\u201A\u201C-\u201E\u2020-\u2022\u2025\u2026\u2030-\u2035\u2039\u203A\u203E\u2041\u2043\u2044\u204F\u2057\u205F-\u2063\u20AC\u20DB\u20DC\u2102\u2105\u210A-\u2113\u2115-\u211E\u2122\u2124\u2127-\u2129\u212C\u212D\u212F-\u2131\u2133-\u2138\u2145-\u2148\u2153-\u215E\u2190-\u219B\u219D-\u21A7\u21A9-\u21AE\u21B0-\u21B3\u21B5-\u21B7\u21BA-\u21DB\u21DD\u21E4\u21E5\u21F5\u21FD-\u2205\u2207-\u2209\u220B\u220C\u220F-\u2214\u2216-\u2218\u221A\u221D-\u2238\u223A-\u2257\u2259\u225A\u225C\u225F-\u2262\u2264-\u228B\u228D-\u229B\u229D-\u22A5\u22A7-\u22B0\u22B2-\u22BB\u22BD-\u22DB\u22DE-\u22E3\u22E6-\u22F7\u22F9-\u22FE\u2305\u2306\u2308-\u2310\u2312\u2313\u2315\u2316\u231C-\u231F\u2322\u2323\u232D\u232E\u2336\u233D\u233F\u237C\u23B0\u23B1\u23B4-\u23B6\u23DC-\u23DF\u23E2\u23E7\u2423\u24C8\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2550-\u256C\u2580\u2584\u2588\u2591-\u2593\u25A1\u25AA\u25AB\u25AD\u25AE\u25B1\u25B3-\u25B5\u25B8\u25B9\u25BD-\u25BF\u25C2\u25C3\u25CA\u25CB\u25EC\u25EF\u25F8-\u25FC\u2605\u2606\u260E\u2640\u2642\u2660\u2663\u2665\u2666\u266A\u266D-\u266F\u2713\u2717\u2720\u2736\u2758\u2772\u2773\u27C8\u27C9\u27E6-\u27ED\u27F5-\u27FA\u27FC\u27FF\u2902-\u2905\u290C-\u2913\u2916\u2919-\u2920\u2923-\u292A\u2933\u2935-\u2939\u293C\u293D\u2945\u2948-\u294B\u294E-\u2976\u2978\u2979\u297B-\u297F\u2985\u2986\u298B-\u2996\u299A\u299C\u299D\u29A4-\u29B7\u29B9\u29BB\u29BC\u29BE-\u29C5\u29C9\u29CD-\u29D0\u29DC-\u29DE\u29E3-\u29E5\u29EB\u29F4\u29F6\u2A00-\u2A02\u2A04\u2A06\u2A0C\u2A0D\u2A10-\u2A17\u2A22-\u2A27\u2A29\u2A2A\u2A2D-\u2A31\u2A33-\u2A3C\u2A3F\u2A40\u2A42-\u2A4D\u2A50\u2A53-\u2A58\u2A5A-\u2A5D\u2A5F\u2A66\u2A6A\u2A6D-\u2A75\u2A77-\u2A9A\u2A9D-\u2AA2\u2AA4-\u2AB0\u2AB3-\u2AC8\u2ACB\u2ACC\u2ACF-\u2ADB\u2AE4\u2AE6-\u2AE9\u2AEB-\u2AF3\u2AFD\uFB00-\uFB04]|\uD835[\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDD6B]/g,d={"­":"shy","‌":"zwnj","‍":"zwj","‎":"lrm","⁣":"ic","⁢":"it","⁡":"af","‏":"rlm","​":"ZeroWidthSpace","⁠":"NoBreak","̑":"DownBreve","⃛":"tdot","⃜":"DotDot","\t":"Tab","\n":"NewLine"," ":"puncsp"," ":"MediumSpace"," ":"thinsp"," ":"hairsp"," ":"emsp13"," ":"ensp"," ":"emsp14"," ":"emsp"," ":"numsp"," ":"nbsp","  ":"ThickSpace","‾":"oline",_:"lowbar","‐":"dash","–":"ndash","—":"mdash","―":"horbar",",":"comma",";":"semi","⁏":"bsemi",":":"colon","⩴":"Colone","!":"excl","¡":"iexcl","?":"quest","¿":"iquest",".":"period","‥":"nldr","…":"mldr","·":"middot","'":"apos","‘":"lsquo","’":"rsquo","‚":"sbquo","‹":"lsaquo","›":"rsaquo",'"':"quot","“":"ldquo","”":"rdquo","„":"bdquo","«":"laquo","»":"raquo","(":"lpar",")":"rpar","[":"lsqb","]":"rsqb","{":"lcub","}":"rcub","⌈":"lceil","⌉":"rceil","⌊":"lfloor","⌋":"rfloor","⦅":"lopar","⦆":"ropar","⦋":"lbrke","⦌":"rbrke","⦍":"lbrkslu","⦎":"rbrksld","⦏":"lbrksld","⦐":"rbrkslu","⦑":"langd","⦒":"rangd","⦓":"lparlt","⦔":"rpargt","⦕":"gtlPar","⦖":"ltrPar","⟦":"lobrk","⟧":"robrk","⟨":"lang","⟩":"rang","⟪":"Lang","⟫":"Rang","⟬":"loang","⟭":"roang","❲":"lbbrk","❳":"rbbrk","‖":"Vert","§":"sect","¶":"para","@":"commat","*":"ast","/":"sol",undefined:null,"&":"amp","#":"num","%":"percnt","‰":"permil","‱":"pertenk","†":"dagger","‡":"Dagger","•":"bull","⁃":"hybull","′":"prime","″":"Prime","‴":"tprime","⁗":"qprime","‵":"bprime","⁁":"caret","`":"grave","´":"acute","˜":"tilde","^":"Hat","¯":"macr","˘":"breve","˙":"dot","¨":"die","˚":"ring","˝":"dblac","¸":"cedil","˛":"ogon","ˆ":"circ","ˇ":"caron","°":"deg","©":"copy","®":"reg","℗":"copysr","℘":"wp","℞":"rx","℧":"mho","℩":"iiota","←":"larr","↚":"nlarr","→":"rarr","↛":"nrarr","↑":"uarr","↓":"darr","↔":"harr","↮":"nharr","↕":"varr","↖":"nwarr","↗":"nearr","↘":"searr","↙":"swarr","↝":"rarrw","↝̸":"nrarrw","↞":"Larr","↟":"Uarr","↠":"Rarr","↡":"Darr","↢":"larrtl","↣":"rarrtl","↤":"mapstoleft","↥":"mapstoup","↦":"map","↧":"mapstodown","↩":"larrhk","↪":"rarrhk","↫":"larrlp","↬":"rarrlp","↭":"harrw","↰":"lsh","↱":"rsh","↲":"ldsh","↳":"rdsh","↵":"crarr","↶":"cularr","↷":"curarr","↺":"olarr","↻":"orarr","↼":"lharu","↽":"lhard","↾":"uharr","↿":"uharl","⇀":"rharu","⇁":"rhard","⇂":"dharr","⇃":"dharl","⇄":"rlarr","⇅":"udarr","⇆":"lrarr","⇇":"llarr","⇈":"uuarr","⇉":"rrarr","⇊":"ddarr","⇋":"lrhar","⇌":"rlhar","⇐":"lArr","⇍":"nlArr","⇑":"uArr","⇒":"rArr","⇏":"nrArr","⇓":"dArr","⇔":"iff","⇎":"nhArr","⇕":"vArr","⇖":"nwArr","⇗":"neArr","⇘":"seArr","⇙":"swArr","⇚":"lAarr","⇛":"rAarr","⇝":"zigrarr","⇤":"larrb","⇥":"rarrb","⇵":"duarr","⇽":"loarr","⇾":"roarr","⇿":"hoarr","∀":"forall","∁":"comp","∂":"part","∂̸":"npart","∃":"exist","∄":"nexist","∅":"empty","∇":"Del","∈":"in","∉":"notin","∋":"ni","∌":"notni","϶":"bepsi","∏":"prod","∐":"coprod","∑":"sum","+":"plus","±":"pm","÷":"div","×":"times","<":"lt","≮":"nlt","<⃒":"nvlt","=":"equals","≠":"ne","=⃥":"bne","⩵":"Equal",">":"gt","≯":"ngt",">⃒":"nvgt","¬":"not","|":"vert","¦":"brvbar","−":"minus","∓":"mp","∔":"plusdo","⁄":"frasl","∖":"setmn","∗":"lowast","∘":"compfn","√":"Sqrt","∝":"prop","∞":"infin","∟":"angrt","∠":"ang","∠⃒":"nang","∡":"angmsd","∢":"angsph","∣":"mid","∤":"nmid","∥":"par","∦":"npar","∧":"and","∨":"or","∩":"cap","∩︀":"caps","∪":"cup","∪︀":"cups","∫":"int","∬":"Int","∭":"tint","⨌":"qint","∮":"oint","∯":"Conint","∰":"Cconint","∱":"cwint","∲":"cwconint","∳":"awconint","∴":"there4","∵":"becaus","∶":"ratio","∷":"Colon","∸":"minusd","∺":"mDDot","∻":"homtht","∼":"sim","≁":"nsim","∼⃒":"nvsim","∽":"bsim","∽̱":"race","∾":"ac","∾̳":"acE","∿":"acd","≀":"wr","≂":"esim","≂̸":"nesim","≃":"sime","≄":"nsime","≅":"cong","≇":"ncong","≆":"simne","≈":"ap","≉":"nap","≊":"ape","≋":"apid","≋̸":"napid","≌":"bcong","≍":"CupCap","≭":"NotCupCap","≍⃒":"nvap","≎":"bump","≎̸":"nbump","≏":"bumpe","≏̸":"nbumpe","≐":"doteq","≐̸":"nedot","≑":"eDot","≒":"efDot","≓":"erDot","≔":"colone","≕":"ecolon","≖":"ecir","≗":"cire","≙":"wedgeq","≚":"veeeq","≜":"trie","≟":"equest","≡":"equiv","≢":"nequiv","≡⃥":"bnequiv","≤":"le","≰":"nle","≤⃒":"nvle","≥":"ge","≱":"nge","≥⃒":"nvge","≦":"lE","≦̸":"nlE","≧":"gE","≧̸":"ngE","≨︀":"lvnE","≨":"lnE","≩":"gnE","≩︀":"gvnE","≪":"ll","≪̸":"nLtv","≪⃒":"nLt","≫":"gg","≫̸":"nGtv","≫⃒":"nGt","≬":"twixt","≲":"lsim","≴":"nlsim","≳":"gsim","≵":"ngsim","≶":"lg","≸":"ntlg","≷":"gl","≹":"ntgl","≺":"pr","⊀":"npr","≻":"sc","⊁":"nsc","≼":"prcue","⋠":"nprcue","≽":"sccue","⋡":"nsccue","≾":"prsim","≿":"scsim","≿̸":"NotSucceedsTilde","⊂":"sub","⊄":"nsub","⊂⃒":"vnsub","⊃":"sup","⊅":"nsup","⊃⃒":"vnsup","⊆":"sube","⊈":"nsube","⊇":"supe","⊉":"nsupe","⊊︀":"vsubne","⊊":"subne","⊋︀":"vsupne","⊋":"supne","⊍":"cupdot","⊎":"uplus","⊏":"sqsub","⊏̸":"NotSquareSubset","⊐":"sqsup","⊐̸":"NotSquareSuperset","⊑":"sqsube","⋢":"nsqsube","⊒":"sqsupe","⋣":"nsqsupe","⊓":"sqcap","⊓︀":"sqcaps","⊔":"sqcup","⊔︀":"sqcups","⊕":"oplus","⊖":"ominus","⊗":"otimes","⊘":"osol","⊙":"odot","⊚":"ocir","⊛":"oast","⊝":"odash","⊞":"plusb","⊟":"minusb","⊠":"timesb","⊡":"sdotb","⊢":"vdash","⊬":"nvdash","⊣":"dashv","⊤":"top","⊥":"bot","⊧":"models","⊨":"vDash","⊭":"nvDash","⊩":"Vdash","⊮":"nVdash","⊪":"Vvdash","⊫":"VDash","⊯":"nVDash","⊰":"prurel","⊲":"vltri","⋪":"nltri","⊳":"vrtri","⋫":"nrtri","⊴":"ltrie","⋬":"nltrie","⊴⃒":"nvltrie","⊵":"rtrie","⋭":"nrtrie","⊵⃒":"nvrtrie","⊶":"origof","⊷":"imof","⊸":"mumap","⊹":"hercon","⊺":"intcal","⊻":"veebar","⊽":"barvee","⊾":"angrtvb","⊿":"lrtri","⋀":"Wedge","⋁":"Vee","⋂":"xcap","⋃":"xcup","⋄":"diam","⋅":"sdot","⋆":"Star","⋇":"divonx","⋈":"bowtie","⋉":"ltimes","⋊":"rtimes","⋋":"lthree","⋌":"rthree","⋍":"bsime","⋎":"cuvee","⋏":"cuwed","⋐":"Sub","⋑":"Sup","⋒":"Cap","⋓":"Cup","⋔":"fork","⋕":"epar","⋖":"ltdot","⋗":"gtdot","⋘":"Ll","⋘̸":"nLl","⋙":"Gg","⋙̸":"nGg","⋚︀":"lesg","⋚":"leg","⋛":"gel","⋛︀":"gesl","⋞":"cuepr","⋟":"cuesc","⋦":"lnsim","⋧":"gnsim","⋨":"prnsim","⋩":"scnsim","⋮":"vellip","⋯":"ctdot","⋰":"utdot","⋱":"dtdot","⋲":"disin","⋳":"isinsv","⋴":"isins","⋵":"isindot","⋵̸":"notindot","⋶":"notinvc","⋷":"notinvb","⋹":"isinE","⋹̸":"notinE","⋺":"nisd","⋻":"xnis","⋼":"nis","⋽":"notnivc","⋾":"notnivb","⌅":"barwed","⌆":"Barwed","⌌":"drcrop","⌍":"dlcrop","⌎":"urcrop","⌏":"ulcrop","⌐":"bnot","⌒":"profline","⌓":"profsurf","⌕":"telrec","⌖":"target","⌜":"ulcorn","⌝":"urcorn","⌞":"dlcorn","⌟":"drcorn","⌢":"frown","⌣":"smile","⌭":"cylcty","⌮":"profalar","⌶":"topbot","⌽":"ovbar","⌿":"solbar","⍼":"angzarr","⎰":"lmoust","⎱":"rmoust","⎴":"tbrk","⎵":"bbrk","⎶":"bbrktbrk","⏜":"OverParenthesis","⏝":"UnderParenthesis","⏞":"OverBrace","⏟":"UnderBrace","⏢":"trpezium","⏧":"elinters","␣":"blank","─":"boxh","│":"boxv","┌":"boxdr","┐":"boxdl","└":"boxur","┘":"boxul","├":"boxvr","┤":"boxvl","┬":"boxhd","┴":"boxhu","┼":"boxvh","═":"boxH","║":"boxV","╒":"boxdR","╓":"boxDr","╔":"boxDR","╕":"boxdL","╖":"boxDl","╗":"boxDL","╘":"boxuR","╙":"boxUr","╚":"boxUR","╛":"boxuL","╜":"boxUl","╝":"boxUL","╞":"boxvR","╟":"boxVr","╠":"boxVR","╡":"boxvL","╢":"boxVl","╣":"boxVL","╤":"boxHd","╥":"boxhD","╦":"boxHD","╧":"boxHu","╨":"boxhU","╩":"boxHU","╪":"boxvH","╫":"boxVh","╬":"boxVH","▀":"uhblk","▄":"lhblk","█":"block","░":"blk14","▒":"blk12","▓":"blk34","□":"squ","▪":"squf","▫":"EmptyVerySmallSquare","▭":"rect","▮":"marker","▱":"fltns","△":"xutri","▴":"utrif","▵":"utri","▸":"rtrif","▹":"rtri","▽":"xdtri","▾":"dtrif","▿":"dtri","◂":"ltrif","◃":"ltri","◊":"loz","○":"cir","◬":"tridot","◯":"xcirc","◸":"ultri","◹":"urtri","◺":"lltri","◻":"EmptySmallSquare","◼":"FilledSmallSquare","★":"starf","☆":"star","☎":"phone","♀":"female","♂":"male","♠":"spades","♣":"clubs","♥":"hearts","♦":"diams","♪":"sung","✓":"check","✗":"cross","✠":"malt","✶":"sext","❘":"VerticalSeparator","⟈":"bsolhsub","⟉":"suphsol","⟵":"xlarr","⟶":"xrarr","⟷":"xharr","⟸":"xlArr","⟹":"xrArr","⟺":"xhArr","⟼":"xmap","⟿":"dzigrarr","⤂":"nvlArr","⤃":"nvrArr","⤄":"nvHarr","⤅":"Map","⤌":"lbarr","⤍":"rbarr","⤎":"lBarr","⤏":"rBarr","⤐":"RBarr","⤑":"DDotrahd","⤒":"UpArrowBar","⤓":"DownArrowBar","⤖":"Rarrtl","⤙":"latail","⤚":"ratail","⤛":"lAtail","⤜":"rAtail","⤝":"larrfs","⤞":"rarrfs","⤟":"larrbfs","⤠":"rarrbfs","⤣":"nwarhk","⤤":"nearhk","⤥":"searhk","⤦":"swarhk","⤧":"nwnear","⤨":"toea","⤩":"tosa","⤪":"swnwar","⤳":"rarrc","⤳̸":"nrarrc","⤵":"cudarrr","⤶":"ldca","⤷":"rdca","⤸":"cudarrl","⤹":"larrpl","⤼":"curarrm","⤽":"cularrp","⥅":"rarrpl","⥈":"harrcir","⥉":"Uarrocir","⥊":"lurdshar","⥋":"ldrushar","⥎":"LeftRightVector","⥏":"RightUpDownVector","⥐":"DownLeftRightVector","⥑":"LeftUpDownVector","⥒":"LeftVectorBar","⥓":"RightVectorBar","⥔":"RightUpVectorBar","⥕":"RightDownVectorBar","⥖":"DownLeftVectorBar","⥗":"DownRightVectorBar","⥘":"LeftUpVectorBar","⥙":"LeftDownVectorBar","⥚":"LeftTeeVector","⥛":"RightTeeVector","⥜":"RightUpTeeVector","⥝":"RightDownTeeVector","⥞":"DownLeftTeeVector","⥟":"DownRightTeeVector","⥠":"LeftUpTeeVector","⥡":"LeftDownTeeVector","⥢":"lHar","⥣":"uHar","⥤":"rHar","⥥":"dHar","⥦":"luruhar","⥧":"ldrdhar","⥨":"ruluhar","⥩":"rdldhar","⥪":"lharul","⥫":"llhard","⥬":"rharul","⥭":"lrhard","⥮":"udhar","⥯":"duhar","⥰":"RoundImplies","⥱":"erarr","⥲":"simrarr","⥳":"larrsim","⥴":"rarrsim","⥵":"rarrap","⥶":"ltlarr","⥸":"gtrarr","⥹":"subrarr","⥻":"suplarr","⥼":"lfisht","⥽":"rfisht","⥾":"ufisht","⥿":"dfisht","⦚":"vzigzag","⦜":"vangrt","⦝":"angrtvbd","⦤":"ange","⦥":"range","⦦":"dwangle","⦧":"uwangle","⦨":"angmsdaa","⦩":"angmsdab","⦪":"angmsdac","⦫":"angmsdad","⦬":"angmsdae","⦭":"angmsdaf","⦮":"angmsdag","⦯":"angmsdah","⦰":"bemptyv","⦱":"demptyv","⦲":"cemptyv","⦳":"raemptyv","⦴":"laemptyv","⦵":"ohbar","⦶":"omid","⦷":"opar","⦹":"operp","⦻":"olcross","⦼":"odsold","⦾":"olcir","⦿":"ofcir","⧀":"olt","⧁":"ogt","⧂":"cirscir","⧃":"cirE","⧄":"solb","⧅":"bsolb","⧉":"boxbox","⧍":"trisb","⧎":"rtriltri","⧏":"LeftTriangleBar","⧏̸":"NotLeftTriangleBar","⧐":"RightTriangleBar","⧐̸":"NotRightTriangleBar","⧜":"iinfin","⧝":"infintie","⧞":"nvinfin","⧣":"eparsl","⧤":"smeparsl","⧥":"eqvparsl","⧫":"lozf","⧴":"RuleDelayed","⧶":"dsol","⨀":"xodot","⨁":"xoplus","⨂":"xotime","⨄":"xuplus","⨆":"xsqcup","⨍":"fpartint","⨐":"cirfnint","⨑":"awint","⨒":"rppolint","⨓":"scpolint","⨔":"npolint","⨕":"pointint","⨖":"quatint","⨗":"intlarhk","⨢":"pluscir","⨣":"plusacir","⨤":"simplus","⨥":"plusdu","⨦":"plussim","⨧":"plustwo","⨩":"mcomma","⨪":"minusdu","⨭":"loplus","⨮":"roplus","⨯":"Cross","⨰":"timesd","⨱":"timesbar","⨳":"smashp","⨴":"lotimes","⨵":"rotimes","⨶":"otimesas","⨷":"Otimes","⨸":"odiv","⨹":"triplus","⨺":"triminus","⨻":"tritime","⨼":"iprod","⨿":"amalg","⩀":"capdot","⩂":"ncup","⩃":"ncap","⩄":"capand","⩅":"cupor","⩆":"cupcap","⩇":"capcup","⩈":"cupbrcap","⩉":"capbrcup","⩊":"cupcup","⩋":"capcap","⩌":"ccups","⩍":"ccaps","⩐":"ccupssm","⩓":"And","⩔":"Or","⩕":"andand","⩖":"oror","⩗":"orslope","⩘":"andslope","⩚":"andv","⩛":"orv","⩜":"andd","⩝":"ord","⩟":"wedbar","⩦":"sdote","⩪":"simdot","⩭":"congdot","⩭̸":"ncongdot","⩮":"easter","⩯":"apacir","⩰":"apE","⩰̸":"napE","⩱":"eplus","⩲":"pluse","⩳":"Esim","⩷":"eDDot","⩸":"equivDD","⩹":"ltcir","⩺":"gtcir","⩻":"ltquest","⩼":"gtquest","⩽":"les","⩽̸":"nles","⩾":"ges","⩾̸":"nges","⩿":"lesdot","⪀":"gesdot","⪁":"lesdoto","⪂":"gesdoto","⪃":"lesdotor","⪄":"gesdotol","⪅":"lap","⪆":"gap","⪇":"lne","⪈":"gne","⪉":"lnap","⪊":"gnap","⪋":"lEg","⪌":"gEl","⪍":"lsime","⪎":"gsime","⪏":"lsimg","⪐":"gsiml","⪑":"lgE","⪒":"glE","⪓":"lesges","⪔":"gesles","⪕":"els","⪖":"egs","⪗":"elsdot","⪘":"egsdot","⪙":"el","⪚":"eg","⪝":"siml","⪞":"simg","⪟":"simlE","⪠":"simgE","⪡":"LessLess","⪡̸":"NotNestedLessLess","⪢":"GreaterGreater","⪢̸":"NotNestedGreaterGreater","⪤":"glj","⪥":"gla","⪦":"ltcc","⪧":"gtcc","⪨":"lescc","⪩":"gescc","⪪":"smt","⪫":"lat","⪬":"smte","⪬︀":"smtes","⪭":"late","⪭︀":"lates","⪮":"bumpE","⪯":"pre","⪯̸":"npre","⪰":"sce","⪰̸":"nsce","⪳":"prE","⪴":"scE","⪵":"prnE","⪶":"scnE","⪷":"prap","⪸":"scap","⪹":"prnap","⪺":"scnap","⪻":"Pr","⪼":"Sc","⪽":"subdot","⪾":"supdot","⪿":"subplus","⫀":"supplus","⫁":"submult","⫂":"supmult","⫃":"subedot","⫄":"supedot","⫅":"subE","⫅̸":"nsubE","⫆":"supE","⫆̸":"nsupE","⫇":"subsim","⫈":"supsim","⫋︀":"vsubnE","⫋":"subnE","⫌︀":"vsupnE","⫌":"supnE","⫏":"csub","⫐":"csup","⫑":"csube","⫒":"csupe","⫓":"subsup","⫔":"supsub","⫕":"subsub","⫖":"supsup","⫗":"suphsub","⫘":"supdsub","⫙":"forkv","⫚":"topfork","⫛":"mlcp","⫤":"Dashv","⫦":"Vdashl","⫧":"Barv","⫨":"vBar","⫩":"vBarv","⫫":"Vbar","⫬":"Not","⫭":"bNot","⫮":"rnmid","⫯":"cirmid","⫰":"midcir","⫱":"topcir","⫲":"nhpar","⫳":"parsim","⫽":"parsl","⫽⃥":"nparsl","♭":"flat","♮":"natur","♯":"sharp","¤":"curren","¢":"cent",$:"dollar","£":"pound","¥":"yen","€":"euro","¹":"sup1","½":"half","⅓":"frac13","¼":"frac14","⅕":"frac15","⅙":"frac16","⅛":"frac18","²":"sup2","⅔":"frac23","⅖":"frac25","³":"sup3","¾":"frac34","⅗":"frac35","⅜":"frac38","⅘":"frac45","⅚":"frac56","⅝":"frac58","⅞":"frac78","𝒶":"ascr","𝕒":"aopf","𝔞":"afr","𝔸":"Aopf","𝔄":"Afr","𝒜":"Ascr","ª":"ordf","á":"aacute","Á":"Aacute","à":"agrave","À":"Agrave","ă":"abreve","Ă":"Abreve","â":"acirc","Â":"Acirc","å":"aring","Å":"angst","ä":"auml","Ä":"Auml","ã":"atilde","Ã":"Atilde","ą":"aogon","Ą":"Aogon","ā":"amacr","Ā":"Amacr","æ":"aelig","Æ":"AElig","𝒷":"bscr","𝕓":"bopf","𝔟":"bfr","𝔹":"Bopf","ℬ":"Bscr","𝔅":"Bfr","𝔠":"cfr","𝒸":"cscr","𝕔":"copf","ℭ":"Cfr","𝒞":"Cscr","ℂ":"Copf","ć":"cacute","Ć":"Cacute","ĉ":"ccirc","Ĉ":"Ccirc","č":"ccaron","Č":"Ccaron","ċ":"cdot","Ċ":"Cdot","ç":"ccedil","Ç":"Ccedil","℅":"incare","𝔡":"dfr","ⅆ":"dd","𝕕":"dopf","𝒹":"dscr","𝒟":"Dscr","𝔇":"Dfr","ⅅ":"DD","𝔻":"Dopf","ď":"dcaron","Ď":"Dcaron","đ":"dstrok","Đ":"Dstrok","ð":"eth","Ð":"ETH","ⅇ":"ee","ℯ":"escr","𝔢":"efr","𝕖":"eopf","ℰ":"Escr","𝔈":"Efr","𝔼":"Eopf","é":"eacute","É":"Eacute","è":"egrave","È":"Egrave","ê":"ecirc","Ê":"Ecirc","ě":"ecaron","Ě":"Ecaron","ë":"euml","Ë":"Euml","ė":"edot","Ė":"Edot","ę":"eogon","Ę":"Eogon","ē":"emacr","Ē":"Emacr","𝔣":"ffr","𝕗":"fopf","𝒻":"fscr","𝔉":"Ffr","𝔽":"Fopf","ℱ":"Fscr","ff":"fflig","ffi":"ffilig","ffl":"ffllig","fi":"filig",fj:"fjlig","fl":"fllig","ƒ":"fnof","ℊ":"gscr","𝕘":"gopf","𝔤":"gfr","𝒢":"Gscr","𝔾":"Gopf","𝔊":"Gfr","ǵ":"gacute","ğ":"gbreve","Ğ":"Gbreve","ĝ":"gcirc","Ĝ":"Gcirc","ġ":"gdot","Ġ":"Gdot","Ģ":"Gcedil","𝔥":"hfr","ℎ":"planckh","𝒽":"hscr","𝕙":"hopf","ℋ":"Hscr","ℌ":"Hfr","ℍ":"Hopf","ĥ":"hcirc","Ĥ":"Hcirc","ℏ":"hbar","ħ":"hstrok","Ħ":"Hstrok","𝕚":"iopf","𝔦":"ifr","𝒾":"iscr","ⅈ":"ii","𝕀":"Iopf","ℐ":"Iscr","ℑ":"Im","í":"iacute","Í":"Iacute","ì":"igrave","Ì":"Igrave","î":"icirc","Î":"Icirc","ï":"iuml","Ï":"Iuml","ĩ":"itilde","Ĩ":"Itilde","İ":"Idot","į":"iogon","Į":"Iogon","ī":"imacr","Ī":"Imacr","ij":"ijlig","IJ":"IJlig","ı":"imath","𝒿":"jscr","𝕛":"jopf","𝔧":"jfr","𝒥":"Jscr","𝔍":"Jfr","𝕁":"Jopf","ĵ":"jcirc","Ĵ":"Jcirc","ȷ":"jmath","𝕜":"kopf","𝓀":"kscr","𝔨":"kfr","𝒦":"Kscr","𝕂":"Kopf","𝔎":"Kfr","ķ":"kcedil","Ķ":"Kcedil","𝔩":"lfr","𝓁":"lscr","ℓ":"ell","𝕝":"lopf","ℒ":"Lscr","𝔏":"Lfr","𝕃":"Lopf","ĺ":"lacute","Ĺ":"Lacute","ľ":"lcaron","Ľ":"Lcaron","ļ":"lcedil","Ļ":"Lcedil","ł":"lstrok","Ł":"Lstrok","ŀ":"lmidot","Ŀ":"Lmidot","𝔪":"mfr","𝕞":"mopf","𝓂":"mscr","𝔐":"Mfr","𝕄":"Mopf","ℳ":"Mscr","𝔫":"nfr","𝕟":"nopf","𝓃":"nscr","ℕ":"Nopf","𝒩":"Nscr","𝔑":"Nfr","ń":"nacute","Ń":"Nacute","ň":"ncaron","Ň":"Ncaron","ñ":"ntilde","Ñ":"Ntilde","ņ":"ncedil","Ņ":"Ncedil","№":"numero","ŋ":"eng","Ŋ":"ENG","𝕠":"oopf","𝔬":"ofr","ℴ":"oscr","𝒪":"Oscr","𝔒":"Ofr","𝕆":"Oopf","º":"ordm","ó":"oacute","Ó":"Oacute","ò":"ograve","Ò":"Ograve","ô":"ocirc","Ô":"Ocirc","ö":"ouml","Ö":"Ouml","ő":"odblac","Ő":"Odblac","õ":"otilde","Õ":"Otilde","ø":"oslash","Ø":"Oslash","ō":"omacr","Ō":"Omacr","œ":"oelig","Œ":"OElig","𝔭":"pfr","𝓅":"pscr","𝕡":"popf","ℙ":"Popf","𝔓":"Pfr","𝒫":"Pscr","𝕢":"qopf","𝔮":"qfr","𝓆":"qscr","𝒬":"Qscr","𝔔":"Qfr","ℚ":"Qopf","ĸ":"kgreen","𝔯":"rfr","𝕣":"ropf","𝓇":"rscr","ℛ":"Rscr","ℜ":"Re","ℝ":"Ropf","ŕ":"racute","Ŕ":"Racute","ř":"rcaron","Ř":"Rcaron","ŗ":"rcedil","Ŗ":"Rcedil","𝕤":"sopf","𝓈":"sscr","𝔰":"sfr","𝕊":"Sopf","𝔖":"Sfr","𝒮":"Sscr","Ⓢ":"oS","ś":"sacute","Ś":"Sacute","ŝ":"scirc","Ŝ":"Scirc","š":"scaron","Š":"Scaron","ş":"scedil","Ş":"Scedil","ß":"szlig","𝔱":"tfr","𝓉":"tscr","𝕥":"topf","𝒯":"Tscr","𝔗":"Tfr","𝕋":"Topf","ť":"tcaron","Ť":"Tcaron","ţ":"tcedil","Ţ":"Tcedil","™":"trade","ŧ":"tstrok","Ŧ":"Tstrok","𝓊":"uscr","𝕦":"uopf","𝔲":"ufr","𝕌":"Uopf","𝔘":"Ufr","𝒰":"Uscr","ú":"uacute","Ú":"Uacute","ù":"ugrave","Ù":"Ugrave","ŭ":"ubreve","Ŭ":"Ubreve","û":"ucirc","Û":"Ucirc","ů":"uring","Ů":"Uring","ü":"uuml","Ü":"Uuml","ű":"udblac","Ű":"Udblac","ũ":"utilde","Ũ":"Utilde","ų":"uogon","Ų":"Uogon","ū":"umacr","Ū":"Umacr","𝔳":"vfr","𝕧":"vopf","𝓋":"vscr","𝔙":"Vfr","𝕍":"Vopf","𝒱":"Vscr","𝕨":"wopf","𝓌":"wscr","𝔴":"wfr","𝒲":"Wscr","𝕎":"Wopf","𝔚":"Wfr","ŵ":"wcirc","Ŵ":"Wcirc","𝔵":"xfr","𝓍":"xscr","𝕩":"xopf","𝕏":"Xopf","𝔛":"Xfr","𝒳":"Xscr","𝔶":"yfr","𝓎":"yscr","𝕪":"yopf","𝒴":"Yscr","𝔜":"Yfr","𝕐":"Yopf","ý":"yacute","Ý":"Yacute","ŷ":"ycirc","Ŷ":"Ycirc","ÿ":"yuml","Ÿ":"Yuml","𝓏":"zscr","𝔷":"zfr","𝕫":"zopf","ℨ":"Zfr","ℤ":"Zopf","𝒵":"Zscr","ź":"zacute","Ź":"Zacute","ž":"zcaron","Ž":"Zcaron","ż":"zdot","Ż":"Zdot","Ƶ":"imped","þ":"thorn","Þ":"THORN","ʼn":"napos","α":"alpha","Α":"Alpha","β":"beta","Β":"Beta","γ":"gamma","Γ":"Gamma","δ":"delta","Δ":"Delta","ε":"epsi","ϵ":"epsiv","Ε":"Epsilon","ϝ":"gammad","Ϝ":"Gammad","ζ":"zeta","Ζ":"Zeta","η":"eta","Η":"Eta","θ":"theta","ϑ":"thetav","Θ":"Theta","ι":"iota","Ι":"Iota","κ":"kappa","ϰ":"kappav","Κ":"Kappa","λ":"lambda","Λ":"Lambda","μ":"mu","µ":"micro","Μ":"Mu","ν":"nu","Ν":"Nu","ξ":"xi","Ξ":"Xi","ο":"omicron","Ο":"Omicron","π":"pi","ϖ":"piv","Π":"Pi","ρ":"rho","ϱ":"rhov","Ρ":"Rho","σ":"sigma","Σ":"Sigma","ς":"sigmaf","τ":"tau","Τ":"Tau","υ":"upsi","Υ":"Upsilon","ϒ":"Upsi","φ":"phi","ϕ":"phiv","Φ":"Phi","χ":"chi","Χ":"Chi","ψ":"psi","Ψ":"Psi","ω":"omega","Ω":"ohm","а":"acy","А":"Acy","б":"bcy","Б":"Bcy","в":"vcy","В":"Vcy","г":"gcy","Г":"Gcy","ѓ":"gjcy","Ѓ":"GJcy","д":"dcy","Д":"Dcy","ђ":"djcy","Ђ":"DJcy","е":"iecy","Е":"IEcy","ё":"iocy","Ё":"IOcy","є":"jukcy","Є":"Jukcy","ж":"zhcy","Ж":"ZHcy","з":"zcy","З":"Zcy","ѕ":"dscy","Ѕ":"DScy","и":"icy","И":"Icy","і":"iukcy","І":"Iukcy","ї":"yicy","Ї":"YIcy","й":"jcy","Й":"Jcy","ј":"jsercy","Ј":"Jsercy","к":"kcy","К":"Kcy","ќ":"kjcy","Ќ":"KJcy","л":"lcy","Л":"Lcy","љ":"ljcy","Љ":"LJcy","м":"mcy","М":"Mcy","н":"ncy","Н":"Ncy","њ":"njcy","Њ":"NJcy","о":"ocy","О":"Ocy","п":"pcy","П":"Pcy","р":"rcy","Р":"Rcy","с":"scy","С":"Scy","т":"tcy","Т":"Tcy","ћ":"tshcy","Ћ":"TSHcy","у":"ucy","У":"Ucy","ў":"ubrcy","Ў":"Ubrcy","ф":"fcy","Ф":"Fcy","х":"khcy","Х":"KHcy","ц":"tscy","Ц":"TScy","ч":"chcy","Ч":"CHcy","џ":"dzcy","Џ":"DZcy","ш":"shcy","Ш":"SHcy","щ":"shchcy","Щ":"SHCHcy","ъ":"hardcy","Ъ":"HARDcy","ы":"ycy","Ы":"Ycy","ь":"softcy","Ь":"SOFTcy","э":"ecy","Э":"Ecy","ю":"yucy","Ю":"YUcy","я":"yacy","Я":"YAcy","ℵ":"aleph","ℶ":"beth","ℷ":"gimel","ℸ":"daleth"},h=/["&'<>`]/g,r={'"':""","&":"&","'":"'","<":"<",">":">","`":"`"},a=/&#(?:[xX][^a-fA-F0-9]|[^0-9xX])/,f=/[\0-\x08\x0B\x0E-\x1F\x7F-\x9F\uFDD0-\uFDEF\uFFFE\uFFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDFFE\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,i=/&#([0-9]+)(;?)|&#[xX]([a-fA-F0-9]+)(;?)|&([0-9a-zA-Z]+);|&(Aacute|Agrave|Atilde|Ccedil|Eacute|Egrave|Iacute|Igrave|Ntilde|Oacute|Ograve|Oslash|Otilde|Uacute|Ugrave|Yacute|aacute|agrave|atilde|brvbar|ccedil|curren|divide|eacute|egrave|frac12|frac14|frac34|iacute|igrave|iquest|middot|ntilde|oacute|ograve|oslash|otilde|plusmn|uacute|ugrave|yacute|AElig|Acirc|Aring|Ecirc|Icirc|Ocirc|THORN|Ucirc|acirc|acute|aelig|aring|cedil|ecirc|icirc|iexcl|laquo|micro|ocirc|pound|raquo|szlig|thorn|times|ucirc|Auml|COPY|Euml|Iuml|Ouml|QUOT|Uuml|auml|cent|copy|euml|iuml|macr|nbsp|ordf|ordm|ouml|para|quot|sect|sup1|sup2|sup3|uuml|yuml|AMP|ETH|REG|amp|deg|eth|not|reg|shy|uml|yen|GT|LT|gt|lt)([=a-zA-Z0-9])?/g,m={aacute:"á",Aacute:"Á",abreve:"ă",Abreve:"Ă",ac:"∾",acd:"∿",acE:"∾̳",acirc:"â",Acirc:"Â",acute:"´",acy:"а",Acy:"А",aelig:"æ",AElig:"Æ",af:"⁡",afr:"𝔞",Afr:"𝔄",agrave:"à",Agrave:"À",alefsym:"ℵ",aleph:"ℵ",alpha:"α",Alpha:"Α",amacr:"ā",Amacr:"Ā",amalg:"⨿",amp:"&",AMP:"&",and:"∧",And:"⩓",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",Aogon:"Ą",aopf:"𝕒",Aopf:"𝔸",ap:"≈",apacir:"⩯",ape:"≊",apE:"⩰",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",aring:"å",Aring:"Å",ascr:"𝒶",Ascr:"𝒜",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",atilde:"ã",Atilde:"Ã",auml:"ä",Auml:"Ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",Bcy:"Б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",beta:"β",Beta:"Β",beth:"ℶ",between:"≬",bfr:"𝔟",Bfr:"𝔅",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bNot:"⫭",bopf:"𝕓",Bopf:"𝔹",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxhD:"╥",boxHd:"╤",boxHD:"╦",boxhu:"┴",boxhU:"╨",boxHu:"╧",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpe:"≏",bumpE:"⪮",bumpeq:"≏",Bumpeq:"≎",cacute:"ć",Cacute:"Ć",cap:"∩",Cap:"⋒",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",ccaron:"č",Ccaron:"Č",ccedil:"ç",Ccedil:"Ç",ccirc:"ĉ",Ccirc:"Ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",Cdot:"Ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",chcy:"ч",CHcy:"Ч",check:"✓",checkmark:"✓",chi:"χ",Chi:"Χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cire:"≗",cirE:"⧃",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",colone:"≔",Colone:"⩴",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",cscr:"𝒸",Cscr:"𝒞",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",Cup:"⋓",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",dArr:"⇓",Darr:"↡",dash:"‐",dashv:"⊣",Dashv:"⫤",dbkarow:"⤏",dblac:"˝",dcaron:"ď",Dcaron:"Ď",dcy:"д",Dcy:"Д",dd:"ⅆ",DD:"ⅅ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",delta:"δ",Delta:"Δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",Dfr:"𝔇",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",DJcy:"Ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",Dopf:"𝔻",dot:"˙",Dot:"¨",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",downarrow:"↓",Downarrow:"⇓",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",Dscr:"𝒟",dscy:"ѕ",DScy:"Ѕ",dsol:"⧶",dstrok:"đ",Dstrok:"Đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",DZcy:"Џ",dzigrarr:"⟿",eacute:"é",Eacute:"É",easter:"⩮",ecaron:"ě",Ecaron:"Ě",ecir:"≖",ecirc:"ê",Ecirc:"Ê",ecolon:"≕",ecy:"э",Ecy:"Э",eDDot:"⩷",edot:"ė",eDot:"≑",Edot:"Ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",Efr:"𝔈",eg:"⪚",egrave:"è",Egrave:"È",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",Emacr:"Ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",eng:"ŋ",ENG:"Ŋ",ensp:" ",eogon:"ę",Eogon:"Ę",eopf:"𝕖",Eopf:"𝔼",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",Epsilon:"Ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",esim:"≂",Esim:"⩳",eta:"η",Eta:"Η",eth:"ð",ETH:"Ð",euml:"ë",Euml:"Ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",fcy:"ф",Fcy:"Ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",Ffr:"𝔉",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",Fopf:"𝔽",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",gamma:"γ",Gamma:"Γ",gammad:"ϝ",Gammad:"Ϝ",gap:"⪆",gbreve:"ğ",Gbreve:"Ğ",Gcedil:"Ģ",gcirc:"ĝ",Gcirc:"Ĝ",gcy:"г",Gcy:"Г",gdot:"ġ",Gdot:"Ġ",ge:"≥",gE:"≧",gel:"⋛",gEl:"⪌",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",Gfr:"𝔊",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",GJcy:"Ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",Gopf:"𝔾",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",gscr:"ℊ",Gscr:"𝒢",gsim:"≳",gsime:"⪎",gsiml:"⪐",gt:">",Gt:"≫",GT:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",HARDcy:"Ъ",harr:"↔",hArr:"⇔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",hcirc:"ĥ",Hcirc:"Ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",hstrok:"ħ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",iacute:"í",Iacute:"Í",ic:"⁣",icirc:"î",Icirc:"Î",icy:"и",Icy:"И",Idot:"İ",iecy:"е",IEcy:"Е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",igrave:"ì",Igrave:"Ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",IJlig:"IJ",Im:"ℑ",imacr:"ī",Imacr:"Ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",Int:"∬",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",iocy:"ё",IOcy:"Ё",iogon:"į",Iogon:"Į",iopf:"𝕚",Iopf:"𝕀",iota:"ι",Iota:"Ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",itilde:"ĩ",Itilde:"Ĩ",iukcy:"і",Iukcy:"І",iuml:"ï",Iuml:"Ï",jcirc:"ĵ",Jcirc:"Ĵ",jcy:"й",Jcy:"Й",jfr:"𝔧",Jfr:"𝔍",jmath:"ȷ",jopf:"𝕛",Jopf:"𝕁",jscr:"𝒿",Jscr:"𝒥",jsercy:"ј",Jsercy:"Ј",jukcy:"є",Jukcy:"Є",kappa:"κ",Kappa:"Κ",kappav:"ϰ",kcedil:"ķ",Kcedil:"Ķ",kcy:"к",Kcy:"К",kfr:"𝔨",Kfr:"𝔎",kgreen:"ĸ",khcy:"х",KHcy:"Х",kjcy:"ќ",KJcy:"Ќ",kopf:"𝕜",Kopf:"𝕂",kscr:"𝓀",Kscr:"𝒦",lAarr:"⇚",lacute:"ĺ",Lacute:"Ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",Lambda:"Λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larr:"←",lArr:"⇐",Larr:"↞",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",lAtail:"⤛",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",Lcaron:"Ľ",lcedil:"ļ",Lcedil:"Ļ",lceil:"⌈",lcub:"{",lcy:"л",Lcy:"Л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",leftarrow:"←",Leftarrow:"⇐",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",Leftrightarrow:"⇔",LeftRightArrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",leg:"⋚",lEg:"⪋",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",Lfr:"𝔏",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",LJcy:"Љ",ll:"≪",Ll:"⋘",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",lmidot:"ŀ",Lmidot:"Ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",Longleftarrow:"⟸",LongLeftArrow:"⟵",longleftrightarrow:"⟷",Longleftrightarrow:"⟺",LongLeftRightArrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",Longrightarrow:"⟹",LongRightArrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",Lopf:"𝕃",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",Lstrok:"Ł",lt:"<",Lt:"≪",LT:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",Map:"⤅",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",Mcy:"М",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",mfr:"𝔪",Mfr:"𝔐",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",Mopf:"𝕄",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",mu:"μ",Mu:"Μ",multimap:"⊸",mumap:"⊸",nabla:"∇",nacute:"ń",Nacute:"Ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",Ncaron:"Ň",ncedil:"ņ",Ncedil:"Ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",Ncy:"Н",ndash:"–",ne:"≠",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",nfr:"𝔫",Nfr:"𝔑",nge:"≱",ngE:"≧̸",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",ngt:"≯",nGt:"≫⃒",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",NJcy:"Њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nle:"≰",nlE:"≦̸",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nlt:"≮",nLt:"≪⃒",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",not:"¬",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrarr:"↛",nrArr:"⇏",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",Nscr:"𝒩",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsube:"⊈",nsubE:"⫅̸",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupe:"⊉",nsupE:"⫆̸",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntilde:"ñ",Ntilde:"Ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",Nu:"Ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",oacute:"ó",Oacute:"Ó",oast:"⊛",ocir:"⊚",ocirc:"ô",Ocirc:"Ô",ocy:"о",Ocy:"О",odash:"⊝",odblac:"ő",Odblac:"Ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",OElig:"Œ",ofcir:"⦿",ofr:"𝔬",Ofr:"𝔒",ogon:"˛",ograve:"ò",Ograve:"Ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",Omacr:"Ō",omega:"ω",Omega:"Ω",omicron:"ο",Omicron:"Ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",Oopf:"𝕆",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",or:"∨",Or:"⩔",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",oscr:"ℴ",Oscr:"𝒪",oslash:"ø",Oslash:"Ø",osol:"⊘",otilde:"õ",Otilde:"Õ",otimes:"⊗",Otimes:"⨷",otimesas:"⨶",ouml:"ö",Ouml:"Ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",pcy:"п",Pcy:"П",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",Pfr:"𝔓",phi:"φ",Phi:"Φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",Pi:"Π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",pr:"≺",Pr:"⪻",prap:"⪷",prcue:"≼",pre:"⪯",prE:"⪳",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",Pscr:"𝒫",psi:"ψ",Psi:"Ψ",puncsp:" ",qfr:"𝔮",Qfr:"𝔔",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",qscr:"𝓆",Qscr:"𝒬",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",racute:"ŕ",Racute:"Ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarr:"→",rArr:"⇒",Rarr:"↠",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",Rarrtl:"⤖",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",Rcaron:"Ř",rcedil:"ŗ",Rcedil:"Ŗ",rceil:"⌉",rcub:"}",rcy:"р",Rcy:"Р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",Rho:"Ρ",rhov:"ϱ",RightAngleBracket:"⟩",rightarrow:"→",Rightarrow:"⇒",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",sacute:"ś",Sacute:"Ś",sbquo:"‚",sc:"≻",Sc:"⪼",scap:"⪸",scaron:"š",Scaron:"Š",sccue:"≽",sce:"⪰",scE:"⪴",scedil:"ş",Scedil:"Ş",scirc:"ŝ",Scirc:"Ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",Scy:"С",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",Sfr:"𝔖",sfrown:"⌢",sharp:"♯",shchcy:"щ",SHCHcy:"Щ",shcy:"ш",SHcy:"Ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",sigma:"σ",Sigma:"Σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",SOFTcy:"Ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",Sopf:"𝕊",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",Sscr:"𝒮",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",Star:"⋆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",sube:"⊆",subE:"⫅",subedot:"⫃",submult:"⫁",subne:"⊊",subnE:"⫋",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup:"⊃",Sup:"⋑",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supe:"⊇",supE:"⫆",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supne:"⊋",supnE:"⫌",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",tau:"τ",Tau:"Τ",tbrk:"⎴",tcaron:"ť",Tcaron:"Ť",tcedil:"ţ",Tcedil:"Ţ",tcy:"т",Tcy:"Т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",Tfr:"𝔗",there4:"∴",therefore:"∴",Therefore:"∴",theta:"θ",Theta:"Θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",thorn:"þ",THORN:"Þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",Topf:"𝕋",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",Tscr:"𝒯",tscy:"ц",TScy:"Ц",tshcy:"ћ",TSHcy:"Ћ",tstrok:"ŧ",Tstrok:"Ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uacute:"ú",Uacute:"Ú",uarr:"↑",uArr:"⇑",Uarr:"↟",Uarrocir:"⥉",ubrcy:"ў",Ubrcy:"Ў",ubreve:"ŭ",Ubreve:"Ŭ",ucirc:"û",Ucirc:"Û",ucy:"у",Ucy:"У",udarr:"⇅",udblac:"ű",Udblac:"Ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",Ufr:"𝔘",ugrave:"ù",Ugrave:"Ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",Umacr:"Ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",uogon:"ų",Uogon:"Ų",uopf:"𝕦",Uopf:"𝕌",uparrow:"↑",Uparrow:"⇑",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",updownarrow:"↕",Updownarrow:"⇕",UpDownArrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",upsilon:"υ",Upsilon:"Υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",Uring:"Ů",urtri:"◹",uscr:"𝓊",Uscr:"𝒰",utdot:"⋰",utilde:"ũ",Utilde:"Ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uuml:"ü",Uuml:"Ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",vcy:"в",Vcy:"В",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",vee:"∨",Vee:"⋁",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",vfr:"𝔳",Vfr:"𝔙",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",Vopf:"𝕍",vprop:"∝",vrtri:"⊳",vscr:"𝓋",Vscr:"𝒱",vsubne:"⊊︀",vsubnE:"⫋︀",vsupne:"⊋︀",vsupnE:"⫌︀",Vvdash:"⊪",vzigzag:"⦚",wcirc:"ŵ",Wcirc:"Ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",wfr:"𝔴",Wfr:"𝔚",wopf:"𝕨",Wopf:"𝕎",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",Wscr:"𝒲",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",Xfr:"𝔛",xharr:"⟷",xhArr:"⟺",xi:"ξ",Xi:"Ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",Xopf:"𝕏",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",xscr:"𝓍",Xscr:"𝒳",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacute:"ý",Yacute:"Ý",yacy:"я",YAcy:"Я",ycirc:"ŷ",Ycirc:"Ŷ",ycy:"ы",Ycy:"Ы",yen:"¥",yfr:"𝔶",Yfr:"𝔜",yicy:"ї",YIcy:"Ї",yopf:"𝕪",Yopf:"𝕐",yscr:"𝓎",Yscr:"𝒴",yucy:"ю",YUcy:"Ю",yuml:"ÿ",Yuml:"Ÿ",zacute:"ź",Zacute:"Ź",zcaron:"ž",Zcaron:"Ž",zcy:"з",Zcy:"З",zdot:"ż",Zdot:"Ż",zeetrf:"ℨ",ZeroWidthSpace:"​",zeta:"ζ",Zeta:"Ζ",zfr:"𝔷",Zfr:"ℨ",zhcy:"ж",ZHcy:"Ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",zscr:"𝓏",Zscr:"𝒵",zwj:"‍",zwnj:"‌"},y={aacute:"á",Aacute:"Á",acirc:"â",Acirc:"Â",acute:"´",aelig:"æ",AElig:"Æ",agrave:"à",Agrave:"À",amp:"&",AMP:"&",aring:"å",Aring:"Å",atilde:"ã",Atilde:"Ã",auml:"ä",Auml:"Ä",brvbar:"¦",ccedil:"ç",Ccedil:"Ç",cedil:"¸",cent:"¢",copy:"©",COPY:"©",curren:"¤",deg:"°",divide:"÷",eacute:"é",Eacute:"É",ecirc:"ê",Ecirc:"Ê",egrave:"è",Egrave:"È",eth:"ð",ETH:"Ð",euml:"ë",Euml:"Ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",GT:">",iacute:"í",Iacute:"Í",icirc:"î",Icirc:"Î",iexcl:"¡",igrave:"ì",Igrave:"Ì",iquest:"¿",iuml:"ï",Iuml:"Ï",laquo:"«",lt:"<",LT:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",ntilde:"ñ",Ntilde:"Ñ",oacute:"ó",Oacute:"Ó",ocirc:"ô",Ocirc:"Ô",ograve:"ò",Ograve:"Ò",ordf:"ª",ordm:"º",oslash:"ø",Oslash:"Ø",otilde:"õ",Otilde:"Õ",ouml:"ö",Ouml:"Ö",para:"¶",plusmn:"±",pound:"£",quot:'"',QUOT:'"',raquo:"»",reg:"®",REG:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",thorn:"þ",THORN:"Þ",times:"×",uacute:"ú",Uacute:"Ú",ucirc:"û",Ucirc:"Û",ugrave:"ù",Ugrave:"Ù",uml:"¨",uuml:"ü",Uuml:"Ü",yacute:"ý",Yacute:"Ý",yen:"¥",yuml:"ÿ"},s={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"},_=[1,2,3,4,5,6,7,8,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,64976,64977,64978,64979,64980,64981,64982,64983,64984,64985,64986,64987,64988,64989,64990,64991,64992,64993,64994,64995,64996,64997,64998,64999,65e3,65001,65002,65003,65004,65005,65006,65007,65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111],p=String.fromCharCode,g={}.hasOwnProperty,v=function(t,e){return g.call(t,e)},M=function(t,e){if(!t)return e;var n,r={};for(n in e)r[n]=v(t,n)?t[n]:e[n];return r},k=function(t,e){var n="";return 55296<=t&&t<=57343||1114111>>10&1023|55296),t=56320|1023&t),n+=p(t))},b=function(t){return"&#x"+t.toString(16).toUpperCase()+";"},L=function(t){return"&#"+t+";"},w=function(t){throw Error("Parse error: "+t)},x=function(t,e){(e=M(e,x.options)).strict&&f.test(t)&&w("forbidden code point");var n=e.encodeEverything,r=e.useNamedReferences,a=e.allowUnsafeSymbols,i=e.decimal?L:b,s=function(t){return i(t.charCodeAt(0))};return n?(t=t.replace(u,function(t){return r&&v(d,t)?"&"+d[t]+";":s(t)}),r&&(t=t.replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒").replace(/fj/g,"fj")),r&&(t=t.replace(c,function(t){return"&"+d[t]+";"}))):r?(a||(t=t.replace(h,function(t){return"&"+d[t]+";"})),t=(t=t.replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒")).replace(c,function(t){return"&"+d[t]+";"})):a||(t=t.replace(h,s)),t.replace(o,function(t){var e=t.charCodeAt(0),n=t.charCodeAt(1);return i(1024*(e-55296)+n-56320+65536)}).replace(l,s)};x.options={allowUnsafeSymbols:!1,encodeEverything:!1,strict:!1,useNamedReferences:!1,decimal:!1};var D=function(t,_){var p=(_=M(_,D.options)).strict;return p&&a.test(t)&&w("malformed character reference"),t.replace(i,function(t,e,n,r,a,i,s,o){var u,l,c,d,h,f;return e?(c=e,l=n,p&&!l&&w("character reference was not terminated by a semicolon"),u=parseInt(c,10),k(u,p)):r?(d=r,l=a,p&&!l&&w("character reference was not terminated by a semicolon"),u=parseInt(d,16),k(u,p)):i?v(m,h=i)?m[h]:(p&&w("named character reference was not terminated by a semicolon"),t):(h=s,(f=o)&&_.isAttributeValue?(p&&"="==f&&w("`&` did not start a character reference"),t):(p&&w("named character reference was not terminated by a semicolon"),y[h]+(f||"")))})};D.options={isAttributeValue:!1,strict:!1};var Y={version:"1.1.1",encode:x,decode:D,escape:function(t){return t.replace(h,function(t){return r[t]})},unescape:D};void 0===(S=function(){return Y}.call(E,j,E,T))||(T.exports=S)}()}).call(E,j(3)(t),j(18))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decodeEntities=e.encodeEntities=e.version=void 0;var i="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},h=n(1),f=E(n(157)),_=E(n(158)),p=E(n(208)),m=E(n(222)),y=E(n(224)),r=E(n(171)),a=E(n(160)),s=E(n(161)),o=E(n(168)),u=E(n(169)),l=E(n(170)),g=E(n(225)),c=E(n(172)),d=E(n(173)),v=E(n(174)),M=E(n(226)),k=E(n(175)),b=E(n(176)),L=E(n(227)),w=E(n(201)),x=E(n(6)),D=E(n(203)),Y=E(n(346)),T=E(n(348)),A=E(n(350)),S=E(n(352));function E(t){return t&&t.__esModule?t:{default:t}}var j={dark:Y.default,default:T.default,forest:A.default,neutral:S.default},C={theme:T.default,logLevel:5,startOnLoad:!0,arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!0,useMaxWidth:!0},sequenceDiagram:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:3,axisFormatter:[["%I:%M",function(t){return t.getHours()}],["w. %U",function(t){return 1===t.getDay()}],["%a %d",function(t){return t.getDay()&&1!==t.getDate()}],["%b %d",function(t){return 1!==t.getDate()}],["%m-%y",function(t){return t.getMonth()}]]},classDiagram:{},gitGraph:{},info:{}};(0,h.setLogLevel)(C.logLevel);var F=e.version=function(){return D.default.version},O=e.encodeEntities=function(t){var e=t;return e=(e=(e=e.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+"¶ß"})},H=e.decodeEntities=function(t){var e=t;return e=(e=(e=e.replace(/fl°°/g,function(){return"&#"})).replace(/fl°/g,function(){return"&"})).replace(/¶ß/g,function(){return";"})},P=function(t,e,n,r){if(void 0!==r)r.innerHTML="",x.default.select(r).append("div").attr("id","d"+t).append("svg").attr("id",t).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg").append("g");else{var a=document.querySelector("#d"+t);a&&(a.innerHTML=""),x.default.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=e,e=O(e);var i=x.default.select("#d"+t).node();switch(_.default.detectType(e)){case"gitGraph":C.flowchart.arrowMarkerAbsolute=C.arrowMarkerAbsolute,L.default.setConf(C.gitGraph),L.default.draw(e,t,!1);break;case"graph":C.flowchart.arrowMarkerAbsolute=C.arrowMarkerAbsolute,p.default.setConf(C.flowchart),p.default.draw(e,t,!1);break;case"dotGraph":C.flowchart.arrowMarkerAbsolute=C.arrowMarkerAbsolute,p.default.setConf(C.flowchart),p.default.draw(e,t,!0);break;case"sequenceDiagram":C.sequenceDiagram.arrowMarkerAbsolute=C.arrowMarkerAbsolute,m.default.setConf(C.sequenceDiagram),m.default.draw(e,t);break;case"gantt":C.gantt.arrowMarkerAbsolute=C.arrowMarkerAbsolute,g.default.setConf(C.gantt),g.default.draw(e,t);break;case"classDiagram":C.classDiagram.arrowMarkerAbsolute=C.arrowMarkerAbsolute,M.default.setConf(C.classDiagram),M.default.draw(e,t);break;case"info":C.info.arrowMarkerAbsolute=C.arrowMarkerAbsolute,y.default.draw(e,t,F())}var s=i.firstChild,o=document.createElement("style"),u=window.getComputedStyle(s);o.innerHTML="\n "+(j[C.theme]||T.default)+"\nsvg {\n color: "+u.color+";\n font: "+u.font+";\n}\n ",s.insertBefore(o,s.firstChild),x.default.select("#d"+t).selectAll("foreignobject div").attr("xmlns","http://www.w3.org/1999/xhtml");var l="";C.arrowMarkerAbsolute&&(l=(l=(l=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)"));var c=x.default.select("#d"+t).node().innerHTML.replace(/url\(#arrowhead/g,"url("+l+"#arrowhead","g");c=H(c),void 0!==n?n(c,f.default.bindFunctions):h.logger.warn("CB = undefined!");var d=x.default.select("#d"+t).node();return null!==d&&"function"==typeof d.remove&&x.default.select("#d"+t).node().remove(),c};var B=function(t){for(var e=Object.keys(t),n=0;n'});else{for(var s=document.createElementNS("http://www.w3.org/2000/svg","text"),o=n.split(/
/),u=0;u'+t.text+""):(e.labelType="text",e.style="stroke: #333; stroke-width: 1.5px;fill:none",e.label=t.text.replace(/
/g,"\n"))):e.label=t.text.replace(/
/g,"\n")),a.setEdge(t.start,t.end,e,i)})},i=e.getClasses=function(t,e){var n=void 0;Y.default.clear(),(n=e?A.default.parser:T.default.parser).yy=Y.default,n.parse(t);var r=Y.default.getClasses();return void 0===r.default&&(r.default={id:"default"},r.default.styles=[],r.default.clusterStyles=["rx:4px","fill: rgb(255, 255, 222)","rx: 4px","stroke: rgb(170, 170, 51)","stroke-width: 1px"],r.default.nodeLabelStyles=["fill:#000","stroke:none","font-weight:300",'font-family:"Helvetica Neue",Helvetica,Arial,sans-serf',"font-size:14px"],r.default.edgeLabelStyles=["fill:#000","stroke:none","font-weight:300",'font-family:"Helvetica Neue",Helvetica,Arial,sans-serf',"font-size:14px"]),r},s=e.draw=function(t,e,n){j.logger.debug("Drawing flowchart");var r=void 0;Y.default.clear(),(r=n?A.default.parser:T.default.parser).yy=Y.default;try{r.parse(t)}catch(t){j.logger.debug("Parsing failed")}var a=Y.default.getDirection();void 0===a&&(a="TD");for(var i=new E.default.graphlib.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:a,marginx:20,marginy:20}).setDefaultEdgeLabel(function(){return{}}),s=void 0,o=Y.default.getSubGraphs(),u=o.length-1;0<=u;u--)s=o[u],Y.default.addVertex(s.id,s.title,"group",void 0);var l=Y.default.getVertices(),c=Y.default.getEdges(),d=0;for(d=o.length-1;0<=d;d--){s=o[d],S.default.selectAll("cluster").append("text");for(var h=0;hMath.abs(a)*o?(i<0&&(o=-o),u=0===i?0:o*a/i,l=o):(a<0&&(s=-s),u=s,l=0===a?0:s*i/a),{x:n+u,y:r+l}}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var a=r(n(1)),i=r(n(11)),s=r(n(5)),o=r(n(12)),u=r(n(14)),l=r(n(0)),c=n(27);e.default={d3:a.default,graphlib:i.default,dagre:s.default,intersect:o.default,render:u.default,util:l.default,version:c.version}},function(t,e){t.exports=n(29)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var a=r(n(6)),i=r(n(7)),s=r(n(3)),o=r(n(8)),u=r(n(9));e.default={node:a.default,circle:i.default,ellipse:s.default,polygon:o.default,rect:u.default}},function(t,e,n){"use strict";function y(t,e){return 0g.width?(l.remove(),s=t.append("g"),c=(l=m.default.drawText(s,u,2*i.width-g.noteMargin))[0][0].getBBox().height,o.attr("width",2*i.width),v.insert(e,n,e+2*i.width,n+2*g.noteMargin+c)):v.insert(e,n,e+i.width,n+2*g.noteMargin+c),o.attr("height",c+2*g.noteMargin),v.bumpVerticalPos(c+2*g.noteMargin)},k=e.drawActors=function(t,e,n,r){for(var a=0;an&&(r.starty=n-6,n+=12),m.default.drawActivation(d,r,n,g),v.insert(r.startx,n-10,r.stopx,n);break;case y.parser.yy.LINETYPE.LOOP_START:v.bumpVerticalPos(g.boxMargin),v.newLoop(t.message),v.bumpVerticalPos(g.boxMargin+g.boxTextMargin);break;case y.parser.yy.LINETYPE.LOOP_END:a=v.endLoop(),m.default.drawLoop(d,a,"loop",g),v.bumpVerticalPos(g.boxMargin);break;case y.parser.yy.LINETYPE.OPT_START:v.bumpVerticalPos(g.boxMargin),v.newLoop(t.message),v.bumpVerticalPos(g.boxMargin+g.boxTextMargin);break;case y.parser.yy.LINETYPE.OPT_END:a=v.endLoop(),m.default.drawLoop(d,a,"opt",g),v.bumpVerticalPos(g.boxMargin);break;case y.parser.yy.LINETYPE.ALT_START:v.bumpVerticalPos(g.boxMargin),v.newLoop(t.message),v.bumpVerticalPos(g.boxMargin+g.boxTextMargin);break;case y.parser.yy.LINETYPE.ALT_ELSE:v.bumpVerticalPos(g.boxMargin),a=v.addSectionToLoop(t.message),v.bumpVerticalPos(g.boxMargin);break;case y.parser.yy.LINETYPE.ALT_END:a=v.endLoop(),m.default.drawLoop(d,a,"alt",g),v.bumpVerticalPos(g.boxMargin);break;case y.parser.yy.LINETYPE.PAR_START:v.bumpVerticalPos(g.boxMargin),v.newLoop(t.message),v.bumpVerticalPos(g.boxMargin+g.boxTextMargin);break;case y.parser.yy.LINETYPE.PAR_AND:v.bumpVerticalPos(g.boxMargin),a=v.addSectionToLoop(t.message),v.bumpVerticalPos(g.boxMargin);break;case y.parser.yy.LINETYPE.PAR_END:a=v.endLoop(),m.default.drawLoop(d,a,"par",g),v.bumpVerticalPos(g.boxMargin);break;default:try{v.bumpVerticalPos(g.messageMargin);var i=b(t.from),s=b(t.to),o=i[0]<=s[0]?1:0,u=i[0]/gi," "),a=t.append("text");a.attr("x",e.x),a.attr("y",e.y),a.style("text-anchor",e.anchor),a.attr("fill",e.fill),void 0!==e.class&&a.attr("class",e.class);var i=a.append("tspan");return i.attr("x",e.x+2*e.textMargin),i.attr("fill",e.fill),i.text(r),void 0!==a.textwrap&&a.textwrap({x:e.x,y:e.y,width:n,height:1800},e.textMargin),a},o=e.drawLabel=function(t,e){var n,r,a,i,s,o=t.append("polygon");o.attr("points",(n=e.x,r=e.y,n+","+r+" "+(n+(a=50))+","+r+" "+(n+a)+","+(r+(i=20)-(s=7))+" "+(n+a-1.2*s)+","+(r+i)+" "+n+","+(r+i))),o.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,l(t,e)},c=-1,r=e.drawActor=function(t,e,n,r,a){var i=e+a.width/2,s=t.append("g");0===n&&(c++,s.append("line").attr("id","actor"+c).attr("x1",i).attr("y1",5).attr("x2",i).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999"));var o=_();o.x=e,o.y=n,o.fill="#eaeaea",o.width=a.width,o.height=a.height,o.class="actor",o.rx=3,o.ry=3,u(s,o),p(a)(r,s,o.x,o.y,o.width,o.height,{class:"actor"})},a=e.anchorElement=function(t){return t.append("g")},i=e.drawActivation=function(t,e,n){var r=_(),a=e.anchored;r.x=e.startx,r.y=e.starty,r.fill="#f4f4f4",r.width=e.stopx-e.startx,r.height=n-e.starty,u(a,r)},s=e.drawLoop=function(t,n,e,r){var a=t.append("g"),i=function(t,e,n,r){return a.append("line").attr("x1",t).attr("y1",e).attr("x2",n).attr("y2",r).attr("class","loopLine")};i(n.startx,n.starty,n.stopx,n.starty),i(n.stopx,n.starty,n.stopx,n.stopy),i(n.startx,n.stopy,n.stopx,n.stopy),i(n.startx,n.starty,n.startx,n.stopy),void 0!==n.sections&&n.sections.forEach(function(t){i(n.startx,t,n.stopx,t).style("stroke-dasharray","3, 3")});var s=f();s.text=e,s.x=n.startx,s.y=n.starty,s.labelMargin=15,s.class="labelText",o(a,s),(s=f()).text="[ "+n.title+" ]",s.x=n.startx+(n.stopx-n.startx)/2,s.y=n.starty+1.5*r.boxMargin,s.anchor="middle",s.class="loopText",l(a,s),void 0!==n.sectionTitles&&n.sectionTitles.forEach(function(t,e){""!==t&&(s.text="[ "+t+" ]",s.y=n.sections[e]+1.5*r.boxMargin,l(a,s))})},d=e.insertArrowHead=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},h=e.insertArrowCrossHead=function(t){var e=t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);e.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),e.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},f=e.getTextObj=function(){return{x:0,y:0,fill:"black","text-anchor":"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0}},_=e.getNoteRect=function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},p=function(){function e(t,e,n,r,a,i,s){c(e.append("text").attr("x",n+a/2).attr("y",r+i/2+5).style("text-anchor","middle").text(t),s)}function l(t,e,n,r,a,i,s){var o=e.append("text").attr("x",n+a/2).attr("y",r).style("text-anchor","middle");if(o.append("tspan").attr("x",n+a/2).attr("dy","0").text(t),void 0!==o.textwrap){o.textwrap({x:n+a/2,y:r,width:a,height:i},0);var u=o.selectAll("tspan");0o?e+a-5:n+a+5:(n-e)/2+e+a}).attr("y",function(t,e){return e*n+y.barHeight/2+(y.fontSize/2-2)+r}).attr("text-height",e).attr("class",function(t){for(var e=h(t.startTime),n=h(t.endTime),r=this.getBBox().width,a=0,i=0;io?"taskTextOutsideLeft taskTextOutside"+a+" "+s:"taskTextOutsideRight taskTextOutside"+a+" "+s:"taskText taskText"+a+" "+s})}(t,a,i,s,r,0,e),function(r,a){for(var i=[],s=0,t=0;t "+t.w+": "+JSON.stringify(a.edge(t))),function(t,e,n){var r=function(t){switch(t){case y.default.relationType.AGGREGATION:return"aggregation";case y.default.relationType.EXTENSION:return"extension";case y.default.relationType.COMPOSITION:return"composition";case y.default.relationType.DEPENDENCY:return"dependency"}},a=e.points,i=g.default.svg.line().x(function(t){return t.x}).y(function(t){return t.y}).interpolate("basis"),s=t.append("path").attr("d",i(a)).attr("id","edge"+M).attr("class","relation"),o="";v.arrowMarkerAbsolute&&(o=(o=(o=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),"none"!==n.relation.type1&&s.attr("marker-start","url("+o+"#"+r(n.relation.type1)+"Start)"),"none"!==n.relation.type2&&s.attr("marker-end","url("+o+"#"+r(n.relation.type2)+"End)");var u=void 0,l=void 0,c=e.points.length;if(c%2!=0){var d=e.points[Math.floor(c/2)],h=e.points[Math.ceil(c/2)];u=(d.x+h.x)/2,l=(d.y+h.y)/2}else{var f=e.points[Math.floor(c/2)];u=f.x,l=f.y}if(void 0!==n.title){var _=t.append("g").attr("class","classLabel"),p=_.append("text").attr("class","label").attr("x",u).attr("y",l).attr("fill","red").attr("text-anchor","middle").text(n.title),m=(window.label=p).node().getBBox();_.insert("rect",":first-child").attr("class","box").attr("x",m.x-v.padding/2).attr("y",m.y-v.padding/2).attr("width",m.width+v.padding).attr("height",m.height+v.padding)}M++}(r,a.edge(t),a.edge(t).relation)}),r.attr("height","100%"),r.attr("width","100%"),r.attr("viewBox","0 0 "+(a.graph().width+20)+" "+(a.graph().height+20))};e.default={setConf:a,draw:i}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.draw=e.setConf=void 0;var u=r(n(177)),l=r(n(245)),c=r(n(2)),d=r(n(265)),h=r(n(327)),f=r(n(201)),_=r(n(176)),p=r(n(6)),m=n(1);function r(t){return t&&t.__esModule?t:{default:t}}var y={},g=void 0,v={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}},M={},a=e.setConf=function(t){M=t};function k(t,e,n,r){r=r||"basis";var a=v.branchColors[n%v.branchColors.length],i=p.default.svg.line().x(function(t){return Math.round(t.x)}).y(function(t){return Math.round(t.y)}).interpolate(r);t.append("svg:path").attr("d",i(e)).style("stroke",a).style("stroke-width",v.lineStrokeWidth).style("fill","none")}function b(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 L(t,e,n,r,a){m.logger.debug("svgDrawLineForCommits: ",e,n);var i=b(t.select("#node-"+e+" circle")),s=b(t.select("#node-"+n+" circle"));switch(r){case"LR":if(i.left-s.left>v.nodeSpacing){var o={x:i.left-v.nodeSpacing,y:s.top+s.height/2};k(t,[o,{x:s.left+s.width,y:s.top+s.height/2}],a,"linear"),k(t,[{x:i.left,y:i.top+i.height/2},{x:i.left-v.nodeSpacing/2,y:i.top+i.height/2},{x:i.left-v.nodeSpacing/2,y:o.y},o],a)}else k(t,[{x:i.left,y:i.top+i.height/2},{x:i.left-v.nodeSpacing/2,y:i.top+i.height/2},{x:i.left-v.nodeSpacing/2,y:s.top+s.height/2},{x:s.left+s.width,y:s.top+s.height/2}],a);break;case"BT":if(s.top-i.top>v.nodeSpacing){var u={x:s.left+s.width/2,y:i.top+i.height+v.nodeSpacing};k(t,[u,{x:s.left+s.width/2,y:s.top}],a,"linear"),k(t,[{x:i.left+i.width/2,y:i.top+i.height},{x:i.left+i.width/2,y:i.top+i.height+v.nodeSpacing/2},{x:s.left+s.width/2,y:u.y-v.nodeSpacing/2},u],a)}else k(t,[{x:i.left+i.width/2,y:i.top+i.height},{x:i.left+i.width/2,y:i.top+v.nodeSpacing/2},{x:s.left+s.width/2,y:s.top-v.nodeSpacing/2},{x:s.left+s.width/2,y:s.top}],a)}}var i=e.draw=function(t,e,n){try{var r=_.default.parser;r.yy=f.default,m.logger.debug("in gitgraph renderer",t,e,n),r.parse(t+"\n"),v=(0,l.default)(v,M,f.default.getOptions()),m.logger.debug("effective options",v);var a=f.default.getDirection();y=f.default.getCommits();var i=f.default.getBranchesAsObjArray();"BT"===a&&(v.nodeLabel.x=i.length*v.branchOffset,v.nodeLabel.width="100%",v.nodeLabel.y=-2*v.nodeRadius);var s=p.default.select("#"+e);(o=s).append("defs").append("g").attr("id","def-commit").append("circle").attr("r",v.nodeRadius).attr("cx",0).attr("cy",0),o.select("#def-commit").append("foreignObject").attr("width",v.nodeLabel.width).attr("height",v.nodeLabel.height).attr("x",v.nodeLabel.x).attr("y",v.nodeLabel.y).attr("class","node-label").attr("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility").append("xhtml:p").html(""),g=1,(0,u.default)(i,function(t){!function t(e,n,r,a){var i=void 0,s=Object.keys(y).length;if((0,h.default)(n))do{if(i=y[n],m.logger.debug("in renderCommitHistory",i.id,i.seq),0=i)return arguments[0]}else r=0;return n.apply(void 0,arguments)}}},function(t,e,n){var a=n(22),i=n(13),s=n(31),o=n(14);t.exports=function(t,e,n){if(!o(n))return!1;var r=typeof e;return!!("number"==r?i(n)&&s(e,n.length):"string"==r&&e in n)&&a(n[e],t)}},function(t,e,n){var r=n(179),a=n(263),i=n(13);t.exports=function(t){return i(t)?r(t,!0):a(t)}},function(t,e,n){var a=n(14),i=n(185),s=n(264),o=Object.prototype.hasOwnProperty;t.exports=function(t){if(!a(t))return s(t);var e=i(t),n=[];for(var r in t)("constructor"!=r||!e&&o.call(t,r))&&n.push(r);return n}},function(t,e){t.exports=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}},function(t,e,n){var r=n(266)(n(323));t.exports=r},function(t,e,n){var o=n(15),u=n(13),l=n(20);t.exports=function(s){return function(t,e,n){var r=Object(t);if(!u(t)){var a=o(e,3);t=l(t),e=function(t){return a(r[t],t,r)}}var i=s(t,e,n);return-1