EVOLUTION-MANAGER
Edit File: printing.html
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta name="generator" content="pandoc" /> <meta http-equiv="X-UA-Compatible" content="IE=EDGE" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <title>Printing a tibble: Control and data flow</title> <script>// Pandoc 2.9 adds attributes on both header and div. We remove the former (to // be compatible with the behavior of Pandoc < 2.8). document.addEventListener('DOMContentLoaded', function(e) { var hs = document.querySelectorAll("div.section[class*='level'] > :first-child"); var i, h, a; for (i = 0; i < hs.length; i++) { h = hs[i]; if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6 a = h.attributes; while (a.length > 0) h.removeAttribute(a[0].name); } }); </script> <script>(function() { // If window.HTMLWidgets is already defined, then use it; otherwise create a // new object. This allows preceding code to set options that affect the // initialization process (though none currently exist). window.HTMLWidgets = window.HTMLWidgets || {}; // See if we're running in a viewer pane. If not, we're in a web browser. var viewerMode = window.HTMLWidgets.viewerMode = /\bviewer_pane=1\b/.test(window.location); // See if we're running in Shiny mode. If not, it's a static document. // Note that static widgets can appear in both Shiny and static modes, but // obviously, Shiny widgets can only appear in Shiny apps/documents. var shinyMode = window.HTMLWidgets.shinyMode = typeof(window.Shiny) !== "undefined" && !!window.Shiny.outputBindings; // We can't count on jQuery being available, so we implement our own // version if necessary. function querySelectorAll(scope, selector) { if (typeof(jQuery) !== "undefined" && scope instanceof jQuery) { return scope.find(selector); } if (scope.querySelectorAll) { return scope.querySelectorAll(selector); } } function asArray(value) { if (value === null) return []; if ($.isArray(value)) return value; return [value]; } // Implement jQuery's extend function extend(target /*, ... */) { if (arguments.length == 1) { return target; } for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var prop in source) { if (source.hasOwnProperty(prop)) { target[prop] = source[prop]; } } } return target; } // IE8 doesn't support Array.forEach. function forEach(values, callback, thisArg) { if (values.forEach) { values.forEach(callback, thisArg); } else { for (var i = 0; i < values.length; i++) { callback.call(thisArg, values[i], i, values); } } } // Replaces the specified method with the return value of funcSource. // // Note that funcSource should not BE the new method, it should be a function // that RETURNS the new method. funcSource receives a single argument that is // the overridden method, it can be called from the new method. The overridden // method can be called like a regular function, it has the target permanently // bound to it so "this" will work correctly. function overrideMethod(target, methodName, funcSource) { var superFunc = target[methodName] || function() {}; var superFuncBound = function() { return superFunc.apply(target, arguments); }; target[methodName] = funcSource(superFuncBound); } // Add a method to delegator that, when invoked, calls // delegatee.methodName. If there is no such method on // the delegatee, but there was one on delegator before // delegateMethod was called, then the original version // is invoked instead. // For example: // // var a = { // method1: function() { console.log('a1'); } // method2: function() { console.log('a2'); } // }; // var b = { // method1: function() { console.log('b1'); } // }; // delegateMethod(a, b, "method1"); // delegateMethod(a, b, "method2"); // a.method1(); // a.method2(); // // The output would be "b1", "a2". function delegateMethod(delegator, delegatee, methodName) { var inherited = delegator[methodName]; delegator[methodName] = function() { var target = delegatee; var method = delegatee[methodName]; // The method doesn't exist on the delegatee. Instead, // call the method on the delegator, if it exists. if (!method) { target = delegator; method = inherited; } if (method) { return method.apply(target, arguments); } }; } // Implement a vague facsimilie of jQuery's data method function elementData(el, name, value) { if (arguments.length == 2) { return el["htmlwidget_data_" + name]; } else if (arguments.length == 3) { el["htmlwidget_data_" + name] = value; return el; } else { throw new Error("Wrong number of arguments for elementData: " + arguments.length); } } // http://stackoverflow.com/questions/3446170/escape-string-for-use-in-javascript-regex function escapeRegExp(str) { return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); } function hasClass(el, className) { var re = new RegExp("\\b" + escapeRegExp(className) + "\\b"); return re.test(el.className); } // elements - array (or array-like object) of HTML elements // className - class name to test for // include - if true, only return elements with given className; // if false, only return elements *without* given className function filterByClass(elements, className, include) { var results = []; for (var i = 0; i < elements.length; i++) { if (hasClass(elements[i], className) == include) results.push(elements[i]); } return results; } function on(obj, eventName, func) { if (obj.addEventListener) { obj.addEventListener(eventName, func, false); } else if (obj.attachEvent) { obj.attachEvent(eventName, func); } } function off(obj, eventName, func) { if (obj.removeEventListener) obj.removeEventListener(eventName, func, false); else if (obj.detachEvent) { obj.detachEvent(eventName, func); } } // Translate array of values to top/right/bottom/left, as usual with // the "padding" CSS property // https://developer.mozilla.org/en-US/docs/Web/CSS/padding function unpackPadding(value) { if (typeof(value) === "number") value = [value]; if (value.length === 1) { return {top: value[0], right: value[0], bottom: value[0], left: value[0]}; } if (value.length === 2) { return {top: value[0], right: value[1], bottom: value[0], left: value[1]}; } if (value.length === 3) { return {top: value[0], right: value[1], bottom: value[2], left: value[1]}; } if (value.length === 4) { return {top: value[0], right: value[1], bottom: value[2], left: value[3]}; } } // Convert an unpacked padding object to a CSS value function paddingToCss(paddingObj) { return paddingObj.top + "px " + paddingObj.right + "px " + paddingObj.bottom + "px " + paddingObj.left + "px"; } // Makes a number suitable for CSS function px(x) { if (typeof(x) === "number") return x + "px"; else return x; } // Retrieves runtime widget sizing information for an element. // The return value is either null, or an object with fill, padding, // defaultWidth, defaultHeight fields. function sizingPolicy(el) { var sizingEl = document.querySelector("script[data-for='" + el.id + "'][type='application/htmlwidget-sizing']"); if (!sizingEl) return null; var sp = JSON.parse(sizingEl.textContent || sizingEl.text || "{}"); if (viewerMode) { return sp.viewer; } else { return sp.browser; } } // @param tasks Array of strings (or falsy value, in which case no-op). // Each element must be a valid JavaScript expression that yields a // function. Or, can be an array of objects with "code" and "data" // properties; in this case, the "code" property should be a string // of JS that's an expr that yields a function, and "data" should be // an object that will be added as an additional argument when that // function is called. // @param target The object that will be "this" for each function // execution. // @param args Array of arguments to be passed to the functions. (The // same arguments will be passed to all functions.) function evalAndRun(tasks, target, args) { if (tasks) { forEach(tasks, function(task) { var theseArgs = args; if (typeof(task) === "object") { theseArgs = theseArgs.concat([task.data]); task = task.code; } var taskFunc = tryEval(task); if (typeof(taskFunc) !== "function") { throw new Error("Task must be a function! Source:\n" + task); } taskFunc.apply(target, theseArgs); }); } } // Attempt eval() both with and without enclosing in parentheses. // Note that enclosing coerces a function declaration into // an expression that eval() can parse // (otherwise, a SyntaxError is thrown) function tryEval(code) { var result = null; try { result = eval("(" + code + ")"); } catch(error) { if (!(error instanceof SyntaxError)) { throw error; } try { result = eval(code); } catch(e) { if (e instanceof SyntaxError) { throw error; } else { throw e; } } } return result; } function initSizing(el) { var sizing = sizingPolicy(el); if (!sizing) return; var cel = document.getElementById("htmlwidget_container"); if (!cel) return; if (typeof(sizing.padding) !== "undefined") { document.body.style.margin = "0"; document.body.style.padding = paddingToCss(unpackPadding(sizing.padding)); } if (sizing.fill) { document.body.style.overflow = "hidden"; document.body.style.width = "100%"; document.body.style.height = "100%"; document.documentElement.style.width = "100%"; document.documentElement.style.height = "100%"; if (cel) { cel.style.position = "absolute"; var pad = unpackPadding(sizing.padding); cel.style.top = pad.top + "px"; cel.style.right = pad.right + "px"; cel.style.bottom = pad.bottom + "px"; cel.style.left = pad.left + "px"; el.style.width = "100%"; el.style.height = "100%"; } return { getWidth: function() { return cel.offsetWidth; }, getHeight: function() { return cel.offsetHeight; } }; } else { el.style.width = px(sizing.width); el.style.height = px(sizing.height); return { getWidth: function() { return el.offsetWidth; }, getHeight: function() { return el.offsetHeight; } }; } } // Default implementations for methods var defaults = { find: function(scope) { return querySelectorAll(scope, "." + this.name); }, renderError: function(el, err) { var $el = $(el); this.clearError(el); // Add all these error classes, as Shiny does var errClass = "shiny-output-error"; if (err.type !== null) { // use the classes of the error condition as CSS class names errClass = errClass + " " + $.map(asArray(err.type), function(type) { return errClass + "-" + type; }).join(" "); } errClass = errClass + " htmlwidgets-error"; // Is el inline or block? If inline or inline-block, just display:none it // and add an inline error. var display = $el.css("display"); $el.data("restore-display-mode", display); if (display === "inline" || display === "inline-block") { $el.hide(); if (err.message !== "") { var errorSpan = $("<span>").addClass(errClass); errorSpan.text(err.message); $el.after(errorSpan); } } else if (display === "block") { // If block, add an error just after the el, set visibility:none on the // el, and position the error to be on top of the el. // Mark it with a unique ID and CSS class so we can remove it later. $el.css("visibility", "hidden"); if (err.message !== "") { var errorDiv = $("<div>").addClass(errClass).css("position", "absolute") .css("top", el.offsetTop) .css("left", el.offsetLeft) // setting width can push out the page size, forcing otherwise // unnecessary scrollbars to appear and making it impossible for // the element to shrink; so use max-width instead .css("maxWidth", el.offsetWidth) .css("height", el.offsetHeight); errorDiv.text(err.message); $el.after(errorDiv); // Really dumb way to keep the size/position of the error in sync with // the parent element as the window is resized or whatever. var intId = setInterval(function() { if (!errorDiv[0].parentElement) { clearInterval(intId); return; } errorDiv .css("top", el.offsetTop) .css("left", el.offsetLeft) .css("maxWidth", el.offsetWidth) .css("height", el.offsetHeight); }, 500); } } }, clearError: function(el) { var $el = $(el); var display = $el.data("restore-display-mode"); $el.data("restore-display-mode", null); if (display === "inline" || display === "inline-block") { if (display) $el.css("display", display); $(el.nextSibling).filter(".htmlwidgets-error").remove(); } else if (display === "block"){ $el.css("visibility", "inherit"); $(el.nextSibling).filter(".htmlwidgets-error").remove(); } }, sizing: {} }; // Called by widget bindings to register a new type of widget. The definition // object can contain the following properties: // - name (required) - A string indicating the binding name, which will be // used by default as the CSS classname to look for. // - initialize (optional) - A function(el) that will be called once per // widget element; if a value is returned, it will be passed as the third // value to renderValue. // - renderValue (required) - A function(el, data, initValue) that will be // called with data. Static contexts will cause this to be called once per // element; Shiny apps will cause this to be called multiple times per // element, as the data changes. window.HTMLWidgets.widget = function(definition) { if (!definition.name) { throw new Error("Widget must have a name"); } if (!definition.type) { throw new Error("Widget must have a type"); } // Currently we only support output widgets if (definition.type !== "output") { throw new Error("Unrecognized widget type '" + definition.type + "'"); } // TODO: Verify that .name is a valid CSS classname // Support new-style instance-bound definitions. Old-style class-bound // definitions have one widget "object" per widget per type/class of // widget; the renderValue and resize methods on such widget objects // take el and instance arguments, because the widget object can't // store them. New-style instance-bound definitions have one widget // object per widget instance; the definition that's passed in doesn't // provide renderValue or resize methods at all, just the single method // factory(el, width, height) // which returns an object that has renderValue(x) and resize(w, h). // This enables a far more natural programming style for the widget // author, who can store per-instance state using either OO-style // instance fields or functional-style closure variables (I guess this // is in contrast to what can only be called C-style pseudo-OO which is // what we required before). if (definition.factory) { definition = createLegacyDefinitionAdapter(definition); } if (!definition.renderValue) { throw new Error("Widget must have a renderValue function"); } // For static rendering (non-Shiny), use a simple widget registration // scheme. We also use this scheme for Shiny apps/documents that also // contain static widgets. window.HTMLWidgets.widgets = window.HTMLWidgets.widgets || []; // Merge defaults into the definition; don't mutate the original definition. var staticBinding = extend({}, defaults, definition); overrideMethod(staticBinding, "find", function(superfunc) { return function(scope) { var results = superfunc(scope); // Filter out Shiny outputs, we only want the static kind return filterByClass(results, "html-widget-output", false); }; }); window.HTMLWidgets.widgets.push(staticBinding); if (shinyMode) { // Shiny is running. Register the definition with an output binding. // The definition itself will not be the output binding, instead // we will make an output binding object that delegates to the // definition. This is because we foolishly used the same method // name (renderValue) for htmlwidgets definition and Shiny bindings // but they actually have quite different semantics (the Shiny // bindings receive data that includes lots of metadata that it // strips off before calling htmlwidgets renderValue). We can't // just ignore the difference because in some widgets it's helpful // to call this.renderValue() from inside of resize(), and if // we're not delegating, then that call will go to the Shiny // version instead of the htmlwidgets version. // Merge defaults with definition, without mutating either. var bindingDef = extend({}, defaults, definition); // This object will be our actual Shiny binding. var shinyBinding = new Shiny.OutputBinding(); // With a few exceptions, we'll want to simply use the bindingDef's // version of methods if they are available, otherwise fall back to // Shiny's defaults. NOTE: If Shiny's output bindings gain additional // methods in the future, and we want them to be overrideable by // HTMLWidget binding definitions, then we'll need to add them to this // list. delegateMethod(shinyBinding, bindingDef, "getId"); delegateMethod(shinyBinding, bindingDef, "onValueChange"); delegateMethod(shinyBinding, bindingDef, "onValueError"); delegateMethod(shinyBinding, bindingDef, "renderError"); delegateMethod(shinyBinding, bindingDef, "clearError"); delegateMethod(shinyBinding, bindingDef, "showProgress"); // The find, renderValue, and resize are handled differently, because we // want to actually decorate the behavior of the bindingDef methods. shinyBinding.find = function(scope) { var results = bindingDef.find(scope); // Only return elements that are Shiny outputs, not static ones var dynamicResults = results.filter(".html-widget-output"); // It's possible that whatever caused Shiny to think there might be // new dynamic outputs, also caused there to be new static outputs. // Since there might be lots of different htmlwidgets bindings, we // schedule execution for later--no need to staticRender multiple // times. if (results.length !== dynamicResults.length) scheduleStaticRender(); return dynamicResults; }; // Wrap renderValue to handle initialization, which unfortunately isn't // supported natively by Shiny at the time of this writing. shinyBinding.renderValue = function(el, data) { Shiny.renderDependencies(data.deps); // Resolve strings marked as javascript literals to objects if (!(data.evals instanceof Array)) data.evals = [data.evals]; for (var i = 0; data.evals && i < data.evals.length; i++) { window.HTMLWidgets.evaluateStringMember(data.x, data.evals[i]); } if (!bindingDef.renderOnNullValue) { if (data.x === null) { el.style.visibility = "hidden"; return; } else { el.style.visibility = "inherit"; } } if (!elementData(el, "initialized")) { initSizing(el); elementData(el, "initialized", true); if (bindingDef.initialize) { var result = bindingDef.initialize(el, el.offsetWidth, el.offsetHeight); elementData(el, "init_result", result); } } bindingDef.renderValue(el, data.x, elementData(el, "init_result")); evalAndRun(data.jsHooks.render, elementData(el, "init_result"), [el, data.x]); }; // Only override resize if bindingDef implements it if (bindingDef.resize) { shinyBinding.resize = function(el, width, height) { // Shiny can call resize before initialize/renderValue have been // called, which doesn't make sense for widgets. if (elementData(el, "initialized")) { bindingDef.resize(el, width, height, elementData(el, "init_result")); } }; } Shiny.outputBindings.register(shinyBinding, bindingDef.name); } }; var scheduleStaticRenderTimerId = null; function scheduleStaticRender() { if (!scheduleStaticRenderTimerId) { scheduleStaticRenderTimerId = setTimeout(function() { scheduleStaticRenderTimerId = null; window.HTMLWidgets.staticRender(); }, 1); } } // Render static widgets after the document finishes loading // Statically render all elements that are of this widget's class window.HTMLWidgets.staticRender = function() { var bindings = window.HTMLWidgets.widgets || []; forEach(bindings, function(binding) { var matches = binding.find(document.documentElement); forEach(matches, function(el) { var sizeObj = initSizing(el, binding); if (hasClass(el, "html-widget-static-bound")) return; el.className = el.className + " html-widget-static-bound"; var initResult; if (binding.initialize) { initResult = binding.initialize(el, sizeObj ? sizeObj.getWidth() : el.offsetWidth, sizeObj ? sizeObj.getHeight() : el.offsetHeight ); elementData(el, "init_result", initResult); } if (binding.resize) { var lastSize = { w: sizeObj ? sizeObj.getWidth() : el.offsetWidth, h: sizeObj ? sizeObj.getHeight() : el.offsetHeight }; var resizeHandler = function(e) { var size = { w: sizeObj ? sizeObj.getWidth() : el.offsetWidth, h: sizeObj ? sizeObj.getHeight() : el.offsetHeight }; if (size.w === 0 && size.h === 0) return; if (size.w === lastSize.w && size.h === lastSize.h) return; lastSize = size; binding.resize(el, size.w, size.h, initResult); }; on(window, "resize", resizeHandler); // This is needed for cases where we're running in a Shiny // app, but the widget itself is not a Shiny output, but // rather a simple static widget. One example of this is // an rmarkdown document that has runtime:shiny and widget // that isn't in a render function. Shiny only knows to // call resize handlers for Shiny outputs, not for static // widgets, so we do it ourselves. if (window.jQuery) { window.jQuery(document).on( "shown.htmlwidgets shown.bs.tab.htmlwidgets shown.bs.collapse.htmlwidgets", resizeHandler ); window.jQuery(document).on( "hidden.htmlwidgets hidden.bs.tab.htmlwidgets hidden.bs.collapse.htmlwidgets", resizeHandler ); } // This is needed for the specific case of ioslides, which // flips slides between display:none and display:block. // Ideally we would not have to have ioslide-specific code // here, but rather have ioslides raise a generic event, // but the rmarkdown package just went to CRAN so the // window to getting that fixed may be long. if (window.addEventListener) { // It's OK to limit this to window.addEventListener // browsers because ioslides itself only supports // such browsers. on(document, "slideenter", resizeHandler); on(document, "slideleave", resizeHandler); } } var scriptData = document.querySelector("script[data-for='" + el.id + "'][type='application/json']"); if (scriptData) { var data = JSON.parse(scriptData.textContent || scriptData.text); // Resolve strings marked as javascript literals to objects if (!(data.evals instanceof Array)) data.evals = [data.evals]; for (var k = 0; data.evals && k < data.evals.length; k++) { window.HTMLWidgets.evaluateStringMember(data.x, data.evals[k]); } binding.renderValue(el, data.x, initResult); evalAndRun(data.jsHooks.render, initResult, [el, data.x]); } }); }); invokePostRenderHandlers(); } function has_jQuery3() { if (!window.jQuery) { return false; } var $version = window.jQuery.fn.jquery; var $major_version = parseInt($version.split(".")[0]); return $major_version >= 3; } /* / Shiny 1.4 bumped jQuery from 1.x to 3.x which means jQuery's / on-ready handler (i.e., $(fn)) is now asyncronous (i.e., it now / really means $(setTimeout(fn)). / https://jquery.com/upgrade-guide/3.0/#breaking-change-document-ready-handlers-are-now-asynchronous / / Since Shiny uses $() to schedule initShiny, shiny>=1.4 calls initShiny / one tick later than it did before, which means staticRender() is / called renderValue() earlier than (advanced) widget authors might be expecting. / https://github.com/rstudio/shiny/issues/2630 / / For a concrete example, leaflet has some methods (e.g., updateBounds) / which reference Shiny methods registered in initShiny (e.g., setInputValue). / Since leaflet is privy to this life-cycle, it knows to use setTimeout() to / delay execution of those methods (until Shiny methods are ready) / https://github.com/rstudio/leaflet/blob/18ec981/javascript/src/index.js#L266-L268 / / Ideally widget authors wouldn't need to use this setTimeout() hack that / leaflet uses to call Shiny methods on a staticRender(). In the long run, / the logic initShiny should be broken up so that method registration happens / right away, but binding happens later. */ function maybeStaticRenderLater() { if (shinyMode && has_jQuery3()) { window.jQuery(window.HTMLWidgets.staticRender); } else { window.HTMLWidgets.staticRender(); } } if (document.addEventListener) { document.addEventListener("DOMContentLoaded", function() { document.removeEventListener("DOMContentLoaded", arguments.callee, false); maybeStaticRenderLater(); }, false); } else if (document.attachEvent) { document.attachEvent("onreadystatechange", function() { if (document.readyState === "complete") { document.detachEvent("onreadystatechange", arguments.callee); maybeStaticRenderLater(); } }); } window.HTMLWidgets.getAttachmentUrl = function(depname, key) { // If no key, default to the first item if (typeof(key) === "undefined") key = 1; var link = document.getElementById(depname + "-" + key + "-attachment"); if (!link) { throw new Error("Attachment " + depname + "/" + key + " not found in document"); } return link.getAttribute("href"); }; window.HTMLWidgets.dataframeToD3 = function(df) { var names = []; var length; for (var name in df) { if (df.hasOwnProperty(name)) names.push(name); if (typeof(df[name]) !== "object" || typeof(df[name].length) === "undefined") { throw new Error("All fields must be arrays"); } else if (typeof(length) !== "undefined" && length !== df[name].length) { throw new Error("All fields must be arrays of the same length"); } length = df[name].length; } var results = []; var item; for (var row = 0; row < length; row++) { item = {}; for (var col = 0; col < names.length; col++) { item[names[col]] = df[names[col]][row]; } results.push(item); } return results; }; window.HTMLWidgets.transposeArray2D = function(array) { if (array.length === 0) return array; var newArray = array[0].map(function(col, i) { return array.map(function(row) { return row[i] }) }); return newArray; }; // Split value at splitChar, but allow splitChar to be escaped // using escapeChar. Any other characters escaped by escapeChar // will be included as usual (including escapeChar itself). function splitWithEscape(value, splitChar, escapeChar) { var results = []; var escapeMode = false; var currentResult = ""; for (var pos = 0; pos < value.length; pos++) { if (!escapeMode) { if (value[pos] === splitChar) { results.push(currentResult); currentResult = ""; } else if (value[pos] === escapeChar) { escapeMode = true; } else { currentResult += value[pos]; } } else { currentResult += value[pos]; escapeMode = false; } } if (currentResult !== "") { results.push(currentResult); } return results; } // Function authored by Yihui/JJ Allaire window.HTMLWidgets.evaluateStringMember = function(o, member) { var parts = splitWithEscape(member, '.', '\\'); for (var i = 0, l = parts.length; i < l; i++) { var part = parts[i]; // part may be a character or 'numeric' member name if (o !== null && typeof o === "object" && part in o) { if (i == (l - 1)) { // if we are at the end of the line then evalulate if (typeof o[part] === "string") o[part] = tryEval(o[part]); } else { // otherwise continue to next embedded object o = o[part]; } } } }; // Retrieve the HTMLWidget instance (i.e. the return value of an // HTMLWidget binding's initialize() or factory() function) // associated with an element, or null if none. window.HTMLWidgets.getInstance = function(el) { return elementData(el, "init_result"); }; // Finds the first element in the scope that matches the selector, // and returns the HTMLWidget instance (i.e. the return value of // an HTMLWidget binding's initialize() or factory() function) // associated with that element, if any. If no element matches the // selector, or the first matching element has no HTMLWidget // instance associated with it, then null is returned. // // The scope argument is optional, and defaults to window.document. window.HTMLWidgets.find = function(scope, selector) { if (arguments.length == 1) { selector = scope; scope = document; } var el = scope.querySelector(selector); if (el === null) { return null; } else { return window.HTMLWidgets.getInstance(el); } }; // Finds all elements in the scope that match the selector, and // returns the HTMLWidget instances (i.e. the return values of // an HTMLWidget binding's initialize() or factory() function) // associated with the elements, in an array. If elements that // match the selector don't have an associated HTMLWidget // instance, the returned array will contain nulls. // // The scope argument is optional, and defaults to window.document. window.HTMLWidgets.findAll = function(scope, selector) { if (arguments.length == 1) { selector = scope; scope = document; } var nodes = scope.querySelectorAll(selector); var results = []; for (var i = 0; i < nodes.length; i++) { results.push(window.HTMLWidgets.getInstance(nodes[i])); } return results; }; var postRenderHandlers = []; function invokePostRenderHandlers() { while (postRenderHandlers.length) { var handler = postRenderHandlers.shift(); if (handler) { handler(); } } } // Register the given callback function to be invoked after the // next time static widgets are rendered. window.HTMLWidgets.addPostRenderHandler = function(callback) { postRenderHandlers.push(callback); }; // Takes a new-style instance-bound definition, and returns an // old-style class-bound definition. This saves us from having // to rewrite all the logic in this file to accomodate both // types of definitions. function createLegacyDefinitionAdapter(defn) { var result = { name: defn.name, type: defn.type, initialize: function(el, width, height) { return defn.factory(el, width, height); }, renderValue: function(el, x, instance) { return instance.renderValue(x); }, resize: function(el, width, height, instance) { return instance.resize(width, height); } }; if (defn.find) result.find = defn.find; if (defn.renderError) result.renderError = defn.renderError; if (defn.clearError) result.clearError = defn.clearError; return result; } })(); </script> <script>!function(){function n(n,t){return t>n?-1:n>t?1:n>=t?0:0/0}function t(n){return null===n?0/0:+n}function e(n){return!isNaN(n)}function r(n){return{left:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)<0?r=i+1:u=i}return r},right:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)>0?u=i:r=i+1}return r}}}function u(n){return n.length}function i(n){for(var t=1;n*t%1;)t*=10;return t}function o(n,t){for(var e in t)Object.defineProperty(n.prototype,e,{value:t[e],enumerable:!1})}function a(){this._=Object.create(null)}function c(n){return(n+="")===da||n[0]===ma?ma+n:n}function l(n){return(n+="")[0]===ma?n.slice(1):n}function s(n){return c(n)in this._}function f(n){return(n=c(n))in this._&&delete this._[n]}function h(){var n=[];for(var t in this._)n.push(l(t));return n}function g(){var n=0;for(var t in this._)++n;return n}function p(){for(var n in this._)return!1;return!0}function v(){this._=Object.create(null)}function d(n,t,e){return function(){var r=e.apply(t,arguments);return r===t?n:r}}function m(n,t){if(t in n)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e=0,r=ya.length;r>e;++e){var u=ya[e]+t;if(u in n)return u}}function y(){}function M(){}function x(n){function t(){for(var t,r=e,u=-1,i=r.length;++u<i;)(t=r[u].on)&&t.apply(this,arguments);return n}var e=[],r=new a;return t.on=function(t,u){var i,o=r.get(t);return arguments.length<2?o&&o.on:(o&&(o.on=null,e=e.slice(0,i=e.indexOf(o)).concat(e.slice(i+1)),r.remove(t)),u&&e.push(r.set(t,{on:u})),n)},t}function b(){ta.event.preventDefault()}function _(){for(var n,t=ta.event;n=t.sourceEvent;)t=n;return t}function w(n){for(var t=new M,e=0,r=arguments.length;++e<r;)t[arguments[e]]=x(t);return t.of=function(e,r){return function(u){try{var i=u.sourceEvent=ta.event;u.target=n,ta.event=u,t[u.type].apply(e,r)}finally{ta.event=i}}},t}function S(n){return xa(n,ka),n}function k(n){return"function"==typeof n?n:function(){return ba(n,this)}}function E(n){return"function"==typeof n?n:function(){return _a(n,this)}}function A(n,t){function e(){this.removeAttribute(n)}function r(){this.removeAttributeNS(n.space,n.local)}function u(){this.setAttribute(n,t)}function i(){this.setAttributeNS(n.space,n.local,t)}function o(){var e=t.apply(this,arguments);null==e?this.removeAttribute(n):this.setAttribute(n,e)}function a(){var e=t.apply(this,arguments);null==e?this.removeAttributeNS(n.space,n.local):this.setAttributeNS(n.space,n.local,e)}return n=ta.ns.qualify(n),null==t?n.local?r:e:"function"==typeof t?n.local?a:o:n.local?i:u}function N(n){return n.trim().replace(/\s+/g," ")}function C(n){return new RegExp("(?:^|\\s+)"+ta.requote(n)+"(?:\\s+|$)","g")}function z(n){return(n+"").trim().split(/^|\s+/)}function q(n,t){function e(){for(var e=-1;++e<u;)n[e](this,t)}function r(){for(var e=-1,r=t.apply(this,arguments);++e<u;)n[e](this,r)}n=z(n).map(L);var u=n.length;return"function"==typeof t?r:e}function L(n){var t=C(n);return function(e,r){if(u=e.classList)return r?u.add(n):u.remove(n);var u=e.getAttribute("class")||"";r?(t.lastIndex=0,t.test(u)||e.setAttribute("class",N(u+" "+n))):e.setAttribute("class",N(u.replace(t," ")))}}function T(n,t,e){function r(){this.style.removeProperty(n)}function u(){this.style.setProperty(n,t,e)}function i(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(n):this.style.setProperty(n,r,e)}return null==t?r:"function"==typeof t?i:u}function R(n,t){function e(){delete this[n]}function r(){this[n]=t}function u(){var e=t.apply(this,arguments);null==e?delete this[n]:this[n]=e}return null==t?e:"function"==typeof t?u:r}function D(n){return"function"==typeof n?n:(n=ta.ns.qualify(n)).local?function(){return this.ownerDocument.createElementNS(n.space,n.local)}:function(){return this.ownerDocument.createElementNS(this.namespaceURI,n)}}function P(){var n=this.parentNode;n&&n.removeChild(this)}function U(n){return{__data__:n}}function j(n){return function(){return Sa(this,n)}}function F(t){return arguments.length||(t=n),function(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}}function H(n,t){for(var e=0,r=n.length;r>e;e++)for(var u,i=n[e],o=0,a=i.length;a>o;o++)(u=i[o])&&t(u,o,e);return n}function O(n){return xa(n,Aa),n}function Y(n){var t,e;return function(r,u,i){var o,a=n[i].update,c=a.length;for(i!=e&&(e=i,t=0),u>=t&&(t=u+1);!(o=a[t])&&++t<c;);return o}}function I(n,t,e){function r(){var t=this[o];t&&(this.removeEventListener(n,t,t.$),delete this[o])}function u(){var u=c(t,ra(arguments));r.call(this),this.addEventListener(n,this[o]=u,u.$=e),u._=t}function i(){var t,e=new RegExp("^__on([^.]+)"+ta.requote(n)+"$");for(var r in this)if(t=r.match(e)){var u=this[r];this.removeEventListener(t[1],u,u.$),delete this[r]}}var o="__on"+n,a=n.indexOf("."),c=Z;a>0&&(n=n.slice(0,a));var l=Ca.get(n);return l&&(n=l,c=V),a?t?u:r:t?y:i}function Z(n,t){return function(e){var r=ta.event;ta.event=e,t[0]=this.__data__;try{n.apply(this,t)}finally{ta.event=r}}}function V(n,t){var e=Z(n,t);return function(n){var t=this,r=n.relatedTarget;r&&(r===t||8&r.compareDocumentPosition(t))||e.call(t,n)}}function X(){var n=".dragsuppress-"+ ++qa,t="click"+n,e=ta.select(oa).on("touchmove"+n,b).on("dragstart"+n,b).on("selectstart"+n,b);if(za){var r=ia.style,u=r[za];r[za]="none"}return function(i){if(e.on(n,null),za&&(r[za]=u),i){var o=function(){e.on(t,null)};e.on(t,function(){b(),o()},!0),setTimeout(o,0)}}}function $(n,t){t.changedTouches&&(t=t.changedTouches[0]);var e=n.ownerSVGElement||n;if(e.createSVGPoint){var r=e.createSVGPoint();if(0>La&&(oa.scrollX||oa.scrollY)){e=ta.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var u=e[0][0].getScreenCTM();La=!(u.f||u.e),e.remove()}return La?(r.x=t.pageX,r.y=t.pageY):(r.x=t.clientX,r.y=t.clientY),r=r.matrixTransform(n.getScreenCTM().inverse()),[r.x,r.y]}var i=n.getBoundingClientRect();return[t.clientX-i.left-n.clientLeft,t.clientY-i.top-n.clientTop]}function B(){return ta.event.changedTouches[0].identifier}function W(){return ta.event.target}function J(){return oa}function G(n){return n>0?1:0>n?-1:0}function K(n,t,e){return(t[0]-n[0])*(e[1]-n[1])-(t[1]-n[1])*(e[0]-n[0])}function Q(n){return n>1?0:-1>n?Da:Math.acos(n)}function nt(n){return n>1?ja:-1>n?-ja:Math.asin(n)}function tt(n){return((n=Math.exp(n))-1/n)/2}function et(n){return((n=Math.exp(n))+1/n)/2}function rt(n){return((n=Math.exp(2*n))-1)/(n+1)}function ut(n){return(n=Math.sin(n/2))*n}function it(){}function ot(n,t,e){return this instanceof ot?(this.h=+n,this.s=+t,void(this.l=+e)):arguments.length<2?n instanceof ot?new ot(n.h,n.s,n.l):xt(""+n,bt,ot):new ot(n,t,e)}function at(n,t,e){function r(n){return n>360?n-=360:0>n&&(n+=360),60>n?i+(o-i)*n/60:180>n?o:240>n?i+(o-i)*(240-n)/60:i}function u(n){return Math.round(255*r(n))}var i,o;return n=isNaN(n)?0:(n%=360)<0?n+360:n,t=isNaN(t)?0:0>t?0:t>1?1:t,e=0>e?0:e>1?1:e,o=.5>=e?e*(1+t):e+t-e*t,i=2*e-o,new dt(u(n+120),u(n),u(n-120))}function ct(n,t,e){return this instanceof ct?(this.h=+n,this.c=+t,void(this.l=+e)):arguments.length<2?n instanceof ct?new ct(n.h,n.c,n.l):n instanceof st?ht(n.l,n.a,n.b):ht((n=_t((n=ta.rgb(n)).r,n.g,n.b)).l,n.a,n.b):new ct(n,t,e)}function lt(n,t,e){return isNaN(n)&&(n=0),isNaN(t)&&(t=0),new st(e,Math.cos(n*=Fa)*t,Math.sin(n)*t)}function st(n,t,e){return this instanceof st?(this.l=+n,this.a=+t,void(this.b=+e)):arguments.length<2?n instanceof st?new st(n.l,n.a,n.b):n instanceof ct?lt(n.h,n.c,n.l):_t((n=dt(n)).r,n.g,n.b):new st(n,t,e)}function ft(n,t,e){var r=(n+16)/116,u=r+t/500,i=r-e/200;return u=gt(u)*Ja,r=gt(r)*Ga,i=gt(i)*Ka,new dt(vt(3.2404542*u-1.5371385*r-.4985314*i),vt(-.969266*u+1.8760108*r+.041556*i),vt(.0556434*u-.2040259*r+1.0572252*i))}function ht(n,t,e){return n>0?new ct(Math.atan2(e,t)*Ha,Math.sqrt(t*t+e*e),n):new ct(0/0,0/0,n)}function gt(n){return n>.206893034?n*n*n:(n-4/29)/7.787037}function pt(n){return n>.008856?Math.pow(n,1/3):7.787037*n+4/29}function vt(n){return Math.round(255*(.00304>=n?12.92*n:1.055*Math.pow(n,1/2.4)-.055))}function dt(n,t,e){return this instanceof dt?(this.r=~~n,this.g=~~t,void(this.b=~~e)):arguments.length<2?n instanceof dt?new dt(n.r,n.g,n.b):xt(""+n,dt,at):new dt(n,t,e)}function mt(n){return new dt(n>>16,255&n>>8,255&n)}function yt(n){return mt(n)+""}function Mt(n){return 16>n?"0"+Math.max(0,n).toString(16):Math.min(255,n).toString(16)}function xt(n,t,e){var r,u,i,o=0,a=0,c=0;if(r=/([a-z]+)\((.*)\)/i.exec(n))switch(u=r[2].split(","),r[1]){case"hsl":return e(parseFloat(u[0]),parseFloat(u[1])/100,parseFloat(u[2])/100);case"rgb":return t(St(u[0]),St(u[1]),St(u[2]))}return(i=tc.get(n))?t(i.r,i.g,i.b):(null==n||"#"!==n.charAt(0)||isNaN(i=parseInt(n.slice(1),16))||(4===n.length?(o=(3840&i)>>4,o=o>>4|o,a=240&i,a=a>>4|a,c=15&i,c=c<<4|c):7===n.length&&(o=(16711680&i)>>16,a=(65280&i)>>8,c=255&i)),t(o,a,c))}function bt(n,t,e){var r,u,i=Math.min(n/=255,t/=255,e/=255),o=Math.max(n,t,e),a=o-i,c=(o+i)/2;return a?(u=.5>c?a/(o+i):a/(2-o-i),r=n==o?(t-e)/a+(e>t?6:0):t==o?(e-n)/a+2:(n-t)/a+4,r*=60):(r=0/0,u=c>0&&1>c?0:r),new ot(r,u,c)}function _t(n,t,e){n=wt(n),t=wt(t),e=wt(e);var r=pt((.4124564*n+.3575761*t+.1804375*e)/Ja),u=pt((.2126729*n+.7151522*t+.072175*e)/Ga),i=pt((.0193339*n+.119192*t+.9503041*e)/Ka);return st(116*u-16,500*(r-u),200*(u-i))}function wt(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function St(n){var t=parseFloat(n);return"%"===n.charAt(n.length-1)?Math.round(2.55*t):t}function kt(n){return"function"==typeof n?n:function(){return n}}function Et(n){return n}function At(n){return function(t,e,r){return 2===arguments.length&&"function"==typeof e&&(r=e,e=null),Nt(t,e,n,r)}}function Nt(n,t,e,r){function u(){var n,t=c.status;if(!t&&zt(c)||t>=200&&300>t||304===t){try{n=e.call(i,c)}catch(r){return o.error.call(i,r),void 0}o.load.call(i,n)}else o.error.call(i,c)}var i={},o=ta.dispatch("beforesend","progress","load","error"),a={},c=new XMLHttpRequest,l=null;return!oa.XDomainRequest||"withCredentials"in c||!/^(http(s)?:)?\/\//.test(n)||(c=new XDomainRequest),"onload"in c?c.onload=c.onerror=u:c.onreadystatechange=function(){c.readyState>3&&u()},c.onprogress=function(n){var t=ta.event;ta.event=n;try{o.progress.call(i,c)}finally{ta.event=t}},i.header=function(n,t){return n=(n+"").toLowerCase(),arguments.length<2?a[n]:(null==t?delete a[n]:a[n]=t+"",i)},i.mimeType=function(n){return arguments.length?(t=null==n?null:n+"",i):t},i.responseType=function(n){return arguments.length?(l=n,i):l},i.response=function(n){return e=n,i},["get","post"].forEach(function(n){i[n]=function(){return i.send.apply(i,[n].concat(ra(arguments)))}}),i.send=function(e,r,u){if(2===arguments.length&&"function"==typeof r&&(u=r,r=null),c.open(e,n,!0),null==t||"accept"in a||(a.accept=t+",*/*"),c.setRequestHeader)for(var s in a)c.setRequestHeader(s,a[s]);return null!=t&&c.overrideMimeType&&c.overrideMimeType(t),null!=l&&(c.responseType=l),null!=u&&i.on("error",u).on("load",function(n){u(null,n)}),o.beforesend.call(i,c),c.send(null==r?null:r),i},i.abort=function(){return c.abort(),i},ta.rebind(i,o,"on"),null==r?i:i.get(Ct(r))}function Ct(n){return 1===n.length?function(t,e){n(null==t?e:null)}:n}function zt(n){var t=n.responseType;return t&&"text"!==t?n.response:n.responseText}function qt(){var n=Lt(),t=Tt()-n;t>24?(isFinite(t)&&(clearTimeout(ic),ic=setTimeout(qt,t)),uc=0):(uc=1,ac(qt))}function Lt(){var n=Date.now();for(oc=ec;oc;)n>=oc.t&&(oc.f=oc.c(n-oc.t)),oc=oc.n;return n}function Tt(){for(var n,t=ec,e=1/0;t;)t.f?t=n?n.n=t.n:ec=t.n:(t.t<e&&(e=t.t),t=(n=t).n);return rc=n,e}function Rt(n,t){return t-(n?Math.ceil(Math.log(n)/Math.LN10):1)}function Dt(n,t){var e=Math.pow(10,3*va(8-t));return{scale:t>8?function(n){return n/e}:function(n){return n*e},symbol:n}}function Pt(n){var t=n.decimal,e=n.thousands,r=n.grouping,u=n.currency,i=r&&e?function(n,t){for(var u=n.length,i=[],o=0,a=r[0],c=0;u>0&&a>0&&(c+a+1>t&&(a=Math.max(1,t-c)),i.push(n.substring(u-=a,u+a)),!((c+=a+1)>t));)a=r[o=(o+1)%r.length];return i.reverse().join(e)}:Et;return function(n){var e=lc.exec(n),r=e[1]||" ",o=e[2]||">",a=e[3]||"-",c=e[4]||"",l=e[5],s=+e[6],f=e[7],h=e[8],g=e[9],p=1,v="",d="",m=!1,y=!0;switch(h&&(h=+h.substring(1)),(l||"0"===r&&"="===o)&&(l=r="0",o="="),g){case"n":f=!0,g="g";break;case"%":p=100,d="%",g="f";break;case"p":p=100,d="%",g="r";break;case"b":case"o":case"x":case"X":"#"===c&&(v="0"+g.toLowerCase());case"c":y=!1;case"d":m=!0,h=0;break;case"s":p=-1,g="r"}"$"===c&&(v=u[0],d=u[1]),"r"!=g||h||(g="g"),null!=h&&("g"==g?h=Math.max(1,Math.min(21,h)):("e"==g||"f"==g)&&(h=Math.max(0,Math.min(20,h)))),g=sc.get(g)||Ut;var M=l&&f;return function(n){var e=d;if(m&&n%1)return"";var u=0>n||0===n&&0>1/n?(n=-n,"-"):"-"===a?"":a;if(0>p){var c=ta.formatPrefix(n,h);n=c.scale(n),e=c.symbol+d}else n*=p;n=g(n,h);var x,b,_=n.lastIndexOf(".");if(0>_){var w=y?n.lastIndexOf("e"):-1;0>w?(x=n,b=""):(x=n.substring(0,w),b=n.substring(w))}else x=n.substring(0,_),b=t+n.substring(_+1);!l&&f&&(x=i(x,1/0));var S=v.length+x.length+b.length+(M?0:u.length),k=s>S?new Array(S=s-S+1).join(r):"";return M&&(x=i(k+x,k.length?s-b.length:1/0)),u+=v,n=x+b,("<"===o?u+n+k:">"===o?k+u+n:"^"===o?k.substring(0,S>>=1)+u+n+k.substring(S):u+(M?n:k+n))+e}}}function Ut(n){return n+""}function jt(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Ft(n,t,e){function r(t){var e=n(t),r=i(e,1);return r-t>t-e?e:r}function u(e){return t(e=n(new hc(e-1)),1),e}function i(n,e){return t(n=new hc(+n),e),n}function o(n,r,i){var o=u(n),a=[];if(i>1)for(;r>o;)e(o)%i||a.push(new Date(+o)),t(o,1);else for(;r>o;)a.push(new Date(+o)),t(o,1);return a}function a(n,t,e){try{hc=jt;var r=new jt;return r._=n,o(r,t,e)}finally{hc=Date}}n.floor=n,n.round=r,n.ceil=u,n.offset=i,n.range=o;var c=n.utc=Ht(n);return c.floor=c,c.round=Ht(r),c.ceil=Ht(u),c.offset=Ht(i),c.range=a,n}function Ht(n){return function(t,e){try{hc=jt;var r=new jt;return r._=t,n(r,e)._}finally{hc=Date}}}function Ot(n){function t(n){function t(t){for(var e,u,i,o=[],a=-1,c=0;++a<r;)37===n.charCodeAt(a)&&(o.push(n.slice(c,a)),null!=(u=pc[e=n.charAt(++a)])&&(e=n.charAt(++a)),(i=N[e])&&(e=i(t,null==u?"e"===e?" ":"0":u)),o.push(e),c=a+1);return o.push(n.slice(c,a)),o.join("")}var r=n.length;return t.parse=function(t){var r={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null},u=e(r,n,t,0);if(u!=t.length)return null;"p"in r&&(r.H=r.H%12+12*r.p);var i=null!=r.Z&&hc!==jt,o=new(i?jt:hc);return"j"in r?o.setFullYear(r.y,0,r.j):"w"in r&&("W"in r||"U"in r)?(o.setFullYear(r.y,0,1),o.setFullYear(r.y,0,"W"in r?(r.w+6)%7+7*r.W-(o.getDay()+5)%7:r.w+7*r.U-(o.getDay()+6)%7)):o.setFullYear(r.y,r.m,r.d),o.setHours(r.H+(0|r.Z/100),r.M+r.Z%100,r.S,r.L),i?o._:o},t.toString=function(){return n},t}function e(n,t,e,r){for(var u,i,o,a=0,c=t.length,l=e.length;c>a;){if(r>=l)return-1;if(u=t.charCodeAt(a++),37===u){if(o=t.charAt(a++),i=C[o in pc?t.charAt(a++):o],!i||(r=i(n,e,r))<0)return-1}else if(u!=e.charCodeAt(r++))return-1}return r}function r(n,t,e){_.lastIndex=0;var r=_.exec(t.slice(e));return r?(n.w=w.get(r[0].toLowerCase()),e+r[0].length):-1}function u(n,t,e){x.lastIndex=0;var r=x.exec(t.slice(e));return r?(n.w=b.get(r[0].toLowerCase()),e+r[0].length):-1}function i(n,t,e){E.lastIndex=0;var r=E.exec(t.slice(e));return r?(n.m=A.get(r[0].toLowerCase()),e+r[0].length):-1}function o(n,t,e){S.lastIndex=0;var r=S.exec(t.slice(e));return r?(n.m=k.get(r[0].toLowerCase()),e+r[0].length):-1}function a(n,t,r){return e(n,N.c.toString(),t,r)}function c(n,t,r){return e(n,N.x.toString(),t,r)}function l(n,t,r){return e(n,N.X.toString(),t,r)}function s(n,t,e){var r=M.get(t.slice(e,e+=2).toLowerCase());return null==r?-1:(n.p=r,e)}var f=n.dateTime,h=n.date,g=n.time,p=n.periods,v=n.days,d=n.shortDays,m=n.months,y=n.shortMonths;t.utc=function(n){function e(n){try{hc=jt;var t=new hc;return t._=n,r(t)}finally{hc=Date}}var r=t(n);return e.parse=function(n){try{hc=jt;var t=r.parse(n);return t&&t._}finally{hc=Date}},e.toString=r.toString,e},t.multi=t.utc.multi=ae;var M=ta.map(),x=It(v),b=Zt(v),_=It(d),w=Zt(d),S=It(m),k=Zt(m),E=It(y),A=Zt(y);p.forEach(function(n,t){M.set(n.toLowerCase(),t)});var N={a:function(n){return d[n.getDay()]},A:function(n){return v[n.getDay()]},b:function(n){return y[n.getMonth()]},B:function(n){return m[n.getMonth()]},c:t(f),d:function(n,t){return Yt(n.getDate(),t,2)},e:function(n,t){return Yt(n.getDate(),t,2)},H:function(n,t){return Yt(n.getHours(),t,2)},I:function(n,t){return Yt(n.getHours()%12||12,t,2)},j:function(n,t){return Yt(1+fc.dayOfYear(n),t,3)},L:function(n,t){return Yt(n.getMilliseconds(),t,3)},m:function(n,t){return Yt(n.getMonth()+1,t,2)},M:function(n,t){return Yt(n.getMinutes(),t,2)},p:function(n){return p[+(n.getHours()>=12)]},S:function(n,t){return Yt(n.getSeconds(),t,2)},U:function(n,t){return Yt(fc.sundayOfYear(n),t,2)},w:function(n){return n.getDay()},W:function(n,t){return Yt(fc.mondayOfYear(n),t,2)},x:t(h),X:t(g),y:function(n,t){return Yt(n.getFullYear()%100,t,2)},Y:function(n,t){return Yt(n.getFullYear()%1e4,t,4)},Z:ie,"%":function(){return"%"}},C={a:r,A:u,b:i,B:o,c:a,d:Qt,e:Qt,H:te,I:te,j:ne,L:ue,m:Kt,M:ee,p:s,S:re,U:Xt,w:Vt,W:$t,x:c,X:l,y:Wt,Y:Bt,Z:Jt,"%":oe};return t}function Yt(n,t,e){var r=0>n?"-":"",u=(r?-n:n)+"",i=u.length;return r+(e>i?new Array(e-i+1).join(t)+u:u)}function It(n){return new RegExp("^(?:"+n.map(ta.requote).join("|")+")","i")}function Zt(n){for(var t=new a,e=-1,r=n.length;++e<r;)t.set(n[e].toLowerCase(),e);return t}function Vt(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+1));return r?(n.w=+r[0],e+r[0].length):-1}function Xt(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e));return r?(n.U=+r[0],e+r[0].length):-1}function $t(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e));return r?(n.W=+r[0],e+r[0].length):-1}function Bt(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+4));return r?(n.y=+r[0],e+r[0].length):-1}function Wt(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+2));return r?(n.y=Gt(+r[0]),e+r[0].length):-1}function Jt(n,t,e){return/^[+-]\d{4}$/.test(t=t.slice(e,e+5))?(n.Z=-t,e+5):-1}function Gt(n){return n+(n>68?1900:2e3)}function Kt(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+2));return r?(n.m=r[0]-1,e+r[0].length):-1}function Qt(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+2));return r?(n.d=+r[0],e+r[0].length):-1}function ne(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+3));return r?(n.j=+r[0],e+r[0].length):-1}function te(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+2));return r?(n.H=+r[0],e+r[0].length):-1}function ee(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+2));return r?(n.M=+r[0],e+r[0].length):-1}function re(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+2));return r?(n.S=+r[0],e+r[0].length):-1}function ue(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+3));return r?(n.L=+r[0],e+r[0].length):-1}function ie(n){var t=n.getTimezoneOffset(),e=t>0?"-":"+",r=0|va(t)/60,u=va(t)%60;return e+Yt(r,"0",2)+Yt(u,"0",2)}function oe(n,t,e){dc.lastIndex=0;var r=dc.exec(t.slice(e,e+1));return r?e+r[0].length:-1}function ae(n){for(var t=n.length,e=-1;++e<t;)n[e][0]=this(n[e][0]);return function(t){for(var e=0,r=n[e];!r[1](t);)r=n[++e];return r[0](t)}}function ce(){}function le(n,t,e){var r=e.s=n+t,u=r-n,i=r-u;e.t=n-i+(t-u)}function se(n,t){n&&xc.hasOwnProperty(n.type)&&xc[n.type](n,t)}function fe(n,t,e){var r,u=-1,i=n.length-e;for(t.lineStart();++u<i;)r=n[u],t.point(r[0],r[1],r[2]);t.lineEnd()}function he(n,t){var e=-1,r=n.length;for(t.polygonStart();++e<r;)fe(n[e],t,1);t.polygonEnd()}function ge(){function n(n,t){n*=Fa,t=t*Fa/2+Da/4;var e=n-r,o=e>=0?1:-1,a=o*e,c=Math.cos(t),l=Math.sin(t),s=i*l,f=u*c+s*Math.cos(a),h=s*o*Math.sin(a);_c.add(Math.atan2(h,f)),r=n,u=c,i=l}var t,e,r,u,i;wc.point=function(o,a){wc.point=n,r=(t=o)*Fa,u=Math.cos(a=(e=a)*Fa/2+Da/4),i=Math.sin(a)},wc.lineEnd=function(){n(t,e)}}function pe(n){var t=n[0],e=n[1],r=Math.cos(e);return[r*Math.cos(t),r*Math.sin(t),Math.sin(e)]}function ve(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function de(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function me(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function ye(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function Me(n){var t=Math.sqrt(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}function xe(n){return[Math.atan2(n[1],n[0]),nt(n[2])]}function be(n,t){return va(n[0]-t[0])<Ta&&va(n[1]-t[1])<Ta}function _e(n,t){n*=Fa;var e=Math.cos(t*=Fa);we(e*Math.cos(n),e*Math.sin(n),Math.sin(t))}function we(n,t,e){++Sc,Ec+=(n-Ec)/Sc,Ac+=(t-Ac)/Sc,Nc+=(e-Nc)/Sc}function Se(){function n(n,u){n*=Fa;var i=Math.cos(u*=Fa),o=i*Math.cos(n),a=i*Math.sin(n),c=Math.sin(u),l=Math.atan2(Math.sqrt((l=e*c-r*a)*l+(l=r*o-t*c)*l+(l=t*a-e*o)*l),t*o+e*a+r*c);kc+=l,Cc+=l*(t+(t=o)),zc+=l*(e+(e=a)),qc+=l*(r+(r=c)),we(t,e,r)}var t,e,r;Dc.point=function(u,i){u*=Fa;var o=Math.cos(i*=Fa);t=o*Math.cos(u),e=o*Math.sin(u),r=Math.sin(i),Dc.point=n,we(t,e,r)}}function ke(){Dc.point=_e}function Ee(){function n(n,t){n*=Fa;var e=Math.cos(t*=Fa),o=e*Math.cos(n),a=e*Math.sin(n),c=Math.sin(t),l=u*c-i*a,s=i*o-r*c,f=r*a-u*o,h=Math.sqrt(l*l+s*s+f*f),g=r*o+u*a+i*c,p=h&&-Q(g)/h,v=Math.atan2(h,g);Lc+=p*l,Tc+=p*s,Rc+=p*f,kc+=v,Cc+=v*(r+(r=o)),zc+=v*(u+(u=a)),qc+=v*(i+(i=c)),we(r,u,i)}var t,e,r,u,i;Dc.point=function(o,a){t=o,e=a,Dc.point=n,o*=Fa;var c=Math.cos(a*=Fa);r=c*Math.cos(o),u=c*Math.sin(o),i=Math.sin(a),we(r,u,i)},Dc.lineEnd=function(){n(t,e),Dc.lineEnd=ke,Dc.point=_e}}function Ae(n,t){function e(e,r){return e=n(e,r),t(e[0],e[1])}return n.invert&&t.invert&&(e.invert=function(e,r){return e=t.invert(e,r),e&&n.invert(e[0],e[1])}),e}function Ne(){return!0}function Ce(n,t,e,r,u){var i=[],o=[];if(n.forEach(function(n){if(!((t=n.length-1)<=0)){var t,e=n[0],r=n[t];if(be(e,r)){u.lineStart();for(var a=0;t>a;++a)u.point((e=n[a])[0],e[1]);return u.lineEnd(),void 0}var c=new qe(e,n,null,!0),l=new qe(e,null,c,!1);c.o=l,i.push(c),o.push(l),c=new qe(r,n,null,!1),l=new qe(r,null,c,!0),c.o=l,i.push(c),o.push(l)}}),o.sort(t),ze(i),ze(o),i.length){for(var a=0,c=e,l=o.length;l>a;++a)o[a].e=c=!c;for(var s,f,h=i[0];;){for(var g=h,p=!0;g.v;)if((g=g.n)===h)return;s=g.z,u.lineStart();do{if(g.v=g.o.v=!0,g.e){if(p)for(var a=0,l=s.length;l>a;++a)u.point((f=s[a])[0],f[1]);else r(g.x,g.n.x,1,u);g=g.n}else{if(p){s=g.p.z;for(var a=s.length-1;a>=0;--a)u.point((f=s[a])[0],f[1])}else r(g.x,g.p.x,-1,u);g=g.p}g=g.o,s=g.z,p=!p}while(!g.v);u.lineEnd()}}}function ze(n){if(t=n.length){for(var t,e,r=0,u=n[0];++r<t;)u.n=e=n[r],e.p=u,u=e;u.n=e=n[0],e.p=u}}function qe(n,t,e,r){this.x=n,this.z=t,this.o=e,this.e=r,this.v=!1,this.n=this.p=null}function Le(n,t,e,r){return function(u,i){function o(t,e){var r=u(t,e);n(t=r[0],e=r[1])&&i.point(t,e)}function a(n,t){var e=u(n,t);d.point(e[0],e[1])}function c(){y.point=a,d.lineStart()}function l(){y.point=o,d.lineEnd()}function s(n,t){v.push([n,t]);var e=u(n,t);x.point(e[0],e[1])}function f(){x.lineStart(),v=[]}function h(){s(v[0][0],v[0][1]),x.lineEnd();var n,t=x.clean(),e=M.buffer(),r=e.length;if(v.pop(),p.push(v),v=null,r)if(1&t){n=e[0];var u,r=n.length-1,o=-1;if(r>0){for(b||(i.polygonStart(),b=!0),i.lineStart();++o<r;)i.point((u=n[o])[0],u[1]);i.lineEnd()}}else r>1&&2&t&&e.push(e.pop().concat(e.shift())),g.push(e.filter(Te))}var g,p,v,d=t(i),m=u.invert(r[0],r[1]),y={point:o,lineStart:c,lineEnd:l,polygonStart:function(){y.point=s,y.lineStart=f,y.lineEnd=h,g=[],p=[]},polygonEnd:function(){y.point=o,y.lineStart=c,y.lineEnd=l,g=ta.merge(g);var n=Fe(m,p);g.length?(b||(i.polygonStart(),b=!0),Ce(g,De,n,e,i)):n&&(b||(i.polygonStart(),b=!0),i.lineStart(),e(null,null,1,i),i.lineEnd()),b&&(i.polygonEnd(),b=!1),g=p=null},sphere:function(){i.polygonStart(),i.lineStart(),e(null,null,1,i),i.lineEnd(),i.polygonEnd()}},M=Re(),x=t(M),b=!1;return y}}function Te(n){return n.length>1}function Re(){var n,t=[];return{lineStart:function(){t.push(n=[])},point:function(t,e){n.push([t,e])},lineEnd:y,buffer:function(){var e=t;return t=[],n=null,e},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function De(n,t){return((n=n.x)[0]<0?n[1]-ja-Ta:ja-n[1])-((t=t.x)[0]<0?t[1]-ja-Ta:ja-t[1])}function Pe(n){var t,e=0/0,r=0/0,u=0/0;return{lineStart:function(){n.lineStart(),t=1},point:function(i,o){var a=i>0?Da:-Da,c=va(i-e);va(c-Da)<Ta?(n.point(e,r=(r+o)/2>0?ja:-ja),n.point(u,r),n.lineEnd(),n.lineStart(),n.point(a,r),n.point(i,r),t=0):u!==a&&c>=Da&&(va(e-u)<Ta&&(e-=u*Ta),va(i-a)<Ta&&(i-=a*Ta),r=Ue(e,r,i,o),n.point(u,r),n.lineEnd(),n.lineStart(),n.point(a,r),t=0),n.point(e=i,r=o),u=a},lineEnd:function(){n.lineEnd(),e=r=0/0},clean:function(){return 2-t}}}function Ue(n,t,e,r){var u,i,o=Math.sin(n-e);return va(o)>Ta?Math.atan((Math.sin(t)*(i=Math.cos(r))*Math.sin(e)-Math.sin(r)*(u=Math.cos(t))*Math.sin(n))/(u*i*o)):(t+r)/2}function je(n,t,e,r){var u;if(null==n)u=e*ja,r.point(-Da,u),r.point(0,u),r.point(Da,u),r.point(Da,0),r.point(Da,-u),r.point(0,-u),r.point(-Da,-u),r.point(-Da,0),r.point(-Da,u);else if(va(n[0]-t[0])>Ta){var i=n[0]<t[0]?Da:-Da;u=e*i/2,r.point(-i,u),r.point(0,u),r.point(i,u)}else r.point(t[0],t[1])}function Fe(n,t){var e=n[0],r=n[1],u=[Math.sin(e),-Math.cos(e),0],i=0,o=0;_c.reset();for(var a=0,c=t.length;c>a;++a){var l=t[a],s=l.length;if(s)for(var f=l[0],h=f[0],g=f[1]/2+Da/4,p=Math.sin(g),v=Math.cos(g),d=1;;){d===s&&(d=0),n=l[d];var m=n[0],y=n[1]/2+Da/4,M=Math.sin(y),x=Math.cos(y),b=m-h,_=b>=0?1:-1,w=_*b,S=w>Da,k=p*M;if(_c.add(Math.atan2(k*_*Math.sin(w),v*x+k*Math.cos(w))),i+=S?b+_*Pa:b,S^h>=e^m>=e){var E=de(pe(f),pe(n));Me(E);var A=de(u,E);Me(A);var N=(S^b>=0?-1:1)*nt(A[2]);(r>N||r===N&&(E[0]||E[1]))&&(o+=S^b>=0?1:-1)}if(!d++)break;h=m,p=M,v=x,f=n}}return(-Ta>i||Ta>i&&0>_c)^1&o}function He(n){function t(n,t){return Math.cos(n)*Math.cos(t)>i}function e(n){var e,i,c,l,s;return{lineStart:function(){l=c=!1,s=1},point:function(f,h){var g,p=[f,h],v=t(f,h),d=o?v?0:u(f,h):v?u(f+(0>f?Da:-Da),h):0;if(!e&&(l=c=v)&&n.lineStart(),v!==c&&(g=r(e,p),(be(e,g)||be(p,g))&&(p[0]+=Ta,p[1]+=Ta,v=t(p[0],p[1]))),v!==c)s=0,v?(n.lineStart(),g=r(p,e),n.point(g[0],g[1])):(g=r(e,p),n.point(g[0],g[1]),n.lineEnd()),e=g;else if(a&&e&&o^v){var m;d&i||!(m=r(p,e,!0))||(s=0,o?(n.lineStart(),n.point(m[0][0],m[0][1]),n.point(m[1][0],m[1][1]),n.lineEnd()):(n.point(m[1][0],m[1][1]),n.lineEnd(),n.lineStart(),n.point(m[0][0],m[0][1])))}!v||e&&be(e,p)||n.point(p[0],p[1]),e=p,c=v,i=d},lineEnd:function(){c&&n.lineEnd(),e=null},clean:function(){return s|(l&&c)<<1}}}function r(n,t,e){var r=pe(n),u=pe(t),o=[1,0,0],a=de(r,u),c=ve(a,a),l=a[0],s=c-l*l;if(!s)return!e&&n;var f=i*c/s,h=-i*l/s,g=de(o,a),p=ye(o,f),v=ye(a,h);me(p,v);var d=g,m=ve(p,d),y=ve(d,d),M=m*m-y*(ve(p,p)-1);if(!(0>M)){var x=Math.sqrt(M),b=ye(d,(-m-x)/y);if(me(b,p),b=xe(b),!e)return b;var _,w=n[0],S=t[0],k=n[1],E=t[1];w>S&&(_=w,w=S,S=_);var A=S-w,N=va(A-Da)<Ta,C=N||Ta>A;if(!N&&k>E&&(_=k,k=E,E=_),C?N?k+E>0^b[1]<(va(b[0]-w)<Ta?k:E):k<=b[1]&&b[1]<=E:A>Da^(w<=b[0]&&b[0]<=S)){var z=ye(d,(-m+x)/y);return me(z,p),[b,xe(z)]}}}function u(t,e){var r=o?n:Da-n,u=0;return-r>t?u|=1:t>r&&(u|=2),-r>e?u|=4:e>r&&(u|=8),u}var i=Math.cos(n),o=i>0,a=va(i)>Ta,c=gr(n,6*Fa);return Le(t,e,c,o?[0,-n]:[-Da,n-Da])}function Oe(n,t,e,r){return function(u){var i,o=u.a,a=u.b,c=o.x,l=o.y,s=a.x,f=a.y,h=0,g=1,p=s-c,v=f-l;if(i=n-c,p||!(i>0)){if(i/=p,0>p){if(h>i)return;g>i&&(g=i)}else if(p>0){if(i>g)return;i>h&&(h=i)}if(i=e-c,p||!(0>i)){if(i/=p,0>p){if(i>g)return;i>h&&(h=i)}else if(p>0){if(h>i)return;g>i&&(g=i)}if(i=t-l,v||!(i>0)){if(i/=v,0>v){if(h>i)return;g>i&&(g=i)}else if(v>0){if(i>g)return;i>h&&(h=i)}if(i=r-l,v||!(0>i)){if(i/=v,0>v){if(i>g)return;i>h&&(h=i)}else if(v>0){if(h>i)return;g>i&&(g=i)}return h>0&&(u.a={x:c+h*p,y:l+h*v}),1>g&&(u.b={x:c+g*p,y:l+g*v}),u}}}}}}function Ye(n,t,e,r){function u(r,u){return va(r[0]-n)<Ta?u>0?0:3:va(r[0]-e)<Ta?u>0?2:1:va(r[1]-t)<Ta?u>0?1:0:u>0?3:2}function i(n,t){return o(n.x,t.x)}function o(n,t){var e=u(n,1),r=u(t,1);return e!==r?e-r:0===e?t[1]-n[1]:1===e?n[0]-t[0]:2===e?n[1]-t[1]:t[0]-n[0]}return function(a){function c(n){for(var t=0,e=d.length,r=n[1],u=0;e>u;++u)for(var i,o=1,a=d[u],c=a.length,l=a[0];c>o;++o)i=a[o],l[1]<=r?i[1]>r&&K(l,i,n)>0&&++t:i[1]<=r&&K(l,i,n)<0&&--t,l=i;return 0!==t}function l(i,a,c,l){var s=0,f=0;if(null==i||(s=u(i,c))!==(f=u(a,c))||o(i,a)<0^c>0){do l.point(0===s||3===s?n:e,s>1?r:t);while((s=(s+c+4)%4)!==f)}else l.point(a[0],a[1])}function s(u,i){return u>=n&&e>=u&&i>=t&&r>=i}function f(n,t){s(n,t)&&a.point(n,t)}function h(){C.point=p,d&&d.push(m=[]),S=!0,w=!1,b=_=0/0}function g(){v&&(p(y,M),x&&w&&A.rejoin(),v.push(A.buffer())),C.point=f,w&&a.lineEnd()}function p(n,t){n=Math.max(-Uc,Math.min(Uc,n)),t=Math.max(-Uc,Math.min(Uc,t));var e=s(n,t);if(d&&m.push([n,t]),S)y=n,M=t,x=e,S=!1,e&&(a.lineStart(),a.point(n,t));else if(e&&w)a.point(n,t);else{var r={a:{x:b,y:_},b:{x:n,y:t}};N(r)?(w||(a.lineStart(),a.point(r.a.x,r.a.y)),a.point(r.b.x,r.b.y),e||a.lineEnd(),k=!1):e&&(a.lineStart(),a.point(n,t),k=!1)}b=n,_=t,w=e}var v,d,m,y,M,x,b,_,w,S,k,E=a,A=Re(),N=Oe(n,t,e,r),C={point:f,lineStart:h,lineEnd:g,polygonStart:function(){a=A,v=[],d=[],k=!0},polygonEnd:function(){a=E,v=ta.merge(v);var t=c([n,r]),e=k&&t,u=v.length;(e||u)&&(a.polygonStart(),e&&(a.lineStart(),l(null,null,1,a),a.lineEnd()),u&&Ce(v,i,t,l,a),a.polygonEnd()),v=d=m=null}};return C}}function Ie(n){var t=0,e=Da/3,r=ir(n),u=r(t,e);return u.parallels=function(n){return arguments.length?r(t=n[0]*Da/180,e=n[1]*Da/180):[180*(t/Da),180*(e/Da)]},u}function Ze(n,t){function e(n,t){var e=Math.sqrt(i-2*u*Math.sin(t))/u;return[e*Math.sin(n*=u),o-e*Math.cos(n)]}var r=Math.sin(n),u=(r+Math.sin(t))/2,i=1+r*(2*u-r),o=Math.sqrt(i)/u;return e.invert=function(n,t){var e=o-t;return[Math.atan2(n,e)/u,nt((i-(n*n+e*e)*u*u)/(2*u))]},e}function Ve(){function n(n,t){Fc+=u*n-r*t,r=n,u=t}var t,e,r,u;Zc.point=function(i,o){Zc.point=n,t=r=i,e=u=o},Zc.lineEnd=function(){n(t,e)}}function Xe(n,t){Hc>n&&(Hc=n),n>Yc&&(Yc=n),Oc>t&&(Oc=t),t>Ic&&(Ic=t)}function $e(){function n(n,t){o.push("M",n,",",t,i)}function t(n,t){o.push("M",n,",",t),a.point=e}function e(n,t){o.push("L",n,",",t)}function r(){a.point=n}function u(){o.push("Z")}var i=Be(4.5),o=[],a={point:n,lineStart:function(){a.point=t},lineEnd:r,polygonStart:function(){a.lineEnd=u},polygonEnd:function(){a.lineEnd=r,a.point=n},pointRadius:function(n){return i=Be(n),a},result:function(){if(o.length){var n=o.join("");return o=[],n}}};return a}function Be(n){return"m0,"+n+"a"+n+","+n+" 0 1,1 0,"+-2*n+"a"+n+","+n+" 0 1,1 0,"+2*n+"z"}function We(n,t){Ec+=n,Ac+=t,++Nc}function Je(){function n(n,r){var u=n-t,i=r-e,o=Math.sqrt(u*u+i*i);Cc+=o*(t+n)/2,zc+=o*(e+r)/2,qc+=o,We(t=n,e=r)}var t,e;Xc.point=function(r,u){Xc.point=n,We(t=r,e=u)}}function Ge(){Xc.point=We}function Ke(){function n(n,t){var e=n-r,i=t-u,o=Math.sqrt(e*e+i*i);Cc+=o*(r+n)/2,zc+=o*(u+t)/2,qc+=o,o=u*n-r*t,Lc+=o*(r+n),Tc+=o*(u+t),Rc+=3*o,We(r=n,u=t)}var t,e,r,u;Xc.point=function(i,o){Xc.point=n,We(t=r=i,e=u=o)},Xc.lineEnd=function(){n(t,e)}}function Qe(n){function t(t,e){n.moveTo(t+o,e),n.arc(t,e,o,0,Pa)}function e(t,e){n.moveTo(t,e),a.point=r}function r(t,e){n.lineTo(t,e)}function u(){a.point=t}function i(){n.closePath()}var o=4.5,a={point:t,lineStart:function(){a.point=e},lineEnd:u,polygonStart:function(){a.lineEnd=i},polygonEnd:function(){a.lineEnd=u,a.point=t},pointRadius:function(n){return o=n,a},result:y};return a}function nr(n){function t(n){return(a?r:e)(n)}function e(t){return rr(t,function(e,r){e=n(e,r),t.point(e[0],e[1])})}function r(t){function e(e,r){e=n(e,r),t.point(e[0],e[1])}function r(){M=0/0,S.point=i,t.lineStart()}function i(e,r){var i=pe([e,r]),o=n(e,r);u(M,x,y,b,_,w,M=o[0],x=o[1],y=e,b=i[0],_=i[1],w=i[2],a,t),t.point(M,x)}function o(){S.point=e,t.lineEnd()}function c(){r(),S.point=l,S.lineEnd=s}function l(n,t){i(f=n,h=t),g=M,p=x,v=b,d=_,m=w,S.point=i}function s(){u(M,x,y,b,_,w,g,p,f,v,d,m,a,t),S.lineEnd=o,o()}var f,h,g,p,v,d,m,y,M,x,b,_,w,S={point:e,lineStart:r,lineEnd:o,polygonStart:function(){t.polygonStart(),S.lineStart=c},polygonEnd:function(){t.polygonEnd(),S.lineStart=r}};return S}function u(t,e,r,a,c,l,s,f,h,g,p,v,d,m){var y=s-t,M=f-e,x=y*y+M*M;if(x>4*i&&d--){var b=a+g,_=c+p,w=l+v,S=Math.sqrt(b*b+_*_+w*w),k=Math.asin(w/=S),E=va(va(w)-1)<Ta||va(r-h)<Ta?(r+h)/2:Math.atan2(_,b),A=n(E,k),N=A[0],C=A[1],z=N-t,q=C-e,L=M*z-y*q; (L*L/x>i||va((y*z+M*q)/x-.5)>.3||o>a*g+c*p+l*v)&&(u(t,e,r,a,c,l,N,C,E,b/=S,_/=S,w,d,m),m.point(N,C),u(N,C,E,b,_,w,s,f,h,g,p,v,d,m))}}var i=.5,o=Math.cos(30*Fa),a=16;return t.precision=function(n){return arguments.length?(a=(i=n*n)>0&&16,t):Math.sqrt(i)},t}function tr(n){var t=nr(function(t,e){return n([t*Ha,e*Ha])});return function(n){return or(t(n))}}function er(n){this.stream=n}function rr(n,t){return{point:t,sphere:function(){n.sphere()},lineStart:function(){n.lineStart()},lineEnd:function(){n.lineEnd()},polygonStart:function(){n.polygonStart()},polygonEnd:function(){n.polygonEnd()}}}function ur(n){return ir(function(){return n})()}function ir(n){function t(n){return n=a(n[0]*Fa,n[1]*Fa),[n[0]*h+c,l-n[1]*h]}function e(n){return n=a.invert((n[0]-c)/h,(l-n[1])/h),n&&[n[0]*Ha,n[1]*Ha]}function r(){a=Ae(o=lr(m,y,M),i);var n=i(v,d);return c=g-n[0]*h,l=p+n[1]*h,u()}function u(){return s&&(s.valid=!1,s=null),t}var i,o,a,c,l,s,f=nr(function(n,t){return n=i(n,t),[n[0]*h+c,l-n[1]*h]}),h=150,g=480,p=250,v=0,d=0,m=0,y=0,M=0,x=Pc,b=Et,_=null,w=null;return t.stream=function(n){return s&&(s.valid=!1),s=or(x(o,f(b(n)))),s.valid=!0,s},t.clipAngle=function(n){return arguments.length?(x=null==n?(_=n,Pc):He((_=+n)*Fa),u()):_},t.clipExtent=function(n){return arguments.length?(w=n,b=n?Ye(n[0][0],n[0][1],n[1][0],n[1][1]):Et,u()):w},t.scale=function(n){return arguments.length?(h=+n,r()):h},t.translate=function(n){return arguments.length?(g=+n[0],p=+n[1],r()):[g,p]},t.center=function(n){return arguments.length?(v=n[0]%360*Fa,d=n[1]%360*Fa,r()):[v*Ha,d*Ha]},t.rotate=function(n){return arguments.length?(m=n[0]%360*Fa,y=n[1]%360*Fa,M=n.length>2?n[2]%360*Fa:0,r()):[m*Ha,y*Ha,M*Ha]},ta.rebind(t,f,"precision"),function(){return i=n.apply(this,arguments),t.invert=i.invert&&e,r()}}function or(n){return rr(n,function(t,e){n.point(t*Fa,e*Fa)})}function ar(n,t){return[n,t]}function cr(n,t){return[n>Da?n-Pa:-Da>n?n+Pa:n,t]}function lr(n,t,e){return n?t||e?Ae(fr(n),hr(t,e)):fr(n):t||e?hr(t,e):cr}function sr(n){return function(t,e){return t+=n,[t>Da?t-Pa:-Da>t?t+Pa:t,e]}}function fr(n){var t=sr(n);return t.invert=sr(-n),t}function hr(n,t){function e(n,t){var e=Math.cos(t),a=Math.cos(n)*e,c=Math.sin(n)*e,l=Math.sin(t),s=l*r+a*u;return[Math.atan2(c*i-s*o,a*r-l*u),nt(s*i+c*o)]}var r=Math.cos(n),u=Math.sin(n),i=Math.cos(t),o=Math.sin(t);return e.invert=function(n,t){var e=Math.cos(t),a=Math.cos(n)*e,c=Math.sin(n)*e,l=Math.sin(t),s=l*i-c*o;return[Math.atan2(c*i+l*o,a*r+s*u),nt(s*r-a*u)]},e}function gr(n,t){var e=Math.cos(n),r=Math.sin(n);return function(u,i,o,a){var c=o*t;null!=u?(u=pr(e,u),i=pr(e,i),(o>0?i>u:u>i)&&(u+=o*Pa)):(u=n+o*Pa,i=n-.5*c);for(var l,s=u;o>0?s>i:i>s;s-=c)a.point((l=xe([e,-r*Math.cos(s),-r*Math.sin(s)]))[0],l[1])}}function pr(n,t){var e=pe(t);e[0]-=n,Me(e);var r=Q(-e[1]);return((-e[2]<0?-r:r)+2*Math.PI-Ta)%(2*Math.PI)}function vr(n,t,e){var r=ta.range(n,t-Ta,e).concat(t);return function(n){return r.map(function(t){return[n,t]})}}function dr(n,t,e){var r=ta.range(n,t-Ta,e).concat(t);return function(n){return r.map(function(t){return[t,n]})}}function mr(n){return n.source}function yr(n){return n.target}function Mr(n,t,e,r){var u=Math.cos(t),i=Math.sin(t),o=Math.cos(r),a=Math.sin(r),c=u*Math.cos(n),l=u*Math.sin(n),s=o*Math.cos(e),f=o*Math.sin(e),h=2*Math.asin(Math.sqrt(ut(r-t)+u*o*ut(e-n))),g=1/Math.sin(h),p=h?function(n){var t=Math.sin(n*=h)*g,e=Math.sin(h-n)*g,r=e*c+t*s,u=e*l+t*f,o=e*i+t*a;return[Math.atan2(u,r)*Ha,Math.atan2(o,Math.sqrt(r*r+u*u))*Ha]}:function(){return[n*Ha,t*Ha]};return p.distance=h,p}function xr(){function n(n,u){var i=Math.sin(u*=Fa),o=Math.cos(u),a=va((n*=Fa)-t),c=Math.cos(a);$c+=Math.atan2(Math.sqrt((a=o*Math.sin(a))*a+(a=r*i-e*o*c)*a),e*i+r*o*c),t=n,e=i,r=o}var t,e,r;Bc.point=function(u,i){t=u*Fa,e=Math.sin(i*=Fa),r=Math.cos(i),Bc.point=n},Bc.lineEnd=function(){Bc.point=Bc.lineEnd=y}}function br(n,t){function e(t,e){var r=Math.cos(t),u=Math.cos(e),i=n(r*u);return[i*u*Math.sin(t),i*Math.sin(e)]}return e.invert=function(n,e){var r=Math.sqrt(n*n+e*e),u=t(r),i=Math.sin(u),o=Math.cos(u);return[Math.atan2(n*i,r*o),Math.asin(r&&e*i/r)]},e}function _r(n,t){function e(n,t){o>0?-ja+Ta>t&&(t=-ja+Ta):t>ja-Ta&&(t=ja-Ta);var e=o/Math.pow(u(t),i);return[e*Math.sin(i*n),o-e*Math.cos(i*n)]}var r=Math.cos(n),u=function(n){return Math.tan(Da/4+n/2)},i=n===t?Math.sin(n):Math.log(r/Math.cos(t))/Math.log(u(t)/u(n)),o=r*Math.pow(u(n),i)/i;return i?(e.invert=function(n,t){var e=o-t,r=G(i)*Math.sqrt(n*n+e*e);return[Math.atan2(n,e)/i,2*Math.atan(Math.pow(o/r,1/i))-ja]},e):Sr}function wr(n,t){function e(n,t){var e=i-t;return[e*Math.sin(u*n),i-e*Math.cos(u*n)]}var r=Math.cos(n),u=n===t?Math.sin(n):(r-Math.cos(t))/(t-n),i=r/u+n;return va(u)<Ta?ar:(e.invert=function(n,t){var e=i-t;return[Math.atan2(n,e)/u,i-G(u)*Math.sqrt(n*n+e*e)]},e)}function Sr(n,t){return[n,Math.log(Math.tan(Da/4+t/2))]}function kr(n){var t,e=ur(n),r=e.scale,u=e.translate,i=e.clipExtent;return e.scale=function(){var n=r.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.translate=function(){var n=u.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.clipExtent=function(n){var o=i.apply(e,arguments);if(o===e){if(t=null==n){var a=Da*r(),c=u();i([[c[0]-a,c[1]-a],[c[0]+a,c[1]+a]])}}else t&&(o=null);return o},e.clipExtent(null)}function Er(n,t){return[Math.log(Math.tan(Da/4+t/2)),-n]}function Ar(n){return n[0]}function Nr(n){return n[1]}function Cr(n){for(var t=n.length,e=[0,1],r=2,u=2;t>u;u++){for(;r>1&&K(n[e[r-2]],n[e[r-1]],n[u])<=0;)--r;e[r++]=u}return e.slice(0,r)}function zr(n,t){return n[0]-t[0]||n[1]-t[1]}function qr(n,t,e){return(e[0]-t[0])*(n[1]-t[1])<(e[1]-t[1])*(n[0]-t[0])}function Lr(n,t,e,r){var u=n[0],i=e[0],o=t[0]-u,a=r[0]-i,c=n[1],l=e[1],s=t[1]-c,f=r[1]-l,h=(a*(c-l)-f*(u-i))/(f*o-a*s);return[u+h*o,c+h*s]}function Tr(n){var t=n[0],e=n[n.length-1];return!(t[0]-e[0]||t[1]-e[1])}function Rr(){tu(this),this.edge=this.site=this.circle=null}function Dr(n){var t=ol.pop()||new Rr;return t.site=n,t}function Pr(n){Xr(n),rl.remove(n),ol.push(n),tu(n)}function Ur(n){var t=n.circle,e=t.x,r=t.cy,u={x:e,y:r},i=n.P,o=n.N,a=[n];Pr(n);for(var c=i;c.circle&&va(e-c.circle.x)<Ta&&va(r-c.circle.cy)<Ta;)i=c.P,a.unshift(c),Pr(c),c=i;a.unshift(c),Xr(c);for(var l=o;l.circle&&va(e-l.circle.x)<Ta&&va(r-l.circle.cy)<Ta;)o=l.N,a.push(l),Pr(l),l=o;a.push(l),Xr(l);var s,f=a.length;for(s=1;f>s;++s)l=a[s],c=a[s-1],Kr(l.edge,c.site,l.site,u);c=a[0],l=a[f-1],l.edge=Jr(c.site,l.site,null,u),Vr(c),Vr(l)}function jr(n){for(var t,e,r,u,i=n.x,o=n.y,a=rl._;a;)if(r=Fr(a,o)-i,r>Ta)a=a.L;else{if(u=i-Hr(a,o),!(u>Ta)){r>-Ta?(t=a.P,e=a):u>-Ta?(t=a,e=a.N):t=e=a;break}if(!a.R){t=a;break}a=a.R}var c=Dr(n);if(rl.insert(t,c),t||e){if(t===e)return Xr(t),e=Dr(t.site),rl.insert(c,e),c.edge=e.edge=Jr(t.site,c.site),Vr(t),Vr(e),void 0;if(!e)return c.edge=Jr(t.site,c.site),void 0;Xr(t),Xr(e);var l=t.site,s=l.x,f=l.y,h=n.x-s,g=n.y-f,p=e.site,v=p.x-s,d=p.y-f,m=2*(h*d-g*v),y=h*h+g*g,M=v*v+d*d,x={x:(d*y-g*M)/m+s,y:(h*M-v*y)/m+f};Kr(e.edge,l,p,x),c.edge=Jr(l,n,null,x),e.edge=Jr(n,p,null,x),Vr(t),Vr(e)}}function Fr(n,t){var e=n.site,r=e.x,u=e.y,i=u-t;if(!i)return r;var o=n.P;if(!o)return-1/0;e=o.site;var a=e.x,c=e.y,l=c-t;if(!l)return a;var s=a-r,f=1/i-1/l,h=s/l;return f?(-h+Math.sqrt(h*h-2*f*(s*s/(-2*l)-c+l/2+u-i/2)))/f+r:(r+a)/2}function Hr(n,t){var e=n.N;if(e)return Fr(e,t);var r=n.site;return r.y===t?r.x:1/0}function Or(n){this.site=n,this.edges=[]}function Yr(n){for(var t,e,r,u,i,o,a,c,l,s,f=n[0][0],h=n[1][0],g=n[0][1],p=n[1][1],v=el,d=v.length;d--;)if(i=v[d],i&&i.prepare())for(a=i.edges,c=a.length,o=0;c>o;)s=a[o].end(),r=s.x,u=s.y,l=a[++o%c].start(),t=l.x,e=l.y,(va(r-t)>Ta||va(u-e)>Ta)&&(a.splice(o,0,new Qr(Gr(i.site,s,va(r-f)<Ta&&p-u>Ta?{x:f,y:va(t-f)<Ta?e:p}:va(u-p)<Ta&&h-r>Ta?{x:va(e-p)<Ta?t:h,y:p}:va(r-h)<Ta&&u-g>Ta?{x:h,y:va(t-h)<Ta?e:g}:va(u-g)<Ta&&r-f>Ta?{x:va(e-g)<Ta?t:f,y:g}:null),i.site,null)),++c)}function Ir(n,t){return t.angle-n.angle}function Zr(){tu(this),this.x=this.y=this.arc=this.site=this.cy=null}function Vr(n){var t=n.P,e=n.N;if(t&&e){var r=t.site,u=n.site,i=e.site;if(r!==i){var o=u.x,a=u.y,c=r.x-o,l=r.y-a,s=i.x-o,f=i.y-a,h=2*(c*f-l*s);if(!(h>=-Ra)){var g=c*c+l*l,p=s*s+f*f,v=(f*g-l*p)/h,d=(c*p-s*g)/h,f=d+a,m=al.pop()||new Zr;m.arc=n,m.site=u,m.x=v+o,m.y=f+Math.sqrt(v*v+d*d),m.cy=f,n.circle=m;for(var y=null,M=il._;M;)if(m.y<M.y||m.y===M.y&&m.x<=M.x){if(!M.L){y=M.P;break}M=M.L}else{if(!M.R){y=M;break}M=M.R}il.insert(y,m),y||(ul=m)}}}}function Xr(n){var t=n.circle;t&&(t.P||(ul=t.N),il.remove(t),al.push(t),tu(t),n.circle=null)}function $r(n){for(var t,e=tl,r=Oe(n[0][0],n[0][1],n[1][0],n[1][1]),u=e.length;u--;)t=e[u],(!Br(t,n)||!r(t)||va(t.a.x-t.b.x)<Ta&&va(t.a.y-t.b.y)<Ta)&&(t.a=t.b=null,e.splice(u,1))}function Br(n,t){var e=n.b;if(e)return!0;var r,u,i=n.a,o=t[0][0],a=t[1][0],c=t[0][1],l=t[1][1],s=n.l,f=n.r,h=s.x,g=s.y,p=f.x,v=f.y,d=(h+p)/2,m=(g+v)/2;if(v===g){if(o>d||d>=a)return;if(h>p){if(i){if(i.y>=l)return}else i={x:d,y:c};e={x:d,y:l}}else{if(i){if(i.y<c)return}else i={x:d,y:l};e={x:d,y:c}}}else if(r=(h-p)/(v-g),u=m-r*d,-1>r||r>1)if(h>p){if(i){if(i.y>=l)return}else i={x:(c-u)/r,y:c};e={x:(l-u)/r,y:l}}else{if(i){if(i.y<c)return}else i={x:(l-u)/r,y:l};e={x:(c-u)/r,y:c}}else if(v>g){if(i){if(i.x>=a)return}else i={x:o,y:r*o+u};e={x:a,y:r*a+u}}else{if(i){if(i.x<o)return}else i={x:a,y:r*a+u};e={x:o,y:r*o+u}}return n.a=i,n.b=e,!0}function Wr(n,t){this.l=n,this.r=t,this.a=this.b=null}function Jr(n,t,e,r){var u=new Wr(n,t);return tl.push(u),e&&Kr(u,n,t,e),r&&Kr(u,t,n,r),el[n.i].edges.push(new Qr(u,n,t)),el[t.i].edges.push(new Qr(u,t,n)),u}function Gr(n,t,e){var r=new Wr(n,null);return r.a=t,r.b=e,tl.push(r),r}function Kr(n,t,e,r){n.a||n.b?n.l===e?n.b=r:n.a=r:(n.a=r,n.l=t,n.r=e)}function Qr(n,t,e){var r=n.a,u=n.b;this.edge=n,this.site=t,this.angle=e?Math.atan2(e.y-t.y,e.x-t.x):n.l===t?Math.atan2(u.x-r.x,r.y-u.y):Math.atan2(r.x-u.x,u.y-r.y)}function nu(){this._=null}function tu(n){n.U=n.C=n.L=n.R=n.P=n.N=null}function eu(n,t){var e=t,r=t.R,u=e.U;u?u.L===e?u.L=r:u.R=r:n._=r,r.U=u,e.U=r,e.R=r.L,e.R&&(e.R.U=e),r.L=e}function ru(n,t){var e=t,r=t.L,u=e.U;u?u.L===e?u.L=r:u.R=r:n._=r,r.U=u,e.U=r,e.L=r.R,e.L&&(e.L.U=e),r.R=e}function uu(n){for(;n.L;)n=n.L;return n}function iu(n,t){var e,r,u,i=n.sort(ou).pop();for(tl=[],el=new Array(n.length),rl=new nu,il=new nu;;)if(u=ul,i&&(!u||i.y<u.y||i.y===u.y&&i.x<u.x))(i.x!==e||i.y!==r)&&(el[i.i]=new Or(i),jr(i),e=i.x,r=i.y),i=n.pop();else{if(!u)break;Ur(u.arc)}t&&($r(t),Yr(t));var o={cells:el,edges:tl};return rl=il=tl=el=null,o}function ou(n,t){return t.y-n.y||t.x-n.x}function au(n,t,e){return(n.x-e.x)*(t.y-n.y)-(n.x-t.x)*(e.y-n.y)}function cu(n){return n.x}function lu(n){return n.y}function su(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function fu(n,t,e,r,u,i){if(!n(t,e,r,u,i)){var o=.5*(e+u),a=.5*(r+i),c=t.nodes;c[0]&&fu(n,c[0],e,r,o,a),c[1]&&fu(n,c[1],o,r,u,a),c[2]&&fu(n,c[2],e,a,o,i),c[3]&&fu(n,c[3],o,a,u,i)}}function hu(n,t,e,r,u,i,o){var a,c=1/0;return function l(n,s,f,h,g){if(!(s>i||f>o||r>h||u>g)){if(p=n.point){var p,v=t-p[0],d=e-p[1],m=v*v+d*d;if(c>m){var y=Math.sqrt(c=m);r=t-y,u=e-y,i=t+y,o=e+y,a=p}}for(var M=n.nodes,x=.5*(s+h),b=.5*(f+g),_=t>=x,w=e>=b,S=w<<1|_,k=S+4;k>S;++S)if(n=M[3&S])switch(3&S){case 0:l(n,s,f,x,b);break;case 1:l(n,x,f,h,b);break;case 2:l(n,s,b,x,g);break;case 3:l(n,x,b,h,g)}}}(n,r,u,i,o),a}function gu(n,t){n=ta.rgb(n),t=ta.rgb(t);var e=n.r,r=n.g,u=n.b,i=t.r-e,o=t.g-r,a=t.b-u;return function(n){return"#"+Mt(Math.round(e+i*n))+Mt(Math.round(r+o*n))+Mt(Math.round(u+a*n))}}function pu(n,t){var e,r={},u={};for(e in n)e in t?r[e]=mu(n[e],t[e]):u[e]=n[e];for(e in t)e in n||(u[e]=t[e]);return function(n){for(e in r)u[e]=r[e](n);return u}}function vu(n,t){return n=+n,t=+t,function(e){return n*(1-e)+t*e}}function du(n,t){var e,r,u,i=ll.lastIndex=sl.lastIndex=0,o=-1,a=[],c=[];for(n+="",t+="";(e=ll.exec(n))&&(r=sl.exec(t));)(u=r.index)>i&&(u=t.slice(i,u),a[o]?a[o]+=u:a[++o]=u),(e=e[0])===(r=r[0])?a[o]?a[o]+=r:a[++o]=r:(a[++o]=null,c.push({i:o,x:vu(e,r)})),i=sl.lastIndex;return i<t.length&&(u=t.slice(i),a[o]?a[o]+=u:a[++o]=u),a.length<2?c[0]?(t=c[0].x,function(n){return t(n)+""}):function(){return t}:(t=c.length,function(n){for(var e,r=0;t>r;++r)a[(e=c[r]).i]=e.x(n);return a.join("")})}function mu(n,t){for(var e,r=ta.interpolators.length;--r>=0&&!(e=ta.interpolators[r](n,t)););return e}function yu(n,t){var e,r=[],u=[],i=n.length,o=t.length,a=Math.min(n.length,t.length);for(e=0;a>e;++e)r.push(mu(n[e],t[e]));for(;i>e;++e)u[e]=n[e];for(;o>e;++e)u[e]=t[e];return function(n){for(e=0;a>e;++e)u[e]=r[e](n);return u}}function Mu(n){return function(t){return 0>=t?0:t>=1?1:n(t)}}function xu(n){return function(t){return 1-n(1-t)}}function bu(n){return function(t){return.5*(.5>t?n(2*t):2-n(2-2*t))}}function _u(n){return n*n}function wu(n){return n*n*n}function Su(n){if(0>=n)return 0;if(n>=1)return 1;var t=n*n,e=t*n;return 4*(.5>n?e:3*(n-t)+e-.75)}function ku(n){return function(t){return Math.pow(t,n)}}function Eu(n){return 1-Math.cos(n*ja)}function Au(n){return Math.pow(2,10*(n-1))}function Nu(n){return 1-Math.sqrt(1-n*n)}function Cu(n,t){var e;return arguments.length<2&&(t=.45),arguments.length?e=t/Pa*Math.asin(1/n):(n=1,e=t/4),function(r){return 1+n*Math.pow(2,-10*r)*Math.sin((r-e)*Pa/t)}}function zu(n){return n||(n=1.70158),function(t){return t*t*((n+1)*t-n)}}function qu(n){return 1/2.75>n?7.5625*n*n:2/2.75>n?7.5625*(n-=1.5/2.75)*n+.75:2.5/2.75>n?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375}function Lu(n,t){n=ta.hcl(n),t=ta.hcl(t);var e=n.h,r=n.c,u=n.l,i=t.h-e,o=t.c-r,a=t.l-u;return isNaN(o)&&(o=0,r=isNaN(r)?t.c:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return lt(e+i*n,r+o*n,u+a*n)+""}}function Tu(n,t){n=ta.hsl(n),t=ta.hsl(t);var e=n.h,r=n.s,u=n.l,i=t.h-e,o=t.s-r,a=t.l-u;return isNaN(o)&&(o=0,r=isNaN(r)?t.s:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return at(e+i*n,r+o*n,u+a*n)+""}}function Ru(n,t){n=ta.lab(n),t=ta.lab(t);var e=n.l,r=n.a,u=n.b,i=t.l-e,o=t.a-r,a=t.b-u;return function(n){return ft(e+i*n,r+o*n,u+a*n)+""}}function Du(n,t){return t-=n,function(e){return Math.round(n+t*e)}}function Pu(n){var t=[n.a,n.b],e=[n.c,n.d],r=ju(t),u=Uu(t,e),i=ju(Fu(e,t,-u))||0;t[0]*e[1]<e[0]*t[1]&&(t[0]*=-1,t[1]*=-1,r*=-1,u*=-1),this.rotate=(r?Math.atan2(t[1],t[0]):Math.atan2(-e[0],e[1]))*Ha,this.translate=[n.e,n.f],this.scale=[r,i],this.skew=i?Math.atan2(u,i)*Ha:0}function Uu(n,t){return n[0]*t[0]+n[1]*t[1]}function ju(n){var t=Math.sqrt(Uu(n,n));return t&&(n[0]/=t,n[1]/=t),t}function Fu(n,t,e){return n[0]+=e*t[0],n[1]+=e*t[1],n}function Hu(n,t){var e,r=[],u=[],i=ta.transform(n),o=ta.transform(t),a=i.translate,c=o.translate,l=i.rotate,s=o.rotate,f=i.skew,h=o.skew,g=i.scale,p=o.scale;return a[0]!=c[0]||a[1]!=c[1]?(r.push("translate(",null,",",null,")"),u.push({i:1,x:vu(a[0],c[0])},{i:3,x:vu(a[1],c[1])})):c[0]||c[1]?r.push("translate("+c+")"):r.push(""),l!=s?(l-s>180?s+=360:s-l>180&&(l+=360),u.push({i:r.push(r.pop()+"rotate(",null,")")-2,x:vu(l,s)})):s&&r.push(r.pop()+"rotate("+s+")"),f!=h?u.push({i:r.push(r.pop()+"skewX(",null,")")-2,x:vu(f,h)}):h&&r.push(r.pop()+"skewX("+h+")"),g[0]!=p[0]||g[1]!=p[1]?(e=r.push(r.pop()+"scale(",null,",",null,")"),u.push({i:e-4,x:vu(g[0],p[0])},{i:e-2,x:vu(g[1],p[1])})):(1!=p[0]||1!=p[1])&&r.push(r.pop()+"scale("+p+")"),e=u.length,function(n){for(var t,i=-1;++i<e;)r[(t=u[i]).i]=t.x(n);return r.join("")}}function Ou(n,t){return t=(t-=n=+n)||1/t,function(e){return(e-n)/t}}function Yu(n,t){return t=(t-=n=+n)||1/t,function(e){return Math.max(0,Math.min(1,(e-n)/t))}}function Iu(n){for(var t=n.source,e=n.target,r=Vu(t,e),u=[t];t!==r;)t=t.parent,u.push(t);for(var i=u.length;e!==r;)u.splice(i,0,e),e=e.parent;return u}function Zu(n){for(var t=[],e=n.parent;null!=e;)t.push(n),n=e,e=e.parent;return t.push(n),t}function Vu(n,t){if(n===t)return n;for(var e=Zu(n),r=Zu(t),u=e.pop(),i=r.pop(),o=null;u===i;)o=u,u=e.pop(),i=r.pop();return o}function Xu(n){n.fixed|=2}function $u(n){n.fixed&=-7}function Bu(n){n.fixed|=4,n.px=n.x,n.py=n.y}function Wu(n){n.fixed&=-5}function Ju(n,t,e){var r=0,u=0;if(n.charge=0,!n.leaf)for(var i,o=n.nodes,a=o.length,c=-1;++c<a;)i=o[c],null!=i&&(Ju(i,t,e),n.charge+=i.charge,r+=i.charge*i.cx,u+=i.charge*i.cy);if(n.point){n.leaf||(n.point.x+=Math.random()-.5,n.point.y+=Math.random()-.5);var l=t*e[n.point.index];n.charge+=n.pointCharge=l,r+=l*n.point.x,u+=l*n.point.y}n.cx=r/n.charge,n.cy=u/n.charge}function Gu(n,t){return ta.rebind(n,t,"sort","children","value"),n.nodes=n,n.links=ri,n}function Ku(n,t){for(var e=[n];null!=(n=e.pop());)if(t(n),(u=n.children)&&(r=u.length))for(var r,u;--r>=0;)e.push(u[r])}function Qu(n,t){for(var e=[n],r=[];null!=(n=e.pop());)if(r.push(n),(i=n.children)&&(u=i.length))for(var u,i,o=-1;++o<u;)e.push(i[o]);for(;null!=(n=r.pop());)t(n)}function ni(n){return n.children}function ti(n){return n.value}function ei(n,t){return t.value-n.value}function ri(n){return ta.merge(n.map(function(n){return(n.children||[]).map(function(t){return{source:n,target:t}})}))}function ui(n){return n.x}function ii(n){return n.y}function oi(n,t,e){n.y0=t,n.y=e}function ai(n){return ta.range(n.length)}function ci(n){for(var t=-1,e=n[0].length,r=[];++t<e;)r[t]=0;return r}function li(n){for(var t,e=1,r=0,u=n[0][1],i=n.length;i>e;++e)(t=n[e][1])>u&&(r=e,u=t);return r}function si(n){return n.reduce(fi,0)}function fi(n,t){return n+t[1]}function hi(n,t){return gi(n,Math.ceil(Math.log(t.length)/Math.LN2+1))}function gi(n,t){for(var e=-1,r=+n[0],u=(n[1]-r)/t,i=[];++e<=t;)i[e]=u*e+r;return i}function pi(n){return[ta.min(n),ta.max(n)]}function vi(n,t){return n.value-t.value}function di(n,t){var e=n._pack_next;n._pack_next=t,t._pack_prev=n,t._pack_next=e,e._pack_prev=t}function mi(n,t){n._pack_next=t,t._pack_prev=n}function yi(n,t){var e=t.x-n.x,r=t.y-n.y,u=n.r+t.r;return.999*u*u>e*e+r*r}function Mi(n){function t(n){s=Math.min(n.x-n.r,s),f=Math.max(n.x+n.r,f),h=Math.min(n.y-n.r,h),g=Math.max(n.y+n.r,g)}if((e=n.children)&&(l=e.length)){var e,r,u,i,o,a,c,l,s=1/0,f=-1/0,h=1/0,g=-1/0;if(e.forEach(xi),r=e[0],r.x=-r.r,r.y=0,t(r),l>1&&(u=e[1],u.x=u.r,u.y=0,t(u),l>2))for(i=e[2],wi(r,u,i),t(i),di(r,i),r._pack_prev=i,di(i,u),u=r._pack_next,o=3;l>o;o++){wi(r,u,i=e[o]);var p=0,v=1,d=1;for(a=u._pack_next;a!==u;a=a._pack_next,v++)if(yi(a,i)){p=1;break}if(1==p)for(c=r._pack_prev;c!==a._pack_prev&&!yi(c,i);c=c._pack_prev,d++);p?(d>v||v==d&&u.r<r.r?mi(r,u=a):mi(r=c,u),o--):(di(r,i),u=i,t(i))}var m=(s+f)/2,y=(h+g)/2,M=0;for(o=0;l>o;o++)i=e[o],i.x-=m,i.y-=y,M=Math.max(M,i.r+Math.sqrt(i.x*i.x+i.y*i.y));n.r=M,e.forEach(bi)}}function xi(n){n._pack_next=n._pack_prev=n}function bi(n){delete n._pack_next,delete n._pack_prev}function _i(n,t,e,r){var u=n.children;if(n.x=t+=r*n.x,n.y=e+=r*n.y,n.r*=r,u)for(var i=-1,o=u.length;++i<o;)_i(u[i],t,e,r)}function wi(n,t,e){var r=n.r+e.r,u=t.x-n.x,i=t.y-n.y;if(r&&(u||i)){var o=t.r+e.r,a=u*u+i*i;o*=o,r*=r;var c=.5+(r-o)/(2*a),l=Math.sqrt(Math.max(0,2*o*(r+a)-(r-=a)*r-o*o))/(2*a);e.x=n.x+c*u+l*i,e.y=n.y+c*i-l*u}else e.x=n.x+r,e.y=n.y}function Si(n,t){return n.parent==t.parent?1:2}function ki(n){var t=n.children;return t.length?t[0]:n.t}function Ei(n){var t,e=n.children;return(t=e.length)?e[t-1]:n.t}function Ai(n,t,e){var r=e/(t.i-n.i);t.c-=r,t.s+=e,n.c+=r,t.z+=e,t.m+=e}function Ni(n){for(var t,e=0,r=0,u=n.children,i=u.length;--i>=0;)t=u[i],t.z+=e,t.m+=e,e+=t.s+(r+=t.c)}function Ci(n,t,e){return n.a.parent===t.parent?n.a:e}function zi(n){return 1+ta.max(n,function(n){return n.y})}function qi(n){return n.reduce(function(n,t){return n+t.x},0)/n.length}function Li(n){var t=n.children;return t&&t.length?Li(t[0]):n}function Ti(n){var t,e=n.children;return e&&(t=e.length)?Ti(e[t-1]):n}function Ri(n){return{x:n.x,y:n.y,dx:n.dx,dy:n.dy}}function Di(n,t){var e=n.x+t[3],r=n.y+t[0],u=n.dx-t[1]-t[3],i=n.dy-t[0]-t[2];return 0>u&&(e+=u/2,u=0),0>i&&(r+=i/2,i=0),{x:e,y:r,dx:u,dy:i}}function Pi(n){var t=n[0],e=n[n.length-1];return e>t?[t,e]:[e,t]}function Ui(n){return n.rangeExtent?n.rangeExtent():Pi(n.range())}function ji(n,t,e,r){var u=e(n[0],n[1]),i=r(t[0],t[1]);return function(n){return i(u(n))}}function Fi(n,t){var e,r=0,u=n.length-1,i=n[r],o=n[u];return i>o&&(e=r,r=u,u=e,e=i,i=o,o=e),n[r]=t.floor(i),n[u]=t.ceil(o),n}function Hi(n){return n?{floor:function(t){return Math.floor(t/n)*n},ceil:function(t){return Math.ceil(t/n)*n}}:bl}function Oi(n,t,e,r){var u=[],i=[],o=0,a=Math.min(n.length,t.length)-1;for(n[a]<n[0]&&(n=n.slice().reverse(),t=t.slice().reverse());++o<=a;)u.push(e(n[o-1],n[o])),i.push(r(t[o-1],t[o]));return function(t){var e=ta.bisect(n,t,1,a)-1;return i[e](u[e](t))}}function Yi(n,t,e,r){function u(){var u=Math.min(n.length,t.length)>2?Oi:ji,c=r?Yu:Ou;return o=u(n,t,c,e),a=u(t,n,c,mu),i}function i(n){return o(n)}var o,a;return i.invert=function(n){return a(n)},i.domain=function(t){return arguments.length?(n=t.map(Number),u()):n},i.range=function(n){return arguments.length?(t=n,u()):t},i.rangeRound=function(n){return i.range(n).interpolate(Du)},i.clamp=function(n){return arguments.length?(r=n,u()):r},i.interpolate=function(n){return arguments.length?(e=n,u()):e},i.ticks=function(t){return Xi(n,t)},i.tickFormat=function(t,e){return $i(n,t,e)},i.nice=function(t){return Zi(n,t),u()},i.copy=function(){return Yi(n,t,e,r)},u()}function Ii(n,t){return ta.rebind(n,t,"range","rangeRound","interpolate","clamp")}function Zi(n,t){return Fi(n,Hi(Vi(n,t)[2]))}function Vi(n,t){null==t&&(t=10);var e=Pi(n),r=e[1]-e[0],u=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),i=t/r*u;return.15>=i?u*=10:.35>=i?u*=5:.75>=i&&(u*=2),e[0]=Math.ceil(e[0]/u)*u,e[1]=Math.floor(e[1]/u)*u+.5*u,e[2]=u,e}function Xi(n,t){return ta.range.apply(ta,Vi(n,t))}function $i(n,t,e){var r=Vi(n,t);if(e){var u=lc.exec(e);if(u.shift(),"s"===u[8]){var i=ta.formatPrefix(Math.max(va(r[0]),va(r[1])));return u[7]||(u[7]="."+Bi(i.scale(r[2]))),u[8]="f",e=ta.format(u.join("")),function(n){return e(i.scale(n))+i.symbol}}u[7]||(u[7]="."+Wi(u[8],r)),e=u.join("")}else e=",."+Bi(r[2])+"f";return ta.format(e)}function Bi(n){return-Math.floor(Math.log(n)/Math.LN10+.01)}function Wi(n,t){var e=Bi(t[2]);return n in _l?Math.abs(e-Bi(Math.max(va(t[0]),va(t[1]))))+ +("e"!==n):e-2*("%"===n)}function Ji(n,t,e,r){function u(n){return(e?Math.log(0>n?0:n):-Math.log(n>0?0:-n))/Math.log(t)}function i(n){return e?Math.pow(t,n):-Math.pow(t,-n)}function o(t){return n(u(t))}return o.invert=function(t){return i(n.invert(t))},o.domain=function(t){return arguments.length?(e=t[0]>=0,n.domain((r=t.map(Number)).map(u)),o):r},o.base=function(e){return arguments.length?(t=+e,n.domain(r.map(u)),o):t},o.nice=function(){var t=Fi(r.map(u),e?Math:Sl);return n.domain(t),r=t.map(i),o},o.ticks=function(){var n=Pi(r),o=[],a=n[0],c=n[1],l=Math.floor(u(a)),s=Math.ceil(u(c)),f=t%1?2:t;if(isFinite(s-l)){if(e){for(;s>l;l++)for(var h=1;f>h;h++)o.push(i(l)*h);o.push(i(l))}else for(o.push(i(l));l++<s;)for(var h=f-1;h>0;h--)o.push(i(l)*h);for(l=0;o[l]<a;l++);for(s=o.length;o[s-1]>c;s--);o=o.slice(l,s)}return o},o.tickFormat=function(n,t){if(!arguments.length)return wl;arguments.length<2?t=wl:"function"!=typeof t&&(t=ta.format(t));var r,a=Math.max(.1,n/o.ticks().length),c=e?(r=1e-12,Math.ceil):(r=-1e-12,Math.floor);return function(n){return n/i(c(u(n)+r))<=a?t(n):""}},o.copy=function(){return Ji(n.copy(),t,e,r)},Ii(o,n)}function Gi(n,t,e){function r(t){return n(u(t))}var u=Ki(t),i=Ki(1/t);return r.invert=function(t){return i(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain((e=t.map(Number)).map(u)),r):e},r.ticks=function(n){return Xi(e,n)},r.tickFormat=function(n,t){return $i(e,n,t)},r.nice=function(n){return r.domain(Zi(e,n))},r.exponent=function(o){return arguments.length?(u=Ki(t=o),i=Ki(1/t),n.domain(e.map(u)),r):t},r.copy=function(){return Gi(n.copy(),t,e)},Ii(r,n)}function Ki(n){return function(t){return 0>t?-Math.pow(-t,n):Math.pow(t,n)}}function Qi(n,t){function e(e){return i[((u.get(e)||("range"===t.t?u.set(e,n.push(e)):0/0))-1)%i.length]}function r(t,e){return ta.range(n.length).map(function(n){return t+e*n})}var u,i,o;return e.domain=function(r){if(!arguments.length)return n;n=[],u=new a;for(var i,o=-1,c=r.length;++o<c;)u.has(i=r[o])||u.set(i,n.push(i));return e[t.t].apply(e,t.a)},e.range=function(n){return arguments.length?(i=n,o=0,t={t:"range",a:arguments},e):i},e.rangePoints=function(u,a){arguments.length<2&&(a=0);var c=u[0],l=u[1],s=n.length<2?(c=(c+l)/2,0):(l-c)/(n.length-1+a);return i=r(c+s*a/2,s),o=0,t={t:"rangePoints",a:arguments},e},e.rangeRoundPoints=function(u,a){arguments.length<2&&(a=0);var c=u[0],l=u[1],s=n.length<2?(c=l=Math.round((c+l)/2),0):0|(l-c)/(n.length-1+a);return i=r(c+Math.round(s*a/2+(l-c-(n.length-1+a)*s)/2),s),o=0,t={t:"rangeRoundPoints",a:arguments},e},e.rangeBands=function(u,a,c){arguments.length<2&&(a=0),arguments.length<3&&(c=a);var l=u[1]<u[0],s=u[l-0],f=u[1-l],h=(f-s)/(n.length-a+2*c);return i=r(s+h*c,h),l&&i.reverse(),o=h*(1-a),t={t:"rangeBands",a:arguments},e},e.rangeRoundBands=function(u,a,c){arguments.length<2&&(a=0),arguments.length<3&&(c=a);var l=u[1]<u[0],s=u[l-0],f=u[1-l],h=Math.floor((f-s)/(n.length-a+2*c));return i=r(s+Math.round((f-s-(n.length-a)*h)/2),h),l&&i.reverse(),o=Math.round(h*(1-a)),t={t:"rangeRoundBands",a:arguments},e},e.rangeBand=function(){return o},e.rangeExtent=function(){return Pi(t.a[0])},e.copy=function(){return Qi(n,t)},e.domain(n)}function no(r,u){function i(){var n=0,t=u.length;for(a=[];++n<t;)a[n-1]=ta.quantile(r,n/t);return o}function o(n){return isNaN(n=+n)?void 0:u[ta.bisect(a,n)]}var a;return o.domain=function(u){return arguments.length?(r=u.map(t).filter(e).sort(n),i()):r},o.range=function(n){return arguments.length?(u=n,i()):u},o.quantiles=function(){return a},o.invertExtent=function(n){return n=u.indexOf(n),0>n?[0/0,0/0]:[n>0?a[n-1]:r[0],n<a.length?a[n]:r[r.length-1]]},o.copy=function(){return no(r,u)},i()}function to(n,t,e){function r(t){return e[Math.max(0,Math.min(o,Math.floor(i*(t-n))))]}function u(){return i=e.length/(t-n),o=e.length-1,r}var i,o;return r.domain=function(e){return arguments.length?(n=+e[0],t=+e[e.length-1],u()):[n,t]},r.range=function(n){return arguments.length?(e=n,u()):e},r.invertExtent=function(t){return t=e.indexOf(t),t=0>t?0/0:t/i+n,[t,t+1/i]},r.copy=function(){return to(n,t,e)},u()}function eo(n,t){function e(e){return e>=e?t[ta.bisect(n,e)]:void 0}return e.domain=function(t){return arguments.length?(n=t,e):n},e.range=function(n){return arguments.length?(t=n,e):t},e.invertExtent=function(e){return e=t.indexOf(e),[n[e-1],n[e]]},e.copy=function(){return eo(n,t)},e}function ro(n){function t(n){return+n}return t.invert=t,t.domain=t.range=function(e){return arguments.length?(n=e.map(t),t):n},t.ticks=function(t){return Xi(n,t)},t.tickFormat=function(t,e){return $i(n,t,e)},t.copy=function(){return ro(n)},t}function uo(){return 0}function io(n){return n.innerRadius}function oo(n){return n.outerRadius}function ao(n){return n.startAngle}function co(n){return n.endAngle}function lo(n){return n&&n.padAngle}function so(n,t,e,r){return(n-e)*t-(t-r)*n>0?0:1}function fo(n,t,e,r,u){var i=n[0]-t[0],o=n[1]-t[1],a=(u?r:-r)/Math.sqrt(i*i+o*o),c=a*o,l=-a*i,s=n[0]+c,f=n[1]+l,h=t[0]+c,g=t[1]+l,p=(s+h)/2,v=(f+g)/2,d=h-s,m=g-f,y=d*d+m*m,M=e-r,x=s*g-h*f,b=(0>m?-1:1)*Math.sqrt(M*M*y-x*x),_=(x*m-d*b)/y,w=(-x*d-m*b)/y,S=(x*m+d*b)/y,k=(-x*d+m*b)/y,E=_-p,A=w-v,N=S-p,C=k-v;return E*E+A*A>N*N+C*C&&(_=S,w=k),[[_-c,w-l],[_*e/M,w*e/M]]}function ho(n){function t(t){function o(){l.push("M",i(n(s),a))}for(var c,l=[],s=[],f=-1,h=t.length,g=kt(e),p=kt(r);++f<h;)u.call(this,c=t[f],f)?s.push([+g.call(this,c,f),+p.call(this,c,f)]):s.length&&(o(),s=[]);return s.length&&o(),l.length?l.join(""):null}var e=Ar,r=Nr,u=Ne,i=go,o=i.key,a=.7;return t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t.defined=function(n){return arguments.length?(u=n,t):u},t.interpolate=function(n){return arguments.length?(o="function"==typeof n?i=n:(i=zl.get(n)||go).key,t):o},t.tension=function(n){return arguments.length?(a=n,t):a},t}function go(n){return n.join("L")}function po(n){return go(n)+"Z"}function vo(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("H",(r[0]+(r=n[t])[0])/2,"V",r[1]);return e>1&&u.push("H",r[0]),u.join("")}function mo(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("V",(r=n[t])[1],"H",r[0]);return u.join("")}function yo(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("H",(r=n[t])[0],"V",r[1]);return u.join("")}function Mo(n,t){return n.length<4?go(n):n[1]+_o(n.slice(1,-1),wo(n,t))}function xo(n,t){return n.length<3?go(n):n[0]+_o((n.push(n[0]),n),wo([n[n.length-2]].concat(n,[n[1]]),t))}function bo(n,t){return n.length<3?go(n):n[0]+_o(n,wo(n,t))}function _o(n,t){if(t.length<1||n.length!=t.length&&n.length!=t.length+2)return go(n);var e=n.length!=t.length,r="",u=n[0],i=n[1],o=t[0],a=o,c=1;if(e&&(r+="Q"+(i[0]-2*o[0]/3)+","+(i[1]-2*o[1]/3)+","+i[0]+","+i[1],u=n[1],c=2),t.length>1){a=t[1],i=n[c],c++,r+="C"+(u[0]+o[0])+","+(u[1]+o[1])+","+(i[0]-a[0])+","+(i[1]-a[1])+","+i[0]+","+i[1];for(var l=2;l<t.length;l++,c++)i=n[c],a=t[l],r+="S"+(i[0]-a[0])+","+(i[1]-a[1])+","+i[0]+","+i[1]}if(e){var s=n[c];r+="Q"+(i[0]+2*a[0]/3)+","+(i[1]+2*a[1]/3)+","+s[0]+","+s[1]}return r}function wo(n,t){for(var e,r=[],u=(1-t)/2,i=n[0],o=n[1],a=1,c=n.length;++a<c;)e=i,i=o,o=n[a],r.push([u*(o[0]-e[0]),u*(o[1]-e[1])]);return r}function So(n){if(n.length<3)return go(n);var t=1,e=n.length,r=n[0],u=r[0],i=r[1],o=[u,u,u,(r=n[1])[0]],a=[i,i,i,r[1]],c=[u,",",i,"L",No(Tl,o),",",No(Tl,a)];for(n.push(n[e-1]);++t<=e;)r=n[t],o.shift(),o.push(r[0]),a.shift(),a.push(r[1]),Co(c,o,a);return n.pop(),c.push("L",r),c.join("")}function ko(n){if(n.length<4)return go(n);for(var t,e=[],r=-1,u=n.length,i=[0],o=[0];++r<3;)t=n[r],i.push(t[0]),o.push(t[1]);for(e.push(No(Tl,i)+","+No(Tl,o)),--r;++r<u;)t=n[r],i.shift(),i.push(t[0]),o.shift(),o.push(t[1]),Co(e,i,o);return e.join("")}function Eo(n){for(var t,e,r=-1,u=n.length,i=u+4,o=[],a=[];++r<4;)e=n[r%u],o.push(e[0]),a.push(e[1]);for(t=[No(Tl,o),",",No(Tl,a)],--r;++r<i;)e=n[r%u],o.shift(),o.push(e[0]),a.shift(),a.push(e[1]),Co(t,o,a);return t.join("")}function Ao(n,t){var e=n.length-1;if(e)for(var r,u,i=n[0][0],o=n[0][1],a=n[e][0]-i,c=n[e][1]-o,l=-1;++l<=e;)r=n[l],u=l/e,r[0]=t*r[0]+(1-t)*(i+u*a),r[1]=t*r[1]+(1-t)*(o+u*c);return So(n)}function No(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]*t[3]}function Co(n,t,e){n.push("C",No(ql,t),",",No(ql,e),",",No(Ll,t),",",No(Ll,e),",",No(Tl,t),",",No(Tl,e))}function zo(n,t){return(t[1]-n[1])/(t[0]-n[0])}function qo(n){for(var t=0,e=n.length-1,r=[],u=n[0],i=n[1],o=r[0]=zo(u,i);++t<e;)r[t]=(o+(o=zo(u=i,i=n[t+1])))/2;return r[t]=o,r}function Lo(n){for(var t,e,r,u,i=[],o=qo(n),a=-1,c=n.length-1;++a<c;)t=zo(n[a],n[a+1]),va(t)<Ta?o[a]=o[a+1]=0:(e=o[a]/t,r=o[a+1]/t,u=e*e+r*r,u>9&&(u=3*t/Math.sqrt(u),o[a]=u*e,o[a+1]=u*r));for(a=-1;++a<=c;)u=(n[Math.min(c,a+1)][0]-n[Math.max(0,a-1)][0])/(6*(1+o[a]*o[a])),i.push([u||0,o[a]*u||0]);return i}function To(n){return n.length<3?go(n):n[0]+_o(n,Lo(n))}function Ro(n){for(var t,e,r,u=-1,i=n.length;++u<i;)t=n[u],e=t[0],r=t[1]-ja,t[0]=e*Math.cos(r),t[1]=e*Math.sin(r);return n}function Do(n){function t(t){function c(){v.push("M",a(n(m),f),s,l(n(d.reverse()),f),"Z")}for(var h,g,p,v=[],d=[],m=[],y=-1,M=t.length,x=kt(e),b=kt(u),_=e===r?function(){return g}:kt(r),w=u===i?function(){return p}:kt(i);++y<M;)o.call(this,h=t[y],y)?(d.push([g=+x.call(this,h,y),p=+b.call(this,h,y)]),m.push([+_.call(this,h,y),+w.call(this,h,y)])):d.length&&(c(),d=[],m=[]);return d.length&&c(),v.length?v.join(""):null}var e=Ar,r=Ar,u=0,i=Nr,o=Ne,a=go,c=a.key,l=a,s="L",f=.7;return t.x=function(n){return arguments.length?(e=r=n,t):r},t.x0=function(n){return arguments.length?(e=n,t):e},t.x1=function(n){return arguments.length?(r=n,t):r},t.y=function(n){return arguments.length?(u=i=n,t):i},t.y0=function(n){return arguments.length?(u=n,t):u},t.y1=function(n){return arguments.length?(i=n,t):i},t.defined=function(n){return arguments.length?(o=n,t):o},t.interpolate=function(n){return arguments.length?(c="function"==typeof n?a=n:(a=zl.get(n)||go).key,l=a.reverse||a,s=a.closed?"M":"L",t):c },t.tension=function(n){return arguments.length?(f=n,t):f},t}function Po(n){return n.radius}function Uo(n){return[n.x,n.y]}function jo(n){return function(){var t=n.apply(this,arguments),e=t[0],r=t[1]-ja;return[e*Math.cos(r),e*Math.sin(r)]}}function Fo(){return 64}function Ho(){return"circle"}function Oo(n){var t=Math.sqrt(n/Da);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+-t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}function Yo(n){return function(){var t,e;(t=this[n])&&(e=t[t.active])&&(--t.count?(delete t[t.active],t.active+=.5):delete this[n],e.event&&e.event.interrupt.call(this,this.__data__,e.index))}}function Io(n,t,e){return xa(n,Hl),n.namespace=t,n.id=e,n}function Zo(n,t,e,r){var u=n.id,i=n.namespace;return H(n,"function"==typeof e?function(n,o,a){n[i][u].tween.set(t,r(e.call(n,n.__data__,o,a)))}:(e=r(e),function(n){n[i][u].tween.set(t,e)}))}function Vo(n){return null==n&&(n=""),function(){this.textContent=n}}function Xo(n){return null==n?"__transition__":"__transition_"+n+"__"}function $o(n,t,e,r,u){var i=n[e]||(n[e]={active:0,count:0}),o=i[r];if(!o){var c=u.time;o=i[r]={tween:new a,time:c,delay:u.delay,duration:u.duration,ease:u.ease,index:t},u=null,++i.count,ta.timer(function(u){function a(e){if(i.active>r)return s();var u=i[i.active];u&&(--i.count,delete i[i.active],u.event&&u.event.interrupt.call(n,n.__data__,u.index)),i.active=r,o.event&&o.event.start.call(n,n.__data__,t),o.tween.forEach(function(e,r){(r=r.call(n,n.__data__,t))&&v.push(r)}),h=o.ease,f=o.duration,ta.timer(function(){return p.c=l(e||1)?Ne:l,1},0,c)}function l(e){if(i.active!==r)return 1;for(var u=e/f,a=h(u),c=v.length;c>0;)v[--c].call(n,a);return u>=1?(o.event&&o.event.end.call(n,n.__data__,t),s()):void 0}function s(){return--i.count?delete i[r]:delete n[e],1}var f,h,g=o.delay,p=oc,v=[];return p.t=g+c,u>=g?a(u-g):(p.c=a,void 0)},0,c)}}function Bo(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate("+(isFinite(r)?r:e(n))+",0)"})}function Wo(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate(0,"+(isFinite(r)?r:e(n))+")"})}function Jo(n){return n.toISOString()}function Go(n,t,e){function r(t){return n(t)}function u(n,e){var r=n[1]-n[0],u=r/e,i=ta.bisect(Wl,u);return i==Wl.length?[t.year,Vi(n.map(function(n){return n/31536e6}),e)[2]]:i?t[u/Wl[i-1]<Wl[i]/u?i-1:i]:[Kl,Vi(n,e)[2]]}return r.invert=function(t){return Ko(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain(t),r):n.domain().map(Ko)},r.nice=function(n,t){function e(e){return!isNaN(e)&&!n.range(e,Ko(+e+1),t).length}var i=r.domain(),o=Pi(i),a=null==n?u(o,10):"number"==typeof n&&u(o,n);return a&&(n=a[0],t=a[1]),r.domain(Fi(i,t>1?{floor:function(t){for(;e(t=n.floor(t));)t=Ko(t-1);return t},ceil:function(t){for(;e(t=n.ceil(t));)t=Ko(+t+1);return t}}:n))},r.ticks=function(n,t){var e=Pi(r.domain()),i=null==n?u(e,10):"number"==typeof n?u(e,n):!n.range&&[{range:n},t];return i&&(n=i[0],t=i[1]),n.range(e[0],Ko(+e[1]+1),1>t?1:t)},r.tickFormat=function(){return e},r.copy=function(){return Go(n.copy(),t,e)},Ii(r,n)}function Ko(n){return new Date(n)}function Qo(n){return JSON.parse(n.responseText)}function na(n){var t=ua.createRange();return t.selectNode(ua.body),t.createContextualFragment(n.responseText)}var ta={version:"3.5.2"};Date.now||(Date.now=function(){return+new Date});var ea=[].slice,ra=function(n){return ea.call(n)},ua=document,ia=ua.documentElement,oa=window;try{ra(ia.childNodes)[0].nodeType}catch(aa){ra=function(n){for(var t=n.length,e=new Array(t);t--;)e[t]=n[t];return e}}try{ua.createElement("div").style.setProperty("opacity",0,"")}catch(ca){var la=oa.Element.prototype,sa=la.setAttribute,fa=la.setAttributeNS,ha=oa.CSSStyleDeclaration.prototype,ga=ha.setProperty;la.setAttribute=function(n,t){sa.call(this,n,t+"")},la.setAttributeNS=function(n,t,e){fa.call(this,n,t,e+"")},ha.setProperty=function(n,t,e){ga.call(this,n,t+"",e)}}ta.ascending=n,ta.descending=function(n,t){return n>t?-1:t>n?1:t>=n?0:0/0},ta.min=function(n,t){var e,r,u=-1,i=n.length;if(1===arguments.length){for(;++u<i;)if(null!=(r=n[u])&&r>=r){e=r;break}for(;++u<i;)null!=(r=n[u])&&e>r&&(e=r)}else{for(;++u<i;)if(null!=(r=t.call(n,n[u],u))&&r>=r){e=r;break}for(;++u<i;)null!=(r=t.call(n,n[u],u))&&e>r&&(e=r)}return e},ta.max=function(n,t){var e,r,u=-1,i=n.length;if(1===arguments.length){for(;++u<i;)if(null!=(r=n[u])&&r>=r){e=r;break}for(;++u<i;)null!=(r=n[u])&&r>e&&(e=r)}else{for(;++u<i;)if(null!=(r=t.call(n,n[u],u))&&r>=r){e=r;break}for(;++u<i;)null!=(r=t.call(n,n[u],u))&&r>e&&(e=r)}return e},ta.extent=function(n,t){var e,r,u,i=-1,o=n.length;if(1===arguments.length){for(;++i<o;)if(null!=(r=n[i])&&r>=r){e=u=r;break}for(;++i<o;)null!=(r=n[i])&&(e>r&&(e=r),r>u&&(u=r))}else{for(;++i<o;)if(null!=(r=t.call(n,n[i],i))&&r>=r){e=u=r;break}for(;++i<o;)null!=(r=t.call(n,n[i],i))&&(e>r&&(e=r),r>u&&(u=r))}return[e,u]},ta.sum=function(n,t){var r,u=0,i=n.length,o=-1;if(1===arguments.length)for(;++o<i;)e(r=+n[o])&&(u+=r);else for(;++o<i;)e(r=+t.call(n,n[o],o))&&(u+=r);return u},ta.mean=function(n,r){var u,i=0,o=n.length,a=-1,c=o;if(1===arguments.length)for(;++a<o;)e(u=t(n[a]))?i+=u:--c;else for(;++a<o;)e(u=t(r.call(n,n[a],a)))?i+=u:--c;return c?i/c:void 0},ta.quantile=function(n,t){var e=(n.length-1)*t+1,r=Math.floor(e),u=+n[r-1],i=e-r;return i?u+i*(n[r]-u):u},ta.median=function(r,u){var i,o=[],a=r.length,c=-1;if(1===arguments.length)for(;++c<a;)e(i=t(r[c]))&&o.push(i);else for(;++c<a;)e(i=t(u.call(r,r[c],c)))&&o.push(i);return o.length?ta.quantile(o.sort(n),.5):void 0},ta.variance=function(n,r){var u,i,o=n.length,a=0,c=0,l=-1,s=0;if(1===arguments.length)for(;++l<o;)e(u=t(n[l]))&&(i=u-a,a+=i/++s,c+=i*(u-a));else for(;++l<o;)e(u=t(r.call(n,n[l],l)))&&(i=u-a,a+=i/++s,c+=i*(u-a));return s>1?c/(s-1):void 0},ta.deviation=function(){var n=ta.variance.apply(this,arguments);return n?Math.sqrt(n):n};var pa=r(n);ta.bisectLeft=pa.left,ta.bisect=ta.bisectRight=pa.right,ta.bisector=function(t){return r(1===t.length?function(e,r){return n(t(e),r)}:t)},ta.shuffle=function(n,t,e){(i=arguments.length)<3&&(e=n.length,2>i&&(t=0));for(var r,u,i=e-t;i;)u=0|Math.random()*i--,r=n[i+t],n[i+t]=n[u+t],n[u+t]=r;return n},ta.permute=function(n,t){for(var e=t.length,r=new Array(e);e--;)r[e]=n[t[e]];return r},ta.pairs=function(n){for(var t,e=0,r=n.length-1,u=n[0],i=new Array(0>r?0:r);r>e;)i[e]=[t=u,u=n[++e]];return i},ta.zip=function(){if(!(r=arguments.length))return[];for(var n=-1,t=ta.min(arguments,u),e=new Array(t);++n<t;)for(var r,i=-1,o=e[n]=new Array(r);++i<r;)o[i]=arguments[i][n];return e},ta.transpose=function(n){return ta.zip.apply(ta,n)},ta.keys=function(n){var t=[];for(var e in n)t.push(e);return t},ta.values=function(n){var t=[];for(var e in n)t.push(n[e]);return t},ta.entries=function(n){var t=[];for(var e in n)t.push({key:e,value:n[e]});return t},ta.merge=function(n){for(var t,e,r,u=n.length,i=-1,o=0;++i<u;)o+=n[i].length;for(e=new Array(o);--u>=0;)for(r=n[u],t=r.length;--t>=0;)e[--o]=r[t];return e};var va=Math.abs;ta.range=function(n,t,e){if(arguments.length<3&&(e=1,arguments.length<2&&(t=n,n=0)),1/0===(t-n)/e)throw new Error("infinite range");var r,u=[],o=i(va(e)),a=-1;if(n*=o,t*=o,e*=o,0>e)for(;(r=n+e*++a)>t;)u.push(r/o);else for(;(r=n+e*++a)<t;)u.push(r/o);return u},ta.map=function(n,t){var e=new a;if(n instanceof a)n.forEach(function(n,t){e.set(n,t)});else if(Array.isArray(n)){var r,u=-1,i=n.length;if(1===arguments.length)for(;++u<i;)e.set(u,n[u]);else for(;++u<i;)e.set(t.call(n,r=n[u],u),r)}else for(var o in n)e.set(o,n[o]);return e};var da="__proto__",ma="\x00";o(a,{has:s,get:function(n){return this._[c(n)]},set:function(n,t){return this._[c(n)]=t},remove:f,keys:h,values:function(){var n=[];for(var t in this._)n.push(this._[t]);return n},entries:function(){var n=[];for(var t in this._)n.push({key:l(t),value:this._[t]});return n},size:g,empty:p,forEach:function(n){for(var t in this._)n.call(this,l(t),this._[t])}}),ta.nest=function(){function n(t,o,c){if(c>=i.length)return r?r.call(u,o):e?o.sort(e):o;for(var l,s,f,h,g=-1,p=o.length,v=i[c++],d=new a;++g<p;)(h=d.get(l=v(s=o[g])))?h.push(s):d.set(l,[s]);return t?(s=t(),f=function(e,r){s.set(e,n(t,r,c))}):(s={},f=function(e,r){s[e]=n(t,r,c)}),d.forEach(f),s}function t(n,e){if(e>=i.length)return n;var r=[],u=o[e++];return n.forEach(function(n,u){r.push({key:n,values:t(u,e)})}),u?r.sort(function(n,t){return u(n.key,t.key)}):r}var e,r,u={},i=[],o=[];return u.map=function(t,e){return n(e,t,0)},u.entries=function(e){return t(n(ta.map,e,0),0)},u.key=function(n){return i.push(n),u},u.sortKeys=function(n){return o[i.length-1]=n,u},u.sortValues=function(n){return e=n,u},u.rollup=function(n){return r=n,u},u},ta.set=function(n){var t=new v;if(n)for(var e=0,r=n.length;r>e;++e)t.add(n[e]);return t},o(v,{has:s,add:function(n){return this._[c(n+="")]=!0,n},remove:f,values:h,size:g,empty:p,forEach:function(n){for(var t in this._)n.call(this,l(t))}}),ta.behavior={},ta.rebind=function(n,t){for(var e,r=1,u=arguments.length;++r<u;)n[e=arguments[r]]=d(n,t,t[e]);return n};var ya=["webkit","ms","moz","Moz","o","O"];ta.dispatch=function(){for(var n=new M,t=-1,e=arguments.length;++t<e;)n[arguments[t]]=x(n);return n},M.prototype.on=function(n,t){var e=n.indexOf("."),r="";if(e>=0&&(r=n.slice(e+1),n=n.slice(0,e)),n)return arguments.length<2?this[n].on(r):this[n].on(r,t);if(2===arguments.length){if(null==t)for(n in this)this.hasOwnProperty(n)&&this[n].on(r,null);return this}},ta.event=null,ta.requote=function(n){return n.replace(Ma,"\\$&")};var Ma=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,xa={}.__proto__?function(n,t){n.__proto__=t}:function(n,t){for(var e in t)n[e]=t[e]},ba=function(n,t){return t.querySelector(n)},_a=function(n,t){return t.querySelectorAll(n)},wa=ia.matches||ia[m(ia,"matchesSelector")],Sa=function(n,t){return wa.call(n,t)};"function"==typeof Sizzle&&(ba=function(n,t){return Sizzle(n,t)[0]||null},_a=Sizzle,Sa=Sizzle.matchesSelector),ta.selection=function(){return Na};var ka=ta.selection.prototype=[];ka.select=function(n){var t,e,r,u,i=[];n=k(n);for(var o=-1,a=this.length;++o<a;){i.push(t=[]),t.parentNode=(r=this[o]).parentNode;for(var c=-1,l=r.length;++c<l;)(u=r[c])?(t.push(e=n.call(u,u.__data__,c,o)),e&&"__data__"in u&&(e.__data__=u.__data__)):t.push(null)}return S(i)},ka.selectAll=function(n){var t,e,r=[];n=E(n);for(var u=-1,i=this.length;++u<i;)for(var o=this[u],a=-1,c=o.length;++a<c;)(e=o[a])&&(r.push(t=ra(n.call(e,e.__data__,a,u))),t.parentNode=e);return S(r)};var Ea={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};ta.ns={prefix:Ea,qualify:function(n){var t=n.indexOf(":"),e=n;return t>=0&&(e=n.slice(0,t),n=n.slice(t+1)),Ea.hasOwnProperty(e)?{space:Ea[e],local:n}:n}},ka.attr=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node();return n=ta.ns.qualify(n),n.local?e.getAttributeNS(n.space,n.local):e.getAttribute(n)}for(t in n)this.each(A(t,n[t]));return this}return this.each(A(n,t))},ka.classed=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node(),r=(n=z(n)).length,u=-1;if(t=e.classList){for(;++u<r;)if(!t.contains(n[u]))return!1}else for(t=e.getAttribute("class");++u<r;)if(!C(n[u]).test(t))return!1;return!0}for(t in n)this.each(q(t,n[t]));return this}return this.each(q(n,t))},ka.style=function(n,t,e){var r=arguments.length;if(3>r){if("string"!=typeof n){2>r&&(t="");for(e in n)this.each(T(e,n[e],t));return this}if(2>r)return oa.getComputedStyle(this.node(),null).getPropertyValue(n);e=""}return this.each(T(n,t,e))},ka.property=function(n,t){if(arguments.length<2){if("string"==typeof n)return this.node()[n];for(t in n)this.each(R(t,n[t]));return this}return this.each(R(n,t))},ka.text=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.textContent=null==t?"":t}:null==n?function(){this.textContent=""}:function(){this.textContent=n}):this.node().textContent},ka.html=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.innerHTML=null==t?"":t}:null==n?function(){this.innerHTML=""}:function(){this.innerHTML=n}):this.node().innerHTML},ka.append=function(n){return n=D(n),this.select(function(){return this.appendChild(n.apply(this,arguments))})},ka.insert=function(n,t){return n=D(n),t=k(t),this.select(function(){return this.insertBefore(n.apply(this,arguments),t.apply(this,arguments)||null)})},ka.remove=function(){return this.each(P)},ka.data=function(n,t){function e(n,e){var r,u,i,o=n.length,f=e.length,h=Math.min(o,f),g=new Array(f),p=new Array(f),v=new Array(o);if(t){var d,m=new a,y=new Array(o);for(r=-1;++r<o;)m.has(d=t.call(u=n[r],u.__data__,r))?v[r]=u:m.set(d,u),y[r]=d;for(r=-1;++r<f;)(u=m.get(d=t.call(e,i=e[r],r)))?u!==!0&&(g[r]=u,u.__data__=i):p[r]=U(i),m.set(d,!0);for(r=-1;++r<o;)m.get(y[r])!==!0&&(v[r]=n[r])}else{for(r=-1;++r<h;)u=n[r],i=e[r],u?(u.__data__=i,g[r]=u):p[r]=U(i);for(;f>r;++r)p[r]=U(e[r]);for(;o>r;++r)v[r]=n[r]}p.update=g,p.parentNode=g.parentNode=v.parentNode=n.parentNode,c.push(p),l.push(g),s.push(v)}var r,u,i=-1,o=this.length;if(!arguments.length){for(n=new Array(o=(r=this[0]).length);++i<o;)(u=r[i])&&(n[i]=u.__data__);return n}var c=O([]),l=S([]),s=S([]);if("function"==typeof n)for(;++i<o;)e(r=this[i],n.call(r,r.parentNode.__data__,i));else for(;++i<o;)e(r=this[i],n);return l.enter=function(){return c},l.exit=function(){return s},l},ka.datum=function(n){return arguments.length?this.property("__data__",n):this.property("__data__")},ka.filter=function(n){var t,e,r,u=[];"function"!=typeof n&&(n=j(n));for(var i=0,o=this.length;o>i;i++){u.push(t=[]),t.parentNode=(e=this[i]).parentNode;for(var a=0,c=e.length;c>a;a++)(r=e[a])&&n.call(r,r.__data__,a,i)&&t.push(r)}return S(u)},ka.order=function(){for(var n=-1,t=this.length;++n<t;)for(var e,r=this[n],u=r.length-1,i=r[u];--u>=0;)(e=r[u])&&(i&&i!==e.nextSibling&&i.parentNode.insertBefore(e,i),i=e);return this},ka.sort=function(n){n=F.apply(this,arguments);for(var t=-1,e=this.length;++t<e;)this[t].sort(n);return this.order()},ka.each=function(n){return H(this,function(t,e,r){n.call(t,t.__data__,e,r)})},ka.call=function(n){var t=ra(arguments);return n.apply(t[0]=this,t),this},ka.empty=function(){return!this.node()},ka.node=function(){for(var n=0,t=this.length;t>n;n++)for(var e=this[n],r=0,u=e.length;u>r;r++){var i=e[r];if(i)return i}return null},ka.size=function(){var n=0;return H(this,function(){++n}),n};var Aa=[];ta.selection.enter=O,ta.selection.enter.prototype=Aa,Aa.append=ka.append,Aa.empty=ka.empty,Aa.node=ka.node,Aa.call=ka.call,Aa.size=ka.size,Aa.select=function(n){for(var t,e,r,u,i,o=[],a=-1,c=this.length;++a<c;){r=(u=this[a]).update,o.push(t=[]),t.parentNode=u.parentNode;for(var l=-1,s=u.length;++l<s;)(i=u[l])?(t.push(r[l]=e=n.call(u.parentNode,i.__data__,l,a)),e.__data__=i.__data__):t.push(null)}return S(o)},Aa.insert=function(n,t){return arguments.length<2&&(t=Y(this)),ka.insert.call(this,n,t)},ta.select=function(n){var t=["string"==typeof n?ba(n,ua):n];return t.parentNode=ia,S([t])},ta.selectAll=function(n){var t=ra("string"==typeof n?_a(n,ua):n);return t.parentNode=ia,S([t])};var Na=ta.select(ia);ka.on=function(n,t,e){var r=arguments.length;if(3>r){if("string"!=typeof n){2>r&&(t=!1);for(e in n)this.each(I(e,n[e],t));return this}if(2>r)return(r=this.node()["__on"+n])&&r._;e=!1}return this.each(I(n,t,e))};var Ca=ta.map({mouseenter:"mouseover",mouseleave:"mouseout"});Ca.forEach(function(n){"on"+n in ua&&Ca.remove(n)});var za="onselectstart"in ua?null:m(ia.style,"userSelect"),qa=0;ta.mouse=function(n){return $(n,_())};var La=/WebKit/.test(oa.navigator.userAgent)?-1:0;ta.touch=function(n,t,e){if(arguments.length<3&&(e=t,t=_().changedTouches),t)for(var r,u=0,i=t.length;i>u;++u)if((r=t[u]).identifier===e)return $(n,r)},ta.behavior.drag=function(){function n(){this.on("mousedown.drag",u).on("touchstart.drag",i)}function t(n,t,u,i,o){return function(){function a(){var n,e,r=t(h,v);r&&(n=r[0]-M[0],e=r[1]-M[1],p|=n|e,M=r,g({type:"drag",x:r[0]+l[0],y:r[1]+l[1],dx:n,dy:e}))}function c(){t(h,v)&&(m.on(i+d,null).on(o+d,null),y(p&&ta.event.target===f),g({type:"dragend"}))}var l,s=this,f=ta.event.target,h=s.parentNode,g=e.of(s,arguments),p=0,v=n(),d=".drag"+(null==v?"":"-"+v),m=ta.select(u()).on(i+d,a).on(o+d,c),y=X(),M=t(h,v);r?(l=r.apply(s,arguments),l=[l.x-M[0],l.y-M[1]]):l=[0,0],g({type:"dragstart"})}}var e=w(n,"drag","dragstart","dragend"),r=null,u=t(y,ta.mouse,J,"mousemove","mouseup"),i=t(B,ta.touch,W,"touchmove","touchend");return n.origin=function(t){return arguments.length?(r=t,n):r},ta.rebind(n,e,"on")},ta.touches=function(n,t){return arguments.length<2&&(t=_().touches),t?ra(t).map(function(t){var e=$(n,t);return e.identifier=t.identifier,e}):[]};var Ta=1e-6,Ra=Ta*Ta,Da=Math.PI,Pa=2*Da,Ua=Pa-Ta,ja=Da/2,Fa=Da/180,Ha=180/Da,Oa=Math.SQRT2,Ya=2,Ia=4;ta.interpolateZoom=function(n,t){function e(n){var t=n*y;if(m){var e=et(v),o=i/(Ya*h)*(e*rt(Oa*t+v)-tt(v));return[r+o*l,u+o*s,i*e/et(Oa*t+v)]}return[r+n*l,u+n*s,i*Math.exp(Oa*t)]}var r=n[0],u=n[1],i=n[2],o=t[0],a=t[1],c=t[2],l=o-r,s=a-u,f=l*l+s*s,h=Math.sqrt(f),g=(c*c-i*i+Ia*f)/(2*i*Ya*h),p=(c*c-i*i-Ia*f)/(2*c*Ya*h),v=Math.log(Math.sqrt(g*g+1)-g),d=Math.log(Math.sqrt(p*p+1)-p),m=d-v,y=(m||Math.log(c/i))/Oa;return e.duration=1e3*y,e},ta.behavior.zoom=function(){function n(n){n.on(z,s).on(Xa+".zoom",h).on("dblclick.zoom",g).on(T,f)}function t(n){return[(n[0]-k.x)/k.k,(n[1]-k.y)/k.k]}function e(n){return[n[0]*k.k+k.x,n[1]*k.k+k.y]}function r(n){k.k=Math.max(A[0],Math.min(A[1],n))}function u(n,t){t=e(t),k.x+=n[0]-t[0],k.y+=n[1]-t[1]}function i(t,e,i,o){t.__chart__={x:k.x,y:k.y,k:k.k},r(Math.pow(2,o)),u(v=e,i),t=ta.select(t),N>0&&(t=t.transition().duration(N)),t.call(n.event)}function o(){x&&x.domain(M.range().map(function(n){return(n-k.x)/k.k}).map(M.invert)),S&&S.domain(_.range().map(function(n){return(n-k.y)/k.k}).map(_.invert))}function a(n){C++||n({type:"zoomstart"})}function c(n){o(),n({type:"zoom",scale:k.k,translate:[k.x,k.y]})}function l(n){--C||n({type:"zoomend"}),v=null}function s(){function n(){s=1,u(ta.mouse(r),h),c(o)}function e(){f.on(q,null).on(L,null),g(s&&ta.event.target===i),l(o)}var r=this,i=ta.event.target,o=R.of(r,arguments),s=0,f=ta.select(oa).on(q,n).on(L,e),h=t(ta.mouse(r)),g=X();Fl.call(r),a(o)}function f(){function n(){var n=ta.touches(p);return g=k.k,n.forEach(function(n){n.identifier in d&&(d[n.identifier]=t(n))}),n}function e(){var t=ta.event.target;ta.select(t).on(x,o).on(_,h),w.push(t);for(var e=ta.event.changedTouches,r=0,u=e.length;u>r;++r)d[e[r].identifier]=null;var a=n(),c=Date.now();if(1===a.length){if(500>c-y){var l=a[0];i(p,l,d[l.identifier],Math.floor(Math.log(k.k)/Math.LN2)+1),b()}y=c}else if(a.length>1){var l=a[0],s=a[1],f=l[0]-s[0],g=l[1]-s[1];m=f*f+g*g}}function o(){var n,t,e,i,o=ta.touches(p);Fl.call(p);for(var a=0,l=o.length;l>a;++a,i=null)if(e=o[a],i=d[e.identifier]){if(t)break;n=e,t=i}if(i){var s=(s=e[0]-n[0])*s+(s=e[1]-n[1])*s,f=m&&Math.sqrt(s/m);n=[(n[0]+e[0])/2,(n[1]+e[1])/2],t=[(t[0]+i[0])/2,(t[1]+i[1])/2],r(f*g)}y=null,u(n,t),c(v)}function h(){if(ta.event.touches.length){for(var t=ta.event.changedTouches,e=0,r=t.length;r>e;++e)delete d[t[e].identifier];for(var u in d)return void n()}ta.selectAll(w).on(M,null),S.on(z,s).on(T,f),E(),l(v)}var g,p=this,v=R.of(p,arguments),d={},m=0,M=".zoom-"+ta.event.changedTouches[0].identifier,x="touchmove"+M,_="touchend"+M,w=[],S=ta.select(p),E=X();e(),a(v),S.on(z,null).on(T,e)}function h(){var n=R.of(this,arguments);m?clearTimeout(m):(p=t(v=d||ta.mouse(this)),Fl.call(this),a(n)),m=setTimeout(function(){m=null,l(n)},50),b(),r(Math.pow(2,.002*Za())*k.k),u(v,p),c(n)}function g(){var n=ta.mouse(this),e=Math.log(k.k)/Math.LN2;i(this,n,t(n),ta.event.shiftKey?Math.ceil(e)-1:Math.floor(e)+1)}var p,v,d,m,y,M,x,_,S,k={x:0,y:0,k:1},E=[960,500],A=Va,N=250,C=0,z="mousedown.zoom",q="mousemove.zoom",L="mouseup.zoom",T="touchstart.zoom",R=w(n,"zoomstart","zoom","zoomend");return n.event=function(n){n.each(function(){var n=R.of(this,arguments),t=k;Ul?ta.select(this).transition().each("start.zoom",function(){k=this.__chart__||{x:0,y:0,k:1},a(n)}).tween("zoom:zoom",function(){var e=E[0],r=E[1],u=v?v[0]:e/2,i=v?v[1]:r/2,o=ta.interpolateZoom([(u-k.x)/k.k,(i-k.y)/k.k,e/k.k],[(u-t.x)/t.k,(i-t.y)/t.k,e/t.k]);return function(t){var r=o(t),a=e/r[2];this.__chart__=k={x:u-r[0]*a,y:i-r[1]*a,k:a},c(n)}}).each("interrupt.zoom",function(){l(n)}).each("end.zoom",function(){l(n)}):(this.__chart__=k,a(n),c(n),l(n))})},n.translate=function(t){return arguments.length?(k={x:+t[0],y:+t[1],k:k.k},o(),n):[k.x,k.y]},n.scale=function(t){return arguments.length?(k={x:k.x,y:k.y,k:+t},o(),n):k.k},n.scaleExtent=function(t){return arguments.length?(A=null==t?Va:[+t[0],+t[1]],n):A},n.center=function(t){return arguments.length?(d=t&&[+t[0],+t[1]],n):d},n.size=function(t){return arguments.length?(E=t&&[+t[0],+t[1]],n):E},n.duration=function(t){return arguments.length?(N=+t,n):N},n.x=function(t){return arguments.length?(x=t,M=t.copy(),k={x:0,y:0,k:1},n):x},n.y=function(t){return arguments.length?(S=t,_=t.copy(),k={x:0,y:0,k:1},n):S},ta.rebind(n,R,"on")};var Za,Va=[0,1/0],Xa="onwheel"in ua?(Za=function(){return-ta.event.deltaY*(ta.event.deltaMode?120:1)},"wheel"):"onmousewheel"in ua?(Za=function(){return ta.event.wheelDelta},"mousewheel"):(Za=function(){return-ta.event.detail},"MozMousePixelScroll");ta.color=it,it.prototype.toString=function(){return this.rgb()+""},ta.hsl=ot;var $a=ot.prototype=new it;$a.brighter=function(n){return n=Math.pow(.7,arguments.length?n:1),new ot(this.h,this.s,this.l/n)},$a.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new ot(this.h,this.s,n*this.l)},$a.rgb=function(){return at(this.h,this.s,this.l)},ta.hcl=ct;var Ba=ct.prototype=new it;Ba.brighter=function(n){return new ct(this.h,this.c,Math.min(100,this.l+Wa*(arguments.length?n:1)))},Ba.darker=function(n){return new ct(this.h,this.c,Math.max(0,this.l-Wa*(arguments.length?n:1)))},Ba.rgb=function(){return lt(this.h,this.c,this.l).rgb()},ta.lab=st;var Wa=18,Ja=.95047,Ga=1,Ka=1.08883,Qa=st.prototype=new it;Qa.brighter=function(n){return new st(Math.min(100,this.l+Wa*(arguments.length?n:1)),this.a,this.b)},Qa.darker=function(n){return new st(Math.max(0,this.l-Wa*(arguments.length?n:1)),this.a,this.b)},Qa.rgb=function(){return ft(this.l,this.a,this.b)},ta.rgb=dt;var nc=dt.prototype=new it;nc.brighter=function(n){n=Math.pow(.7,arguments.length?n:1);var t=this.r,e=this.g,r=this.b,u=30;return t||e||r?(t&&u>t&&(t=u),e&&u>e&&(e=u),r&&u>r&&(r=u),new dt(Math.min(255,t/n),Math.min(255,e/n),Math.min(255,r/n))):new dt(u,u,u)},nc.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new dt(n*this.r,n*this.g,n*this.b)},nc.hsl=function(){return bt(this.r,this.g,this.b)},nc.toString=function(){return"#"+Mt(this.r)+Mt(this.g)+Mt(this.b)};var tc=ta.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});tc.forEach(function(n,t){tc.set(n,mt(t))}),ta.functor=kt,ta.xhr=At(Et),ta.dsv=function(n,t){function e(n,e,i){arguments.length<3&&(i=e,e=null);var o=Nt(n,t,null==e?r:u(e),i);return o.row=function(n){return arguments.length?o.response(null==(e=n)?r:u(n)):e},o}function r(n){return e.parse(n.responseText)}function u(n){return function(t){return e.parse(t.responseText,n)}}function i(t){return t.map(o).join(n)}function o(n){return a.test(n)?'"'+n.replace(/\"/g,'""')+'"':n}var a=new RegExp('["'+n+"\n]"),c=n.charCodeAt(0);return e.parse=function(n,t){var r;return e.parseRows(n,function(n,e){if(r)return r(n,e-1);var u=new Function("d","return {"+n.map(function(n,t){return JSON.stringify(n)+": d["+t+"]"}).join(",")+"}");r=t?function(n,e){return t(u(n),e)}:u})},e.parseRows=function(n,t){function e(){if(s>=l)return o;if(u)return u=!1,i;var t=s;if(34===n.charCodeAt(t)){for(var e=t;e++<l;)if(34===n.charCodeAt(e)){if(34!==n.charCodeAt(e+1))break;++e}s=e+2;var r=n.charCodeAt(e+1);return 13===r?(u=!0,10===n.charCodeAt(e+2)&&++s):10===r&&(u=!0),n.slice(t+1,e).replace(/""/g,'"')}for(;l>s;){var r=n.charCodeAt(s++),a=1;if(10===r)u=!0;else if(13===r)u=!0,10===n.charCodeAt(s)&&(++s,++a);else if(r!==c)continue;return n.slice(t,s-a)}return n.slice(t)}for(var r,u,i={},o={},a=[],l=n.length,s=0,f=0;(r=e())!==o;){for(var h=[];r!==i&&r!==o;)h.push(r),r=e();t&&null==(h=t(h,f++))||a.push(h)}return a},e.format=function(t){if(Array.isArray(t[0]))return e.formatRows(t);var r=new v,u=[];return t.forEach(function(n){for(var t in n)r.has(t)||u.push(r.add(t))}),[u.map(o).join(n)].concat(t.map(function(t){return u.map(function(n){return o(t[n])}).join(n)})).join("\n")},e.formatRows=function(n){return n.map(i).join("\n")},e},ta.csv=ta.dsv(",","text/csv"),ta.tsv=ta.dsv(" ","text/tab-separated-values");var ec,rc,uc,ic,oc,ac=oa[m(oa,"requestAnimationFrame")]||function(n){setTimeout(n,17)};ta.timer=function(n,t,e){var r=arguments.length;2>r&&(t=0),3>r&&(e=Date.now());var u=e+t,i={c:n,t:u,f:!1,n:null};rc?rc.n=i:ec=i,rc=i,uc||(ic=clearTimeout(ic),uc=1,ac(qt))},ta.timer.flush=function(){Lt(),Tt()},ta.round=function(n,t){return t?Math.round(n*(t=Math.pow(10,t)))/t:Math.round(n)};var cc=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"].map(Dt);ta.formatPrefix=function(n,t){var e=0;return n&&(0>n&&(n*=-1),t&&(n=ta.round(n,Rt(n,t))),e=1+Math.floor(1e-12+Math.log(n)/Math.LN10),e=Math.max(-24,Math.min(24,3*Math.floor((e-1)/3)))),cc[8+e/3]};var lc=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,sc=ta.map({b:function(n){return n.toString(2)},c:function(n){return String.fromCharCode(n)},o:function(n){return n.toString(8)},x:function(n){return n.toString(16)},X:function(n){return n.toString(16).toUpperCase()},g:function(n,t){return n.toPrecision(t)},e:function(n,t){return n.toExponential(t)},f:function(n,t){return n.toFixed(t)},r:function(n,t){return(n=ta.round(n,Rt(n,t))).toFixed(Math.max(0,Math.min(20,Rt(n*(1+1e-15),t))))}}),fc=ta.time={},hc=Date;jt.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){gc.setUTCDate.apply(this._,arguments)},setDay:function(){gc.setUTCDay.apply(this._,arguments)},setFullYear:function(){gc.setUTCFullYear.apply(this._,arguments)},setHours:function(){gc.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){gc.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){gc.setUTCMinutes.apply(this._,arguments)},setMonth:function(){gc.setUTCMonth.apply(this._,arguments)},setSeconds:function(){gc.setUTCSeconds.apply(this._,arguments)},setTime:function(){gc.setTime.apply(this._,arguments)}};var gc=Date.prototype;fc.year=Ft(function(n){return n=fc.day(n),n.setMonth(0,1),n},function(n,t){n.setFullYear(n.getFullYear()+t)},function(n){return n.getFullYear()}),fc.years=fc.year.range,fc.years.utc=fc.year.utc.range,fc.day=Ft(function(n){var t=new hc(2e3,0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t},function(n,t){n.setDate(n.getDate()+t)},function(n){return n.getDate()-1}),fc.days=fc.day.range,fc.days.utc=fc.day.utc.range,fc.dayOfYear=function(n){var t=fc.year(n);return Math.floor((n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(n,t){t=7-t;var e=fc[n]=Ft(function(n){return(n=fc.day(n)).setDate(n.getDate()-(n.getDay()+t)%7),n},function(n,t){n.setDate(n.getDate()+7*Math.floor(t))},function(n){var e=fc.year(n).getDay();return Math.floor((fc.dayOfYear(n)+(e+t)%7)/7)-(e!==t)});fc[n+"s"]=e.range,fc[n+"s"].utc=e.utc.range,fc[n+"OfYear"]=function(n){var e=fc.year(n).getDay();return Math.floor((fc.dayOfYear(n)+(e+t)%7)/7)}}),fc.week=fc.sunday,fc.weeks=fc.sunday.range,fc.weeks.utc=fc.sunday.utc.range,fc.weekOfYear=fc.sundayOfYear;var pc={"-":"",_:" ",0:"0"},vc=/^\s*\d+/,dc=/^%/;ta.locale=function(n){return{numberFormat:Pt(n),timeFormat:Ot(n)}};var mc=ta.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",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"]});ta.format=mc.numberFormat,ta.geo={},ce.prototype={s:0,t:0,add:function(n){le(n,this.t,yc),le(yc.s,this.s,this),this.s?this.t+=yc.t:this.s=yc.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var yc=new ce;ta.geo.stream=function(n,t){n&&Mc.hasOwnProperty(n.type)?Mc[n.type](n,t):se(n,t)};var Mc={Feature:function(n,t){se(n.geometry,t)},FeatureCollection:function(n,t){for(var e=n.features,r=-1,u=e.length;++r<u;)se(e[r].geometry,t)}},xc={Sphere:function(n,t){t.sphere()},Point:function(n,t){n=n.coordinates,t.point(n[0],n[1],n[2])},MultiPoint:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)n=e[r],t.point(n[0],n[1],n[2]) },LineString:function(n,t){fe(n.coordinates,t,0)},MultiLineString:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)fe(e[r],t,0)},Polygon:function(n,t){he(n.coordinates,t)},MultiPolygon:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)he(e[r],t)},GeometryCollection:function(n,t){for(var e=n.geometries,r=-1,u=e.length;++r<u;)se(e[r],t)}};ta.geo.area=function(n){return bc=0,ta.geo.stream(n,wc),bc};var bc,_c=new ce,wc={sphere:function(){bc+=4*Da},point:y,lineStart:y,lineEnd:y,polygonStart:function(){_c.reset(),wc.lineStart=ge},polygonEnd:function(){var n=2*_c;bc+=0>n?4*Da+n:n,wc.lineStart=wc.lineEnd=wc.point=y}};ta.geo.bounds=function(){function n(n,t){M.push(x=[s=n,h=n]),f>t&&(f=t),t>g&&(g=t)}function t(t,e){var r=pe([t*Fa,e*Fa]);if(m){var u=de(m,r),i=[u[1],-u[0],0],o=de(i,u);Me(o),o=xe(o);var c=t-p,l=c>0?1:-1,v=o[0]*Ha*l,d=va(c)>180;if(d^(v>l*p&&l*t>v)){var y=o[1]*Ha;y>g&&(g=y)}else if(v=(v+360)%360-180,d^(v>l*p&&l*t>v)){var y=-o[1]*Ha;f>y&&(f=y)}else f>e&&(f=e),e>g&&(g=e);d?p>t?a(s,t)>a(s,h)&&(h=t):a(t,h)>a(s,h)&&(s=t):h>=s?(s>t&&(s=t),t>h&&(h=t)):t>p?a(s,t)>a(s,h)&&(h=t):a(t,h)>a(s,h)&&(s=t)}else n(t,e);m=r,p=t}function e(){b.point=t}function r(){x[0]=s,x[1]=h,b.point=n,m=null}function u(n,e){if(m){var r=n-p;y+=va(r)>180?r+(r>0?360:-360):r}else v=n,d=e;wc.point(n,e),t(n,e)}function i(){wc.lineStart()}function o(){u(v,d),wc.lineEnd(),va(y)>Ta&&(s=-(h=180)),x[0]=s,x[1]=h,m=null}function a(n,t){return(t-=n)<0?t+360:t}function c(n,t){return n[0]-t[0]}function l(n,t){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:n<t[0]||t[1]<n}var s,f,h,g,p,v,d,m,y,M,x,b={point:n,lineStart:e,lineEnd:r,polygonStart:function(){b.point=u,b.lineStart=i,b.lineEnd=o,y=0,wc.polygonStart()},polygonEnd:function(){wc.polygonEnd(),b.point=n,b.lineStart=e,b.lineEnd=r,0>_c?(s=-(h=180),f=-(g=90)):y>Ta?g=90:-Ta>y&&(f=-90),x[0]=s,x[1]=h}};return function(n){g=h=-(s=f=1/0),M=[],ta.geo.stream(n,b);var t=M.length;if(t){M.sort(c);for(var e,r=1,u=M[0],i=[u];t>r;++r)e=M[r],l(e[0],u)||l(e[1],u)?(a(u[0],e[1])>a(u[0],u[1])&&(u[1]=e[1]),a(e[0],u[1])>a(u[0],u[1])&&(u[0]=e[0])):i.push(u=e);for(var o,e,p=-1/0,t=i.length-1,r=0,u=i[t];t>=r;u=e,++r)e=i[r],(o=a(u[1],e[0]))>p&&(p=o,s=e[0],h=u[1])}return M=x=null,1/0===s||1/0===f?[[0/0,0/0],[0/0,0/0]]:[[s,f],[h,g]]}}(),ta.geo.centroid=function(n){Sc=kc=Ec=Ac=Nc=Cc=zc=qc=Lc=Tc=Rc=0,ta.geo.stream(n,Dc);var t=Lc,e=Tc,r=Rc,u=t*t+e*e+r*r;return Ra>u&&(t=Cc,e=zc,r=qc,Ta>kc&&(t=Ec,e=Ac,r=Nc),u=t*t+e*e+r*r,Ra>u)?[0/0,0/0]:[Math.atan2(e,t)*Ha,nt(r/Math.sqrt(u))*Ha]};var Sc,kc,Ec,Ac,Nc,Cc,zc,qc,Lc,Tc,Rc,Dc={sphere:y,point:_e,lineStart:Se,lineEnd:ke,polygonStart:function(){Dc.lineStart=Ee},polygonEnd:function(){Dc.lineStart=Se}},Pc=Le(Ne,Pe,je,[-Da,-Da/2]),Uc=1e9;ta.geo.clipExtent=function(){var n,t,e,r,u,i,o={stream:function(n){return u&&(u.valid=!1),u=i(n),u.valid=!0,u},extent:function(a){return arguments.length?(i=Ye(n=+a[0][0],t=+a[0][1],e=+a[1][0],r=+a[1][1]),u&&(u.valid=!1,u=null),o):[[n,t],[e,r]]}};return o.extent([[0,0],[960,500]])},(ta.geo.conicEqualArea=function(){return Ie(Ze)}).raw=Ze,ta.geo.albers=function(){return ta.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},ta.geo.albersUsa=function(){function n(n){var i=n[0],o=n[1];return t=null,e(i,o),t||(r(i,o),t)||u(i,o),t}var t,e,r,u,i=ta.geo.albers(),o=ta.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),a=ta.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),c={point:function(n,e){t=[n,e]}};return n.invert=function(n){var t=i.scale(),e=i.translate(),r=(n[0]-e[0])/t,u=(n[1]-e[1])/t;return(u>=.12&&.234>u&&r>=-.425&&-.214>r?o:u>=.166&&.234>u&&r>=-.214&&-.115>r?a:i).invert(n)},n.stream=function(n){var t=i.stream(n),e=o.stream(n),r=a.stream(n);return{point:function(n,u){t.point(n,u),e.point(n,u),r.point(n,u)},sphere:function(){t.sphere(),e.sphere(),r.sphere()},lineStart:function(){t.lineStart(),e.lineStart(),r.lineStart()},lineEnd:function(){t.lineEnd(),e.lineEnd(),r.lineEnd()},polygonStart:function(){t.polygonStart(),e.polygonStart(),r.polygonStart()},polygonEnd:function(){t.polygonEnd(),e.polygonEnd(),r.polygonEnd()}}},n.precision=function(t){return arguments.length?(i.precision(t),o.precision(t),a.precision(t),n):i.precision()},n.scale=function(t){return arguments.length?(i.scale(t),o.scale(.35*t),a.scale(t),n.translate(i.translate())):i.scale()},n.translate=function(t){if(!arguments.length)return i.translate();var l=i.scale(),s=+t[0],f=+t[1];return e=i.translate(t).clipExtent([[s-.455*l,f-.238*l],[s+.455*l,f+.238*l]]).stream(c).point,r=o.translate([s-.307*l,f+.201*l]).clipExtent([[s-.425*l+Ta,f+.12*l+Ta],[s-.214*l-Ta,f+.234*l-Ta]]).stream(c).point,u=a.translate([s-.205*l,f+.212*l]).clipExtent([[s-.214*l+Ta,f+.166*l+Ta],[s-.115*l-Ta,f+.234*l-Ta]]).stream(c).point,n},n.scale(1070)};var jc,Fc,Hc,Oc,Yc,Ic,Zc={point:y,lineStart:y,lineEnd:y,polygonStart:function(){Fc=0,Zc.lineStart=Ve},polygonEnd:function(){Zc.lineStart=Zc.lineEnd=Zc.point=y,jc+=va(Fc/2)}},Vc={point:Xe,lineStart:y,lineEnd:y,polygonStart:y,polygonEnd:y},Xc={point:We,lineStart:Je,lineEnd:Ge,polygonStart:function(){Xc.lineStart=Ke},polygonEnd:function(){Xc.point=We,Xc.lineStart=Je,Xc.lineEnd=Ge}};ta.geo.path=function(){function n(n){return n&&("function"==typeof a&&i.pointRadius(+a.apply(this,arguments)),o&&o.valid||(o=u(i)),ta.geo.stream(n,o)),i.result()}function t(){return o=null,n}var e,r,u,i,o,a=4.5;return n.area=function(n){return jc=0,ta.geo.stream(n,u(Zc)),jc},n.centroid=function(n){return Ec=Ac=Nc=Cc=zc=qc=Lc=Tc=Rc=0,ta.geo.stream(n,u(Xc)),Rc?[Lc/Rc,Tc/Rc]:qc?[Cc/qc,zc/qc]:Nc?[Ec/Nc,Ac/Nc]:[0/0,0/0]},n.bounds=function(n){return Yc=Ic=-(Hc=Oc=1/0),ta.geo.stream(n,u(Vc)),[[Hc,Oc],[Yc,Ic]]},n.projection=function(n){return arguments.length?(u=(e=n)?n.stream||tr(n):Et,t()):e},n.context=function(n){return arguments.length?(i=null==(r=n)?new $e:new Qe(n),"function"!=typeof a&&i.pointRadius(a),t()):r},n.pointRadius=function(t){return arguments.length?(a="function"==typeof t?t:(i.pointRadius(+t),+t),n):a},n.projection(ta.geo.albersUsa()).context(null)},ta.geo.transform=function(n){return{stream:function(t){var e=new er(t);for(var r in n)e[r]=n[r];return e}}},er.prototype={point:function(n,t){this.stream.point(n,t)},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()}},ta.geo.projection=ur,ta.geo.projectionMutator=ir,(ta.geo.equirectangular=function(){return ur(ar)}).raw=ar.invert=ar,ta.geo.rotation=function(n){function t(t){return t=n(t[0]*Fa,t[1]*Fa),t[0]*=Ha,t[1]*=Ha,t}return n=lr(n[0]%360*Fa,n[1]*Fa,n.length>2?n[2]*Fa:0),t.invert=function(t){return t=n.invert(t[0]*Fa,t[1]*Fa),t[0]*=Ha,t[1]*=Ha,t},t},cr.invert=ar,ta.geo.circle=function(){function n(){var n="function"==typeof r?r.apply(this,arguments):r,t=lr(-n[0]*Fa,-n[1]*Fa,0).invert,u=[];return e(null,null,1,{point:function(n,e){u.push(n=t(n,e)),n[0]*=Ha,n[1]*=Ha}}),{type:"Polygon",coordinates:[u]}}var t,e,r=[0,0],u=6;return n.origin=function(t){return arguments.length?(r=t,n):r},n.angle=function(r){return arguments.length?(e=gr((t=+r)*Fa,u*Fa),n):t},n.precision=function(r){return arguments.length?(e=gr(t*Fa,(u=+r)*Fa),n):u},n.angle(90)},ta.geo.distance=function(n,t){var e,r=(t[0]-n[0])*Fa,u=n[1]*Fa,i=t[1]*Fa,o=Math.sin(r),a=Math.cos(r),c=Math.sin(u),l=Math.cos(u),s=Math.sin(i),f=Math.cos(i);return Math.atan2(Math.sqrt((e=f*o)*e+(e=l*s-c*f*a)*e),c*s+l*f*a)},ta.geo.graticule=function(){function n(){return{type:"MultiLineString",coordinates:t()}}function t(){return ta.range(Math.ceil(i/d)*d,u,d).map(h).concat(ta.range(Math.ceil(l/m)*m,c,m).map(g)).concat(ta.range(Math.ceil(r/p)*p,e,p).filter(function(n){return va(n%d)>Ta}).map(s)).concat(ta.range(Math.ceil(a/v)*v,o,v).filter(function(n){return va(n%m)>Ta}).map(f))}var e,r,u,i,o,a,c,l,s,f,h,g,p=10,v=p,d=90,m=360,y=2.5;return n.lines=function(){return t().map(function(n){return{type:"LineString",coordinates:n}})},n.outline=function(){return{type:"Polygon",coordinates:[h(i).concat(g(c).slice(1),h(u).reverse().slice(1),g(l).reverse().slice(1))]}},n.extent=function(t){return arguments.length?n.majorExtent(t).minorExtent(t):n.minorExtent()},n.majorExtent=function(t){return arguments.length?(i=+t[0][0],u=+t[1][0],l=+t[0][1],c=+t[1][1],i>u&&(t=i,i=u,u=t),l>c&&(t=l,l=c,c=t),n.precision(y)):[[i,l],[u,c]]},n.minorExtent=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],a=+t[0][1],o=+t[1][1],r>e&&(t=r,r=e,e=t),a>o&&(t=a,a=o,o=t),n.precision(y)):[[r,a],[e,o]]},n.step=function(t){return arguments.length?n.majorStep(t).minorStep(t):n.minorStep()},n.majorStep=function(t){return arguments.length?(d=+t[0],m=+t[1],n):[d,m]},n.minorStep=function(t){return arguments.length?(p=+t[0],v=+t[1],n):[p,v]},n.precision=function(t){return arguments.length?(y=+t,s=vr(a,o,90),f=dr(r,e,y),h=vr(l,c,90),g=dr(i,u,y),n):y},n.majorExtent([[-180,-90+Ta],[180,90-Ta]]).minorExtent([[-180,-80-Ta],[180,80+Ta]])},ta.geo.greatArc=function(){function n(){return{type:"LineString",coordinates:[t||r.apply(this,arguments),e||u.apply(this,arguments)]}}var t,e,r=mr,u=yr;return n.distance=function(){return ta.geo.distance(t||r.apply(this,arguments),e||u.apply(this,arguments))},n.source=function(e){return arguments.length?(r=e,t="function"==typeof e?null:e,n):r},n.target=function(t){return arguments.length?(u=t,e="function"==typeof t?null:t,n):u},n.precision=function(){return arguments.length?n:0},n},ta.geo.interpolate=function(n,t){return Mr(n[0]*Fa,n[1]*Fa,t[0]*Fa,t[1]*Fa)},ta.geo.length=function(n){return $c=0,ta.geo.stream(n,Bc),$c};var $c,Bc={sphere:y,point:y,lineStart:xr,lineEnd:y,polygonStart:y,polygonEnd:y},Wc=br(function(n){return Math.sqrt(2/(1+n))},function(n){return 2*Math.asin(n/2)});(ta.geo.azimuthalEqualArea=function(){return ur(Wc)}).raw=Wc;var Jc=br(function(n){var t=Math.acos(n);return t&&t/Math.sin(t)},Et);(ta.geo.azimuthalEquidistant=function(){return ur(Jc)}).raw=Jc,(ta.geo.conicConformal=function(){return Ie(_r)}).raw=_r,(ta.geo.conicEquidistant=function(){return Ie(wr)}).raw=wr;var Gc=br(function(n){return 1/n},Math.atan);(ta.geo.gnomonic=function(){return ur(Gc)}).raw=Gc,Sr.invert=function(n,t){return[n,2*Math.atan(Math.exp(t))-ja]},(ta.geo.mercator=function(){return kr(Sr)}).raw=Sr;var Kc=br(function(){return 1},Math.asin);(ta.geo.orthographic=function(){return ur(Kc)}).raw=Kc;var Qc=br(function(n){return 1/(1+n)},function(n){return 2*Math.atan(n)});(ta.geo.stereographic=function(){return ur(Qc)}).raw=Qc,Er.invert=function(n,t){return[-t,2*Math.atan(Math.exp(n))-ja]},(ta.geo.transverseMercator=function(){var n=kr(Er),t=n.center,e=n.rotate;return n.center=function(n){return n?t([-n[1],n[0]]):(n=t(),[n[1],-n[0]])},n.rotate=function(n){return n?e([n[0],n[1],n.length>2?n[2]+90:90]):(n=e(),[n[0],n[1],n[2]-90])},e([0,0,90])}).raw=Er,ta.geom={},ta.geom.hull=function(n){function t(n){if(n.length<3)return[];var t,u=kt(e),i=kt(r),o=n.length,a=[],c=[];for(t=0;o>t;t++)a.push([+u.call(this,n[t],t),+i.call(this,n[t],t),t]);for(a.sort(zr),t=0;o>t;t++)c.push([a[t][0],-a[t][1]]);var l=Cr(a),s=Cr(c),f=s[0]===l[0],h=s[s.length-1]===l[l.length-1],g=[];for(t=l.length-1;t>=0;--t)g.push(n[a[l[t]][2]]);for(t=+f;t<s.length-h;++t)g.push(n[a[s[t]][2]]);return g}var e=Ar,r=Nr;return arguments.length?t(n):(t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t)},ta.geom.polygon=function(n){return xa(n,nl),n};var nl=ta.geom.polygon.prototype=[];nl.area=function(){for(var n,t=-1,e=this.length,r=this[e-1],u=0;++t<e;)n=r,r=this[t],u+=n[1]*r[0]-n[0]*r[1];return.5*u},nl.centroid=function(n){var t,e,r=-1,u=this.length,i=0,o=0,a=this[u-1];for(arguments.length||(n=-1/(6*this.area()));++r<u;)t=a,a=this[r],e=t[0]*a[1]-a[0]*t[1],i+=(t[0]+a[0])*e,o+=(t[1]+a[1])*e;return[i*n,o*n]},nl.clip=function(n){for(var t,e,r,u,i,o,a=Tr(n),c=-1,l=this.length-Tr(this),s=this[l-1];++c<l;){for(t=n.slice(),n.length=0,u=this[c],i=t[(r=t.length-a)-1],e=-1;++e<r;)o=t[e],qr(o,s,u)?(qr(i,s,u)||n.push(Lr(i,o,s,u)),n.push(o)):qr(i,s,u)&&n.push(Lr(i,o,s,u)),i=o;a&&n.push(n[0]),s=u}return n};var tl,el,rl,ul,il,ol=[],al=[];Or.prototype.prepare=function(){for(var n,t=this.edges,e=t.length;e--;)n=t[e].edge,n.b&&n.a||t.splice(e,1);return t.sort(Ir),t.length},Qr.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},nu.prototype={insert:function(n,t){var e,r,u;if(n){if(t.P=n,t.N=n.N,n.N&&(n.N.P=t),n.N=t,n.R){for(n=n.R;n.L;)n=n.L;n.L=t}else n.R=t;e=n}else this._?(n=uu(this._),t.P=null,t.N=n,n.P=n.L=t,e=n):(t.P=t.N=null,this._=t,e=null);for(t.L=t.R=null,t.U=e,t.C=!0,n=t;e&&e.C;)r=e.U,e===r.L?(u=r.R,u&&u.C?(e.C=u.C=!1,r.C=!0,n=r):(n===e.R&&(eu(this,e),n=e,e=n.U),e.C=!1,r.C=!0,ru(this,r))):(u=r.L,u&&u.C?(e.C=u.C=!1,r.C=!0,n=r):(n===e.L&&(ru(this,e),n=e,e=n.U),e.C=!1,r.C=!0,eu(this,r))),e=n.U;this._.C=!1},remove:function(n){n.N&&(n.N.P=n.P),n.P&&(n.P.N=n.N),n.N=n.P=null;var t,e,r,u=n.U,i=n.L,o=n.R;if(e=i?o?uu(o):i:o,u?u.L===n?u.L=e:u.R=e:this._=e,i&&o?(r=e.C,e.C=n.C,e.L=i,i.U=e,e!==o?(u=e.U,e.U=n.U,n=e.R,u.L=n,e.R=o,o.U=e):(e.U=u,u=e,n=e.R)):(r=n.C,n=e),n&&(n.U=u),!r){if(n&&n.C)return n.C=!1,void 0;do{if(n===this._)break;if(n===u.L){if(t=u.R,t.C&&(t.C=!1,u.C=!0,eu(this,u),t=u.R),t.L&&t.L.C||t.R&&t.R.C){t.R&&t.R.C||(t.L.C=!1,t.C=!0,ru(this,t),t=u.R),t.C=u.C,u.C=t.R.C=!1,eu(this,u),n=this._;break}}else if(t=u.L,t.C&&(t.C=!1,u.C=!0,ru(this,u),t=u.L),t.L&&t.L.C||t.R&&t.R.C){t.L&&t.L.C||(t.R.C=!1,t.C=!0,eu(this,t),t=u.L),t.C=u.C,u.C=t.L.C=!1,ru(this,u),n=this._;break}t.C=!0,n=u,u=u.U}while(!n.C);n&&(n.C=!1)}}},ta.geom.voronoi=function(n){function t(n){var t=new Array(n.length),r=a[0][0],u=a[0][1],i=a[1][0],o=a[1][1];return iu(e(n),a).cells.forEach(function(e,a){var c=e.edges,l=e.site,s=t[a]=c.length?c.map(function(n){var t=n.start();return[t.x,t.y]}):l.x>=r&&l.x<=i&&l.y>=u&&l.y<=o?[[r,o],[i,o],[i,u],[r,u]]:[];s.point=n[a]}),t}function e(n){return n.map(function(n,t){return{x:Math.round(i(n,t)/Ta)*Ta,y:Math.round(o(n,t)/Ta)*Ta,i:t}})}var r=Ar,u=Nr,i=r,o=u,a=cl;return n?t(n):(t.links=function(n){return iu(e(n)).edges.filter(function(n){return n.l&&n.r}).map(function(t){return{source:n[t.l.i],target:n[t.r.i]}})},t.triangles=function(n){var t=[];return iu(e(n)).cells.forEach(function(e,r){for(var u,i,o=e.site,a=e.edges.sort(Ir),c=-1,l=a.length,s=a[l-1].edge,f=s.l===o?s.r:s.l;++c<l;)u=s,i=f,s=a[c].edge,f=s.l===o?s.r:s.l,r<i.i&&r<f.i&&au(o,i,f)<0&&t.push([n[r],n[i.i],n[f.i]])}),t},t.x=function(n){return arguments.length?(i=kt(r=n),t):r},t.y=function(n){return arguments.length?(o=kt(u=n),t):u},t.clipExtent=function(n){return arguments.length?(a=null==n?cl:n,t):a===cl?null:a},t.size=function(n){return arguments.length?t.clipExtent(n&&[[0,0],n]):a===cl?null:a&&a[1]},t)};var cl=[[-1e6,-1e6],[1e6,1e6]];ta.geom.delaunay=function(n){return ta.geom.voronoi().triangles(n)},ta.geom.quadtree=function(n,t,e,r,u){function i(n){function i(n,t,e,r,u,i,o,a){if(!isNaN(e)&&!isNaN(r))if(n.leaf){var c=n.x,s=n.y;if(null!=c)if(va(c-e)+va(s-r)<.01)l(n,t,e,r,u,i,o,a);else{var f=n.point;n.x=n.y=n.point=null,l(n,f,c,s,u,i,o,a),l(n,t,e,r,u,i,o,a)}else n.x=e,n.y=r,n.point=t}else l(n,t,e,r,u,i,o,a)}function l(n,t,e,r,u,o,a,c){var l=.5*(u+a),s=.5*(o+c),f=e>=l,h=r>=s,g=h<<1|f;n.leaf=!1,n=n.nodes[g]||(n.nodes[g]=su()),f?u=l:a=l,h?o=s:c=s,i(n,t,e,r,u,o,a,c)}var s,f,h,g,p,v,d,m,y,M=kt(a),x=kt(c);if(null!=t)v=t,d=e,m=r,y=u;else if(m=y=-(v=d=1/0),f=[],h=[],p=n.length,o)for(g=0;p>g;++g)s=n[g],s.x<v&&(v=s.x),s.y<d&&(d=s.y),s.x>m&&(m=s.x),s.y>y&&(y=s.y),f.push(s.x),h.push(s.y);else for(g=0;p>g;++g){var b=+M(s=n[g],g),_=+x(s,g);v>b&&(v=b),d>_&&(d=_),b>m&&(m=b),_>y&&(y=_),f.push(b),h.push(_)}var w=m-v,S=y-d;w>S?y=d+w:m=v+S;var k=su();if(k.add=function(n){i(k,n,+M(n,++g),+x(n,g),v,d,m,y)},k.visit=function(n){fu(n,k,v,d,m,y)},k.find=function(n){return hu(k,n[0],n[1],v,d,m,y)},g=-1,null==t){for(;++g<p;)i(k,n[g],f[g],h[g],v,d,m,y);--g}else n.forEach(k.add);return f=h=n=s=null,k}var o,a=Ar,c=Nr;return(o=arguments.length)?(a=cu,c=lu,3===o&&(u=e,r=t,e=t=0),i(n)):(i.x=function(n){return arguments.length?(a=n,i):a},i.y=function(n){return arguments.length?(c=n,i):c},i.extent=function(n){return arguments.length?(null==n?t=e=r=u=null:(t=+n[0][0],e=+n[0][1],r=+n[1][0],u=+n[1][1]),i):null==t?null:[[t,e],[r,u]]},i.size=function(n){return arguments.length?(null==n?t=e=r=u=null:(t=e=0,r=+n[0],u=+n[1]),i):null==t?null:[r-t,u-e]},i)},ta.interpolateRgb=gu,ta.interpolateObject=pu,ta.interpolateNumber=vu,ta.interpolateString=du;var ll=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,sl=new RegExp(ll.source,"g");ta.interpolate=mu,ta.interpolators=[function(n,t){var e=typeof t;return("string"===e?tc.has(t)||/^(#|rgb\(|hsl\()/.test(t)?gu:du:t instanceof it?gu:Array.isArray(t)?yu:"object"===e&&isNaN(t)?pu:vu)(n,t)}],ta.interpolateArray=yu;var fl=function(){return Et},hl=ta.map({linear:fl,poly:ku,quad:function(){return _u},cubic:function(){return wu},sin:function(){return Eu},exp:function(){return Au},circle:function(){return Nu},elastic:Cu,back:zu,bounce:function(){return qu}}),gl=ta.map({"in":Et,out:xu,"in-out":bu,"out-in":function(n){return bu(xu(n))}});ta.ease=function(n){var t=n.indexOf("-"),e=t>=0?n.slice(0,t):n,r=t>=0?n.slice(t+1):"in";return e=hl.get(e)||fl,r=gl.get(r)||Et,Mu(r(e.apply(null,ea.call(arguments,1))))},ta.interpolateHcl=Lu,ta.interpolateHsl=Tu,ta.interpolateLab=Ru,ta.interpolateRound=Du,ta.transform=function(n){var t=ua.createElementNS(ta.ns.prefix.svg,"g");return(ta.transform=function(n){if(null!=n){t.setAttribute("transform",n);var e=t.transform.baseVal.consolidate()}return new Pu(e?e.matrix:pl)})(n)},Pu.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var pl={a:1,b:0,c:0,d:1,e:0,f:0};ta.interpolateTransform=Hu,ta.layout={},ta.layout.bundle=function(){return function(n){for(var t=[],e=-1,r=n.length;++e<r;)t.push(Iu(n[e]));return t}},ta.layout.chord=function(){function n(){var n,l,f,h,g,p={},v=[],d=ta.range(i),m=[];for(e=[],r=[],n=0,h=-1;++h<i;){for(l=0,g=-1;++g<i;)l+=u[h][g];v.push(l),m.push(ta.range(i)),n+=l}for(o&&d.sort(function(n,t){return o(v[n],v[t])}),a&&m.forEach(function(n,t){n.sort(function(n,e){return a(u[t][n],u[t][e])})}),n=(Pa-s*i)/n,l=0,h=-1;++h<i;){for(f=l,g=-1;++g<i;){var y=d[h],M=m[y][g],x=u[y][M],b=l,_=l+=x*n;p[y+"-"+M]={index:y,subindex:M,startAngle:b,endAngle:_,value:x}}r[y]={index:y,startAngle:f,endAngle:l,value:(l-f)/n},l+=s}for(h=-1;++h<i;)for(g=h-1;++g<i;){var w=p[h+"-"+g],S=p[g+"-"+h];(w.value||S.value)&&e.push(w.value<S.value?{source:S,target:w}:{source:w,target:S})}c&&t()}function t(){e.sort(function(n,t){return c((n.source.value+n.target.value)/2,(t.source.value+t.target.value)/2)})}var e,r,u,i,o,a,c,l={},s=0;return l.matrix=function(n){return arguments.length?(i=(u=n)&&u.length,e=r=null,l):u},l.padding=function(n){return arguments.length?(s=n,e=r=null,l):s},l.sortGroups=function(n){return arguments.length?(o=n,e=r=null,l):o},l.sortSubgroups=function(n){return arguments.length?(a=n,e=null,l):a},l.sortChords=function(n){return arguments.length?(c=n,e&&t(),l):c},l.chords=function(){return e||n(),e},l.groups=function(){return r||n(),r},l},ta.layout.force=function(){function n(n){return function(t,e,r,u){if(t.point!==n){var i=t.cx-n.x,o=t.cy-n.y,a=u-e,c=i*i+o*o;if(c>a*a/d){if(p>c){var l=t.charge/c;n.px-=i*l,n.py-=o*l}return!0}if(t.point&&c&&p>c){var l=t.pointCharge/c;n.px-=i*l,n.py-=o*l}}return!t.charge}}function t(n){n.px=ta.event.x,n.py=ta.event.y,a.resume()}var e,r,u,i,o,a={},c=ta.dispatch("start","tick","end"),l=[1,1],s=.9,f=vl,h=dl,g=-30,p=ml,v=.1,d=.64,m=[],y=[];return a.tick=function(){if((r*=.99)<.005)return c.end({type:"end",alpha:r=0}),!0;var t,e,a,f,h,p,d,M,x,b=m.length,_=y.length;for(e=0;_>e;++e)a=y[e],f=a.source,h=a.target,M=h.x-f.x,x=h.y-f.y,(p=M*M+x*x)&&(p=r*i[e]*((p=Math.sqrt(p))-u[e])/p,M*=p,x*=p,h.x-=M*(d=f.weight/(h.weight+f.weight)),h.y-=x*d,f.x+=M*(d=1-d),f.y+=x*d);if((d=r*v)&&(M=l[0]/2,x=l[1]/2,e=-1,d))for(;++e<b;)a=m[e],a.x+=(M-a.x)*d,a.y+=(x-a.y)*d;if(g)for(Ju(t=ta.geom.quadtree(m),r,o),e=-1;++e<b;)(a=m[e]).fixed||t.visit(n(a));for(e=-1;++e<b;)a=m[e],a.fixed?(a.x=a.px,a.y=a.py):(a.x-=(a.px-(a.px=a.x))*s,a.y-=(a.py-(a.py=a.y))*s);c.tick({type:"tick",alpha:r})},a.nodes=function(n){return arguments.length?(m=n,a):m},a.links=function(n){return arguments.length?(y=n,a):y},a.size=function(n){return arguments.length?(l=n,a):l},a.linkDistance=function(n){return arguments.length?(f="function"==typeof n?n:+n,a):f},a.distance=a.linkDistance,a.linkStrength=function(n){return arguments.length?(h="function"==typeof n?n:+n,a):h},a.friction=function(n){return arguments.length?(s=+n,a):s},a.charge=function(n){return arguments.length?(g="function"==typeof n?n:+n,a):g},a.chargeDistance=function(n){return arguments.length?(p=n*n,a):Math.sqrt(p)},a.gravity=function(n){return arguments.length?(v=+n,a):v},a.theta=function(n){return arguments.length?(d=n*n,a):Math.sqrt(d)},a.alpha=function(n){return arguments.length?(n=+n,r?r=n>0?n:0:n>0&&(c.start({type:"start",alpha:r=n}),ta.timer(a.tick)),a):r},a.start=function(){function n(n,r){if(!e){for(e=new Array(c),a=0;c>a;++a)e[a]=[];for(a=0;l>a;++a){var u=y[a];e[u.source.index].push(u.target),e[u.target.index].push(u.source)}}for(var i,o=e[t],a=-1,l=o.length;++a<l;)if(!isNaN(i=o[a][n]))return i;return Math.random()*r}var t,e,r,c=m.length,s=y.length,p=l[0],v=l[1];for(t=0;c>t;++t)(r=m[t]).index=t,r.weight=0;for(t=0;s>t;++t)r=y[t],"number"==typeof r.source&&(r.source=m[r.source]),"number"==typeof r.target&&(r.target=m[r.target]),++r.source.weight,++r.target.weight;for(t=0;c>t;++t)r=m[t],isNaN(r.x)&&(r.x=n("x",p)),isNaN(r.y)&&(r.y=n("y",v)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(u=[],"function"==typeof f)for(t=0;s>t;++t)u[t]=+f.call(this,y[t],t);else for(t=0;s>t;++t)u[t]=f;if(i=[],"function"==typeof h)for(t=0;s>t;++t)i[t]=+h.call(this,y[t],t);else for(t=0;s>t;++t)i[t]=h;if(o=[],"function"==typeof g)for(t=0;c>t;++t)o[t]=+g.call(this,m[t],t);else for(t=0;c>t;++t)o[t]=g;return a.resume()},a.resume=function(){return a.alpha(.1)},a.stop=function(){return a.alpha(0)},a.drag=function(){return e||(e=ta.behavior.drag().origin(Et).on("dragstart.force",Xu).on("drag.force",t).on("dragend.force",$u)),arguments.length?(this.on("mouseover.force",Bu).on("mouseout.force",Wu).call(e),void 0):e},ta.rebind(a,c,"on")};var vl=20,dl=1,ml=1/0;ta.layout.hierarchy=function(){function n(u){var i,o=[u],a=[];for(u.depth=0;null!=(i=o.pop());)if(a.push(i),(l=e.call(n,i,i.depth))&&(c=l.length)){for(var c,l,s;--c>=0;)o.push(s=l[c]),s.parent=i,s.depth=i.depth+1;r&&(i.value=0),i.children=l}else r&&(i.value=+r.call(n,i,i.depth)||0),delete i.children;return Qu(u,function(n){var e,u;t&&(e=n.children)&&e.sort(t),r&&(u=n.parent)&&(u.value+=n.value)}),a}var t=ei,e=ni,r=ti;return n.sort=function(e){return arguments.length?(t=e,n):t},n.children=function(t){return arguments.length?(e=t,n):e},n.value=function(t){return arguments.length?(r=t,n):r},n.revalue=function(t){return r&&(Ku(t,function(n){n.children&&(n.value=0)}),Qu(t,function(t){var e;t.children||(t.value=+r.call(n,t,t.depth)||0),(e=t.parent)&&(e.value+=t.value)})),t},n},ta.layout.partition=function(){function n(t,e,r,u){var i=t.children;if(t.x=e,t.y=t.depth*u,t.dx=r,t.dy=u,i&&(o=i.length)){var o,a,c,l=-1;for(r=t.value?r/t.value:0;++l<o;)n(a=i[l],e,c=a.value*r,u),e+=c}}function t(n){var e=n.children,r=0;if(e&&(u=e.length))for(var u,i=-1;++i<u;)r=Math.max(r,t(e[i]));return 1+r}function e(e,i){var o=r.call(this,e,i);return n(o[0],0,u[0],u[1]/t(o[0])),o}var r=ta.layout.hierarchy(),u=[1,1];return e.size=function(n){return arguments.length?(u=n,e):u},Gu(e,r)},ta.layout.pie=function(){function n(o){var a,c=o.length,l=o.map(function(e,r){return+t.call(n,e,r)}),s=+("function"==typeof r?r.apply(this,arguments):r),f=("function"==typeof u?u.apply(this,arguments):u)-s,h=Math.min(Math.abs(f)/c,+("function"==typeof i?i.apply(this,arguments):i)),g=h*(0>f?-1:1),p=(f-c*g)/ta.sum(l),v=ta.range(c),d=[];return null!=e&&v.sort(e===yl?function(n,t){return l[t]-l[n]}:function(n,t){return e(o[n],o[t])}),v.forEach(function(n){d[n]={data:o[n],value:a=l[n],startAngle:s,endAngle:s+=a*p+g,padAngle:h}}),d}var t=Number,e=yl,r=0,u=Pa,i=0;return n.value=function(e){return arguments.length?(t=e,n):t},n.sort=function(t){return arguments.length?(e=t,n):e},n.startAngle=function(t){return arguments.length?(r=t,n):r},n.endAngle=function(t){return arguments.length?(u=t,n):u},n.padAngle=function(t){return arguments.length?(i=t,n):i},n};var yl={};ta.layout.stack=function(){function n(a,c){if(!(h=a.length))return a;var l=a.map(function(e,r){return t.call(n,e,r)}),s=l.map(function(t){return t.map(function(t,e){return[i.call(n,t,e),o.call(n,t,e)]})}),f=e.call(n,s,c);l=ta.permute(l,f),s=ta.permute(s,f);var h,g,p,v,d=r.call(n,s,c),m=l[0].length;for(p=0;m>p;++p)for(u.call(n,l[0][p],v=d[p],s[0][p][1]),g=1;h>g;++g)u.call(n,l[g][p],v+=s[g-1][p][1],s[g][p][1]);return a}var t=Et,e=ai,r=ci,u=oi,i=ui,o=ii;return n.values=function(e){return arguments.length?(t=e,n):t},n.order=function(t){return arguments.length?(e="function"==typeof t?t:Ml.get(t)||ai,n):e},n.offset=function(t){return arguments.length?(r="function"==typeof t?t:xl.get(t)||ci,n):r},n.x=function(t){return arguments.length?(i=t,n):i},n.y=function(t){return arguments.length?(o=t,n):o},n.out=function(t){return arguments.length?(u=t,n):u},n};var Ml=ta.map({"inside-out":function(n){var t,e,r=n.length,u=n.map(li),i=n.map(si),o=ta.range(r).sort(function(n,t){return u[n]-u[t]}),a=0,c=0,l=[],s=[];for(t=0;r>t;++t)e=o[t],c>a?(a+=i[e],l.push(e)):(c+=i[e],s.push(e));return s.reverse().concat(l)},reverse:function(n){return ta.range(n.length).reverse()},"default":ai}),xl=ta.map({silhouette:function(n){var t,e,r,u=n.length,i=n[0].length,o=[],a=0,c=[];for(e=0;i>e;++e){for(t=0,r=0;u>t;t++)r+=n[t][e][1];r>a&&(a=r),o.push(r)}for(e=0;i>e;++e)c[e]=(a-o[e])/2;return c},wiggle:function(n){var t,e,r,u,i,o,a,c,l,s=n.length,f=n[0],h=f.length,g=[];for(g[0]=c=l=0,e=1;h>e;++e){for(t=0,u=0;s>t;++t)u+=n[t][e][1];for(t=0,i=0,a=f[e][0]-f[e-1][0];s>t;++t){for(r=0,o=(n[t][e][1]-n[t][e-1][1])/(2*a);t>r;++r)o+=(n[r][e][1]-n[r][e-1][1])/a;i+=o*n[t][e][1]}g[e]=c-=u?i/u*a:0,l>c&&(l=c)}for(e=0;h>e;++e)g[e]-=l;return g},expand:function(n){var t,e,r,u=n.length,i=n[0].length,o=1/u,a=[];for(e=0;i>e;++e){for(t=0,r=0;u>t;t++)r+=n[t][e][1];if(r)for(t=0;u>t;t++)n[t][e][1]/=r;else for(t=0;u>t;t++)n[t][e][1]=o}for(e=0;i>e;++e)a[e]=0;return a},zero:ci});ta.layout.histogram=function(){function n(n,i){for(var o,a,c=[],l=n.map(e,this),s=r.call(this,l,i),f=u.call(this,s,l,i),i=-1,h=l.length,g=f.length-1,p=t?1:1/h;++i<g;)o=c[i]=[],o.dx=f[i+1]-(o.x=f[i]),o.y=0;if(g>0)for(i=-1;++i<h;)a=l[i],a>=s[0]&&a<=s[1]&&(o=c[ta.bisect(f,a,1,g)-1],o.y+=p,o.push(n[i]));return c}var t=!0,e=Number,r=pi,u=hi;return n.value=function(t){return arguments.length?(e=t,n):e},n.range=function(t){return arguments.length?(r=kt(t),n):r},n.bins=function(t){return arguments.length?(u="number"==typeof t?function(n){return gi(n,t)}:kt(t),n):u},n.frequency=function(e){return arguments.length?(t=!!e,n):t},n},ta.layout.pack=function(){function n(n,i){var o=e.call(this,n,i),a=o[0],c=u[0],l=u[1],s=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(a.x=a.y=0,Qu(a,function(n){n.r=+s(n.value)}),Qu(a,Mi),r){var f=r*(t?1:Math.max(2*a.r/c,2*a.r/l))/2;Qu(a,function(n){n.r+=f}),Qu(a,Mi),Qu(a,function(n){n.r-=f})}return _i(a,c/2,l/2,t?1:1/Math.max(2*a.r/c,2*a.r/l)),o}var t,e=ta.layout.hierarchy().sort(vi),r=0,u=[1,1];return n.size=function(t){return arguments.length?(u=t,n):u},n.radius=function(e){return arguments.length?(t=null==e||"function"==typeof e?e:+e,n):t},n.padding=function(t){return arguments.length?(r=+t,n):r},Gu(n,e)},ta.layout.tree=function(){function n(n,u){var s=o.call(this,n,u),f=s[0],h=t(f);if(Qu(h,e),h.parent.m=-h.z,Ku(h,r),l)Ku(f,i);else{var g=f,p=f,v=f;Ku(f,function(n){n.x<g.x&&(g=n),n.x>p.x&&(p=n),n.depth>v.depth&&(v=n)});var d=a(g,p)/2-g.x,m=c[0]/(p.x+a(p,g)/2+d),y=c[1]/(v.depth||1);Ku(f,function(n){n.x=(n.x+d)*m,n.y=n.depth*y})}return s}function t(n){for(var t,e={A:null,children:[n]},r=[e];null!=(t=r.pop());)for(var u,i=t.children,o=0,a=i.length;a>o;++o)r.push((i[o]=u={_:i[o],parent:t,children:(u=i[o].children)&&u.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:o}).a=u);return e.children[0]}function e(n){var t=n.children,e=n.parent.children,r=n.i?e[n.i-1]:null;if(t.length){Ni(n);var i=(t[0].z+t[t.length-1].z)/2;r?(n.z=r.z+a(n._,r._),n.m=n.z-i):n.z=i}else r&&(n.z=r.z+a(n._,r._));n.parent.A=u(n,r,n.parent.A||e[0])}function r(n){n._.x=n.z+n.parent.m,n.m+=n.parent.m}function u(n,t,e){if(t){for(var r,u=n,i=n,o=t,c=u.parent.children[0],l=u.m,s=i.m,f=o.m,h=c.m;o=Ei(o),u=ki(u),o&&u;)c=ki(c),i=Ei(i),i.a=n,r=o.z+f-u.z-l+a(o._,u._),r>0&&(Ai(Ci(o,n,e),n,r),l+=r,s+=r),f+=o.m,l+=u.m,h+=c.m,s+=i.m;o&&!Ei(i)&&(i.t=o,i.m+=f-s),u&&!ki(c)&&(c.t=u,c.m+=l-h,e=n)}return e}function i(n){n.x*=c[0],n.y=n.depth*c[1]}var o=ta.layout.hierarchy().sort(null).value(null),a=Si,c=[1,1],l=null;return n.separation=function(t){return arguments.length?(a=t,n):a},n.size=function(t){return arguments.length?(l=null==(c=t)?i:null,n):l?null:c},n.nodeSize=function(t){return arguments.length?(l=null==(c=t)?null:i,n):l?c:null},Gu(n,o)},ta.layout.cluster=function(){function n(n,i){var o,a=t.call(this,n,i),c=a[0],l=0;Qu(c,function(n){var t=n.children;t&&t.length?(n.x=qi(t),n.y=zi(t)):(n.x=o?l+=e(n,o):0,n.y=0,o=n)});var s=Li(c),f=Ti(c),h=s.x-e(s,f)/2,g=f.x+e(f,s)/2;return Qu(c,u?function(n){n.x=(n.x-c.x)*r[0],n.y=(c.y-n.y)*r[1]}:function(n){n.x=(n.x-h)/(g-h)*r[0],n.y=(1-(c.y?n.y/c.y:1))*r[1]}),a}var t=ta.layout.hierarchy().sort(null).value(null),e=Si,r=[1,1],u=!1;return n.separation=function(t){return arguments.length?(e=t,n):e},n.size=function(t){return arguments.length?(u=null==(r=t),n):u?null:r},n.nodeSize=function(t){return arguments.length?(u=null!=(r=t),n):u?r:null},Gu(n,t)},ta.layout.treemap=function(){function n(n,t){for(var e,r,u=-1,i=n.length;++u<i;)r=(e=n[u]).value*(0>t?0:t),e.area=isNaN(r)||0>=r?0:r}function t(e){var i=e.children;if(i&&i.length){var o,a,c,l=f(e),s=[],h=i.slice(),p=1/0,v="slice"===g?l.dx:"dice"===g?l.dy:"slice-dice"===g?1&e.depth?l.dy:l.dx:Math.min(l.dx,l.dy);for(n(h,l.dx*l.dy/e.value),s.area=0;(c=h.length)>0;)s.push(o=h[c-1]),s.area+=o.area,"squarify"!==g||(a=r(s,v))<=p?(h.pop(),p=a):(s.area-=s.pop().area,u(s,v,l,!1),v=Math.min(l.dx,l.dy),s.length=s.area=0,p=1/0);s.length&&(u(s,v,l,!0),s.length=s.area=0),i.forEach(t)}}function e(t){var r=t.children;if(r&&r.length){var i,o=f(t),a=r.slice(),c=[];for(n(a,o.dx*o.dy/t.value),c.area=0;i=a.pop();)c.push(i),c.area+=i.area,null!=i.z&&(u(c,i.z?o.dx:o.dy,o,!a.length),c.length=c.area=0);r.forEach(e)}}function r(n,t){for(var e,r=n.area,u=0,i=1/0,o=-1,a=n.length;++o<a;)(e=n[o].area)&&(i>e&&(i=e),e>u&&(u=e));return r*=r,t*=t,r?Math.max(t*u*p/r,r/(t*i*p)):1/0}function u(n,t,e,r){var u,i=-1,o=n.length,a=e.x,l=e.y,s=t?c(n.area/t):0;if(t==e.dx){for((r||s>e.dy)&&(s=e.dy);++i<o;)u=n[i],u.x=a,u.y=l,u.dy=s,a+=u.dx=Math.min(e.x+e.dx-a,s?c(u.area/s):0);u.z=!0,u.dx+=e.x+e.dx-a,e.y+=s,e.dy-=s}else{for((r||s>e.dx)&&(s=e.dx);++i<o;)u=n[i],u.x=a,u.y=l,u.dx=s,l+=u.dy=Math.min(e.y+e.dy-l,s?c(u.area/s):0);u.z=!1,u.dy+=e.y+e.dy-l,e.x+=s,e.dx-=s}}function i(r){var u=o||a(r),i=u[0];return i.x=0,i.y=0,i.dx=l[0],i.dy=l[1],o&&a.revalue(i),n([i],i.dx*i.dy/i.value),(o?e:t)(i),h&&(o=u),u}var o,a=ta.layout.hierarchy(),c=Math.round,l=[1,1],s=null,f=Ri,h=!1,g="squarify",p=.5*(1+Math.sqrt(5));return i.size=function(n){return arguments.length?(l=n,i):l},i.padding=function(n){function t(t){var e=n.call(i,t,t.depth);return null==e?Ri(t):Di(t,"number"==typeof e?[e,e,e,e]:e)}function e(t){return Di(t,n)}if(!arguments.length)return s;var r;return f=null==(s=n)?Ri:"function"==(r=typeof n)?t:"number"===r?(n=[n,n,n,n],e):e,i},i.round=function(n){return arguments.length?(c=n?Math.round:Number,i):c!=Number},i.sticky=function(n){return arguments.length?(h=n,o=null,i):h },i.ratio=function(n){return arguments.length?(p=n,i):p},i.mode=function(n){return arguments.length?(g=n+"",i):g},Gu(i,a)},ta.random={normal:function(n,t){var e=arguments.length;return 2>e&&(t=1),1>e&&(n=0),function(){var e,r,u;do e=2*Math.random()-1,r=2*Math.random()-1,u=e*e+r*r;while(!u||u>1);return n+t*e*Math.sqrt(-2*Math.log(u)/u)}},logNormal:function(){var n=ta.random.normal.apply(ta,arguments);return function(){return Math.exp(n())}},bates:function(n){var t=ta.random.irwinHall(n);return function(){return t()/n}},irwinHall:function(n){return function(){for(var t=0,e=0;n>e;e++)t+=Math.random();return t}}},ta.scale={};var bl={floor:Et,ceil:Et};ta.scale.linear=function(){return Yi([0,1],[0,1],mu,!1)};var _l={s:1,g:1,p:1,r:1,e:1};ta.scale.log=function(){return Ji(ta.scale.linear().domain([0,1]),10,!0,[1,10])};var wl=ta.format(".0e"),Sl={floor:function(n){return-Math.ceil(-n)},ceil:function(n){return-Math.floor(-n)}};ta.scale.pow=function(){return Gi(ta.scale.linear(),1,[0,1])},ta.scale.sqrt=function(){return ta.scale.pow().exponent(.5)},ta.scale.ordinal=function(){return Qi([],{t:"range",a:[[]]})},ta.scale.category10=function(){return ta.scale.ordinal().range(kl)},ta.scale.category20=function(){return ta.scale.ordinal().range(El)},ta.scale.category20b=function(){return ta.scale.ordinal().range(Al)},ta.scale.category20c=function(){return ta.scale.ordinal().range(Nl)};var kl=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(yt),El=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(yt),Al=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(yt),Nl=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(yt);ta.scale.quantile=function(){return no([],[])},ta.scale.quantize=function(){return to(0,1,[0,1])},ta.scale.threshold=function(){return eo([.5],[0,1])},ta.scale.identity=function(){return ro([0,1])},ta.svg={},ta.svg.arc=function(){function n(){var n=Math.max(0,+e.apply(this,arguments)),l=Math.max(0,+r.apply(this,arguments)),s=o.apply(this,arguments)-ja,f=a.apply(this,arguments)-ja,h=Math.abs(f-s),g=s>f?0:1;if(n>l&&(p=l,l=n,n=p),h>=Ua)return t(l,g)+(n?t(n,1-g):"")+"Z";var p,v,d,m,y,M,x,b,_,w,S,k,E=0,A=0,N=[];if((m=(+c.apply(this,arguments)||0)/2)&&(d=i===Cl?Math.sqrt(n*n+l*l):+i.apply(this,arguments),g||(A*=-1),l&&(A=nt(d/l*Math.sin(m))),n&&(E=nt(d/n*Math.sin(m)))),l){y=l*Math.cos(s+A),M=l*Math.sin(s+A),x=l*Math.cos(f-A),b=l*Math.sin(f-A);var C=Math.abs(f-s-2*A)<=Da?0:1;if(A&&so(y,M,x,b)===g^C){var z=(s+f)/2;y=l*Math.cos(z),M=l*Math.sin(z),x=b=null}}else y=M=0;if(n){_=n*Math.cos(f-E),w=n*Math.sin(f-E),S=n*Math.cos(s+E),k=n*Math.sin(s+E);var q=Math.abs(s-f+2*E)<=Da?0:1;if(E&&so(_,w,S,k)===1-g^q){var L=(s+f)/2;_=n*Math.cos(L),w=n*Math.sin(L),S=k=null}}else _=w=0;if((p=Math.min(Math.abs(l-n)/2,+u.apply(this,arguments)))>.001){v=l>n^g?0:1;var T=null==S?[_,w]:null==x?[y,M]:Lr([y,M],[S,k],[x,b],[_,w]),R=y-T[0],D=M-T[1],P=x-T[0],U=b-T[1],j=1/Math.sin(Math.acos((R*P+D*U)/(Math.sqrt(R*R+D*D)*Math.sqrt(P*P+U*U)))/2),F=Math.sqrt(T[0]*T[0]+T[1]*T[1]);if(null!=x){var H=Math.min(p,(l-F)/(j+1)),O=fo(null==S?[_,w]:[S,k],[y,M],l,H,g),Y=fo([x,b],[_,w],l,H,g);p===H?N.push("M",O[0],"A",H,",",H," 0 0,",v," ",O[1],"A",l,",",l," 0 ",1-g^so(O[1][0],O[1][1],Y[1][0],Y[1][1]),",",g," ",Y[1],"A",H,",",H," 0 0,",v," ",Y[0]):N.push("M",O[0],"A",H,",",H," 0 1,",v," ",Y[0])}else N.push("M",y,",",M);if(null!=S){var I=Math.min(p,(n-F)/(j-1)),Z=fo([y,M],[S,k],n,-I,g),V=fo([_,w],null==x?[y,M]:[x,b],n,-I,g);p===I?N.push("L",V[0],"A",I,",",I," 0 0,",v," ",V[1],"A",n,",",n," 0 ",g^so(V[1][0],V[1][1],Z[1][0],Z[1][1]),",",1-g," ",Z[1],"A",I,",",I," 0 0,",v," ",Z[0]):N.push("L",V[0],"A",I,",",I," 0 0,",v," ",Z[0])}else N.push("L",_,",",w)}else N.push("M",y,",",M),null!=x&&N.push("A",l,",",l," 0 ",C,",",g," ",x,",",b),N.push("L",_,",",w),null!=S&&N.push("A",n,",",n," 0 ",q,",",1-g," ",S,",",k);return N.push("Z"),N.join("")}function t(n,t){return"M0,"+n+"A"+n+","+n+" 0 1,"+t+" 0,"+-n+"A"+n+","+n+" 0 1,"+t+" 0,"+n}var e=io,r=oo,u=uo,i=Cl,o=ao,a=co,c=lo;return n.innerRadius=function(t){return arguments.length?(e=kt(t),n):e},n.outerRadius=function(t){return arguments.length?(r=kt(t),n):r},n.cornerRadius=function(t){return arguments.length?(u=kt(t),n):u},n.padRadius=function(t){return arguments.length?(i=t==Cl?Cl:kt(t),n):i},n.startAngle=function(t){return arguments.length?(o=kt(t),n):o},n.endAngle=function(t){return arguments.length?(a=kt(t),n):a},n.padAngle=function(t){return arguments.length?(c=kt(t),n):c},n.centroid=function(){var n=(+e.apply(this,arguments)+ +r.apply(this,arguments))/2,t=(+o.apply(this,arguments)+ +a.apply(this,arguments))/2-ja;return[Math.cos(t)*n,Math.sin(t)*n]},n};var Cl="auto";ta.svg.line=function(){return ho(Et)};var zl=ta.map({linear:go,"linear-closed":po,step:vo,"step-before":mo,"step-after":yo,basis:So,"basis-open":ko,"basis-closed":Eo,bundle:Ao,cardinal:bo,"cardinal-open":Mo,"cardinal-closed":xo,monotone:To});zl.forEach(function(n,t){t.key=n,t.closed=/-closed$/.test(n)});var ql=[0,2/3,1/3,0],Ll=[0,1/3,2/3,0],Tl=[0,1/6,2/3,1/6];ta.svg.line.radial=function(){var n=ho(Ro);return n.radius=n.x,delete n.x,n.angle=n.y,delete n.y,n},mo.reverse=yo,yo.reverse=mo,ta.svg.area=function(){return Do(Et)},ta.svg.area.radial=function(){var n=Do(Ro);return n.radius=n.x,delete n.x,n.innerRadius=n.x0,delete n.x0,n.outerRadius=n.x1,delete n.x1,n.angle=n.y,delete n.y,n.startAngle=n.y0,delete n.y0,n.endAngle=n.y1,delete n.y1,n},ta.svg.chord=function(){function n(n,a){var c=t(this,i,n,a),l=t(this,o,n,a);return"M"+c.p0+r(c.r,c.p1,c.a1-c.a0)+(e(c,l)?u(c.r,c.p1,c.r,c.p0):u(c.r,c.p1,l.r,l.p0)+r(l.r,l.p1,l.a1-l.a0)+u(l.r,l.p1,c.r,c.p0))+"Z"}function t(n,t,e,r){var u=t.call(n,e,r),i=a.call(n,u,r),o=c.call(n,u,r)-ja,s=l.call(n,u,r)-ja;return{r:i,a0:o,a1:s,p0:[i*Math.cos(o),i*Math.sin(o)],p1:[i*Math.cos(s),i*Math.sin(s)]}}function e(n,t){return n.a0==t.a0&&n.a1==t.a1}function r(n,t,e){return"A"+n+","+n+" 0 "+ +(e>Da)+",1 "+t}function u(n,t,e,r){return"Q 0,0 "+r}var i=mr,o=yr,a=Po,c=ao,l=co;return n.radius=function(t){return arguments.length?(a=kt(t),n):a},n.source=function(t){return arguments.length?(i=kt(t),n):i},n.target=function(t){return arguments.length?(o=kt(t),n):o},n.startAngle=function(t){return arguments.length?(c=kt(t),n):c},n.endAngle=function(t){return arguments.length?(l=kt(t),n):l},n},ta.svg.diagonal=function(){function n(n,u){var i=t.call(this,n,u),o=e.call(this,n,u),a=(i.y+o.y)/2,c=[i,{x:i.x,y:a},{x:o.x,y:a},o];return c=c.map(r),"M"+c[0]+"C"+c[1]+" "+c[2]+" "+c[3]}var t=mr,e=yr,r=Uo;return n.source=function(e){return arguments.length?(t=kt(e),n):t},n.target=function(t){return arguments.length?(e=kt(t),n):e},n.projection=function(t){return arguments.length?(r=t,n):r},n},ta.svg.diagonal.radial=function(){var n=ta.svg.diagonal(),t=Uo,e=n.projection;return n.projection=function(n){return arguments.length?e(jo(t=n)):t},n},ta.svg.symbol=function(){function n(n,r){return(Rl.get(t.call(this,n,r))||Oo)(e.call(this,n,r))}var t=Ho,e=Fo;return n.type=function(e){return arguments.length?(t=kt(e),n):t},n.size=function(t){return arguments.length?(e=kt(t),n):e},n};var Rl=ta.map({circle:Oo,cross:function(n){var t=Math.sqrt(n/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(n){var t=Math.sqrt(n/(2*Pl)),e=t*Pl;return"M0,"+-t+"L"+e+",0"+" 0,"+t+" "+-e+",0"+"Z"},square:function(n){var t=Math.sqrt(n)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(n){var t=Math.sqrt(n/Dl),e=t*Dl/2;return"M0,"+e+"L"+t+","+-e+" "+-t+","+-e+"Z"},"triangle-up":function(n){var t=Math.sqrt(n/Dl),e=t*Dl/2;return"M0,"+-e+"L"+t+","+e+" "+-t+","+e+"Z"}});ta.svg.symbolTypes=Rl.keys();var Dl=Math.sqrt(3),Pl=Math.tan(30*Fa);ka.transition=function(n){for(var t,e,r=Ul||++Ol,u=Xo(n),i=[],o=jl||{time:Date.now(),ease:Su,delay:0,duration:250},a=-1,c=this.length;++a<c;){i.push(t=[]);for(var l=this[a],s=-1,f=l.length;++s<f;)(e=l[s])&&$o(e,s,u,r,o),t.push(e)}return Io(i,u,r)},ka.interrupt=function(n){return this.each(null==n?Fl:Yo(Xo(n)))};var Ul,jl,Fl=Yo(Xo()),Hl=[],Ol=0;Hl.call=ka.call,Hl.empty=ka.empty,Hl.node=ka.node,Hl.size=ka.size,ta.transition=function(n,t){return n&&n.transition?Ul?n.transition(t):n:Na.transition(n)},ta.transition.prototype=Hl,Hl.select=function(n){var t,e,r,u=this.id,i=this.namespace,o=[];n=k(n);for(var a=-1,c=this.length;++a<c;){o.push(t=[]);for(var l=this[a],s=-1,f=l.length;++s<f;)(r=l[s])&&(e=n.call(r,r.__data__,s,a))?("__data__"in r&&(e.__data__=r.__data__),$o(e,s,i,u,r[i][u]),t.push(e)):t.push(null)}return Io(o,i,u)},Hl.selectAll=function(n){var t,e,r,u,i,o=this.id,a=this.namespace,c=[];n=E(n);for(var l=-1,s=this.length;++l<s;)for(var f=this[l],h=-1,g=f.length;++h<g;)if(r=f[h]){i=r[a][o],e=n.call(r,r.__data__,h,l),c.push(t=[]);for(var p=-1,v=e.length;++p<v;)(u=e[p])&&$o(u,p,a,o,i),t.push(u)}return Io(c,a,o)},Hl.filter=function(n){var t,e,r,u=[];"function"!=typeof n&&(n=j(n));for(var i=0,o=this.length;o>i;i++){u.push(t=[]);for(var e=this[i],a=0,c=e.length;c>a;a++)(r=e[a])&&n.call(r,r.__data__,a,i)&&t.push(r)}return Io(u,this.namespace,this.id)},Hl.tween=function(n,t){var e=this.id,r=this.namespace;return arguments.length<2?this.node()[r][e].tween.get(n):H(this,null==t?function(t){t[r][e].tween.remove(n)}:function(u){u[r][e].tween.set(n,t)})},Hl.attr=function(n,t){function e(){this.removeAttribute(a)}function r(){this.removeAttributeNS(a.space,a.local)}function u(n){return null==n?e:(n+="",function(){var t,e=this.getAttribute(a);return e!==n&&(t=o(e,n),function(n){this.setAttribute(a,t(n))})})}function i(n){return null==n?r:(n+="",function(){var t,e=this.getAttributeNS(a.space,a.local);return e!==n&&(t=o(e,n),function(n){this.setAttributeNS(a.space,a.local,t(n))})})}if(arguments.length<2){for(t in n)this.attr(t,n[t]);return this}var o="transform"==n?Hu:mu,a=ta.ns.qualify(n);return Zo(this,"attr."+n,t,a.local?i:u)},Hl.attrTween=function(n,t){function e(n,e){var r=t.call(this,n,e,this.getAttribute(u));return r&&function(n){this.setAttribute(u,r(n))}}function r(n,e){var r=t.call(this,n,e,this.getAttributeNS(u.space,u.local));return r&&function(n){this.setAttributeNS(u.space,u.local,r(n))}}var u=ta.ns.qualify(n);return this.tween("attr."+n,u.local?r:e)},Hl.style=function(n,t,e){function r(){this.style.removeProperty(n)}function u(t){return null==t?r:(t+="",function(){var r,u=oa.getComputedStyle(this,null).getPropertyValue(n);return u!==t&&(r=mu(u,t),function(t){this.style.setProperty(n,r(t),e)})})}var i=arguments.length;if(3>i){if("string"!=typeof n){2>i&&(t="");for(e in n)this.style(e,n[e],t);return this}e=""}return Zo(this,"style."+n,t,u)},Hl.styleTween=function(n,t,e){function r(r,u){var i=t.call(this,r,u,oa.getComputedStyle(this,null).getPropertyValue(n));return i&&function(t){this.style.setProperty(n,i(t),e)}}return arguments.length<3&&(e=""),this.tween("style."+n,r)},Hl.text=function(n){return Zo(this,"text",n,Vo)},Hl.remove=function(){var n=this.namespace;return this.each("end.transition",function(){var t;this[n].count<2&&(t=this.parentNode)&&t.removeChild(this)})},Hl.ease=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].ease:("function"!=typeof n&&(n=ta.ease.apply(ta,arguments)),H(this,function(r){r[e][t].ease=n}))},Hl.delay=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].delay:H(this,"function"==typeof n?function(r,u,i){r[e][t].delay=+n.call(r,r.__data__,u,i)}:(n=+n,function(r){r[e][t].delay=n}))},Hl.duration=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].duration:H(this,"function"==typeof n?function(r,u,i){r[e][t].duration=Math.max(1,n.call(r,r.__data__,u,i))}:(n=Math.max(1,n),function(r){r[e][t].duration=n}))},Hl.each=function(n,t){var e=this.id,r=this.namespace;if(arguments.length<2){var u=jl,i=Ul;try{Ul=e,H(this,function(t,u,i){jl=t[r][e],n.call(t,t.__data__,u,i)})}finally{jl=u,Ul=i}}else H(this,function(u){var i=u[r][e];(i.event||(i.event=ta.dispatch("start","end","interrupt"))).on(n,t)});return this},Hl.transition=function(){for(var n,t,e,r,u=this.id,i=++Ol,o=this.namespace,a=[],c=0,l=this.length;l>c;c++){a.push(n=[]);for(var t=this[c],s=0,f=t.length;f>s;s++)(e=t[s])&&(r=e[o][u],$o(e,s,o,i,{time:r.time,ease:r.ease,delay:r.delay+r.duration,duration:r.duration})),n.push(e)}return Io(a,o,i)},ta.svg.axis=function(){function n(n){n.each(function(){var n,l=ta.select(this),s=this.__chart__||e,f=this.__chart__=e.copy(),h=null==c?f.ticks?f.ticks.apply(f,a):f.domain():c,g=null==t?f.tickFormat?f.tickFormat.apply(f,a):Et:t,p=l.selectAll(".tick").data(h,f),v=p.enter().insert("g",".domain").attr("class","tick").style("opacity",Ta),d=ta.transition(p.exit()).style("opacity",Ta).remove(),m=ta.transition(p.order()).style("opacity",1),y=Math.max(u,0)+o,M=Ui(f),x=l.selectAll(".domain").data([0]),b=(x.enter().append("path").attr("class","domain"),ta.transition(x));v.append("line"),v.append("text");var _,w,S,k,E=v.select("line"),A=m.select("line"),N=p.select("text").text(g),C=v.select("text"),z=m.select("text"),q="top"===r||"left"===r?-1:1;if("bottom"===r||"top"===r?(n=Bo,_="x",S="y",w="x2",k="y2",N.attr("dy",0>q?"0em":".71em").style("text-anchor","middle"),b.attr("d","M"+M[0]+","+q*i+"V0H"+M[1]+"V"+q*i)):(n=Wo,_="y",S="x",w="y2",k="x2",N.attr("dy",".32em").style("text-anchor",0>q?"end":"start"),b.attr("d","M"+q*i+","+M[0]+"H0V"+M[1]+"H"+q*i)),E.attr(k,q*u),C.attr(S,q*y),A.attr(w,0).attr(k,q*u),z.attr(_,0).attr(S,q*y),f.rangeBand){var L=f,T=L.rangeBand()/2;s=f=function(n){return L(n)+T}}else s.rangeBand?s=f:d.call(n,f,s);v.call(n,s,f),m.call(n,f,f)})}var t,e=ta.scale.linear(),r=Yl,u=6,i=6,o=3,a=[10],c=null;return n.scale=function(t){return arguments.length?(e=t,n):e},n.orient=function(t){return arguments.length?(r=t in Il?t+"":Yl,n):r},n.ticks=function(){return arguments.length?(a=arguments,n):a},n.tickValues=function(t){return arguments.length?(c=t,n):c},n.tickFormat=function(e){return arguments.length?(t=e,n):t},n.tickSize=function(t){var e=arguments.length;return e?(u=+t,i=+arguments[e-1],n):u},n.innerTickSize=function(t){return arguments.length?(u=+t,n):u},n.outerTickSize=function(t){return arguments.length?(i=+t,n):i},n.tickPadding=function(t){return arguments.length?(o=+t,n):o},n.tickSubdivide=function(){return arguments.length&&n},n};var Yl="bottom",Il={top:1,right:1,bottom:1,left:1};ta.svg.brush=function(){function n(i){i.each(function(){var i=ta.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",u).on("touchstart.brush",u),o=i.selectAll(".background").data([0]);o.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),i.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var a=i.selectAll(".resize").data(p,Et);a.exit().remove(),a.enter().append("g").attr("class",function(n){return"resize "+n}).style("cursor",function(n){return Zl[n]}).append("rect").attr("x",function(n){return/[ew]$/.test(n)?-3:null}).attr("y",function(n){return/^[ns]/.test(n)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),a.style("display",n.empty()?"none":null);var s,f=ta.transition(i),h=ta.transition(o);c&&(s=Ui(c),h.attr("x",s[0]).attr("width",s[1]-s[0]),e(f)),l&&(s=Ui(l),h.attr("y",s[0]).attr("height",s[1]-s[0]),r(f)),t(f)})}function t(n){n.selectAll(".resize").attr("transform",function(n){return"translate("+s[+/e$/.test(n)]+","+f[+/^s/.test(n)]+")"})}function e(n){n.select(".extent").attr("x",s[0]),n.selectAll(".extent,.n>rect,.s>rect").attr("width",s[1]-s[0])}function r(n){n.select(".extent").attr("y",f[0]),n.selectAll(".extent,.e>rect,.w>rect").attr("height",f[1]-f[0])}function u(){function u(){32==ta.event.keyCode&&(N||(y=null,z[0]-=s[1],z[1]-=f[1],N=2),b())}function p(){32==ta.event.keyCode&&2==N&&(z[0]+=s[1],z[1]+=f[1],N=0,b())}function v(){var n=ta.mouse(x),u=!1;M&&(n[0]+=M[0],n[1]+=M[1]),N||(ta.event.altKey?(y||(y=[(s[0]+s[1])/2,(f[0]+f[1])/2]),z[0]=s[+(n[0]<y[0])],z[1]=f[+(n[1]<y[1])]):y=null),E&&d(n,c,0)&&(e(S),u=!0),A&&d(n,l,1)&&(r(S),u=!0),u&&(t(S),w({type:"brush",mode:N?"move":"resize"}))}function d(n,t,e){var r,u,a=Ui(t),c=a[0],l=a[1],p=z[e],v=e?f:s,d=v[1]-v[0];return N&&(c-=p,l-=d+p),r=(e?g:h)?Math.max(c,Math.min(l,n[e])):n[e],N?u=(r+=p)+d:(y&&(p=Math.max(c,Math.min(l,2*y[e]-r))),r>p?(u=r,r=p):u=p),v[0]!=r||v[1]!=u?(e?o=null:i=null,v[0]=r,v[1]=u,!0):void 0}function m(){v(),S.style("pointer-events","all").selectAll(".resize").style("display",n.empty()?"none":null),ta.select("body").style("cursor",null),q.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),C(),w({type:"brushend"})}var y,M,x=this,_=ta.select(ta.event.target),w=a.of(x,arguments),S=ta.select(x),k=_.datum(),E=!/^(n|s)$/.test(k)&&c,A=!/^(e|w)$/.test(k)&&l,N=_.classed("extent"),C=X(),z=ta.mouse(x),q=ta.select(oa).on("keydown.brush",u).on("keyup.brush",p);if(ta.event.changedTouches?q.on("touchmove.brush",v).on("touchend.brush",m):q.on("mousemove.brush",v).on("mouseup.brush",m),S.interrupt().selectAll("*").interrupt(),N)z[0]=s[0]-z[0],z[1]=f[0]-z[1];else if(k){var L=+/w$/.test(k),T=+/^n/.test(k);M=[s[1-L]-z[0],f[1-T]-z[1]],z[0]=s[L],z[1]=f[T]}else ta.event.altKey&&(y=z.slice());S.style("pointer-events","none").selectAll(".resize").style("display",null),ta.select("body").style("cursor",_.style("cursor")),w({type:"brushstart"}),v()}var i,o,a=w(n,"brushstart","brush","brushend"),c=null,l=null,s=[0,0],f=[0,0],h=!0,g=!0,p=Vl[0];return n.event=function(n){n.each(function(){var n=a.of(this,arguments),t={x:s,y:f,i:i,j:o},e=this.__chart__||t;this.__chart__=t,Ul?ta.select(this).transition().each("start.brush",function(){i=e.i,o=e.j,s=e.x,f=e.y,n({type:"brushstart"})}).tween("brush:brush",function(){var e=yu(s,t.x),r=yu(f,t.y);return i=o=null,function(u){s=t.x=e(u),f=t.y=r(u),n({type:"brush",mode:"resize"})}}).each("end.brush",function(){i=t.i,o=t.j,n({type:"brush",mode:"resize"}),n({type:"brushend"})}):(n({type:"brushstart"}),n({type:"brush",mode:"resize"}),n({type:"brushend"}))})},n.x=function(t){return arguments.length?(c=t,p=Vl[!c<<1|!l],n):c},n.y=function(t){return arguments.length?(l=t,p=Vl[!c<<1|!l],n):l},n.clamp=function(t){return arguments.length?(c&&l?(h=!!t[0],g=!!t[1]):c?h=!!t:l&&(g=!!t),n):c&&l?[h,g]:c?h:l?g:null},n.extent=function(t){var e,r,u,a,h;return arguments.length?(c&&(e=t[0],r=t[1],l&&(e=e[0],r=r[0]),i=[e,r],c.invert&&(e=c(e),r=c(r)),e>r&&(h=e,e=r,r=h),(e!=s[0]||r!=s[1])&&(s=[e,r])),l&&(u=t[0],a=t[1],c&&(u=u[1],a=a[1]),o=[u,a],l.invert&&(u=l(u),a=l(a)),u>a&&(h=u,u=a,a=h),(u!=f[0]||a!=f[1])&&(f=[u,a])),n):(c&&(i?(e=i[0],r=i[1]):(e=s[0],r=s[1],c.invert&&(e=c.invert(e),r=c.invert(r)),e>r&&(h=e,e=r,r=h))),l&&(o?(u=o[0],a=o[1]):(u=f[0],a=f[1],l.invert&&(u=l.invert(u),a=l.invert(a)),u>a&&(h=u,u=a,a=h))),c&&l?[[e,u],[r,a]]:c?[e,r]:l&&[u,a])},n.clear=function(){return n.empty()||(s=[0,0],f=[0,0],i=o=null),n},n.empty=function(){return!!c&&s[0]==s[1]||!!l&&f[0]==f[1]},ta.rebind(n,a,"on")};var Zl={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Vl=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Xl=fc.format=mc.timeFormat,$l=Xl.utc,Bl=$l("%Y-%m-%dT%H:%M:%S.%LZ");Xl.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?Jo:Bl,Jo.parse=function(n){var t=new Date(n);return isNaN(t)?null:t},Jo.toString=Bl.toString,fc.second=Ft(function(n){return new hc(1e3*Math.floor(n/1e3))},function(n,t){n.setTime(n.getTime()+1e3*Math.floor(t))},function(n){return n.getSeconds()}),fc.seconds=fc.second.range,fc.seconds.utc=fc.second.utc.range,fc.minute=Ft(function(n){return new hc(6e4*Math.floor(n/6e4))},function(n,t){n.setTime(n.getTime()+6e4*Math.floor(t))},function(n){return n.getMinutes()}),fc.minutes=fc.minute.range,fc.minutes.utc=fc.minute.utc.range,fc.hour=Ft(function(n){var t=n.getTimezoneOffset()/60;return new hc(36e5*(Math.floor(n/36e5-t)+t))},function(n,t){n.setTime(n.getTime()+36e5*Math.floor(t))},function(n){return n.getHours()}),fc.hours=fc.hour.range,fc.hours.utc=fc.hour.utc.range,fc.month=Ft(function(n){return n=fc.day(n),n.setDate(1),n},function(n,t){n.setMonth(n.getMonth()+t)},function(n){return n.getMonth()}),fc.months=fc.month.range,fc.months.utc=fc.month.utc.range;var Wl=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Jl=[[fc.second,1],[fc.second,5],[fc.second,15],[fc.second,30],[fc.minute,1],[fc.minute,5],[fc.minute,15],[fc.minute,30],[fc.hour,1],[fc.hour,3],[fc.hour,6],[fc.hour,12],[fc.day,1],[fc.day,2],[fc.week,1],[fc.month,1],[fc.month,3],[fc.year,1]],Gl=Xl.multi([[".%L",function(n){return n.getMilliseconds()}],[":%S",function(n){return n.getSeconds()}],["%I:%M",function(n){return n.getMinutes()}],["%I %p",function(n){return n.getHours()}],["%a %d",function(n){return n.getDay()&&1!=n.getDate()}],["%b %d",function(n){return 1!=n.getDate()}],["%B",function(n){return n.getMonth()}],["%Y",Ne]]),Kl={range:function(n,t,e){return ta.range(Math.ceil(n/e)*e,+t,e).map(Ko)},floor:Et,ceil:Et};Jl.year=fc.year,fc.scale=function(){return Go(ta.scale.linear(),Jl,Gl)};var Ql=Jl.map(function(n){return[n[0].utc,n[1]]}),ns=$l.multi([[".%L",function(n){return n.getUTCMilliseconds()}],[":%S",function(n){return n.getUTCSeconds()}],["%I:%M",function(n){return n.getUTCMinutes()}],["%I %p",function(n){return n.getUTCHours()}],["%a %d",function(n){return n.getUTCDay()&&1!=n.getUTCDate()}],["%b %d",function(n){return 1!=n.getUTCDate()}],["%B",function(n){return n.getUTCMonth()}],["%Y",Ne]]);Ql.year=fc.year.utc,fc.scale.utc=function(){return Go(ta.scale.linear(),Ql,ns)},ta.text=At(function(n){return n.responseText}),ta.json=function(n,t){return Nt(n,"application/json",Qo,t)},ta.html=function(n,t){return Nt(n,"text/html",na,t)},ta.xml=At(function(n){return n.responseXML}),"function"==typeof define&&define.amd?define(ta):"object"==typeof module&&module.exports&&(module.exports=ta),this.d3=ta}();</script> <script>!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.dagreD3=e()}}(function(){var define,module,exports;return 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;o<r.length;o++)s(r[o]);return s}({1:[function(require,module,exports){/** * @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. */ module.exports={graphlib:require("./lib/graphlib"),dagre:require("./lib/dagre"),intersect:require("./lib/intersect"),render:require("./lib/render"),util:require("./lib/util"),version:require("./lib/version")}},{"./lib/dagre":8,"./lib/graphlib":9,"./lib/intersect":10,"./lib/render":23,"./lib/util":25,"./lib/version":26}],2:[function(require,module,exports){var util=require("./util");module.exports={"default":normal,normal:normal,vee:vee};function normal(parent,id,edge,type){var marker=parent.append("marker").attr("id",id).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto");var path=marker.append("path").attr("d","M 0 0 L 10 5 L 0 10 z").style("stroke-width",1).style("stroke-dasharray","1,0");util.applyStyle(path,edge[type+"Style"])}function vee(parent,id,edge,type){var marker=parent.append("marker").attr("id",id).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto");var path=marker.append("path").attr("d","M 0 0 L 10 5 L 0 10 L 4 5 z").style("stroke-width",1).style("stroke-dasharray","1,0");util.applyStyle(path,edge[type+"Style"])}},{"./util":25}],3:[function(require,module,exports){var util=require("./util");module.exports=createClusters;function createClusters(selection,g){var clusters=g.nodes().filter(function(v){return util.isSubgraph(g,v)}),svgClusters=selection.selectAll("g.cluster").data(clusters,function(v){return v});svgClusters.enter().append("g").attr("class","cluster").style("opacity",0).append("rect");util.applyTransition(svgClusters.exit(),g).style("opacity",0).remove();util.applyTransition(svgClusters,g).style("opacity",1);util.applyTransition(svgClusters.selectAll("rect"),g).attr("width",function(v){return g.node(v).width}).attr("height",function(v){return g.node(v).height}).attr("x",function(v){var node=g.node(v);return node.x-node.width/2}).attr("y",function(v){var node=g.node(v);return node.y-node.height/2})}},{"./util":25}],4:[function(require,module,exports){"use strict";var _=require("./lodash"),addLabel=require("./label/add-label"),util=require("./util"),d3=require("./d3");module.exports=createEdgeLabels;function createEdgeLabels(selection,g){var svgEdgeLabels=selection.selectAll("g.edgeLabel").data(g.edges(),function(e){return util.edgeToId(e)}).classed("update",true);svgEdgeLabels.selectAll("*").remove();svgEdgeLabels.enter().append("g").classed("edgeLabel",true).style("opacity",0);svgEdgeLabels.each(function(e){var edge=g.edge(e),label=addLabel(d3.select(this),g.edge(e),0,0).classed("label",true),bbox=label.node().getBBox();if(edge.labelId){label.attr("id",edge.labelId)}if(!_.has(edge,"width")){edge.width=bbox.width}if(!_.has(edge,"height")){edge.height=bbox.height}});util.applyTransition(svgEdgeLabels.exit(),g).style("opacity",0).remove();return svgEdgeLabels}},{"./d3":7,"./label/add-label":18,"./lodash":20,"./util":25}],5:[function(require,module,exports){"use strict";var _=require("./lodash"),intersectNode=require("./intersect/intersect-node"),util=require("./util"),d3=require("./d3");module.exports=createEdgePaths;function createEdgePaths(selection,g,arrows){var svgPaths=selection.selectAll("g.edgePath").data(g.edges(),function(e){return util.edgeToId(e)}).classed("update",true);enter(svgPaths,g);exit(svgPaths,g);util.applyTransition(svgPaths,g).style("opacity",1);svgPaths.each(function(e){var edge=g.edge(e);edge.elem=this;if(edge.id){d3.select(this).attr("id",edge.id)}});svgPaths.selectAll("path.path").each(function(e){var edge=g.edge(e);edge.arrowheadId=_.uniqueId("arrowhead");var domEdge=d3.select(this).attr("marker-end",function(){return"url(#"+edge.arrowheadId+")"}).style("fill","none");util.applyTransition(domEdge,g).attr("d",function(e){return calcPoints(g,e)});util.applyStyle(domEdge,edge.style)});svgPaths.selectAll("defs *").remove();svgPaths.selectAll("defs").each(function(e){var edge=g.edge(e),arrowhead=arrows[edge.arrowhead];arrowhead(d3.select(this),edge.arrowheadId,edge,"arrowhead")});return svgPaths}function calcPoints(g,e){var edge=g.edge(e),tail=g.node(e.v),head=g.node(e.w),points=edge.points.slice(1,edge.points.length-1);points.unshift(intersectNode(tail,points[0]));points.push(intersectNode(head,points[points.length-1]));return createLine(edge,points)}function createLine(edge,points){var line=d3.svg.line().x(function(d){return d.x}).y(function(d){return d.y});if(_.has(edge,"lineInterpolate")){line.interpolate(edge.lineInterpolate)}if(_.has(edge,"lineTension")){line.tension(Number(edge.lineTension))}return line(points)}function getCoords(elem){var bbox=elem.getBBox(),matrix=elem.getTransformToElement(elem.ownerSVGElement).translate(bbox.width/2,bbox.height/2);return{x:matrix.e,y:matrix.f}}function enter(svgPaths,g){var svgPathsEnter=svgPaths.enter().append("g").attr("class","edgePath").style("opacity",0);svgPathsEnter.append("path").attr("class","path").attr("d",function(e){var edge=g.edge(e),sourceElem=g.node(e.v).elem,points=_.range(edge.points.length).map(function(){return getCoords(sourceElem)});return createLine(edge,points)});svgPathsEnter.append("defs")}function exit(svgPaths,g){var svgPathExit=svgPaths.exit();util.applyTransition(svgPathExit,g).style("opacity",0).remove();util.applyTransition(svgPathExit.select("path.path"),g).attr("d",function(e){var source=g.node(e.v);if(source){var points=_.range(this.pathSegList.length).map(function(){return source});return createLine({},points)}else{return d3.select(this).attr("d")}})}},{"./d3":7,"./intersect/intersect-node":14,"./lodash":20,"./util":25}],6:[function(require,module,exports){"use strict";var _=require("./lodash"),addLabel=require("./label/add-label"),util=require("./util"),d3=require("./d3");module.exports=createNodes;function createNodes(selection,g,shapes){var simpleNodes=g.nodes().filter(function(v){return!util.isSubgraph(g,v)});var svgNodes=selection.selectAll("g.node").data(simpleNodes,function(v){return v}).classed("update",true);svgNodes.selectAll("*").remove();svgNodes.enter().append("g").attr("class","node").style("opacity",0);svgNodes.each(function(v){var node=g.node(v),thisGroup=d3.select(this),labelGroup=thisGroup.append("g").attr("class","label"),labelDom=addLabel(labelGroup,node),shape=shapes[node.shape],bbox=_.pick(labelDom.node().getBBox(),"width","height");node.elem=this;if(node.id){thisGroup.attr("id",node.id)}if(node.labelId){labelGroup.attr("id",node.labelId)}util.applyClass(thisGroup,node["class"],(thisGroup.classed("update")?"update ":"")+"node");if(_.has(node,"width")){bbox.width=node.width}if(_.has(node,"height")){bbox.height=node.height}bbox.width+=node.paddingLeft+node.paddingRight;bbox.height+=node.paddingTop+node.paddingBottom;labelGroup.attr("transform","translate("+(node.paddingLeft-node.paddingRight)/2+","+(node.paddingTop-node.paddingBottom)/2+")");var shapeSvg=shape(d3.select(this),bbox,node);util.applyStyle(shapeSvg,node.style);var shapeBBox=shapeSvg.node().getBBox();node.width=shapeBBox.width;node.height=shapeBBox.height});util.applyTransition(svgNodes.exit(),g).style("opacity",0).remove();return svgNodes}},{"./d3":7,"./label/add-label":18,"./lodash":20,"./util":25}],7:[function(require,module,exports){module.exports=window.d3},{}],8:[function(require,module,exports){var dagre;if(require){try{dagre=require("dagre")}catch(e){}}if(!dagre){dagre=window.dagre}module.exports=dagre},{dagre:27}],9:[function(require,module,exports){var graphlib;if(require){try{graphlib=require("graphlib")}catch(e){}}if(!graphlib){graphlib=window.graphlib}module.exports=graphlib},{graphlib:57}],10:[function(require,module,exports){module.exports={node:require("./intersect-node"),circle:require("./intersect-circle"),ellipse:require("./intersect-ellipse"),polygon:require("./intersect-polygon"),rect:require("./intersect-rect")}},{"./intersect-circle":11,"./intersect-ellipse":12,"./intersect-node":14,"./intersect-polygon":15,"./intersect-rect":16}],11:[function(require,module,exports){var intersectEllipse=require("./intersect-ellipse");module.exports=intersectCircle;function intersectCircle(node,rx,point){return intersectEllipse(node,rx,rx,point)}},{"./intersect-ellipse":12}],12:[function(require,module,exports){module.exports=intersectEllipse;function intersectEllipse(node,rx,ry,point){var cx=node.x;var cy=node.y;var px=cx-point.x;var py=cy-point.y;var det=Math.sqrt(rx*rx*py*py+ry*ry*px*px);var dx=Math.abs(rx*ry*px/det);if(point.x<cx){dx=-dx}var dy=Math.abs(rx*ry*py/det);if(point.y<cy){dy=-dy}return{x:cx+dx,y:cy+dy}}},{}],13:[function(require,module,exports){module.exports=intersectLine;function intersectLine(p1,p2,q1,q2){var a1,a2,b1,b2,c1,c2;var r1,r2,r3,r4;var denom,offset,num;var x,y;a1=p2.y-p1.y;b1=p1.x-p2.x;c1=p2.x*p1.y-p1.x*p2.y;r3=a1*q1.x+b1*q1.y+c1;r4=a1*q2.x+b1*q2.y+c1;if(r3!==0&&r4!==0&&sameSign(r3,r4)){return}a2=q2.y-q1.y;b2=q1.x-q2.x;c2=q2.x*q1.y-q1.x*q2.y;r1=a2*p1.x+b2*p1.yy+c2;r2=a2*p2.x+b2*p2.y+c2;if(r1!==0&&r2!==0&&sameSign(r1,r2)){return}denom=a1*b2-a2*b1;if(denom===0){return}offset=Math.abs(denom/2);num=b1*c2-b2*c1;x=num<0?(num-offset)/denom:(num+offset)/denom;num=a2*c1-a1*c2;y=num<0?(num-offset)/denom:(num+offset)/denom;return{x:x,y:y}}function sameSign(r1,r2){return r1*r2>0}},{}],14:[function(require,module,exports){module.exports=intersectNode;function intersectNode(node,point){return node.intersect(point)}},{}],15:[function(require,module,exports){var intersectLine=require("./intersect-line");module.exports=intersectPolygon;function intersectPolygon(node,polyPoints,point){var x1=node.x;var y1=node.y;var intersections=[];var minX=Number.POSITIVE_INFINITY,minY=Number.POSITIVE_INFINITY;polyPoints.forEach(function(entry){minX=Math.min(minX,entry.x);minY=Math.min(minY,entry.y)});var left=x1-node.width/2-minX;var top=y1-node.height/2-minY;for(var i=0;i<polyPoints.length;i++){var p1=polyPoints[i];var p2=polyPoints[i<polyPoints.length-1?i+1:0];var intersect=intersectLine(node,point,{x:left+p1.x,y:top+p1.y},{x:left+p2.x,y:top+p2.y});if(intersect){intersections.push(intersect)}}if(!intersections.length){console.log("NO INTERSECTION FOUND, RETURN NODE CENTER",node);return node}if(intersections.length>1){intersections.sort(function(p,q){var pdx=p.x-point.x,pdy=p.y-point.y,distp=Math.sqrt(pdx*pdx+pdy*pdy),qdx=q.x-point.x,qdy=q.y-point.y,distq=Math.sqrt(qdx*qdx+qdy*qdy);return distp<distq?-1:distp===distq?0:1})}return intersections[0]}},{"./intersect-line":13}],16:[function(require,module,exports){module.exports=intersectRect;function intersectRect(node,point){var x=node.x;var y=node.y;var dx=point.x-x;var dy=point.y-y;var w=node.width/2;var h=node.height/2;var sx,sy;if(Math.abs(dy)*w>Math.abs(dx)*h){if(dy<0){h=-h}sx=dy===0?0:h*dx/dy;sy=h}else{if(dx<0){w=-w}sx=w;sy=dx===0?0:w*dy/dx}return{x:x+sx,y:y+sy}}},{}],17:[function(require,module,exports){var util=require("../util");module.exports=addHtmlLabel;function addHtmlLabel(root,node){var fo=root.append("foreignObject").attr("width","100000");var div=fo.append("xhtml:div");var label=node.label;switch(typeof label){case"function":div.insert(label);break;case"object":div.insert(function(){return label});break;default:div.html(label)}util.applyStyle(div,node.labelStyle);div.style("display","inline-block");div.style("white-space","nowrap");var w,h;div.each(function(){w=this.clientWidth;h=this.clientHeight});fo.attr("width",w).attr("height",h);return fo}},{"../util":25}],18:[function(require,module,exports){var addTextLabel=require("./add-text-label"),addHtmlLabel=require("./add-html-label");module.exports=addLabel;function addLabel(root,node){var label=node.label;var labelSvg=root.append("g");if(typeof label!=="string"||node.labelType==="html"){addHtmlLabel(labelSvg,node)}else{addTextLabel(labelSvg,node)}var labelBBox=labelSvg.node().getBBox();labelSvg.attr("transform","translate("+-labelBBox.width/2+","+-labelBBox.height/2+")");return labelSvg}},{"./add-html-label":17,"./add-text-label":19}],19:[function(require,module,exports){var util=require("../util");module.exports=addTextLabel;function addTextLabel(root,node){var domNode=root.append("text");var lines=processEscapeSequences(node.label).split("\n");for(var i=0;i<lines.length;i++){domNode.append("tspan").attr("xml:space","preserve").attr("dy","1em").attr("x","1").text(lines[i])}util.applyStyle(domNode,node.labelStyle);return domNode}function processEscapeSequences(text){var newText="",escaped=false,ch;for(var i=0;i<text.length;++i){ch=text[i];if(escaped){switch(ch){case"n":newText+="\n";break;default:newText+=ch}escaped=false}else if(ch==="\\"){escaped=true}else{newText+=ch}}return newText}},{"../util":25}],20:[function(require,module,exports){var lodash;if(require){try{lodash=require("lodash")}catch(e){}}if(!lodash){lodash=window._}module.exports=lodash},{lodash:77}],21:[function(require,module,exports){"use strict";var util=require("./util"),d3=require("./d3"),_=require("./lodash");module.exports=positionEdgeLabels;function positionEdgeLabels(selection,g){var created=selection.filter(function(){return!d3.select(this).classed("update")});function translate(e){var edge=g.edge(e);return _.has(edge,"x")?"translate("+edge.x+","+edge.y+")":""}created.attr("transform",translate);util.applyTransition(selection,g).style("opacity",1).attr("transform",translate)}},{"./d3":7,"./lodash":20,"./util":25}],22:[function(require,module,exports){"use strict";var util=require("./util"),d3=require("./d3");module.exports=positionNodes;function positionNodes(selection,g){var created=selection.filter(function(){return!d3.select(this).classed("update")});function translate(v){var node=g.node(v);return"translate("+node.x+","+node.y+")"}created.attr("transform",translate);util.applyTransition(selection,g).style("opacity",1).attr("transform",translate)}},{"./d3":7,"./util":25}],23:[function(require,module,exports){var _=require("./lodash"),layout=require("./dagre").layout;module.exports=render;function render(){var createNodes=require("./create-nodes"),createClusters=require("./create-clusters"),createEdgeLabels=require("./create-edge-labels"),createEdgePaths=require("./create-edge-paths"),positionNodes=require("./position-nodes"),positionEdgeLabels=require("./position-edge-labels"),shapes=require("./shapes"),arrows=require("./arrows");var fn=function(svg,g){preProcessGraph(g);var outputGroup=createOrSelectGroup(svg,"output"),clustersGroup=createOrSelectGroup(outputGroup,"clusters"),edgePathsGroup=createOrSelectGroup(outputGroup,"edgePaths"),edgeLabels=createEdgeLabels(createOrSelectGroup(outputGroup,"edgeLabels"),g),nodes=createNodes(createOrSelectGroup(outputGroup,"nodes"),g,shapes);layout(g);positionNodes(nodes,g);positionEdgeLabels(edgeLabels,g);createEdgePaths(edgePathsGroup,g,arrows);createClusters(clustersGroup,g);postProcessGraph(g)};fn.createNodes=function(value){if(!arguments.length)return createNodes;createNodes=value;return fn};fn.createClusters=function(value){if(!arguments.length)return createClusters;createClusters=value;return fn};fn.createEdgeLabels=function(value){if(!arguments.length)return createEdgeLabels;createEdgeLabels=value;return fn};fn.createEdgePaths=function(value){if(!arguments.length)return createEdgePaths;createEdgePaths=value;return fn};fn.shapes=function(value){if(!arguments.length)return shapes;shapes=value;return fn};fn.arrows=function(value){if(!arguments.length)return arrows;arrows=value;return fn};return fn}var NODE_DEFAULT_ATTRS={paddingLeft:10,paddingRight:10,paddingTop:10,paddingBottom:10,rx:0,ry:0,shape:"rect"};var EDGE_DEFAULT_ATTRS={arrowhead:"normal",lineInterpolate:"linear"};function preProcessGraph(g){g.nodes().forEach(function(v){var node=g.node(v);if(!_.has(node,"label")){node.label=v}if(_.has(node,"paddingX")){_.defaults(node,{paddingLeft:node.paddingX,paddingRight:node.paddingX})}if(_.has(node,"paddingY")){_.defaults(node,{paddingTop:node.paddingY,paddingBottom:node.paddingY})}if(_.has(node,"padding")){_.defaults(node,{paddingLeft:node.padding,paddingRight:node.padding,paddingTop:node.padding,paddingBottom:node.padding})}_.defaults(node,NODE_DEFAULT_ATTRS);_.each(["paddingLeft","paddingRight","paddingTop","paddingBottom"],function(k){node[k]=Number(node[k])});if(_.has(node,"width")){node._prevWidth=node.width}if(_.has(node,"height")){node._prevHeight=node.height}});g.edges().forEach(function(e){var edge=g.edge(e);if(!_.has(edge,"label")){edge.label=""}_.defaults(edge,EDGE_DEFAULT_ATTRS)})}function postProcessGraph(g){_.each(g.nodes(),function(v){var node=g.node(v);if(_.has(node,"_prevWidth")){node.width=node._prevWidth}else{delete node.width}if(_.has(node,"_prevHeight")){node.height=node._prevHeight}else{delete node.height}delete node._prevWidth;delete node._prevHeight})}function createOrSelectGroup(root,name){var selection=root.select("g."+name);if(selection.empty()){selection=root.append("g").attr("class",name)}return selection}},{"./arrows":2,"./create-clusters":3,"./create-edge-labels":4,"./create-edge-paths":5,"./create-nodes":6,"./dagre":8,"./lodash":20,"./position-edge-labels":21,"./position-nodes":22,"./shapes":24}],24:[function(require,module,exports){"use strict";var intersectRect=require("./intersect/intersect-rect"),intersectEllipse=require("./intersect/intersect-ellipse"),intersectCircle=require("./intersect/intersect-circle");module.exports={rect:rect,ellipse:ellipse,circle:circle};function rect(parent,bbox,node){var shapeSvg=parent.insert("rect",":first-child").attr("rx",node.rx).attr("ry",node.ry).attr("x",-bbox.width/2).attr("y",-bbox.height/2).attr("width",bbox.width).attr("height",bbox.height);node.intersect=function(point){return intersectRect(node,point)};return shapeSvg}function ellipse(parent,bbox,node){var rx=bbox.width/2,ry=bbox.height/2,shapeSvg=parent.insert("ellipse",":first-child").attr("x",-bbox.width/2).attr("y",-bbox.height/2).attr("rx",rx).attr("ry",ry);node.intersect=function(point){return intersectEllipse(node,rx,ry,point)};return shapeSvg}function circle(parent,bbox,node){var r=Math.max(bbox.width,bbox.height)/2,shapeSvg=parent.insert("circle",":first-child").attr("x",-bbox.width/2).attr("y",-bbox.height/2).attr("r",r);node.intersect=function(point){return intersectCircle(node,r,point)};return shapeSvg}},{"./intersect/intersect-circle":11,"./intersect/intersect-ellipse":12,"./intersect/intersect-rect":16}],25:[function(require,module,exports){var _=require("./lodash");module.exports={isSubgraph:isSubgraph,edgeToId:edgeToId,applyStyle:applyStyle,applyClass:applyClass,applyTransition:applyTransition};function isSubgraph(g,v){return!!g.children(v).length}function edgeToId(e){return escapeId(e.v)+":"+escapeId(e.w)+":"+escapeId(e.name)}var ID_DELIM=/:/g;function escapeId(str){return str?String(str).replace(ID_DELIM,"\\:"):""}function applyStyle(dom,styleFn){if(styleFn){dom.attr("style",styleFn)}}function applyClass(dom,classFn,otherClasses){if(classFn){dom.attr("class",classFn).attr("class",otherClasses+" "+dom.attr("class"))}}function applyTransition(selection,g){var graph=g.graph();if(_.isPlainObject(graph)){var transition=graph.transition;if(_.isFunction(transition)){return transition(selection)}}return selection}},{"./lodash":20}],26:[function(require,module,exports){module.exports="0.4.0"},{}],27:[function(require,module,exports){module.exports={graphlib:require("./lib/graphlib"),layout:require("./lib/layout"),debug:require("./lib/debug"),util:{time:require("./lib/util").time,notime:require("./lib/util").notime},version:require("./lib/version")}},{"./lib/debug":32,"./lib/graphlib":33,"./lib/layout":35,"./lib/util":55,"./lib/version":56}],28:[function(require,module,exports){"use strict";var _=require("./lodash"),greedyFAS=require("./greedy-fas");module.exports={run:run,undo:undo};function run(g){var fas=g.graph().acyclicer==="greedy"?greedyFAS(g,weightFn(g)):dfsFAS(g);_.each(fas,function(e){var label=g.edge(e);g.removeEdge(e);label.forwardName=e.name;label.reversed=true;g.setEdge(e.w,e.v,label,_.uniqueId("rev"))});function weightFn(g){return function(e){return g.edge(e).weight}}}function dfsFAS(g){var fas=[],stack={},visited={};function dfs(v){if(_.has(visited,v)){return}visited[v]=true;stack[v]=true;_.each(g.outEdges(v),function(e){if(_.has(stack,e.w)){fas.push(e)}else{dfs(e.w)}});delete stack[v]}_.each(g.nodes(),dfs);return fas}function undo(g){_.each(g.edges(),function(e){var label=g.edge(e);if(label.reversed){g.removeEdge(e);var forwardName=label.forwardName;delete label.reversed;delete label.forwardName;g.setEdge(e.w,e.v,label,forwardName)}})}},{"./greedy-fas":34,"./lodash":36}],29:[function(require,module,exports){var _=require("./lodash"),util=require("./util");module.exports=addBorderSegments;function addBorderSegments(g){function dfs(v){var children=g.children(v),node=g.node(v);if(children.length){_.each(children,dfs)}if(_.has(node,"minRank")){node.borderLeft=[];node.borderRight=[];for(var rank=node.minRank,maxRank=node.maxRank+1;rank<maxRank;++rank){addBorderNode(g,"borderLeft","_bl",v,node,rank);addBorderNode(g,"borderRight","_br",v,node,rank)}}}_.each(g.children(),dfs)}function addBorderNode(g,prop,prefix,sg,sgNode,rank){var label={width:0,height:0,rank:rank},prev=sgNode[prop][rank-1],curr=util.addDummyNode(g,"border",label,prefix);sgNode[prop][rank]=curr;g.setParent(curr,sg);if(prev){g.setEdge(prev,curr,{weight:1})}}},{"./lodash":36,"./util":55}],30:[function(require,module,exports){"use strict";var _=require("./lodash");module.exports={adjust:adjust,undo:undo};function adjust(g){var rankDir=g.graph().rankdir.toLowerCase();if(rankDir==="lr"||rankDir==="rl"){swapWidthHeight(g)}}function undo(g){var rankDir=g.graph().rankdir.toLowerCase();if(rankDir==="bt"||rankDir==="rl"){reverseY(g)}if(rankDir==="lr"||rankDir==="rl"){swapXY(g);swapWidthHeight(g)}}function swapWidthHeight(g){_.each(g.nodes(),function(v){swapWidthHeightOne(g.node(v))});_.each(g.edges(),function(e){swapWidthHeightOne(g.edge(e))})}function swapWidthHeightOne(attrs){var w=attrs.width;attrs.width=attrs.height;attrs.height=w}function reverseY(g){_.each(g.nodes(),function(v){reverseYOne(g.node(v))});_.each(g.edges(),function(e){var edge=g.edge(e);_.each(edge.points,reverseYOne);if(_.has(edge,"y")){reverseYOne(edge)}})}function reverseYOne(attrs){attrs.y=-attrs.y}function swapXY(g){_.each(g.nodes(),function(v){swapXYOne(g.node(v))});_.each(g.edges(),function(e){var edge=g.edge(e);_.each(edge.points,swapXYOne);if(_.has(edge,"x")){swapXYOne(edge)}})}function swapXYOne(attrs){var x=attrs.x;attrs.x=attrs.y;attrs.y=x}},{"./lodash":36}],31:[function(require,module,exports){module.exports=List;function List(){var sentinel={};sentinel._next=sentinel._prev=sentinel;this._sentinel=sentinel}List.prototype.dequeue=function(){var sentinel=this._sentinel,entry=sentinel._prev;if(entry!==sentinel){unlink(entry);return entry}};List.prototype.enqueue=function(entry){var sentinel=this._sentinel;if(entry._prev&&entry._next){unlink(entry)}entry._next=sentinel._next;sentinel._next._prev=entry;sentinel._next=entry;entry._prev=sentinel};List.prototype.toString=function(){var strs=[],sentinel=this._sentinel,curr=sentinel._prev;while(curr!==sentinel){strs.push(JSON.stringify(curr,filterOutLinks));curr=curr._prev}return"["+strs.join(", ")+"]"};function unlink(entry){entry._prev._next=entry._next;entry._next._prev=entry._prev;delete entry._next;delete entry._prev}function filterOutLinks(k,v){if(k!=="_next"&&k!=="_prev"){return v}}},{}],32:[function(require,module,exports){var _=require("./lodash"),util=require("./util"),Graph=require("./graphlib").Graph;module.exports={debugOrdering:debugOrdering};function debugOrdering(g){var layerMatrix=util.buildLayerMatrix(g);var h=new Graph({compound:true,multigraph:true}).setGraph({});_.each(g.nodes(),function(v){h.setNode(v,{label:v});h.setParent(v,"layer"+g.node(v).rank)});_.each(g.edges(),function(e){h.setEdge(e.v,e.w,{},e.name)});_.each(layerMatrix,function(layer,i){var layerV="layer"+i;h.setNode(layerV,{rank:"same"});_.reduce(layer,function(u,v){h.setEdge(u,v,{style:"invis"});return v})});return h}},{"./graphlib":33,"./lodash":36,"./util":55}],33:[function(require,module,exports){module.exports=require(9)},{"/Users/cpettitt/projects/dagre-d3/lib/graphlib.js":9,graphlib:57}],34:[function(require,module,exports){var _=require("./lodash"),Graph=require("./graphlib").Graph,List=require("./data/list");module.exports=greedyFAS;var DEFAULT_WEIGHT_FN=_.constant(1);function greedyFAS(g,weightFn){if(g.nodeCount()<=1){return[]}var state=buildState(g,weightFn||DEFAULT_WEIGHT_FN);var results=doGreedyFAS(state.graph,state.buckets,state.zeroIdx);return _.flatten(_.map(results,function(e){return g.outEdges(e.v,e.w)}),true)}function doGreedyFAS(g,buckets,zeroIdx){var results=[],sources=buckets[buckets.length-1],sinks=buckets[0];var entry;while(g.nodeCount()){while(entry=sinks.dequeue()){removeNode(g,buckets,zeroIdx,entry)}while(entry=sources.dequeue()){removeNode(g,buckets,zeroIdx,entry)}if(g.nodeCount()){for(var i=buckets.length-2;i>0;--i){entry=buckets[i].dequeue();if(entry){results=results.concat(removeNode(g,buckets,zeroIdx,entry,true));break}}}}return results}function removeNode(g,buckets,zeroIdx,entry,collectPredecessors){var results=collectPredecessors?[]:undefined;_.each(g.inEdges(entry.v),function(edge){var weight=g.edge(edge),uEntry=g.node(edge.v);if(collectPredecessors){results.push({v:edge.v,w:edge.w})}uEntry.out-=weight;assignBucket(buckets,zeroIdx,uEntry)});_.each(g.outEdges(entry.v),function(edge){var weight=g.edge(edge),w=edge.w,wEntry=g.node(w);wEntry["in"]-=weight;assignBucket(buckets,zeroIdx,wEntry)});g.removeNode(entry.v);return results}function buildState(g,weightFn){var fasGraph=new Graph,maxIn=0,maxOut=0;_.each(g.nodes(),function(v){fasGraph.setNode(v,{v:v,"in":0,out:0})});_.each(g.edges(),function(e){var prevWeight=fasGraph.edge(e.v,e.w)||0,weight=weightFn(e),edgeWeight=prevWeight+weight;fasGraph.setEdge(e.v,e.w,edgeWeight);maxOut=Math.max(maxOut,fasGraph.node(e.v).out+=weight);maxIn=Math.max(maxIn,fasGraph.node(e.w)["in"]+=weight)});var buckets=_.range(maxOut+maxIn+3).map(function(){return new List});var zeroIdx=maxIn+1;_.each(fasGraph.nodes(),function(v){assignBucket(buckets,zeroIdx,fasGraph.node(v))});return{graph:fasGraph,buckets:buckets,zeroIdx:zeroIdx}}function assignBucket(buckets,zeroIdx,entry){if(!entry.out){buckets[0].enqueue(entry)}else if(!entry["in"]){buckets[buckets.length-1].enqueue(entry)}else{buckets[entry.out-entry["in"]+zeroIdx].enqueue(entry)}}},{"./data/list":31,"./graphlib":33,"./lodash":36}],35:[function(require,module,exports){"use strict";var _=require("./lodash"),acyclic=require("./acyclic"),normalize=require("./normalize"),rank=require("./rank"),normalizeRanks=require("./util").normalizeRanks,parentDummyChains=require("./parent-dummy-chains"),removeEmptyRanks=require("./util").removeEmptyRanks,nestingGraph=require("./nesting-graph"),addBorderSegments=require("./add-border-segments"),coordinateSystem=require("./coordinate-system"),order=require("./order"),position=require("./position"),util=require("./util"),Graph=require("./graphlib").Graph;module.exports=layout;function layout(g,opts){var time=opts&&opts.debugTiming?util.time:util.notime;time("layout",function(){var layoutGraph=time(" buildLayoutGraph",function(){return buildLayoutGraph(g)});time(" runLayout",function(){runLayout(layoutGraph,time)});time(" updateInputGraph",function(){updateInputGraph(g,layoutGraph)})})}function runLayout(g,time){time(" makeSpaceForEdgeLabels",function(){makeSpaceForEdgeLabels(g)});time(" removeSelfEdges",function(){removeSelfEdges(g)});time(" acyclic",function(){acyclic.run(g)});time(" nestingGraph.run",function(){nestingGraph.run(g)});time(" rank",function(){rank(util.asNonCompoundGraph(g))});time(" injectEdgeLabelProxies",function(){injectEdgeLabelProxies(g)});time(" removeEmptyRanks",function(){removeEmptyRanks(g)});time(" nestingGraph.cleanup",function(){nestingGraph.cleanup(g)});time(" normalizeRanks",function(){normalizeRanks(g)});time(" assignRankMinMax",function(){assignRankMinMax(g)});time(" removeEdgeLabelProxies",function(){removeEdgeLabelProxies(g)});time(" normalize.run",function(){normalize.run(g)});time(" parentDummyChains",function(){parentDummyChains(g)});time(" addBorderSegments",function(){addBorderSegments(g)});time(" order",function(){order(g)});time(" insertSelfEdges",function(){insertSelfEdges(g)});time(" adjustCoordinateSystem",function(){coordinateSystem.adjust(g)});time(" position",function(){position(g)});time(" positionSelfEdges",function(){positionSelfEdges(g)});time(" removeBorderNodes",function(){removeBorderNodes(g)});time(" normalize.undo",function(){normalize.undo(g)});time(" fixupEdgeLabelCoords",function(){fixupEdgeLabelCoords(g)});time(" undoCoordinateSystem",function(){coordinateSystem.undo(g)});time(" translateGraph",function(){translateGraph(g)});time(" assignNodeIntersects",function(){assignNodeIntersects(g)});time(" reversePoints",function(){reversePointsForReversedEdges(g)});time(" acyclic.undo",function(){acyclic.undo(g)})}function updateInputGraph(inputGraph,layoutGraph){_.each(inputGraph.nodes(),function(v){var inputLabel=inputGraph.node(v),layoutLabel=layoutGraph.node(v);if(inputLabel){inputLabel.x=layoutLabel.x;inputLabel.y=layoutLabel.y;if(layoutGraph.children(v).length){inputLabel.width=layoutLabel.width;inputLabel.height=layoutLabel.height}}});_.each(inputGraph.edges(),function(e){var inputLabel=inputGraph.edge(e),layoutLabel=layoutGraph.edge(e);inputLabel.points=layoutLabel.points;if(_.has(layoutLabel,"x")){inputLabel.x=layoutLabel.x;inputLabel.y=layoutLabel.y}});inputGraph.graph().width=layoutGraph.graph().width;inputGraph.graph().height=layoutGraph.graph().height}var graphNumAttrs=["nodesep","edgesep","ranksep","marginx","marginy"],graphDefaults={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},graphAttrs=["acyclicer","ranker","rankdir","align"],nodeNumAttrs=["width","height"],nodeDefaults={width:0,height:0},edgeNumAttrs=["minlen","weight","width","height","labeloffset"],edgeDefaults={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},edgeAttrs=["labelpos"];function buildLayoutGraph(inputGraph){var g=new Graph({multigraph:true,compound:true}),graph=canonicalize(inputGraph.graph());g.setGraph(_.merge({},graphDefaults,selectNumberAttrs(graph,graphNumAttrs),_.pick(graph,graphAttrs)));_.each(inputGraph.nodes(),function(v){var node=canonicalize(inputGraph.node(v));g.setNode(v,_.defaults(selectNumberAttrs(node,nodeNumAttrs),nodeDefaults));g.setParent(v,inputGraph.parent(v))});_.each(inputGraph.edges(),function(e){var edge=canonicalize(inputGraph.edge(e));g.setEdge(e,_.merge({},edgeDefaults,selectNumberAttrs(edge,edgeNumAttrs),_.pick(edge,edgeAttrs)))});return g}function makeSpaceForEdgeLabels(g){var graph=g.graph();graph.ranksep/=2;_.each(g.edges(),function(e){var edge=g.edge(e);edge.minlen*=2;if(edge.labelpos.toLowerCase()!=="c"){if(graph.rankdir==="TB"||graph.rankdir==="BT"){edge.width+=edge.labeloffset}else{edge.height+=edge.labeloffset}}})}function injectEdgeLabelProxies(g){_.each(g.edges(),function(e){var edge=g.edge(e);if(edge.width&&edge.height){var v=g.node(e.v),w=g.node(e.w),label={rank:(w.rank-v.rank)/2+v.rank,e:e};util.addDummyNode(g,"edge-proxy",label,"_ep")}})}function assignRankMinMax(g){var maxRank=0;_.each(g.nodes(),function(v){var node=g.node(v);if(node.borderTop){node.minRank=g.node(node.borderTop).rank;node.maxRank=g.node(node.borderBottom).rank;maxRank=_.max(maxRank,node.maxRank)}});g.graph().maxRank=maxRank}function removeEdgeLabelProxies(g){_.each(g.nodes(),function(v){var node=g.node(v);if(node.dummy==="edge-proxy"){g.edge(node.e).labelRank=node.rank;g.removeNode(v)}})}function translateGraph(g){var minX=Number.POSITIVE_INFINITY,maxX=0,minY=Number.POSITIVE_INFINITY,maxY=0,graphLabel=g.graph(),marginX=graphLabel.marginx||0,marginY=graphLabel.marginy||0;function getExtremes(attrs){var x=attrs.x,y=attrs.y,w=attrs.width,h=attrs.height; minX=Math.min(minX,x-w/2);maxX=Math.max(maxX,x+w/2);minY=Math.min(minY,y-h/2);maxY=Math.max(maxY,y+h/2)}_.each(g.nodes(),function(v){getExtremes(g.node(v))});_.each(g.edges(),function(e){var edge=g.edge(e);if(_.has(edge,"x")){getExtremes(edge)}});minX-=marginX;minY-=marginY;_.each(g.nodes(),function(v){var node=g.node(v);node.x-=minX;node.y-=minY});_.each(g.edges(),function(e){var edge=g.edge(e);_.each(edge.points,function(p){p.x-=minX;p.y-=minY});if(_.has(edge,"x")){edge.x-=minX}if(_.has(edge,"y")){edge.y-=minY}});graphLabel.width=maxX-minX+marginX;graphLabel.height=maxY-minY+marginY}function assignNodeIntersects(g){_.each(g.edges(),function(e){var edge=g.edge(e),nodeV=g.node(e.v),nodeW=g.node(e.w),p1,p2;if(!edge.points){edge.points=[];p1=nodeW;p2=nodeV}else{p1=edge.points[0];p2=edge.points[edge.points.length-1]}edge.points.unshift(util.intersectRect(nodeV,p1));edge.points.push(util.intersectRect(nodeW,p2))})}function fixupEdgeLabelCoords(g){_.each(g.edges(),function(e){var edge=g.edge(e);if(_.has(edge,"x")){if(edge.labelpos==="l"||edge.labelpos==="r"){edge.width-=edge.labeloffset}switch(edge.labelpos){case"l":edge.x-=edge.width/2+edge.labeloffset;break;case"r":edge.x+=edge.width/2+edge.labeloffset;break}}})}function reversePointsForReversedEdges(g){_.each(g.edges(),function(e){var edge=g.edge(e);if(edge.reversed){edge.points.reverse()}})}function removeBorderNodes(g){_.each(g.nodes(),function(v){if(g.children(v).length){var node=g.node(v),t=g.node(node.borderTop),b=g.node(node.borderBottom),l=g.node(_.last(node.borderLeft)),r=g.node(_.last(node.borderRight));node.width=Math.abs(r.x-l.x);node.height=Math.abs(b.y-t.y);node.x=l.x+node.width/2;node.y=t.y+node.height/2}});_.each(g.nodes(),function(v){if(g.node(v).dummy==="border"){g.removeNode(v)}})}function removeSelfEdges(g){_.each(g.edges(),function(e){if(e.v===e.w){var node=g.node(e.v);if(!node.selfEdges){node.selfEdges=[]}node.selfEdges.push({e:e,label:g.edge(e)});g.removeEdge(e)}})}function insertSelfEdges(g){var layers=util.buildLayerMatrix(g);_.each(layers,function(layer){var orderShift=0;_.each(layer,function(v,i){var node=g.node(v);node.order=i+orderShift;_.each(node.selfEdges,function(selfEdge){util.addDummyNode(g,"selfedge",{width:selfEdge.label.width,height:selfEdge.label.height,rank:node.rank,order:i+ ++orderShift,e:selfEdge.e,label:selfEdge.label},"_se")});delete node.selfEdges})})}function positionSelfEdges(g){_.each(g.nodes(),function(v){var node=g.node(v);if(node.dummy==="selfedge"){var selfNode=g.node(node.e.v),x=selfNode.x+selfNode.width/2,y=selfNode.y,dx=node.x-x,dy=selfNode.height/2;g.setEdge(node.e,node.label);g.removeNode(v);node.label.points=[{x:x+2*dx/3,y:y-dy},{x:x+5*dx/6,y:y-dy},{x:x+dx,y:y},{x:x+5*dx/6,y:y+dy},{x:x+2*dx/3,y:y+dy}];node.label.x=node.x;node.label.y=node.y}})}function selectNumberAttrs(obj,attrs){return _.mapValues(_.pick(obj,attrs),Number)}function canonicalize(attrs){var newAttrs={};_.each(attrs,function(v,k){newAttrs[k.toLowerCase()]=v});return newAttrs}},{"./acyclic":28,"./add-border-segments":29,"./coordinate-system":30,"./graphlib":33,"./lodash":36,"./nesting-graph":37,"./normalize":38,"./order":43,"./parent-dummy-chains":48,"./position":50,"./rank":52,"./util":55}],36:[function(require,module,exports){module.exports=require(20)},{"/Users/cpettitt/projects/dagre-d3/lib/lodash.js":20,lodash:77}],37:[function(require,module,exports){var _=require("./lodash"),util=require("./util");module.exports={run:run,cleanup:cleanup};function run(g){var root=util.addDummyNode(g,"root",{},"_root"),depths=treeDepths(g),height=_.max(depths)-1,nodeSep=2*height+1;g.graph().nestingRoot=root;_.each(g.edges(),function(e){g.edge(e).minlen*=nodeSep});var weight=sumWeights(g)+1;_.each(g.children(),function(child){dfs(g,root,nodeSep,weight,height,depths,child)});g.graph().nodeRankFactor=nodeSep}function dfs(g,root,nodeSep,weight,height,depths,v){var children=g.children(v);if(!children.length){if(v!==root){g.setEdge(root,v,{weight:0,minlen:nodeSep})}return}var top=util.addBorderNode(g,"_bt"),bottom=util.addBorderNode(g,"_bb"),label=g.node(v);g.setParent(top,v);label.borderTop=top;g.setParent(bottom,v);label.borderBottom=bottom;_.each(children,function(child){dfs(g,root,nodeSep,weight,height,depths,child);var childNode=g.node(child),childTop=childNode.borderTop?childNode.borderTop:child,childBottom=childNode.borderBottom?childNode.borderBottom:child,thisWeight=childNode.borderTop?weight:2*weight,minlen=childTop!==childBottom?1:height-depths[v]+1;g.setEdge(top,childTop,{weight:thisWeight,minlen:minlen,nestingEdge:true});g.setEdge(childBottom,bottom,{weight:thisWeight,minlen:minlen,nestingEdge:true})});if(!g.parent(v)){g.setEdge(root,top,{weight:0,minlen:height+depths[v]})}}function treeDepths(g){var depths={};function dfs(v,depth){var children=g.children(v);if(children&&children.length){_.each(children,function(child){dfs(child,depth+1)})}depths[v]=depth}_.each(g.children(),function(v){dfs(v,1)});return depths}function sumWeights(g){return _.reduce(g.edges(),function(acc,e){return acc+g.edge(e).weight},0)}function cleanup(g){var graphLabel=g.graph();g.removeNode(graphLabel.nestingRoot);delete graphLabel.nestingRoot;_.each(g.edges(),function(e){var edge=g.edge(e);if(edge.nestingEdge){g.removeEdge(e)}})}},{"./lodash":36,"./util":55}],38:[function(require,module,exports){"use strict";var _=require("./lodash"),util=require("./util");module.exports={run:run,undo:undo};function run(g){g.graph().dummyChains=[];_.each(g.edges(),function(edge){normalizeEdge(g,edge)})}function normalizeEdge(g,e){var v=e.v,vRank=g.node(v).rank,w=e.w,wRank=g.node(w).rank,name=e.name,edgeLabel=g.edge(e),labelRank=edgeLabel.labelRank;if(wRank===vRank+1)return;g.removeEdge(e);var dummy,attrs,i;for(i=0,++vRank;vRank<wRank;++i,++vRank){edgeLabel.points=[];attrs={width:0,height:0,edgeLabel:edgeLabel,edgeObj:e,rank:vRank};dummy=util.addDummyNode(g,"edge",attrs,"_d");if(vRank===labelRank){attrs.width=edgeLabel.width;attrs.height=edgeLabel.height;attrs.dummy="edge-label";attrs.labelpos=edgeLabel.labelpos}g.setEdge(v,dummy,{weight:edgeLabel.weight},name);if(i===0){g.graph().dummyChains.push(dummy)}v=dummy}g.setEdge(v,w,{weight:edgeLabel.weight},name)}function undo(g){_.each(g.graph().dummyChains,function(v){var node=g.node(v),origLabel=node.edgeLabel,w;g.setEdge(node.edgeObj,origLabel);while(node.dummy){w=g.successors(v)[0];g.removeNode(v);origLabel.points.push({x:node.x,y:node.y});if(node.dummy==="edge-label"){origLabel.x=node.x;origLabel.y=node.y;origLabel.width=node.width;origLabel.height=node.height}v=w;node=g.node(v)}})}},{"./lodash":36,"./util":55}],39:[function(require,module,exports){var _=require("../lodash");module.exports=addSubgraphConstraints;function addSubgraphConstraints(g,cg,vs){var prev={},rootPrev;_.each(vs,function(v){var child=g.parent(v),parent,prevChild;while(child){parent=g.parent(child);if(parent){prevChild=prev[parent];prev[parent]=child}else{prevChild=rootPrev;rootPrev=child}if(prevChild&&prevChild!==child){cg.setEdge(prevChild,child);return}child=parent}})}},{"../lodash":36}],40:[function(require,module,exports){var _=require("../lodash");module.exports=barycenter;function barycenter(g,movable){return _.map(movable,function(v){var inV=g.inEdges(v);if(!inV.length){return{v:v}}else{var result=_.reduce(inV,function(acc,e){var edge=g.edge(e),nodeU=g.node(e.v);return{sum:acc.sum+edge.weight*nodeU.order,weight:acc.weight+edge.weight}},{sum:0,weight:0});return{v:v,barycenter:result.sum/result.weight,weight:result.weight}}})}},{"../lodash":36}],41:[function(require,module,exports){var _=require("../lodash"),Graph=require("../graphlib").Graph;module.exports=buildLayerGraph;function buildLayerGraph(g,rank,relationship){var root=createRootNode(g),result=new Graph({compound:true}).setGraph({root:root}).setDefaultNodeLabel(function(v){return g.node(v)});_.each(g.nodes(),function(v){var node=g.node(v),parent=g.parent(v);if(node.rank===rank||node.minRank<=rank&&rank<=node.maxRank){result.setNode(v);result.setParent(v,parent||root);_.each(g[relationship](v),function(e){var u=e.v===v?e.w:e.v,edge=result.edge(u,v),weight=!_.isUndefined(edge)?edge.weight:0;result.setEdge(u,v,{weight:g.edge(e).weight+weight})});if(_.has(node,"minRank")){result.setNode(v,{borderLeft:node.borderLeft[rank],borderRight:node.borderRight[rank]})}}});return result}function createRootNode(g){var v;while(g.hasNode(v=_.uniqueId("_root")));return v}},{"../graphlib":33,"../lodash":36}],42:[function(require,module,exports){"use strict";var _=require("../lodash");module.exports=crossCount;function crossCount(g,layering){var cc=0;for(var i=1;i<layering.length;++i){cc+=twoLayerCrossCount(g,layering[i-1],layering[i])}return cc}function twoLayerCrossCount(g,northLayer,southLayer){var southPos=_.zipObject(southLayer,_.map(southLayer,function(v,i){return i}));var southEntries=_.flatten(_.map(northLayer,function(v){return _.chain(g.outEdges(v)).map(function(e){return{pos:southPos[e.w],weight:g.edge(e).weight}}).sortBy("pos").value()}),true);var firstIndex=1;while(firstIndex<southLayer.length)firstIndex<<=1;var treeSize=2*firstIndex-1;firstIndex-=1;var tree=_.map(new Array(treeSize),function(){return 0});var cc=0;_.each(southEntries.forEach(function(entry){var index=entry.pos+firstIndex;tree[index]+=entry.weight;var weightSum=0;while(index>0){if(index%2){weightSum+=tree[index+1]}index=index-1>>1;tree[index]+=entry.weight}cc+=entry.weight*weightSum}));return cc}},{"../lodash":36}],43:[function(require,module,exports){"use strict";var _=require("../lodash"),initOrder=require("./init-order"),crossCount=require("./cross-count"),sortSubgraph=require("./sort-subgraph"),buildLayerGraph=require("./build-layer-graph"),addSubgraphConstraints=require("./add-subgraph-constraints"),Graph=require("../graphlib").Graph,util=require("../util");module.exports=order;function order(g){var maxRank=util.maxRank(g),downLayerGraphs=buildLayerGraphs(g,_.range(1,maxRank+1),"inEdges"),upLayerGraphs=buildLayerGraphs(g,_.range(maxRank-1,-1,-1),"outEdges");var layering=initOrder(g);assignOrder(g,layering);var bestCC=Number.POSITIVE_INFINITY,best;for(var i=0,lastBest=0;lastBest<4;++i,++lastBest){sweepLayerGraphs(i%2?downLayerGraphs:upLayerGraphs,i%4>=2);layering=util.buildLayerMatrix(g);var cc=crossCount(g,layering);if(cc<bestCC){lastBest=0;best=_.cloneDeep(layering);bestCC=cc}}assignOrder(g,best)}function buildLayerGraphs(g,ranks,relationship){return _.map(ranks,function(rank){return buildLayerGraph(g,rank,relationship)})}function sweepLayerGraphs(layerGraphs,biasRight){var cg=new Graph;_.each(layerGraphs,function(lg){var root=lg.graph().root;var sorted=sortSubgraph(lg,root,cg,biasRight);_.each(sorted.vs,function(v,i){lg.node(v).order=i});addSubgraphConstraints(lg,cg,sorted.vs)})}function assignOrder(g,layering){_.each(layering,function(layer){_.each(layer,function(v,i){g.node(v).order=i})})}},{"../graphlib":33,"../lodash":36,"../util":55,"./add-subgraph-constraints":39,"./build-layer-graph":41,"./cross-count":42,"./init-order":44,"./sort-subgraph":46}],44:[function(require,module,exports){"use strict";var _=require("../lodash");module.exports=initOrder;function initOrder(g){var visited={},simpleNodes=_.filter(g.nodes(),function(v){return!g.children(v).length}),maxRank=_.max(_.map(simpleNodes,function(v){return g.node(v).rank})),layers=_.map(_.range(maxRank+1),function(){return[]});function dfs(v){if(_.has(visited,v))return;visited[v]=true;var node=g.node(v);layers[node.rank].push(v);_.each(g.successors(v),dfs)}var orderedVs=_.sortBy(simpleNodes,function(v){return g.node(v).rank});_.each(orderedVs,dfs);return layers}},{"../lodash":36}],45:[function(require,module,exports){"use strict";var _=require("../lodash");module.exports=resolveConflicts;function resolveConflicts(entries,cg){var mappedEntries={};_.each(entries,function(entry,i){var tmp=mappedEntries[entry.v]={indegree:0,"in":[],out:[],vs:[entry.v],i:i};if(!_.isUndefined(entry.barycenter)){tmp.barycenter=entry.barycenter;tmp.weight=entry.weight}});_.each(cg.edges(),function(e){var entryV=mappedEntries[e.v],entryW=mappedEntries[e.w];if(!_.isUndefined(entryV)&&!_.isUndefined(entryW)){entryW.indegree++;entryV.out.push(mappedEntries[e.w])}});var sourceSet=_.filter(mappedEntries,function(entry){return!entry.indegree});return doResolveConflicts(sourceSet)}function doResolveConflicts(sourceSet){var entries=[];function handleIn(vEntry){return function(uEntry){if(uEntry.merged){return}if(_.isUndefined(uEntry.barycenter)||_.isUndefined(vEntry.barycenter)||uEntry.barycenter>=vEntry.barycenter){mergeEntries(vEntry,uEntry)}}}function handleOut(vEntry){return function(wEntry){wEntry["in"].push(vEntry);if(--wEntry.indegree===0){sourceSet.push(wEntry)}}}while(sourceSet.length){var entry=sourceSet.pop();entries.push(entry);_.each(entry["in"].reverse(),handleIn(entry));_.each(entry.out,handleOut(entry))}return _.chain(entries).filter(function(entry){return!entry.merged}).map(function(entry){return _.pick(entry,["vs","i","barycenter","weight"])}).value()}function mergeEntries(target,source){var sum=0,weight=0;if(target.weight){sum+=target.barycenter*target.weight;weight+=target.weight}if(source.weight){sum+=source.barycenter*source.weight;weight+=source.weight}target.vs=source.vs.concat(target.vs);target.barycenter=sum/weight;target.weight=weight;target.i=Math.min(source.i,target.i);source.merged=true}},{"../lodash":36}],46:[function(require,module,exports){var _=require("../lodash"),barycenter=require("./barycenter"),resolveConflicts=require("./resolve-conflicts"),sort=require("./sort");module.exports=sortSubgraph;function sortSubgraph(g,v,cg,biasRight){var movable=g.children(v),node=g.node(v),bl=node?node.borderLeft:undefined,br=node?node.borderRight:undefined,subgraphs={};if(bl){movable=_.filter(movable,function(w){return w!==bl&&w!==br})}var barycenters=barycenter(g,movable);_.each(barycenters,function(entry){if(g.children(entry.v).length){var subgraphResult=sortSubgraph(g,entry.v,cg,biasRight);subgraphs[entry.v]=subgraphResult;if(_.has(subgraphResult,"barycenter")){mergeBarycenters(entry,subgraphResult)}}});var entries=resolveConflicts(barycenters,cg);expandSubgraphs(entries,subgraphs);var result=sort(entries,biasRight);if(bl){result.vs=_.flatten([bl,result.vs,br],true);if(g.predecessors(bl).length){var blPred=g.node(g.predecessors(bl)[0]),brPred=g.node(g.predecessors(br)[0]);if(!_.has(result,"barycenter")){result.barycenter=0;result.weight=0}result.barycenter=(result.barycenter*result.weight+blPred.order+brPred.order)/(result.weight+2);result.weight+=2}}return result}function expandSubgraphs(entries,subgraphs){_.each(entries,function(entry){entry.vs=_.flatten(entry.vs.map(function(v){if(subgraphs[v]){return subgraphs[v].vs}return v}),true)})}function mergeBarycenters(target,other){if(!_.isUndefined(target.barycenter)){target.barycenter=(target.barycenter*target.weight+other.barycenter*other.weight)/(target.weight+other.weight);target.weight+=other.weight}else{target.barycenter=other.barycenter;target.weight=other.weight}}},{"../lodash":36,"./barycenter":40,"./resolve-conflicts":45,"./sort":47}],47:[function(require,module,exports){var _=require("../lodash"),util=require("../util");module.exports=sort;function sort(entries,biasRight){var parts=util.partition(entries,function(entry){return _.has(entry,"barycenter")});var sortable=parts.lhs,unsortable=_.sortBy(parts.rhs,function(entry){return-entry.i}),vs=[],sum=0,weight=0,vsIndex=0;sortable.sort(compareWithBias(!!biasRight));vsIndex=consumeUnsortable(vs,unsortable,vsIndex);_.each(sortable,function(entry){vsIndex+=entry.vs.length;vs.push(entry.vs);sum+=entry.barycenter*entry.weight;weight+=entry.weight;vsIndex=consumeUnsortable(vs,unsortable,vsIndex)});var result={vs:_.flatten(vs,true)};if(weight){result.barycenter=sum/weight;result.weight=weight}return result}function consumeUnsortable(vs,unsortable,index){var last;while(unsortable.length&&(last=_.last(unsortable)).i<=index){unsortable.pop();vs.push(last.vs);index++}return index}function compareWithBias(bias){return function(entryV,entryW){if(entryV.barycenter<entryW.barycenter){return-1}else if(entryV.barycenter>entryW.barycenter){return 1}return!bias?entryV.i-entryW.i:entryW.i-entryV.i}}},{"../lodash":36,"../util":55}],48:[function(require,module,exports){var _=require("./lodash");module.exports=parentDummyChains;function parentDummyChains(g){var postorderNums=postorder(g);_.each(g.graph().dummyChains,function(v){var node=g.node(v),edgeObj=node.edgeObj,pathData=findPath(g,postorderNums,edgeObj.v,edgeObj.w),path=pathData.path,lca=pathData.lca,pathIdx=0,pathV=path[pathIdx],ascending=true;while(v!==edgeObj.w){node=g.node(v);if(ascending){while((pathV=path[pathIdx])!==lca&&g.node(pathV).maxRank<node.rank){pathIdx++}if(pathV===lca){ascending=false}}if(!ascending){while(pathIdx<path.length-1&&g.node(pathV=path[pathIdx+1]).minRank<=node.rank){pathIdx++}pathV=path[pathIdx]}g.setParent(v,pathV);v=g.successors(v)[0]}})}function findPath(g,postorderNums,v,w){var vPath=[],wPath=[],low=Math.min(postorderNums[v].low,postorderNums[w].low),lim=Math.max(postorderNums[v].lim,postorderNums[w].lim),parent,lca;parent=v;do{parent=g.parent(parent);vPath.push(parent)}while(parent&&(postorderNums[parent].low>low||lim>postorderNums[parent].lim));lca=parent;parent=w;while((parent=g.parent(parent))!==lca){wPath.push(parent)}return{path:vPath.concat(wPath.reverse()),lca:lca}}function postorder(g){var result={},lim=0;function dfs(v){var low=lim;_.each(g.children(v),dfs);result[v]={low:low,lim:lim++}}_.each(g.children(),dfs);return result}},{"./lodash":36}],49:[function(require,module,exports){"use strict";var _=require("../lodash"),Graph=require("../graphlib").Graph,util=require("../util");module.exports={positionX:positionX,findType1Conflicts:findType1Conflicts,findType2Conflicts:findType2Conflicts,addConflict:addConflict,hasConflict:hasConflict,verticalAlignment:verticalAlignment,horizontalCompaction:horizontalCompaction,alignCoordinates:alignCoordinates,findSmallestWidthAlignment:findSmallestWidthAlignment,balance:balance};function findType1Conflicts(g,layering){var conflicts={};function visitLayer(prevLayer,layer){var k0=0,scanPos=0,prevLayerLength=prevLayer.length,lastNode=_.last(layer);_.each(layer,function(v,i){var w=findOtherInnerSegmentNode(g,v),k1=w?g.node(w).order:prevLayerLength;if(w||v===lastNode){_.each(layer.slice(scanPos,i+1),function(scanNode){_.each(g.predecessors(scanNode),function(u){var uLabel=g.node(u),uPos=uLabel.order;if((uPos<k0||k1<uPos)&&!(uLabel.dummy&&g.node(scanNode).dummy)){addConflict(conflicts,u,scanNode)}})});scanPos=i+1;k0=k1}});return layer}_.reduce(layering,visitLayer);return conflicts}function findType2Conflicts(g,layering){var conflicts={};function scan(south,southPos,southEnd,prevNorthBorder,nextNorthBorder){var v;_.each(_.range(southPos,southEnd),function(i){v=south[i];if(g.node(v).dummy){_.each(g.predecessors(v),function(u){var uNode=g.node(u);if(uNode.dummy&&(uNode.order<prevNorthBorder||uNode.order>nextNorthBorder)){addConflict(conflicts,u,v)}})}})}function visitLayer(north,south){var prevNorthPos=-1,nextNorthPos,southPos=0;_.each(south,function(v,southLookahead){if(g.node(v).dummy==="border"){var predecessors=g.predecessors(v);if(predecessors.length){nextNorthPos=g.node(predecessors[0]).order;scan(south,southPos,southLookahead,prevNorthPos,nextNorthPos);southPos=southLookahead;prevNorthPos=nextNorthPos}}scan(south,southPos,south.length,nextNorthPos,north.length)});return south}_.reduce(layering,visitLayer);return conflicts}function findOtherInnerSegmentNode(g,v){if(g.node(v).dummy){return _.find(g.predecessors(v),function(u){return g.node(u).dummy})}}function addConflict(conflicts,v,w){if(v>w){var tmp=v;v=w;w=tmp}var conflictsV=conflicts[v];if(!conflictsV){conflicts[v]=conflictsV={}}conflictsV[w]=true}function hasConflict(conflicts,v,w){if(v>w){var tmp=v;v=w;w=tmp}return _.has(conflicts[v],w)}function verticalAlignment(g,layering,conflicts,neighborFn){var root={},align={},pos={};_.each(layering,function(layer){_.each(layer,function(v,order){root[v]=v;align[v]=v;pos[v]=order})});_.each(layering,function(layer){var prevIdx=-1;_.each(layer,function(v){var ws=neighborFn(v);if(ws.length){ws=_.sortBy(ws,function(w){return pos[w]});var mp=(ws.length-1)/2;for(var i=Math.floor(mp),il=Math.ceil(mp);i<=il;++i){var w=ws[i];if(align[v]===v&&prevIdx<pos[w]&&!hasConflict(conflicts,v,w)){align[w]=v;align[v]=root[v]=root[w];prevIdx=pos[w]}}}})});return{root:root,align:align}}function horizontalCompaction(g,layering,root,align,reverseSep){var xs={},blockG=buildBlockGraph(g,layering,root,reverseSep);var visited={};function pass1(v){if(!_.has(visited,v)){visited[v]=true;xs[v]=_.reduce(blockG.inEdges(v),function(max,e){pass1(e.v);return Math.max(max,xs[e.v]+blockG.edge(e))},0)}}_.each(blockG.nodes(),pass1);function pass2(v){if(visited[v]!==2){visited[v]++;var min=_.reduce(blockG.outEdges(v),function(min,e){pass2(e.w);return Math.min(min,xs[e.w]-blockG.edge(e))},Number.POSITIVE_INFINITY);if(min!==Number.POSITIVE_INFINITY){xs[v]=Math.max(xs[v],min)}}}_.each(blockG.nodes(),pass2);_.each(align,function(v){xs[v]=xs[root[v]]});return xs}function buildBlockGraph(g,layering,root,reverseSep){var blockGraph=new Graph,graphLabel=g.graph(),sepFn=sep(graphLabel.nodesep,graphLabel.edgesep,reverseSep);_.each(layering,function(layer){var u;_.each(layer,function(v){var vRoot=root[v];blockGraph.setNode(vRoot);if(u){var uRoot=root[u],prevMax=blockGraph.edge(uRoot,vRoot);blockGraph.setEdge(uRoot,vRoot,Math.max(sepFn(g,v,u),prevMax||0))}u=v})});return blockGraph}function findSmallestWidthAlignment(g,xss){return _.min(xss,function(xs){var min=_.min(xs,function(x,v){return x-width(g,v)/2}),max=_.max(xs,function(x,v){return x+width(g,v)/2});return max-min})}function alignCoordinates(xss,alignTo){var alignToMin=_.min(alignTo),alignToMax=_.max(alignTo);_.each(["u","d"],function(vert){_.each(["l","r"],function(horiz){var alignment=vert+horiz,xs=xss[alignment],delta;if(xs===alignTo)return;delta=horiz==="l"?alignToMin-_.min(xs):alignToMax-_.max(xs);if(delta){xss[alignment]=_.mapValues(xs,function(x){return x+delta})}})})}function balance(xss,align){return _.mapValues(xss.ul,function(ignore,v){if(align){return xss[align.toLowerCase()][v]}else{var xs=_.sortBy(_.pluck(xss,v));return(xs[1]+xs[2])/2}})}function positionX(g){var layering=util.buildLayerMatrix(g),conflicts=_.merge(findType1Conflicts(g,layering),findType2Conflicts(g,layering));var xss={},adjustedLayering;_.each(["u","d"],function(vert){adjustedLayering=vert==="u"?layering:_.values(layering).reverse();_.each(["l","r"],function(horiz){if(horiz==="r"){adjustedLayering=_.map(adjustedLayering,function(inner){return _.values(inner).reverse()})}var neighborFn=_.bind(vert==="u"?g.predecessors:g.successors,g);var align=verticalAlignment(g,adjustedLayering,conflicts,neighborFn);var xs=horizontalCompaction(g,adjustedLayering,align.root,align.align,horiz==="r");if(horiz==="r"){xs=_.mapValues(xs,function(x){return-x})}xss[vert+horiz]=xs})});var smallestWidth=findSmallestWidthAlignment(g,xss);alignCoordinates(xss,smallestWidth);return balance(xss,g.graph().align)}function sep(nodeSep,edgeSep,reverseSep){return function(g,v,w){var vLabel=g.node(v),wLabel=g.node(w),sum=0,delta;sum+=vLabel.width/2;if(_.has(vLabel,"labelpos")){switch(vLabel.labelpos.toLowerCase()){case"l":delta=-vLabel.width/2;break;case"r":delta=vLabel.width/2;break}}if(delta){sum+=reverseSep?delta:-delta}delta=0;sum+=(vLabel.dummy?edgeSep:nodeSep)/2;sum+=(wLabel.dummy?edgeSep:nodeSep)/2;sum+=wLabel.width/2;if(_.has(wLabel,"labelpos")){switch(wLabel.labelpos.toLowerCase()){case"l":delta=wLabel.width/2;break;case"r":delta=-wLabel.width/2;break}}if(delta){sum+=reverseSep?delta:-delta}delta=0;return sum}}function width(g,v){return g.node(v).width}},{"../graphlib":33,"../lodash":36,"../util":55}],50:[function(require,module,exports){"use strict";var _=require("../lodash"),util=require("../util"),positionX=require("./bk").positionX;module.exports=position;function position(g){g=util.asNonCompoundGraph(g);positionY(g);_.each(positionX(g),function(x,v){g.node(v).x=x})}function positionY(g){var layering=util.buildLayerMatrix(g),rankSep=g.graph().ranksep,prevY=0;_.each(layering,function(layer){var maxHeight=_.max(_.map(layer,function(v){return g.node(v).height}));_.each(layer,function(v){g.node(v).y=prevY+maxHeight/2});prevY+=maxHeight+rankSep})}},{"../lodash":36,"../util":55,"./bk":49}],51:[function(require,module,exports){"use strict";var _=require("../lodash"),Graph=require("../graphlib").Graph,slack=require("./util").slack;module.exports=feasibleTree;function feasibleTree(g){var t=new Graph({directed:false});var start=g.nodes()[0],size=g.nodeCount();t.setNode(start,{});var edge,delta;while(tightTree(t,g)<size){edge=findMinSlackEdge(t,g);delta=t.hasNode(edge.v)?slack(g,edge):-slack(g,edge);shiftRanks(t,g,delta)}return t}function tightTree(t,g){function dfs(v){_.each(g.nodeEdges(v),function(e){var edgeV=e.v,w=v===edgeV?e.w:edgeV;if(!t.hasNode(w)&&!slack(g,e)){t.setNode(w,{});t.setEdge(v,w,{});dfs(w)}})}_.each(t.nodes(),dfs);return t.nodeCount()}function findMinSlackEdge(t,g){return _.min(g.edges(),function(e){if(t.hasNode(e.v)!==t.hasNode(e.w)){return slack(g,e)}})}function shiftRanks(t,g,delta){_.each(t.nodes(),function(v){g.node(v).rank+=delta})}},{"../graphlib":33,"../lodash":36,"./util":54}],52:[function(require,module,exports){"use strict";var rankUtil=require("./util"),longestPath=rankUtil.longestPath,feasibleTree=require("./feasible-tree"),networkSimplex=require("./network-simplex");module.exports=rank;function rank(g){switch(g.graph().ranker){case"network-simplex":networkSimplexRanker(g);break;case"tight-tree":tightTreeRanker(g);break;case"longest-path":longestPathRanker(g);break;default:networkSimplexRanker(g)}}var longestPathRanker=longestPath;function tightTreeRanker(g){longestPath(g);feasibleTree(g)}function networkSimplexRanker(g){networkSimplex(g)}},{"./feasible-tree":51,"./network-simplex":53,"./util":54}],53:[function(require,module,exports){"use strict";var _=require("../lodash"),feasibleTree=require("./feasible-tree"),slack=require("./util").slack,initRank=require("./util").longestPath,preorder=require("../graphlib").alg.preorder,postorder=require("../graphlib").alg.postorder,simplify=require("../util").simplify;module.exports=networkSimplex;networkSimplex.initLowLimValues=initLowLimValues;networkSimplex.initCutValues=initCutValues;networkSimplex.calcCutValue=calcCutValue;networkSimplex.leaveEdge=leaveEdge;networkSimplex.enterEdge=enterEdge;networkSimplex.exchangeEdges=exchangeEdges;function networkSimplex(g){g=simplify(g);initRank(g);var t=feasibleTree(g);initLowLimValues(t);initCutValues(t,g);var e,f;while(e=leaveEdge(t)){f=enterEdge(t,g,e);exchangeEdges(t,g,e,f)}}function initCutValues(t,g){var vs=postorder(t,t.nodes());vs=vs.slice(0,vs.length-1);_.each(vs,function(v){assignCutValue(t,g,v)})}function assignCutValue(t,g,child){var childLab=t.node(child),parent=childLab.parent;t.edge(child,parent).cutvalue=calcCutValue(t,g,child)}function calcCutValue(t,g,child){var childLab=t.node(child),parent=childLab.parent,childIsTail=true,graphEdge=g.edge(child,parent),cutValue=0;if(!graphEdge){childIsTail=false;graphEdge=g.edge(parent,child)}cutValue=graphEdge.weight;_.each(g.nodeEdges(child),function(e){var isOutEdge=e.v===child,other=isOutEdge?e.w:e.v;if(other!==parent){var pointsToHead=isOutEdge===childIsTail,otherWeight=g.edge(e).weight;cutValue+=pointsToHead?otherWeight:-otherWeight;if(isTreeEdge(t,child,other)){var otherCutValue=t.edge(child,other).cutvalue;cutValue+=pointsToHead?-otherCutValue:otherCutValue}}});return cutValue}function initLowLimValues(tree,root){if(arguments.length<2){root=tree.nodes()[0]}dfsAssignLowLim(tree,{},1,root)}function dfsAssignLowLim(tree,visited,nextLim,v,parent){var low=nextLim,label=tree.node(v);visited[v]=true;_.each(tree.neighbors(v),function(w){if(!_.has(visited,w)){nextLim=dfsAssignLowLim(tree,visited,nextLim,w,v)}});label.low=low;label.lim=nextLim++;if(parent){label.parent=parent}else{delete label.parent}return nextLim}function leaveEdge(tree){return _.find(tree.edges(),function(e){return tree.edge(e).cutvalue<0})}function enterEdge(t,g,edge){var v=edge.v,w=edge.w;if(!g.hasEdge(v,w)){v=edge.w;w=edge.v}var vLabel=t.node(v),wLabel=t.node(w),tailLabel=vLabel,flip=false;if(vLabel.lim>wLabel.lim){tailLabel=wLabel;flip=true}var candidates=_.filter(g.edges(),function(edge){return flip===isDescendant(t,t.node(edge.v),tailLabel)&&flip!==isDescendant(t,t.node(edge.w),tailLabel)});return _.min(candidates,function(edge){return slack(g,edge)})}function exchangeEdges(t,g,e,f){var v=e.v,w=e.w;t.removeEdge(v,w);t.setEdge(f.v,f.w,{});initLowLimValues(t);initCutValues(t,g);updateRanks(t,g)}function updateRanks(t,g){var root=_.find(t.nodes(),function(v){return!g.node(v).parent}),vs=preorder(t,root);vs=vs.slice(1);_.each(vs,function(v){var parent=t.node(v).parent,edge=g.edge(v,parent),flipped=false;if(!edge){edge=g.edge(parent,v);flipped=true}g.node(v).rank=g.node(parent).rank+(flipped?edge.minlen:-edge.minlen)})}function isTreeEdge(tree,u,v){return tree.hasEdge(u,v)}function isDescendant(tree,vLabel,rootLabel){return rootLabel.low<=vLabel.lim&&vLabel.lim<=rootLabel.lim}},{"../graphlib":33,"../lodash":36,"../util":55,"./feasible-tree":51,"./util":54}],54:[function(require,module,exports){"use strict";var _=require("../lodash");module.exports={longestPath:longestPath,slack:slack};function longestPath(g){var visited={};function dfs(v){var label=g.node(v);if(_.has(visited,v)){return label.rank}visited[v]=true;var rank=_.min(_.map(g.outEdges(v),function(e){return dfs(e.w)-g.edge(e).minlen}));if(rank===Number.POSITIVE_INFINITY){rank=0}return label.rank=rank}_.each(g.sources(),dfs)}function slack(g,e){return g.node(e.w).rank-g.node(e.v).rank-g.edge(e).minlen}},{"../lodash":36}],55:[function(require,module,exports){"use strict";var _=require("./lodash"),Graph=require("./graphlib").Graph;module.exports={addDummyNode:addDummyNode,simplify:simplify,asNonCompoundGraph:asNonCompoundGraph,successorWeights:successorWeights,predecessorWeights:predecessorWeights,intersectRect:intersectRect,buildLayerMatrix:buildLayerMatrix,normalizeRanks:normalizeRanks,removeEmptyRanks:removeEmptyRanks,addBorderNode:addBorderNode,maxRank:maxRank,partition:partition,time:time,notime:notime};function addDummyNode(g,type,attrs,name){var v;do{v=_.uniqueId(name)}while(g.hasNode(v));attrs.dummy=type;g.setNode(v,attrs);return v}function simplify(g){var simplified=(new Graph).setGraph(g.graph());_.each(g.nodes(),function(v){simplified.setNode(v,g.node(v))});_.each(g.edges(),function(e){var simpleLabel=simplified.edge(e.v,e.w)||{weight:0,minlen:1},label=g.edge(e);simplified.setEdge(e.v,e.w,{weight:simpleLabel.weight+label.weight,minlen:Math.max(simpleLabel.minlen,label.minlen)})});return simplified}function asNonCompoundGraph(g){var simplified=new Graph({multigraph:g.isMultigraph()}).setGraph(g.graph());_.each(g.nodes(),function(v){if(!g.children(v).length){simplified.setNode(v,g.node(v))}});_.each(g.edges(),function(e){simplified.setEdge(e,g.edge(e))});return simplified}function successorWeights(g){var weightMap=_.map(g.nodes(),function(v){var sucs={};_.each(g.outEdges(v),function(e){sucs[e.w]=(sucs[e.w]||0)+g.edge(e).weight});return sucs});return _.zipObject(g.nodes(),weightMap)}function predecessorWeights(g){var weightMap=_.map(g.nodes(),function(v){var preds={};_.each(g.inEdges(v),function(e){preds[e.v]=(preds[e.v]||0)+g.edge(e).weight});return preds});return _.zipObject(g.nodes(),weightMap)}function intersectRect(rect,point){var x=rect.x;var y=rect.y;var dx=point.x-x;var dy=point.y-y;var w=rect.width/2;var h=rect.height/2;if(!dx&&!dy){throw new Error("Not possible to find intersection inside of the rectangle")}var sx,sy;if(Math.abs(dy)*w>Math.abs(dx)*h){if(dy<0){h=-h}sx=h*dx/dy;sy=h}else{if(dx<0){w=-w}sx=w;sy=w*dy/dx}return{x:x+sx,y:y+sy}}function buildLayerMatrix(g){var layering=_.map(_.range(maxRank(g)+1),function(){return[] });_.each(g.nodes(),function(v){var node=g.node(v),rank=node.rank;if(!_.isUndefined(rank)){layering[rank][node.order]=v}});return layering}function normalizeRanks(g){var min=_.min(_.map(g.nodes(),function(v){return g.node(v).rank}));_.each(g.nodes(),function(v){var node=g.node(v);if(_.has(node,"rank")){node.rank-=min}})}function removeEmptyRanks(g){var offset=_.min(_.map(g.nodes(),function(v){return g.node(v).rank}));var layers=[];_.each(g.nodes(),function(v){var rank=g.node(v).rank-offset;if(!_.has(layers,rank)){layers[rank]=[]}layers[rank].push(v)});var delta=0,nodeRankFactor=g.graph().nodeRankFactor;_.each(layers,function(vs,i){if(_.isUndefined(vs)&&i%nodeRankFactor!==0){--delta}else if(delta){_.each(vs,function(v){g.node(v).rank+=delta})}})}function addBorderNode(g,prefix,rank,order){var node={width:0,height:0};if(arguments.length>=4){node.rank=rank;node.order=order}return addDummyNode(g,"border",node,prefix)}function maxRank(g){return _.max(_.map(g.nodes(),function(v){var rank=g.node(v).rank;if(!_.isUndefined(rank)){return rank}}))}function partition(collection,fn){var result={lhs:[],rhs:[]};_.each(collection,function(value){if(fn(value)){result.lhs.push(value)}else{result.rhs.push(value)}});return result}function time(name,fn){var start=_.now();try{return fn()}finally{console.log(name+" time: "+(_.now()-start)+"ms")}}function notime(name,fn){return fn()}},{"./graphlib":33,"./lodash":36}],56:[function(require,module,exports){module.exports="0.7.1"},{}],57:[function(require,module,exports){var lib=require("./lib");module.exports={Graph:lib.Graph,json:require("./lib/json"),alg:require("./lib/alg"),version:lib.version}},{"./lib":73,"./lib/alg":64,"./lib/json":74}],58:[function(require,module,exports){var _=require("../lodash");module.exports=components;function components(g){var visited={},cmpts=[],cmpt;function dfs(v){if(_.has(visited,v))return;visited[v]=true;cmpt.push(v);_.each(g.successors(v),dfs);_.each(g.predecessors(v),dfs)}_.each(g.nodes(),function(v){cmpt=[];dfs(v);if(cmpt.length){cmpts.push(cmpt)}});return cmpts}},{"../lodash":75}],59:[function(require,module,exports){var _=require("../lodash");module.exports=dfs;function dfs(g,vs,order){if(!_.isArray(vs)){vs=[vs]}var acc=[],visited={};_.each(vs,function(v){if(!g.hasNode(v)){throw new Error("Graph does not have node: "+v)}doDfs(g,v,order==="post",visited,acc)});return acc}function doDfs(g,v,postorder,visited,acc){if(!_.has(visited,v)){visited[v]=true;if(!postorder){acc.push(v)}_.each(g.neighbors(v),function(w){doDfs(g,w,postorder,visited,acc)});if(postorder){acc.push(v)}}}},{"../lodash":75}],60:[function(require,module,exports){var dijkstra=require("./dijkstra"),_=require("../lodash");module.exports=dijkstraAll;function dijkstraAll(g,weightFunc,edgeFunc){return _.transform(g.nodes(),function(acc,v){acc[v]=dijkstra(g,v,weightFunc,edgeFunc)},{})}},{"../lodash":75,"./dijkstra":61}],61:[function(require,module,exports){var _=require("../lodash"),PriorityQueue=require("../data/priority-queue");module.exports=dijkstra;var DEFAULT_WEIGHT_FUNC=_.constant(1);function dijkstra(g,source,weightFn,edgeFn){return runDijkstra(g,String(source),weightFn||DEFAULT_WEIGHT_FUNC,edgeFn||function(v){return g.outEdges(v)})}function runDijkstra(g,source,weightFn,edgeFn){var results={},pq=new PriorityQueue,v,vEntry;var updateNeighbors=function(edge){var w=edge.v!==v?edge.v:edge.w,wEntry=results[w],weight=weightFn(edge),distance=vEntry.distance+weight;if(weight<0){throw new Error("dijkstra does not allow negative edge weights. "+"Bad edge: "+edge+" Weight: "+weight)}if(distance<wEntry.distance){wEntry.distance=distance;wEntry.predecessor=v;pq.decrease(w,distance)}};g.nodes().forEach(function(v){var distance=v===source?0:Number.POSITIVE_INFINITY;results[v]={distance:distance};pq.add(v,distance)});while(pq.size()>0){v=pq.removeMin();vEntry=results[v];if(vEntry.distance===Number.POSITIVE_INFINITY){break}edgeFn(v).forEach(updateNeighbors)}return results}},{"../data/priority-queue":71,"../lodash":75}],62:[function(require,module,exports){var _=require("../lodash"),tarjan=require("./tarjan");module.exports=findCycles;function findCycles(g){return _.filter(tarjan(g),function(cmpt){return cmpt.length>1})}},{"../lodash":75,"./tarjan":69}],63:[function(require,module,exports){var _=require("../lodash");module.exports=floydWarshall;var DEFAULT_WEIGHT_FUNC=_.constant(1);function floydWarshall(g,weightFn,edgeFn){return runFloydWarshall(g,weightFn||DEFAULT_WEIGHT_FUNC,edgeFn||function(v){return g.outEdges(v)})}function runFloydWarshall(g,weightFn,edgeFn){var results={},nodes=g.nodes();nodes.forEach(function(v){results[v]={};results[v][v]={distance:0};nodes.forEach(function(w){if(v!==w){results[v][w]={distance:Number.POSITIVE_INFINITY}}});edgeFn(v).forEach(function(edge){var w=edge.v===v?edge.w:edge.v,d=weightFn(edge);results[v][w]={distance:d,predecessor:v}})});nodes.forEach(function(k){var rowK=results[k];nodes.forEach(function(i){var rowI=results[i];nodes.forEach(function(j){var ik=rowI[k];var kj=rowK[j];var ij=rowI[j];var altDistance=ik.distance+kj.distance;if(altDistance<ij.distance){ij.distance=altDistance;ij.predecessor=kj.predecessor}})})});return results}},{"../lodash":75}],64:[function(require,module,exports){module.exports={components:require("./components"),dijkstra:require("./dijkstra"),dijkstraAll:require("./dijkstra-all"),findCycles:require("./find-cycles"),floydWarshall:require("./floyd-warshall"),isAcyclic:require("./is-acyclic"),postorder:require("./postorder"),preorder:require("./preorder"),prim:require("./prim"),tarjan:require("./tarjan"),topsort:require("./topsort")}},{"./components":58,"./dijkstra":61,"./dijkstra-all":60,"./find-cycles":62,"./floyd-warshall":63,"./is-acyclic":65,"./postorder":66,"./preorder":67,"./prim":68,"./tarjan":69,"./topsort":70}],65:[function(require,module,exports){var topsort=require("./topsort");module.exports=isAcyclic;function isAcyclic(g){try{topsort(g)}catch(e){if(e instanceof topsort.CycleException){return false}throw e}return true}},{"./topsort":70}],66:[function(require,module,exports){var dfs=require("./dfs");module.exports=postorder;function postorder(g,vs){return dfs(g,vs,"post")}},{"./dfs":59}],67:[function(require,module,exports){var dfs=require("./dfs");module.exports=preorder;function preorder(g,vs){return dfs(g,vs,"pre")}},{"./dfs":59}],68:[function(require,module,exports){var _=require("../lodash"),Graph=require("../graph"),PriorityQueue=require("../data/priority-queue");module.exports=prim;function prim(g,weightFunc){var result=new Graph,parents={},pq=new PriorityQueue,v;function updateNeighbors(edge){var w=edge.v===v?edge.w:edge.v,pri=pq.priority(w);if(pri!==undefined){var edgeWeight=weightFunc(edge);if(edgeWeight<pri){parents[w]=v;pq.decrease(w,edgeWeight)}}}if(g.nodeCount()===0){return result}_.each(g.nodes(),function(v){pq.add(v,Number.POSITIVE_INFINITY);result.setNode(v)});pq.decrease(g.nodes()[0],0);var init=false;while(pq.size()>0){v=pq.removeMin();if(_.has(parents,v)){result.setEdge(v,parents[v])}else if(init){throw new Error("Input graph is not connected: "+g)}else{init=true}g.nodeEdges(v).forEach(updateNeighbors)}return result}},{"../data/priority-queue":71,"../graph":72,"../lodash":75}],69:[function(require,module,exports){var _=require("../lodash");module.exports=tarjan;function tarjan(g){var index=0,stack=[],visited={},results=[];function dfs(v){var entry=visited[v]={onStack:true,lowlink:index,index:index++};stack.push(v);g.successors(v).forEach(function(w){if(!_.has(visited,w)){dfs(w);entry.lowlink=Math.min(entry.lowlink,visited[w].lowlink)}else if(visited[w].onStack){entry.lowlink=Math.min(entry.lowlink,visited[w].index)}});if(entry.lowlink===entry.index){var cmpt=[],w;do{w=stack.pop();visited[w].onStack=false;cmpt.push(w)}while(v!==w);results.push(cmpt)}}g.nodes().forEach(function(v){if(!_.has(visited,v)){dfs(v)}});return results}},{"../lodash":75}],70:[function(require,module,exports){var _=require("../lodash");module.exports=topsort;topsort.CycleException=CycleException;function topsort(g){var visited={},stack={},results=[];function visit(node){if(_.has(stack,node)){throw new CycleException}if(!_.has(visited,node)){stack[node]=true;visited[node]=true;_.each(g.predecessors(node),visit);delete stack[node];results.push(node)}}_.each(g.sinks(),visit);if(_.size(visited)!==g.nodeCount()){throw new CycleException}return results}function CycleException(){}},{"../lodash":75}],71:[function(require,module,exports){var _=require("../lodash");module.exports=PriorityQueue;function PriorityQueue(){this._arr=[];this._keyIndices={}}PriorityQueue.prototype.size=function(){return this._arr.length};PriorityQueue.prototype.keys=function(){return this._arr.map(function(x){return x.key})};PriorityQueue.prototype.has=function(key){return _.has(this._keyIndices,key)};PriorityQueue.prototype.priority=function(key){var index=this._keyIndices[key];if(index!==undefined){return this._arr[index].priority}};PriorityQueue.prototype.min=function(){if(this.size()===0){throw new Error("Queue underflow")}return this._arr[0].key};PriorityQueue.prototype.add=function(key,priority){var keyIndices=this._keyIndices;key=String(key);if(!_.has(keyIndices,key)){var arr=this._arr;var index=arr.length;keyIndices[key]=index;arr.push({key:key,priority:priority});this._decrease(index);return true}return false};PriorityQueue.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var min=this._arr.pop();delete this._keyIndices[min.key];this._heapify(0);return min.key};PriorityQueue.prototype.decrease=function(key,priority){var index=this._keyIndices[key];if(priority>this._arr[index].priority){throw new Error("New priority is greater than current priority. "+"Key: "+key+" Old: "+this._arr[index].priority+" New: "+priority)}this._arr[index].priority=priority;this._decrease(index)};PriorityQueue.prototype._heapify=function(i){var arr=this._arr;var l=2*i,r=l+1,largest=i;if(l<arr.length){largest=arr[l].priority<arr[largest].priority?l:largest;if(r<arr.length){largest=arr[r].priority<arr[largest].priority?r:largest}if(largest!==i){this._swap(i,largest);this._heapify(largest)}}};PriorityQueue.prototype._decrease=function(index){var arr=this._arr;var priority=arr[index].priority;var parent;while(index!==0){parent=index>>1;if(arr[parent].priority<priority){break}this._swap(index,parent);index=parent}};PriorityQueue.prototype._swap=function(i,j){var arr=this._arr;var keyIndices=this._keyIndices;var origArrI=arr[i];var origArrJ=arr[j];arr[i]=origArrJ;arr[j]=origArrI;keyIndices[origArrJ.key]=i;keyIndices[origArrI.key]=j}},{"../lodash":75}],72:[function(require,module,exports){"use strict";var _=require("./lodash");module.exports=Graph;var DEFAULT_EDGE_NAME="\x00",GRAPH_NODE="\x00",EDGE_KEY_DELIM="";function Graph(opts){this._isDirected=_.has(opts,"directed")?opts.directed:true;this._isMultigraph=_.has(opts,"multigraph")?opts.multigraph:false;this._isCompound=_.has(opts,"compound")?opts.compound:false;this._label=undefined;this._defaultNodeLabelFn=_.constant(undefined);this._defaultEdgeLabelFn=_.constant(undefined);this._nodes={};if(this._isCompound){this._parent={};this._children={};this._children[GRAPH_NODE]={}}this._in={};this._preds={};this._out={};this._sucs={};this._edgeObjs={};this._edgeLabels={}}Graph.prototype._nodeCount=0;Graph.prototype._edgeCount=0;Graph.prototype.isDirected=function(){return this._isDirected};Graph.prototype.isMultigraph=function(){return this._isMultigraph};Graph.prototype.isCompound=function(){return this._isCompound};Graph.prototype.setGraph=function(label){this._label=label;return this};Graph.prototype.graph=function(){return this._label};Graph.prototype.setDefaultNodeLabel=function(newDefault){if(!_.isFunction(newDefault)){newDefault=_.constant(newDefault)}this._defaultNodeLabelFn=newDefault;return this};Graph.prototype.nodeCount=function(){return this._nodeCount};Graph.prototype.nodes=function(){return _.keys(this._nodes)};Graph.prototype.sources=function(){return _.filter(this.nodes(),function(v){return _.isEmpty(this._in[v])},this)};Graph.prototype.sinks=function(){return _.filter(this.nodes(),function(v){return _.isEmpty(this._out[v])},this)};Graph.prototype.setNodes=function(vs,value){var args=arguments;_.each(vs,function(v){if(args.length>1){this.setNode(v,value)}else{this.setNode(v)}},this);return this};Graph.prototype.setNode=function(v,value){if(_.has(this._nodes,v)){if(arguments.length>1){this._nodes[v]=value}return this}this._nodes[v]=arguments.length>1?value:this._defaultNodeLabelFn(v);if(this._isCompound){this._parent[v]=GRAPH_NODE;this._children[v]={};this._children[GRAPH_NODE][v]=true}this._in[v]={};this._preds[v]={};this._out[v]={};this._sucs[v]={};++this._nodeCount;return this};Graph.prototype.node=function(v){return this._nodes[v]};Graph.prototype.hasNode=function(v){return _.has(this._nodes,v)};Graph.prototype.removeNode=function(v){var self=this;if(_.has(this._nodes,v)){var removeEdge=function(e){self.removeEdge(self._edgeObjs[e])};delete this._nodes[v];if(this._isCompound){this._removeFromParentsChildList(v);delete this._parent[v];_.each(this.children(v),function(child){this.setParent(child)},this);delete this._children[v]}_.each(_.keys(this._in[v]),removeEdge);delete this._in[v];delete this._preds[v];_.each(_.keys(this._out[v]),removeEdge);delete this._out[v];delete this._sucs[v];--this._nodeCount}return this};Graph.prototype.setParent=function(v,parent){if(!this._isCompound){throw new Error("Cannot set parent in a non-compound graph")}if(_.isUndefined(parent)){parent=GRAPH_NODE}else{for(var ancestor=parent;!_.isUndefined(ancestor);ancestor=this.parent(ancestor)){if(ancestor===v){throw new Error("Setting "+parent+" as parent of "+v+" would create create a cycle")}}this.setNode(parent)}this.setNode(v);this._removeFromParentsChildList(v);this._parent[v]=parent;this._children[parent][v]=true;return this};Graph.prototype._removeFromParentsChildList=function(v){delete this._children[this._parent[v]][v]};Graph.prototype.parent=function(v){if(this._isCompound){var parent=this._parent[v];if(parent!==GRAPH_NODE){return parent}}};Graph.prototype.children=function(v){if(_.isUndefined(v)){v=GRAPH_NODE}if(this._isCompound){var children=this._children[v];if(children){return _.keys(children)}}else if(v===GRAPH_NODE){return this.nodes()}else if(this.hasNode(v)){return[]}};Graph.prototype.predecessors=function(v){var predsV=this._preds[v];if(predsV){return _.keys(predsV)}};Graph.prototype.successors=function(v){var sucsV=this._sucs[v];if(sucsV){return _.keys(sucsV)}};Graph.prototype.neighbors=function(v){var preds=this.predecessors(v);if(preds){return _.union(preds,this.successors(v))}};Graph.prototype.setDefaultEdgeLabel=function(newDefault){if(!_.isFunction(newDefault)){newDefault=_.constant(newDefault)}this._defaultEdgeLabelFn=newDefault;return this};Graph.prototype.edgeCount=function(){return this._edgeCount};Graph.prototype.edges=function(){return _.values(this._edgeObjs)};Graph.prototype.setPath=function(vs,value){var self=this,args=arguments;_.reduce(vs,function(v,w){if(args.length>1){self.setEdge(v,w,value)}else{self.setEdge(v,w)}return w});return this};Graph.prototype.setEdge=function(){var v,w,name,value,valueSpecified=false;if(_.isPlainObject(arguments[0])){v=arguments[0].v;w=arguments[0].w;name=arguments[0].name;if(arguments.length===2){value=arguments[1];valueSpecified=true}}else{v=arguments[0];w=arguments[1];name=arguments[3];if(arguments.length>2){value=arguments[2];valueSpecified=true}}v=""+v;w=""+w;if(!_.isUndefined(name)){name=""+name}var e=edgeArgsToId(this._isDirected,v,w,name);if(_.has(this._edgeLabels,e)){if(valueSpecified){this._edgeLabels[e]=value}return this}if(!_.isUndefined(name)&&!this._isMultigraph){throw new Error("Cannot set a named edge when isMultigraph = false")}this.setNode(v);this.setNode(w);this._edgeLabels[e]=valueSpecified?value:this._defaultEdgeLabelFn(v,w,name);var edgeObj=edgeArgsToObj(this._isDirected,v,w,name);v=edgeObj.v;w=edgeObj.w;Object.freeze(edgeObj);this._edgeObjs[e]=edgeObj;incrementOrInitEntry(this._preds[w],v);incrementOrInitEntry(this._sucs[v],w);this._in[w][e]=edgeObj;this._out[v][e]=edgeObj;this._edgeCount++;return this};Graph.prototype.edge=function(v,w,name){var e=arguments.length===1?edgeObjToId(this._isDirected,arguments[0]):edgeArgsToId(this._isDirected,v,w,name);return this._edgeLabels[e]};Graph.prototype.hasEdge=function(v,w,name){var e=arguments.length===1?edgeObjToId(this._isDirected,arguments[0]):edgeArgsToId(this._isDirected,v,w,name);return _.has(this._edgeLabels,e)};Graph.prototype.removeEdge=function(v,w,name){var e=arguments.length===1?edgeObjToId(this._isDirected,arguments[0]):edgeArgsToId(this._isDirected,v,w,name),edge=this._edgeObjs[e];if(edge){v=edge.v;w=edge.w;delete this._edgeLabels[e];delete this._edgeObjs[e];decrementOrRemoveEntry(this._preds[w],v);decrementOrRemoveEntry(this._sucs[v],w);delete this._in[w][e];delete this._out[v][e];this._edgeCount--}return this};Graph.prototype.inEdges=function(v,u){var inV=this._in[v];if(inV){var edges=_.values(inV);if(!u){return edges}return _.filter(edges,function(edge){return edge.v===u})}};Graph.prototype.outEdges=function(v,w){var outV=this._out[v];if(outV){var edges=_.values(outV);if(!w){return edges}return _.filter(edges,function(edge){return edge.w===w})}};Graph.prototype.nodeEdges=function(v,w){var inEdges=this.inEdges(v,w);if(inEdges){return inEdges.concat(this.outEdges(v,w))}};function incrementOrInitEntry(map,k){if(_.has(map,k)){map[k]++}else{map[k]=1}}function decrementOrRemoveEntry(map,k){if(!--map[k]){delete map[k]}}function edgeArgsToId(isDirected,v,w,name){if(!isDirected&&v>w){var tmp=v;v=w;w=tmp}return v+EDGE_KEY_DELIM+w+EDGE_KEY_DELIM+(_.isUndefined(name)?DEFAULT_EDGE_NAME:name)}function edgeArgsToObj(isDirected,v,w,name){if(!isDirected&&v>w){var tmp=v;v=w;w=tmp}var edgeObj={v:v,w:w};if(name){edgeObj.name=name}return edgeObj}function edgeObjToId(isDirected,edgeObj){return edgeArgsToId(isDirected,edgeObj.v,edgeObj.w,edgeObj.name)}},{"./lodash":75}],73:[function(require,module,exports){module.exports={Graph:require("./graph"),version:require("./version")}},{"./graph":72,"./version":76}],74:[function(require,module,exports){var _=require("./lodash"),Graph=require("./graph");module.exports={write:write,read:read};function write(g){var json={options:{directed:g.isDirected(),multigraph:g.isMultigraph(),compound:g.isCompound()},nodes:writeNodes(g),edges:writeEdges(g)};if(!_.isUndefined(g.graph())){json.value=_.clone(g.graph())}return json}function writeNodes(g){return _.map(g.nodes(),function(v){var nodeValue=g.node(v),parent=g.parent(v),node={v:v};if(!_.isUndefined(nodeValue)){node.value=nodeValue}if(!_.isUndefined(parent)){node.parent=parent}return node})}function writeEdges(g){return _.map(g.edges(),function(e){var edgeValue=g.edge(e),edge={v:e.v,w:e.w};if(!_.isUndefined(e.name)){edge.name=e.name}if(!_.isUndefined(edgeValue)){edge.value=edgeValue}return edge})}function read(json){var g=new Graph(json.options).setGraph(json.value);_.each(json.nodes,function(entry){g.setNode(entry.v,entry.value);if(entry.parent){g.setParent(entry.v,entry.parent)}});_.each(json.edges,function(entry){g.setEdge({v:entry.v,w:entry.w,name:entry.name},entry.value)});return g}},{"./graph":72,"./lodash":75}],75:[function(require,module,exports){module.exports=require(20)},{"/Users/cpettitt/projects/dagre-d3/lib/lodash.js":20,lodash:77}],76:[function(require,module,exports){module.exports="1.0.1"},{}],77:[function(require,module,exports){(function(global){(function(){var undefined;var arrayPool=[],objectPool=[];var idCounter=0;var keyPrefix=+new Date+"";var largeArraySize=75;var maxPoolSize=40;var whitespace=" \f "+"\n\r\u2028\u2029"+" ";var reEmptyStringLeading=/\b__p \+= '';/g,reEmptyStringMiddle=/\b(__p \+=) '' \+/g,reEmptyStringTrailing=/(__e\(.*?\)|\b__t\)) \+\n'';/g;var reEsTemplate=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;var reFlags=/\w*$/;var reFuncName=/^\s*function[ \n\r\t]+\w/;var reInterpolate=/<%=([\s\S]+?)%>/g;var reLeadingSpacesAndZeros=RegExp("^["+whitespace+"]*0+(?=.$)");var reNoMatch=/($^)/;var reThis=/\bthis\b/;var reUnescapedString=/['\n\r\t\u2028\u2029\\]/g;var contextProps=["Array","Boolean","Date","Function","Math","Number","Object","RegExp","String","_","attachEvent","clearTimeout","isFinite","isNaN","parseInt","setTimeout"];var templateCounter=0;var argsClass="[object Arguments]",arrayClass="[object Array]",boolClass="[object Boolean]",dateClass="[object Date]",funcClass="[object Function]",numberClass="[object Number]",objectClass="[object Object]",regexpClass="[object RegExp]",stringClass="[object String]";var cloneableClasses={};cloneableClasses[funcClass]=false;cloneableClasses[argsClass]=cloneableClasses[arrayClass]=cloneableClasses[boolClass]=cloneableClasses[dateClass]=cloneableClasses[numberClass]=cloneableClasses[objectClass]=cloneableClasses[regexpClass]=cloneableClasses[stringClass]=true;var debounceOptions={leading:false,maxWait:0,trailing:false};var descriptor={configurable:false,enumerable:false,value:null,writable:false};var objectTypes={"boolean":false,"function":true,object:true,number:false,string:false,undefined:false};var stringEscapes={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"};var root=objectTypes[typeof window]&&window||this;var freeExports=objectTypes[typeof exports]&&exports&&!exports.nodeType&&exports;var freeModule=objectTypes[typeof module]&&module&&!module.nodeType&&module;var moduleExports=freeModule&&freeModule.exports===freeExports&&freeExports;var freeGlobal=objectTypes[typeof global]&&global;if(freeGlobal&&(freeGlobal.global===freeGlobal||freeGlobal.window===freeGlobal)){root=freeGlobal}function baseIndexOf(array,value,fromIndex){var index=(fromIndex||0)-1,length=array?array.length:0;while(++index<length){if(array[index]===value){return index}}return-1}function cacheIndexOf(cache,value){var type=typeof value;cache=cache.cache;if(type=="boolean"||value==null){return cache[value]?0:-1}if(type!="number"&&type!="string"){type="object"}var key=type=="number"?value:keyPrefix+value;cache=(cache=cache[type])&&cache[key];return type=="object"?cache&&baseIndexOf(cache,value)>-1?0:-1:cache?0:-1}function cachePush(value){var cache=this.cache,type=typeof value;if(type=="boolean"||value==null){cache[value]=true}else{if(type!="number"&&type!="string"){type="object"}var key=type=="number"?value:keyPrefix+value,typeCache=cache[type]||(cache[type]={});if(type=="object"){(typeCache[key]||(typeCache[key]=[])).push(value)}else{typeCache[key]=true}}}function charAtCallback(value){return value.charCodeAt(0)}function compareAscending(a,b){var ac=a.criteria,bc=b.criteria,index=-1,length=ac.length;while(++index<length){var value=ac[index],other=bc[index];if(value!==other){if(value>other||typeof value=="undefined"){return 1}if(value<other||typeof other=="undefined"){return-1}}}return a.index-b.index}function createCache(array){var index=-1,length=array.length,first=array[0],mid=array[length/2|0],last=array[length-1];if(first&&typeof first=="object"&&mid&&typeof mid=="object"&&last&&typeof last=="object"){return false}var cache=getObject();cache["false"]=cache["null"]=cache["true"]=cache["undefined"]=false;var result=getObject();result.array=array;result.cache=cache;result.push=cachePush;while(++index<length){result.push(array[index])}return result}function escapeStringChar(match){return"\\"+stringEscapes[match]}function getArray(){return arrayPool.pop()||[]}function getObject(){return objectPool.pop()||{array:null,cache:null,criteria:null,"false":false,index:0,"null":false,number:null,object:null,push:null,string:null,"true":false,undefined:false,value:null}}function releaseArray(array){array.length=0;if(arrayPool.length<maxPoolSize){arrayPool.push(array)}}function releaseObject(object){var cache=object.cache;if(cache){releaseObject(cache)}object.array=object.cache=object.criteria=object.object=object.number=object.string=object.value=null;if(objectPool.length<maxPoolSize){objectPool.push(object)}}function slice(array,start,end){start||(start=0);if(typeof end=="undefined"){end=array?array.length:0}var index=-1,length=end-start||0,result=Array(length<0?0:length);while(++index<length){result[index]=array[start+index]}return result}function runInContext(context){context=context?_.defaults(root.Object(),context,_.pick(root,contextProps)):root;var Array=context.Array,Boolean=context.Boolean,Date=context.Date,Function=context.Function,Math=context.Math,Number=context.Number,Object=context.Object,RegExp=context.RegExp,String=context.String,TypeError=context.TypeError;var arrayRef=[];var objectProto=Object.prototype;var oldDash=context._;var toString=objectProto.toString;var reNative=RegExp("^"+String(toString).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$");var ceil=Math.ceil,clearTimeout=context.clearTimeout,floor=Math.floor,fnToString=Function.prototype.toString,getPrototypeOf=isNative(getPrototypeOf=Object.getPrototypeOf)&&getPrototypeOf,hasOwnProperty=objectProto.hasOwnProperty,push=arrayRef.push,setTimeout=context.setTimeout,splice=arrayRef.splice,unshift=arrayRef.unshift;var defineProperty=function(){try{var o={},func=isNative(func=Object.defineProperty)&&func,result=func(o,o,o)&&func}catch(e){}return result}();var nativeCreate=isNative(nativeCreate=Object.create)&&nativeCreate,nativeIsArray=isNative(nativeIsArray=Array.isArray)&&nativeIsArray,nativeIsFinite=context.isFinite,nativeIsNaN=context.isNaN,nativeKeys=isNative(nativeKeys=Object.keys)&&nativeKeys,nativeMax=Math.max,nativeMin=Math.min,nativeParseInt=context.parseInt,nativeRandom=Math.random;var ctorByClass={};ctorByClass[arrayClass]=Array;ctorByClass[boolClass]=Boolean;ctorByClass[dateClass]=Date;ctorByClass[funcClass]=Function;ctorByClass[objectClass]=Object;ctorByClass[numberClass]=Number;ctorByClass[regexpClass]=RegExp;ctorByClass[stringClass]=String;function lodash(value){return value&&typeof value=="object"&&!isArray(value)&&hasOwnProperty.call(value,"__wrapped__")?value:new lodashWrapper(value)}function lodashWrapper(value,chainAll){this.__chain__=!!chainAll;this.__wrapped__=value}lodashWrapper.prototype=lodash.prototype;var support=lodash.support={};support.funcDecomp=!isNative(context.WinRTError)&&reThis.test(runInContext);support.funcNames=typeof Function.name=="string";lodash.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:reInterpolate,variable:"",imports:{_:lodash}};function baseBind(bindData){var func=bindData[0],partialArgs=bindData[2],thisArg=bindData[4];function bound(){if(partialArgs){var args=slice(partialArgs);push.apply(args,arguments)}if(this instanceof bound){var thisBinding=baseCreate(func.prototype),result=func.apply(thisBinding,args||arguments);return isObject(result)?result:thisBinding}return func.apply(thisArg,args||arguments)}setBindData(bound,bindData);return bound}function baseClone(value,isDeep,callback,stackA,stackB){if(callback){var result=callback(value);if(typeof result!="undefined"){return result}}var isObj=isObject(value);if(isObj){var className=toString.call(value);if(!cloneableClasses[className]){return value}var ctor=ctorByClass[className];switch(className){case boolClass:case dateClass:return new ctor(+value);case numberClass:case stringClass:return new ctor(value);case regexpClass:result=ctor(value.source,reFlags.exec(value));result.lastIndex=value.lastIndex;return result}}else{return value}var isArr=isArray(value);if(isDeep){var initedStack=!stackA;stackA||(stackA=getArray());stackB||(stackB=getArray());var length=stackA.length;while(length--){if(stackA[length]==value){return stackB[length]}}result=isArr?ctor(value.length):{}}else{result=isArr?slice(value):assign({},value)}if(isArr){if(hasOwnProperty.call(value,"index")){result.index=value.index}if(hasOwnProperty.call(value,"input")){result.input=value.input}}if(!isDeep){return result}stackA.push(value);stackB.push(result);(isArr?forEach:forOwn)(value,function(objValue,key){result[key]=baseClone(objValue,isDeep,callback,stackA,stackB)});if(initedStack){releaseArray(stackA);releaseArray(stackB)}return result}function baseCreate(prototype,properties){return isObject(prototype)?nativeCreate(prototype):{}}if(!nativeCreate){baseCreate=function(){function Object(){}return function(prototype){if(isObject(prototype)){Object.prototype=prototype;var result=new Object;Object.prototype=null}return result||context.Object()}}()}function baseCreateCallback(func,thisArg,argCount){if(typeof func!="function"){return identity}if(typeof thisArg=="undefined"||!("prototype"in func)){return func}var bindData=func.__bindData__;if(typeof bindData=="undefined"){if(support.funcNames){bindData=!func.name}bindData=bindData||!support.funcDecomp;if(!bindData){var source=fnToString.call(func);if(!support.funcNames){bindData=!reFuncName.test(source)}if(!bindData){bindData=reThis.test(source);setBindData(func,bindData)}}}if(bindData===false||bindData!==true&&bindData[1]&1){return func}switch(argCount){case 1:return function(value){return func.call(thisArg,value)};case 2:return function(a,b){return func.call(thisArg,a,b)};case 3:return function(value,index,collection){return func.call(thisArg,value,index,collection)};case 4:return function(accumulator,value,index,collection){return func.call(thisArg,accumulator,value,index,collection)}}return bind(func,thisArg)}function baseCreateWrapper(bindData){var func=bindData[0],bitmask=bindData[1],partialArgs=bindData[2],partialRightArgs=bindData[3],thisArg=bindData[4],arity=bindData[5];var isBind=bitmask&1,isBindKey=bitmask&2,isCurry=bitmask&4,isCurryBound=bitmask&8,key=func;function bound(){var thisBinding=isBind?thisArg:this;if(partialArgs){var args=slice(partialArgs);push.apply(args,arguments)}if(partialRightArgs||isCurry){args||(args=slice(arguments));if(partialRightArgs){push.apply(args,partialRightArgs)}if(isCurry&&args.length<arity){bitmask|=16&~32;return baseCreateWrapper([func,isCurryBound?bitmask:bitmask&~3,args,null,thisArg,arity])}}args||(args=arguments);if(isBindKey){func=thisBinding[key]}if(this instanceof bound){thisBinding=baseCreate(func.prototype);var result=func.apply(thisBinding,args);return isObject(result)?result:thisBinding}return func.apply(thisBinding,args)}setBindData(bound,bindData);return bound}function baseDifference(array,values){var index=-1,indexOf=getIndexOf(),length=array?array.length:0,isLarge=length>=largeArraySize&&indexOf===baseIndexOf,result=[];if(isLarge){var cache=createCache(values);if(cache){indexOf=cacheIndexOf;values=cache}else{isLarge=false}}while(++index<length){var value=array[index];if(indexOf(values,value)<0){result.push(value)}}if(isLarge){releaseObject(values)}return result}function baseFlatten(array,isShallow,isStrict,fromIndex){var index=(fromIndex||0)-1,length=array?array.length:0,result=[];while(++index<length){var value=array[index];if(value&&typeof value=="object"&&typeof value.length=="number"&&(isArray(value)||isArguments(value))){if(!isShallow){value=baseFlatten(value,isShallow,isStrict)}var valIndex=-1,valLength=value.length,resIndex=result.length;result.length+=valLength;while(++valIndex<valLength){result[resIndex++]=value[valIndex]}}else if(!isStrict){result.push(value)}}return result}function baseIsEqual(a,b,callback,isWhere,stackA,stackB){if(callback){var result=callback(a,b);if(typeof result!="undefined"){return!!result}}if(a===b){return a!==0||1/a==1/b}var type=typeof a,otherType=typeof b;if(a===a&&!(a&&objectTypes[type])&&!(b&&objectTypes[otherType])){return false}if(a==null||b==null){return a===b}var className=toString.call(a),otherClass=toString.call(b);if(className==argsClass){className=objectClass}if(otherClass==argsClass){otherClass=objectClass}if(className!=otherClass){return false}switch(className){case boolClass:case dateClass:return+a==+b;case numberClass:return a!=+a?b!=+b:a==0?1/a==1/b:a==+b;case regexpClass:case stringClass:return a==String(b)}var isArr=className==arrayClass;if(!isArr){var aWrapped=hasOwnProperty.call(a,"__wrapped__"),bWrapped=hasOwnProperty.call(b,"__wrapped__"); if(aWrapped||bWrapped){return baseIsEqual(aWrapped?a.__wrapped__:a,bWrapped?b.__wrapped__:b,callback,isWhere,stackA,stackB)}if(className!=objectClass){return false}var ctorA=a.constructor,ctorB=b.constructor;if(ctorA!=ctorB&&!(isFunction(ctorA)&&ctorA instanceof ctorA&&isFunction(ctorB)&&ctorB instanceof ctorB)&&("constructor"in a&&"constructor"in b)){return false}}var initedStack=!stackA;stackA||(stackA=getArray());stackB||(stackB=getArray());var length=stackA.length;while(length--){if(stackA[length]==a){return stackB[length]==b}}var size=0;result=true;stackA.push(a);stackB.push(b);if(isArr){length=a.length;size=b.length;result=size==length;if(result||isWhere){while(size--){var index=length,value=b[size];if(isWhere){while(index--){if(result=baseIsEqual(a[index],value,callback,isWhere,stackA,stackB)){break}}}else if(!(result=baseIsEqual(a[size],value,callback,isWhere,stackA,stackB))){break}}}}else{forIn(b,function(value,key,b){if(hasOwnProperty.call(b,key)){size++;return result=hasOwnProperty.call(a,key)&&baseIsEqual(a[key],value,callback,isWhere,stackA,stackB)}});if(result&&!isWhere){forIn(a,function(value,key,a){if(hasOwnProperty.call(a,key)){return result=--size>-1}})}}stackA.pop();stackB.pop();if(initedStack){releaseArray(stackA);releaseArray(stackB)}return result}function baseMerge(object,source,callback,stackA,stackB){(isArray(source)?forEach:forOwn)(source,function(source,key){var found,isArr,result=source,value=object[key];if(source&&((isArr=isArray(source))||isPlainObject(source))){var stackLength=stackA.length;while(stackLength--){if(found=stackA[stackLength]==source){value=stackB[stackLength];break}}if(!found){var isShallow;if(callback){result=callback(value,source);if(isShallow=typeof result!="undefined"){value=result}}if(!isShallow){value=isArr?isArray(value)?value:[]:isPlainObject(value)?value:{}}stackA.push(source);stackB.push(value);if(!isShallow){baseMerge(value,source,callback,stackA,stackB)}}}else{if(callback){result=callback(value,source);if(typeof result=="undefined"){result=source}}if(typeof result!="undefined"){value=result}}object[key]=value})}function baseRandom(min,max){return min+floor(nativeRandom()*(max-min+1))}function baseUniq(array,isSorted,callback){var index=-1,indexOf=getIndexOf(),length=array?array.length:0,result=[];var isLarge=!isSorted&&length>=largeArraySize&&indexOf===baseIndexOf,seen=callback||isLarge?getArray():result;if(isLarge){var cache=createCache(seen);indexOf=cacheIndexOf;seen=cache}while(++index<length){var value=array[index],computed=callback?callback(value,index,array):value;if(isSorted?!index||seen[seen.length-1]!==computed:indexOf(seen,computed)<0){if(callback||isLarge){seen.push(computed)}result.push(value)}}if(isLarge){releaseArray(seen.array);releaseObject(seen)}else if(callback){releaseArray(seen)}return result}function createAggregator(setter){return function(collection,callback,thisArg){var result={};callback=lodash.createCallback(callback,thisArg,3);var index=-1,length=collection?collection.length:0;if(typeof length=="number"){while(++index<length){var value=collection[index];setter(result,value,callback(value,index,collection),collection)}}else{forOwn(collection,function(value,key,collection){setter(result,value,callback(value,key,collection),collection)})}return result}}function createWrapper(func,bitmask,partialArgs,partialRightArgs,thisArg,arity){var isBind=bitmask&1,isBindKey=bitmask&2,isCurry=bitmask&4,isCurryBound=bitmask&8,isPartial=bitmask&16,isPartialRight=bitmask&32;if(!isBindKey&&!isFunction(func)){throw new TypeError}if(isPartial&&!partialArgs.length){bitmask&=~16;isPartial=partialArgs=false}if(isPartialRight&&!partialRightArgs.length){bitmask&=~32;isPartialRight=partialRightArgs=false}var bindData=func&&func.__bindData__;if(bindData&&bindData!==true){bindData=slice(bindData);if(bindData[2]){bindData[2]=slice(bindData[2])}if(bindData[3]){bindData[3]=slice(bindData[3])}if(isBind&&!(bindData[1]&1)){bindData[4]=thisArg}if(!isBind&&bindData[1]&1){bitmask|=8}if(isCurry&&!(bindData[1]&4)){bindData[5]=arity}if(isPartial){push.apply(bindData[2]||(bindData[2]=[]),partialArgs)}if(isPartialRight){unshift.apply(bindData[3]||(bindData[3]=[]),partialRightArgs)}bindData[1]|=bitmask;return createWrapper.apply(null,bindData)}var creater=bitmask==1||bitmask===17?baseBind:baseCreateWrapper;return creater([func,bitmask,partialArgs,partialRightArgs,thisArg,arity])}function escapeHtmlChar(match){return htmlEscapes[match]}function getIndexOf(){var result=(result=lodash.indexOf)===indexOf?baseIndexOf:result;return result}function isNative(value){return typeof value=="function"&&reNative.test(value)}var setBindData=!defineProperty?noop:function(func,value){descriptor.value=value;defineProperty(func,"__bindData__",descriptor)};function shimIsPlainObject(value){var ctor,result;if(!(value&&toString.call(value)==objectClass)||(ctor=value.constructor,isFunction(ctor)&&!(ctor instanceof ctor))){return false}forIn(value,function(value,key){result=key});return typeof result=="undefined"||hasOwnProperty.call(value,result)}function unescapeHtmlChar(match){return htmlUnescapes[match]}function isArguments(value){return value&&typeof value=="object"&&typeof value.length=="number"&&toString.call(value)==argsClass||false}var isArray=nativeIsArray||function(value){return value&&typeof value=="object"&&typeof value.length=="number"&&toString.call(value)==arrayClass||false};var shimKeys=function(object){var index,iterable=object,result=[];if(!iterable)return result;if(!objectTypes[typeof object])return result;for(index in iterable){if(hasOwnProperty.call(iterable,index)){result.push(index)}}return result};var keys=!nativeKeys?shimKeys:function(object){if(!isObject(object)){return[]}return nativeKeys(object)};var htmlEscapes={"&":"&","<":"<",">":">",'"':""","'":"'"};var htmlUnescapes=invert(htmlEscapes);var reEscapedHtml=RegExp("("+keys(htmlUnescapes).join("|")+")","g"),reUnescapedHtml=RegExp("["+keys(htmlEscapes).join("")+"]","g");var assign=function(object,source,guard){var index,iterable=object,result=iterable;if(!iterable)return result;var args=arguments,argsIndex=0,argsLength=typeof guard=="number"?2:args.length;if(argsLength>3&&typeof args[argsLength-2]=="function"){var callback=baseCreateCallback(args[--argsLength-1],args[argsLength--],2)}else if(argsLength>2&&typeof args[argsLength-1]=="function"){callback=args[--argsLength]}while(++argsIndex<argsLength){iterable=args[argsIndex];if(iterable&&objectTypes[typeof iterable]){var ownIndex=-1,ownProps=objectTypes[typeof iterable]&&keys(iterable),length=ownProps?ownProps.length:0;while(++ownIndex<length){index=ownProps[ownIndex];result[index]=callback?callback(result[index],iterable[index]):iterable[index]}}}return result};function clone(value,isDeep,callback,thisArg){if(typeof isDeep!="boolean"&&isDeep!=null){thisArg=callback;callback=isDeep;isDeep=false}return baseClone(value,isDeep,typeof callback=="function"&&baseCreateCallback(callback,thisArg,1))}function cloneDeep(value,callback,thisArg){return baseClone(value,true,typeof callback=="function"&&baseCreateCallback(callback,thisArg,1))}function create(prototype,properties){var result=baseCreate(prototype);return properties?assign(result,properties):result}var defaults=function(object,source,guard){var index,iterable=object,result=iterable;if(!iterable)return result;var args=arguments,argsIndex=0,argsLength=typeof guard=="number"?2:args.length;while(++argsIndex<argsLength){iterable=args[argsIndex];if(iterable&&objectTypes[typeof iterable]){var ownIndex=-1,ownProps=objectTypes[typeof iterable]&&keys(iterable),length=ownProps?ownProps.length:0;while(++ownIndex<length){index=ownProps[ownIndex];if(typeof result[index]=="undefined")result[index]=iterable[index]}}}return result};function findKey(object,callback,thisArg){var result;callback=lodash.createCallback(callback,thisArg,3);forOwn(object,function(value,key,object){if(callback(value,key,object)){result=key;return false}});return result}function findLastKey(object,callback,thisArg){var result;callback=lodash.createCallback(callback,thisArg,3);forOwnRight(object,function(value,key,object){if(callback(value,key,object)){result=key;return false}});return result}var forIn=function(collection,callback,thisArg){var index,iterable=collection,result=iterable;if(!iterable)return result;if(!objectTypes[typeof iterable])return result;callback=callback&&typeof thisArg=="undefined"?callback:baseCreateCallback(callback,thisArg,3);for(index in iterable){if(callback(iterable[index],index,collection)===false)return result}return result};function forInRight(object,callback,thisArg){var pairs=[];forIn(object,function(value,key){pairs.push(key,value)});var length=pairs.length;callback=baseCreateCallback(callback,thisArg,3);while(length--){if(callback(pairs[length--],pairs[length],object)===false){break}}return object}var forOwn=function(collection,callback,thisArg){var index,iterable=collection,result=iterable;if(!iterable)return result;if(!objectTypes[typeof iterable])return result;callback=callback&&typeof thisArg=="undefined"?callback:baseCreateCallback(callback,thisArg,3);var ownIndex=-1,ownProps=objectTypes[typeof iterable]&&keys(iterable),length=ownProps?ownProps.length:0;while(++ownIndex<length){index=ownProps[ownIndex];if(callback(iterable[index],index,collection)===false)return result}return result};function forOwnRight(object,callback,thisArg){var props=keys(object),length=props.length;callback=baseCreateCallback(callback,thisArg,3);while(length--){var key=props[length];if(callback(object[key],key,object)===false){break}}return object}function functions(object){var result=[];forIn(object,function(value,key){if(isFunction(value)){result.push(key)}});return result.sort()}function has(object,key){return object?hasOwnProperty.call(object,key):false}function invert(object){var index=-1,props=keys(object),length=props.length,result={};while(++index<length){var key=props[index];result[object[key]]=key}return result}function isBoolean(value){return value===true||value===false||value&&typeof value=="object"&&toString.call(value)==boolClass||false}function isDate(value){return value&&typeof value=="object"&&toString.call(value)==dateClass||false}function isElement(value){return value&&value.nodeType===1||false}function isEmpty(value){var result=true;if(!value){return result}var className=toString.call(value),length=value.length;if(className==arrayClass||className==stringClass||className==argsClass||className==objectClass&&typeof length=="number"&&isFunction(value.splice)){return!length}forOwn(value,function(){return result=false});return result}function isEqual(a,b,callback,thisArg){return baseIsEqual(a,b,typeof callback=="function"&&baseCreateCallback(callback,thisArg,2))}function isFinite(value){return nativeIsFinite(value)&&!nativeIsNaN(parseFloat(value))}function isFunction(value){return typeof value=="function"}function isObject(value){return!!(value&&objectTypes[typeof value])}function isNaN(value){return isNumber(value)&&value!=+value}function isNull(value){return value===null}function isNumber(value){return typeof value=="number"||value&&typeof value=="object"&&toString.call(value)==numberClass||false}var isPlainObject=!getPrototypeOf?shimIsPlainObject:function(value){if(!(value&&toString.call(value)==objectClass)){return false}var valueOf=value.valueOf,objProto=isNative(valueOf)&&(objProto=getPrototypeOf(valueOf))&&getPrototypeOf(objProto);return objProto?value==objProto||getPrototypeOf(value)==objProto:shimIsPlainObject(value)};function isRegExp(value){return value&&typeof value=="object"&&toString.call(value)==regexpClass||false}function isString(value){return typeof value=="string"||value&&typeof value=="object"&&toString.call(value)==stringClass||false}function isUndefined(value){return typeof value=="undefined"}function mapValues(object,callback,thisArg){var result={};callback=lodash.createCallback(callback,thisArg,3);forOwn(object,function(value,key,object){result[key]=callback(value,key,object)});return result}function merge(object){var args=arguments,length=2;if(!isObject(object)){return object}if(typeof args[2]!="number"){length=args.length}if(length>3&&typeof args[length-2]=="function"){var callback=baseCreateCallback(args[--length-1],args[length--],2)}else if(length>2&&typeof args[length-1]=="function"){callback=args[--length]}var sources=slice(arguments,1,length),index=-1,stackA=getArray(),stackB=getArray();while(++index<length){baseMerge(object,sources[index],callback,stackA,stackB)}releaseArray(stackA);releaseArray(stackB);return object}function omit(object,callback,thisArg){var result={};if(typeof callback!="function"){var props=[];forIn(object,function(value,key){props.push(key)});props=baseDifference(props,baseFlatten(arguments,true,false,1));var index=-1,length=props.length;while(++index<length){var key=props[index];result[key]=object[key]}}else{callback=lodash.createCallback(callback,thisArg,3);forIn(object,function(value,key,object){if(!callback(value,key,object)){result[key]=value}})}return result}function pairs(object){var index=-1,props=keys(object),length=props.length,result=Array(length);while(++index<length){var key=props[index];result[index]=[key,object[key]]}return result}function pick(object,callback,thisArg){var result={};if(typeof callback!="function"){var index=-1,props=baseFlatten(arguments,true,false,1),length=isObject(object)?props.length:0;while(++index<length){var key=props[index];if(key in object){result[key]=object[key]}}}else{callback=lodash.createCallback(callback,thisArg,3);forIn(object,function(value,key,object){if(callback(value,key,object)){result[key]=value}})}return result}function transform(object,callback,accumulator,thisArg){var isArr=isArray(object);if(accumulator==null){if(isArr){accumulator=[]}else{var ctor=object&&object.constructor,proto=ctor&&ctor.prototype;accumulator=baseCreate(proto)}}if(callback){callback=lodash.createCallback(callback,thisArg,4);(isArr?forEach:forOwn)(object,function(value,index,object){return callback(accumulator,value,index,object)})}return accumulator}function values(object){var index=-1,props=keys(object),length=props.length,result=Array(length);while(++index<length){result[index]=object[props[index]]}return result}function at(collection){var args=arguments,index=-1,props=baseFlatten(args,true,false,1),length=args[2]&&args[2][args[1]]===collection?1:props.length,result=Array(length);while(++index<length){result[index]=collection[props[index]]}return result}function contains(collection,target,fromIndex){var index=-1,indexOf=getIndexOf(),length=collection?collection.length:0,result=false;fromIndex=(fromIndex<0?nativeMax(0,length+fromIndex):fromIndex)||0;if(isArray(collection)){result=indexOf(collection,target,fromIndex)>-1}else if(typeof length=="number"){result=(isString(collection)?collection.indexOf(target,fromIndex):indexOf(collection,target,fromIndex))>-1}else{forOwn(collection,function(value){if(++index>=fromIndex){return!(result=value===target)}})}return result}var countBy=createAggregator(function(result,value,key){hasOwnProperty.call(result,key)?result[key]++:result[key]=1});function every(collection,callback,thisArg){var result=true;callback=lodash.createCallback(callback,thisArg,3);var index=-1,length=collection?collection.length:0;if(typeof length=="number"){while(++index<length){if(!(result=!!callback(collection[index],index,collection))){break}}}else{forOwn(collection,function(value,index,collection){return result=!!callback(value,index,collection)})}return result}function filter(collection,callback,thisArg){var result=[];callback=lodash.createCallback(callback,thisArg,3);var index=-1,length=collection?collection.length:0;if(typeof length=="number"){while(++index<length){var value=collection[index];if(callback(value,index,collection)){result.push(value)}}}else{forOwn(collection,function(value,index,collection){if(callback(value,index,collection)){result.push(value)}})}return result}function find(collection,callback,thisArg){callback=lodash.createCallback(callback,thisArg,3);var index=-1,length=collection?collection.length:0;if(typeof length=="number"){while(++index<length){var value=collection[index];if(callback(value,index,collection)){return value}}}else{var result;forOwn(collection,function(value,index,collection){if(callback(value,index,collection)){result=value;return false}});return result}}function findLast(collection,callback,thisArg){var result;callback=lodash.createCallback(callback,thisArg,3);forEachRight(collection,function(value,index,collection){if(callback(value,index,collection)){result=value;return false}});return result}function forEach(collection,callback,thisArg){var index=-1,length=collection?collection.length:0;callback=callback&&typeof thisArg=="undefined"?callback:baseCreateCallback(callback,thisArg,3);if(typeof length=="number"){while(++index<length){if(callback(collection[index],index,collection)===false){break}}}else{forOwn(collection,callback)}return collection}function forEachRight(collection,callback,thisArg){var length=collection?collection.length:0;callback=callback&&typeof thisArg=="undefined"?callback:baseCreateCallback(callback,thisArg,3);if(typeof length=="number"){while(length--){if(callback(collection[length],length,collection)===false){break}}}else{var props=keys(collection);length=props.length;forOwn(collection,function(value,key,collection){key=props?props[--length]:--length;return callback(collection[key],key,collection)})}return collection}var groupBy=createAggregator(function(result,value,key){(hasOwnProperty.call(result,key)?result[key]:result[key]=[]).push(value)});var indexBy=createAggregator(function(result,value,key){result[key]=value});function invoke(collection,methodName){var args=slice(arguments,2),index=-1,isFunc=typeof methodName=="function",length=collection?collection.length:0,result=Array(typeof length=="number"?length:0);forEach(collection,function(value){result[++index]=(isFunc?methodName:value[methodName]).apply(value,args)});return result}function map(collection,callback,thisArg){var index=-1,length=collection?collection.length:0;callback=lodash.createCallback(callback,thisArg,3);if(typeof length=="number"){var result=Array(length);while(++index<length){result[index]=callback(collection[index],index,collection)}}else{result=[];forOwn(collection,function(value,key,collection){result[++index]=callback(value,key,collection)})}return result}function max(collection,callback,thisArg){var computed=-Infinity,result=computed;if(typeof callback!="function"&&thisArg&&thisArg[callback]===collection){callback=null}if(callback==null&&isArray(collection)){var index=-1,length=collection.length;while(++index<length){var value=collection[index];if(value>result){result=value}}}else{callback=callback==null&&isString(collection)?charAtCallback:lodash.createCallback(callback,thisArg,3);forEach(collection,function(value,index,collection){var current=callback(value,index,collection);if(current>computed){computed=current;result=value}})}return result}function min(collection,callback,thisArg){var computed=Infinity,result=computed;if(typeof callback!="function"&&thisArg&&thisArg[callback]===collection){callback=null}if(callback==null&&isArray(collection)){var index=-1,length=collection.length;while(++index<length){var value=collection[index];if(value<result){result=value}}}else{callback=callback==null&&isString(collection)?charAtCallback:lodash.createCallback(callback,thisArg,3);forEach(collection,function(value,index,collection){var current=callback(value,index,collection);if(current<computed){computed=current;result=value}})}return result}var pluck=map;function reduce(collection,callback,accumulator,thisArg){if(!collection)return accumulator;var noaccum=arguments.length<3;callback=lodash.createCallback(callback,thisArg,4);var index=-1,length=collection.length;if(typeof length=="number"){if(noaccum){accumulator=collection[++index]}while(++index<length){accumulator=callback(accumulator,collection[index],index,collection)}}else{forOwn(collection,function(value,index,collection){accumulator=noaccum?(noaccum=false,value):callback(accumulator,value,index,collection)})}return accumulator}function reduceRight(collection,callback,accumulator,thisArg){var noaccum=arguments.length<3;callback=lodash.createCallback(callback,thisArg,4);forEachRight(collection,function(value,index,collection){accumulator=noaccum?(noaccum=false,value):callback(accumulator,value,index,collection)});return accumulator}function reject(collection,callback,thisArg){callback=lodash.createCallback(callback,thisArg,3);return filter(collection,function(value,index,collection){return!callback(value,index,collection)})}function sample(collection,n,guard){if(collection&&typeof collection.length!="number"){collection=values(collection)}if(n==null||guard){return collection?collection[baseRandom(0,collection.length-1)]:undefined}var result=shuffle(collection);result.length=nativeMin(nativeMax(0,n),result.length);return result}function shuffle(collection){var index=-1,length=collection?collection.length:0,result=Array(typeof length=="number"?length:0);forEach(collection,function(value){var rand=baseRandom(0,++index);result[index]=result[rand];result[rand]=value});return result}function size(collection){var length=collection?collection.length:0;return typeof length=="number"?length:keys(collection).length}function some(collection,callback,thisArg){var result;callback=lodash.createCallback(callback,thisArg,3);var index=-1,length=collection?collection.length:0;if(typeof length=="number"){while(++index<length){if(result=callback(collection[index],index,collection)){break}}}else{forOwn(collection,function(value,index,collection){return!(result=callback(value,index,collection))})}return!!result}function sortBy(collection,callback,thisArg){var index=-1,isArr=isArray(callback),length=collection?collection.length:0,result=Array(typeof length=="number"?length:0);if(!isArr){callback=lodash.createCallback(callback,thisArg,3)}forEach(collection,function(value,key,collection){var object=result[++index]=getObject();if(isArr){object.criteria=map(callback,function(key){return value[key]})}else{(object.criteria=getArray())[0]=callback(value,key,collection)}object.index=index;object.value=value});length=result.length;result.sort(compareAscending);while(length--){var object=result[length];result[length]=object.value;if(!isArr){releaseArray(object.criteria)}releaseObject(object)}return result}function toArray(collection){if(collection&&typeof collection.length=="number"){return slice(collection)}return values(collection)}var where=filter;function compact(array){var index=-1,length=array?array.length:0,result=[];while(++index<length){var value=array[index];if(value){result.push(value)}}return result}function difference(array){return baseDifference(array,baseFlatten(arguments,true,true,1))}function findIndex(array,callback,thisArg){var index=-1,length=array?array.length:0;callback=lodash.createCallback(callback,thisArg,3);while(++index<length){if(callback(array[index],index,array)){return index}}return-1}function findLastIndex(array,callback,thisArg){var length=array?array.length:0;callback=lodash.createCallback(callback,thisArg,3);while(length--){if(callback(array[length],length,array)){return length}}return-1}function first(array,callback,thisArg){var n=0,length=array?array.length:0;if(typeof callback!="number"&&callback!=null){var index=-1;callback=lodash.createCallback(callback,thisArg,3);while(++index<length&&callback(array[index],index,array)){n++}}else{n=callback;if(n==null||thisArg){return array?array[0]:undefined}}return slice(array,0,nativeMin(nativeMax(0,n),length))}function flatten(array,isShallow,callback,thisArg){if(typeof isShallow!="boolean"&&isShallow!=null){thisArg=callback;callback=typeof isShallow!="function"&&thisArg&&thisArg[isShallow]===array?null:isShallow;isShallow=false}if(callback!=null){array=map(array,callback,thisArg)}return baseFlatten(array,isShallow)}function indexOf(array,value,fromIndex){if(typeof fromIndex=="number"){var length=array?array.length:0;fromIndex=fromIndex<0?nativeMax(0,length+fromIndex):fromIndex||0}else if(fromIndex){var index=sortedIndex(array,value);return array[index]===value?index:-1}return baseIndexOf(array,value,fromIndex)}function initial(array,callback,thisArg){var n=0,length=array?array.length:0;if(typeof callback!="number"&&callback!=null){var index=length;callback=lodash.createCallback(callback,thisArg,3);while(index--&&callback(array[index],index,array)){n++}}else{n=callback==null||thisArg?1:callback||n}return slice(array,0,nativeMin(nativeMax(0,length-n),length))}function intersection(){var args=[],argsIndex=-1,argsLength=arguments.length,caches=getArray(),indexOf=getIndexOf(),trustIndexOf=indexOf===baseIndexOf,seen=getArray();while(++argsIndex<argsLength){var value=arguments[argsIndex];if(isArray(value)||isArguments(value)){args.push(value);caches.push(trustIndexOf&&value.length>=largeArraySize&&createCache(argsIndex?args[argsIndex]:seen))}}var array=args[0],index=-1,length=array?array.length:0,result=[];outer:while(++index<length){var cache=caches[0];value=array[index];if((cache?cacheIndexOf(cache,value):indexOf(seen,value))<0){argsIndex=argsLength;(cache||seen).push(value);while(--argsIndex){cache=caches[argsIndex];if((cache?cacheIndexOf(cache,value):indexOf(args[argsIndex],value))<0){continue outer}}result.push(value)}}while(argsLength--){cache=caches[argsLength];if(cache){releaseObject(cache)}}releaseArray(caches);releaseArray(seen);return result}function last(array,callback,thisArg){var n=0,length=array?array.length:0;if(typeof callback!="number"&&callback!=null){var index=length;callback=lodash.createCallback(callback,thisArg,3);while(index--&&callback(array[index],index,array)){n++}}else{n=callback;if(n==null||thisArg){return array?array[length-1]:undefined}}return slice(array,nativeMax(0,length-n))}function lastIndexOf(array,value,fromIndex){var index=array?array.length:0;if(typeof fromIndex=="number"){index=(fromIndex<0?nativeMax(0,index+fromIndex):nativeMin(fromIndex,index-1))+1}while(index--){if(array[index]===value){return index}}return-1}function pull(array){var args=arguments,argsIndex=0,argsLength=args.length,length=array?array.length:0;while(++argsIndex<argsLength){var index=-1,value=args[argsIndex];while(++index<length){if(array[index]===value){splice.call(array,index--,1);length--}}}return array}function range(start,end,step){start=+start||0;step=typeof step=="number"?step:+step||1;if(end==null){end=start;start=0}var index=-1,length=nativeMax(0,ceil((end-start)/(step||1))),result=Array(length);while(++index<length){result[index]=start;start+=step}return result}function remove(array,callback,thisArg){var index=-1,length=array?array.length:0,result=[];callback=lodash.createCallback(callback,thisArg,3);while(++index<length){var value=array[index];if(callback(value,index,array)){result.push(value);splice.call(array,index--,1);length--}}return result}function rest(array,callback,thisArg){if(typeof callback!="number"&&callback!=null){var n=0,index=-1,length=array?array.length:0;callback=lodash.createCallback(callback,thisArg,3);while(++index<length&&callback(array[index],index,array)){n++}}else{n=callback==null||thisArg?1:nativeMax(0,callback)}return slice(array,n)}function sortedIndex(array,value,callback,thisArg){var low=0,high=array?array.length:low;callback=callback?lodash.createCallback(callback,thisArg,1):identity;value=callback(value);while(low<high){var mid=low+high>>>1;callback(array[mid])<value?low=mid+1:high=mid}return low}function union(){return baseUniq(baseFlatten(arguments,true,true))}function uniq(array,isSorted,callback,thisArg){if(typeof isSorted!="boolean"&&isSorted!=null){thisArg=callback;callback=typeof isSorted!="function"&&thisArg&&thisArg[isSorted]===array?null:isSorted;isSorted=false}if(callback!=null){callback=lodash.createCallback(callback,thisArg,3)}return baseUniq(array,isSorted,callback)}function without(array){return baseDifference(array,slice(arguments,1))}function xor(){var index=-1,length=arguments.length;while(++index<length){var array=arguments[index];if(isArray(array)||isArguments(array)){var result=result?baseUniq(baseDifference(result,array).concat(baseDifference(array,result))):array}}return result||[]}function zip(){var array=arguments.length>1?arguments:arguments[0],index=-1,length=array?max(pluck(array,"length")):0,result=Array(length<0?0:length);while(++index<length){result[index]=pluck(array,index)}return result}function zipObject(keys,values){var index=-1,length=keys?keys.length:0,result={};if(!values&&length&&!isArray(keys[0])){values=[]}while(++index<length){var key=keys[index];if(values){result[key]=values[index]}else if(key){result[key[0]]=key[1]}}return result}function after(n,func){if(!isFunction(func)){throw new TypeError}return function(){if(--n<1){return func.apply(this,arguments)}}}function bind(func,thisArg){return arguments.length>2?createWrapper(func,17,slice(arguments,2),null,thisArg):createWrapper(func,1,null,null,thisArg)}function bindAll(object){var funcs=arguments.length>1?baseFlatten(arguments,true,false,1):functions(object),index=-1,length=funcs.length;while(++index<length){var key=funcs[index];object[key]=createWrapper(object[key],1,null,null,object)}return object}function bindKey(object,key){return arguments.length>2?createWrapper(key,19,slice(arguments,2),null,object):createWrapper(key,3,null,null,object)}function compose(){var funcs=arguments,length=funcs.length;while(length--){if(!isFunction(funcs[length])){throw new TypeError}}return function(){var args=arguments,length=funcs.length;while(length--){args=[funcs[length].apply(this,args)]}return args[0]}}function curry(func,arity){arity=typeof arity=="number"?arity:+arity||func.length;return createWrapper(func,4,null,null,null,arity)}function debounce(func,wait,options){var args,maxTimeoutId,result,stamp,thisArg,timeoutId,trailingCall,lastCalled=0,maxWait=false,trailing=true;if(!isFunction(func)){throw new TypeError}wait=nativeMax(0,wait)||0;if(options===true){var leading=true;trailing=false}else if(isObject(options)){leading=options.leading;maxWait="maxWait"in options&&(nativeMax(wait,options.maxWait)||0);trailing="trailing"in options?options.trailing:trailing}var delayed=function(){var remaining=wait-(now()-stamp);if(remaining<=0){if(maxTimeoutId){clearTimeout(maxTimeoutId)}var isCalled=trailingCall;maxTimeoutId=timeoutId=trailingCall=undefined;if(isCalled){lastCalled=now();result=func.apply(thisArg,args);if(!timeoutId&&!maxTimeoutId){args=thisArg=null}}}else{timeoutId=setTimeout(delayed,remaining)}};var maxDelayed=function(){if(timeoutId){clearTimeout(timeoutId)}maxTimeoutId=timeoutId=trailingCall=undefined;if(trailing||maxWait!==wait){lastCalled=now();result=func.apply(thisArg,args);if(!timeoutId&&!maxTimeoutId){args=thisArg=null}}};return function(){args=arguments;stamp=now();thisArg=this;trailingCall=trailing&&(timeoutId||!leading);if(maxWait===false){var leadingCall=leading&&!timeoutId}else{if(!maxTimeoutId&&!leading){lastCalled=stamp}var remaining=maxWait-(stamp-lastCalled),isCalled=remaining<=0;if(isCalled){if(maxTimeoutId){maxTimeoutId=clearTimeout(maxTimeoutId)}lastCalled=stamp;result=func.apply(thisArg,args)}else if(!maxTimeoutId){maxTimeoutId=setTimeout(maxDelayed,remaining)}}if(isCalled&&timeoutId){timeoutId=clearTimeout(timeoutId)}else if(!timeoutId&&wait!==maxWait){timeoutId=setTimeout(delayed,wait)}if(leadingCall){isCalled=true;result=func.apply(thisArg,args)}if(isCalled&&!timeoutId&&!maxTimeoutId){args=thisArg=null}return result}}function defer(func){if(!isFunction(func)){throw new TypeError}var args=slice(arguments,1);return setTimeout(function(){func.apply(undefined,args)},1)}function delay(func,wait){if(!isFunction(func)){throw new TypeError}var args=slice(arguments,2);return setTimeout(function(){func.apply(undefined,args)},wait)}function memoize(func,resolver){if(!isFunction(func)){throw new TypeError}var memoized=function(){var cache=memoized.cache,key=resolver?resolver.apply(this,arguments):keyPrefix+arguments[0]; return hasOwnProperty.call(cache,key)?cache[key]:cache[key]=func.apply(this,arguments)};memoized.cache={};return memoized}function once(func){var ran,result;if(!isFunction(func)){throw new TypeError}return function(){if(ran){return result}ran=true;result=func.apply(this,arguments);func=null;return result}}function partial(func){return createWrapper(func,16,slice(arguments,1))}function partialRight(func){return createWrapper(func,32,null,slice(arguments,1))}function throttle(func,wait,options){var leading=true,trailing=true;if(!isFunction(func)){throw new TypeError}if(options===false){leading=false}else if(isObject(options)){leading="leading"in options?options.leading:leading;trailing="trailing"in options?options.trailing:trailing}debounceOptions.leading=leading;debounceOptions.maxWait=wait;debounceOptions.trailing=trailing;return debounce(func,wait,debounceOptions)}function wrap(value,wrapper){return createWrapper(wrapper,16,[value])}function constant(value){return function(){return value}}function createCallback(func,thisArg,argCount){var type=typeof func;if(func==null||type=="function"){return baseCreateCallback(func,thisArg,argCount)}if(type!="object"){return property(func)}var props=keys(func),key=props[0],a=func[key];if(props.length==1&&a===a&&!isObject(a)){return function(object){var b=object[key];return a===b&&(a!==0||1/a==1/b)}}return function(object){var length=props.length,result=false;while(length--){if(!(result=baseIsEqual(object[props[length]],func[props[length]],null,true))){break}}return result}}function escape(string){return string==null?"":String(string).replace(reUnescapedHtml,escapeHtmlChar)}function identity(value){return value}function mixin(object,source,options){var chain=true,methodNames=source&&functions(source);if(!source||!options&&!methodNames.length){if(options==null){options=source}ctor=lodashWrapper;source=object;object=lodash;methodNames=functions(source)}if(options===false){chain=false}else if(isObject(options)&&"chain"in options){chain=options.chain}var ctor=object,isFunc=isFunction(ctor);forEach(methodNames,function(methodName){var func=object[methodName]=source[methodName];if(isFunc){ctor.prototype[methodName]=function(){var chainAll=this.__chain__,value=this.__wrapped__,args=[value];push.apply(args,arguments);var result=func.apply(object,args);if(chain||chainAll){if(value===result&&isObject(result)){return this}result=new ctor(result);result.__chain__=chainAll}return result}}})}function noConflict(){context._=oldDash;return this}function noop(){}var now=isNative(now=Date.now)&&now||function(){return(new Date).getTime()};var parseInt=nativeParseInt(whitespace+"08")==8?nativeParseInt:function(value,radix){return nativeParseInt(isString(value)?value.replace(reLeadingSpacesAndZeros,""):value,radix||0)};function property(key){return function(object){return object[key]}}function random(min,max,floating){var noMin=min==null,noMax=max==null;if(floating==null){if(typeof min=="boolean"&&noMax){floating=min;min=1}else if(!noMax&&typeof max=="boolean"){floating=max;noMax=true}}if(noMin&&noMax){max=1}min=+min||0;if(noMax){max=min;min=0}else{max=+max||0}if(floating||min%1||max%1){var rand=nativeRandom();return nativeMin(min+rand*(max-min+parseFloat("1e-"+((rand+"").length-1))),max)}return baseRandom(min,max)}function result(object,key){if(object){var value=object[key];return isFunction(value)?object[key]():value}}function template(text,data,options){var settings=lodash.templateSettings;text=String(text||"");options=defaults({},options,settings);var imports=defaults({},options.imports,settings.imports),importsKeys=keys(imports),importsValues=values(imports);var isEvaluating,index=0,interpolate=options.interpolate||reNoMatch,source="__p += '";var reDelimiters=RegExp((options.escape||reNoMatch).source+"|"+interpolate.source+"|"+(interpolate===reInterpolate?reEsTemplate:reNoMatch).source+"|"+(options.evaluate||reNoMatch).source+"|$","g");text.replace(reDelimiters,function(match,escapeValue,interpolateValue,esTemplateValue,evaluateValue,offset){interpolateValue||(interpolateValue=esTemplateValue);source+=text.slice(index,offset).replace(reUnescapedString,escapeStringChar);if(escapeValue){source+="' +\n__e("+escapeValue+") +\n'"}if(evaluateValue){isEvaluating=true;source+="';\n"+evaluateValue+";\n__p += '"}if(interpolateValue){source+="' +\n((__t = ("+interpolateValue+")) == null ? '' : __t) +\n'"}index=offset+match.length;return match});source+="';\n";var variable=options.variable,hasVariable=variable;if(!hasVariable){variable="obj";source="with ("+variable+") {\n"+source+"\n}\n"}source=(isEvaluating?source.replace(reEmptyStringLeading,""):source).replace(reEmptyStringMiddle,"$1").replace(reEmptyStringTrailing,"$1;");source="function("+variable+") {\n"+(hasVariable?"":variable+" || ("+variable+" = {});\n")+"var __t, __p = '', __e = _.escape"+(isEvaluating?", __j = Array.prototype.join;\n"+"function print() { __p += __j.call(arguments, '') }\n":";\n")+source+"return __p\n}";var sourceURL="\n/*\n//# sourceURL="+(options.sourceURL||"/lodash/template/source["+templateCounter++ +"]")+"\n*/";try{var result=Function(importsKeys,"return "+source+sourceURL).apply(undefined,importsValues)}catch(e){e.source=source;throw e}if(data){return result(data)}result.source=source;return result}function times(n,callback,thisArg){n=(n=+n)>-1?n:0;var index=-1,result=Array(n);callback=baseCreateCallback(callback,thisArg,1);while(++index<n){result[index]=callback(index)}return result}function unescape(string){return string==null?"":String(string).replace(reEscapedHtml,unescapeHtmlChar)}function uniqueId(prefix){var id=++idCounter;return String(prefix==null?"":prefix)+id}function chain(value){value=new lodashWrapper(value);value.__chain__=true;return value}function tap(value,interceptor){interceptor(value);return value}function wrapperChain(){this.__chain__=true;return this}function wrapperToString(){return String(this.__wrapped__)}function wrapperValueOf(){return this.__wrapped__}lodash.after=after;lodash.assign=assign;lodash.at=at;lodash.bind=bind;lodash.bindAll=bindAll;lodash.bindKey=bindKey;lodash.chain=chain;lodash.compact=compact;lodash.compose=compose;lodash.constant=constant;lodash.countBy=countBy;lodash.create=create;lodash.createCallback=createCallback;lodash.curry=curry;lodash.debounce=debounce;lodash.defaults=defaults;lodash.defer=defer;lodash.delay=delay;lodash.difference=difference;lodash.filter=filter;lodash.flatten=flatten;lodash.forEach=forEach;lodash.forEachRight=forEachRight;lodash.forIn=forIn;lodash.forInRight=forInRight;lodash.forOwn=forOwn;lodash.forOwnRight=forOwnRight;lodash.functions=functions;lodash.groupBy=groupBy;lodash.indexBy=indexBy;lodash.initial=initial;lodash.intersection=intersection;lodash.invert=invert;lodash.invoke=invoke;lodash.keys=keys;lodash.map=map;lodash.mapValues=mapValues;lodash.max=max;lodash.memoize=memoize;lodash.merge=merge;lodash.min=min;lodash.omit=omit;lodash.once=once;lodash.pairs=pairs;lodash.partial=partial;lodash.partialRight=partialRight;lodash.pick=pick;lodash.pluck=pluck;lodash.property=property;lodash.pull=pull;lodash.range=range;lodash.reject=reject;lodash.remove=remove;lodash.rest=rest;lodash.shuffle=shuffle;lodash.sortBy=sortBy;lodash.tap=tap;lodash.throttle=throttle;lodash.times=times;lodash.toArray=toArray;lodash.transform=transform;lodash.union=union;lodash.uniq=uniq;lodash.values=values;lodash.where=where;lodash.without=without;lodash.wrap=wrap;lodash.xor=xor;lodash.zip=zip;lodash.zipObject=zipObject;lodash.collect=map;lodash.drop=rest;lodash.each=forEach;lodash.eachRight=forEachRight;lodash.extend=assign;lodash.methods=functions;lodash.object=zipObject;lodash.select=filter;lodash.tail=rest;lodash.unique=uniq;lodash.unzip=zip;mixin(lodash);lodash.clone=clone;lodash.cloneDeep=cloneDeep;lodash.contains=contains;lodash.escape=escape;lodash.every=every;lodash.find=find;lodash.findIndex=findIndex;lodash.findKey=findKey;lodash.findLast=findLast;lodash.findLastIndex=findLastIndex;lodash.findLastKey=findLastKey;lodash.has=has;lodash.identity=identity;lodash.indexOf=indexOf;lodash.isArguments=isArguments;lodash.isArray=isArray;lodash.isBoolean=isBoolean;lodash.isDate=isDate;lodash.isElement=isElement;lodash.isEmpty=isEmpty;lodash.isEqual=isEqual;lodash.isFinite=isFinite;lodash.isFunction=isFunction;lodash.isNaN=isNaN;lodash.isNull=isNull;lodash.isNumber=isNumber;lodash.isObject=isObject;lodash.isPlainObject=isPlainObject;lodash.isRegExp=isRegExp;lodash.isString=isString;lodash.isUndefined=isUndefined;lodash.lastIndexOf=lastIndexOf;lodash.mixin=mixin;lodash.noConflict=noConflict;lodash.noop=noop;lodash.now=now;lodash.parseInt=parseInt;lodash.random=random;lodash.reduce=reduce;lodash.reduceRight=reduceRight;lodash.result=result;lodash.runInContext=runInContext;lodash.size=size;lodash.some=some;lodash.sortedIndex=sortedIndex;lodash.template=template;lodash.unescape=unescape;lodash.uniqueId=uniqueId;lodash.all=every;lodash.any=some;lodash.detect=find;lodash.findWhere=find;lodash.foldl=reduce;lodash.foldr=reduceRight;lodash.include=contains;lodash.inject=reduce;mixin(function(){var source={};forOwn(lodash,function(func,methodName){if(!lodash.prototype[methodName]){source[methodName]=func}});return source}(),false);lodash.first=first;lodash.last=last;lodash.sample=sample;lodash.take=first;lodash.head=first;forOwn(lodash,function(func,methodName){var callbackable=methodName!=="sample";if(!lodash.prototype[methodName]){lodash.prototype[methodName]=function(n,guard){var chainAll=this.__chain__,result=func(this.__wrapped__,n,guard);return!chainAll&&(n==null||guard&&!(callbackable&&typeof n=="function"))?result:new lodashWrapper(result,chainAll)}}});lodash.VERSION="2.4.1";lodash.prototype.chain=wrapperChain;lodash.prototype.toString=wrapperToString;lodash.prototype.value=wrapperValueOf;lodash.prototype.valueOf=wrapperValueOf;forEach(["join","pop","shift"],function(methodName){var func=arrayRef[methodName];lodash.prototype[methodName]=function(){var chainAll=this.__chain__,result=func.apply(this.__wrapped__,arguments);return chainAll?new lodashWrapper(result,chainAll):result}});forEach(["push","reverse","sort","unshift"],function(methodName){var func=arrayRef[methodName];lodash.prototype[methodName]=function(){func.apply(this.__wrapped__,arguments);return this}});forEach(["concat","slice","splice"],function(methodName){var func=arrayRef[methodName];lodash.prototype[methodName]=function(){return new lodashWrapper(func.apply(this.__wrapped__,arguments),this.__chain__)}});return lodash}var _=runInContext();if(typeof define=="function"&&typeof define.amd=="object"&&define.amd){root._=_;define(function(){return _})}else if(freeExports&&freeModule){if(moduleExports){(freeModule.exports=_)._=_}else{freeExports._=_}}else{root._=_}}).call(this)}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}]},{},[1])(1)});</script> <style type="text/css"> .mermaid .label { color: #333; font-weight: 400; } .mermaid .node rect, .mermaid .node circle, .mermaid .node ellipse, .mermaid .node polygon { fill: #ECECFF; stroke: #CCCCFF; stroke-width: 1px; } .mermaid .edgePath .path { stroke: #333333; } .mermaid .edgeLabel { background-color: #e8e8e8; } .mermaid .cluster rect { fill: #ffffde !important; rx: 4 !important; stroke: #aaaa33 !important; stroke-width: 1px !important; } .mermaid .cluster text { fill: #333; } .mermaid .actor { stroke: #CCCCFF; fill: #ECECFF; } .mermaid text.actor { fill: black; stroke: none; } .mermaid .actor-line { stroke: grey; } .mermaid .messageLine0 { stroke-width: 1.5; stroke-dasharray: "2 2"; marker-end: "url(#arrowhead)"; stroke: #333; } .mermaid .messageLine1 { stroke-width: 1.5; stroke-dasharray: "2 2"; stroke: #333; } .mermaid #arrowhead { fill: #333; } .mermaid #crosshead path { fill: #333 !important; stroke: #333 !important; } .messageText { fill: #333; stroke: none; } .mermaid .labelBox { stroke: #CCCCFF; fill: #ECECFF; } .mermaid .labelText { fill: black; stroke: none; } .mermaid .loopText { fill: black; stroke: none; } .mermaid .loopLine { stroke-width: 2; stroke-dasharray: "2 2"; marker-end: "url(#arrowhead)"; stroke: #CCCCFF; } .mermaid .note { stroke: #aaaa33; fill: #fff5ad; } .mermaid .noteText { fill: black; stroke: none; font-family: 'trebuchet ms', verdana, arial; font-size: 14px; } .mermaid .section { stroke: none; opacity: 0.2; } .mermaid .section0 { fill: rgba(102, 102, 255, 0.49); } .mermaid .section2 { fill: #fff400; } .mermaid .section1, .mermaid .section3 { fill: white; opacity: 0.2; } .mermaid .sectionTitle0 { fill: #333; } .mermaid .sectionTitle1 { fill: #333; } .mermaid .sectionTitle2 { fill: #333; } .mermaid .sectionTitle3 { fill: #333; } .mermaid .sectionTitle { text-anchor: start; font-size: 11px; text-height: 14px; } .mermaid .grid .tick { stroke: lightgrey; opacity: 0.3; shape-rendering: crispEdges; } .mermaid .grid path { stroke-width: 0; } .mermaid .today { fill: none; stroke: red; stroke-width: 2px; } .mermaid .task { stroke-width: 2; } .mermaid .taskText { text-anchor: middle; font-size: 11px; } .mermaid .taskTextOutsideRight { fill: black; text-anchor: start; font-size: 11px; } .mermaid .taskTextOutsideLeft { fill: black; text-anchor: end; font-size: 11px; } .mermaid .taskText0, .mermaid .taskText1, .mermaid .taskText2, .mermaid .taskText3 { fill: white; } .mermaid .task0, .mermaid .task1, .mermaid .task2, .mermaid .task3 { fill: #8a90dd; stroke: #534fbc; } .mermaid .taskTextOutside0, .mermaid .taskTextOutside2 { fill: black; } .mermaid .taskTextOutside1, .mermaid .taskTextOutside3 { fill: black; } .mermaid .active0, .mermaid .active1, .mermaid .active2, .mermaid .active3 { fill: #bfc7ff; stroke: #534fbc; } .mermaid .activeText0, .mermaid .activeText1, .mermaid .activeText2, .mermaid .activeText3 { fill: black !important; } .mermaid .done0, .mermaid .done1, .mermaid .done2, .mermaid .done3 { stroke: grey; fill: lightgrey; stroke-width: 2; } .mermaid .doneText0, .mermaid .doneText1, .mermaid .doneText2, .mermaid .doneText3 { fill: black !important; } .mermaid .crit0, .mermaid .crit1, .mermaid .crit2, .mermaid .crit3 { stroke: #ff8888; fill: red; stroke-width: 2; } .mermaid .activeCrit0, .mermaid .activeCrit1, .mermaid .activeCrit2, .mermaid .activeCrit3 { stroke: #ff8888; fill: #bfc7ff; stroke-width: 2; } .mermaid .doneCrit0, .mermaid .doneCrit1, .mermaid .doneCrit2, .mermaid .doneCrit3 { stroke: #ff8888; fill: lightgrey; stroke-width: 2; cursor: pointer; shape-rendering: crispEdges; } .mermaid .doneCritText0, .mermaid .doneCritText1, .mermaid .doneCritText2, .mermaid .doneCritText3 { fill: black !important; } .mermaid .activeCritText0, .mermaid .activeCritText1, .mermaid .activeCritText2, .mermaid .activeCritText3 { fill: black !important; } .mermaid .titleText { text-anchor: middle; font-size: 18px; fill: black; } .mermaid .node text { font-family: 'trebuchet ms', verdana, arial; font-size: 14px; } div.mermaidTooltip { position: absolute; text-align: center; max-width: 200px; padding: 2px; font-family: 'trebuchet ms', verdana, arial; font-size: 12px; background: #ffffde; border: 1px solid #aaaa33; border-radius: 2px; pointer-events: none; z-index: 100; } </style> <script>!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.mermaid=t()}}(function(){var define,module,exports;return function t(e,r,n){function i(o,s){if(!r[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=r[o]={exports:{}};e[o][0].call(l.exports,function(t){var r=e[o][1][t];return i(r?r:t)},l,l.exports,t,e,r,n)}return r[o].exports}for(var a="function"==typeof require&&require,o=0;o<n.length;o++)i(n[o]);return i}({1:[function(){},{}],2:[function(t,e){e.exports={graphlib:t("./lib/graphlib"),dagre:t("./lib/dagre"),intersect:t("./lib/intersect"),render:t("./lib/render"),util:t("./lib/util"),version:t("./lib/version")}},{"./lib/dagre":9,"./lib/graphlib":10,"./lib/intersect":11,"./lib/render":26,"./lib/util":28,"./lib/version":29}],3:[function(t,e){function r(t,e,r,n){var i=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),o=i.append("path").attr("d","M 0 0 L 10 5 L 0 10 z").style("stroke-width",1).style("stroke-dasharray","1,0");a.applyStyle(o,r[n+"Style"])}function n(t,e,r,n){var i=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),o=i.append("path").attr("d","M 0 0 L 10 5 L 0 10 L 4 5 z").style("stroke-width",1).style("stroke-dasharray","1,0");a.applyStyle(o,r[n+"Style"])}function i(t,e,r,n){var i=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),o=i.append("path").attr("d","M 0 5 L 10 5").style("stroke-width",1).style("stroke-dasharray","1,0");a.applyStyle(o,r[n+"Style"])}var a=t("./util");e.exports={"default":r,normal:r,vee:n,undirected:i}},{"./util":28}],4:[function(t,e){function r(t,e){var r=e.nodes().filter(function(t){return n.isSubgraph(e,t)}),a=t.selectAll("g.cluster").data(r,function(t){return t});return a.selectAll("*").remove(),a.enter().append("g").attr("class","cluster").attr("id",function(t){var r=e.node(t);return r.id}).style("opacity",0),n.applyTransition(a,e).style("opacity",1),a.each(function(t){var r=e.node(t),n=d3.select(this);d3.select(this).append("rect");var a=n.append("g").attr("class","label");i(a,r,r.clusterLabelPos)}),a.selectAll("rect").each(function(t){var r=e.node(t),i=d3.select(this);n.applyStyle(i,r.style)}),n.applyTransition(a.exit(),e).style("opacity",0).remove(),a}var n=t("./util"),i=t("./label/add-label");e.exports=r},{"./label/add-label":19,"./util":28}],5:[function(t,e){"use strict";function r(t,e){var r=t.selectAll("g.edgeLabel").data(e.edges(),function(t){return a.edgeToId(t)}).classed("update",!0);return r.selectAll("*").remove(),r.enter().append("g").classed("edgeLabel",!0).style("opacity",0),r.each(function(t){var r=e.edge(t),a=i(o.select(this),e.edge(t),0,0).classed("label",!0),s=a.node().getBBox();r.labelId&&a.attr("id",r.labelId),n.has(r,"width")||(r.width=s.width),n.has(r,"height")||(r.height=s.height)}),a.applyTransition(r.exit(),e).style("opacity",0).remove(),r}var n=t("./lodash"),i=t("./label/add-label"),a=t("./util"),o=t("./d3");e.exports=r},{"./d3":8,"./label/add-label":19,"./lodash":22,"./util":28}],6:[function(t,e){"use strict";function r(t,e,r){var i=t.selectAll("g.edgePath").data(e.edges(),function(t){return l.edgeToId(t)}).classed("update",!0);return o(i,e),s(i,e),l.applyTransition(i,e).style("opacity",1),i.each(function(t){var r=h.select(this),n=e.edge(t);n.elem=this,n.id&&r.attr("id",n.id),l.applyClass(r,n["class"],(r.classed("update")?"update ":"")+"edgePath")}),i.selectAll("path.path").each(function(t){var r=e.edge(t);r.arrowheadId=u.uniqueId("arrowhead");var i=h.select(this).attr("marker-end",function(){return"url(#"+r.arrowheadId+")"}).style("fill","none");l.applyTransition(i,e).attr("d",function(t){return n(e,t)}),l.applyStyle(i,r.style)}),i.selectAll("defs *").remove(),i.selectAll("defs").each(function(t){var n=e.edge(t),i=r[n.arrowhead];i(h.select(this),n.arrowheadId,n,"arrowhead")}),i}function n(t,e){var r=t.edge(e),n=t.node(e.v),a=t.node(e.w),o=r.points.slice(1,r.points.length-1);return o.unshift(c(n,o[0])),o.push(c(a,o[o.length-1])),i(r,o)}function i(t,e){var r=h.svg.line().x(function(t){return t.x}).y(function(t){return t.y});return u.has(t,"lineInterpolate")&&r.interpolate(t.lineInterpolate),u.has(t,"lineTension")&&r.tension(Number(t.lineTension)),r(e)}function a(t){var e=t.getBBox(),r=t.getTransformToElement(t.ownerSVGElement).translate(e.width/2,e.height/2);return{x:r.e,y:r.f}}function o(t,e){var r=t.enter().append("g").attr("class","edgePath").style("opacity",0);r.append("path").attr("class","path").attr("d",function(t){var r=e.edge(t),n=e.node(t.v).elem,o=u.range(r.points.length).map(function(){return a(n)});return i(r,o)}),r.append("defs")}function s(t,e){var r=t.exit();l.applyTransition(r,e).style("opacity",0).remove(),l.applyTransition(r.select("path.path"),e).attr("d",function(t){var r=e.node(t.v);if(r){var n=u.range(this.pathSegList.length).map(function(){return r});return i({},n)}return h.select(this).attr("d")})}var u=t("./lodash"),c=t("./intersect/intersect-node"),l=t("./util"),h=t("./d3");e.exports=r},{"./d3":8,"./intersect/intersect-node":15,"./lodash":22,"./util":28}],7:[function(t,e){"use strict";function r(t,e,r){var s=e.nodes().filter(function(t){return!a.isSubgraph(e,t)}),u=t.selectAll("g.node").data(s,function(t){return t}).classed("update",!0);return u.selectAll("*").remove(),u.enter().append("g").attr("class","node").style("opacity",0),u.each(function(t){var s=e.node(t),u=o.select(this),c=u.append("g").attr("class","label"),l=i(c,s),h=r[s.shape],f=n.pick(l.node().getBBox(),"width","height");s.elem=this,s.id&&u.attr("id",s.id),s.labelId&&c.attr("id",s.labelId),a.applyClass(u,s["class"],(u.classed("update")?"update ":"")+"node"),n.has(s,"width")&&(f.width=s.width),n.has(s,"height")&&(f.height=s.height),f.width+=s.paddingLeft+s.paddingRight,f.height+=s.paddingTop+s.paddingBottom,c.attr("transform","translate("+(s.paddingLeft-s.paddingRight)/2+","+(s.paddingTop-s.paddingBottom)/2+")");var d=h(o.select(this),f,s);a.applyStyle(d,s.style);var p=d.node().getBBox();s.width=p.width,s.height=p.height}),a.applyTransition(u.exit(),e).style("opacity",0).remove(),u}var n=t("./lodash"),i=t("./label/add-label"),a=t("./util"),o=t("./d3");e.exports=r},{"./d3":8,"./label/add-label":19,"./lodash":22,"./util":28}],8:[function(t,e){e.exports=window.d3},{}],9:[function(t,e){var r;if(t)try{r=t("dagre")}catch(n){}r||(r=window.dagre),e.exports=r},{dagre:51}],10:[function(t,e){var r;if(t)try{r=t("graphlib")}catch(n){}r||(r=window.graphlib),e.exports=r},{graphlib:30}],11:[function(t,e){e.exports={node:t("./intersect-node"),circle:t("./intersect-circle"),ellipse:t("./intersect-ellipse"),polygon:t("./intersect-polygon"),rect:t("./intersect-rect")}},{"./intersect-circle":12,"./intersect-ellipse":13,"./intersect-node":15,"./intersect-polygon":16,"./intersect-rect":17}],12:[function(t,e){function r(t,e,r){return n(t,e,e,r)}var n=t("./intersect-ellipse");e.exports=r},{"./intersect-ellipse":13}],13:[function(t,e){function r(t,e,r,n){var i=t.x,a=t.y,o=i-n.x,s=a-n.y,u=Math.sqrt(e*e*s*s+r*r*o*o),c=Math.abs(e*r*o/u);n.x<i&&(c=-c);var l=Math.abs(e*r*s/u);return n.y<a&&(l=-l),{x:i+c,y:a+l}}e.exports=r},{}],14:[function(t,e){function r(t,e,r,i){var a,o,s,u,c,l,h,f,d,p,g,y,m,v,_;return 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,h=o*t.x+u*t.yy+l,f=o*e.x+u*e.y+l,0!==h&&0!==f&&n(h,f)||(g=a*u-o*s,0===g))?void 0:(y=Math.abs(g/2),m=s*l-u*c,v=0>m?(m-y)/g:(m+y)/g,m=o*c-a*l,_=0>m?(m-y)/g:(m+y)/g,{x:v,y:_})}function n(t,e){return t*e>0}e.exports=r},{}],15:[function(t,e){function r(t,e){return t.intersect(e)}e.exports=r},{}],16:[function(t,e){function r(t,e,r){var i=t.x,a=t.y,o=[],s=Number.POSITIVE_INFINITY,u=Number.POSITIVE_INFINITY;e.forEach(function(t){s=Math.min(s,t.x),u=Math.min(u,t.y)});for(var c=i-t.width/2-s,l=a-t.height/2-u,h=0;h<e.length;h++){var f=e[h],d=e[h<e.length-1?h+1:0],p=n(t,r,{x:c+f.x,y:l+f.y},{x:c+d.x,y:l+d.y});p&&o.push(p)}return o.length?(o.length>1&&o.sort(function(t,e){var n=t.x-r.x,i=t.y-r.y,a=Math.sqrt(n*n+i*i),o=e.x-r.x,s=e.y-r.y,u=Math.sqrt(o*o+s*s);return u>a?-1:a===u?0:1}),o[0]):(console.log("NO INTERSECTION FOUND, RETURN NODE CENTER",t),t)}var n=t("./intersect-line");e.exports=r},{"./intersect-line":14}],17:[function(t,e){function r(t,e){var r,n,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?(0>s&&(c=-c),r=0===s?0:c*o/s,n=c):(0>o&&(u=-u),r=u,n=0===o?0:u*s/o),{x:i+r,y:a+n}}e.exports=r},{}],18:[function(t,e){function r(t,e){var r=t.append("foreignObject").attr("width","100000"),i=r.append("xhtml:div"),a=e.label;switch(typeof a){case"function":i.insert(a);break;case"object":i.insert(function(){return a});break;default:i.html(a)}n.applyStyle(i,e.labelStyle),i.style("display","inline-block"),i.style("white-space","nowrap");var o,s;return i.each(function(){o=this.clientWidth,s=this.clientHeight}),r.attr("width",o).attr("height",s),r}var n=t("../util");e.exports=r},{"../util":28}],19:[function(t,e){function r(t,e,r){var o=e.label,s=t.append("g");"svg"===e.labelType?a(s,e):"string"!=typeof o||"html"===e.labelType?i(s,e):n(s,e);var u,c=s.node().getBBox();switch(r){case"top":u=-e.height/2;break;case"bottom":u=e.height/2-c.height;break;default:u=-c.height/2}return s.attr("transform","translate("+-c.width/2+","+u+")"),s}var n=t("./add-text-label"),i=t("./add-html-label"),a=t("./add-svg-label");e.exports=r},{"./add-html-label":18,"./add-svg-label":20,"./add-text-label":21}],20:[function(t,e){function r(t,e){var r=t;return r.node().appendChild(e.label),n.applyStyle(r,e.labelStyle),r}var n=t("../util");e.exports=r},{"../util":28}],21:[function(t,e){function r(t,e){for(var r=t.append("text"),a=n(e.label).split("\n"),o=0;o<a.length;o++)r.append("tspan").attr("xml:space","preserve").attr("dy","1em").attr("x","1").text(a[o]);return i.applyStyle(r,e.labelStyle),r}function n(t){for(var e,r="",n=!1,i=0;i<t.length;++i)if(e=t[i],n){switch(e){case"n":r+="\n";break;default:r+=e}n=!1}else"\\"===e?n=!0:r+=e;return r}var i=t("../util");e.exports=r},{"../util":28}],22:[function(t,e){var r;if(t)try{r=t("lodash")}catch(n){}r||(r=window._),e.exports=r},{lodash:50}],23:[function(t,e){"use strict";function r(t,e){function r(t){var r=e.node(t);return"translate("+r.x+","+r.y+")"}var a=t.filter(function(){return!i.select(this).classed("update")});a.attr("transform",r),n.applyTransition(t,e).style("opacity",1).attr("transform",r),n.applyTransition(a.selectAll("rect"),e).attr("width",function(t){return e.node(t).width}).attr("height",function(t){return e.node(t).height}).attr("x",function(t){var r=e.node(t);return-r.width/2}).attr("y",function(t){var r=e.node(t);return-r.height/2})}var n=t("./util"),i=t("./d3");e.exports=r},{"./d3":8,"./util":28}],24:[function(t,e){"use strict";function r(t,e){function r(t){var r=e.edge(t);return a.has(r,"x")?"translate("+r.x+","+r.y+")":""}var o=t.filter(function(){return!i.select(this).classed("update")});o.attr("transform",r),n.applyTransition(t,e).style("opacity",1).attr("transform",r)}var n=t("./util"),i=t("./d3"),a=t("./lodash");e.exports=r},{"./d3":8,"./lodash":22,"./util":28}],25:[function(t,e){"use strict";function r(t,e){function r(t){var r=e.node(t);return"translate("+r.x+","+r.y+")"}var a=t.filter(function(){return!i.select(this).classed("update")});a.attr("transform",r),n.applyTransition(t,e).style("opacity",1).attr("transform",r)}var n=t("./util"),i=t("./d3");e.exports=r},{"./d3":8,"./util":28}],26:[function(t,e){function r(){var e=t("./create-nodes"),r=t("./create-clusters"),o=t("./create-edge-labels"),u=t("./create-edge-paths"),c=t("./position-nodes"),l=t("./position-edge-labels"),h=t("./position-clusters"),f=t("./shapes"),d=t("./arrows"),p=function(t,p){n(p);var g=a(t,"output"),y=a(g,"clusters"),m=a(g,"edgePaths"),v=o(a(g,"edgeLabels"),p),_=e(a(g,"nodes"),p,f);s(p),c(_,p),l(v,p),u(m,p,d);var b=r(y,p);h(b,p),i(p)};return p.createNodes=function(t){return arguments.length?(e=t,p):e},p.createClusters=function(t){return arguments.length?(r=t,p):r},p.createEdgeLabels=function(t){return arguments.length?(o=t,p):o},p.createEdgePaths=function(t){return arguments.length?(u=t,p):u},p.shapes=function(t){return arguments.length?(f=t,p):f},p.arrows=function(t){return arguments.length?(d=t,p):d},p}function n(t){t.nodes().forEach(function(e){var r=t.node(e);o.has(r,"label")||t.children(e).length||(r.label=e),o.has(r,"paddingX")&&o.defaults(r,{paddingLeft:r.paddingX,paddingRight:r.paddingX}),o.has(r,"paddingY")&&o.defaults(r,{paddingTop:r.paddingY,paddingBottom:r.paddingY}),o.has(r,"padding")&&o.defaults(r,{paddingLeft:r.padding,paddingRight:r.padding,paddingTop:r.padding,paddingBottom:r.padding}),o.defaults(r,u),o.each(["paddingLeft","paddingRight","paddingTop","paddingBottom"],function(t){r[t]=Number(r[t])}),o.has(r,"width")&&(r._prevWidth=r.width),o.has(r,"height")&&(r._prevHeight=r.height)}),t.edges().forEach(function(e){var r=t.edge(e);o.has(r,"label")||(r.label=""),o.defaults(r,c)})}function i(t){o.each(t.nodes(),function(e){var r=t.node(e);o.has(r,"_prevWidth")?r.width=r._prevWidth:delete r.width,o.has(r,"_prevHeight")?r.height=r._prevHeight:delete r.height,delete r._prevWidth,delete r._prevHeight})}function a(t,e){var r=t.select("g."+e);return r.empty()&&(r=t.append("g").attr("class",e)),r}var o=t("./lodash"),s=t("./dagre").layout;e.exports=r;var u={paddingLeft:10,paddingRight:10,paddingTop:10,paddingBottom:10,rx:0,ry:0,shape:"rect"},c={arrowhead:"normal",lineInterpolate:"linear"}},{"./arrows":3,"./create-clusters":4,"./create-edge-labels":5,"./create-edge-paths":6,"./create-nodes":7,"./dagre":9,"./lodash":22,"./position-clusters":23,"./position-edge-labels":24,"./position-nodes":25,"./shapes":27}],27:[function(t,e){"use strict";function r(t,e,r){var n=t.insert("rect",":first-child").attr("rx",r.rx).attr("ry",r.ry).attr("x",-e.width/2).attr("y",-e.height/2).attr("width",e.width).attr("height",e.height);return r.intersect=function(t){return o(r,t)},n}function n(t,e,r){var n=e.width/2,i=e.height/2,a=t.insert("ellipse",":first-child").attr("x",-e.width/2).attr("y",-e.height/2).attr("rx",n).attr("ry",i);return r.intersect=function(t){return s(r,n,i,t)},a}function i(t,e,r){var n=Math.max(e.width,e.height)/2,i=t.insert("circle",":first-child").attr("x",-e.width/2).attr("y",-e.height/2).attr("r",n);return r.intersect=function(t){return u(r,n,t)},i}function a(t,e,r){var n=e.width*Math.SQRT2/2,i=e.height*Math.SQRT2/2,a=[{x:0,y:-i},{x:-n,y:0},{x:0,y:i},{x:n,y:0}],o=t.insert("polygon",":first-child").attr("points",a.map(function(t){return t.x+","+t.y}).join(" "));return r.intersect=function(t){return c(r,a,t)},o}var o=t("./intersect/intersect-rect"),s=t("./intersect/intersect-ellipse"),u=t("./intersect/intersect-circle"),c=t("./intersect/intersect-polygon");e.exports={rect:r,ellipse:n,circle:i,diamond:a}},{"./intersect/intersect-circle":12,"./intersect/intersect-ellipse":13,"./intersect/intersect-polygon":16,"./intersect/intersect-rect":17}],28:[function(t,e){function r(t,e){return!!t.children(e).length}function n(t){return i(t.v)+":"+i(t.w)+":"+i(t.name)}function i(t){return t?String(t).replace(c,"\\:"):""}function a(t,e){e&&t.attr("style",e)}function o(t,e,r){e&&t.attr("class",e).attr("class",r+" "+t.attr("class"))}function s(t,e){var r=e.graph();if(u.isPlainObject(r)){var n=r.transition;if(u.isFunction(n))return n(t)}return t}var u=t("./lodash");e.exports={isSubgraph:r,edgeToId:n,applyStyle:a,applyClass:o,applyTransition:s};var c=/:/g},{"./lodash":22}],29:[function(t,e){e.exports="0.4.10"},{}],30:[function(t,e){var r=t("./lib");e.exports={Graph:r.Graph,json:t("./lib/json"),alg:t("./lib/alg"),version:r.version}},{"./lib":46,"./lib/alg":37,"./lib/json":47}],31:[function(t,e){function r(t){function e(a){n.has(i,a)||(i[a]=!0,r.push(a),n.each(t.successors(a),e),n.each(t.predecessors(a),e))}var r,i={},a=[];return n.each(t.nodes(),function(t){r=[],e(t),r.length&&a.push(r)}),a}var n=t("../lodash");e.exports=r},{"../lodash":48}],32:[function(t,e){function r(t,e,r){i.isArray(e)||(e=[e]);var a=[],o={};return i.each(e,function(e){if(!t.hasNode(e))throw new Error("Graph does not have node: "+e);n(t,e,"post"===r,o,a)}),a}function n(t,e,r,a,o){i.has(a,e)||(a[e]=!0,r||o.push(e),i.each(t.neighbors(e),function(e){n(t,e,r,a,o)}),r&&o.push(e))}var i=t("../lodash");e.exports=r},{"../lodash":48}],33:[function(t,e){function r(t,e,r){return i.transform(t.nodes(),function(i,a){i[a]=n(t,a,e,r)},{})}var n=t("./dijkstra"),i=t("../lodash");e.exports=r},{"../lodash":48,"./dijkstra":34}],34:[function(t,e){function r(t,e,r,i){return n(t,String(e),r||o,i||function(e){return t.outEdges(e)})}function n(t,e,r,n){var i,o,s={},u=new a,c=function(t){var e=t.v!==i?t.v:t.w,n=s[e],a=r(t),c=o.distance+a;if(0>a)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+t+" Weight: "+a);c<n.distance&&(n.distance=c,n.predecessor=i,u.decrease(e,c))};for(t.nodes().forEach(function(t){var r=t===e?0:Number.POSITIVE_INFINITY;s[t]={distance:r},u.add(t,r)});u.size()>0&&(i=u.removeMin(),o=s[i],o.distance!==Number.POSITIVE_INFINITY);)n(i).forEach(c);return s}var i=t("../lodash"),a=t("../data/priority-queue");e.exports=r;var o=i.constant(1)},{"../data/priority-queue":44,"../lodash":48}],35:[function(t,e){function r(t){return n.filter(i(t),function(e){return e.length>1||1===e.length&&t.hasEdge(e[0],e[0])})}var n=t("../lodash"),i=t("./tarjan");e.exports=r},{"../lodash":48,"./tarjan":42}],36:[function(t,e){function r(t,e,r){return n(t,e||a,r||function(e){return t.outEdges(e)})}function n(t,e,r){var n={},i=t.nodes();return i.forEach(function(t){n[t]={},n[t][t]={distance:0},i.forEach(function(e){t!==e&&(n[t][e]={distance:Number.POSITIVE_INFINITY})}),r(t).forEach(function(r){var i=r.v===t?r.w:r.v,a=e(r);n[t][i]={distance:a,predecessor:t}})}),i.forEach(function(t){var e=n[t];i.forEach(function(r){var a=n[r];i.forEach(function(r){var n=a[t],i=e[r],o=a[r],s=n.distance+i.distance;s<o.distance&&(o.distance=s,o.predecessor=i.predecessor)})})}),n}var i=t("../lodash");e.exports=r;var a=i.constant(1)},{"../lodash":48}],37:[function(t,e){e.exports={components:t("./components"),dijkstra:t("./dijkstra"),dijkstraAll:t("./dijkstra-all"),findCycles:t("./find-cycles"),floydWarshall:t("./floyd-warshall"),isAcyclic:t("./is-acyclic"),postorder:t("./postorder"),preorder:t("./preorder"),prim:t("./prim"),tarjan:t("./tarjan"),topsort:t("./topsort")}},{"./components":31,"./dijkstra":34,"./dijkstra-all":33,"./find-cycles":35,"./floyd-warshall":36,"./is-acyclic":38,"./postorder":39,"./preorder":40,"./prim":41,"./tarjan":42,"./topsort":43}],38:[function(t,e){function r(t){try{n(t)}catch(e){if(e instanceof n.CycleException)return!1;throw e}return!0}var n=t("./topsort");e.exports=r},{"./topsort":43}],39:[function(t,e){function r(t,e){return n(t,e,"post")}var n=t("./dfs");e.exports=r},{"./dfs":32}],40:[function(t,e){function r(t,e){return n(t,e,"pre")}var n=t("./dfs");e.exports=r},{"./dfs":32}],41:[function(t,e){function r(t,e){function r(t){var r=t.v===o?t.w:t.v,n=c.priority(r);if(void 0!==n){var i=e(t);n>i&&(u[r]=o,c.decrease(r,i))}}var o,s=new i,u={},c=new a;if(0===t.nodeCount())return s;n.each(t.nodes(),function(t){c.add(t,Number.POSITIVE_INFINITY),s.setNode(t)}),c.decrease(t.nodes()[0],0);for(var l=!1;c.size()>0;){if(o=c.removeMin(),n.has(u,o))s.setEdge(o,u[o]);else{if(l)throw new Error("Input graph is not connected: "+t);l=!0}t.nodeEdges(o).forEach(r)}return s}var n=t("../lodash"),i=t("../graph"),a=t("../data/priority-queue");e.exports=r},{"../data/priority-queue":44,"../graph":45,"../lodash":48}],42:[function(t,e){function r(t){function e(s){var u=a[s]={onStack:!0,lowlink:r,index:r++};if(i.push(s),t.successors(s).forEach(function(t){n.has(a,t)?a[t].onStack&&(u.lowlink=Math.min(u.lowlink,a[t].index)):(e(t),u.lowlink=Math.min(u.lowlink,a[t].lowlink))}),u.lowlink===u.index){var c,l=[];do c=i.pop(),a[c].onStack=!1,l.push(c);while(s!==c);o.push(l)}}var r=0,i=[],a={},o=[];return t.nodes().forEach(function(t){n.has(a,t)||e(t)}),o}var n=t("../lodash");e.exports=r},{"../lodash":48}],43:[function(t,e){function r(t){function e(s){if(i.has(a,s))throw new n;i.has(r,s)||(a[s]=!0,r[s]=!0,i.each(t.predecessors(s),e),delete a[s],o.push(s))}var r={},a={},o=[];if(i.each(t.sinks(),e),i.size(r)!==t.nodeCount())throw new n;return o}function n(){}var i=t("../lodash");e.exports=r,r.CycleException=n},{"../lodash":48}],44:[function(t,e){function r(){this._arr=[],this._keyIndices={}}var n=t("../lodash");e.exports=r,r.prototype.size=function(){return this._arr.length},r.prototype.keys=function(){return this._arr.map(function(t){return t.key})},r.prototype.has=function(t){return n.has(this._keyIndices,t)},r.prototype.priority=function(t){var e=this._keyIndices[t];return void 0!==e?this._arr[e].priority:void 0},r.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},r.prototype.add=function(t,e){var r=this._keyIndices;if(t=String(t),!n.has(r,t)){var i=this._arr,a=i.length;return r[t]=a,i.push({key:t,priority:e}),this._decrease(a),!0}return!1},r.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},r.prototype.decrease=function(t,e){var r=this._keyIndices[t];if(e>this._arr[r].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[r].priority+" New: "+e);this._arr[r].priority=e,this._decrease(r)},r.prototype._heapify=function(t){var e=this._arr,r=2*t,n=r+1,i=t;r<e.length&&(i=e[r].priority<e[i].priority?r:i,n<e.length&&(i=e[n].priority<e[i].priority?n:i),i!==t&&(this._swap(t,i),this._heapify(i)))},r.prototype._decrease=function(t){for(var e,r=this._arr,n=r[t].priority;0!==t&&(e=t>>1,!(r[e].priority<n));)this._swap(t,e),t=e},r.prototype._swap=function(t,e){var r=this._arr,n=this._keyIndices,i=r[t],a=r[e];r[t]=a,r[e]=i,n[a.key]=t,n[i.key]=e}},{"../lodash":48}],45:[function(t,e){"use strict";function r(t){this._isDirected=u.has(t,"directed")?t.directed:!0,this._isMultigraph=u.has(t,"multigraph")?t.multigraph:!1,this._isCompound=u.has(t,"compound")?t.compound:!1,this._label=void 0,this._defaultNodeLabelFn=u.constant(void 0),this._defaultEdgeLabelFn=u.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[l]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function n(t,e){t[e]?t[e]++:t[e]=1}function i(t,e){--t[e]||delete t[e]}function a(t,e,r,n){var i=""+e,a=""+r;if(!t&&i>a){var o=i;i=a,a=o}return i+h+a+h+(u.isUndefined(n)?c:n)}function o(t,e,r,n){var i=""+e,a=""+r;if(!t&&i>a){var o=i;i=a,a=o}var s={v:i,w:a};return n&&(s.name=n),s}function s(t,e){return a(t,e.v,e.w,e.name)}var u=t("./lodash");e.exports=r;var c="\x00",l="\x00",h="";r.prototype._nodeCount=0,r.prototype._edgeCount=0,r.prototype.isDirected=function(){return this._isDirected},r.prototype.isMultigraph=function(){return this._isMultigraph},r.prototype.isCompound=function(){return this._isCompound},r.prototype.setGraph=function(t){return this._label=t,this},r.prototype.graph=function(){return this._label},r.prototype.setDefaultNodeLabel=function(t){return u.isFunction(t)||(t=u.constant(t)),this._defaultNodeLabelFn=t,this},r.prototype.nodeCount=function(){return this._nodeCount},r.prototype.nodes=function(){return u.keys(this._nodes)},r.prototype.sources=function(){return u.filter(this.nodes(),function(t){return u.isEmpty(this._in[t])},this)},r.prototype.sinks=function(){return u.filter(this.nodes(),function(t){return u.isEmpty(this._out[t])},this)},r.prototype.setNodes=function(t,e){var r=arguments;return u.each(t,function(t){r.length>1?this.setNode(t,e):this.setNode(t)},this),this},r.prototype.setNode=function(t,e){return u.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]=l,this._children[t]={},this._children[l][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)},r.prototype.node=function(t){return this._nodes[t]},r.prototype.hasNode=function(t){return u.has(this._nodes,t)},r.prototype.removeNode=function(t){var e=this;if(u.has(this._nodes,t)){var r=function(t){e.removeEdge(e._edgeObjs[t])};delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],u.each(this.children(t),function(t){this.setParent(t)},this),delete this._children[t]),u.each(u.keys(this._in[t]),r),delete this._in[t],delete this._preds[t],u.each(u.keys(this._out[t]),r),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this},r.prototype.setParent=function(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(u.isUndefined(e))e=l;else{e+="";for(var r=e;!u.isUndefined(r);r=this.parent(r))if(r===t)throw new Error("Setting "+e+" as parent of "+t+" would create create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this},r.prototype._removeFromParentsChildList=function(t){delete this._children[this._parent[t]][t]},r.prototype.parent=function(t){if(this._isCompound){var e=this._parent[t];if(e!==l)return e}},r.prototype.children=function(t){if(u.isUndefined(t)&&(t=l),this._isCompound){var e=this._children[t];if(e)return u.keys(e)}else{if(t===l)return this.nodes();if(this.hasNode(t))return[]}},r.prototype.predecessors=function(t){var e=this._preds[t];return e?u.keys(e):void 0},r.prototype.successors=function(t){var e=this._sucs[t];return e?u.keys(e):void 0},r.prototype.neighbors=function(t){var e=this.predecessors(t);return e?u.union(e,this.successors(t)):void 0},r.prototype.filterNodes=function(t){function e(t){var a=n.parent(t);return void 0===a||r.hasNode(a)?(i[t]=a,a):a in i?i[a]:e(a)}var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph()),u.each(this._nodes,function(e,n){t(n)&&r.setNode(n,e)},this),u.each(this._edgeObjs,function(t){r.hasNode(t.v)&&r.hasNode(t.w)&&r.setEdge(t,this.edge(t))},this);var n=this,i={};return this._isCompound&&u.each(r.nodes(),function(t){r.setParent(t,e(t))}),r},r.prototype.setDefaultEdgeLabel=function(t){return u.isFunction(t)||(t=u.constant(t)),this._defaultEdgeLabelFn=t,this},r.prototype.edgeCount=function(){return this._edgeCount},r.prototype.edges=function(){return u.values(this._edgeObjs)},r.prototype.setPath=function(t,e){var r=this,n=arguments;return u.reduce(t,function(t,i){return n.length>1?r.setEdge(t,i,e):r.setEdge(t,i),i}),this},r.prototype.setEdge=function(){var t,e,r,i,s=!1,c=arguments[0];"object"==typeof c&&null!==c&&"v"in c?(t=c.v,e=c.w,r=c.name,2===arguments.length&&(i=arguments[1],s=!0)):(t=c,e=arguments[1],r=arguments[3],arguments.length>2&&(i=arguments[2],s=!0)),t=""+t,e=""+e,u.isUndefined(r)||(r=""+r);var l=a(this._isDirected,t,e,r);if(u.has(this._edgeLabels,l))return s&&(this._edgeLabels[l]=i),this;if(!u.isUndefined(r)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[l]=s?i:this._defaultEdgeLabelFn(t,e,r);var h=o(this._isDirected,t,e,r);return t=h.v,e=h.w,Object.freeze(h),this._edgeObjs[l]=h,n(this._preds[e],t),n(this._sucs[t],e),this._in[e][l]=h,this._out[t][l]=h,this._edgeCount++,this},r.prototype.edge=function(t,e,r){var n=1===arguments.length?s(this._isDirected,arguments[0]):a(this._isDirected,t,e,r);return this._edgeLabels[n]},r.prototype.hasEdge=function(t,e,r){var n=1===arguments.length?s(this._isDirected,arguments[0]):a(this._isDirected,t,e,r);return u.has(this._edgeLabels,n)},r.prototype.removeEdge=function(t,e,r){var n=1===arguments.length?s(this._isDirected,arguments[0]):a(this._isDirected,t,e,r),o=this._edgeObjs[n];return o&&(t=o.v,e=o.w,delete this._edgeLabels[n],delete this._edgeObjs[n],i(this._preds[e],t),i(this._sucs[t],e),delete this._in[e][n],delete this._out[t][n],this._edgeCount--),this},r.prototype.inEdges=function(t,e){var r=this._in[t];if(r){var n=u.values(r);return e?u.filter(n,function(t){return t.v===e}):n}},r.prototype.outEdges=function(t,e){var r=this._out[t];if(r){var n=u.values(r);return e?u.filter(n,function(t){return t.w===e}):n}},r.prototype.nodeEdges=function(t,e){var r=this.inEdges(t,e);return r?r.concat(this.outEdges(t,e)):void 0}},{"./lodash":48}],46:[function(t,e){e.exports={Graph:t("./graph"),version:t("./version")}},{"./graph":45,"./version":49}],47:[function(t,e){function r(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:n(t),edges:i(t)};return o.isUndefined(t.graph())||(e.value=o.clone(t.graph())),e}function n(t){return o.map(t.nodes(),function(e){var r=t.node(e),n=t.parent(e),i={v:e};return o.isUndefined(r)||(i.value=r),o.isUndefined(n)||(i.parent=n),i})}function i(t){return o.map(t.edges(),function(e){var r=t.edge(e),n={v:e.v,w:e.w};return o.isUndefined(e.name)||(n.name=e.name),o.isUndefined(r)||(n.value=r),n})}function a(t){var e=new s(t.options).setGraph(t.value);return o.each(t.nodes,function(t){e.setNode(t.v,t.value),t.parent&&e.setParent(t.v,t.parent)}),o.each(t.edges,function(t){e.setEdge({v:t.v,w:t.w,name:t.name},t.value)}),e}var o=t("./lodash"),s=t("./graph");e.exports={write:r,read:a}},{"./graph":45,"./lodash":48}],48:[function(t,e){var r;if("function"==typeof t)try{r=t("lodash")}catch(n){}r||(r=window._),e.exports=r},{lodash:50}],49:[function(t,e){e.exports="1.0.7"},{}],50:[function(t,e,r){(function(t){(function(){function n(t,e){if(t!==e){var r=null===t,n=t===E,i=t===t,a=null===e,o=e===E,s=e===e;if(t>e&&!a||!i||r&&!o&&s||n&&s)return 1;if(e>t&&!r||!s||a&&!n&&i||o&&i)return-1}return 0}function i(t,e,r){for(var n=t.length,i=r?n:-1;r?i--:++i<n;)if(e(t[i],i,t))return i;return-1}function a(t,e,r){if(e!==e)return y(t,r);for(var n=r-1,i=t.length;++n<i;)if(t[n]===e)return n;return-1}function o(t){return"function"==typeof t||!1}function s(t){return null==t?"":t+""}function u(t,e){for(var r=-1,n=t.length;++r<n&&e.indexOf(t.charAt(r))>-1;);return r}function c(t,e){for(var r=t.length;r--&&e.indexOf(t.charAt(r))>-1;);return r}function l(t,e){return n(t.criteria,e.criteria)||t.index-e.index}function h(t,e,r){for(var i=-1,a=t.criteria,o=e.criteria,s=a.length,u=r.length;++i<s;){var c=n(a[i],o[i]);if(c){if(i>=u)return c;var l=r[i];return c*("asc"===l||l===!0?1:-1)}}return t.index-e.index}function f(t){return Vt[t]}function d(t){return Gt[t]}function p(t,e,r){return e?t=zt[t]:r&&(t=Zt[t]),"\\"+t}function g(t){return"\\"+Zt[t]}function y(t,e,r){for(var n=t.length,i=e+(r?0:-1);r?i--:++i<n;){var a=t[i];if(a!==a)return i}return-1}function m(t){return!!t&&"object"==typeof t}function v(t){return 160>=t&&t>=9&&13>=t||32==t||160==t||5760==t||6158==t||t>=8192&&(8202>=t||8232==t||8233==t||8239==t||8287==t||12288==t||65279==t)}function _(t,e){for(var r=-1,n=t.length,i=-1,a=[];++r<n;)t[r]===e&&(t[r]=V,a[++i]=r);return a}function b(t,e){for(var r,n=-1,i=t.length,a=-1,o=[];++n<i;){var s=t[n],u=e?e(s,n,t):s;n&&r===u||(r=u,o[++a]=s)}return o}function w(t){for(var e=-1,r=t.length;++e<r&&v(t.charCodeAt(e)););return e}function A(t){for(var e=t.length;e--&&v(t.charCodeAt(e)););return e}function x(t){return Wt[t]}function k(t){function e(t){if(m(t)&&!Ts(t)&&!(t instanceof K)){if(t instanceof v)return t;if(to.call(t,"__chain__")&&to.call(t,"__wrapped__"))return dn(t); }return new v(t)}function r(){}function v(t,e,r){this.__wrapped__=t,this.__actions__=r||[],this.__chain__=!!e}function K(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=So,this.__views__=[]}function et(){var t=new K(this.__wrapped__);return t.__actions__=te(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=te(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=te(this.__views__),t}function nt(){if(this.__filtered__){var t=new K(this);t.__dir__=-1,t.__filtered__=!0}else t=this.clone(),t.__dir__*=-1;return t}function Vt(){var t=this.__wrapped__.value(),e=this.__dir__,r=Ts(t),n=0>e,i=r?t.length:0,a=Gr(0,i,this.__views__),o=a.start,s=a.end,u=s-o,c=n?s:o-1,l=this.__iteratees__,h=l.length,f=0,d=xo(u,this.__takeCount__);if(!r||q>i||i==u&&d==u)return rr(n&&r?t.reverse():t,this.__actions__);var p=[];t:for(;u--&&d>f;){c+=e;for(var g=-1,y=t[c];++g<h;){var m=l[g],v=m.iteratee,_=m.type,b=v(y);if(_==Y)y=b;else if(!b){if(_==U)continue t;break t}}p[f++]=y}return p}function Gt(){this.__data__={}}function Wt(t){return this.has(t)&&delete this.__data__[t]}function Ht(t){return"__proto__"==t?E:this.__data__[t]}function zt(t){return"__proto__"!=t&&to.call(this.__data__,t)}function Zt(t,e){return"__proto__"!=t&&(this.__data__[t]=e),this}function Xt(t){var e=t?t.length:0;for(this.data={hash:mo(null),set:new lo};e--;)this.push(t[e])}function Kt(t,e){var r=t.data,n="string"==typeof e||Ii(e)?r.set.has(e):r.hash[e];return n?0:-1}function Jt(t){var e=this.data;"string"==typeof t||Ii(t)?e.set.add(t):e.hash[t]=!0}function Qt(t,e){for(var r=-1,n=t.length,i=-1,a=e.length,o=qa(n+a);++r<n;)o[r]=t[r];for(;++i<a;)o[r++]=e[i];return o}function te(t,e){var r=-1,n=t.length;for(e||(e=qa(n));++r<n;)e[r]=t[r];return e}function ee(t,e){for(var r=-1,n=t.length;++r<n&&e(t[r],r,t)!==!1;);return t}function ie(t,e){for(var r=t.length;r--&&e(t[r],r,t)!==!1;);return t}function ae(t,e){for(var r=-1,n=t.length;++r<n;)if(!e(t[r],r,t))return!1;return!0}function oe(t,e,r,n){for(var i=-1,a=t.length,o=n,s=o;++i<a;){var u=t[i],c=+e(u);r(c,o)&&(o=c,s=u)}return s}function se(t,e){for(var r=-1,n=t.length,i=-1,a=[];++r<n;){var o=t[r];e(o,r,t)&&(a[++i]=o)}return a}function ue(t,e){for(var r=-1,n=t.length,i=qa(n);++r<n;)i[r]=e(t[r],r,t);return i}function ce(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}function le(t,e,r,n){var i=-1,a=t.length;for(n&&a&&(r=t[++i]);++i<a;)r=e(r,t[i],i,t);return r}function he(t,e,r,n){var i=t.length;for(n&&i&&(r=t[--i]);i--;)r=e(r,t[i],i,t);return r}function fe(t,e){for(var r=-1,n=t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}function de(t,e){for(var r=t.length,n=0;r--;)n+=+e(t[r])||0;return n}function pe(t,e){return t===E?e:t}function ge(t,e,r,n){return t!==E&&to.call(n,r)?t:e}function ye(t,e,r){for(var n=-1,i=qs(e),a=i.length;++n<a;){var o=i[n],s=t[o],u=r(s,e[o],o,t,e);(u===u?u===s:s!==s)&&(s!==E||o in t)||(t[o]=u)}return t}function me(t,e){return null==e?t:_e(e,qs(e),t)}function ve(t,e){for(var r=-1,n=null==t,i=!n&&Xr(t),a=i?t.length:0,o=e.length,s=qa(o);++r<o;){var u=e[r];s[r]=i?Kr(u,a)?t[u]:E:n?E:t[u]}return s}function _e(t,e,r){r||(r={});for(var n=-1,i=e.length;++n<i;){var a=e[n];r[a]=t[a]}return r}function be(t,e,r){var n=typeof t;return"function"==n?e===E?t:ar(t,e,r):null==t?Ca:"object"==n?je(t):e===E?Oa(t):qe(t,e)}function we(t,e,r,n,i,a,o){var s;if(r&&(s=i?r(t,n,i):r(t)),s!==E)return s;if(!Ii(t))return t;var u=Ts(t);if(u){if(s=Wr(t),!e)return te(t,s)}else{var c=ro.call(t),l=c==X;if(c!=Q&&c!=G&&(!l||i))return $t[c]?zr(t,c,e):i?t:{};if(s=Hr(l?{}:t),!e)return me(s,t)}a||(a=[]),o||(o=[]);for(var h=a.length;h--;)if(a[h]==t)return o[h];return a.push(t),o.push(s),(u?ee:Be)(t,function(n,i){s[i]=we(n,e,r,i,t,a,o)}),s}function Ae(t,e,r){if("function"!=typeof t)throw new Za($);return ho(function(){t.apply(E,r)},e)}function xe(t,e){var r=t?t.length:0,n=[];if(!r)return n;var i=-1,o=Yr(),s=o==a,u=s&&e.length>=q?pr(e):null,c=e.length;u&&(o=Kt,s=!1,e=u);t:for(;++i<r;){var l=t[i];if(s&&l===l){for(var h=c;h--;)if(e[h]===l)continue t;n.push(l)}else o(e,l,0)<0&&n.push(l)}return n}function ke(t,e){var r=!0;return Mo(t,function(t,n,i){return r=!!e(t,n,i)}),r}function Ee(t,e,r,n){var i=n,a=i;return Mo(t,function(t,o,s){var u=+e(t,o,s);(r(u,i)||u===n&&u===a)&&(i=u,a=t)}),a}function De(t,e,r,n){var i=t.length;for(r=null==r?0:+r||0,0>r&&(r=-r>i?0:i+r),n=n===E||n>i?i:+n||0,0>n&&(n+=i),i=r>n?0:n>>>0,r>>>=0;i>r;)t[r++]=e;return t}function Ce(t,e){var r=[];return Mo(t,function(t,n,i){e(t,n,i)&&r.push(t)}),r}function Se(t,e,r,n){var i;return r(t,function(t,r,a){return e(t,r,a)?(i=n?r:t,!1):void 0}),i}function Te(t,e,r,n){n||(n=[]);for(var i=-1,a=t.length;++i<a;){var o=t[i];m(o)&&Xr(o)&&(r||Ts(o)||Ei(o))?e?Te(o,e,r,n):ce(n,o):r||(n[n.length]=o)}return n}function Fe(t,e){return Po(t,e,ta)}function Be(t,e){return Po(t,e,qs)}function Le(t,e){return jo(t,e,qs)}function Oe(t,e){for(var r=-1,n=e.length,i=-1,a=[];++r<n;){var o=e[r];Oi(t[o])&&(a[++i]=o)}return a}function Ie(t,e,r){if(null!=t){r!==E&&r in hn(t)&&(e=[r]);for(var n=0,i=e.length;null!=t&&i>n;)t=t[e[n++]];return n&&n==i?t:E}}function Re(t,e,r,n,i,a){return t===e?!0:null==t||null==e||!Ii(t)&&!m(e)?t!==t&&e!==e:Me(t,e,Re,r,n,i,a)}function Me(t,e,r,n,i,a,o){var s=Ts(t),u=Ts(e),c=W,l=W;s||(c=ro.call(t),c==G?c=Q:c!=Q&&(s=$i(t))),u||(l=ro.call(e),l==G?l=Q:l!=Q&&(u=$i(e)));var h=c==Q,f=l==Q,d=c==l;if(d&&!s&&!h)return Pr(t,e,c);if(!i){var p=h&&to.call(t,"__wrapped__"),g=f&&to.call(e,"__wrapped__");if(p||g)return r(p?t.value():t,g?e.value():e,n,i,a,o)}if(!d)return!1;a||(a=[]),o||(o=[]);for(var y=a.length;y--;)if(a[y]==t)return o[y]==e;a.push(t),o.push(e);var m=(s?Nr:jr)(t,e,r,n,i,a,o);return a.pop(),o.pop(),m}function Ne(t,e,r){var n=e.length,i=n,a=!r;if(null==t)return!i;for(t=hn(t);n--;){var o=e[n];if(a&&o[2]?o[1]!==t[o[0]]:!(o[0]in t))return!1}for(;++n<i;){o=e[n];var s=o[0],u=t[s],c=o[1];if(a&&o[2]){if(u===E&&!(s in t))return!1}else{var l=r?r(u,c,s):E;if(!(l===E?Re(c,u,r,!0):l))return!1}}return!0}function Pe(t,e){var r=-1,n=Xr(t)?qa(t.length):[];return Mo(t,function(t,i,a){n[++r]=e(t,i,a)}),n}function je(t){var e=$r(t);if(1==e.length&&e[0][2]){var r=e[0][0],n=e[0][1];return function(t){return null==t?!1:t[r]===n&&(n!==E||r in hn(t))}}return function(t){return Ne(t,e)}}function qe(t,e){var r=Ts(t),n=Qr(t)&&rn(e),i=t+"";return t=fn(t),function(a){if(null==a)return!1;var o=i;if(a=hn(a),!(!r&&n||o in a)){if(a=1==t.length?a:Ie(a,ze(t,0,-1)),null==a)return!1;o=Dn(t),a=hn(a)}return a[o]===e?e!==E||o in a:Re(e,a[o],E,!0)}}function Ue(t,e,r,n,i){if(!Ii(t))return t;var a=Xr(e)&&(Ts(e)||$i(e)),o=a?E:qs(e);return ee(o||e,function(s,u){if(o&&(u=s,s=e[u]),m(s))n||(n=[]),i||(i=[]),Ye(t,e,u,Ue,r,n,i);else{var c=t[u],l=r?r(c,s,u,t,e):E,h=l===E;h&&(l=s),l===E&&(!a||u in t)||!h&&(l===l?l===c:c!==c)||(t[u]=l)}}),t}function Ye(t,e,r,n,i,a,o){for(var s=a.length,u=e[r];s--;)if(a[s]==u)return void(t[r]=o[s]);var c=t[r],l=i?i(c,u,r,t,e):E,h=l===E;h&&(l=u,Xr(u)&&(Ts(u)||$i(u))?l=Ts(c)?c:Xr(c)?te(c):[]:qi(u)||Ei(u)?l=Ei(c)?zi(c):qi(c)?c:{}:h=!1),a.push(u),o.push(l),h?t[r]=n(l,u,i,a,o):(l===l?l!==c:c===c)&&(t[r]=l)}function $e(t){return function(e){return null==e?E:e[t]}}function Ve(t){var e=t+"";return t=fn(t),function(r){return Ie(r,t,e)}}function Ge(t,e){for(var r=t?e.length:0;r--;){var n=e[r];if(n!=i&&Kr(n)){var i=n;fo.call(t,n,1)}}return t}function We(t,e){return t+vo(Do()*(e-t+1))}function He(t,e,r,n,i){return i(t,function(t,i,a){r=n?(n=!1,t):e(r,t,i,a)}),r}function ze(t,e,r){var n=-1,i=t.length;e=null==e?0:+e||0,0>e&&(e=-e>i?0:i+e),r=r===E||r>i?i:+r||0,0>r&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;for(var a=qa(i);++n<i;)a[n]=t[n+e];return a}function Ze(t,e){var r;return Mo(t,function(t,n,i){return r=e(t,n,i),!r}),!!r}function Xe(t,e){var r=t.length;for(t.sort(e);r--;)t[r]=t[r].value;return t}function Ke(t,e,r){var n=qr(),i=-1;e=ue(e,function(t){return n(t)});var a=Pe(t,function(t){var r=ue(e,function(e){return e(t)});return{criteria:r,index:++i,value:t}});return Xe(a,function(t,e){return h(t,e,r)})}function Je(t,e){var r=0;return Mo(t,function(t,n,i){r+=+e(t,n,i)||0}),r}function Qe(t,e){var r=-1,n=Yr(),i=t.length,o=n==a,s=o&&i>=q,u=s?pr():null,c=[];u?(n=Kt,o=!1):(s=!1,u=e?[]:c);t:for(;++r<i;){var l=t[r],h=e?e(l,r,t):l;if(o&&l===l){for(var f=u.length;f--;)if(u[f]===h)continue t;e&&u.push(h),c.push(l)}else n(u,h,0)<0&&((e||s)&&u.push(h),c.push(l))}return c}function tr(t,e){for(var r=-1,n=e.length,i=qa(n);++r<n;)i[r]=t[e[r]];return i}function er(t,e,r,n){for(var i=t.length,a=n?i:-1;(n?a--:++a<i)&&e(t[a],a,t););return r?ze(t,n?0:a,n?a+1:i):ze(t,n?a+1:0,n?i:a)}function rr(t,e){var r=t;r instanceof K&&(r=r.value());for(var n=-1,i=e.length;++n<i;){var a=e[n];r=a.func.apply(a.thisArg,ce([r],a.args))}return r}function nr(t,e,r){var n=0,i=t?t.length:n;if("number"==typeof e&&e===e&&Bo>=i){for(;i>n;){var a=n+i>>>1,o=t[a];(r?e>=o:e>o)&&null!==o?n=a+1:i=a}return i}return ir(t,e,Ca,r)}function ir(t,e,r,n){e=r(e);for(var i=0,a=t?t.length:0,o=e!==e,s=null===e,u=e===E;a>i;){var c=vo((i+a)/2),l=r(t[c]),h=l!==E,f=l===l;if(o)var d=f||n;else d=s?f&&h&&(n||null!=l):u?f&&(n||h):null==l?!1:n?e>=l:e>l;d?i=c+1:a=c}return xo(a,Fo)}function ar(t,e,r){if("function"!=typeof t)return Ca;if(e===E)return t;switch(r){case 1:return function(r){return t.call(e,r)};case 3:return function(r,n,i){return t.call(e,r,n,i)};case 4:return function(r,n,i,a){return t.call(e,r,n,i,a)};case 5:return function(r,n,i,a,o){return t.call(e,r,n,i,a,o)}}return function(){return t.apply(e,arguments)}}function or(t){var e=new ao(t.byteLength),r=new po(e);return r.set(new po(t)),e}function sr(t,e,r){for(var n=r.length,i=-1,a=Ao(t.length-n,0),o=-1,s=e.length,u=qa(s+a);++o<s;)u[o]=e[o];for(;++i<n;)u[r[i]]=t[i];for(;a--;)u[o++]=t[i++];return u}function ur(t,e,r){for(var n=-1,i=r.length,a=-1,o=Ao(t.length-i,0),s=-1,u=e.length,c=qa(o+u);++a<o;)c[a]=t[a];for(var l=a;++s<u;)c[l+s]=e[s];for(;++n<i;)c[l+r[n]]=t[a++];return c}function cr(t,e){return function(r,n,i){var a=e?e():{};if(n=qr(n,i,3),Ts(r))for(var o=-1,s=r.length;++o<s;){var u=r[o];t(a,u,n(u,o,r),r)}else Mo(r,function(e,r,i){t(a,e,n(e,r,i),i)});return a}}function lr(t){return mi(function(e,r){var n=-1,i=null==e?0:r.length,a=i>2?r[i-2]:E,o=i>2?r[2]:E,s=i>1?r[i-1]:E;for("function"==typeof a?(a=ar(a,s,5),i-=2):(a="function"==typeof s?s:E,i-=a?1:0),o&&Jr(r[0],r[1],o)&&(a=3>i?E:a,i=1);++n<i;){var u=r[n];u&&t(e,u,a)}return e})}function hr(t,e){return function(r,n){var i=r?Yo(r):0;if(!en(i))return t(r,n);for(var a=e?i:-1,o=hn(r);(e?a--:++a<i)&&n(o[a],a,o)!==!1;);return r}}function fr(t){return function(e,r,n){for(var i=hn(e),a=n(e),o=a.length,s=t?o:-1;t?s--:++s<o;){var u=a[s];if(r(i[u],u,i)===!1)break}return e}}function dr(t,e){function r(){var i=this&&this!==re&&this instanceof r?n:t;return i.apply(e,arguments)}var n=yr(t);return r}function pr(t){return mo&&lo?new Xt(t):null}function gr(t){return function(e){for(var r=-1,n=ka(la(e)),i=n.length,a="";++r<i;)a=t(a,n[r],r);return a}}function yr(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var r=Ro(t.prototype),n=t.apply(r,e);return Ii(n)?n:r}}function mr(t){function e(r,n,i){i&&Jr(r,n,i)&&(n=E);var a=Mr(r,t,E,E,E,E,E,n);return a.placeholder=e.placeholder,a}return e}function vr(t,e){return mi(function(r){var n=r[0];return null==n?n:(r.push(e),t.apply(E,r))})}function _r(t,e){return function(r,n,i){if(i&&Jr(r,n,i)&&(n=E),n=qr(n,i,3),1==n.length){r=Ts(r)?r:ln(r);var a=oe(r,n,t,e);if(!r.length||a!==e)return a}return Ee(r,n,t,e)}}function br(t,e){return function(r,n,a){if(n=qr(n,a,3),Ts(r)){var o=i(r,n,e);return o>-1?r[o]:E}return Se(r,n,t)}}function wr(t){return function(e,r,n){return e&&e.length?(r=qr(r,n,3),i(e,r,t)):-1}}function Ar(t){return function(e,r,n){return r=qr(r,n,3),Se(e,r,t,!0)}}function xr(t){return function(){for(var e,r=arguments.length,n=t?r:-1,i=0,a=qa(r);t?n--:++n<r;){var o=a[i++]=arguments[n];if("function"!=typeof o)throw new Za($);!e&&v.prototype.thru&&"wrapper"==Ur(o)&&(e=new v([],!0))}for(n=e?-1:r;++n<r;){o=a[n];var s=Ur(o),u="wrapper"==s?Uo(o):E;e=u&&tn(u[0])&&u[1]==(I|F|L|R)&&!u[4].length&&1==u[9]?e[Ur(u[0])].apply(e,u[3]):1==o.length&&tn(o)?e[s]():e.thru(o)}return function(){var t=arguments,n=t[0];if(e&&1==t.length&&Ts(n)&&n.length>=q)return e.plant(n).value();for(var i=0,o=r?a[i].apply(this,t):n;++i<r;)o=a[i].call(this,o);return o}}}function kr(t,e){return function(r,n,i){return"function"==typeof n&&i===E&&Ts(r)?t(r,n):e(r,ar(n,i,3))}}function Er(t){return function(e,r,n){return("function"!=typeof r||n!==E)&&(r=ar(r,n,3)),t(e,r,ta)}}function Dr(t){return function(e,r,n){return("function"!=typeof r||n!==E)&&(r=ar(r,n,3)),t(e,r)}}function Cr(t){return function(e,r,n){var i={};return r=qr(r,n,3),Be(e,function(e,n,a){var o=r(e,n,a);n=t?o:n,e=t?e:o,i[n]=e}),i}}function Sr(t){return function(e,r,n){return e=s(e),(t?e:"")+Lr(e,r,n)+(t?"":e)}}function Tr(t){var e=mi(function(r,n){var i=_(n,e.placeholder);return Mr(r,t,E,n,i)});return e}function Fr(t,e){return function(r,n,i,a){var o=arguments.length<3;return"function"==typeof n&&a===E&&Ts(r)?t(r,n,i,o):He(r,qr(n,a,4),i,o,e)}}function Br(t,e,r,n,i,a,o,s,u,c){function l(){for(var v=arguments.length,b=v,w=qa(v);b--;)w[b]=arguments[b];if(n&&(w=sr(w,n,i)),a&&(w=ur(w,a,o)),p||y){var A=l.placeholder,x=_(w,A);if(v-=x.length,c>v){var k=s?te(s):E,D=Ao(c-v,0),T=p?x:E,F=p?E:x,B=p?w:E,I=p?E:w;e|=p?L:O,e&=~(p?O:L),g||(e&=~(C|S));var R=[t,e,r,B,T,I,F,k,u,D],M=Br.apply(E,R);return tn(t)&&$o(M,R),M.placeholder=A,M}}var N=f?r:this,P=d?N[t]:t;return s&&(w=un(w,s)),h&&u<w.length&&(w.length=u),this&&this!==re&&this instanceof l&&(P=m||yr(t)),P.apply(N,w)}var h=e&I,f=e&C,d=e&S,p=e&F,g=e&T,y=e&B,m=d?E:yr(t);return l}function Lr(t,e,r){var n=t.length;if(e=+e,n>=e||!bo(e))return"";var i=e-n;return r=null==r?" ":r+"",ya(r,yo(i/r.length)).slice(0,i)}function Or(t,e,r,n){function i(){for(var e=-1,s=arguments.length,u=-1,c=n.length,l=qa(c+s);++u<c;)l[u]=n[u];for(;s--;)l[u++]=arguments[++e];var h=this&&this!==re&&this instanceof i?o:t;return h.apply(a?r:this,l)}var a=e&C,o=yr(t);return i}function Ir(t){var e=Va[t];return function(t,r){return r=r===E?0:+r||0,r?(r=uo(10,r),e(t*r)/r):e(t)}}function Rr(t){return function(e,r,n,i){var a=qr(n);return null==n&&a===be?nr(e,r,t):ir(e,r,a(n,i,1),t)}}function Mr(t,e,r,n,i,a,o,s){var u=e&S;if(!u&&"function"!=typeof t)throw new Za($);var c=n?n.length:0;if(c||(e&=~(L|O),n=i=E),c-=i?i.length:0,e&O){var l=n,h=i;n=i=E}var f=u?E:Uo(t),d=[t,e,r,n,i,l,h,a,o,s];if(f&&(nn(d,f),e=d[1],s=d[9]),d[9]=null==s?u?0:t.length:Ao(s-c,0)||0,e==C)var p=dr(d[0],d[2]);else p=e!=L&&e!=(C|L)||d[4].length?Br.apply(E,d):Or.apply(E,d);var g=f?qo:$o;return g(p,d)}function Nr(t,e,r,n,i,a,o){var s=-1,u=t.length,c=e.length;if(u!=c&&!(i&&c>u))return!1;for(;++s<u;){var l=t[s],h=e[s],f=n?n(i?h:l,i?l:h,s):E;if(f!==E){if(f)continue;return!1}if(i){if(!fe(e,function(t){return l===t||r(l,t,n,i,a,o)}))return!1}else if(l!==h&&!r(l,h,n,i,a,o))return!1}return!0}function Pr(t,e,r){switch(r){case H:case z:return+t==+e;case Z:return t.name==e.name&&t.message==e.message;case J:return t!=+t?e!=+e:t==+e;case tt:case rt:return t==e+""}return!1}function jr(t,e,r,n,i,a,o){var s=qs(t),u=s.length,c=qs(e),l=c.length;if(u!=l&&!i)return!1;for(var h=u;h--;){var f=s[h];if(!(i?f in e:to.call(e,f)))return!1}for(var d=i;++h<u;){f=s[h];var p=t[f],g=e[f],y=n?n(i?g:p,i?p:g,f):E;if(!(y===E?r(p,g,n,i,a,o):y))return!1;d||(d="constructor"==f)}if(!d){var m=t.constructor,v=e.constructor;if(m!=v&&"constructor"in t&&"constructor"in e&&!("function"==typeof m&&m instanceof m&&"function"==typeof v&&v instanceof v))return!1}return!0}function qr(t,r,n){var i=e.callback||Ea;return i=i===Ea?be:i,n?i(t,r,n):i}function Ur(t){for(var e=t.name,r=Io[e],n=r?r.length:0;n--;){var i=r[n],a=i.func;if(null==a||a==t)return i.name}return e}function Yr(t,r,n){var i=e.indexOf||kn;return i=i===kn?a:i,t?i(t,r,n):i}function $r(t){for(var e=ea(t),r=e.length;r--;)e[r][2]=rn(e[r][1]);return e}function Vr(t,e){var r=null==t?E:t[e];return Ni(r)?r:E}function Gr(t,e,r){for(var n=-1,i=r.length;++n<i;){var a=r[n],o=a.size;switch(a.type){case"drop":t+=o;break;case"dropRight":e-=o;break;case"take":e=xo(e,t+o);break;case"takeRight":t=Ao(t,e-o)}}return{start:t,end:e}}function Wr(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&to.call(t,"index")&&(r.index=t.index,r.input=t.input),r}function Hr(t){var e=t.constructor;return"function"==typeof e&&e instanceof e||(e=Wa),new e}function zr(t,e,r){var n=t.constructor;switch(e){case it:return or(t);case H:case z:return new n(+t);case at:case ot:case st:case ut:case ct:case lt:case ht:case ft:case dt:var i=t.buffer;return new n(r?or(i):i,t.byteOffset,t.length);case J:case rt:return new n(t);case tt:var a=new n(t.source,Lt.exec(t));a.lastIndex=t.lastIndex}return a}function Zr(t,e,r){null==t||Qr(e,t)||(e=fn(e),t=1==e.length?t:Ie(t,ze(e,0,-1)),e=Dn(e));var n=null==t?t:t[e];return null==n?E:n.apply(t,r)}function Xr(t){return null!=t&&en(Yo(t))}function Kr(t,e){return t="number"==typeof t||Rt.test(t)?+t:-1,e=null==e?Lo:e,t>-1&&t%1==0&&e>t}function Jr(t,e,r){if(!Ii(r))return!1;var n=typeof e;if("number"==n?Xr(r)&&Kr(e,r.length):"string"==n&&e in r){var i=r[e];return t===t?t===i:i!==i}return!1}function Qr(t,e){var r=typeof t;if("string"==r&&Et.test(t)||"number"==r)return!0;if(Ts(t))return!1;var n=!kt.test(t);return n||null!=e&&t in hn(e)}function tn(t){var r=Ur(t);if(!(r in K.prototype))return!1;var n=e[r];if(t===n)return!0;var i=Uo(n);return!!i&&t===i[0]}function en(t){return"number"==typeof t&&t>-1&&t%1==0&&Lo>=t}function rn(t){return t===t&&!Ii(t)}function nn(t,e){var r=t[1],n=e[1],i=r|n,a=I>i,o=n==I&&r==F||n==I&&r==R&&t[7].length<=e[8]||n==(I|R)&&r==F;if(!a&&!o)return t;n&C&&(t[2]=e[2],i|=r&C?0:T);var s=e[3];if(s){var u=t[3];t[3]=u?sr(u,s,e[4]):te(s),t[4]=u?_(t[3],V):te(e[4])}return s=e[5],s&&(u=t[5],t[5]=u?ur(u,s,e[6]):te(s),t[6]=u?_(t[5],V):te(e[6])),s=e[7],s&&(t[7]=te(s)),n&I&&(t[8]=null==t[8]?e[8]:xo(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i,t}function an(t,e){return t===E?e:Fs(t,e,an)}function on(t,e){t=hn(t);for(var r=-1,n=e.length,i={};++r<n;){var a=e[r];a in t&&(i[a]=t[a])}return i}function sn(t,e){var r={};return Fe(t,function(t,n,i){e(t,n,i)&&(r[n]=t)}),r}function un(t,e){for(var r=t.length,n=xo(e.length,r),i=te(t);n--;){var a=e[n];t[n]=Kr(a,r)?i[a]:E}return t}function cn(t){for(var e=ta(t),r=e.length,n=r&&t.length,i=!!n&&en(n)&&(Ts(t)||Ei(t)),a=-1,o=[];++a<r;){var s=e[a];(i&&Kr(s,n)||to.call(t,s))&&o.push(s)}return o}function ln(t){return null==t?[]:Xr(t)?Ii(t)?t:Wa(t):aa(t)}function hn(t){return Ii(t)?t:Wa(t)}function fn(t){if(Ts(t))return t;var e=[];return s(t).replace(Dt,function(t,r,n,i){e.push(n?i.replace(Ft,"$1"):r||t)}),e}function dn(t){return t instanceof K?t.clone():new v(t.__wrapped__,t.__chain__,te(t.__actions__))}function pn(t,e,r){e=(r?Jr(t,e,r):null==e)?1:Ao(vo(e)||1,1);for(var n=0,i=t?t.length:0,a=-1,o=qa(yo(i/e));i>n;)o[++a]=ze(t,n,n+=e);return o}function gn(t){for(var e=-1,r=t?t.length:0,n=-1,i=[];++e<r;){var a=t[e];a&&(i[++n]=a)}return i}function yn(t,e,r){var n=t?t.length:0;return n?((r?Jr(t,e,r):null==e)&&(e=1),ze(t,0>e?0:e)):[]}function mn(t,e,r){var n=t?t.length:0;return n?((r?Jr(t,e,r):null==e)&&(e=1),e=n-(+e||0),ze(t,0,0>e?0:e)):[]}function vn(t,e,r){return t&&t.length?er(t,qr(e,r,3),!0,!0):[]}function _n(t,e,r){return t&&t.length?er(t,qr(e,r,3),!0):[]}function bn(t,e,r,n){var i=t?t.length:0;return i?(r&&"number"!=typeof r&&Jr(t,e,r)&&(r=0,n=i),De(t,e,r,n)):[]}function wn(t){return t?t[0]:E}function An(t,e,r){var n=t?t.length:0;return r&&Jr(t,e,r)&&(e=!1),n?Te(t,e):[]}function xn(t){var e=t?t.length:0;return e?Te(t,!0):[]}function kn(t,e,r){var n=t?t.length:0;if(!n)return-1;if("number"==typeof r)r=0>r?Ao(n+r,0):r;else if(r){var i=nr(t,e);return n>i&&(e===e?e===t[i]:t[i]!==t[i])?i:-1}return a(t,e,r||0)}function En(t){return mn(t,1)}function Dn(t){var e=t?t.length:0;return e?t[e-1]:E}function Cn(t,e,r){var n=t?t.length:0;if(!n)return-1;var i=n;if("number"==typeof r)i=(0>r?Ao(n+r,0):xo(r||0,n-1))+1;else if(r){i=nr(t,e,!0)-1;var a=t[i];return(e===e?e===a:a!==a)?i:-1}if(e!==e)return y(t,i,!0);for(;i--;)if(t[i]===e)return i;return-1}function Sn(){var t=arguments,e=t[0];if(!e||!e.length)return e;for(var r=0,n=Yr(),i=t.length;++r<i;)for(var a=0,o=t[r];(a=n(e,o,a))>-1;)fo.call(e,a,1);return e}function Tn(t,e,r){var n=[];if(!t||!t.length)return n;var i=-1,a=[],o=t.length;for(e=qr(e,r,3);++i<o;){var s=t[i];e(s,i,t)&&(n.push(s),a.push(i))}return Ge(t,a),n}function Fn(t){return yn(t,1)}function Bn(t,e,r){var n=t?t.length:0;return n?(r&&"number"!=typeof r&&Jr(t,e,r)&&(e=0,r=n),ze(t,e,r)):[]}function Ln(t,e,r){var n=t?t.length:0;return n?((r?Jr(t,e,r):null==e)&&(e=1),ze(t,0,0>e?0:e)):[]}function On(t,e,r){var n=t?t.length:0;return n?((r?Jr(t,e,r):null==e)&&(e=1),e=n-(+e||0),ze(t,0>e?0:e)):[]}function In(t,e,r){return t&&t.length?er(t,qr(e,r,3),!1,!0):[]}function Rn(t,e,r){return t&&t.length?er(t,qr(e,r,3)):[]}function Mn(t,e,r,n){var i=t?t.length:0;if(!i)return[];null!=e&&"boolean"!=typeof e&&(n=r,r=Jr(t,e,n)?E:e,e=!1);var o=qr();return(null!=r||o!==be)&&(r=o(r,n,3)),e&&Yr()==a?b(t,r):Qe(t,r)}function Nn(t){if(!t||!t.length)return[];var e=-1,r=0;t=se(t,function(t){return Xr(t)?(r=Ao(t.length,r),!0):void 0});for(var n=qa(r);++e<r;)n[e]=ue(t,$e(e));return n}function Pn(t,e,r){var n=t?t.length:0;if(!n)return[];var i=Nn(t);return null==e?i:(e=ar(e,r,4),ue(i,function(t){return le(t,e,E,!0)}))}function jn(){for(var t=-1,e=arguments.length;++t<e;){var r=arguments[t];if(Xr(r))var n=n?ce(xe(n,r),xe(r,n)):r}return n?Qe(n):[]}function qn(t,e){var r=-1,n=t?t.length:0,i={};for(!n||e||Ts(t[0])||(e=[]);++r<n;){var a=t[r];e?i[a]=e[r]:a&&(i[a[0]]=a[1])}return i}function Un(t){var r=e(t);return r.__chain__=!0,r}function Yn(t,e,r){return e.call(r,t),t}function $n(t,e,r){return e.call(r,t)}function Vn(){return Un(this)}function Gn(){return new v(this.value(),this.__chain__)}function Wn(t){for(var e,n=this;n instanceof r;){var i=dn(n);e?a.__wrapped__=i:e=i;var a=i;n=n.__wrapped__}return a.__wrapped__=t,e}function Hn(){var t=this.__wrapped__,e=function(t){return r&&r.__dir__<0?t:t.reverse()};if(t instanceof K){var r=t;return this.__actions__.length&&(r=new K(this)),r=r.reverse(),r.__actions__.push({func:$n,args:[e],thisArg:E}),new v(r,this.__chain__)}return this.thru(e)}function zn(){return this.value()+""}function Zn(){return rr(this.__wrapped__,this.__actions__)}function Xn(t,e,r){var n=Ts(t)?ae:ke;return r&&Jr(t,e,r)&&(e=E),("function"!=typeof e||r!==E)&&(e=qr(e,r,3)),n(t,e)}function Kn(t,e,r){var n=Ts(t)?se:Ce;return e=qr(e,r,3),n(t,e)}function Jn(t,e){return is(t,je(e))}function Qn(t,e,r,n){var i=t?Yo(t):0;return en(i)||(t=aa(t),i=t.length),r="number"!=typeof r||n&&Jr(e,r,n)?0:0>r?Ao(i+r,0):r||0,"string"==typeof t||!Ts(t)&&Yi(t)?i>=r&&t.indexOf(e,r)>-1:!!i&&Yr(t,e,r)>-1}function ti(t,e,r){var n=Ts(t)?ue:Pe;return e=qr(e,r,3),n(t,e)}function ei(t,e){return ti(t,Oa(e))}function ri(t,e,r){var n=Ts(t)?se:Ce;return e=qr(e,r,3),n(t,function(t,r,n){return!e(t,r,n)})}function ni(t,e,r){if(r?Jr(t,e,r):null==e){t=ln(t);var n=t.length;return n>0?t[We(0,n-1)]:E}var i=-1,a=Hi(t),n=a.length,o=n-1;for(e=xo(0>e?0:+e||0,n);++i<e;){var s=We(i,o),u=a[s];a[s]=a[i],a[i]=u}return a.length=e,a}function ii(t){return ni(t,So)}function ai(t){var e=t?Yo(t):0;return en(e)?e:qs(t).length}function oi(t,e,r){var n=Ts(t)?fe:Ze;return r&&Jr(t,e,r)&&(e=E),("function"!=typeof e||r!==E)&&(e=qr(e,r,3)),n(t,e)}function si(t,e,r){if(null==t)return[];r&&Jr(t,e,r)&&(e=E);var n=-1;e=qr(e,r,3);var i=Pe(t,function(t,r,i){return{criteria:e(t,r,i),index:++n,value:t}});return Xe(i,l)}function ui(t,e,r,n){return null==t?[]:(n&&Jr(e,r,n)&&(r=E),Ts(e)||(e=null==e?[]:[e]),Ts(r)||(r=null==r?[]:[r]),Ke(t,e,r))}function ci(t,e){return Kn(t,je(e))}function li(t,e){if("function"!=typeof e){if("function"!=typeof t)throw new Za($);var r=t;t=e,e=r}return t=bo(t=+t)?t:0,function(){return--t<1?e.apply(this,arguments):void 0}}function hi(t,e,r){return r&&Jr(t,e,r)&&(e=E),e=t&&null==e?t.length:Ao(+e||0,0),Mr(t,I,E,E,E,E,e)}function fi(t,e){var r;if("function"!=typeof e){if("function"!=typeof t)throw new Za($);var n=t;t=e,e=n}return function(){return--t>0&&(r=e.apply(this,arguments)),1>=t&&(e=E),r}}function di(t,e,r){function n(){d&&oo(d),c&&oo(c),g=0,c=d=p=E}function i(e,r){r&&oo(r),c=d=p=E,e&&(g=gs(),l=t.apply(f,u),d||c||(u=f=E))}function a(){var t=e-(gs()-h);0>=t||t>e?i(p,c):d=ho(a,t)}function o(){i(m,d)}function s(){if(u=arguments,h=gs(),f=this,p=m&&(d||!v),y===!1)var r=v&&!d;else{c||v||(g=h);var n=y-(h-g),i=0>=n||n>y;i?(c&&(c=oo(c)),g=h,l=t.apply(f,u)):c||(c=ho(o,n))}return i&&d?d=oo(d):d||e===y||(d=ho(a,e)),r&&(i=!0,l=t.apply(f,u)),!i||d||c||(u=f=E),l}var u,c,l,h,f,d,p,g=0,y=!1,m=!0;if("function"!=typeof t)throw new Za($);if(e=0>e?0:+e||0,r===!0){var v=!0;m=!1}else Ii(r)&&(v=!!r.leading,y="maxWait"in r&&Ao(+r.maxWait||0,e),m="trailing"in r?!!r.trailing:m);return s.cancel=n,s}function pi(t,e){if("function"!=typeof t||e&&"function"!=typeof e)throw new Za($);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var o=t.apply(this,n);return r.cache=a.set(i,o),o};return r.cache=new pi.Cache,r}function gi(t){if("function"!=typeof t)throw new Za($);return function(){return!t.apply(this,arguments)}}function yi(t){return fi(2,t)}function mi(t,e){if("function"!=typeof t)throw new Za($);return e=Ao(e===E?t.length-1:+e||0,0),function(){for(var r=arguments,n=-1,i=Ao(r.length-e,0),a=qa(i);++n<i;)a[n]=r[e+n];switch(e){case 0:return t.call(this,a);case 1:return t.call(this,r[0],a);case 2:return t.call(this,r[0],r[1],a)}var o=qa(e+1);for(n=-1;++n<e;)o[n]=r[n];return o[e]=a,t.apply(this,o)}}function vi(t){if("function"!=typeof t)throw new Za($);return function(e){return t.apply(this,e)}}function _i(t,e,r){var n=!0,i=!0;if("function"!=typeof t)throw new Za($);return r===!1?n=!1:Ii(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),di(t,e,{leading:n,maxWait:+e,trailing:i})}function bi(t,e){return e=null==e?Ca:e,Mr(e,L,E,[t],[])}function wi(t,e,r,n){return e&&"boolean"!=typeof e&&Jr(t,e,r)?e=!1:"function"==typeof e&&(n=r,r=e,e=!1),"function"==typeof r?we(t,e,ar(r,n,1)):we(t,e)}function Ai(t,e,r){return"function"==typeof e?we(t,!0,ar(e,r,1)):we(t,!0)}function xi(t,e){return t>e}function ki(t,e){return t>=e}function Ei(t){return m(t)&&Xr(t)&&to.call(t,"callee")&&!co.call(t,"callee")}function Di(t){return t===!0||t===!1||m(t)&&ro.call(t)==H}function Ci(t){return m(t)&&ro.call(t)==z}function Si(t){return!!t&&1===t.nodeType&&m(t)&&!qi(t)}function Ti(t){return null==t?!0:Xr(t)&&(Ts(t)||Yi(t)||Ei(t)||m(t)&&Oi(t.splice))?!t.length:!qs(t).length}function Fi(t,e,r,n){r="function"==typeof r?ar(r,n,3):E;var i=r?r(t,e):E;return i===E?Re(t,e,r):!!i}function Bi(t){return m(t)&&"string"==typeof t.message&&ro.call(t)==Z}function Li(t){return"number"==typeof t&&bo(t)}function Oi(t){return Ii(t)&&ro.call(t)==X}function Ii(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function Ri(t,e,r,n){return r="function"==typeof r?ar(r,n,3):E,Ne(t,$r(e),r)}function Mi(t){return ji(t)&&t!=+t}function Ni(t){return null==t?!1:Oi(t)?io.test(Qa.call(t)):m(t)&&It.test(t)}function Pi(t){return null===t}function ji(t){return"number"==typeof t||m(t)&&ro.call(t)==J}function qi(t){var e;if(!m(t)||ro.call(t)!=Q||Ei(t)||!to.call(t,"constructor")&&(e=t.constructor,"function"==typeof e&&!(e instanceof e)))return!1;var r;return Fe(t,function(t,e){r=e}),r===E||to.call(t,r)}function Ui(t){return Ii(t)&&ro.call(t)==tt}function Yi(t){return"string"==typeof t||m(t)&&ro.call(t)==rt}function $i(t){return m(t)&&en(t.length)&&!!Yt[ro.call(t)]}function Vi(t){return t===E}function Gi(t,e){return e>t}function Wi(t,e){return e>=t}function Hi(t){var e=t?Yo(t):0;return en(e)?e?te(t):[]:aa(t)}function zi(t){return _e(t,ta(t))}function Zi(t,e,r){var n=Ro(t);return r&&Jr(t,e,r)&&(e=E),e?me(n,e):n}function Xi(t){return Oe(t,ta(t))}function Ki(t,e,r){var n=null==t?E:Ie(t,fn(e),e+"");return n===E?r:n}function Ji(t,e){if(null==t)return!1;var r=to.call(t,e);if(!r&&!Qr(e)){if(e=fn(e),t=1==e.length?t:Ie(t,ze(e,0,-1)),null==t)return!1;e=Dn(e),r=to.call(t,e)}return r||en(t.length)&&Kr(e,t.length)&&(Ts(t)||Ei(t))}function Qi(t,e,r){r&&Jr(t,e,r)&&(e=E);for(var n=-1,i=qs(t),a=i.length,o={};++n<a;){var s=i[n],u=t[s];e?to.call(o,u)?o[u].push(s):o[u]=[s]:o[u]=s}return o}function ta(t){if(null==t)return[];Ii(t)||(t=Wa(t));var e=t.length;e=e&&en(e)&&(Ts(t)||Ei(t))&&e||0;for(var r=t.constructor,n=-1,i="function"==typeof r&&r.prototype===t,a=qa(e),o=e>0;++n<e;)a[n]=n+"";for(var s in t)o&&Kr(s,e)||"constructor"==s&&(i||!to.call(t,s))||a.push(s);return a}function ea(t){t=hn(t);for(var e=-1,r=qs(t),n=r.length,i=qa(n);++e<n;){var a=r[e];i[e]=[a,t[a]]}return i}function ra(t,e,r){var n=null==t?E:t[e];return n===E&&(null==t||Qr(e,t)||(e=fn(e),t=1==e.length?t:Ie(t,ze(e,0,-1)),n=null==t?E:t[Dn(e)]),n=n===E?r:n),Oi(n)?n.call(t):n}function na(t,e,r){if(null==t)return t;var n=e+"";e=null!=t[n]||Qr(e,t)?[n]:fn(e);for(var i=-1,a=e.length,o=a-1,s=t;null!=s&&++i<a;){var u=e[i];Ii(s)&&(i==o?s[u]=r:null==s[u]&&(s[u]=Kr(e[i+1])?[]:{})),s=s[u]}return t}function ia(t,e,r,n){var i=Ts(t)||$i(t);if(e=qr(e,n,4),null==r)if(i||Ii(t)){var a=t.constructor;r=i?Ts(t)?new a:[]:Ro(Oi(a)?a.prototype:E)}else r={};return(i?ee:Be)(t,function(t,n,i){return e(r,t,n,i)}),r}function aa(t){return tr(t,qs(t))}function oa(t){return tr(t,ta(t))}function sa(t,e,r){return e=+e||0,r===E?(r=e,e=0):r=+r||0,t>=xo(e,r)&&t<Ao(e,r)}function ua(t,e,r){r&&Jr(t,e,r)&&(e=r=E);var n=null==t,i=null==e;if(null==r&&(i&&"boolean"==typeof t?(r=t,t=1):"boolean"==typeof e&&(r=e,i=!0)),n&&i&&(e=1,i=!1),t=+t||0,i?(e=t,t=0):e=+e||0,r||t%1||e%1){var a=Do();return xo(t+a*(e-t+so("1e-"+((a+"").length-1))),e)}return We(t,e)}function ca(t){return t=s(t),t&&t.charAt(0).toUpperCase()+t.slice(1)}function la(t){return t=s(t),t&&t.replace(Mt,f).replace(Tt,"")}function ha(t,e,r){t=s(t),e+="";var n=t.length;return r=r===E?n:xo(0>r?0:+r||0,n),r-=e.length,r>=0&&t.indexOf(e,r)==r}function fa(t){return t=s(t),t&&bt.test(t)?t.replace(vt,d):t}function da(t){return t=s(t),t&&St.test(t)?t.replace(Ct,p):t||"(?:)"}function pa(t,e,r){t=s(t),e=+e;var n=t.length;if(n>=e||!bo(e))return t;var i=(e-n)/2,a=vo(i),o=yo(i);return r=Lr("",o,r),r.slice(0,a)+t+r}function ga(t,e,r){return(r?Jr(t,e,r):null==e)?e=0:e&&(e=+e),t=_a(t),Eo(t,e||(Ot.test(t)?16:10))}function ya(t,e){var r="";if(t=s(t),e=+e,1>e||!t||!bo(e))return r;do e%2&&(r+=t),e=vo(e/2),t+=t;while(e);return r}function ma(t,e,r){return t=s(t),r=null==r?0:xo(0>r?0:+r||0,t.length),t.lastIndexOf(e,r)==r}function va(t,r,n){var i=e.templateSettings;n&&Jr(t,r,n)&&(r=n=E),t=s(t),r=ye(me({},n||r),i,ge);var a,o,u=ye(me({},r.imports),i.imports,ge),c=qs(u),l=tr(u,c),h=0,f=r.interpolate||Nt,d="__p += '",p=Ha((r.escape||Nt).source+"|"+f.source+"|"+(f===xt?Bt:Nt).source+"|"+(r.evaluate||Nt).source+"|$","g"),y="//# sourceURL="+("sourceURL"in r?r.sourceURL:"lodash.templateSources["+ ++Ut+"]")+"\n";t.replace(p,function(e,r,n,i,s,u){return n||(n=i),d+=t.slice(h,u).replace(Pt,g),r&&(a=!0,d+="' +\n__e("+r+") +\n'"),s&&(o=!0,d+="';\n"+s+";\n__p += '"),n&&(d+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),h=u+e.length,e}),d+="';\n";var m=r.variable;m||(d="with (obj) {\n"+d+"\n}\n"),d=(o?d.replace(pt,""):d).replace(gt,"$1").replace(yt,"$1;"),d="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(a?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var v=Ks(function(){return $a(c,y+"return "+d).apply(E,l)});if(v.source=d,Bi(v))throw v;return v}function _a(t,e,r){var n=t;return(t=s(t))?(r?Jr(n,e,r):null==e)?t.slice(w(t),A(t)+1):(e+="", t.slice(u(t,e),c(t,e)+1)):t}function ba(t,e,r){var n=t;return t=s(t),t?t.slice((r?Jr(n,e,r):null==e)?w(t):u(t,e+"")):t}function wa(t,e,r){var n=t;return t=s(t),t?(r?Jr(n,e,r):null==e)?t.slice(0,A(t)+1):t.slice(0,c(t,e+"")+1):t}function Aa(t,e,r){r&&Jr(t,e,r)&&(e=E);var n=M,i=N;if(null!=e)if(Ii(e)){var a="separator"in e?e.separator:a;n="length"in e?+e.length||0:n,i="omission"in e?s(e.omission):i}else n=+e||0;if(t=s(t),n>=t.length)return t;var o=n-i.length;if(1>o)return i;var u=t.slice(0,o);if(null==a)return u+i;if(Ui(a)){if(t.slice(o).search(a)){var c,l,h=t.slice(0,o);for(a.global||(a=Ha(a.source,(Lt.exec(a)||"")+"g")),a.lastIndex=0;c=a.exec(h);)l=c.index;u=u.slice(0,null==l?o:l)}}else if(t.indexOf(a,o)!=o){var f=u.lastIndexOf(a);f>-1&&(u=u.slice(0,f))}return u+i}function xa(t){return t=s(t),t&&_t.test(t)?t.replace(mt,x):t}function ka(t,e,r){return r&&Jr(t,e,r)&&(e=E),t=s(t),t.match(e||jt)||[]}function Ea(t,e,r){return r&&Jr(t,e,r)&&(e=E),m(t)?Sa(t):be(t,e)}function Da(t){return function(){return t}}function Ca(t){return t}function Sa(t){return je(we(t,!0))}function Ta(t,e){return qe(t,we(e,!0))}function Fa(t,e,r){if(null==r){var n=Ii(e),i=n?qs(e):E,a=i&&i.length?Oe(e,i):E;(a?a.length:n)||(a=!1,r=e,e=t,t=this)}a||(a=Oe(e,qs(e)));var o=!0,s=-1,u=Oi(t),c=a.length;r===!1?o=!1:Ii(r)&&"chain"in r&&(o=r.chain);for(;++s<c;){var l=a[s],h=e[l];t[l]=h,u&&(t.prototype[l]=function(e){return function(){var r=this.__chain__;if(o||r){var n=t(this.__wrapped__),i=n.__actions__=te(this.__actions__);return i.push({func:e,args:arguments,thisArg:t}),n.__chain__=r,n}return e.apply(t,ce([this.value()],arguments))}}(h))}return t}function Ba(){return re._=no,this}function La(){}function Oa(t){return Qr(t)?$e(t):Ve(t)}function Ia(t){return function(e){return Ie(t,fn(e),e+"")}}function Ra(t,e,r){r&&Jr(t,e,r)&&(e=r=E),t=+t||0,r=null==r?1:+r||0,null==e?(e=t,t=0):e=+e||0;for(var n=-1,i=Ao(yo((e-t)/(r||1)),0),a=qa(i);++n<i;)a[n]=t,t+=r;return a}function Ma(t,e,r){if(t=vo(t),1>t||!bo(t))return[];var n=-1,i=qa(xo(t,To));for(e=ar(e,r,1);++n<t;)To>n?i[n]=e(n):e(n);return i}function Na(t){var e=++eo;return s(t)+e}function Pa(t,e){return(+t||0)+(+e||0)}function ja(t,e,r){return r&&Jr(t,e,r)&&(e=E),e=qr(e,r,3),1==e.length?de(Ts(t)?t:ln(t),e):Je(t,e)}t=t?ne.defaults(re.Object(),t,ne.pick(re,qt)):re;{var qa=t.Array,Ua=t.Date,Ya=t.Error,$a=t.Function,Va=t.Math,Ga=t.Number,Wa=t.Object,Ha=t.RegExp,za=t.String,Za=t.TypeError,Xa=qa.prototype,Ka=Wa.prototype,Ja=za.prototype,Qa=$a.prototype.toString,to=Ka.hasOwnProperty,eo=0,ro=Ka.toString,no=re._,io=Ha("^"+Qa.call(to).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ao=t.ArrayBuffer,oo=t.clearTimeout,so=t.parseFloat,uo=Va.pow,co=Ka.propertyIsEnumerable,lo=Vr(t,"Set"),ho=t.setTimeout,fo=Xa.splice,po=t.Uint8Array,go=Vr(t,"WeakMap"),yo=Va.ceil,mo=Vr(Wa,"create"),vo=Va.floor,_o=Vr(qa,"isArray"),bo=t.isFinite,wo=Vr(Wa,"keys"),Ao=Va.max,xo=Va.min,ko=Vr(Ua,"now"),Eo=t.parseInt,Do=Va.random,Co=Ga.NEGATIVE_INFINITY,So=Ga.POSITIVE_INFINITY,To=4294967295,Fo=To-1,Bo=To>>>1,Lo=9007199254740991,Oo=go&&new go,Io={};e.support={}}e.templateSettings={escape:wt,evaluate:At,interpolate:xt,variable:"",imports:{_:e}};var Ro=function(){function t(){}return function(e){if(Ii(e)){t.prototype=e;var r=new t;t.prototype=E}return r||{}}}(),Mo=hr(Be),No=hr(Le,!0),Po=fr(),jo=fr(!0),qo=Oo?function(t,e){return Oo.set(t,e),t}:Ca,Uo=Oo?function(t){return Oo.get(t)}:La,Yo=$e("length"),$o=function(){var t=0,e=0;return function(r,n){var i=gs(),a=j-(i-e);if(e=i,a>0){if(++t>=P)return r}else t=0;return qo(r,n)}}(),Vo=mi(function(t,e){return m(t)&&Xr(t)?xe(t,Te(e,!1,!0)):[]}),Go=wr(),Wo=wr(!0),Ho=mi(function(t){for(var e=t.length,r=e,n=qa(h),i=Yr(),o=i==a,s=[];r--;){var u=t[r]=Xr(u=t[r])?u:[];n[r]=o&&u.length>=120?pr(r&&u):null}var c=t[0],l=-1,h=c?c.length:0,f=n[0];t:for(;++l<h;)if(u=c[l],(f?Kt(f,u):i(s,u,0))<0){for(var r=e;--r;){var d=n[r];if((d?Kt(d,u):i(t[r],u,0))<0)continue t}f&&f.push(u),s.push(u)}return s}),zo=mi(function(t,e){e=Te(e);var r=ve(t,e);return Ge(t,e.sort(n)),r}),Zo=Rr(),Xo=Rr(!0),Ko=mi(function(t){return Qe(Te(t,!1,!0))}),Jo=mi(function(t,e){return Xr(t)?xe(t,e):[]}),Qo=mi(Nn),ts=mi(function(t){var e=t.length,r=e>2?t[e-2]:E,n=e>1?t[e-1]:E;return e>2&&"function"==typeof r?e-=2:(r=e>1&&"function"==typeof n?(--e,n):E,n=E),t.length=e,Pn(t,r,n)}),es=mi(function(t){return t=Te(t),this.thru(function(e){return Qt(Ts(e)?e:[hn(e)],t)})}),rs=mi(function(t,e){return ve(t,Te(e))}),ns=cr(function(t,e,r){to.call(t,r)?++t[r]:t[r]=1}),is=br(Mo),as=br(No,!0),os=kr(ee,Mo),ss=kr(ie,No),us=cr(function(t,e,r){to.call(t,r)?t[r].push(e):t[r]=[e]}),cs=cr(function(t,e,r){t[r]=e}),ls=mi(function(t,e,r){var n=-1,i="function"==typeof e,a=Qr(e),o=Xr(t)?qa(t.length):[];return Mo(t,function(t){var s=i?e:a&&null!=t?t[e]:E;o[++n]=s?s.apply(t,r):Zr(t,e,r)}),o}),hs=cr(function(t,e,r){t[r?0:1].push(e)},function(){return[[],[]]}),fs=Fr(le,Mo),ds=Fr(he,No),ps=mi(function(t,e){if(null==t)return[];var r=e[2];return r&&Jr(e[0],e[1],r)&&(e.length=1),Ke(t,Te(e),[])}),gs=ko||function(){return(new Ua).getTime()},ys=mi(function(t,e,r){var n=C;if(r.length){var i=_(r,ys.placeholder);n|=L}return Mr(t,n,e,r,i)}),ms=mi(function(t,e){e=e.length?Te(e):Xi(t);for(var r=-1,n=e.length;++r<n;){var i=e[r];t[i]=Mr(t[i],C,t)}return t}),vs=mi(function(t,e,r){var n=C|S;if(r.length){var i=_(r,vs.placeholder);n|=L}return Mr(e,n,t,r,i)}),_s=mr(F),bs=mr(B),ws=mi(function(t,e){return Ae(t,1,e)}),As=mi(function(t,e,r){return Ae(t,e,r)}),xs=xr(),ks=xr(!0),Es=mi(function(t,e){if(e=Te(e),"function"!=typeof t||!ae(e,o))throw new Za($);var r=e.length;return mi(function(n){for(var i=xo(n.length,r);i--;)n[i]=e[i](n[i]);return t.apply(this,n)})}),Ds=Tr(L),Cs=Tr(O),Ss=mi(function(t,e){return Mr(t,R,E,E,E,Te(e))}),Ts=_o||function(t){return m(t)&&en(t.length)&&ro.call(t)==W},Fs=lr(Ue),Bs=lr(function(t,e,r){return r?ye(t,e,r):me(t,e)}),Ls=vr(Bs,pe),Os=vr(Fs,an),Is=Ar(Be),Rs=Ar(Le),Ms=Er(Po),Ns=Er(jo),Ps=Dr(Be),js=Dr(Le),qs=wo?function(t){var e=null==t?E:t.constructor;return"function"==typeof e&&e.prototype===t||"function"!=typeof t&&Xr(t)?cn(t):Ii(t)?wo(t):[]}:cn,Us=Cr(!0),Ys=Cr(),$s=mi(function(t,e){if(null==t)return{};if("function"!=typeof e[0]){var e=ue(Te(e),za);return on(t,xe(ta(t),e))}var r=ar(e[0],e[1],3);return sn(t,function(t,e,n){return!r(t,e,n)})}),Vs=mi(function(t,e){return null==t?{}:"function"==typeof e[0]?sn(t,ar(e[0],e[1],3)):on(t,Te(e))}),Gs=gr(function(t,e,r){return e=e.toLowerCase(),t+(r?e.charAt(0).toUpperCase()+e.slice(1):e)}),Ws=gr(function(t,e,r){return t+(r?"-":"")+e.toLowerCase()}),Hs=Sr(),zs=Sr(!0),Zs=gr(function(t,e,r){return t+(r?"_":"")+e.toLowerCase()}),Xs=gr(function(t,e,r){return t+(r?" ":"")+(e.charAt(0).toUpperCase()+e.slice(1))}),Ks=mi(function(t,e){try{return t.apply(E,e)}catch(r){return Bi(r)?r:new Ya(r)}}),Js=mi(function(t,e){return function(r){return Zr(r,t,e)}}),Qs=mi(function(t,e){return function(r){return Zr(t,r,e)}}),tu=Ir("ceil"),eu=Ir("floor"),ru=_r(xi,Co),nu=_r(Gi,So),iu=Ir("round");return e.prototype=r.prototype,v.prototype=Ro(r.prototype),v.prototype.constructor=v,K.prototype=Ro(r.prototype),K.prototype.constructor=K,Gt.prototype["delete"]=Wt,Gt.prototype.get=Ht,Gt.prototype.has=zt,Gt.prototype.set=Zt,Xt.prototype.push=Jt,pi.Cache=Gt,e.after=li,e.ary=hi,e.assign=Bs,e.at=rs,e.before=fi,e.bind=ys,e.bindAll=ms,e.bindKey=vs,e.callback=Ea,e.chain=Un,e.chunk=pn,e.compact=gn,e.constant=Da,e.countBy=ns,e.create=Zi,e.curry=_s,e.curryRight=bs,e.debounce=di,e.defaults=Ls,e.defaultsDeep=Os,e.defer=ws,e.delay=As,e.difference=Vo,e.drop=yn,e.dropRight=mn,e.dropRightWhile=vn,e.dropWhile=_n,e.fill=bn,e.filter=Kn,e.flatten=An,e.flattenDeep=xn,e.flow=xs,e.flowRight=ks,e.forEach=os,e.forEachRight=ss,e.forIn=Ms,e.forInRight=Ns,e.forOwn=Ps,e.forOwnRight=js,e.functions=Xi,e.groupBy=us,e.indexBy=cs,e.initial=En,e.intersection=Ho,e.invert=Qi,e.invoke=ls,e.keys=qs,e.keysIn=ta,e.map=ti,e.mapKeys=Us,e.mapValues=Ys,e.matches=Sa,e.matchesProperty=Ta,e.memoize=pi,e.merge=Fs,e.method=Js,e.methodOf=Qs,e.mixin=Fa,e.modArgs=Es,e.negate=gi,e.omit=$s,e.once=yi,e.pairs=ea,e.partial=Ds,e.partialRight=Cs,e.partition=hs,e.pick=Vs,e.pluck=ei,e.property=Oa,e.propertyOf=Ia,e.pull=Sn,e.pullAt=zo,e.range=Ra,e.rearg=Ss,e.reject=ri,e.remove=Tn,e.rest=Fn,e.restParam=mi,e.set=na,e.shuffle=ii,e.slice=Bn,e.sortBy=si,e.sortByAll=ps,e.sortByOrder=ui,e.spread=vi,e.take=Ln,e.takeRight=On,e.takeRightWhile=In,e.takeWhile=Rn,e.tap=Yn,e.throttle=_i,e.thru=$n,e.times=Ma,e.toArray=Hi,e.toPlainObject=zi,e.transform=ia,e.union=Ko,e.uniq=Mn,e.unzip=Nn,e.unzipWith=Pn,e.values=aa,e.valuesIn=oa,e.where=ci,e.without=Jo,e.wrap=bi,e.xor=jn,e.zip=Qo,e.zipObject=qn,e.zipWith=ts,e.backflow=ks,e.collect=ti,e.compose=ks,e.each=os,e.eachRight=ss,e.extend=Bs,e.iteratee=Ea,e.methods=Xi,e.object=qn,e.select=Kn,e.tail=Fn,e.unique=Mn,Fa(e,e),e.add=Pa,e.attempt=Ks,e.camelCase=Gs,e.capitalize=ca,e.ceil=tu,e.clone=wi,e.cloneDeep=Ai,e.deburr=la,e.endsWith=ha,e.escape=fa,e.escapeRegExp=da,e.every=Xn,e.find=is,e.findIndex=Go,e.findKey=Is,e.findLast=as,e.findLastIndex=Wo,e.findLastKey=Rs,e.findWhere=Jn,e.first=wn,e.floor=eu,e.get=Ki,e.gt=xi,e.gte=ki,e.has=Ji,e.identity=Ca,e.includes=Qn,e.indexOf=kn,e.inRange=sa,e.isArguments=Ei,e.isArray=Ts,e.isBoolean=Di,e.isDate=Ci,e.isElement=Si,e.isEmpty=Ti,e.isEqual=Fi,e.isError=Bi,e.isFinite=Li,e.isFunction=Oi,e.isMatch=Ri,e.isNaN=Mi,e.isNative=Ni,e.isNull=Pi,e.isNumber=ji,e.isObject=Ii,e.isPlainObject=qi,e.isRegExp=Ui,e.isString=Yi,e.isTypedArray=$i,e.isUndefined=Vi,e.kebabCase=Ws,e.last=Dn,e.lastIndexOf=Cn,e.lt=Gi,e.lte=Wi,e.max=ru,e.min=nu,e.noConflict=Ba,e.noop=La,e.now=gs,e.pad=pa,e.padLeft=Hs,e.padRight=zs,e.parseInt=ga,e.random=ua,e.reduce=fs,e.reduceRight=ds,e.repeat=ya,e.result=ra,e.round=iu,e.runInContext=k,e.size=ai,e.snakeCase=Zs,e.some=oi,e.sortedIndex=Zo,e.sortedLastIndex=Xo,e.startCase=Xs,e.startsWith=ma,e.sum=ja,e.template=va,e.trim=_a,e.trimLeft=ba,e.trimRight=wa,e.trunc=Aa,e.unescape=xa,e.uniqueId=Na,e.words=ka,e.all=Xn,e.any=oi,e.contains=Qn,e.eq=Fi,e.detect=is,e.foldl=fs,e.foldr=ds,e.head=wn,e.include=Qn,e.inject=fs,Fa(e,function(){var t={};return Be(e,function(r,n){e.prototype[n]||(t[n]=r)}),t}(),!1),e.sample=ni,e.prototype.sample=function(t){return this.__chain__||null!=t?this.thru(function(e){return ni(e,t)}):ni(this.value())},e.VERSION=D,ee(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){e[t].placeholder=e}),ee(["drop","take"],function(t,e){K.prototype[t]=function(r){var n=this.__filtered__;if(n&&!e)return new K(this);r=null==r?1:Ao(vo(r)||0,0);var i=this.clone();return n?i.__takeCount__=xo(i.__takeCount__,r):i.__views__.push({size:r,type:t+(i.__dir__<0?"Right":"")}),i},K.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}}),ee(["filter","map","takeWhile"],function(t,e){var r=e+1,n=r!=Y;K.prototype[t]=function(t,e){var i=this.clone();return i.__iteratees__.push({iteratee:qr(t,e,1),type:r}),i.__filtered__=i.__filtered__||n,i}}),ee(["first","last"],function(t,e){var r="take"+(e?"Right":"");K.prototype[t]=function(){return this[r](1).value()[0]}}),ee(["initial","rest"],function(t,e){var r="drop"+(e?"":"Right");K.prototype[t]=function(){return this.__filtered__?new K(this):this[r](1)}}),ee(["pluck","where"],function(t,e){var r=e?"filter":"map",n=e?je:Oa;K.prototype[t]=function(t){return this[r](n(t))}}),K.prototype.compact=function(){return this.filter(Ca)},K.prototype.reject=function(t,e){return t=qr(t,e,1),this.filter(function(e){return!t(e)})},K.prototype.slice=function(t,e){t=null==t?0:+t||0;var r=this;return r.__filtered__&&(t>0||0>e)?new K(r):(0>t?r=r.takeRight(-t):t&&(r=r.drop(t)),e!==E&&(e=+e||0,r=0>e?r.dropRight(-e):r.take(e-t)),r)},K.prototype.takeRightWhile=function(t,e){return this.reverse().takeWhile(t,e).reverse()},K.prototype.toArray=function(){return this.take(So)},Be(K.prototype,function(t,r){var n=/^(?:filter|map|reject)|While$/.test(r),i=/^(?:first|last)$/.test(r),a=e[i?"take"+("last"==r?"Right":""):r];a&&(e.prototype[r]=function(){var e=i?[1]:arguments,r=this.__chain__,o=this.__wrapped__,s=!!this.__actions__.length,u=o instanceof K,c=e[0],l=u||Ts(o);l&&n&&"function"==typeof c&&1!=c.length&&(u=l=!1);var h=function(t){return i&&r?a(t,1)[0]:a.apply(E,ce([t],e))},f={func:$n,args:[h],thisArg:E},d=u&&!s;if(i&&!r)return d?(o=o.clone(),o.__actions__.push(f),t.call(o)):a.call(E,this.value())[0];if(!i&&l){o=d?o:new K(this);var p=t.apply(o,e);return p.__actions__.push(f),new v(p,r)}return this.thru(h)})}),ee(["join","pop","push","replace","shift","sort","splice","split","unshift"],function(t){var r=(/^(?:replace|split)$/.test(t)?Ja:Xa)[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",i=/^(?:join|pop|replace|shift)$/.test(t);e.prototype[t]=function(){var t=arguments;return i&&!this.__chain__?r.apply(this.value(),t):this[n](function(e){return r.apply(e,t)})}}),Be(K.prototype,function(t,r){var n=e[r];if(n){var i=n.name,a=Io[i]||(Io[i]=[]);a.push({name:r,func:n})}}),Io[Br(E,S).name]=[{name:"wrapper",func:E}],K.prototype.clone=et,K.prototype.reverse=nt,K.prototype.value=Vt,e.prototype.chain=Vn,e.prototype.commit=Gn,e.prototype.concat=es,e.prototype.plant=Wn,e.prototype.reverse=Hn,e.prototype.toString=zn,e.prototype.run=e.prototype.toJSON=e.prototype.valueOf=e.prototype.value=Zn,e.prototype.collect=e.prototype.map,e.prototype.head=e.prototype.first,e.prototype.select=e.prototype.filter,e.prototype.tail=e.prototype.rest,e}var E,D="3.10.1",C=1,S=2,T=4,F=8,B=16,L=32,O=64,I=128,R=256,M=30,N="...",P=150,j=16,q=200,U=1,Y=2,$="Expected a function",V="__lodash_placeholder__",G="[object Arguments]",W="[object Array]",H="[object Boolean]",z="[object Date]",Z="[object Error]",X="[object Function]",K="[object Map]",J="[object Number]",Q="[object Object]",tt="[object RegExp]",et="[object Set]",rt="[object String]",nt="[object WeakMap]",it="[object ArrayBuffer]",at="[object Float32Array]",ot="[object Float64Array]",st="[object Int8Array]",ut="[object Int16Array]",ct="[object Int32Array]",lt="[object Uint8Array]",ht="[object Uint8ClampedArray]",ft="[object Uint16Array]",dt="[object Uint32Array]",pt=/\b__p \+= '';/g,gt=/\b(__p \+=) '' \+/g,yt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,mt=/&(?:amp|lt|gt|quot|#39|#96);/g,vt=/[&<>"'`]/g,_t=RegExp(mt.source),bt=RegExp(vt.source),wt=/<%-([\s\S]+?)%>/g,At=/<%([\s\S]+?)%>/g,xt=/<%=([\s\S]+?)%>/g,kt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,Et=/^\w*$/,Dt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,Ct=/^[:!,]|[\\^$.*+?()[\]{}|\/]|(^[0-9a-fA-Fnrtuvx])|([\n\r\u2028\u2029])/g,St=RegExp(Ct.source),Tt=/[\u0300-\u036f\ufe20-\ufe23]/g,Ft=/\\(\\)?/g,Bt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Lt=/\w*$/,Ot=/^0[xX]/,It=/^\[object .+?Constructor\]$/,Rt=/^\d+$/,Mt=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,Nt=/($^)/,Pt=/['\n\r\u2028\u2029\\]/g,jt=function(){var t="[A-Z\\xc0-\\xd6\\xd8-\\xde]",e="[a-z\\xdf-\\xf6\\xf8-\\xff]+";return RegExp(t+"+(?="+t+e+")|"+t+"?"+e+"|"+t+"+|[0-9]+","g")}(),qt=["Array","ArrayBuffer","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Math","Number","Object","RegExp","Set","String","_","clearTimeout","isFinite","parseFloat","parseInt","setTimeout","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap"],Ut=-1,Yt={};Yt[at]=Yt[ot]=Yt[st]=Yt[ut]=Yt[ct]=Yt[lt]=Yt[ht]=Yt[ft]=Yt[dt]=!0,Yt[G]=Yt[W]=Yt[it]=Yt[H]=Yt[z]=Yt[Z]=Yt[X]=Yt[K]=Yt[J]=Yt[Q]=Yt[tt]=Yt[et]=Yt[rt]=Yt[nt]=!1;var $t={};$t[G]=$t[W]=$t[it]=$t[H]=$t[z]=$t[at]=$t[ot]=$t[st]=$t[ut]=$t[ct]=$t[J]=$t[Q]=$t[tt]=$t[rt]=$t[lt]=$t[ht]=$t[ft]=$t[dt]=!0,$t[Z]=$t[X]=$t[K]=$t[et]=$t[nt]=!1;var Vt={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss"},Gt={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Wt={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},Ht={"function":!0,object:!0},zt={0:"x30",1:"x31",2:"x32",3:"x33",4:"x34",5:"x35",6:"x36",7:"x37",8:"x38",9:"x39",A:"x41",B:"x42",C:"x43",D:"x44",E:"x45",F:"x46",a:"x61",b:"x62",c:"x63",d:"x64",e:"x65",f:"x66",n:"x6e",r:"x72",t:"x74",u:"x75",v:"x76",x:"x78"},Zt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Xt=Ht[typeof r]&&r&&!r.nodeType&&r,Kt=Ht[typeof e]&&e&&!e.nodeType&&e,Jt=Xt&&Kt&&"object"==typeof t&&t&&t.Object&&t,Qt=Ht[typeof self]&&self&&self.Object&&self,te=Ht[typeof window]&&window&&window.Object&&window,ee=Kt&&Kt.exports===Xt&&Xt,re=Jt||te!==(this&&this.window)&&te||Qt||this,ne=k();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(re._=ne,define(function(){return ne})):Xt&&Kt?ee?(Kt.exports=ne)._=ne:Xt._=ne:re._=ne}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],51:[function(t,e){e.exports={graphlib:t("./lib/graphlib"),layout:t("./lib/layout"),debug:t("./lib/debug"),util:{time:t("./lib/util").time,notime:t("./lib/util").notime},version:t("./lib/version")}},{"./lib/debug":56,"./lib/graphlib":57,"./lib/layout":59,"./lib/util":79,"./lib/version":80}],52:[function(t,e){"use strict";function r(t){function e(t){return function(e){return t.edge(e).weight}}var r="greedy"===t.graph().acyclicer?o(t,e(t)):n(t);a.each(r,function(e){var r=t.edge(e);t.removeEdge(e),r.forwardName=e.name,r.reversed=!0,t.setEdge(e.w,e.v,r,a.uniqueId("rev"))})}function n(t){function e(o){a.has(i,o)||(i[o]=!0,n[o]=!0,a.each(t.outEdges(o),function(t){a.has(n,t.w)?r.push(t):e(t.w)}),delete n[o])}var r=[],n={},i={};return a.each(t.nodes(),e),r}function i(t){a.each(t.edges(),function(e){var r=t.edge(e);if(r.reversed){t.removeEdge(e);var n=r.forwardName;delete r.reversed,delete r.forwardName,t.setEdge(e.w,e.v,r,n)}})}var a=t("./lodash"),o=t("./greedy-fas");e.exports={run:r,undo:i}},{"./greedy-fas":58,"./lodash":60}],53:[function(t,e){function r(t){function e(r){var a=t.children(r),o=t.node(r);if(a.length&&i.each(a,e),i.has(o,"minRank")){o.borderLeft=[],o.borderRight=[];for(var s=o.minRank,u=o.maxRank+1;u>s;++s)n(t,"borderLeft","_bl",r,o,s),n(t,"borderRight","_br",r,o,s)}}i.each(t.children(),e)}function n(t,e,r,n,i,o){var s={width:0,height:0,rank:o,borderType:e},u=i[e][o-1],c=a.addDummyNode(t,"border",s,r);i[e][o]=c,t.setParent(c,n),u&&t.setEdge(u,c,{weight:1})}var i=t("./lodash"),a=t("./util");e.exports=r},{"./lodash":60,"./util":79}],54:[function(t,e){"use strict";function r(t){var e=t.graph().rankdir.toLowerCase();("lr"===e||"rl"===e)&&i(t)}function n(t){var e=t.graph().rankdir.toLowerCase();("bt"===e||"rl"===e)&&o(t),("lr"===e||"rl"===e)&&(u(t),i(t))}function i(t){l.each(t.nodes(),function(e){a(t.node(e))}),l.each(t.edges(),function(e){a(t.edge(e))})}function a(t){var e=t.width;t.width=t.height,t.height=e}function o(t){l.each(t.nodes(),function(e){s(t.node(e))}),l.each(t.edges(),function(e){var r=t.edge(e);l.each(r.points,s),l.has(r,"y")&&s(r)})}function s(t){t.y=-t.y}function u(t){l.each(t.nodes(),function(e){c(t.node(e))}),l.each(t.edges(),function(e){var r=t.edge(e);l.each(r.points,c),l.has(r,"x")&&c(r)})}function c(t){var e=t.x;t.x=t.y,t.y=e}var l=t("./lodash");e.exports={adjust:r,undo:n}},{"./lodash":60}],55:[function(t,e){function r(){var t={};t._next=t._prev=t,this._sentinel=t}function n(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function i(t,e){return"_next"!==t&&"_prev"!==t?e:void 0}e.exports=r,r.prototype.dequeue=function(){var t=this._sentinel,e=t._prev;return e!==t?(n(e),e):void 0},r.prototype.enqueue=function(t){var e=this._sentinel;t._prev&&t._next&&n(t),t._next=e._next,e._next._prev=t,e._next=t,t._prev=e},r.prototype.toString=function(){for(var t=[],e=this._sentinel,r=e._prev;r!==e;)t.push(JSON.stringify(r,i)),r=r._prev;return"["+t.join(", ")+"]"}},{}],56:[function(t,e){function r(t){var e=i.buildLayerMatrix(t),r=new a({compound:!0,multigraph:!0}).setGraph({});return n.each(t.nodes(),function(e){r.setNode(e,{label:e}),r.setParent(e,"layer"+t.node(e).rank)}),n.each(t.edges(),function(t){r.setEdge(t.v,t.w,{},t.name)}),n.each(e,function(t,e){var i="layer"+e;r.setNode(i,{rank:"same"}),n.reduce(t,function(t,e){return r.setEdge(t,e,{style:"invis"}),e})}),r}var n=t("./lodash"),i=t("./util"),a=t("./graphlib").Graph;e.exports={debugOrdering:r}},{"./graphlib":57,"./lodash":60,"./util":79}],57:[function(t,e){var r;if("function"==typeof t)try{r=t("graphlib")}catch(n){}r||(r=window.graphlib),e.exports=r},{graphlib:81}],58:[function(t,e){function r(t,e){if(t.nodeCount()<=1)return[];var r=a(t,e||l),i=n(r.graph,r.buckets,r.zeroIdx);return s.flatten(s.map(i,function(e){return t.outEdges(e.v,e.w)}),!0)}function n(t,e,r){for(var n,a=[],o=e[e.length-1],s=e[0];t.nodeCount();){for(;n=s.dequeue();)i(t,e,r,n);for(;n=o.dequeue();)i(t,e,r,n);if(t.nodeCount())for(var u=e.length-2;u>0;--u)if(n=e[u].dequeue()){a=a.concat(i(t,e,r,n,!0));break}}return a}function i(t,e,r,n,i){var a=i?[]:void 0;return s.each(t.inEdges(n.v),function(n){var s=t.edge(n),u=t.node(n.v);i&&a.push({v:n.v,w:n.w}),u.out-=s,o(e,r,u)}),s.each(t.outEdges(n.v),function(n){var i=t.edge(n),a=n.w,s=t.node(a);s["in"]-=i,o(e,r,s)}),t.removeNode(n.v),a}function a(t,e){var r=new u,n=0,i=0;s.each(t.nodes(),function(t){r.setNode(t,{v:t,"in":0,out:0})}),s.each(t.edges(),function(t){var a=r.edge(t.v,t.w)||0,o=e(t),s=a+o;r.setEdge(t.v,t.w,s),i=Math.max(i,r.node(t.v).out+=o),n=Math.max(n,r.node(t.w)["in"]+=o)});var a=s.range(i+n+3).map(function(){return new c}),l=n+1;return s.each(r.nodes(),function(t){o(a,l,r.node(t))}),{graph:r,buckets:a,zeroIdx:l}}function o(t,e,r){r.out?r["in"]?t[r.out-r["in"]+e].enqueue(r):t[t.length-1].enqueue(r):t[0].enqueue(r)}var s=t("./lodash"),u=t("./graphlib").Graph,c=t("./data/list");e.exports=r;var l=s.constant(1)},{"./data/list":55,"./graphlib":57,"./lodash":60}],59:[function(t,e){"use strict";function r(t,e){var r=e&&e.debugTiming?L.time:L.notime;r("layout",function(){var e=r(" buildLayoutGraph",function(){return a(t)});r(" runLayout",function(){n(e,r)}),r(" updateInputGraph",function(){i(t,e)})})}function n(t,e){e(" makeSpaceForEdgeLabels",function(){o(t)}),e(" removeSelfEdges",function(){g(t)}),e(" acyclic",function(){w.run(t)}),e(" nestingGraph.run",function(){C.run(t)}),e(" rank",function(){x(L.asNonCompoundGraph(t))}),e(" injectEdgeLabelProxies",function(){s(t)}),e(" removeEmptyRanks",function(){D(t)}),e(" nestingGraph.cleanup",function(){C.cleanup(t)}),e(" normalizeRanks",function(){k(t)}),e(" assignRankMinMax",function(){u(t)}),e(" removeEdgeLabelProxies",function(){c(t)}),e(" normalize.run",function(){A.run(t)}),e(" parentDummyChains",function(){E(t)}),e(" addBorderSegments",function(){S(t)}),e(" order",function(){F(t)}),e(" insertSelfEdges",function(){y(t)}),e(" adjustCoordinateSystem",function(){T.adjust(t)}),e(" position",function(){B(t)}),e(" positionSelfEdges",function(){m(t)}),e(" removeBorderNodes",function(){p(t)}),e(" normalize.undo",function(){A.undo(t)}),e(" fixupEdgeLabelCoords",function(){f(t)}),e(" undoCoordinateSystem",function(){T.undo(t)}),e(" translateGraph",function(){l(t)}),e(" assignNodeIntersects",function(){h(t)}),e(" reversePoints",function(){d(t)}),e(" acyclic.undo",function(){w.undo(t)})}function i(t,e){b.each(t.nodes(),function(r){var n=t.node(r),i=e.node(r);n&&(n.x=i.x,n.y=i.y,e.children(r).length&&(n.width=i.width,n.height=i.height))}),b.each(t.edges(),function(r){var n=t.edge(r),i=e.edge(r);n.points=i.points,b.has(i,"x")&&(n.x=i.x,n.y=i.y)}),t.graph().width=e.graph().width,t.graph().height=e.graph().height}function a(t){var e=new O({multigraph:!0,compound:!0}),r=_(t.graph());return e.setGraph(b.merge({},R,v(r,I),b.pick(r,M))),b.each(t.nodes(),function(r){var n=_(t.node(r));e.setNode(r,b.defaults(v(n,N),P)),e.setParent(r,t.parent(r))}),b.each(t.edges(),function(r){var n=_(t.edge(r));e.setEdge(r,b.merge({},q,v(n,j),b.pick(n,U)))}),e}function o(t){var e=t.graph();e.ranksep/=2,b.each(t.edges(),function(r){var n=t.edge(r);n.minlen*=2,"c"!==n.labelpos.toLowerCase()&&("TB"===e.rankdir||"BT"===e.rankdir?n.width+=n.labeloffset:n.height+=n.labeloffset)})}function s(t){b.each(t.edges(),function(e){var r=t.edge(e);if(r.width&&r.height){var n=t.node(e.v),i=t.node(e.w),a={rank:(i.rank-n.rank)/2+n.rank,e:e};L.addDummyNode(t,"edge-proxy",a,"_ep")}})}function u(t){var e=0;b.each(t.nodes(),function(r){var n=t.node(r);n.borderTop&&(n.minRank=t.node(n.borderTop).rank,n.maxRank=t.node(n.borderBottom).rank,e=b.max(e,n.maxRank))}),t.graph().maxRank=e}function c(t){b.each(t.nodes(),function(e){var r=t.node(e);"edge-proxy"===r.dummy&&(t.edge(r.e).labelRank=r.rank,t.removeNode(e))})}function l(t){function e(t){var e=t.x,o=t.y,s=t.width,u=t.height;r=Math.min(r,e-s/2),n=Math.max(n,e+s/2),i=Math.min(i,o-u/2),a=Math.max(a,o+u/2)}var r=Number.POSITIVE_INFINITY,n=0,i=Number.POSITIVE_INFINITY,a=0,o=t.graph(),s=o.marginx||0,u=o.marginy||0;b.each(t.nodes(),function(r){e(t.node(r))}),b.each(t.edges(),function(r){var n=t.edge(r);b.has(n,"x")&&e(n)}),r-=s,i-=u,b.each(t.nodes(),function(e){var n=t.node(e);n.x-=r,n.y-=i}),b.each(t.edges(),function(e){var n=t.edge(e);b.each(n.points,function(t){t.x-=r,t.y-=i}),b.has(n,"x")&&(n.x-=r),b.has(n,"y")&&(n.y-=i)}),o.width=n-r+s,o.height=a-i+u}function h(t){b.each(t.edges(),function(e){var r,n,i=t.edge(e),a=t.node(e.v),o=t.node(e.w);i.points?(r=i.points[0],n=i.points[i.points.length-1]):(i.points=[],r=o,n=a),i.points.unshift(L.intersectRect(a,r)),i.points.push(L.intersectRect(o,n))})}function f(t){b.each(t.edges(),function(e){var r=t.edge(e);if(b.has(r,"x"))switch(("l"===r.labelpos||"r"===r.labelpos)&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset}})}function d(t){b.each(t.edges(),function(e){var r=t.edge(e);r.reversed&&r.points.reverse()})}function p(t){b.each(t.nodes(),function(e){if(t.children(e).length){var r=t.node(e),n=t.node(r.borderTop),i=t.node(r.borderBottom),a=t.node(b.last(r.borderLeft)),o=t.node(b.last(r.borderRight));r.width=Math.abs(o.x-a.x),r.height=Math.abs(i.y-n.y),r.x=a.x+r.width/2,r.y=n.y+r.height/2}}),b.each(t.nodes(),function(e){"border"===t.node(e).dummy&&t.removeNode(e)})}function g(t){b.each(t.edges(),function(e){if(e.v===e.w){var r=t.node(e.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:e,label:t.edge(e)}),t.removeEdge(e)}})}function y(t){var e=L.buildLayerMatrix(t);b.each(e,function(e){var r=0;b.each(e,function(e,n){var i=t.node(e);i.order=n+r,b.each(i.selfEdges,function(e){L.addDummyNode(t,"selfedge",{width:e.label.width,height:e.label.height,rank:i.rank,order:n+ ++r,e:e.e,label:e.label},"_se")}),delete i.selfEdges})})}function m(t){b.each(t.nodes(),function(e){var r=t.node(e);if("selfedge"===r.dummy){var n=t.node(r.e.v),i=n.x+n.width/2,a=n.y,o=r.x-i,s=n.height/2;t.setEdge(r.e,r.label),t.removeNode(e),r.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}],r.label.x=r.x,r.label.y=r.y}})}function v(t,e){return b.mapValues(b.pick(t,e),Number)}function _(t){var e={};return b.each(t,function(t,r){e[r.toLowerCase()]=t}),e}var b=t("./lodash"),w=t("./acyclic"),A=t("./normalize"),x=t("./rank"),k=t("./util").normalizeRanks,E=t("./parent-dummy-chains"),D=t("./util").removeEmptyRanks,C=t("./nesting-graph"),S=t("./add-border-segments"),T=t("./coordinate-system"),F=t("./order"),B=t("./position"),L=t("./util"),O=t("./graphlib").Graph;e.exports=r;var I=["nodesep","edgesep","ranksep","marginx","marginy"],R={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},M=["acyclicer","ranker","rankdir","align"],N=["width","height"],P={width:0,height:0},j=["minlen","weight","width","height","labeloffset"],q={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},U=["labelpos"]},{"./acyclic":52,"./add-border-segments":53,"./coordinate-system":54,"./graphlib":57,"./lodash":60,"./nesting-graph":61,"./normalize":62,"./order":67,"./parent-dummy-chains":72,"./position":74,"./rank":76,"./util":79}],60:[function(t,e){e.exports=t(48)},{"/Users/knut/source/mermaid/node_modules/dagre-d3/node_modules/graphlib/lib/lodash.js":48,lodash:101}],61:[function(t,e){function r(t){var e=u.addDummyNode(t,"root",{},"_root"),r=i(t),o=s.max(r)-1,c=2*o+1;t.graph().nestingRoot=e,s.each(t.edges(),function(e){t.edge(e).minlen*=c});var l=a(t)+1;s.each(t.children(),function(i){n(t,e,c,l,o,r,i)}),t.graph().nodeRankFactor=c}function n(t,e,r,i,a,o,c){var l=t.children(c);if(!l.length)return void(c!==e&&t.setEdge(e,c,{weight:0,minlen:r}));var h=u.addBorderNode(t,"_bt"),f=u.addBorderNode(t,"_bb"),d=t.node(c);t.setParent(h,c),d.borderTop=h,t.setParent(f,c),d.borderBottom=f,s.each(l,function(s){n(t,e,r,i,a,o,s);var u=t.node(s),l=u.borderTop?u.borderTop:s,d=u.borderBottom?u.borderBottom:s,p=u.borderTop?i:2*i,g=l!==d?1:a-o[c]+1;t.setEdge(h,l,{weight:p,minlen:g,nestingEdge:!0}),t.setEdge(d,f,{weight:p,minlen:g,nestingEdge:!0})}),t.parent(c)||t.setEdge(e,h,{weight:0,minlen:a+o[c]})}function i(t){function e(n,i){var a=t.children(n);a&&a.length&&s.each(a,function(t){e(t,i+1)}),r[n]=i}var r={};return s.each(t.children(),function(t){e(t,1)}),r}function a(t){return s.reduce(t.edges(),function(e,r){return e+t.edge(r).weight},0)}function o(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,s.each(t.edges(),function(e){var r=t.edge(e);r.nestingEdge&&t.removeEdge(e)})}var s=t("./lodash"),u=t("./util");e.exports={run:r,cleanup:o}},{"./lodash":60,"./util":79}],62:[function(t,e){"use strict";function r(t){t.graph().dummyChains=[],a.each(t.edges(),function(e){n(t,e)})}function n(t,e){var r=e.v,n=t.node(r).rank,i=e.w,a=t.node(i).rank,s=e.name,u=t.edge(e),c=u.labelRank;if(a!==n+1){t.removeEdge(e);var l,h,f;for(f=0,++n;a>n;++f,++n)u.points=[],h={width:0,height:0,edgeLabel:u,edgeObj:e,rank:n},l=o.addDummyNode(t,"edge",h,"_d"),n===c&&(h.width=u.width,h.height=u.height,h.dummy="edge-label",h.labelpos=u.labelpos),t.setEdge(r,l,{weight:u.weight},s),0===f&&t.graph().dummyChains.push(l),r=l;t.setEdge(r,i,{weight:u.weight},s)}}function i(t){a.each(t.graph().dummyChains,function(e){var r,n=t.node(e),i=n.edgeLabel;for(t.setEdge(n.edgeObj,i);n.dummy;)r=t.successors(e)[0],t.removeNode(e),i.points.push({x:n.x,y:n.y}),"edge-label"===n.dummy&&(i.x=n.x,i.y=n.y,i.width=n.width,i.height=n.height),e=r,n=t.node(e)})}var a=t("./lodash"),o=t("./util");e.exports={run:r,undo:i}},{"./lodash":60,"./util":79}],63:[function(t,e){function r(t,e,r){var i,a={};n.each(r,function(r){for(var n,o,s=t.parent(r);s;){if(n=t.parent(s),n?(o=a[n],a[n]=s):(o=i,i=s),o&&o!==s)return void e.setEdge(o,s);s=n}})}var n=t("../lodash");e.exports=r},{"../lodash":60}],64:[function(t,e){function r(t,e){return n.map(e,function(e){var r=t.inEdges(e);if(r.length){var i=n.reduce(r,function(e,r){var n=t.edge(r),i=t.node(r.v);return{sum:e.sum+n.weight*i.order,weight:e.weight+n.weight}},{sum:0,weight:0});return{v:e,barycenter:i.sum/i.weight,weight:i.weight}}return{v:e}})}var n=t("../lodash");e.exports=r},{"../lodash":60}],65:[function(t,e){function r(t,e,r){var o=n(t),s=new a({compound:!0}).setGraph({root:o}).setDefaultNodeLabel(function(e){return t.node(e)});return i.each(t.nodes(),function(n){var a=t.node(n),u=t.parent(n);(a.rank===e||a.minRank<=e&&e<=a.maxRank)&&(s.setNode(n),s.setParent(n,u||o),i.each(t[r](n),function(e){var r=e.v===n?e.w:e.v,a=s.edge(r,n),o=i.isUndefined(a)?0:a.weight;s.setEdge(r,n,{weight:t.edge(e).weight+o})}),i.has(a,"minRank")&&s.setNode(n,{borderLeft:a.borderLeft[e],borderRight:a.borderRight[e]}))}),s}function n(t){for(var e;t.hasNode(e=i.uniqueId("_root")););return e}var i=t("../lodash"),a=t("../graphlib").Graph;e.exports=r},{"../graphlib":57,"../lodash":60 }],66:[function(t,e){"use strict";function r(t,e){for(var r=0,i=1;i<e.length;++i)r+=n(t,e[i-1],e[i]);return r}function n(t,e,r){for(var n=i.zipObject(r,i.map(r,function(t,e){return e})),a=i.flatten(i.map(e,function(e){return i.chain(t.outEdges(e)).map(function(e){return{pos:n[e.w],weight:t.edge(e).weight}}).sortBy("pos").value()}),!0),o=1;o<r.length;)o<<=1;var s=2*o-1;o-=1;var u=i.map(new Array(s),function(){return 0}),c=0;return i.each(a.forEach(function(t){var e=t.pos+o;u[e]+=t.weight;for(var r=0;e>0;)e%2&&(r+=u[e+1]),e=e-1>>1,u[e]+=t.weight;c+=t.weight*r})),c}var i=t("../lodash");e.exports=r},{"../lodash":60}],67:[function(t,e){"use strict";function r(t){var e=d.maxRank(t),r=n(t,o.range(1,e+1),"inEdges"),c=n(t,o.range(e-1,-1,-1),"outEdges"),l=s(t);a(t,l);for(var h,f=Number.POSITIVE_INFINITY,p=0,g=0;4>g;++p,++g){i(p%2?r:c,p%4>=2),l=d.buildLayerMatrix(t);var y=u(t,l);f>y&&(g=0,h=o.cloneDeep(l),f=y)}a(t,h)}function n(t,e,r){return o.map(e,function(e){return l(t,e,r)})}function i(t,e){var r=new f;o.each(t,function(t){var n=t.graph().root,i=c(t,n,r,e);o.each(i.vs,function(e,r){t.node(e).order=r}),h(t,r,i.vs)})}function a(t,e){o.each(e,function(e){o.each(e,function(e,r){t.node(e).order=r})})}var o=t("../lodash"),s=t("./init-order"),u=t("./cross-count"),c=t("./sort-subgraph"),l=t("./build-layer-graph"),h=t("./add-subgraph-constraints"),f=t("../graphlib").Graph,d=t("../util");e.exports=r},{"../graphlib":57,"../lodash":60,"../util":79,"./add-subgraph-constraints":63,"./build-layer-graph":65,"./cross-count":66,"./init-order":68,"./sort-subgraph":70}],68:[function(t,e){"use strict";function r(t){function e(i){if(!n.has(r,i)){r[i]=!0;var a=t.node(i);o[a.rank].push(i),n.each(t.successors(i),e)}}var r={},i=n.filter(t.nodes(),function(e){return!t.children(e).length}),a=n.max(n.map(i,function(e){return t.node(e).rank})),o=n.map(n.range(a+1),function(){return[]}),s=n.sortBy(i,function(e){return t.node(e).rank});return n.each(s,e),o}var n=t("../lodash");e.exports=r},{"../lodash":60}],69:[function(t,e){"use strict";function r(t,e){var r={};a.each(t,function(t,e){var n=r[t.v]={indegree:0,"in":[],out:[],vs:[t.v],i:e};a.isUndefined(t.barycenter)||(n.barycenter=t.barycenter,n.weight=t.weight)}),a.each(e.edges(),function(t){var e=r[t.v],n=r[t.w];a.isUndefined(e)||a.isUndefined(n)||(n.indegree++,e.out.push(r[t.w]))});var i=a.filter(r,function(t){return!t.indegree});return n(i)}function n(t){function e(t){return function(e){e.merged||(a.isUndefined(e.barycenter)||a.isUndefined(t.barycenter)||e.barycenter>=t.barycenter)&&i(t,e)}}function r(e){return function(r){r["in"].push(e),0===--r.indegree&&t.push(r)}}for(var n=[];t.length;){var o=t.pop();n.push(o),a.each(o["in"].reverse(),e(o)),a.each(o.out,r(o))}return a.chain(n).filter(function(t){return!t.merged}).map(function(t){return a.pick(t,["vs","i","barycenter","weight"])}).value()}function i(t,e){var r=0,n=0;t.weight&&(r+=t.barycenter*t.weight,n+=t.weight),e.weight&&(r+=e.barycenter*e.weight,n+=e.weight),t.vs=e.vs.concat(t.vs),t.barycenter=r/n,t.weight=n,t.i=Math.min(e.i,t.i),e.merged=!0}var a=t("../lodash");e.exports=r},{"../lodash":60}],70:[function(t,e){function r(t,e,c,l){var h=t.children(e),f=t.node(e),d=f?f.borderLeft:void 0,p=f?f.borderRight:void 0,g={};d&&(h=a.filter(h,function(t){return t!==d&&t!==p}));var y=o(t,h);a.each(y,function(e){if(t.children(e.v).length){var n=r(t,e.v,c,l);g[e.v]=n,a.has(n,"barycenter")&&i(e,n)}});var m=s(y,c);n(m,g);var v=u(m,l);if(d&&(v.vs=a.flatten([d,v.vs,p],!0),t.predecessors(d).length)){var _=t.node(t.predecessors(d)[0]),b=t.node(t.predecessors(p)[0]);a.has(v,"barycenter")||(v.barycenter=0,v.weight=0),v.barycenter=(v.barycenter*v.weight+_.order+b.order)/(v.weight+2),v.weight+=2}return v}function n(t,e){a.each(t,function(t){t.vs=a.flatten(t.vs.map(function(t){return e[t]?e[t].vs:t}),!0)})}function i(t,e){a.isUndefined(t.barycenter)?(t.barycenter=e.barycenter,t.weight=e.weight):(t.barycenter=(t.barycenter*t.weight+e.barycenter*e.weight)/(t.weight+e.weight),t.weight+=e.weight)}var a=t("../lodash"),o=t("./barycenter"),s=t("./resolve-conflicts"),u=t("./sort");e.exports=r},{"../lodash":60,"./barycenter":64,"./resolve-conflicts":69,"./sort":71}],71:[function(t,e){function r(t,e){var r=o.partition(t,function(t){return a.has(t,"barycenter")}),s=r.lhs,u=a.sortBy(r.rhs,function(t){return-t.i}),c=[],l=0,h=0,f=0;s.sort(i(!!e)),f=n(c,u,f),a.each(s,function(t){f+=t.vs.length,c.push(t.vs),l+=t.barycenter*t.weight,h+=t.weight,f=n(c,u,f)});var d={vs:a.flatten(c,!0)};return h&&(d.barycenter=l/h,d.weight=h),d}function n(t,e,r){for(var n;e.length&&(n=a.last(e)).i<=r;)e.pop(),t.push(n.vs),r++;return r}function i(t){return function(e,r){return e.barycenter<r.barycenter?-1:e.barycenter>r.barycenter?1:t?r.i-e.i:e.i-r.i}}var a=t("../lodash"),o=t("../util");e.exports=r},{"../lodash":60,"../util":79}],72:[function(t,e){function r(t){var e=i(t);a.each(t.graph().dummyChains,function(r){for(var i=t.node(r),a=i.edgeObj,o=n(t,e,a.v,a.w),s=o.path,u=o.lca,c=0,l=s[c],h=!0;r!==a.w;){if(i=t.node(r),h){for(;(l=s[c])!==u&&t.node(l).maxRank<i.rank;)c++;l===u&&(h=!1)}if(!h){for(;c<s.length-1&&t.node(l=s[c+1]).minRank<=i.rank;)c++;l=s[c]}t.setParent(r,l),r=t.successors(r)[0]}})}function n(t,e,r,n){var i,a,o=[],s=[],u=Math.min(e[r].low,e[n].low),c=Math.max(e[r].lim,e[n].lim);i=r;do i=t.parent(i),o.push(i);while(i&&(e[i].low>u||c>e[i].lim));for(a=i,i=n;(i=t.parent(i))!==a;)s.push(i);return{path:o.concat(s.reverse()),lca:a}}function i(t){function e(i){var o=n;a.each(t.children(i),e),r[i]={low:o,lim:n++}}var r={},n=0;return a.each(t.children(),e),r}var a=t("./lodash");e.exports=r},{"./lodash":60}],73:[function(t,e){"use strict";function r(t,e){function r(e,r){var o=0,s=0,u=e.length,c=y.last(r);return y.each(r,function(e,l){var h=i(t,e),f=h?t.node(h).order:u;(h||e===c)&&(y.each(r.slice(s,l+1),function(e){y.each(t.predecessors(e),function(r){var i=t.node(r),s=i.order;!(o>s||s>f)||i.dummy&&t.node(e).dummy||a(n,r,e)})}),s=l+1,o=f)}),r}var n={};return y.reduce(e,r),n}function n(t,e){function r(e,r,n,o,s){var u;y.each(y.range(r,n),function(r){u=e[r],t.node(u).dummy&&y.each(t.predecessors(u),function(e){var r=t.node(e);r.dummy&&(r.order<o||r.order>s)&&a(i,e,u)})})}function n(e,n){var i,a=-1,o=0;return y.each(n,function(s,u){if("border"===t.node(s).dummy){var c=t.predecessors(s);c.length&&(i=t.node(c[0]).order,r(n,o,u,a,i),o=u,a=i)}r(n,o,n.length,i,e.length)}),n}var i={};return y.reduce(e,n),i}function i(t,e){return t.node(e).dummy?y.find(t.predecessors(e),function(e){return t.node(e).dummy}):void 0}function a(t,e,r){if(e>r){var n=e;e=r,r=n}var i=t[e];i||(t[e]=i={}),i[r]=!0}function o(t,e,r){if(e>r){var n=e;e=r,r=n}return y.has(t[e],r)}function s(t,e,r,n){var i={},a={},s={};return y.each(e,function(t){y.each(t,function(t,e){i[t]=t,a[t]=t,s[t]=e})}),y.each(e,function(t){var e=-1;y.each(t,function(t){var u=n(t);if(u.length){u=y.sortBy(u,function(t){return s[t]});for(var c=(u.length-1)/2,l=Math.floor(c),h=Math.ceil(c);h>=l;++l){var f=u[l];a[t]===t&&e<s[f]&&!o(r,t,f)&&(a[f]=t,a[t]=i[t]=i[f],e=s[f])}}})}),{root:i,align:a}}function u(t,e,r,n,i){function a(t){y.has(l,t)||(l[t]=!0,s[t]=y.reduce(u.inEdges(t),function(t,e){return a(e.v),Math.max(t,s[e.v]+u.edge(e))},0))}function o(e){if(2!==l[e]){l[e]++;var r=t.node(e),n=y.reduce(u.outEdges(e),function(t,e){return o(e.w),Math.min(t,s[e.w]-u.edge(e))},Number.POSITIVE_INFINITY);n!==Number.POSITIVE_INFINITY&&r.borderType!==h&&(s[e]=Math.max(s[e],n))}}var s={},u=c(t,e,r,i),l={};y.each(u.nodes(),a);var h=i?"borderLeft":"borderRight";return y.each(u.nodes(),o),y.each(n,function(t){s[t]=s[r[t]]}),s}function c(t,e,r,n){var i=new m,a=t.graph(),o=p(a.nodesep,a.edgesep,n);return y.each(e,function(e){var n;y.each(e,function(e){var a=r[e];if(i.setNode(a),n){var s=r[n],u=i.edge(s,a);i.setEdge(s,a,Math.max(o(t,e,n),u||0))}n=e})}),i}function l(t,e){return y.min(e,function(e){var r=y.min(e,function(e,r){return e-g(t,r)/2}),n=y.max(e,function(e,r){return e+g(t,r)/2});return n-r})}function h(t,e){var r=y.min(e),n=y.max(e);y.each(["u","d"],function(i){y.each(["l","r"],function(a){var o,s=i+a,u=t[s];u!==e&&(o="l"===a?r-y.min(u):n-y.max(u),o&&(t[s]=y.mapValues(u,function(t){return t+o})))})})}function f(t,e){return y.mapValues(t.ul,function(r,n){if(e)return t[e.toLowerCase()][n];var i=y.sortBy(y.pluck(t,n));return(i[1]+i[2])/2})}function d(t){var e,i=v.buildLayerMatrix(t),a=y.merge(r(t,i),n(t,i)),o={};y.each(["u","d"],function(r){e="u"===r?i:y.values(i).reverse(),y.each(["l","r"],function(n){"r"===n&&(e=y.map(e,function(t){return y.values(t).reverse()}));var i=y.bind("u"===r?t.predecessors:t.successors,t),c=s(t,e,a,i),l=u(t,e,c.root,c.align,"r"===n);"r"===n&&(l=y.mapValues(l,function(t){return-t})),o[r+n]=l})});var c=l(t,o);return h(o,c),f(o,t.graph().align)}function p(t,e,r){return function(n,i,a){var o,s=n.node(i),u=n.node(a),c=0;if(c+=s.width/2,y.has(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":o=-s.width/2;break;case"r":o=s.width/2}if(o&&(c+=r?o:-o),o=0,c+=(s.dummy?e:t)/2,c+=(u.dummy?e:t)/2,c+=u.width/2,y.has(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":o=u.width/2;break;case"r":o=-u.width/2}return o&&(c+=r?o:-o),o=0,c}}function g(t,e){return t.node(e).width}var y=t("../lodash"),m=t("../graphlib").Graph,v=t("../util");e.exports={positionX:d,findType1Conflicts:r,findType2Conflicts:n,addConflict:a,hasConflict:o,verticalAlignment:s,horizontalCompaction:u,alignCoordinates:h,findSmallestWidthAlignment:l,balance:f}},{"../graphlib":57,"../lodash":60,"../util":79}],74:[function(t,e){"use strict";function r(t){t=a.asNonCompoundGraph(t),n(t),i.each(o(t),function(e,r){t.node(r).x=e})}function n(t){var e=a.buildLayerMatrix(t),r=t.graph().ranksep,n=0;i.each(e,function(e){var a=i.max(i.map(e,function(e){return t.node(e).height}));i.each(e,function(e){t.node(e).y=n+a/2}),n+=a+r})}var i=t("../lodash"),a=t("../util"),o=t("./bk").positionX;e.exports=r},{"../lodash":60,"../util":79,"./bk":73}],75:[function(t,e){"use strict";function r(t){var e=new s({directed:!1}),r=t.nodes()[0],o=t.nodeCount();e.setNode(r,{});for(var c,l;n(e,t)<o;)c=i(e,t),l=e.hasNode(c.v)?u(t,c):-u(t,c),a(e,t,l);return e}function n(t,e){function r(n){o.each(e.nodeEdges(n),function(i){var a=i.v,o=n===a?i.w:a;t.hasNode(o)||u(e,i)||(t.setNode(o,{}),t.setEdge(n,o,{}),r(o))})}return o.each(t.nodes(),r),t.nodeCount()}function i(t,e){return o.min(e.edges(),function(r){return t.hasNode(r.v)!==t.hasNode(r.w)?u(e,r):void 0})}function a(t,e,r){o.each(t.nodes(),function(t){e.node(t).rank+=r})}var o=t("../lodash"),s=t("../graphlib").Graph,u=t("./util").slack;e.exports=r},{"../graphlib":57,"../lodash":60,"./util":78}],76:[function(t,e){"use strict";function r(t){switch(t.graph().ranker){case"network-simplex":i(t);break;case"tight-tree":n(t);break;case"longest-path":c(t);break;default:i(t)}}function n(t){o(t),s(t)}function i(t){u(t)}var a=t("./util"),o=a.longestPath,s=t("./feasible-tree"),u=t("./network-simplex");e.exports=r;var c=o},{"./feasible-tree":75,"./network-simplex":77,"./util":78}],77:[function(t,e){"use strict";function r(t){t=b(t),m(t);var e=g(t);o(e),n(e,t);for(var r,i;r=u(e);)i=c(e,t,r),l(e,t,r,i)}function n(t,e){var r=_(t,t.nodes());r=r.slice(0,r.length-1),p.each(r,function(r){i(t,e,r)})}function i(t,e,r){var n=t.node(r),i=n.parent;t.edge(r,i).cutvalue=a(t,e,r)}function a(t,e,r){var n=t.node(r),i=n.parent,a=!0,o=e.edge(r,i),s=0;return o||(a=!1,o=e.edge(i,r)),s=o.weight,p.each(e.nodeEdges(r),function(n){var o=n.v===r,u=o?n.w:n.v;if(u!==i){var c=o===a,l=e.edge(n).weight;if(s+=c?l:-l,f(t,r,u)){var h=t.edge(r,u).cutvalue;s+=c?-h:h}}}),s}function o(t,e){arguments.length<2&&(e=t.nodes()[0]),s(t,{},1,e)}function s(t,e,r,n,i){var a=r,o=t.node(n);return e[n]=!0,p.each(t.neighbors(n),function(i){p.has(e,i)||(r=s(t,e,r,i,n))}),o.low=a,o.lim=r++,i?o.parent=i:delete o.parent,r}function u(t){return p.find(t.edges(),function(e){return t.edge(e).cutvalue<0})}function c(t,e,r){var n=r.v,i=r.w;e.hasEdge(n,i)||(n=r.w,i=r.v);var a=t.node(n),o=t.node(i),s=a,u=!1;a.lim>o.lim&&(s=o,u=!0);var c=p.filter(e.edges(),function(e){return u===d(t,t.node(e.v),s)&&u!==d(t,t.node(e.w),s)});return p.min(c,function(t){return y(e,t)})}function l(t,e,r,i){var a=r.v,s=r.w;t.removeEdge(a,s),t.setEdge(i.v,i.w,{}),o(t),n(t,e),h(t,e)}function h(t,e){var r=p.find(t.nodes(),function(t){return!e.node(t).parent}),n=v(t,r);n=n.slice(1),p.each(n,function(r){var n=t.node(r).parent,i=e.edge(r,n),a=!1;i||(i=e.edge(n,r),a=!0),e.node(r).rank=e.node(n).rank+(a?i.minlen:-i.minlen)})}function f(t,e,r){return t.hasEdge(e,r)}function d(t,e,r){return r.low<=e.lim&&e.lim<=r.lim}var p=t("../lodash"),g=t("./feasible-tree"),y=t("./util").slack,m=t("./util").longestPath,v=t("../graphlib").alg.preorder,_=t("../graphlib").alg.postorder,b=t("../util").simplify;e.exports=r,r.initLowLimValues=o,r.initCutValues=n,r.calcCutValue=a,r.leaveEdge=u,r.enterEdge=c,r.exchangeEdges=l},{"../graphlib":57,"../lodash":60,"../util":79,"./feasible-tree":75,"./util":78}],78:[function(t,e){"use strict";function r(t){function e(n){var a=t.node(n);if(i.has(r,n))return a.rank;r[n]=!0;var o=i.min(i.map(t.outEdges(n),function(r){return e(r.w)-t.edge(r).minlen}));return o===Number.POSITIVE_INFINITY&&(o=0),a.rank=o}var r={};i.each(t.sources(),e)}function n(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}var i=t("../lodash");e.exports={longestPath:r,slack:n}},{"../lodash":60}],79:[function(t,e){"use strict";function r(t,e,r,n){var i;do i=y.uniqueId(n);while(t.hasNode(i));return r.dummy=e,t.setNode(i,r),i}function n(t){var e=(new m).setGraph(t.graph());return y.each(t.nodes(),function(r){e.setNode(r,t.node(r))}),y.each(t.edges(),function(r){var n=e.edge(r.v,r.w)||{weight:0,minlen:1},i=t.edge(r);e.setEdge(r.v,r.w,{weight:n.weight+i.weight,minlen:Math.max(n.minlen,i.minlen)})}),e}function i(t){var e=new m({multigraph:t.isMultigraph()}).setGraph(t.graph());return y.each(t.nodes(),function(r){t.children(r).length||e.setNode(r,t.node(r))}),y.each(t.edges(),function(r){e.setEdge(r,t.edge(r))}),e}function a(t){var e=y.map(t.nodes(),function(e){var r={};return y.each(t.outEdges(e),function(e){r[e.w]=(r[e.w]||0)+t.edge(e).weight}),r});return y.zipObject(t.nodes(),e)}function o(t){var e=y.map(t.nodes(),function(e){var r={};return y.each(t.inEdges(e),function(e){r[e.v]=(r[e.v]||0)+t.edge(e).weight}),r});return y.zipObject(t.nodes(),e)}function s(t,e){var r=t.x,n=t.y,i=e.x-r,a=e.y-n,o=t.width/2,s=t.height/2;if(!i&&!a)throw new Error("Not possible to find intersection inside of the rectangle");var u,c;return Math.abs(a)*o>Math.abs(i)*s?(0>a&&(s=-s),u=s*i/a,c=s):(0>i&&(o=-o),u=o,c=o*a/i),{x:r+u,y:n+c}}function u(t){var e=y.map(y.range(f(t)+1),function(){return[]});return y.each(t.nodes(),function(r){var n=t.node(r),i=n.rank;y.isUndefined(i)||(e[i][n.order]=r)}),e}function c(t){var e=y.min(y.map(t.nodes(),function(e){return t.node(e).rank}));y.each(t.nodes(),function(r){var n=t.node(r);y.has(n,"rank")&&(n.rank-=e)})}function l(t){var e=y.min(y.map(t.nodes(),function(e){return t.node(e).rank})),r=[];y.each(t.nodes(),function(n){var i=t.node(n).rank-e;r[i]||(r[i]=[]),r[i].push(n)});var n=0,i=t.graph().nodeRankFactor;y.each(r,function(e,r){y.isUndefined(e)&&r%i!==0?--n:n&&y.each(e,function(e){t.node(e).rank+=n})})}function h(t,e,n,i){var a={width:0,height:0};return arguments.length>=4&&(a.rank=n,a.order=i),r(t,"border",a,e)}function f(t){return y.max(y.map(t.nodes(),function(e){var r=t.node(e).rank;return y.isUndefined(r)?void 0:r}))}function d(t,e){var r={lhs:[],rhs:[]};return y.each(t,function(t){e(t)?r.lhs.push(t):r.rhs.push(t)}),r}function p(t,e){var r=y.now();try{return e()}finally{console.log(t+" time: "+(y.now()-r)+"ms")}}function g(t,e){return e()}var y=t("./lodash"),m=t("./graphlib").Graph;e.exports={addDummyNode:r,simplify:n,asNonCompoundGraph:i,successorWeights:a,predecessorWeights:o,intersectRect:s,buildLayerMatrix:u,normalizeRanks:c,removeEmptyRanks:l,addBorderNode:h,maxRank:f,partition:d,time:p,notime:g}},{"./graphlib":57,"./lodash":60}],80:[function(t,e){e.exports="0.7.4"},{}],81:[function(t,e){e.exports=t(30)},{"./lib":97,"./lib/alg":88,"./lib/json":98,"/Users/knut/source/mermaid/node_modules/dagre-d3/node_modules/graphlib/index.js":30}],82:[function(t,e){e.exports=t(31)},{"../lodash":99,"/Users/knut/source/mermaid/node_modules/dagre-d3/node_modules/graphlib/lib/alg/components.js":31}],83:[function(t,e){e.exports=t(32)},{"../lodash":99,"/Users/knut/source/mermaid/node_modules/dagre-d3/node_modules/graphlib/lib/alg/dfs.js":32}],84:[function(t,e){e.exports=t(33)},{"../lodash":99,"./dijkstra":85,"/Users/knut/source/mermaid/node_modules/dagre-d3/node_modules/graphlib/lib/alg/dijkstra-all.js":33}],85:[function(t,e){e.exports=t(34)},{"../data/priority-queue":95,"../lodash":99,"/Users/knut/source/mermaid/node_modules/dagre-d3/node_modules/graphlib/lib/alg/dijkstra.js":34}],86:[function(t,e){e.exports=t(35)},{"../lodash":99,"./tarjan":93,"/Users/knut/source/mermaid/node_modules/dagre-d3/node_modules/graphlib/lib/alg/find-cycles.js":35}],87:[function(t,e){e.exports=t(36)},{"../lodash":99,"/Users/knut/source/mermaid/node_modules/dagre-d3/node_modules/graphlib/lib/alg/floyd-warshall.js":36}],88:[function(t,e){e.exports=t(37)},{"./components":82,"./dijkstra":85,"./dijkstra-all":84,"./find-cycles":86,"./floyd-warshall":87,"./is-acyclic":89,"./postorder":90,"./preorder":91,"./prim":92,"./tarjan":93,"./topsort":94,"/Users/knut/source/mermaid/node_modules/dagre-d3/node_modules/graphlib/lib/alg/index.js":37}],89:[function(t,e){e.exports=t(38)},{"./topsort":94,"/Users/knut/source/mermaid/node_modules/dagre-d3/node_modules/graphlib/lib/alg/is-acyclic.js":38}],90:[function(t,e){e.exports=t(39)},{"./dfs":83,"/Users/knut/source/mermaid/node_modules/dagre-d3/node_modules/graphlib/lib/alg/postorder.js":39}],91:[function(t,e){e.exports=t(40)},{"./dfs":83,"/Users/knut/source/mermaid/node_modules/dagre-d3/node_modules/graphlib/lib/alg/preorder.js":40}],92:[function(t,e){e.exports=t(41)},{"../data/priority-queue":95,"../graph":96,"../lodash":99,"/Users/knut/source/mermaid/node_modules/dagre-d3/node_modules/graphlib/lib/alg/prim.js":41}],93:[function(t,e){e.exports=t(42)},{"../lodash":99,"/Users/knut/source/mermaid/node_modules/dagre-d3/node_modules/graphlib/lib/alg/tarjan.js":42}],94:[function(t,e){e.exports=t(43)},{"../lodash":99,"/Users/knut/source/mermaid/node_modules/dagre-d3/node_modules/graphlib/lib/alg/topsort.js":43}],95:[function(t,e){e.exports=t(44)},{"../lodash":99,"/Users/knut/source/mermaid/node_modules/dagre-d3/node_modules/graphlib/lib/data/priority-queue.js":44}],96:[function(t,e){e.exports=t(45)},{"./lodash":99,"/Users/knut/source/mermaid/node_modules/dagre-d3/node_modules/graphlib/lib/graph.js":45}],97:[function(t,e){e.exports=t(46)},{"./graph":96,"./version":100,"/Users/knut/source/mermaid/node_modules/dagre-d3/node_modules/graphlib/lib/index.js":46}],98:[function(t,e){e.exports=t(47)},{"./graph":96,"./lodash":99,"/Users/knut/source/mermaid/node_modules/dagre-d3/node_modules/graphlib/lib/json.js":47}],99:[function(t,e){e.exports=t(48)},{"/Users/knut/source/mermaid/node_modules/dagre-d3/node_modules/graphlib/lib/lodash.js":48,lodash:101}],100:[function(t,e){e.exports=t(49)},{"/Users/knut/source/mermaid/node_modules/dagre-d3/node_modules/graphlib/lib/version.js":49}],101:[function(t,e){e.exports=t(50)},{"/Users/knut/source/mermaid/node_modules/dagre-d3/node_modules/lodash/index.js":50}],102:[function(t,e,r){(function(t){!function(n){var i="object"==typeof r&&r,a="object"==typeof e&&e&&e.exports==i&&e,o="object"==typeof t&&t;(o.global===o||o.window===o)&&(n=o);var s=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,u=/[\x01-\x7F]/g,c=/[\x01-\t\x0B\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,l=/<\u20D2|=\u20E5|>\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,h={"Á":"Aacute","á":"aacute","Ă":"Abreve","ă":"abreve","∾":"ac","∿":"acd","∾̳":"acE","Â":"Acirc","â":"acirc","´":"acute","А":"Acy","а":"acy","Æ":"AElig","æ":"aelig","":"af","𝔄":"Afr","𝔞":"afr","À":"Agrave","à":"agrave","ℵ":"aleph","Α":"Alpha","α":"alpha","Ā":"Amacr","ā":"amacr","⨿":"amalg","&":"amp","⩕":"andand","⩓":"And","∧":"and","⩜":"andd","⩘":"andslope","⩚":"andv","∠":"ang","⦤":"ange","⦨":"angmsdaa","⦩":"angmsdab","⦪":"angmsdac","⦫":"angmsdad","⦬":"angmsdae","⦭":"angmsdaf","⦮":"angmsdag","⦯":"angmsdah","∡":"angmsd","∟":"angrt","⊾":"angrtvb","⦝":"angrtvbd","∢":"angsph","Å":"angst","⍼":"angzarr","Ą":"Aogon","ą":"aogon","𝔸":"Aopf","𝕒":"aopf","⩯":"apacir","≈":"ap","⩰":"apE","≊":"ape","≋":"apid","'":"apos","å":"aring","𝒜":"Ascr","𝒶":"ascr","≔":"colone","*":"ast","≍":"CupCap","Ã":"Atilde","ã":"atilde","Ä":"Auml","ä":"auml","∳":"awconint","⨑":"awint","≌":"bcong","϶":"bepsi","‵":"bprime","∽":"bsim","⋍":"bsime","∖":"setmn","⫧":"Barv","⊽":"barvee","⌅":"barwed","⌆":"Barwed","⎵":"bbrk","⎶":"bbrktbrk","Б":"Bcy","б":"bcy","„":"bdquo","∵":"becaus","⦰":"bemptyv","ℬ":"Bscr","Β":"Beta","β":"beta","ℶ":"beth","≬":"twixt","𝔅":"Bfr","𝔟":"bfr","⋂":"xcap","◯":"xcirc","⋃":"xcup","⨀":"xodot","⨁":"xoplus","⨂":"xotime","⨆":"xsqcup","★":"starf","▽":"xdtri","△":"xutri","⨄":"xuplus","⋁":"Vee","⋀":"Wedge","⤍":"rbarr","⧫":"lozf","▪":"squf","▴":"utrif","▾":"dtrif","◂":"ltrif","▸":"rtrif","␣":"blank","▒":"blk12","░":"blk14","▓":"blk34","█":"block","=⃥":"bne","≡⃥":"bnequiv","⫭":"bNot","⌐":"bnot","𝔹":"Bopf","𝕓":"bopf","⊥":"bot","⋈":"bowtie","⧉":"boxbox","┐":"boxdl","╕":"boxdL","╖":"boxDl","╗":"boxDL","┌":"boxdr","╒":"boxdR","╓":"boxDr","╔":"boxDR","─":"boxh","═":"boxH","┬":"boxhd","╤":"boxHd","╥":"boxhD","╦":"boxHD","┴":"boxhu","╧":"boxHu","╨":"boxhU","╩":"boxHU","⊟":"minusb","⊞":"plusb","⊠":"timesb","┘":"boxul","╛":"boxuL","╜":"boxUl","╝":"boxUL","└":"boxur","╘":"boxuR","╙":"boxUr","╚":"boxUR","│":"boxv","║":"boxV","┼":"boxvh","╪":"boxvH","╫":"boxVh","╬":"boxVH","┤":"boxvl","╡":"boxvL","╢":"boxVl","╣":"boxVL","├":"boxvr","╞":"boxvR","╟":"boxVr","╠":"boxVR","˘":"breve","¦":"brvbar","𝒷":"bscr","⁏":"bsemi","⧅":"bsolb","\\":"bsol","⟈":"bsolhsub","•":"bull","≎":"bump","⪮":"bumpE","≏":"bumpe","Ć":"Cacute","ć":"cacute","⩄":"capand","⩉":"capbrcup","⩋":"capcap","∩":"cap","⋒":"Cap","⩇":"capcup","⩀":"capdot","ⅅ":"DD","∩︀":"caps","⁁":"caret","ˇ":"caron","ℭ":"Cfr","⩍":"ccaps","Č":"Ccaron","č":"ccaron","Ç":"Ccedil","ç":"ccedil","Ĉ":"Ccirc","ĉ":"ccirc","∰":"Cconint","⩌":"ccups","⩐":"ccupssm","Ċ":"Cdot","ċ":"cdot","¸":"cedil","⦲":"cemptyv","¢":"cent","·":"middot","𝔠":"cfr","Ч":"CHcy","ч":"chcy","✓":"check","Χ":"Chi","χ":"chi","ˆ":"circ","≗":"cire","↺":"olarr","↻":"orarr","⊛":"oast","⊚":"ocir","⊝":"odash","⊙":"odot","®":"reg","Ⓢ":"oS","⊖":"ominus","⊕":"oplus","⊗":"otimes","○":"cir","⧃":"cirE","⨐":"cirfnint","⫯":"cirmid","⧂":"cirscir","∲":"cwconint","”":"rdquo","’":"rsquo","♣":"clubs",":":"colon","∷":"Colon","⩴":"Colone",",":"comma","@":"commat","∁":"comp","∘":"compfn","ℂ":"Copf","≅":"cong","⩭":"congdot","≡":"equiv","∮":"oint","∯":"Conint","𝕔":"copf","∐":"coprod","©":"copy","℗":"copysr","↵":"crarr","✗":"cross","⨯":"Cross","𝒞":"Cscr","𝒸":"cscr","⫏":"csub","⫑":"csube","⫐":"csup","⫒":"csupe","⋯":"ctdot","⤸":"cudarrl","⤵":"cudarrr","⋞":"cuepr","⋟":"cuesc","↶":"cularr","⤽":"cularrp","⩈":"cupbrcap","⩆":"cupcap","∪":"cup","⋓":"Cup","⩊":"cupcup","⊍":"cupdot","⩅":"cupor","∪︀":"cups","↷":"curarr","⤼":"curarrm","⋎":"cuvee","⋏":"cuwed","¤":"curren","∱":"cwint","⌭":"cylcty","†":"dagger","‡":"Dagger","ℸ":"daleth","↓":"darr","↡":"Darr","⇓":"dArr","‐":"dash","⫤":"Dashv","⊣":"dashv","⤏":"rBarr","˝":"dblac","Ď":"Dcaron","ď":"dcaron","Д":"Dcy","д":"dcy","⇊":"ddarr","ⅆ":"dd","⤑":"DDotrahd","⩷":"eDDot","°":"deg","∇":"Del","Δ":"Delta","δ":"delta","⦱":"demptyv","⥿":"dfisht","𝔇":"Dfr","𝔡":"dfr","⥥":"dHar","⇃":"dharl","⇂":"dharr","˙":"dot","`":"grave","˜":"tilde","⋄":"diam","♦":"diams","¨":"die","ϝ":"gammad","⋲":"disin","÷":"div","⋇":"divonx","Ђ":"DJcy","ђ":"djcy","⌞":"dlcorn","⌍":"dlcrop",$:"dollar","𝔻":"Dopf","𝕕":"dopf","⃜":"DotDot","≐":"doteq","≑":"eDot","∸":"minusd","∔":"plusdo","⊡":"sdotb","⇐":"lArr","⇔":"iff","⟸":"xlArr","⟺":"xhArr","⟹":"xrArr","⇒":"rArr","⊨":"vDash","⇑":"uArr","⇕":"vArr","∥":"par","⤓":"DownArrowBar","⇵":"duarr","̑":"DownBreve","⥐":"DownLeftRightVector","⥞":"DownLeftTeeVector","⥖":"DownLeftVectorBar","↽":"lhard","⥟":"DownRightTeeVector","⥗":"DownRightVectorBar","⇁":"rhard","↧":"mapstodown","⊤":"top","⤐":"RBarr","⌟":"drcorn","⌌":"drcrop","𝒟":"Dscr","𝒹":"dscr","Ѕ":"DScy","ѕ":"dscy","⧶":"dsol","Đ":"Dstrok","đ":"dstrok","⋱":"dtdot","▿":"dtri","⥯":"duhar","⦦":"dwangle","Џ":"DZcy","џ":"dzcy","⟿":"dzigrarr","É":"Eacute","é":"eacute","⩮":"easter","Ě":"Ecaron","ě":"ecaron","Ê":"Ecirc","ê":"ecirc","≖":"ecir","≕":"ecolon","Э":"Ecy","э":"ecy","Ė":"Edot","ė":"edot","ⅇ":"ee","≒":"efDot","𝔈":"Efr","𝔢":"efr","⪚":"eg","È":"Egrave","è":"egrave","⪖":"egs","⪘":"egsdot","⪙":"el","∈":"in","⏧":"elinters","ℓ":"ell","⪕":"els","⪗":"elsdot","Ē":"Emacr","ē":"emacr","∅":"empty","◻":"EmptySmallSquare","▫":"EmptyVerySmallSquare"," ":"emsp13"," ":"emsp14"," ":"emsp","Ŋ":"ENG","ŋ":"eng"," ":"ensp","Ę":"Eogon","ę":"eogon","𝔼":"Eopf","𝕖":"eopf","⋕":"epar","⧣":"eparsl","⩱":"eplus","ε":"epsi","Ε":"Epsilon","ϵ":"epsiv","≂":"esim","⩵":"Equal","=":"equals","≟":"equest","⇌":"rlhar","⩸":"equivDD","⧥":"eqvparsl","⥱":"erarr","≓":"erDot","ℯ":"escr","ℰ":"Escr","⩳":"Esim","Η":"Eta","η":"eta","Ð":"ETH","ð":"eth","Ë":"Euml","ë":"euml","€":"euro","!":"excl","∃":"exist","Ф":"Fcy","ф":"fcy","♀":"female","ffi":"ffilig","ff":"fflig","ffl":"ffllig","𝔉":"Ffr","𝔣":"ffr","fi":"filig","◼":"FilledSmallSquare",fj:"fjlig","♭":"flat","fl":"fllig","▱":"fltns","ƒ":"fnof","𝔽":"Fopf","𝕗":"fopf","∀":"forall","⋔":"fork","⫙":"forkv","ℱ":"Fscr","⨍":"fpartint","½":"half","⅓":"frac13","¼":"frac14","⅕":"frac15","⅙":"frac16","⅛":"frac18","⅔":"frac23","⅖":"frac25","¾":"frac34","⅗":"frac35","⅜":"frac38","⅘":"frac45","⅚":"frac56","⅝":"frac58","⅞":"frac78","⁄":"frasl","⌢":"frown","𝒻":"fscr","ǵ":"gacute","Γ":"Gamma","γ":"gamma","Ϝ":"Gammad","⪆":"gap","Ğ":"Gbreve","ğ":"gbreve","Ģ":"Gcedil","Ĝ":"Gcirc","ĝ":"gcirc","Г":"Gcy","г":"gcy","Ġ":"Gdot","ġ":"gdot","≥":"ge","≧":"gE","⪌":"gEl","⋛":"gel","⩾":"ges","⪩":"gescc","⪀":"gesdot","⪂":"gesdoto","⪄":"gesdotol","⋛︀":"gesl","⪔":"gesles","𝔊":"Gfr","𝔤":"gfr","≫":"gg","⋙":"Gg","ℷ":"gimel","Ѓ":"GJcy","ѓ":"gjcy","⪥":"gla","≷":"gl","⪒":"glE","⪤":"glj","⪊":"gnap","⪈":"gne","≩":"gnE","⋧":"gnsim","𝔾":"Gopf","𝕘":"gopf","⪢":"GreaterGreater","≳":"gsim","𝒢":"Gscr","ℊ":"gscr","⪎":"gsime","⪐":"gsiml","⪧":"gtcc","⩺":"gtcir",">":"gt","⋗":"gtdot","⦕":"gtlPar","⩼":"gtquest","⥸":"gtrarr","≩︀":"gvnE"," ":"hairsp","ℋ":"Hscr","Ъ":"HARDcy","ъ":"hardcy","⥈":"harrcir","↔":"harr","↭":"harrw","^":"Hat","ℏ":"hbar","Ĥ":"Hcirc","ĥ":"hcirc","♥":"hearts","…":"mldr","⊹":"hercon","𝔥":"hfr","ℌ":"Hfr","⤥":"searhk","⤦":"swarhk","⇿":"hoarr","∻":"homtht","↩":"larrhk","↪":"rarrhk","𝕙":"hopf","ℍ":"Hopf","―":"horbar","𝒽":"hscr","Ħ":"Hstrok","ħ":"hstrok","⁃":"hybull","Í":"Iacute","í":"iacute","":"ic","Î":"Icirc","î":"icirc","И":"Icy","и":"icy","İ":"Idot","Е":"IEcy","е":"iecy","¡":"iexcl","𝔦":"ifr","ℑ":"Im","Ì":"Igrave","ì":"igrave","ⅈ":"ii","⨌":"qint","∭":"tint","⧜":"iinfin","℩":"iiota","IJ":"IJlig","ij":"ijlig","Ī":"Imacr","ī":"imacr","ℐ":"Iscr","ı":"imath","⊷":"imof","Ƶ":"imped","℅":"incare","∞":"infin","⧝":"infintie","⊺":"intcal","∫":"int","∬":"Int","ℤ":"Zopf","⨗":"intlarhk","⨼":"iprod","":"it","Ё":"IOcy","ё":"iocy","Į":"Iogon","į":"iogon","𝕀":"Iopf","𝕚":"iopf","Ι":"Iota","ι":"iota","¿":"iquest","𝒾":"iscr","⋵":"isindot","⋹":"isinE","⋴":"isins","⋳":"isinsv","Ĩ":"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","ℒ":"Lscr","Λ":"Lambda","λ":"lambda","⟨":"lang","⟪":"Lang","⦑":"langd","⪅":"lap","«":"laquo","⇤":"larrb","⤟":"larrbfs","←":"larr","↞":"Larr","⤝":"larrfs","↫":"larrlp","⤹":"larrpl","⥳":"larrsim","↢":"larrtl","⤙":"latail","⤛":"lAtail","⪫":"lat","⪭":"late","⪭︀":"lates","⤌":"lbarr","⤎":"lBarr","❲":"lbbrk","{":"lcub","[":"lsqb","⦋":"lbrke","⦏":"lbrksld","⦍":"lbrkslu","Ľ":"Lcaron","ľ":"lcaron","Ļ":"Lcedil","ļ":"lcedil","⌈":"lceil","Л":"Lcy","л":"lcy","⤶":"ldca","“":"ldquo","⥧":"ldrdhar","⥋":"ldrushar","↲":"ldsh","≤":"le","≦":"lE","⇆":"lrarr","⟦":"lobrk","⥡":"LeftDownTeeVector","⥙":"LeftDownVectorBar","⌊":"lfloor","↼":"lharu","⇇":"llarr","⇋":"lrhar","⥎":"LeftRightVector","↤":"mapstoleft","⥚":"LeftTeeVector","⋋":"lthree","⧏":"LeftTriangleBar","⊲":"vltri","⊴":"ltrie","⥑":"LeftUpDownVector","⥠":"LeftUpTeeVector","⥘":"LeftUpVectorBar","↿":"uharl","⥒":"LeftVectorBar","⪋":"lEg","⋚":"leg","⩽":"les","⪨":"lescc","⩿":"lesdot","⪁":"lesdoto","⪃":"lesdotor","⋚︀":"lesg","⪓":"lesges","⋖":"ltdot","≶":"lg","⪡":"LessLess","≲":"lsim","⥼":"lfisht","𝔏":"Lfr","𝔩":"lfr", "⪑":"lgE","⥢":"lHar","⥪":"lharul","▄":"lhblk","Љ":"LJcy","љ":"ljcy","≪":"ll","⋘":"Ll","⥫":"llhard","◺":"lltri","Ŀ":"Lmidot","ŀ":"lmidot","⎰":"lmoust","⪉":"lnap","⪇":"lne","≨":"lnE","⋦":"lnsim","⟬":"loang","⇽":"loarr","⟵":"xlarr","⟷":"xharr","⟼":"xmap","⟶":"xrarr","↬":"rarrlp","⦅":"lopar","𝕃":"Lopf","𝕝":"lopf","⨭":"loplus","⨴":"lotimes","∗":"lowast",_:"lowbar","↙":"swarr","↘":"searr","◊":"loz","(":"lpar","⦓":"lparlt","⥭":"lrhard","":"lrm","⊿":"lrtri","‹":"lsaquo","𝓁":"lscr","↰":"lsh","⪍":"lsime","⪏":"lsimg","‘":"lsquo","‚":"sbquo","Ł":"Lstrok","ł":"lstrok","⪦":"ltcc","⩹":"ltcir","<":"lt","⋉":"ltimes","⥶":"ltlarr","⩻":"ltquest","◃":"ltri","⦖":"ltrPar","⥊":"lurdshar","⥦":"luruhar","≨︀":"lvnE","¯":"macr","♂":"male","✠":"malt","⤅":"Map","↦":"map","↥":"mapstoup","▮":"marker","⨩":"mcomma","М":"Mcy","м":"mcy","—":"mdash","∺":"mDDot"," ":"MediumSpace","ℳ":"Mscr","𝔐":"Mfr","𝔪":"mfr","℧":"mho","µ":"micro","⫰":"midcir","∣":"mid","−":"minus","⨪":"minusdu","∓":"mp","⫛":"mlcp","⊧":"models","𝕄":"Mopf","𝕞":"mopf","𝓂":"mscr","Μ":"Mu","μ":"mu","⊸":"mumap","Ń":"Nacute","ń":"nacute","∠⃒":"nang","≉":"nap","⩰̸":"napE","≋̸":"napid","ʼn":"napos","♮":"natur","ℕ":"Nopf"," ":"nbsp","≎̸":"nbump","≏̸":"nbumpe","⩃":"ncap","Ň":"Ncaron","ň":"ncaron","Ņ":"Ncedil","ņ":"ncedil","≇":"ncong","⩭̸":"ncongdot","⩂":"ncup","Н":"Ncy","н":"ncy","–":"ndash","⤤":"nearhk","↗":"nearr","⇗":"neArr","≠":"ne","≐̸":"nedot","":"ZeroWidthSpace","≢":"nequiv","⤨":"toea","≂̸":"nesim","\n":"NewLine","∄":"nexist","𝔑":"Nfr","𝔫":"nfr","≧̸":"ngE","≱":"nge","⩾̸":"nges","⋙̸":"nGg","≵":"ngsim","≫⃒":"nGt","≯":"ngt","≫̸":"nGtv","↮":"nharr","⇎":"nhArr","⫲":"nhpar","∋":"ni","⋼":"nis","⋺":"nisd","Њ":"NJcy","њ":"njcy","↚":"nlarr","⇍":"nlArr","‥":"nldr","≦̸":"nlE","≰":"nle","⩽̸":"nles","≮":"nlt","⋘̸":"nLl","≴":"nlsim","≪⃒":"nLt","⋪":"nltri","⋬":"nltrie","≪̸":"nLtv","∤":"nmid","":"NoBreak","𝕟":"nopf","⫬":"Not","¬":"not","≭":"NotCupCap","∦":"npar","∉":"notin","≹":"ntgl","⋵̸":"notindot","⋹̸":"notinE","⋷":"notinvb","⋶":"notinvc","⧏̸":"NotLeftTriangleBar","≸":"ntlg","⪢̸":"NotNestedGreaterGreater","⪡̸":"NotNestedLessLess","∌":"notni","⋾":"notnivb","⋽":"notnivc","⊀":"npr","⪯̸":"npre","⋠":"nprcue","⧐̸":"NotRightTriangleBar","⋫":"nrtri","⋭":"nrtrie","⊏̸":"NotSquareSubset","⋢":"nsqsube","⊐̸":"NotSquareSuperset","⋣":"nsqsupe","⊂⃒":"vnsub","⊈":"nsube","⊁":"nsc","⪰̸":"nsce","⋡":"nsccue","≿̸":"NotSucceedsTilde","⊃⃒":"vnsup","⊉":"nsupe","≁":"nsim","≄":"nsime","⫽⃥":"nparsl","∂̸":"npart","⨔":"npolint","⤳̸":"nrarrc","↛":"nrarr","⇏":"nrArr","↝̸":"nrarrw","𝒩":"Nscr","𝓃":"nscr","⊄":"nsub","⫅̸":"nsubE","⊅":"nsup","⫆̸":"nsupE","Ñ":"Ntilde","ñ":"ntilde","Ν":"Nu","ν":"nu","#":"num","№":"numero"," ":"numsp","≍⃒":"nvap","⊬":"nvdash","⊭":"nvDash","⊮":"nVdash","⊯":"nVDash","≥⃒":"nvge",">⃒":"nvgt","⤄":"nvHarr","⧞":"nvinfin","⤂":"nvlArr","≤⃒":"nvle","<⃒":"nvlt","⊴⃒":"nvltrie","⤃":"nvrArr","⊵⃒":"nvrtrie","∼⃒":"nvsim","⤣":"nwarhk","↖":"nwarr","⇖":"nwArr","⤧":"nwnear","Ó":"Oacute","ó":"oacute","Ô":"Ocirc","ô":"ocirc","О":"Ocy","о":"ocy","Ő":"Odblac","ő":"odblac","⨸":"odiv","⦼":"odsold","Œ":"OElig","œ":"oelig","⦿":"ofcir","𝔒":"Ofr","𝔬":"ofr","˛":"ogon","Ò":"Ograve","ò":"ograve","⧁":"ogt","⦵":"ohbar","Ω":"ohm","⦾":"olcir","⦻":"olcross","‾":"oline","⧀":"olt","Ō":"Omacr","ō":"omacr","ω":"omega","Ο":"Omicron","ο":"omicron","⦶":"omid","𝕆":"Oopf","𝕠":"oopf","⦷":"opar","⦹":"operp","⩔":"Or","∨":"or","⩝":"ord","ℴ":"oscr","ª":"ordf","º":"ordm","⊶":"origof","⩖":"oror","⩗":"orslope","⩛":"orv","𝒪":"Oscr","Ø":"Oslash","ø":"oslash","⊘":"osol","Õ":"Otilde","õ":"otilde","⨶":"otimesas","⨷":"Otimes","Ö":"Ouml","ö":"ouml","⌽":"ovbar","⏞":"OverBrace","⎴":"tbrk","⏜":"OverParenthesis","¶":"para","⫳":"parsim","⫽":"parsl","∂":"part","П":"Pcy","п":"pcy","%":"percnt",".":"period","‰":"permil","‱":"pertenk","𝔓":"Pfr","𝔭":"pfr","Φ":"Phi","φ":"phi","ϕ":"phiv","☎":"phone","Π":"Pi","π":"pi","ϖ":"piv","ℎ":"planckh","⨣":"plusacir","⨢":"pluscir","+":"plus","⨥":"plusdu","⩲":"pluse","±":"pm","⨦":"plussim","⨧":"plustwo","⨕":"pointint","𝕡":"popf","ℙ":"Popf","£":"pound","⪷":"prap","⪻":"Pr","≺":"pr","≼":"prcue","⪯":"pre","≾":"prsim","⪹":"prnap","⪵":"prnE","⋨":"prnsim","⪳":"prE","′":"prime","″":"Prime","∏":"prod","⌮":"profalar","⌒":"profline","⌓":"profsurf","∝":"prop","⊰":"prurel","𝒫":"Pscr","𝓅":"pscr","Ψ":"Psi","ψ":"psi"," ":"puncsp","𝔔":"Qfr","𝔮":"qfr","𝕢":"qopf","ℚ":"Qopf","⁗":"qprime","𝒬":"Qscr","𝓆":"qscr","⨖":"quatint","?":"quest",'"':"quot","⇛":"rAarr","∽̱":"race","Ŕ":"Racute","ŕ":"racute","√":"Sqrt","⦳":"raemptyv","⟩":"rang","⟫":"Rang","⦒":"rangd","⦥":"range","»":"raquo","⥵":"rarrap","⇥":"rarrb","⤠":"rarrbfs","⤳":"rarrc","→":"rarr","↠":"Rarr","⤞":"rarrfs","⥅":"rarrpl","⥴":"rarrsim","⤖":"Rarrtl","↣":"rarrtl","↝":"rarrw","⤚":"ratail","⤜":"rAtail","∶":"ratio","❳":"rbbrk","}":"rcub","]":"rsqb","⦌":"rbrke","⦎":"rbrksld","⦐":"rbrkslu","Ř":"Rcaron","ř":"rcaron","Ŗ":"Rcedil","ŗ":"rcedil","⌉":"rceil","Р":"Rcy","р":"rcy","⤷":"rdca","⥩":"rdldhar","↳":"rdsh","ℜ":"Re","ℛ":"Rscr","ℝ":"Ropf","▭":"rect","⥽":"rfisht","⌋":"rfloor","𝔯":"rfr","⥤":"rHar","⇀":"rharu","⥬":"rharul","Ρ":"Rho","ρ":"rho","ϱ":"rhov","⇄":"rlarr","⟧":"robrk","⥝":"RightDownTeeVector","⥕":"RightDownVectorBar","⇉":"rrarr","⊢":"vdash","⥛":"RightTeeVector","⋌":"rthree","⧐":"RightTriangleBar","⊳":"vrtri","⊵":"rtrie","⥏":"RightUpDownVector","⥜":"RightUpTeeVector","⥔":"RightUpVectorBar","↾":"uharr","⥓":"RightVectorBar","˚":"ring","":"rlm","⎱":"rmoust","⫮":"rnmid","⟭":"roang","⇾":"roarr","⦆":"ropar","𝕣":"ropf","⨮":"roplus","⨵":"rotimes","⥰":"RoundImplies",")":"rpar","⦔":"rpargt","⨒":"rppolint","›":"rsaquo","𝓇":"rscr","↱":"rsh","⋊":"rtimes","▹":"rtri","⧎":"rtriltri","⧴":"RuleDelayed","⥨":"ruluhar","℞":"rx","Ś":"Sacute","ś":"sacute","⪸":"scap","Š":"Scaron","š":"scaron","⪼":"Sc","≻":"sc","≽":"sccue","⪰":"sce","⪴":"scE","Ş":"Scedil","ş":"scedil","Ŝ":"Scirc","ŝ":"scirc","⪺":"scnap","⪶":"scnE","⋩":"scnsim","⨓":"scpolint","≿":"scsim","С":"Scy","с":"scy","⋅":"sdot","⩦":"sdote","⇘":"seArr","§":"sect",";":"semi","⤩":"tosa","✶":"sext","𝔖":"Sfr","𝔰":"sfr","♯":"sharp","Щ":"SHCHcy","щ":"shchcy","Ш":"SHcy","ш":"shcy","↑":"uarr","":"shy","Σ":"Sigma","σ":"sigma","ς":"sigmaf","∼":"sim","⩪":"simdot","≃":"sime","⪞":"simg","⪠":"simgE","⪝":"siml","⪟":"simlE","≆":"simne","⨤":"simplus","⥲":"simrarr","⨳":"smashp","⧤":"smeparsl","⌣":"smile","⪪":"smt","⪬":"smte","⪬︀":"smtes","Ь":"SOFTcy","ь":"softcy","⌿":"solbar","⧄":"solb","/":"sol","𝕊":"Sopf","𝕤":"sopf","♠":"spades","⊓":"sqcap","⊓︀":"sqcaps","⊔":"sqcup","⊔︀":"sqcups","⊏":"sqsub","⊑":"sqsube","⊐":"sqsup","⊒":"sqsupe","□":"squ","𝒮":"Sscr","𝓈":"sscr","⋆":"Star","☆":"star","⊂":"sub","⋐":"Sub","⪽":"subdot","⫅":"subE","⊆":"sube","⫃":"subedot","⫁":"submult","⫋":"subnE","⊊":"subne","⪿":"subplus","⥹":"subrarr","⫇":"subsim","⫕":"subsub","⫓":"subsup","∑":"sum","♪":"sung","¹":"sup1","²":"sup2","³":"sup3","⊃":"sup","⋑":"Sup","⪾":"supdot","⫘":"supdsub","⫆":"supE","⊇":"supe","⫄":"supedot","⟉":"suphsol","⫗":"suphsub","⥻":"suplarr","⫂":"supmult","⫌":"supnE","⊋":"supne","⫀":"supplus","⫈":"supsim","⫔":"supsub","⫖":"supsup","⇙":"swArr","⤪":"swnwar","ß":"szlig"," ":"Tab","⌖":"target","Τ":"Tau","τ":"tau","Ť":"Tcaron","ť":"tcaron","Ţ":"Tcedil","ţ":"tcedil","Т":"Tcy","т":"tcy","⃛":"tdot","⌕":"telrec","𝔗":"Tfr","𝔱":"tfr","∴":"there4","Θ":"Theta","θ":"theta","ϑ":"thetav"," ":"ThickSpace"," ":"thinsp","Þ":"THORN","þ":"thorn","⨱":"timesbar","×":"times","⨰":"timesd","⌶":"topbot","⫱":"topcir","𝕋":"Topf","𝕥":"topf","⫚":"topfork","‴":"tprime","™":"trade","▵":"utri","≜":"trie","◬":"tridot","⨺":"triminus","⨹":"triplus","⧍":"trisb","⨻":"tritime","⏢":"trpezium","𝒯":"Tscr","𝓉":"tscr","Ц":"TScy","ц":"tscy","Ћ":"TSHcy","ћ":"tshcy","Ŧ":"Tstrok","ŧ":"tstrok","Ú":"Uacute","ú":"uacute","↟":"Uarr","⥉":"Uarrocir","Ў":"Ubrcy","ў":"ubrcy","Ŭ":"Ubreve","ŭ":"ubreve","Û":"Ucirc","û":"ucirc","У":"Ucy","у":"ucy","⇅":"udarr","Ű":"Udblac","ű":"udblac","⥮":"udhar","⥾":"ufisht","𝔘":"Ufr","𝔲":"ufr","Ù":"Ugrave","ù":"ugrave","⥣":"uHar","▀":"uhblk","⌜":"ulcorn","⌏":"ulcrop","◸":"ultri","Ū":"Umacr","ū":"umacr","⏟":"UnderBrace","⏝":"UnderParenthesis","⊎":"uplus","Ų":"Uogon","ų":"uogon","𝕌":"Uopf","𝕦":"uopf","⤒":"UpArrowBar","↕":"varr","υ":"upsi","ϒ":"Upsi","Υ":"Upsilon","⇈":"uuarr","⌝":"urcorn","⌎":"urcrop","Ů":"Uring","ů":"uring","◹":"urtri","𝒰":"Uscr","𝓊":"uscr","⋰":"utdot","Ũ":"Utilde","ũ":"utilde","Ü":"Uuml","ü":"uuml","⦧":"uwangle","⦜":"vangrt","⊊︀":"vsubne","⫋︀":"vsubnE","⊋︀":"vsupne","⫌︀":"vsupnE","⫨":"vBar","⫫":"Vbar","⫩":"vBarv","В":"Vcy","в":"vcy","⊩":"Vdash","⊫":"VDash","⫦":"Vdashl","⊻":"veebar","≚":"veeeq","⋮":"vellip","|":"vert","‖":"Vert","❘":"VerticalSeparator","≀":"wr","𝔙":"Vfr","𝔳":"vfr","𝕍":"Vopf","𝕧":"vopf","𝒱":"Vscr","𝓋":"vscr","⊪":"Vvdash","⦚":"vzigzag","Ŵ":"Wcirc","ŵ":"wcirc","⩟":"wedbar","≙":"wedgeq","℘":"wp","𝔚":"Wfr","𝔴":"wfr","𝕎":"Wopf","𝕨":"wopf","𝒲":"Wscr","𝓌":"wscr","𝔛":"Xfr","𝔵":"xfr","Ξ":"Xi","ξ":"xi","⋻":"xnis","𝕏":"Xopf","𝕩":"xopf","𝒳":"Xscr","𝓍":"xscr","Ý":"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","ℨ":"Zfr","Ζ":"Zeta","ζ":"zeta","𝔷":"zfr","Ж":"ZHcy","ж":"zhcy","⇝":"zigrarr","𝕫":"zopf","𝒵":"Zscr","𝓏":"zscr","":"zwj","":"zwnj"},f=/["&'<>`]/g,d={'"':""","&":"&","'":"'","<":"<",">":">","`":"`"},p=/&#(?:[xX][^a-fA-F0-9]|[^0-9xX])/,g=/[\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]/,y=/&#([0-9]+)(;?)|&#[xX]([a-fA-F0-9]+)(;?)|&([0-9a-zA-Z]+);|&(Aacute|iacute|Uacute|plusmn|otilde|Otilde|Agrave|agrave|yacute|Yacute|oslash|Oslash|Atilde|atilde|brvbar|Ccedil|ccedil|ograve|curren|divide|Eacute|eacute|Ograve|oacute|Egrave|egrave|ugrave|frac12|frac14|frac34|Ugrave|Oacute|Iacute|ntilde|Ntilde|uacute|middot|Igrave|igrave|iquest|aacute|laquo|THORN|micro|iexcl|icirc|Icirc|Acirc|ucirc|ecirc|Ocirc|ocirc|Ecirc|Ucirc|aring|Aring|aelig|AElig|acute|pound|raquo|acirc|times|thorn|szlig|cedil|COPY|Auml|ordf|ordm|uuml|macr|Uuml|auml|Ouml|ouml|para|nbsp|Euml|quot|QUOT|euml|yuml|cent|sect|copy|sup1|sup2|sup3|Iuml|iuml|shy|eth|reg|not|yen|amp|AMP|REG|uml|ETH|deg|gt|GT|LT|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:"&",andand:"⩕",And:"⩓",and:"∧",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angmsd:"∡",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",apacir:"⩯",ap:"≈",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:"⋍",bsolb:"⧅",bsol:"\\",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",capand:"⩄",capbrcup:"⩉",capcap:"⩋",cap:"∩",Cap:"⋒",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:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cir:"○",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:"⤽",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cup:"∪",Cup:"⋓",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:"д",ddagger:"‡",ddarr:"⇊",DD:"ⅅ",dd:"ⅆ",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:"∥",DownArrowBar:"⤓",downarrow:"↓",DownArrow:"↓",Downarrow:"⇓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVectorBar:"⥖",DownLeftVector:"↽",DownRightTeeVector:"⥟",DownRightVectorBar:"⥗",DownRightVector:"⇁",DownTeeArrow:"↧",DownTee:"⊤",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",Ecirc:"Ê",ecirc:"ê",ecir:"≖",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:"▫",emsp13:" ",emsp14:" ",emsp:" ",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:"⩾",gescc:"⪩",ges:"⩾",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gla:"⪥",gl:"≷",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gt:">",GT:">",Gt:"≫",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",harrcir:"⥈",harr:"↔",hArr:"⇔",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",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",Im:"ℑ",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"℅","in":"∈",infin:"∞",infintie:"⧝",inodot:"ı",intcal:"⊺","int":"∫",Int:"∬",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:"«",larrb:"⇤",larrbfs:"⤟",larr:"←",Larr:"↞",lArr:"⇐",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",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:"⟨",LeftArrowBar:"⇤",leftarrow:"←",LeftArrow:"←",Leftarrow:"⇐",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangleBar:"⧏",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",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:"љ",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoustache:"⎰",lmoust:"⎰",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:"ł",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",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:"µ",midast:"*",midcir:"⫰",mid:"∣",middot:"·",minusb:"⊟",minus:"−",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:"≉",natural:"♮",naturals:"ℕ",natur:"♮",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",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:"⋶",NotLeftTriangleBar:"⧏̸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangleBar:"⧐̸",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"⇏",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:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",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:"⊕",orarr:"↻",Or:"⩔",or:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",para:"¶",parallel:"∥",par:"∥",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:"ℏ",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportional:"∝",Proportion:"∷",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:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",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:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",Re:"ℜ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"⧐",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoustache:"⎱",rmoust:"⎱",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:"‚",scap:"⪸",Scaron:"Š",scaron:"š",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdotb:"⊡",sdot:"⋅",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:"ь",solbar:"⌿",solb:"⧄",sol:"/",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squ:"□",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:"⫓",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"⋑",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:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴", therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:" ",ThinSpace:" ",thinsp:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"⊤",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:"𝕦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTeeArrow:"↥",UpTee:"⊥",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:"⫦",veebar:"⊻",vee:"∨",Vee:"⋁",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:""},v={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:"ÿ"},_={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:"Ÿ"},b=[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],w=String.fromCharCode,A={},x=A.hasOwnProperty,k=function(t,e){return x.call(t,e)},E=function(t,e){for(var r=-1,n=t.length;++r<n;)if(t[r]==e)return!0;return!1},D=function(t,e){if(!t)return e;var r,n={};for(r in e)n[r]=k(t,r)?t[r]:e[r];return n},C=function(t,e){var r="";return t>=55296&&57343>=t||t>1114111?(e&&T("character reference outside the permissible Unicode range"),"�"):k(_,t)?(e&&T("disallowed character reference"),_[t]):(e&&E(b,t)&&T("disallowed character reference"),t>65535&&(t-=65536,r+=w(t>>>10&1023|55296),t=56320|1023&t),r+=w(t))},S=function(t){return"&#x"+t.charCodeAt(0).toString(16).toUpperCase()+";"},T=function(t){throw Error("Parse error: "+t)},F=function(t,e){e=D(e,F.options);var r=e.strict;r&&g.test(t)&&T("forbidden code point");var n=e.encodeEverything,i=e.useNamedReferences,a=e.allowUnsafeSymbols;return n?(t=t.replace(u,function(t){return i&&k(h,t)?"&"+h[t]+";":S(t)}),i&&(t=t.replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒").replace(/fj/g,"fj")),i&&(t=t.replace(l,function(t){return"&"+h[t]+";"}))):i?(a||(t=t.replace(f,function(t){return"&"+h[t]+";"})),t=t.replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒"),t=t.replace(l,function(t){return"&"+h[t]+";"})):a||(t=t.replace(f,S)),t.replace(s,function(t){var e=t.charCodeAt(0),r=t.charCodeAt(1),n=1024*(e-55296)+r-56320+65536;return"&#x"+n.toString(16).toUpperCase()+";"}).replace(c,S)};F.options={allowUnsafeSymbols:!1,encodeEverything:!1,strict:!1,useNamedReferences:!1};var B=function(t,e){e=D(e,B.options);var r=e.strict;return r&&p.test(t)&&T("malformed character reference"),t.replace(y,function(t,n,i,a,o,s,u,c){var l,h,f,d,p;return n?(l=n,h=i,r&&!h&&T("character reference was not terminated by a semicolon"),C(l,r)):a?(f=a,h=o,r&&!h&&T("character reference was not terminated by a semicolon"),l=parseInt(f,16),C(l,r)):s?(d=s,k(m,d)?m[d]:(r&&T("named character reference was not terminated by a semicolon"),t)):(d=u,p=c,p&&e.isAttributeValue?(r&&"="==p&&T("`&` did not start a character reference"),t):(r&&T("named character reference was not terminated by a semicolon"),v[d]+(p||"")))})};B.options={isAttributeValue:!1,strict:!1};var L=function(t){return t.replace(f,function(t){return d[t]})},O={version:"0.5.0",encode:F,decode:B,escape:L,unescape:B};if("function"==typeof define&&"object"==typeof define.amd&&define.amd)define(function(){return O});else if(i&&!i.nodeType)if(a)a.exports=O;else for(var I in O)k(O,I)&&(i[I]=O[I]);else n.he=O}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],103:[function(t,e,r){(function(t){(function(){function n(t,e){return t.set(e[0],e[1]),t}function i(t,e){return t.add(e),t}function a(t,e,r){var n=r.length;switch(n){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function o(t,e,r,n){for(var i=-1,a=t?t.length:0;++i<a;){var o=t[i];e(n,o,r(o),t)}return n}function s(t,e){for(var r=-1,n=t?t.length:0;++r<n&&e(t[r],r,t)!==!1;);return t}function u(t,e){for(var r=t?t.length:0;r--&&e(t[r],r,t)!==!1;);return t}function c(t,e){for(var r=-1,n=t?t.length:0;++r<n;)if(!e(t[r],r,t))return!1;return!0}function l(t,e){for(var r=-1,n=t?t.length:0,i=0,a=[];++r<n;){var o=t[r];e(o,r,t)&&(a[i++]=o)}return a}function h(t,e){var r=t?t.length:0;return!!r&&b(t,e,0)>-1}function f(t,e,r){for(var n=-1,i=t?t.length:0;++n<i;)if(r(e,t[n]))return!0;return!1}function d(t,e){for(var r=-1,n=t?t.length:0,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}function p(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}function g(t,e,r,n){var i=-1,a=t?t.length:0;for(n&&a&&(r=t[++i]);++i<a;)r=e(r,t[i],i,t);return r}function y(t,e,r,n){var i=t?t.length:0;for(n&&i&&(r=t[--i]);i--;)r=e(r,t[i],i,t);return r}function m(t,e){for(var r=-1,n=t?t.length:0;++r<n;)if(e(t[r],r,t))return!0;return!1}function v(t,e,r){var n;return r(t,function(t,r,i){return e(t,r,i)?(n=r,!1):void 0}),n}function _(t,e,r,n){for(var i=t.length,a=r+(n?1:-1);n?a--:++a<i;)if(e(t[a],a,t))return a;return-1}function b(t,e,r){if(e!==e)return j(t,r);for(var n=r-1,i=t.length;++n<i;)if(t[n]===e)return n;return-1}function w(t,e,r,n){for(var i=r-1,a=t.length;++i<a;)if(n(t[i],e))return i;return-1}function A(t,e){var r=t?t.length:0;return r?E(t,e)/r:kt}function x(t,e,r,n,i){return i(t,function(t,i,a){r=n?(n=!1,t):e(r,t,i,a)}),r}function k(t,e){var r=t.length;for(t.sort(e);r--;)t[r]=t[r].value;return t}function E(t,e){for(var r,n=-1,i=t.length;++n<i;){var a=e(t[n]);a!==X&&(r=r===X?a:r+a)}return r}function D(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}function C(t,e){return d(e,function(e){return[e,t[e]]})}function S(t){return function(e){return t(e)}}function T(t,e){return d(e,function(e){return t[e]})}function F(t,e){return t.has(e)}function B(t,e){for(var r=-1,n=t.length;++r<n&&b(e,t[r],0)>-1;);return r}function L(t,e){for(var r=t.length;r--&&b(e,t[r],0)>-1;);return r}function O(t){return t&&t.Object===Object?t:null}function I(t,e){for(var r=t.length,n=0;r--;)t[r]===e&&n++;return n}function R(t){return Dr[t]}function M(t){return Cr[t]}function N(t){return"\\"+Tr[t]}function P(t,e){return null==t?X:t[e]}function j(t,e,r){for(var n=t.length,i=e+(r?1:-1);r?i--:++i<n;){var a=t[i];if(a!==a)return i}return-1}function q(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(r){}return e}function U(t){for(var e,r=[];!(e=t.next()).done;)r.push(e.value);return r}function Y(t){var e=-1,r=Array(t.size);return t.forEach(function(t,n){r[++e]=[n,t]}),r}function $(t,e){for(var r=-1,n=t.length,i=0,a=[];++r<n;){var o=t[r];(o===e||o===et)&&(t[r]=et,a[i++]=r)}return a}function V(t){var e=-1,r=Array(t.size);return t.forEach(function(t){r[++e]=t}),r}function G(t){var e=-1,r=Array(t.size);return t.forEach(function(t){r[++e]=[t,t]}),r}function W(t){if(!t||!br.test(t))return t.length;for(var e=vr.lastIndex=0;vr.test(t);)e++;return e}function H(t){return t.match(vr)}function z(t){return Sr[t]}function Z(t){function e(t){if(vs(t)&&!yh(t)&&!(t instanceof Oe)){if(t instanceof O)return t;if(Tc.call(t,"__wrapped__"))return ha(t)}return new O(t)}function r(){}function O(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=X}function Oe(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Et,this.__views__=[]}function Ie(){var t=new Oe(this.__wrapped__);return t.__actions__=ri(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=ri(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=ri(this.__views__),t}function Re(){if(this.__filtered__){var t=new Oe(this);t.__dir__=-1,t.__filtered__=!0}else t=this.clone(),t.__dir__*=-1;return t}function Me(){var t=this.__wrapped__.value(),e=this.__dir__,r=yh(t),n=0>e,i=r?t.length:0,a=Yi(0,i,this.__views__),o=a.start,s=a.end,u=s-o,c=n?s:o-1,l=this.__iteratees__,h=l.length,f=0,d=Qc(u,this.__takeCount__);if(!r||J>i||i==u&&d==u)return Nn(t,this.__actions__);var p=[];t:for(;u--&&d>f;){c+=e;for(var g=-1,y=t[c];++g<h;){var m=l[g],v=m.iteratee,_=m.type,b=v(y);if(_==_t)y=b;else if(!b){if(_==vt)continue t;break t}}p[f++]=y}return p}function Ne(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Pe(){this.__data__=ll?ll(null):{}}function je(t){return this.has(t)&&delete this.__data__[t]}function qe(t){var e=this.__data__;if(ll){var r=e[t];return r===tt?X:r}return Tc.call(e,t)?e[t]:X}function Ue(t){var e=this.__data__;return ll?e[t]!==X:Tc.call(e,t)}function Ye(t,e){var r=this.__data__;return r[t]=ll&&e===X?tt:e,this}function $e(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Ve(){this.__data__=[]}function Ge(t){var e=this.__data__,r=dr(e,t);if(0>r)return!1;var n=e.length-1;return r==n?e.pop():Vc.call(e,r,1),!0}function We(t){var e=this.__data__,r=dr(e,t);return 0>r?X:e[r][1]}function He(t){return dr(this.__data__,t)>-1}function ze(t,e){var r=this.__data__,n=dr(r,t);return 0>n?r.push([t,e]):r[n][1]=e,this}function Ze(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Xe(){this.__data__={hash:new Ne,map:new(ol||$e),string:new Ne}}function Ke(t){return Mi(this,t)["delete"](t)}function Je(t){return Mi(this,t).get(t)}function Qe(t){return Mi(this,t).has(t)}function tr(t,e){return Mi(this,t).set(t,e),this}function er(t){var e=-1,r=t?t.length:0;for(this.__data__=new Ze;++e<r;)this.add(t[e])}function rr(t){return this.__data__.set(t,tt),this}function nr(t){return this.__data__.has(t)}function ir(t){this.__data__=new $e(t)}function ar(){this.__data__=new $e}function or(t){return this.__data__["delete"](t)}function sr(t){return this.__data__.get(t)}function ur(t){return this.__data__.has(t)}function cr(t,e){var r=this.__data__;return r instanceof $e&&r.__data__.length==J&&(r=this.__data__=new Ze(r.__data__)),r.set(t,e),this}function lr(t,e,r,n){return t===X||es(t,kc[r])&&!Tc.call(n,r)?e:t}function hr(t,e,r){(r!==X&&!es(t[e],r)||"number"==typeof e&&r===X&&!(e in t))&&(t[e]=r)}function fr(t,e,r){var n=t[e];Tc.call(t,e)&&es(n,r)&&(r!==X||e in t)||(t[e]=r)}function dr(t,e){for(var r=t.length;r--;)if(es(t[r][0],e))return r;return-1}function pr(t,e,r,n){return Al(t,function(t,i,a){e(n,t,r(t),a)}),n}function gr(t,e){return t&&ni(e,nu(e),t)}function vr(t,e){for(var r=-1,n=null==t,i=e.length,a=Array(i);++r<i;)a[r]=n?X:tu(t,e[r]);return a}function Dr(t,e,r){return t===t&&(r!==X&&(t=r>=t?t:r),e!==X&&(t=t>=e?t:e)),t}function Cr(t,e,r,n,i,a,o){var u;if(n&&(u=a?n(t,i,a,o):n(t)),u!==X)return u;if(!ms(t))return t;var c=yh(t);if(c){if(u=Vi(t),!e)return ri(t,u)}else{var l=Ui(t),h=l==Ot||l==It;if(mh(t))return Vn(t,e);if(l==Nt||l==St||h&&!a){if(q(t))return a?t:{};if(u=Gi(h?{}:t),!e)return ii(t,gr(u,t))}else{if(!Er[l])return a?t:{};u=Wi(t,l,Cr,e)}}o||(o=new ir);var f=o.get(t);if(f)return f;if(o.set(t,u),!c)var d=r?Bi(t):nu(t);return s(d||t,function(i,a){d&&(a=i,i=t[a]),fr(u,a,Cr(i,e,r,n,a,t,o))}),u}function Sr(t){var e=nu(t),r=e.length;return function(n){if(null==n)return!r;for(var i=r;i--;){var a=e[i],o=t[a],s=n[a];if(s===X&&!(a in Object(n))||!o(s))return!1}return!0}}function Tr(t){return ms(t)?Yc(t):{}}function Lr(t,e,r){if("function"!=typeof t)throw new Ac(Q);return Gc(function(){t.apply(X,r)},e)}function Or(t,e,r,n){var i=-1,a=h,o=!0,s=t.length,u=[],c=e.length;if(!s)return u;r&&(e=d(e,S(r))),n?(a=f,o=!1):e.length>=J&&(a=F,o=!1,e=new er(e));t:for(;++i<s;){var l=t[i],p=r?r(l):l;if(l=n||0!==l?l:0,o&&p===p){for(var g=c;g--;)if(e[g]===p)continue t;u.push(l)}else a(e,p,n)||u.push(l)}return u}function Rr(t,e){var r=!0;return Al(t,function(t,n,i){return r=!!e(t,n,i)}),r}function Mr(t,e,r){for(var n=-1,i=t.length;++n<i;){var a=t[n],o=e(a);if(null!=o&&(s===X?o===o&&!Ls(o):r(o,s)))var s=o,u=a}return u}function Nr(t,e,r,n){var i=t.length;for(r=js(r),0>r&&(r=-r>i?0:i+r),n=n===X||n>i?i:js(n),0>n&&(n+=i),n=r>n?0:qs(n);n>r;)t[r++]=e;return t}function qr(t,e){var r=[];return Al(t,function(t,n,i){e(t,n,i)&&r.push(t)}),r}function Ur(t,e,r,n,i){var a=-1,o=t.length;for(r||(r=zi),i||(i=[]);++a<o;){var s=t[a];e>0&&r(s)?e>1?Ur(s,e-1,r,n,i):p(i,s):n||(i[i.length]=s)}return i}function Yr(t,e){return t&&kl(t,e,nu)}function $r(t,e){return t&&El(t,e,nu)}function Vr(t,e){return l(e,function(e){return ps(t[e])})}function Gr(t,e){e=Ji(e,t)?[e]:Yn(e);for(var r=0,n=e.length;null!=t&&n>r;)t=t[ca(e[r++])];return r&&r==n?t:X}function Wr(t,e,r){var n=e(t);return yh(t)?n:p(n,r(t))}function Hr(t,e){return t>e}function zr(t,e){return null!=t&&(Tc.call(t,e)||"object"==typeof t&&e in t&&null===ji(t))}function Zr(t,e){return null!=t&&e in Object(t)}function Xr(t,e,r){return t>=Qc(e,r)&&t<Jc(e,r)}function Kr(t,e,r){for(var n=r?f:h,i=t[0].length,a=t.length,o=a,s=Array(a),u=1/0,c=[];o--;){var l=t[o];o&&e&&(l=d(l,S(e))),u=Qc(l.length,u),s[o]=!r&&(e||i>=120&&l.length>=120)?new er(o&&l):X}l=t[0];var p=-1,g=s[0];t:for(;++p<i&&c.length<u;){var y=l[p],m=e?e(y):y;if(y=r||0!==y?y:0,!(g?F(g,m):n(c,m,r))){for(o=a;--o;){var v=s[o];if(!(v?F(v,m):n(t[o],m,r)))continue t}g&&g.push(m),c.push(y)}}return c}function Jr(t,e,r,n){return Yr(t,function(t,i,a){e(n,r(t),i,a)}),n}function Qr(t,e,r){Ji(e,t)||(e=Yn(e),t=sa(t,e),e=Fa(e));var n=null==t?t:t[ca(e)];return null==n?X:a(n,t,r)}function tn(t,e,r,n,i){return t===e?!0:null==t||null==e||!ms(t)&&!vs(e)?t!==t&&e!==e:en(t,e,tn,r,n,i)}function en(t,e,r,n,i,a){var o=yh(t),s=yh(e),u=Tt,c=Tt;o||(u=Ui(t),u=u==St?Nt:u),s||(c=Ui(e),c=c==St?Nt:c);var l=u==Nt&&!q(t),h=c==Nt&&!q(e),f=u==c;if(f&&!l)return a||(a=new ir),o||Os(t)?Si(t,e,r,n,i,a):Ti(t,e,u,r,n,i,a);if(!(i&dt)){var d=l&&Tc.call(t,"__wrapped__"),p=h&&Tc.call(e,"__wrapped__");if(d||p){var g=d?t.value():t,y=p?e.value():e;return a||(a=new ir),r(g,y,n,i,a)}}return f?(a||(a=new ir),Fi(t,e,r,n,i,a)):!1}function rn(t,e,r,n){var i=r.length,a=i,o=!n;if(null==t)return!a;for(t=Object(t);i--;){var s=r[i];if(o&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++i<a;){s=r[i];var u=s[0],c=t[u],l=s[1];if(o&&s[2]){if(c===X&&!(u in t))return!1}else{var h=new ir;if(n)var f=n(c,l,u,t,e,h);if(!(f===X?tn(l,c,n,ft|dt,h):f))return!1}}return!0}function nn(t){if(!ms(t)||ea(t))return!1;var e=ps(t)||q(t)?Ic:Ce;return e.test(la(t))}function an(t){return"function"==typeof t?t:null==t?Wu:"object"==typeof t?yh(t)?hn(t[0],t[1]):ln(t):tc(t)}function on(t){return Kc(Object(t))}function sn(t){t=null==t?t:Object(t);var e=[];for(var r in t)e.push(r);return e}function un(t,e){return e>t}function cn(t,e){var r=-1,n=is(t)?Array(t.length):[];return Al(t,function(t,i,a){n[++r]=e(t,i,a)}),n}function ln(t){var e=Ni(t);return 1==e.length&&e[0][2]?ia(e[0][0],e[0][1]):function(r){return r===t||rn(r,t,e)}}function hn(t,e){return Ji(t)&&na(e)?ia(ca(t),e):function(r){var n=tu(r,t);return n===X&&n===e?ru(r,t):tn(e,n,X,ft|dt)}}function fn(t,e,r,n,i){if(t!==e){if(!yh(e)&&!Os(e))var a=iu(e);s(a||e,function(o,s){if(a&&(s=o,o=e[s]),ms(o))i||(i=new ir),dn(t,e,s,r,fn,n,i);else{var u=n?n(t[s],o,s+"",t,e,i):X;u===X&&(u=o),hr(t,s,u)}})}}function dn(t,e,r,n,i,a,o){var s=t[r],u=e[r],c=o.get(u);if(c)return void hr(t,r,c);var l=a?a(s,u,r+"",t,e,o):X,h=l===X;h&&(l=u,yh(u)||Os(u)?yh(s)?l=s:as(s)?l=ri(s):(h=!1,l=Cr(u,!0)):Cs(u)||rs(u)?rs(s)?l=Ys(s):!ms(s)||n&&ps(s)?(h=!1,l=Cr(u,!0)):l=s:h=!1),o.set(u,l),h&&i(l,u,n,a,o),o["delete"](u),hr(t,r,l)}function pn(t,e){var r=t.length;if(r)return e+=0>e?r:0,Xi(e,r)?t[e]:X}function gn(t,e,r){var n=-1;e=d(e.length?e:[Wu],S(Ri()));var i=cn(t,function(t){var r=d(e,function(e){return e(t)});return{criteria:r,index:++n,value:t}});return k(i,function(t,e){return Qn(t,e,r)})}function yn(t,e){return t=Object(t),g(e,function(e,r){return r in t&&(e[r]=t[r]),e},{})}function mn(t,e){for(var r=-1,n=Li(t),i=n.length,a={};++r<i;){var o=n[r],s=t[o];e(s,o)&&(a[o]=s)}return a}function vn(t){return function(e){return null==e?X:e[t]}}function _n(t){return function(e){return Gr(e,t)}}function bn(t,e,r,n){var i=n?w:b,a=-1,o=e.length,s=t;for(t===e&&(e=ri(e)),r&&(s=d(t,S(r)));++a<o;)for(var u=0,c=e[a],l=r?r(c):c;(u=i(s,l,u,n))>-1;)s!==t&&Vc.call(s,u,1),Vc.call(t,u,1);return t}function wn(t,e){for(var r=t?e.length:0,n=r-1;r--;){var i=e[r];if(r==n||i!==a){var a=i;if(Xi(i))Vc.call(t,i,1);else if(Ji(i,t))delete t[ca(i)];else{var o=Yn(i),s=sa(t,o);null!=s&&delete s[ca(Fa(o))]}}}return t}function An(t,e){return t+Hc(el()*(e-t+1))}function xn(t,e,r,n){for(var i=-1,a=Jc(Wc((e-t)/(r||1)),0),o=Array(a);a--;)o[n?a:++i]=t,t+=r;return o}function kn(t,e){var r="";if(!t||1>e||e>At)return r;do e%2&&(r+=t),e=Hc(e/2),e&&(t+=t);while(e);return r}function En(t,e,r,n){e=Ji(e,t)?[e]:Yn(e);for(var i=-1,a=e.length,o=a-1,s=t;null!=s&&++i<a;){var u=ca(e[i]);if(ms(s)){var c=r;if(i!=o){var l=s[u];c=n?n(l,u,s):X,c===X&&(c=null==l?Xi(e[i+1])?[]:{}:l)}fr(s,u,c)}s=s[u]}return t}function Dn(t,e,r){var n=-1,i=t.length;0>e&&(e=-e>i?0:i+e),r=r>i?i:r,0>r&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;for(var a=Array(i);++n<i;)a[n]=t[n+e];return a}function Cn(t,e){var r;return Al(t,function(t,n,i){return r=e(t,n,i),!r}),!!r}function Sn(t,e,r){var n=0,i=t?t.length:n;if("number"==typeof e&&e===e&&Ct>=i){for(;i>n;){var a=n+i>>>1,o=t[a];null!==o&&!Ls(o)&&(r?e>=o:e>o)?n=a+1:i=a}return i}return Tn(t,e,Wu,r)}function Tn(t,e,r,n){e=r(e);for(var i=0,a=t?t.length:0,o=e!==e,s=null===e,u=Ls(e),c=e===X;a>i;){var l=Hc((i+a)/2),h=r(t[l]),f=h!==X,d=null===h,p=h===h,g=Ls(h);if(o)var y=n||p;else y=c?p&&(n||f):s?p&&f&&(n||!d):u?p&&f&&!d&&(n||!g):d||g?!1:n?e>=h:e>h;y?i=l+1:a=l}return Qc(a,Dt)}function Fn(t,e){for(var r=-1,n=t.length,i=0,a=[];++r<n;){var o=t[r],s=e?e(o):o;if(!r||!es(s,u)){var u=s;a[i++]=0===o?0:o}}return a}function Bn(t){return"number"==typeof t?t:Ls(t)?kt:+t}function Ln(t){if("string"==typeof t)return t;if(Ls(t))return wl?wl.call(t):"";var e=t+"";return"0"==e&&1/t==-wt?"-0":e}function On(t,e,r){var n=-1,i=h,a=t.length,o=!0,s=[],u=s;if(r)o=!1,i=f;else if(a>=J){var c=e?null:Cl(t);if(c)return V(c);o=!1,i=F,u=new er}else u=e?[]:s;t:for(;++n<a;){var l=t[n],d=e?e(l):l;if(l=r||0!==l?l:0,o&&d===d){for(var p=u.length;p--;)if(u[p]===d)continue t;e&&u.push(d),s.push(l)}else i(u,d,r)||(u!==s&&u.push(d),s.push(l))}return s}function In(t,e){e=Ji(e,t)?[e]:Yn(e),t=sa(t,e);var r=ca(Fa(e));return!(null!=t&&zr(t,r))||delete t[r]}function Rn(t,e,r,n){return En(t,e,r(Gr(t,e)),n)}function Mn(t,e,r,n){for(var i=t.length,a=n?i:-1;(n?a--:++a<i)&&e(t[a],a,t););return r?Dn(t,n?0:a,n?a+1:i):Dn(t,n?a+1:0,n?i:a)}function Nn(t,e){var r=t;return r instanceof Oe&&(r=r.value()),g(e,function(t,e){return e.func.apply(e.thisArg,p([t],e.args))},r)}function Pn(t,e,r){for(var n=-1,i=t.length;++n<i;)var a=a?p(Or(a,t[n],e,r),Or(t[n],a,e,r)):t[n];return a&&a.length?On(a,e,r):[]}function jn(t,e,r){for(var n=-1,i=t.length,a=e.length,o={};++n<i;){var s=a>n?e[n]:X;r(o,t[n],s)}return o}function qn(t){return as(t)?t:[]}function Un(t){return"function"==typeof t?t:Wu}function Yn(t){return yh(t)?t:Ol(t)}function $n(t,e,r){var n=t.length;return r=r===X?n:r,!e&&r>=n?t:Dn(t,e,r)}function Vn(t,e){if(e)return t.slice();var r=new t.constructor(t.length);return t.copy(r),r}function Gn(t){var e=new t.constructor(t.byteLength);return new Pc(e).set(new Pc(t)),e}function Wn(t,e){var r=e?Gn(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}function Hn(t,e,r){var i=e?r(Y(t),!0):Y(t);return g(i,n,new t.constructor)}function zn(t){var e=new t.constructor(t.source,xe.exec(t));return e.lastIndex=t.lastIndex,e}function Zn(t,e,r){var n=e?r(V(t),!0):V(t);return g(n,i,new t.constructor)}function Xn(t){return bl?Object(bl.call(t)):{}}function Kn(t,e){var r=e?Gn(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function Jn(t,e){if(t!==e){var r=t!==X,n=null===t,i=t===t,a=Ls(t),o=e!==X,s=null===e,u=e===e,c=Ls(e);if(!s&&!c&&!a&&t>e||a&&o&&u&&!s&&!c||n&&o&&u||!r&&u||!i)return 1;if(!n&&!a&&!c&&e>t||c&&r&&i&&!n&&!a||s&&r&&i||!o&&i||!u)return-1}return 0}function Qn(t,e,r){for(var n=-1,i=t.criteria,a=e.criteria,o=i.length,s=r.length;++n<o;){var u=Jn(i[n],a[n]);if(u){if(n>=s)return u;var c=r[n];return u*("desc"==c?-1:1)}}return t.index-e.index}function ti(t,e,r,n){for(var i=-1,a=t.length,o=r.length,s=-1,u=e.length,c=Jc(a-o,0),l=Array(u+c),h=!n;++s<u;)l[s]=e[s];for(;++i<o;)(h||a>i)&&(l[r[i]]=t[i]);for(;c--;)l[s++]=t[i++];return l}function ei(t,e,r,n){for(var i=-1,a=t.length,o=-1,s=r.length,u=-1,c=e.length,l=Jc(a-s,0),h=Array(l+c),f=!n;++i<l;)h[i]=t[i];for(var d=i;++u<c;)h[d+u]=e[u];for(;++o<s;)(f||a>i)&&(h[d+r[o]]=t[i++]);return h}function ri(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}function ni(t,e,r,n){r||(r={});for(var i=-1,a=e.length;++i<a;){var o=e[i],s=n?n(r[o],t[o],o,r,t):t[o];fr(r,o,s)}return r}function ii(t,e){return ni(t,qi(t),e)}function ai(t,e){return function(r,n){var i=yh(r)?o:pr,a=e?e():{};return i(r,t,Ri(n),a)}}function oi(t){return Go(function(e,r){var n=-1,i=r.length,a=i>1?r[i-1]:X,o=i>2?r[2]:X;for(a=t.length>3&&"function"==typeof a?(i--,a):X,o&&Ki(r[0],r[1],o)&&(a=3>i?X:a,i=1),e=Object(e);++n<i;){var s=r[n];s&&t(e,s,n,a)}return e})}function si(t,e){return function(r,n){if(null==r)return r;if(!is(r))return t(r,n);for(var i=r.length,a=e?i:-1,o=Object(r);(e?a--:++a<i)&&n(o[a],a,o)!==!1;);return r}}function ui(t){return function(e,r,n){for(var i=-1,a=Object(e),o=n(e),s=o.length;s--;){var u=o[t?s:++i];if(r(a[u],u,a)===!1)break}return e}}function ci(t,e,r){function n(){var e=this&&this!==Pr&&this instanceof n?a:t;return e.apply(i?r:this,arguments)}var i=e&rt,a=fi(t);return n}function li(t){return function(e){e=Vs(e);var r=br.test(e)?H(e):X,n=r?r[0]:e.charAt(0),i=r?$n(r,1).join(""):e.slice(1);return n[t]()+i}}function hi(t){return function(e){return g(Yu(Au(e).replace(yr,"")),t,"")}}function fi(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var r=Tr(t.prototype),n=t.apply(r,e);return ms(n)?n:r}}function di(t,e,r){function n(){for(var o=arguments.length,s=Array(o),u=o,c=Ii(n);u--;)s[u]=arguments[u];var l=3>o&&s[0]!==c&&s[o-1]!==c?[]:$(s,c);if(o-=l.length,r>o)return ki(t,e,yi,n.placeholder,X,s,l,X,X,r-o);var h=this&&this!==Pr&&this instanceof n?i:t;return a(h,this,s)}var i=fi(t);return n}function pi(t){return function(e,r,n){var i=Object(e);if(r=Ri(r,3),!is(e))var a=nu(e);var o=t(a||e,function(t,e){return a&&(e=t,t=i[e]),r(t,e,i)},n);return o>-1?e[a?a[o]:o]:X}}function gi(t){return Go(function(e){e=Ur(e,1);var r=e.length,n=r,i=O.prototype.thru;for(t&&e.reverse();n--;){var a=e[n];if("function"!=typeof a)throw new Ac(Q);if(i&&!o&&"wrapper"==Oi(a))var o=new O([],!0)}for(n=o?n:r;++n<r;){a=e[n];var s=Oi(a),u="wrapper"==s?Sl(a):X;o=u&&ta(u[0])&&u[1]==(ct|at|st|lt)&&!u[4].length&&1==u[9]?o[Oi(u[0])].apply(o,u[3]):1==a.length&&ta(a)?o[s]():o.thru(a)}return function(){var t=arguments,n=t[0];if(o&&1==t.length&&yh(n)&&n.length>=J)return o.plant(n).value();for(var i=0,a=r?e[i].apply(this,t):n;++i<r;)a=e[i].call(this,a);return a}})}function yi(t,e,r,n,i,a,o,s,u,c){function l(){for(var m=arguments.length,v=Array(m),_=m;_--;)v[_]=arguments[_];if(p)var b=Ii(l),w=I(v,b);if(n&&(v=ti(v,n,i,p)),a&&(v=ei(v,a,o,p)),m-=w,p&&c>m){var A=$(v,b);return ki(t,e,yi,l.placeholder,r,v,A,s,u,c-m)}var x=f?r:this,k=d?x[t]:t;return m=v.length,s?v=ua(v,s):g&&m>1&&v.reverse(),h&&m>u&&(v.length=u),this&&this!==Pr&&this instanceof l&&(k=y||fi(k)),k.apply(x,v)}var h=e&ct,f=e&rt,d=e&nt,p=e&(at|ot),g=e&ht,y=d?X:fi(t);return l}function mi(t,e){return function(r,n){return Jr(r,t,e(n),{})}}function vi(t){return function(e,r){var n;if(e===X&&r===X)return 0;if(e!==X&&(n=e),r!==X){if(n===X)return r;"string"==typeof e||"string"==typeof r?(e=Ln(e),r=Ln(r)):(e=Bn(e),r=Bn(r)),n=t(e,r)}return n}}function _i(t){return Go(function(e){return e=1==e.length&&yh(e[0])?d(e[0],S(Ri())):d(Ur(e,1,Zi),S(Ri())),Go(function(r){var n=this;return t(e,function(t){return a(t,n,r)})})})}function bi(t,e){e=e===X?" ":Ln(e);var r=e.length;if(2>r)return r?kn(e,t):e;var n=kn(e,Wc(t/W(e)));return br.test(e)?$n(H(n),0,t).join(""):n.slice(0,t)}function wi(t,e,r,n){function i(){for(var e=-1,u=arguments.length,c=-1,l=n.length,h=Array(l+u),f=this&&this!==Pr&&this instanceof i?s:t;++c<l;)h[c]=n[c];for(;u--;)h[c++]=arguments[++e];return a(f,o?r:this,h)}var o=e&rt,s=fi(t);return i}function Ai(t){return function(e,r,n){return n&&"number"!=typeof n&&Ki(e,r,n)&&(r=n=X),e=Us(e),e=e===e?e:0,r===X?(r=e,e=0):r=Us(r)||0,n=n===X?r>e?1:-1:Us(n)||0,xn(e,r,n,t)}}function xi(t){return function(e,r){return("string"!=typeof e||"string"!=typeof r)&&(e=Us(e),r=Us(r)),t(e,r)}}function ki(t,e,r,n,i,a,o,s,u,c){var l=e&at,h=l?o:X,f=l?X:o,d=l?a:X,p=l?X:a;e|=l?st:ut,e&=~(l?ut:st),e&it||(e&=~(rt|nt));var g=[t,e,i,d,h,p,f,s,u,c],y=r.apply(X,g);return ta(t)&&Ll(y,g),y.placeholder=n,y}function Ei(t){var e=bc[t];return function(t,r){if(t=Us(t),r=Qc(js(r),292)){var n=(Vs(t)+"e").split("e"),i=e(n[0]+"e"+(+n[1]+r));return n=(Vs(i)+"e").split("e"),+(n[0]+"e"+(+n[1]-r))}return e(t)}}function Di(t){return function(e){var r=Ui(e);return r==Rt?Y(e):r==qt?G(e):C(e,t(e))}}function Ci(t,e,r,n,i,a,o,s){var u=e&nt;if(!u&&"function"!=typeof t)throw new Ac(Q);var c=n?n.length:0;if(c||(e&=~(st|ut),n=i=X),o=o===X?o:Jc(js(o),0),s=s===X?s:js(s),c-=i?i.length:0,e&ut){var l=n,h=i;n=i=X}var f=u?X:Sl(t),d=[t,e,r,n,i,l,h,a,o,s];if(f&&aa(d,f),t=d[0],e=d[1],r=d[2],n=d[3],i=d[4],s=d[9]=null==d[9]?u?0:t.length:Jc(d[9]-c,0),!s&&e&(at|ot)&&(e&=~(at|ot)),e&&e!=rt)p=e==at||e==ot?di(t,e,s):e!=st&&e!=(rt|st)||i.length?yi.apply(X,d):wi(t,e,r,n);else var p=ci(t,e,r);var g=f?Dl:Ll;return g(p,d)}function Si(t,e,r,n,i,a){var o=i&dt,s=t.length,u=e.length;if(s!=u&&!(o&&u>s))return!1;var c=a.get(t);if(c)return c==e;var l=-1,h=!0,f=i&ft?new er:X;for(a.set(t,e);++l<s;){var d=t[l],p=e[l];if(n)var g=o?n(p,d,l,e,t,a):n(d,p,l,t,e,a);if(g!==X){if(g)continue;h=!1;break}if(f){if(!m(e,function(t,e){return f.has(e)||d!==t&&!r(d,t,n,i,a)?void 0:f.add(e)})){h=!1;break}}else if(d!==p&&!r(d,p,n,i,a)){h=!1;break}}return a["delete"](t),h}function Ti(t,e,r,n,i,a,o){switch(r){case Wt:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Gt:return t.byteLength==e.byteLength&&n(new Pc(t),new Pc(e))?!0:!1;case Ft:case Bt:return+t==+e;case Lt:return t.name==e.name&&t.message==e.message;case Mt:return t!=+t?e!=+e:t==+e;case jt:case Ut:return t==e+"";case Rt:var s=Y;case qt:var u=a&dt;if(s||(s=V),t.size!=e.size&&!u)return!1;var c=o.get(t);return c?c==e:(a|=ft,o.set(t,e),Si(s(t),s(e),n,i,a,o));case Yt:if(bl)return bl.call(t)==bl.call(e)}return!1}function Fi(t,e,r,n,i,a){var o=i&dt,s=nu(t),u=s.length,c=nu(e),l=c.length;if(u!=l&&!o)return!1;for(var h=u;h--;){var f=s[h];if(!(o?f in e:zr(e,f)))return!1}var d=a.get(t);if(d)return d==e;var p=!0;a.set(t,e);for(var g=o;++h<u;){f=s[h];var y=t[f],m=e[f];if(n)var v=o?n(m,y,f,e,t,a):n(y,m,f,t,e,a);if(!(v===X?y===m||r(y,m,n,i,a):v)){p=!1;break}g||(g="constructor"==f)}if(p&&!g){var _=t.constructor,b=e.constructor;_!=b&&"constructor"in t&&"constructor"in e&&!("function"==typeof _&&_ instanceof _&&"function"==typeof b&&b instanceof b)&&(p=!1)}return a["delete"](t),p}function Bi(t){return Wr(t,nu,qi)}function Li(t){return Wr(t,iu,Fl)}function Oi(t){for(var e=t.name+"",r=dl[e],n=Tc.call(dl,e)?r.length:0;n--;){var i=r[n],a=i.func;if(null==a||a==t)return i.name}return e}function Ii(t){var r=Tc.call(e,"placeholder")?e:t;return r.placeholder}function Ri(){var t=e.iteratee||Hu;return t=t===Hu?an:t,arguments.length?t(arguments[0],arguments[1]):t}function Mi(t,e){var r=t.__data__;return Qi(e)?r["string"==typeof e?"string":"hash"]:r.map}function Ni(t){for(var e=nu(t),r=e.length;r--;){ var n=e[r],i=t[n];e[r]=[n,i,na(i)]}return e}function Pi(t,e){var r=P(t,e);return nn(r)?r:X}function ji(t){return zc(Object(t))}function qi(t){return qc(Object(t))}function Ui(t){return Lc.call(t)}function Yi(t,e,r){for(var n=-1,i=r.length;++n<i;){var a=r[n],o=a.size;switch(a.type){case"drop":t+=o;break;case"dropRight":e-=o;break;case"take":e=Qc(e,t+o);break;case"takeRight":t=Jc(t,e-o)}}return{start:t,end:e}}function $i(t,e,r){e=Ji(e,t)?[e]:Yn(e);for(var n,i=-1,a=e.length;++i<a;){var o=ca(e[i]);if(!(n=null!=t&&r(t,o)))break;t=t[o]}if(n)return n;var a=t?t.length:0;return!!a&&ys(a)&&Xi(o,a)&&(yh(t)||Bs(t)||rs(t))}function Vi(t){var e=t.length,r=t.constructor(e);return e&&"string"==typeof t[0]&&Tc.call(t,"index")&&(r.index=t.index,r.input=t.input),r}function Gi(t){return"function"!=typeof t.constructor||ra(t)?{}:Tr(ji(t))}function Wi(t,e,r,n){var i=t.constructor;switch(e){case Gt:return Gn(t);case Ft:case Bt:return new i(+t);case Wt:return Wn(t,n);case Ht:case zt:case Zt:case Xt:case Kt:case Jt:case Qt:case te:case ee:return Kn(t,n);case Rt:return Hn(t,n,r);case Mt:case Ut:return new i(t);case jt:return zn(t);case qt:return Zn(t,n,r);case Yt:return Xn(t)}}function Hi(t){var e=t?t.length:X;return ys(e)&&(yh(t)||Bs(t)||rs(t))?D(e,String):null}function zi(t){return yh(t)||rs(t)}function Zi(t){return yh(t)&&!(2==t.length&&!ps(t[0]))}function Xi(t,e){return e=null==e?At:e,!!e&&("number"==typeof t||Te.test(t))&&t>-1&&t%1==0&&e>t}function Ki(t,e,r){if(!ms(r))return!1;var n=typeof e;return("number"==n?is(r)&&Xi(e,r.length):"string"==n&&e in r)?es(r[e],t):!1}function Ji(t,e){if(yh(t))return!1;var r=typeof t;return"number"==r||"symbol"==r||"boolean"==r||null==t||Ls(t)?!0:de.test(t)||!fe.test(t)||null!=e&&t in Object(e)}function Qi(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}function ta(t){var r=Oi(t),n=e[r];if("function"!=typeof n||!(r in Oe.prototype))return!1;if(t===n)return!0;var i=Sl(n);return!!i&&t===i[0]}function ea(t){return!!Cc&&Cc in t}function ra(t){var e=t&&t.constructor,r="function"==typeof e&&e.prototype||kc;return t===r}function na(t){return t===t&&!ms(t)}function ia(t,e){return function(r){return null==r?!1:r[t]===e&&(e!==X||t in Object(r))}}function aa(t,e){var r=t[1],n=e[1],i=r|n,a=(rt|nt|ct)>i,o=n==ct&&r==at||n==ct&&r==lt&&t[7].length<=e[8]||n==(ct|lt)&&e[7].length<=e[8]&&r==at;if(!a&&!o)return t;n&rt&&(t[2]=e[2],i|=r&rt?0:it);var s=e[3];if(s){var u=t[3];t[3]=u?ti(u,s,e[4]):s,t[4]=u?$(t[3],et):e[4]}return s=e[5],s&&(u=t[5],t[5]=u?ei(u,s,e[6]):s,t[6]=u?$(t[5],et):e[6]),s=e[7],s&&(t[7]=s),n&ct&&(t[8]=null==t[8]?e[8]:Qc(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i,t}function oa(t,e,r,n,i,a){return ms(t)&&ms(e)&&fn(t,e,X,oa,a.set(e,t)),t}function sa(t,e){return 1==e.length?t:Gr(t,Dn(e,0,-1))}function ua(t,e){for(var r=t.length,n=Qc(e.length,r),i=ri(t);n--;){var a=e[n];t[n]=Xi(a,r)?i[a]:X}return t}function ca(t){if("string"==typeof t||Ls(t))return t;var e=t+"";return"0"==e&&1/t==-wt?"-0":e}function la(t){if(null!=t){try{return Sc.call(t)}catch(e){}try{return t+""}catch(e){}}return""}function ha(t){if(t instanceof Oe)return t.clone();var e=new O(t.__wrapped__,t.__chain__);return e.__actions__=ri(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}function fa(t,e,r){e=(r?Ki(t,e,r):e===X)?1:Jc(js(e),0);var n=t?t.length:0;if(!n||1>e)return[];for(var i=0,a=0,o=Array(Wc(n/e));n>i;)o[a++]=Dn(t,i,i+=e);return o}function da(t){for(var e=-1,r=t?t.length:0,n=0,i=[];++e<r;){var a=t[e];a&&(i[n++]=a)}return i}function pa(){for(var t=arguments.length,e=Array(t?t-1:0),r=arguments[0],n=t;n--;)e[n-1]=arguments[n];return t?p(yh(r)?ri(r):[r],Ur(e,1)):[]}function ga(t,e,r){var n=t?t.length:0;return n?(e=r||e===X?1:js(e),Dn(t,0>e?0:e,n)):[]}function ya(t,e,r){var n=t?t.length:0;return n?(e=r||e===X?1:js(e),e=n-e,Dn(t,0,0>e?0:e)):[]}function ma(t,e){return t&&t.length?Mn(t,Ri(e,3),!0,!0):[]}function va(t,e){return t&&t.length?Mn(t,Ri(e,3),!0):[]}function _a(t,e,r,n){var i=t?t.length:0;return i?(r&&"number"!=typeof r&&Ki(t,e,r)&&(r=0,n=i),Nr(t,e,r,n)):[]}function ba(t,e,r){var n=t?t.length:0;if(!n)return-1;var i=null==r?0:js(r);return 0>i&&(i=Jc(n+i,0)),_(t,Ri(e,3),i)}function wa(t,e,r){var n=t?t.length:0;if(!n)return-1;var i=n-1;return r!==X&&(i=js(r),i=0>r?Jc(n+i,0):Qc(i,n-1)),_(t,Ri(e,3),i,!0)}function Aa(t){var e=t?t.length:0;return e?Ur(t,1):[]}function xa(t){var e=t?t.length:0;return e?Ur(t,wt):[]}function ka(t,e){var r=t?t.length:0;return r?(e=e===X?1:js(e),Ur(t,e)):[]}function Ea(t){for(var e=-1,r=t?t.length:0,n={};++e<r;){var i=t[e];n[i[0]]=i[1]}return n}function Da(t){return t&&t.length?t[0]:X}function Ca(t,e,r){var n=t?t.length:0;if(!n)return-1;var i=null==r?0:js(r);return 0>i&&(i=Jc(n+i,0)),b(t,e,i)}function Sa(t){return ya(t,1)}function Ta(t,e){return t?Xc.call(t,e):""}function Fa(t){var e=t?t.length:0;return e?t[e-1]:X}function Ba(t,e,r){var n=t?t.length:0;if(!n)return-1;var i=n;if(r!==X&&(i=js(r),i=(0>i?Jc(n+i,0):Qc(i,n-1))+1),e!==e)return j(t,i-1,!0);for(;i--;)if(t[i]===e)return i;return-1}function La(t,e){return t&&t.length?pn(t,js(e)):X}function Oa(t,e){return t&&t.length&&e&&e.length?bn(t,e):t}function Ia(t,e,r){return t&&t.length&&e&&e.length?bn(t,e,Ri(r)):t}function Ra(t,e,r){return t&&t.length&&e&&e.length?bn(t,e,X,r):t}function Ma(t,e){var r=[];if(!t||!t.length)return r;var n=-1,i=[],a=t.length;for(e=Ri(e,3);++n<a;){var o=t[n];e(o,n,t)&&(r.push(o),i.push(n))}return wn(t,i),r}function Na(t){return t?nl.call(t):t}function Pa(t,e,r){var n=t?t.length:0;return n?(r&&"number"!=typeof r&&Ki(t,e,r)?(e=0,r=n):(e=null==e?0:js(e),r=r===X?n:js(r)),Dn(t,e,r)):[]}function ja(t,e){return Sn(t,e)}function qa(t,e,r){return Tn(t,e,Ri(r))}function Ua(t,e){var r=t?t.length:0;if(r){var n=Sn(t,e);if(r>n&&es(t[n],e))return n}return-1}function Ya(t,e){return Sn(t,e,!0)}function $a(t,e,r){return Tn(t,e,Ri(r),!0)}function Va(t,e){var r=t?t.length:0;if(r){var n=Sn(t,e,!0)-1;if(es(t[n],e))return n}return-1}function Ga(t){return t&&t.length?Fn(t):[]}function Wa(t,e){return t&&t.length?Fn(t,Ri(e)):[]}function Ha(t){return ga(t,1)}function za(t,e,r){return t&&t.length?(e=r||e===X?1:js(e),Dn(t,0,0>e?0:e)):[]}function Za(t,e,r){var n=t?t.length:0;return n?(e=r||e===X?1:js(e),e=n-e,Dn(t,0>e?0:e,n)):[]}function Xa(t,e){return t&&t.length?Mn(t,Ri(e,3),!1,!0):[]}function Ka(t,e){return t&&t.length?Mn(t,Ri(e,3)):[]}function Ja(t){return t&&t.length?On(t):[]}function Qa(t,e){return t&&t.length?On(t,Ri(e)):[]}function to(t,e){return t&&t.length?On(t,X,e):[]}function eo(t){if(!t||!t.length)return[];var e=0;return t=l(t,function(t){return as(t)?(e=Jc(t.length,e),!0):void 0}),D(e,function(e){return d(t,vn(e))})}function ro(t,e){if(!t||!t.length)return[];var r=eo(t);return null==e?r:d(r,function(t){return a(e,X,t)})}function no(t,e){return jn(t||[],e||[],fr)}function io(t,e){return jn(t||[],e||[],En)}function ao(t){var r=e(t);return r.__chain__=!0,r}function oo(t,e){return e(t),t}function so(t,e){return e(t)}function uo(){return ao(this)}function co(){return new O(this.value(),this.__chain__)}function lo(){this.__values__===X&&(this.__values__=Ns(this.value()));var t=this.__index__>=this.__values__.length,e=t?X:this.__values__[this.__index__++];return{done:t,value:e}}function ho(){return this}function fo(t){for(var e,n=this;n instanceof r;){var i=ha(n);i.__index__=0,i.__values__=X,e?a.__wrapped__=i:e=i;var a=i;n=n.__wrapped__}return a.__wrapped__=t,e}function po(){var t=this.__wrapped__;if(t instanceof Oe){var e=t;return this.__actions__.length&&(e=new Oe(this)),e=e.reverse(),e.__actions__.push({func:so,args:[Na],thisArg:X}),new O(e,this.__chain__)}return this.thru(Na)}function go(){return Nn(this.__wrapped__,this.__actions__)}function yo(t,e,r){var n=yh(t)?c:Rr;return r&&Ki(t,e,r)&&(e=X),n(t,Ri(e,3))}function mo(t,e){var r=yh(t)?l:qr;return r(t,Ri(e,3))}function vo(t,e){return Ur(ko(t,e),1)}function _o(t,e){return Ur(ko(t,e),wt)}function bo(t,e,r){return r=r===X?1:js(r),Ur(ko(t,e),r)}function wo(t,e){var r=yh(t)?s:Al;return r(t,Ri(e,3))}function Ao(t,e){var r=yh(t)?u:xl;return r(t,Ri(e,3))}function xo(t,e,r,n){t=is(t)?t:yu(t),r=r&&!n?js(r):0;var i=t.length;return 0>r&&(r=Jc(i+r,0)),Bs(t)?i>=r&&t.indexOf(e,r)>-1:!!i&&b(t,e,r)>-1}function ko(t,e){var r=yh(t)?d:cn;return r(t,Ri(e,3))}function Eo(t,e,r,n){return null==t?[]:(yh(e)||(e=null==e?[]:[e]),r=n?X:r,yh(r)||(r=null==r?[]:[r]),gn(t,e,r))}function Do(t,e,r){var n=yh(t)?g:x,i=arguments.length<3;return n(t,Ri(e,4),r,i,Al)}function Co(t,e,r){var n=yh(t)?y:x,i=arguments.length<3;return n(t,Ri(e,4),r,i,xl)}function So(t,e){var r=yh(t)?l:qr;return e=Ri(e,3),r(t,function(t,r,n){return!e(t,r,n)})}function To(t){var e=is(t)?t:yu(t),r=e.length;return r>0?e[An(0,r-1)]:X}function Fo(t,e,r){var n=-1,i=Ns(t),a=i.length,o=a-1;for(e=(r?Ki(t,e,r):e===X)?1:Dr(js(e),0,a);++n<e;){var s=An(n,o),u=i[s];i[s]=i[n],i[n]=u}return i.length=e,i}function Bo(t){return Fo(t,Et)}function Lo(t){if(null==t)return 0;if(is(t)){var e=t.length;return e&&Bs(t)?W(t):e}if(vs(t)){var r=Ui(t);if(r==Rt||r==qt)return t.size}return nu(t).length}function Oo(t,e,r){var n=yh(t)?m:Cn;return r&&Ki(t,e,r)&&(e=X),n(t,Ri(e,3))}function Io(){return vc.now()}function Ro(t,e){if("function"!=typeof e)throw new Ac(Q);return t=js(t),function(){return--t<1?e.apply(this,arguments):void 0}}function Mo(t,e,r){return e=r?X:e,e=t&&null==e?t.length:e,Ci(t,ct,X,X,X,X,e)}function No(t,e){var r;if("function"!=typeof e)throw new Ac(Q);return t=js(t),function(){return--t>0&&(r=e.apply(this,arguments)),1>=t&&(e=X),r}}function Po(t,e,r){e=r?X:e;var n=Ci(t,at,X,X,X,X,X,e);return n.placeholder=Po.placeholder,n}function jo(t,e,r){e=r?X:e;var n=Ci(t,ot,X,X,X,X,X,e);return n.placeholder=jo.placeholder,n}function qo(t,e,r){function n(e){var r=f,n=d;return f=d=X,v=e,g=t.apply(n,r)}function i(t){return v=t,y=Gc(s,e),_?n(t):g}function a(t){var r=t-m,n=t-v,i=e-r;return b?Qc(i,p-n):i}function o(t){var r=t-m,n=t-v;return m===X||r>=e||0>r||b&&n>=p}function s(){var t=Io();return o(t)?u(t):void(y=Gc(s,a(t)))}function u(t){return y=X,w&&f?n(t):(f=d=X,g)}function c(){v=0,f=m=d=y=X}function l(){return y===X?g:u(Io())}function h(){var t=Io(),r=o(t);if(f=arguments,d=this,m=t,r){if(y===X)return i(m);if(b)return y=Gc(s,e),n(m)}return y===X&&(y=Gc(s,e)),g}var f,d,p,g,y,m,v=0,_=!1,b=!1,w=!0;if("function"!=typeof t)throw new Ac(Q);return e=Us(e)||0,ms(r)&&(_=!!r.leading,b="maxWait"in r,p=b?Jc(Us(r.maxWait)||0,e):p,w="trailing"in r?!!r.trailing:w),h.cancel=c,h.flush=l,h}function Uo(t){return Ci(t,ht)}function Yo(t,e){if("function"!=typeof t||e&&"function"!=typeof e)throw new Ac(Q);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var o=t.apply(this,n);return r.cache=a.set(i,o),o};return r.cache=new(Yo.Cache||Ze),r}function $o(t){if("function"!=typeof t)throw new Ac(Q);return function(){return!t.apply(this,arguments)}}function Vo(t){return No(2,t)}function Go(t,e){if("function"!=typeof t)throw new Ac(Q);return e=Jc(e===X?t.length-1:js(e),0),function(){for(var r=arguments,n=-1,i=Jc(r.length-e,0),o=Array(i);++n<i;)o[n]=r[e+n];switch(e){case 0:return t.call(this,o);case 1:return t.call(this,r[0],o);case 2:return t.call(this,r[0],r[1],o)}var s=Array(e+1);for(n=-1;++n<e;)s[n]=r[n];return s[e]=o,a(t,this,s)}}function Wo(t,e){if("function"!=typeof t)throw new Ac(Q);return e=e===X?0:Jc(js(e),0),Go(function(r){var n=r[e],i=$n(r,0,e);return n&&p(i,n),a(t,this,i)})}function Ho(t,e,r){var n=!0,i=!0;if("function"!=typeof t)throw new Ac(Q);return ms(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),qo(t,e,{leading:n,maxWait:e,trailing:i})}function zo(t){return Mo(t,1)}function Zo(t,e){return e=null==e?Wu:e,hh(e,t)}function Xo(){if(!arguments.length)return[];var t=arguments[0];return yh(t)?t:[t]}function Ko(t){return Cr(t,!1,!0)}function Jo(t,e){return Cr(t,!1,!0,e)}function Qo(t){return Cr(t,!0,!0)}function ts(t,e){return Cr(t,!0,!0,e)}function es(t,e){return t===e||t!==t&&e!==e}function rs(t){return as(t)&&Tc.call(t,"callee")&&(!$c.call(t,"callee")||Lc.call(t)==St)}function ns(t){return vs(t)&&Lc.call(t)==Gt}function is(t){return null!=t&&ys(Tl(t))&&!ps(t)}function as(t){return vs(t)&&is(t)}function os(t){return t===!0||t===!1||vs(t)&&Lc.call(t)==Ft}function ss(t){return vs(t)&&Lc.call(t)==Bt}function us(t){return!!t&&1===t.nodeType&&vs(t)&&!Cs(t)}function cs(t){if(is(t)&&(yh(t)||Bs(t)||ps(t.splice)||rs(t)||mh(t)))return!t.length;if(vs(t)){var e=Ui(t);if(e==Rt||e==qt)return!t.size}for(var r in t)if(Tc.call(t,r))return!1;return!(fl&&nu(t).length)}function ls(t,e){return tn(t,e)}function hs(t,e,r){r="function"==typeof r?r:X;var n=r?r(t,e):X;return n===X?tn(t,e,r):!!n}function fs(t){return vs(t)?Lc.call(t)==Lt||"string"==typeof t.message&&"string"==typeof t.name:!1}function ds(t){return"number"==typeof t&&Zc(t)}function ps(t){var e=ms(t)?Lc.call(t):"";return e==Ot||e==It}function gs(t){return"number"==typeof t&&t==js(t)}function ys(t){return"number"==typeof t&&t>-1&&t%1==0&&At>=t}function ms(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function vs(t){return!!t&&"object"==typeof t}function _s(t){return vs(t)&&Ui(t)==Rt}function bs(t,e){return t===e||rn(t,e,Ni(e))}function ws(t,e,r){return r="function"==typeof r?r:X,rn(t,e,Ni(e),r)}function As(t){return Ds(t)&&t!=+t}function xs(t){if(Bl(t))throw new _c("This method is not supported with `core-js`. Try https://github.com/es-shims.");return nn(t)}function ks(t){return null===t}function Es(t){return null==t}function Ds(t){return"number"==typeof t||vs(t)&&Lc.call(t)==Mt}function Cs(t){if(!vs(t)||Lc.call(t)!=Nt||q(t))return!1;var e=ji(t);if(null===e)return!0;var r=Tc.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&Sc.call(r)==Bc}function Ss(t){return ms(t)&&Lc.call(t)==jt}function Ts(t){return gs(t)&&t>=-At&&At>=t}function Fs(t){return vs(t)&&Ui(t)==qt}function Bs(t){return"string"==typeof t||!yh(t)&&vs(t)&&Lc.call(t)==Ut}function Ls(t){return"symbol"==typeof t||vs(t)&&Lc.call(t)==Yt}function Os(t){return vs(t)&&ys(t.length)&&!!kr[Lc.call(t)]}function Is(t){return t===X}function Rs(t){return vs(t)&&Ui(t)==$t}function Ms(t){return vs(t)&&Lc.call(t)==Vt}function Ns(t){if(!t)return[];if(is(t))return Bs(t)?H(t):ri(t);if(Uc&&t[Uc])return U(t[Uc]());var e=Ui(t),r=e==Rt?Y:e==qt?V:yu;return r(t)}function Ps(t){if(!t)return 0===t?t:0;if(t=Us(t),t===wt||t===-wt){var e=0>t?-1:1;return e*xt}return t===t?t:0}function js(t){var e=Ps(t),r=e%1;return e===e?r?e-r:e:0}function qs(t){return t?Dr(js(t),0,Et):0}function Us(t){if("number"==typeof t)return t;if(Ls(t))return kt;if(ms(t)){var e=ps(t.valueOf)?t.valueOf():t;t=ms(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(me,"");var r=De.test(t);return r||Se.test(t)?Br(t.slice(2),r?2:8):Ee.test(t)?kt:+t}function Ys(t){return ni(t,iu(t))}function $s(t){return Dr(js(t),-At,At)}function Vs(t){return null==t?"":Ln(t)}function Gs(t,e){var r=Tr(t);return e?gr(r,e):r}function Ws(t,e){return v(t,Ri(e,3),Yr)}function Hs(t,e){return v(t,Ri(e,3),$r)}function zs(t,e){return null==t?t:kl(t,Ri(e,3),iu)}function Zs(t,e){return null==t?t:El(t,Ri(e,3),iu)}function Xs(t,e){return t&&Yr(t,Ri(e,3))}function Ks(t,e){return t&&$r(t,Ri(e,3))}function Js(t){return null==t?[]:Vr(t,nu(t))}function Qs(t){return null==t?[]:Vr(t,iu(t))}function tu(t,e,r){var n=null==t?X:Gr(t,e);return n===X?r:n}function eu(t,e){return null!=t&&$i(t,e,zr)}function ru(t,e){return null!=t&&$i(t,e,Zr)}function nu(t){var e=ra(t);if(!e&&!is(t))return on(t);var r=Hi(t),n=!!r,i=r||[],a=i.length;for(var o in t)!zr(t,o)||n&&("length"==o||Xi(o,a))||e&&"constructor"==o||i.push(o);return i}function iu(t){for(var e=-1,r=ra(t),n=sn(t),i=n.length,a=Hi(t),o=!!a,s=a||[],u=s.length;++e<i;){var c=n[e];o&&("length"==c||Xi(c,u))||"constructor"==c&&(r||!Tc.call(t,c))||s.push(c)}return s}function au(t,e){var r={};return e=Ri(e,3),Yr(t,function(t,n,i){r[e(t,n,i)]=t}),r}function ou(t,e){var r={};return e=Ri(e,3),Yr(t,function(t,n,i){r[n]=e(t,n,i)}),r}function su(t,e){return e=Ri(e),mn(t,function(t,r){return!e(t,r)})}function uu(t,e){return null==t?{}:mn(t,Ri(e))}function cu(t,e,r){e=Ji(e,t)?[e]:Yn(e);var n=-1,i=e.length;for(i||(t=X,i=1);++n<i;){var a=null==t?X:t[ca(e[n])];a===X&&(n=i,a=r),t=ps(a)?a.call(t):a}return t}function lu(t,e,r){return null==t?t:En(t,e,r)}function hu(t,e,r,n){return n="function"==typeof n?n:X,null==t?t:En(t,e,r,n)}function fu(t,e,r){var n=yh(t)||Os(t);if(e=Ri(e,4),null==r)if(n||ms(t)){var i=t.constructor;r=n?yh(t)?new i:[]:ps(i)?Tr(ji(t)):{}}else r={};return(n?s:Yr)(t,function(t,n,i){return e(r,t,n,i)}),r}function du(t,e){return null==t?!0:In(t,e)}function pu(t,e,r){return null==t?t:Rn(t,e,Un(r))}function gu(t,e,r,n){return n="function"==typeof n?n:X,null==t?t:Rn(t,e,Un(r),n)}function yu(t){return t?T(t,nu(t)):[]}function mu(t){return null==t?[]:T(t,iu(t))}function vu(t,e,r){return r===X&&(r=e,e=X),r!==X&&(r=Us(r),r=r===r?r:0),e!==X&&(e=Us(e),e=e===e?e:0),Dr(Us(t),e,r)}function _u(t,e,r){return e=Us(e)||0,r===X?(r=e,e=0):r=Us(r)||0,t=Us(t),Xr(t,e,r)}function bu(t,e,r){if(r&&"boolean"!=typeof r&&Ki(t,e,r)&&(e=r=X),r===X&&("boolean"==typeof e?(r=e,e=X):"boolean"==typeof t&&(r=t,t=X)),t===X&&e===X?(t=0,e=1):(t=Us(t)||0,e===X?(e=t,t=0):e=Us(e)||0),t>e){var n=t;t=e,e=n}if(r||t%1||e%1){var i=el();return Qc(t+i*(e-t+Fr("1e-"+((i+"").length-1))),e)}return An(t,e)}function wu(t){return $h(Vs(t).toLowerCase())}function Au(t){return t=Vs(t),t&&t.replace(Fe,R).replace(mr,"")}function xu(t,e,r){t=Vs(t),e=Ln(e);var n=t.length;return r=r===X?n:Dr(js(r),0,n),r-=e.length,r>=0&&t.indexOf(e,r)==r}function ku(t){return t=Vs(t),t&&ue.test(t)?t.replace(oe,M):t}function Eu(t){return t=Vs(t),t&&ye.test(t)?t.replace(ge,"\\$&"):t}function Du(t,e,r){t=Vs(t),e=js(e);var n=e?W(t):0;if(!e||n>=e)return t;var i=(e-n)/2;return bi(Hc(i),r)+t+bi(Wc(i),r)}function Cu(t,e,r){t=Vs(t),e=js(e);var n=e?W(t):0;return e&&e>n?t+bi(e-n,r):t}function Su(t,e,r){t=Vs(t),e=js(e);var n=e?W(t):0;return e&&e>n?bi(e-n,r)+t:t}function Tu(t,e,r){return r||null==e?e=0:e&&(e=+e),t=Vs(t).replace(me,""),tl(t,e||(ke.test(t)?16:10))}function Fu(t,e,r){return e=(r?Ki(t,e,r):e===X)?1:js(e),kn(Vs(t),e)}function Bu(){var t=arguments,e=Vs(t[0]);return t.length<3?e:rl.call(e,t[1],t[2])}function Lu(t,e,r){return r&&"number"!=typeof r&&Ki(t,e,r)&&(e=r=X),(r=r===X?Et:r>>>0)?(t=Vs(t),t&&("string"==typeof e||null!=e&&!Ss(e))&&(e=Ln(e),""==e&&br.test(t))?$n(H(t),0,r):il.call(t,e,r)):[]}function Ou(t,e,r){return t=Vs(t),r=Dr(js(r),0,t.length),t.lastIndexOf(Ln(e),r)==r}function Iu(t,r,n){var i=e.templateSettings;n&&Ki(t,r,n)&&(r=X),t=Vs(t),r=Ah({},r,i,lr);var a,o,s=Ah({},r.imports,i.imports,lr),u=nu(s),c=T(s,u),l=0,h=r.interpolate||Be,f="__p += '",d=wc((r.escape||Be).source+"|"+h.source+"|"+(h===he?Ae:Be).source+"|"+(r.evaluate||Be).source+"|$","g"),p="//# sourceURL="+("sourceURL"in r?r.sourceURL:"lodash.templateSources["+ ++xr+"]")+"\n";t.replace(d,function(e,r,n,i,s,u){return n||(n=i),f+=t.slice(l,u).replace(Le,N),r&&(a=!0,f+="' +\n__e("+r+") +\n'"),s&&(o=!0,f+="';\n"+s+";\n__p += '"),n&&(f+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),l=u+e.length,e}),f+="';\n";var g=r.variable;g||(f="with (obj) {\n"+f+"\n}\n"),f=(o?f.replace(re,""):f).replace(ne,"$1").replace(ie,"$1;"),f="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(a?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var y=Vh(function(){return Function(u,p+"return "+f).apply(X,c)});if(y.source=f,fs(y))throw y;return y}function Ru(t){return Vs(t).toLowerCase()}function Mu(t){return Vs(t).toUpperCase()}function Nu(t,e,r){if(t=Vs(t),t&&(r||e===X))return t.replace(me,"");if(!t||!(e=Ln(e)))return t;var n=H(t),i=H(e),a=B(n,i),o=L(n,i)+1;return $n(n,a,o).join("")}function Pu(t,e,r){if(t=Vs(t),t&&(r||e===X))return t.replace(_e,"");if(!t||!(e=Ln(e)))return t;var n=H(t),i=L(n,H(e))+1;return $n(n,0,i).join("")}function ju(t,e,r){if(t=Vs(t),t&&(r||e===X))return t.replace(ve,"");if(!t||!(e=Ln(e)))return t;var n=H(t),i=B(n,H(e));return $n(n,i).join("")}function qu(t,e){var r=pt,n=gt;if(ms(e)){var i="separator"in e?e.separator:i;r="length"in e?js(e.length):r,n="omission"in e?Ln(e.omission):n}t=Vs(t);var a=t.length;if(br.test(t)){var o=H(t);a=o.length}if(r>=a)return t;var s=r-W(n);if(1>s)return n;var u=o?$n(o,0,s).join(""):t.slice(0,s);if(i===X)return u+n;if(o&&(s+=u.length-s),Ss(i)){if(t.slice(s).search(i)){var c,l=u;for(i.global||(i=wc(i.source,Vs(xe.exec(i))+"g")),i.lastIndex=0;c=i.exec(l);)var h=c.index;u=u.slice(0,h===X?s:h)}}else if(t.indexOf(Ln(i),s)!=s){var f=u.lastIndexOf(i);f>-1&&(u=u.slice(0,f))}return u+n}function Uu(t){return t=Vs(t),t&&se.test(t)?t.replace(ae,z):t}function Yu(t,e,r){return t=Vs(t),e=r?X:e,e===X&&(e=wr.test(t)?_r:be),t.match(e)||[]}function $u(t){var e=t?t.length:0,r=Ri();return t=e?d(t,function(t){if("function"!=typeof t[1])throw new Ac(Q);return[r(t[0]),t[1]]}):[],Go(function(r){for(var n=-1;++n<e;){var i=t[n];if(a(i[0],this,r))return a(i[1],this,r)}})}function Vu(t){return Sr(Cr(t,!0))}function Gu(t){return function(){return t}}function Wu(t){return t}function Hu(t){return an("function"==typeof t?t:Cr(t,!0))}function zu(t){return ln(Cr(t,!0))}function Zu(t,e){return hn(t,Cr(e,!0))}function Xu(t,e,r){var n=nu(e),i=Vr(e,n);null!=r||ms(e)&&(i.length||!n.length)||(r=e,e=t,t=this,i=Vr(e,nu(e)));var a=!(ms(r)&&"chain"in r&&!r.chain),o=ps(t);return s(i,function(r){var n=e[r];t[r]=n,o&&(t.prototype[r]=function(){var e=this.__chain__;if(a||e){var r=t(this.__wrapped__),i=r.__actions__=ri(this.__actions__);return i.push({func:n,args:arguments,thisArg:t}),r.__chain__=e,r}return n.apply(t,p([this.value()],arguments))})}),t}function Ku(){return Pr._===this&&(Pr._=Oc),this}function Ju(){}function Qu(t){return t=js(t),Go(function(e){return pn(e,t)})}function tc(t){return Ji(t)?vn(ca(t)):_n(t)}function ec(t){return function(e){return null==t?X:Gr(t,e)}}function rc(){return[]}function nc(){return!1}function ic(){return{}}function ac(){return""}function oc(){return!0}function sc(t,e){if(t=js(t),1>t||t>At)return[];var r=Et,n=Qc(t,Et);e=Ri(e),t-=Et;for(var i=D(n,e);++r<t;)e(r);return i}function uc(t){return yh(t)?d(t,ca):Ls(t)?[t]:ri(Ol(t))}function cc(t){var e=++Fc;return Vs(t)+e}function lc(t){return t&&t.length?Mr(t,Wu,Hr):X}function hc(t,e){return t&&t.length?Mr(t,Ri(e),Hr):X}function fc(t){return A(t,Wu)}function dc(t,e){return A(t,Ri(e))}function pc(t){return t&&t.length?Mr(t,Wu,un):X}function gc(t,e){return t&&t.length?Mr(t,Ri(e),un):X}function yc(t){return t&&t.length?E(t,Wu):0}function mc(t,e){return t&&t.length?E(t,Ri(e)):0}t=t?jr.defaults({},t,jr.pick(Pr,Ar)):Pr;var vc=t.Date,_c=t.Error,bc=t.Math,wc=t.RegExp,Ac=t.TypeError,xc=t.Array.prototype,kc=t.Object.prototype,Ec=t.String.prototype,Dc=t["__core-js_shared__"],Cc=function(){var t=/[^.]+$/.exec(Dc&&Dc.keys&&Dc.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Sc=t.Function.prototype.toString,Tc=kc.hasOwnProperty,Fc=0,Bc=Sc.call(Object),Lc=kc.toString,Oc=Pr._,Ic=wc("^"+Sc.call(Tc).replace(ge,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Rc=Ir?t.Buffer:X,Mc=t.Reflect,Nc=t.Symbol,Pc=t.Uint8Array,jc=Mc?Mc.enumerate:X,qc=Object.getOwnPropertySymbols,Uc="symbol"==typeof(Uc=Nc&&Nc.iterator)?Uc:X,Yc=Object.create,$c=kc.propertyIsEnumerable,Vc=xc.splice,Gc=function(e,r){return t.setTimeout.call(Pr,e,r)},Wc=bc.ceil,Hc=bc.floor,zc=Object.getPrototypeOf,Zc=t.isFinite,Xc=xc.join,Kc=Object.keys,Jc=bc.max,Qc=bc.min,tl=t.parseInt,el=bc.random,rl=Ec.replace,nl=xc.reverse,il=Ec.split,al=Pi(t,"DataView"),ol=Pi(t,"Map"),sl=Pi(t,"Promise"),ul=Pi(t,"Set"),cl=Pi(t,"WeakMap"),ll=Pi(Object,"create"),hl=cl&&new cl,fl=!$c.call({valueOf:1},"valueOf"),dl={},pl=la(al),gl=la(ol),yl=la(sl),ml=la(ul),vl=la(cl),_l=Nc?Nc.prototype:X,bl=_l?_l.valueOf:X,wl=_l?_l.toString:X;e.templateSettings={escape:ce,evaluate:le,interpolate:he,variable:"",imports:{_:e}},e.prototype=r.prototype,e.prototype.constructor=e,O.prototype=Tr(r.prototype),O.prototype.constructor=O,Oe.prototype=Tr(r.prototype),Oe.prototype.constructor=Oe,Ne.prototype.clear=Pe,Ne.prototype["delete"]=je,Ne.prototype.get=qe,Ne.prototype.has=Ue,Ne.prototype.set=Ye,$e.prototype.clear=Ve,$e.prototype["delete"]=Ge,$e.prototype.get=We,$e.prototype.has=He,$e.prototype.set=ze,Ze.prototype.clear=Xe,Ze.prototype["delete"]=Ke,Ze.prototype.get=Je,Ze.prototype.has=Qe,Ze.prototype.set=tr,er.prototype.add=er.prototype.push=rr,er.prototype.has=nr,ir.prototype.clear=ar,ir.prototype["delete"]=or,ir.prototype.get=sr,ir.prototype.has=ur,ir.prototype.set=cr;var Al=si(Yr),xl=si($r,!0),kl=ui(),El=ui(!0);jc&&!$c.call({valueOf:1},"valueOf")&&(sn=function(t){return U(jc(t))});var Dl=hl?function(t,e){return hl.set(t,e),t}:Wu,Cl=ul&&1/V(new ul([,-0]))[1]==wt?function(t){return new ul(t)}:Ju,Sl=hl?function(t){return hl.get(t)}:Ju,Tl=vn("length");qc||(qi=rc);var Fl=qc?function(t){for(var e=[];t;)p(e,qi(t)),t=ji(t);return e}:qi;(al&&Ui(new al(new ArrayBuffer(1)))!=Wt||ol&&Ui(new ol)!=Rt||sl&&Ui(sl.resolve())!=Pt||ul&&Ui(new ul)!=qt||cl&&Ui(new cl)!=$t)&&(Ui=function(t){var e=Lc.call(t),r=e==Nt?t.constructor:X,n=r?la(r):X;if(n)switch(n){case pl:return Wt;case gl:return Rt;case yl:return Pt;case ml:return qt;case vl:return $t}return e});var Bl=Dc?ps:nc,Ll=function(){var t=0,e=0;return function(r,n){var i=Io(),a=mt-(i-e);if(e=i,a>0){if(++t>=yt)return r}else t=0;return Dl(r,n)}}(),Ol=Yo(function(t){var e=[];return Vs(t).replace(pe,function(t,r,n,i){e.push(n?i.replace(we,"$1"):r||t)}),e}),Il=Go(function(t,e){return as(t)?Or(t,Ur(e,1,as,!0)):[]}),Rl=Go(function(t,e){var r=Fa(e);return as(r)&&(r=X),as(t)?Or(t,Ur(e,1,as,!0),Ri(r)):[]}),Ml=Go(function(t,e){var r=Fa(e);return as(r)&&(r=X),as(t)?Or(t,Ur(e,1,as,!0),X,r):[]}),Nl=Go(function(t){var e=d(t,qn);return e.length&&e[0]===t[0]?Kr(e):[]}),Pl=Go(function(t){var e=Fa(t),r=d(t,qn);return e===Fa(r)?e=X:r.pop(),r.length&&r[0]===t[0]?Kr(r,Ri(e)):[]}),jl=Go(function(t){var e=Fa(t),r=d(t,qn);return e===Fa(r)?e=X:r.pop(),r.length&&r[0]===t[0]?Kr(r,X,e):[]}),ql=Go(Oa),Ul=Go(function(t,e){e=Ur(e,1);var r=t?t.length:0,n=vr(t,e);return wn(t,d(e,function(t){return Xi(t,r)?+t:t}).sort(Jn)),n}),Yl=Go(function(t){return On(Ur(t,1,as,!0))}),$l=Go(function(t){var e=Fa(t);return as(e)&&(e=X),On(Ur(t,1,as,!0),Ri(e))}),Vl=Go(function(t){var e=Fa(t);return as(e)&&(e=X),On(Ur(t,1,as,!0),X,e)}),Gl=Go(function(t,e){return as(t)?Or(t,e):[]}),Wl=Go(function(t){return Pn(l(t,as))}),Hl=Go(function(t){var e=Fa(t);return as(e)&&(e=X),Pn(l(t,as),Ri(e))}),zl=Go(function(t){var e=Fa(t);return as(e)&&(e=X),Pn(l(t,as),X,e)}),Zl=Go(eo),Xl=Go(function(t){var e=t.length,r=e>1?t[e-1]:X;return r="function"==typeof r?(t.pop(),r):X,ro(t,r)}),Kl=Go(function(t){t=Ur(t,1);var e=t.length,r=e?t[0]:0,n=this.__wrapped__,i=function(e){return vr(e,t)};return!(e>1||this.__actions__.length)&&n instanceof Oe&&Xi(r)?(n=n.slice(r,+r+(e?1:0)),n.__actions__.push({func:so,args:[i],thisArg:X}),new O(n,this.__chain__).thru(function(t){return e&&!t.length&&t.push(X),t})):this.thru(i)}),Jl=ai(function(t,e,r){Tc.call(t,r)?++t[r]:t[r]=1}),Ql=pi(ba),th=pi(wa),eh=ai(function(t,e,r){Tc.call(t,r)?t[r].push(e):t[r]=[e]}),rh=Go(function(t,e,r){var n=-1,i="function"==typeof e,o=Ji(e),s=is(t)?Array(t.length):[];return Al(t,function(t){var u=i?e:o&&null!=t?t[e]:X;s[++n]=u?a(u,t,r):Qr(t,e,r)}),s}),nh=ai(function(t,e,r){t[r]=e}),ih=ai(function(t,e,r){t[r?0:1].push(e)},function(){return[[],[]]}),ah=Go(function(t,e){if(null==t)return[];var r=e.length;return r>1&&Ki(t,e[0],e[1])?e=[]:r>2&&Ki(e[0],e[1],e[2])&&(e=[e[0]]),e=1==e.length&&yh(e[0])?e[0]:Ur(e,1,Zi),gn(t,e,[])}),oh=Go(function(t,e,r){var n=rt;if(r.length){var i=$(r,Ii(oh));n|=st}return Ci(t,n,e,r,i)}),sh=Go(function(t,e,r){var n=rt|nt;if(r.length){var i=$(r,Ii(sh));n|=st}return Ci(e,n,t,r,i)}),uh=Go(function(t,e){return Lr(t,1,e)}),ch=Go(function(t,e,r){return Lr(t,Us(e)||0,r)});Yo.Cache=Ze;var lh=Go(function(t,e){e=1==e.length&&yh(e[0])?d(e[0],S(Ri())):d(Ur(e,1,Zi),S(Ri()));var r=e.length;return Go(function(n){for(var i=-1,o=Qc(n.length,r);++i<o;)n[i]=e[i].call(this,n[i]);return a(t,this,n)})}),hh=Go(function(t,e){var r=$(e,Ii(hh));return Ci(t,st,X,e,r)}),fh=Go(function(t,e){var r=$(e,Ii(fh));return Ci(t,ut,X,e,r)}),dh=Go(function(t,e){return Ci(t,lt,X,X,X,Ur(e,1))}),ph=xi(Hr),gh=xi(function(t,e){return t>=e}),yh=Array.isArray,mh=Rc?function(t){return t instanceof Rc}:nc,vh=xi(un),_h=xi(function(t,e){return e>=t}),bh=oi(function(t,e){if(fl||ra(e)||is(e))return void ni(e,nu(e),t);for(var r in e)Tc.call(e,r)&&fr(t,r,e[r])}),wh=oi(function(t,e){if(fl||ra(e)||is(e))return void ni(e,iu(e),t);for(var r in e)fr(t,r,e[r])}),Ah=oi(function(t,e,r,n){ni(e,iu(e),t,n)}),xh=oi(function(t,e,r,n){ni(e,nu(e),t,n)}),kh=Go(function(t,e){return vr(t,Ur(e,1))}),Eh=Go(function(t){return t.push(X,lr),a(Ah,X,t)}),Dh=Go(function(t){return t.push(X,oa),a(Bh,X,t)}),Ch=mi(function(t,e,r){t[e]=r},Gu(Wu)),Sh=mi(function(t,e,r){Tc.call(t,e)?t[e].push(r):t[e]=[r]},Ri),Th=Go(Qr),Fh=oi(function(t,e,r){fn(t,e,r)}),Bh=oi(function(t,e,r,n){fn(t,e,r,n)}),Lh=Go(function(t,e){return null==t?{}:(e=d(Ur(e,1),ca),yn(t,Or(Li(t),e)))}),Oh=Go(function(t,e){return null==t?{}:yn(t,d(Ur(e,1),ca))}),Ih=Di(nu),Rh=Di(iu),Mh=hi(function(t,e,r){return e=e.toLowerCase(),t+(r?wu(e):e)}),Nh=hi(function(t,e,r){return t+(r?"-":"")+e.toLowerCase()}),Ph=hi(function(t,e,r){return t+(r?" ":"")+e.toLowerCase()}),jh=li("toLowerCase"),qh=hi(function(t,e,r){return t+(r?"_":"")+e.toLowerCase()}),Uh=hi(function(t,e,r){return t+(r?" ":"")+$h(e)}),Yh=hi(function(t,e,r){return t+(r?" ":"")+e.toUpperCase()}),$h=li("toUpperCase"),Vh=Go(function(t,e){try{return a(t,X,e)}catch(r){return fs(r)?r:new _c(r)}}),Gh=Go(function(t,e){return s(Ur(e,1),function(e){e=ca(e),t[e]=oh(t[e],t)}),t}),Wh=gi(),Hh=gi(!0),zh=Go(function(t,e){return function(r){return Qr(r,t,e)}}),Zh=Go(function(t,e){return function(r){return Qr(t,r,e)}}),Xh=_i(d),Kh=_i(c),Jh=_i(m),Qh=Ai(),tf=Ai(!0),ef=vi(function(t,e){return t+e}),rf=Ei("ceil"),nf=vi(function(t,e){return t/e}),af=Ei("floor"),of=vi(function(t,e){return t*e}),sf=Ei("round"),uf=vi(function(t,e){return t-e});return e.after=Ro,e.ary=Mo,e.assign=bh,e.assignIn=wh,e.assignInWith=Ah,e.assignWith=xh,e.at=kh,e.before=No,e.bind=oh,e.bindAll=Gh,e.bindKey=sh,e.castArray=Xo,e.chain=ao,e.chunk=fa,e.compact=da,e.concat=pa,e.cond=$u,e.conforms=Vu,e.constant=Gu,e.countBy=Jl,e.create=Gs,e.curry=Po,e.curryRight=jo,e.debounce=qo,e.defaults=Eh,e.defaultsDeep=Dh,e.defer=uh,e.delay=ch,e.difference=Il,e.differenceBy=Rl,e.differenceWith=Ml,e.drop=ga,e.dropRight=ya,e.dropRightWhile=ma,e.dropWhile=va,e.fill=_a,e.filter=mo,e.flatMap=vo,e.flatMapDeep=_o,e.flatMapDepth=bo,e.flatten=Aa,e.flattenDeep=xa,e.flattenDepth=ka,e.flip=Uo,e.flow=Wh,e.flowRight=Hh,e.fromPairs=Ea,e.functions=Js,e.functionsIn=Qs,e.groupBy=eh,e.initial=Sa,e.intersection=Nl,e.intersectionBy=Pl,e.intersectionWith=jl,e.invert=Ch,e.invertBy=Sh,e.invokeMap=rh,e.iteratee=Hu,e.keyBy=nh,e.keys=nu,e.keysIn=iu,e.map=ko,e.mapKeys=au,e.mapValues=ou,e.matches=zu,e.matchesProperty=Zu,e.memoize=Yo,e.merge=Fh,e.mergeWith=Bh,e.method=zh,e.methodOf=Zh,e.mixin=Xu,e.negate=$o,e.nthArg=Qu,e.omit=Lh,e.omitBy=su,e.once=Vo,e.orderBy=Eo,e.over=Xh,e.overArgs=lh,e.overEvery=Kh,e.overSome=Jh,e.partial=hh,e.partialRight=fh,e.partition=ih,e.pick=Oh,e.pickBy=uu,e.property=tc,e.propertyOf=ec,e.pull=ql,e.pullAll=Oa,e.pullAllBy=Ia,e.pullAllWith=Ra,e.pullAt=Ul,e.range=Qh,e.rangeRight=tf,e.rearg=dh,e.reject=So,e.remove=Ma,e.rest=Go,e.reverse=Na,e.sampleSize=Fo,e.set=lu,e.setWith=hu,e.shuffle=Bo,e.slice=Pa,e.sortBy=ah,e.sortedUniq=Ga,e.sortedUniqBy=Wa,e.split=Lu,e.spread=Wo,e.tail=Ha,e.take=za,e.takeRight=Za,e.takeRightWhile=Xa,e.takeWhile=Ka,e.tap=oo,e.throttle=Ho,e.thru=so,e.toArray=Ns,e.toPairs=Ih,e.toPairsIn=Rh,e.toPath=uc,e.toPlainObject=Ys,e.transform=fu,e.unary=zo,e.union=Yl,e.unionBy=$l,e.unionWith=Vl,e.uniq=Ja,e.uniqBy=Qa,e.uniqWith=to,e.unset=du,e.unzip=eo,e.unzipWith=ro,e.update=pu,e.updateWith=gu,e.values=yu,e.valuesIn=mu,e.without=Gl,e.words=Yu,e.wrap=Zo,e.xor=Wl,e.xorBy=Hl, e.xorWith=zl,e.zip=Zl,e.zipObject=no,e.zipObjectDeep=io,e.zipWith=Xl,e.entries=Ih,e.entriesIn=Rh,e.extend=wh,e.extendWith=Ah,Xu(e,e),e.add=ef,e.attempt=Vh,e.camelCase=Mh,e.capitalize=wu,e.ceil=rf,e.clamp=vu,e.clone=Ko,e.cloneDeep=Qo,e.cloneDeepWith=ts,e.cloneWith=Jo,e.deburr=Au,e.divide=nf,e.endsWith=xu,e.eq=es,e.escape=ku,e.escapeRegExp=Eu,e.every=yo,e.find=Ql,e.findIndex=ba,e.findKey=Ws,e.findLast=th,e.findLastIndex=wa,e.findLastKey=Hs,e.floor=af,e.forEach=wo,e.forEachRight=Ao,e.forIn=zs,e.forInRight=Zs,e.forOwn=Xs,e.forOwnRight=Ks,e.get=tu,e.gt=ph,e.gte=gh,e.has=eu,e.hasIn=ru,e.head=Da,e.identity=Wu,e.includes=xo,e.indexOf=Ca,e.inRange=_u,e.invoke=Th,e.isArguments=rs,e.isArray=yh,e.isArrayBuffer=ns,e.isArrayLike=is,e.isArrayLikeObject=as,e.isBoolean=os,e.isBuffer=mh,e.isDate=ss,e.isElement=us,e.isEmpty=cs,e.isEqual=ls,e.isEqualWith=hs,e.isError=fs,e.isFinite=ds,e.isFunction=ps,e.isInteger=gs,e.isLength=ys,e.isMap=_s,e.isMatch=bs,e.isMatchWith=ws,e.isNaN=As,e.isNative=xs,e.isNil=Es,e.isNull=ks,e.isNumber=Ds,e.isObject=ms,e.isObjectLike=vs,e.isPlainObject=Cs,e.isRegExp=Ss,e.isSafeInteger=Ts,e.isSet=Fs,e.isString=Bs,e.isSymbol=Ls,e.isTypedArray=Os,e.isUndefined=Is,e.isWeakMap=Rs,e.isWeakSet=Ms,e.join=Ta,e.kebabCase=Nh,e.last=Fa,e.lastIndexOf=Ba,e.lowerCase=Ph,e.lowerFirst=jh,e.lt=vh,e.lte=_h,e.max=lc,e.maxBy=hc,e.mean=fc,e.meanBy=dc,e.min=pc,e.minBy=gc,e.stubArray=rc,e.stubFalse=nc,e.stubObject=ic,e.stubString=ac,e.stubTrue=oc,e.multiply=of,e.nth=La,e.noConflict=Ku,e.noop=Ju,e.now=Io,e.pad=Du,e.padEnd=Cu,e.padStart=Su,e.parseInt=Tu,e.random=bu,e.reduce=Do,e.reduceRight=Co,e.repeat=Fu,e.replace=Bu,e.result=cu,e.round=sf,e.runInContext=Z,e.sample=To,e.size=Lo,e.snakeCase=qh,e.some=Oo,e.sortedIndex=ja,e.sortedIndexBy=qa,e.sortedIndexOf=Ua,e.sortedLastIndex=Ya,e.sortedLastIndexBy=$a,e.sortedLastIndexOf=Va,e.startCase=Uh,e.startsWith=Ou,e.subtract=uf,e.sum=yc,e.sumBy=mc,e.template=Iu,e.times=sc,e.toFinite=Ps,e.toInteger=js,e.toLength=qs,e.toLower=Ru,e.toNumber=Us,e.toSafeInteger=$s,e.toString=Vs,e.toUpper=Mu,e.trim=Nu,e.trimEnd=Pu,e.trimStart=ju,e.truncate=qu,e.unescape=Uu,e.uniqueId=cc,e.upperCase=Yh,e.upperFirst=$h,e.each=wo,e.eachRight=Ao,e.first=Da,Xu(e,function(){var t={};return Yr(e,function(r,n){Tc.call(e.prototype,n)||(t[n]=r)}),t}(),{chain:!1}),e.VERSION=K,s(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){e[t].placeholder=e}),s(["drop","take"],function(t,e){Oe.prototype[t]=function(r){var n=this.__filtered__;if(n&&!e)return new Oe(this);r=r===X?1:Jc(js(r),0);var i=this.clone();return n?i.__takeCount__=Qc(r,i.__takeCount__):i.__views__.push({size:Qc(r,Et),type:t+(i.__dir__<0?"Right":"")}),i},Oe.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}}),s(["filter","map","takeWhile"],function(t,e){var r=e+1,n=r==vt||r==bt;Oe.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:Ri(t,3),type:r}),e.__filtered__=e.__filtered__||n,e}}),s(["head","last"],function(t,e){var r="take"+(e?"Right":"");Oe.prototype[t]=function(){return this[r](1).value()[0]}}),s(["initial","tail"],function(t,e){var r="drop"+(e?"":"Right");Oe.prototype[t]=function(){return this.__filtered__?new Oe(this):this[r](1)}}),Oe.prototype.compact=function(){return this.filter(Wu)},Oe.prototype.find=function(t){return this.filter(t).head()},Oe.prototype.findLast=function(t){return this.reverse().find(t)},Oe.prototype.invokeMap=Go(function(t,e){return"function"==typeof t?new Oe(this):this.map(function(r){return Qr(r,t,e)})}),Oe.prototype.reject=function(t){return t=Ri(t,3),this.filter(function(e){return!t(e)})},Oe.prototype.slice=function(t,e){t=js(t);var r=this;return r.__filtered__&&(t>0||0>e)?new Oe(r):(0>t?r=r.takeRight(-t):t&&(r=r.drop(t)),e!==X&&(e=js(e),r=0>e?r.dropRight(-e):r.take(e-t)),r)},Oe.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Oe.prototype.toArray=function(){return this.take(Et)},Yr(Oe.prototype,function(t,r){var n=/^(?:filter|find|map|reject)|While$/.test(r),i=/^(?:head|last)$/.test(r),a=e[i?"take"+("last"==r?"Right":""):r],o=i||/^find/.test(r);a&&(e.prototype[r]=function(){var r=this.__wrapped__,s=i?[1]:arguments,u=r instanceof Oe,c=s[0],l=u||yh(r),h=function(t){var r=a.apply(e,p([t],s));return i&&f?r[0]:r};l&&n&&"function"==typeof c&&1!=c.length&&(u=l=!1);var f=this.__chain__,d=!!this.__actions__.length,g=o&&!f,y=u&&!d;if(!o&&l){r=y?r:new Oe(this);var m=t.apply(r,s);return m.__actions__.push({func:so,args:[h],thisArg:X}),new O(m,f)}return g&&y?t.apply(this,s):(m=this.thru(h),g?i?m.value()[0]:m.value():m)})}),s(["pop","push","shift","sort","splice","unshift"],function(t){var r=xc[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",i=/^(?:pop|shift)$/.test(t);e.prototype[t]=function(){var t=arguments;if(i&&!this.__chain__){var e=this.value();return r.apply(yh(e)?e:[],t)}return this[n](function(e){return r.apply(yh(e)?e:[],t)})}}),Yr(Oe.prototype,function(t,r){var n=e[r];if(n){var i=n.name+"",a=dl[i]||(dl[i]=[]);a.push({name:r,func:n})}}),dl[yi(X,nt).name]=[{name:"wrapper",func:X}],Oe.prototype.clone=Ie,Oe.prototype.reverse=Re,Oe.prototype.value=Me,e.prototype.at=Kl,e.prototype.chain=uo,e.prototype.commit=co,e.prototype.next=lo,e.prototype.plant=fo,e.prototype.reverse=po,e.prototype.toJSON=e.prototype.valueOf=e.prototype.value=go,Uc&&(e.prototype[Uc]=ho),e}var X,K="4.13.1",J=200,Q="Expected a function",tt="__lodash_hash_undefined__",et="__lodash_placeholder__",rt=1,nt=2,it=4,at=8,ot=16,st=32,ut=64,ct=128,lt=256,ht=512,ft=1,dt=2,pt=30,gt="...",yt=150,mt=16,vt=1,_t=2,bt=3,wt=1/0,At=9007199254740991,xt=1.7976931348623157e308,kt=0/0,Et=4294967295,Dt=Et-1,Ct=Et>>>1,St="[object Arguments]",Tt="[object Array]",Ft="[object Boolean]",Bt="[object Date]",Lt="[object Error]",Ot="[object Function]",It="[object GeneratorFunction]",Rt="[object Map]",Mt="[object Number]",Nt="[object Object]",Pt="[object Promise]",jt="[object RegExp]",qt="[object Set]",Ut="[object String]",Yt="[object Symbol]",$t="[object WeakMap]",Vt="[object WeakSet]",Gt="[object ArrayBuffer]",Wt="[object DataView]",Ht="[object Float32Array]",zt="[object Float64Array]",Zt="[object Int8Array]",Xt="[object Int16Array]",Kt="[object Int32Array]",Jt="[object Uint8Array]",Qt="[object Uint8ClampedArray]",te="[object Uint16Array]",ee="[object Uint32Array]",re=/\b__p \+= '';/g,ne=/\b(__p \+=) '' \+/g,ie=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ae=/&(?:amp|lt|gt|quot|#39|#96);/g,oe=/[&<>"'`]/g,se=RegExp(ae.source),ue=RegExp(oe.source),ce=/<%-([\s\S]+?)%>/g,le=/<%([\s\S]+?)%>/g,he=/<%=([\s\S]+?)%>/g,fe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,de=/^\w*$/,pe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(\.|\[\])(?:\4|$))/g,ge=/[\\^$.*+?()[\]{}|]/g,ye=RegExp(ge.source),me=/^\s+|\s+$/g,ve=/^\s+/,_e=/\s+$/,be=/[a-zA-Z0-9]+/g,we=/\\(\\)?/g,Ae=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,xe=/\w*$/,ke=/^0x/i,Ee=/^[-+]0x[0-9a-f]+$/i,De=/^0b[01]+$/i,Ce=/^\[object .+?Constructor\]$/,Se=/^0o[0-7]+$/i,Te=/^(?:0|[1-9]\d*)$/,Fe=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,Be=/($^)/,Le=/['\n\r\u2028\u2029\\]/g,Oe="\\ud800-\\udfff",Ie="\\u0300-\\u036f\\ufe20-\\ufe23",Re="\\u20d0-\\u20f0",Me="\\u2700-\\u27bf",Ne="a-z\\xdf-\\xf6\\xf8-\\xff",Pe="\\xac\\xb1\\xd7\\xf7",je="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",qe="\\u2000-\\u206f",Ue=" \\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",Ye="A-Z\\xc0-\\xd6\\xd8-\\xde",$e="\\ufe0e\\ufe0f",Ve=Pe+je+qe+Ue,Ge="['’]",We="["+Oe+"]",He="["+Ve+"]",ze="["+Ie+Re+"]",Ze="\\d+",Xe="["+Me+"]",Ke="["+Ne+"]",Je="[^"+Oe+Ve+Ze+Me+Ne+Ye+"]",Qe="\\ud83c[\\udffb-\\udfff]",tr="(?:"+ze+"|"+Qe+")",er="[^"+Oe+"]",rr="(?:\\ud83c[\\udde6-\\uddff]){2}",nr="[\\ud800-\\udbff][\\udc00-\\udfff]",ir="["+Ye+"]",ar="\\u200d",or="(?:"+Ke+"|"+Je+")",sr="(?:"+ir+"|"+Je+")",ur="(?:"+Ge+"(?:d|ll|m|re|s|t|ve))?",cr="(?:"+Ge+"(?:D|LL|M|RE|S|T|VE))?",lr=tr+"?",hr="["+$e+"]?",fr="(?:"+ar+"(?:"+[er,rr,nr].join("|")+")"+hr+lr+")*",dr=hr+lr+fr,pr="(?:"+[Xe,rr,nr].join("|")+")"+dr,gr="(?:"+[er+ze+"?",ze,rr,nr,We].join("|")+")",yr=RegExp(Ge,"g"),mr=RegExp(ze,"g"),vr=RegExp(Qe+"(?="+Qe+")|"+gr+dr,"g"),_r=RegExp([ir+"?"+Ke+"+"+ur+"(?="+[He,ir,"$"].join("|")+")",sr+"+"+cr+"(?="+[He,ir+or,"$"].join("|")+")",ir+"?"+or+"+"+ur,ir+"+"+cr,Ze,pr].join("|"),"g"),br=RegExp("["+ar+Oe+Ie+Re+$e+"]"),wr=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ar=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","Reflect","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","isFinite","parseInt","setTimeout"],xr=-1,kr={};kr[Ht]=kr[zt]=kr[Zt]=kr[Xt]=kr[Kt]=kr[Jt]=kr[Qt]=kr[te]=kr[ee]=!0,kr[St]=kr[Tt]=kr[Gt]=kr[Ft]=kr[Wt]=kr[Bt]=kr[Lt]=kr[Ot]=kr[Rt]=kr[Mt]=kr[Nt]=kr[jt]=kr[qt]=kr[Ut]=kr[$t]=!1;var Er={};Er[St]=Er[Tt]=Er[Gt]=Er[Wt]=Er[Ft]=Er[Bt]=Er[Ht]=Er[zt]=Er[Zt]=Er[Xt]=Er[Kt]=Er[Rt]=Er[Mt]=Er[Nt]=Er[jt]=Er[qt]=Er[Ut]=Er[Yt]=Er[Jt]=Er[Qt]=Er[te]=Er[ee]=!0,Er[Lt]=Er[Ot]=Er[$t]=!1;var Dr={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss"},Cr={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Sr={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},Tr={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Fr=parseFloat,Br=parseInt,Lr="object"==typeof r&&r,Or=Lr&&"object"==typeof e&&e,Ir=Or&&Or.exports===Lr,Rr=O("object"==typeof t&&t),Mr=O("object"==typeof self&&self),Nr=O("object"==typeof this&&this),Pr=Rr||Mr||Nr||Function("return this")(),jr=Z();(Mr||{})._=jr,"function"==typeof define&&"object"==typeof define.amd&&define.amd?define(function(){return jr}):Or?((Or.exports=jr)._=jr,Lr._=jr):Pr._=jr}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],104:[function(t,e,r){!function(t,n){"object"==typeof r&&"undefined"!=typeof e?e.exports=n():"function"==typeof define&&define.amd?define(n):t.moment=n()}(this,function(){"use strict";function r(){return un.apply(null,arguments)}function n(t){un=t}function i(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function a(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function o(t,e){var r,n=[];for(r=0;r<t.length;++r)n.push(e(t[r],r));return n}function s(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function u(t,e){for(var r in e)s(e,r)&&(t[r]=e[r]);return s(e,"toString")&&(t.toString=e.toString),s(e,"valueOf")&&(t.valueOf=e.valueOf),t}function c(t,e,r,n){return Nt(t,e,r,n,!0).utc()}function l(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null}}function h(t){return null==t._pf&&(t._pf=l()),t._pf}function f(t){if(null==t._isValid){var e=h(t),r=cn.call(e.parsedDateParts,function(t){return null!=t});t._isValid=!isNaN(t._d.getTime())&&e.overflow<0&&!e.empty&&!e.invalidMonth&&!e.invalidWeekday&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&r),t._strict&&(t._isValid=t._isValid&&0===e.charsLeftOver&&0===e.unusedTokens.length&&void 0===e.bigHour)}return t._isValid}function d(t){var e=c(0/0);return null!=t?u(h(e),t):h(e).userInvalidated=!0,e}function p(t){return void 0===t}function g(t,e){var r,n,i;if(p(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),p(e._i)||(t._i=e._i),p(e._f)||(t._f=e._f),p(e._l)||(t._l=e._l),p(e._strict)||(t._strict=e._strict),p(e._tzm)||(t._tzm=e._tzm),p(e._isUTC)||(t._isUTC=e._isUTC),p(e._offset)||(t._offset=e._offset),p(e._pf)||(t._pf=h(e)),p(e._locale)||(t._locale=e._locale),ln.length>0)for(r in ln)n=ln[r],i=e[n],p(i)||(t[n]=i);return t}function y(t){g(this,t),this._d=new Date(null!=t._d?t._d.getTime():0/0),hn===!1&&(hn=!0,r.updateOffset(this),hn=!1)}function m(t){return t instanceof y||null!=t&&null!=t._isAMomentObject}function v(t){return 0>t?Math.ceil(t):Math.floor(t)}function _(t){var e=+t,r=0;return 0!==e&&isFinite(e)&&(r=v(e)),r}function b(t,e,r){var n,i=Math.min(t.length,e.length),a=Math.abs(t.length-e.length),o=0;for(n=0;i>n;n++)(r&&t[n]!==e[n]||!r&&_(t[n])!==_(e[n]))&&o++;return o+a}function w(t){r.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function A(t,e){var n=!0;return u(function(){return null!=r.deprecationHandler&&r.deprecationHandler(null,t),n&&(w(t+"\nArguments: "+Array.prototype.slice.call(arguments).join(", ")+"\n"+(new Error).stack),n=!1),e.apply(this,arguments)},e)}function x(t,e){null!=r.deprecationHandler&&r.deprecationHandler(t,e),fn[t]||(w(e),fn[t]=!0)}function k(t){return t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)}function E(t){return"[object Object]"===Object.prototype.toString.call(t)}function D(t){var e,r;for(r in t)e=t[r],k(e)?this[r]=e:this["_"+r]=e;this._config=t,this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function C(t,e){var r,n=u({},t);for(r in e)s(e,r)&&(E(t[r])&&E(e[r])?(n[r]={},u(n[r],t[r]),u(n[r],e[r])):null!=e[r]?n[r]=e[r]:delete n[r]);return n}function S(t){null!=t&&this.set(t)}function T(t){return t?t.toLowerCase().replace("_","-"):t}function F(t){for(var e,r,n,i,a=0;a<t.length;){for(i=T(t[a]).split("-"),e=i.length,r=T(t[a+1]),r=r?r.split("-"):null;e>0;){if(n=B(i.slice(0,e).join("-")))return n;if(r&&r.length>=e&&b(i,r,!0)>=e-1)break;e--}a++}return null}function B(r){var n=null;if(!yn[r]&&"undefined"!=typeof e&&e&&e.exports)try{n=pn._abbr,t("./locale/"+r),L(n)}catch(i){}return yn[r]}function L(t,e){var r;return t&&(r=p(e)?R(t):O(t,e),r&&(pn=r)),pn._abbr}function O(t,e){return null!==e?(e.abbr=t,null!=yn[t]?(x("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale"),e=C(yn[t]._config,e)):null!=e.parentLocale&&(null!=yn[e.parentLocale]?e=C(yn[e.parentLocale]._config,e):x("parentLocaleUndefined","specified parentLocale is not defined yet")),yn[t]=new S(e),L(t),yn[t]):(delete yn[t],null)}function I(t,e){if(null!=e){var r;null!=yn[t]&&(e=C(yn[t]._config,e)),r=new S(e),r.parentLocale=yn[t],yn[t]=r,L(t)}else null!=yn[t]&&(null!=yn[t].parentLocale?yn[t]=yn[t].parentLocale:null!=yn[t]&&delete yn[t]);return yn[t]}function R(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return pn;if(!i(t)){if(e=B(t))return e;t=[t]}return F(t)}function M(){return dn(yn)}function N(t,e){var r=t.toLowerCase();mn[r]=mn[r+"s"]=mn[e]=t}function P(t){return"string"==typeof t?mn[t]||mn[t.toLowerCase()]:void 0}function j(t){var e,r,n={};for(r in t)s(t,r)&&(e=P(r),e&&(n[e]=t[r]));return n}function q(t,e){return function(n){return null!=n?(Y(this,t,n),r.updateOffset(this,e),this):U(this,t)}}function U(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():0/0}function Y(t,e,r){t.isValid()&&t._d["set"+(t._isUTC?"UTC":"")+e](r)}function $(t,e){var r;if("object"==typeof t)for(r in t)this.set(r,t[r]);else if(t=P(t),k(this[t]))return this[t](e);return this}function V(t,e,r){var n=""+Math.abs(t),i=e-n.length,a=t>=0;return(a?r?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+n}function G(t,e,r,n){var i=n;"string"==typeof n&&(i=function(){return this[n]()}),t&&(wn[t]=i),e&&(wn[e[0]]=function(){return V(i.apply(this,arguments),e[1],e[2])}),r&&(wn[r]=function(){return this.localeData().ordinal(i.apply(this,arguments),t)})}function W(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function H(t){var e,r,n=t.match(vn);for(e=0,r=n.length;r>e;e++)n[e]=wn[n[e]]?wn[n[e]]:W(n[e]);return function(e){var i,a="";for(i=0;r>i;i++)a+=n[i]instanceof Function?n[i].call(e,t):n[i];return a}}function z(t,e){return t.isValid()?(e=Z(e,t.localeData()),bn[e]=bn[e]||H(e),bn[e](t)):t.localeData().invalidDate()}function Z(t,e){function r(t){return e.longDateFormat(t)||t}var n=5;for(_n.lastIndex=0;n>=0&&_n.test(t);)t=t.replace(_n,r),_n.lastIndex=0,n-=1;return t}function X(t,e,r){jn[t]=k(e)?e:function(t){return t&&r?r:e}}function K(t,e){return s(jn,t)?jn[t](e._strict,e._locale):new RegExp(J(t))}function J(t){return Q(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,r,n,i){return e||r||n||i}))}function Q(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function tt(t,e){var r,n=e;for("string"==typeof t&&(t=[t]),"number"==typeof e&&(n=function(t,r){r[e]=_(t)}),r=0;r<t.length;r++)qn[t[r]]=n}function et(t,e){tt(t,function(t,r,n,i){n._w=n._w||{},e(t,n._w,n,i)})}function rt(t,e,r){null!=e&&s(qn,t)&&qn[t](e,r._a,r,t)}function nt(t,e){return new Date(Date.UTC(t,e+1,0)).getUTCDate()}function it(t,e){return i(this._months)?this._months[t.month()]:this._months[Xn.test(e)?"format":"standalone"][t.month()]}function at(t,e){return i(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[Xn.test(e)?"format":"standalone"][t.month()]}function ot(t,e,r){var n,i,a,o=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;12>n;++n)a=c([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(a,"").toLocaleLowerCase();return r?"MMM"===e?(i=gn.call(this._shortMonthsParse,o),-1!==i?i:null):(i=gn.call(this._longMonthsParse,o),-1!==i?i:null):"MMM"===e?(i=gn.call(this._shortMonthsParse,o),-1!==i?i:(i=gn.call(this._longMonthsParse,o),-1!==i?i:null)):(i=gn.call(this._longMonthsParse,o),-1!==i?i:(i=gn.call(this._shortMonthsParse,o),-1!==i?i:null))}function st(t,e,r){var n,i,a;if(this._monthsParseExact)return ot.call(this,t,e,r);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;12>n;n++){if(i=c([2e3,n]),r&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),r||this._monthsParse[n]||(a="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[n]=new RegExp(a.replace(".",""),"i")),r&&"MMMM"===e&&this._longMonthsParse[n].test(t))return n;if(r&&"MMM"===e&&this._shortMonthsParse[n].test(t))return n;if(!r&&this._monthsParse[n].test(t))return n}}function ut(t,e){var r;if(!t.isValid())return t;if("string"==typeof e)if(/^\d+$/.test(e))e=_(e);else if(e=t.localeData().monthsParse(e),"number"!=typeof e)return t;return r=Math.min(t.date(),nt(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,r),t}function ct(t){return null!=t?(ut(this,t),r.updateOffset(this,!0),this):U(this,"Month")}function lt(){return nt(this.year(),this.month())}function ht(t){return this._monthsParseExact?(s(this,"_monthsRegex")||dt.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex}function ft(t){return this._monthsParseExact?(s(this,"_monthsRegex")||dt.call(this),t?this._monthsStrictRegex:this._monthsRegex):this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex}function dt(){function t(t,e){return e.length-t.length}var e,r,n=[],i=[],a=[];for(e=0;12>e;e++)r=c([2e3,e]),n.push(this.monthsShort(r,"")),i.push(this.months(r,"")),a.push(this.months(r,"")),a.push(this.monthsShort(r,""));for(n.sort(t),i.sort(t),a.sort(t),e=0;12>e;e++)n[e]=Q(n[e]),i[e]=Q(i[e]),a[e]=Q(a[e]);this._monthsRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+n.join("|")+")","i")}function pt(t){var e,r=t._a;return r&&-2===h(t).overflow&&(e=r[Yn]<0||r[Yn]>11?Yn:r[$n]<1||r[$n]>nt(r[Un],r[Yn])?$n:r[Vn]<0||r[Vn]>24||24===r[Vn]&&(0!==r[Gn]||0!==r[Wn]||0!==r[Hn])?Vn:r[Gn]<0||r[Gn]>59?Gn:r[Wn]<0||r[Wn]>59?Wn:r[Hn]<0||r[Hn]>999?Hn:-1,h(t)._overflowDayOfYear&&(Un>e||e>$n)&&(e=$n),h(t)._overflowWeeks&&-1===e&&(e=zn),h(t)._overflowWeekday&&-1===e&&(e=Zn),h(t).overflow=e),t}function gt(t){var e,r,n,i,a,o,s=t._i,u=ei.exec(s)||ri.exec(s);if(u){for(h(t).iso=!0,e=0,r=ii.length;r>e;e++)if(ii[e][1].exec(u[1])){i=ii[e][0],n=ii[e][2]!==!1;break}if(null==i)return void(t._isValid=!1);if(u[3]){for(e=0,r=ai.length;r>e;e++)if(ai[e][1].exec(u[3])){a=(u[2]||" ")+ai[e][0];break}if(null==a)return void(t._isValid=!1)}if(!n&&null!=a)return void(t._isValid=!1);if(u[4]){if(!ni.exec(u[4]))return void(t._isValid=!1);o="Z"}t._f=i+(a||"")+(o||""),Ft(t)}else t._isValid=!1}function yt(t){var e=oi.exec(t._i);return null!==e?void(t._d=new Date(+e[1])):(gt(t),void(t._isValid===!1&&(delete t._isValid,r.createFromInputFallback(t))))}function mt(t,e,r,n,i,a,o){var s=new Date(t,e,r,n,i,a,o);return 100>t&&t>=0&&isFinite(s.getFullYear())&&s.setFullYear(t),s}function vt(t){var e=new Date(Date.UTC.apply(null,arguments));return 100>t&&t>=0&&isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t),e}function _t(t){return bt(t)?366:365}function bt(t){return t%4===0&&t%100!==0||t%400===0}function wt(){return bt(this.year())}function At(t,e,r){var n=7+e-r,i=(7+vt(t,0,n).getUTCDay()-e)%7;return-i+n-1}function xt(t,e,r,n,i){var a,o,s=(7+r-n)%7,u=At(t,n,i),c=1+7*(e-1)+s+u;return 0>=c?(a=t-1,o=_t(a)+c):c>_t(t)?(a=t+1,o=c-_t(t)):(a=t,o=c),{year:a,dayOfYear:o}}function kt(t,e,r){var n,i,a=At(t.year(),e,r),o=Math.floor((t.dayOfYear()-a-1)/7)+1;return 1>o?(i=t.year()-1,n=o+Et(i,e,r)):o>Et(t.year(),e,r)?(n=o-Et(t.year(),e,r),i=t.year()+1):(i=t.year(),n=o),{week:n,year:i}}function Et(t,e,r){var n=At(t,e,r),i=At(t+1,e,r);return(_t(t)-n+i)/7}function Dt(t,e,r){return null!=t?t:null!=e?e:r}function Ct(t){var e=new Date(r.now());return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}function St(t){var e,r,n,i,a=[];if(!t._d){for(n=Ct(t),t._w&&null==t._a[$n]&&null==t._a[Yn]&&Tt(t),t._dayOfYear&&(i=Dt(t._a[Un],n[Un]),t._dayOfYear>_t(i)&&(h(t)._overflowDayOfYear=!0),r=vt(i,0,t._dayOfYear),t._a[Yn]=r.getUTCMonth(),t._a[$n]=r.getUTCDate()),e=0;3>e&&null==t._a[e];++e)t._a[e]=a[e]=n[e];for(;7>e;e++)t._a[e]=a[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[Vn]&&0===t._a[Gn]&&0===t._a[Wn]&&0===t._a[Hn]&&(t._nextDay=!0,t._a[Vn]=0),t._d=(t._useUTC?vt:mt).apply(null,a),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[Vn]=24)}}function Tt(t){var e,r,n,i,a,o,s,u;e=t._w,null!=e.GG||null!=e.W||null!=e.E?(a=1,o=4,r=Dt(e.GG,t._a[Un],kt(Pt(),1,4).year),n=Dt(e.W,1),i=Dt(e.E,1),(1>i||i>7)&&(u=!0)):(a=t._locale._week.dow,o=t._locale._week.doy,r=Dt(e.gg,t._a[Un],kt(Pt(),a,o).year),n=Dt(e.w,1),null!=e.d?(i=e.d,(0>i||i>6)&&(u=!0)):null!=e.e?(i=e.e+a,(e.e<0||e.e>6)&&(u=!0)):i=a),1>n||n>Et(r,a,o)?h(t)._overflowWeeks=!0:null!=u?h(t)._overflowWeekday=!0:(s=xt(r,n,i,a,o),t._a[Un]=s.year,t._dayOfYear=s.dayOfYear)}function Ft(t){if(t._f===r.ISO_8601)return void gt(t);t._a=[],h(t).empty=!0;var e,n,i,a,o,s=""+t._i,u=s.length,c=0;for(i=Z(t._f,t._locale).match(vn)||[],e=0;e<i.length;e++)a=i[e],n=(s.match(K(a,t))||[])[0],n&&(o=s.substr(0,s.indexOf(n)),o.length>0&&h(t).unusedInput.push(o),s=s.slice(s.indexOf(n)+n.length),c+=n.length),wn[a]?(n?h(t).empty=!1:h(t).unusedTokens.push(a),rt(a,n,t)):t._strict&&!n&&h(t).unusedTokens.push(a);h(t).charsLeftOver=u-c,s.length>0&&h(t).unusedInput.push(s),h(t).bigHour===!0&&t._a[Vn]<=12&&t._a[Vn]>0&&(h(t).bigHour=void 0),h(t).parsedDateParts=t._a.slice(0),h(t).meridiem=t._meridiem,t._a[Vn]=Bt(t._locale,t._a[Vn],t._meridiem),St(t),pt(t)}function Bt(t,e,r){var n;return null==r?e:null!=t.meridiemHour?t.meridiemHour(e,r):null!=t.isPM?(n=t.isPM(r),n&&12>e&&(e+=12),n||12!==e||(e=0),e):e}function Lt(t){var e,r,n,i,a;if(0===t._f.length)return h(t).invalidFormat=!0,void(t._d=new Date(0/0));for(i=0;i<t._f.length;i++)a=0,e=g({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._f=t._f[i],Ft(e),f(e)&&(a+=h(e).charsLeftOver,a+=10*h(e).unusedTokens.length,h(e).score=a,(null==n||n>a)&&(n=a,r=e));u(t,r||e)}function Ot(t){if(!t._d){var e=j(t._i);t._a=o([e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],function(t){return t&&parseInt(t,10)}),St(t)}}function It(t){var e=new y(pt(Rt(t)));return e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e}function Rt(t){var e=t._i,r=t._f;return t._locale=t._locale||R(t._l),null===e||void 0===r&&""===e?d({nullInput:!0}):("string"==typeof e&&(t._i=e=t._locale.preparse(e)),m(e)?new y(pt(e)):(i(r)?Lt(t):r?Ft(t):a(e)?t._d=e:Mt(t),f(t)||(t._d=null),t))}function Mt(t){var e=t._i;void 0===e?t._d=new Date(r.now()):a(e)?t._d=new Date(e.valueOf()):"string"==typeof e?yt(t):i(e)?(t._a=o(e.slice(0),function(t){return parseInt(t,10)}),St(t)):"object"==typeof e?Ot(t):"number"==typeof e?t._d=new Date(e):r.createFromInputFallback(t)}function Nt(t,e,r,n,i){var a={};return"boolean"==typeof r&&(n=r,r=void 0),a._isAMomentObject=!0,a._useUTC=a._isUTC=i,a._l=r,a._i=t,a._f=e,a._strict=n,It(a)}function Pt(t,e,r,n){return Nt(t,e,r,n,!1)}function jt(t,e){var r,n;if(1===e.length&&i(e[0])&&(e=e[0]),!e.length)return Pt();for(r=e[0],n=1;n<e.length;++n)(!e[n].isValid()||e[n][t](r))&&(r=e[n]);return r}function qt(){var t=[].slice.call(arguments,0);return jt("isBefore",t)}function Ut(){var t=[].slice.call(arguments,0);return jt("isAfter",t)}function Yt(t){var e=j(t),r=e.year||0,n=e.quarter||0,i=e.month||0,a=e.week||0,o=e.day||0,s=e.hour||0,u=e.minute||0,c=e.second||0,l=e.millisecond||0;this._milliseconds=+l+1e3*c+6e4*u+1e3*s*60*60,this._days=+o+7*a,this._months=+i+3*n+12*r,this._data={},this._locale=R(),this._bubble()}function $t(t){return t instanceof Yt}function Vt(t,e){G(t,0,0,function(){var t=this.utcOffset(),r="+";return 0>t&&(t=-t,r="-"),r+V(~~(t/60),2)+e+V(~~t%60,2)})}function Gt(t,e){var r=(e||"").match(t)||[],n=r[r.length-1]||[],i=(n+"").match(hi)||["-",0,0],a=+(60*i[1])+_(i[2]);return"+"===i[0]?a:-a}function Wt(t,e){var n,i;return e._isUTC?(n=e.clone(),i=(m(t)||a(t)?t.valueOf():Pt(t).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+i),r.updateOffset(n,!1),n):Pt(t).local()}function Ht(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function zt(t,e){var n,i=this._offset||0;return this.isValid()?null!=t?("string"==typeof t?t=Gt(Mn,t):Math.abs(t)<16&&(t=60*t),!this._isUTC&&e&&(n=Ht(this)),this._offset=t,this._isUTC=!0,null!=n&&this.add(n,"m"),i!==t&&(!e||this._changeInProgress?he(this,ae(t-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,r.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?i:Ht(this):null!=t?this:0/0}function Zt(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}function Xt(t){return this.utcOffset(0,t)}function Kt(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(Ht(this),"m")),this}function Jt(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(Gt(Rn,this._i)),this}function Qt(t){return this.isValid()?(t=t?Pt(t).utcOffset():0,(this.utcOffset()-t)%60===0):!1}function te(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function ee(){if(!p(this._isDSTShifted))return this._isDSTShifted;var t={};if(g(t,this),t=Rt(t),t._a){var e=t._isUTC?c(t._a):Pt(t._a);this._isDSTShifted=this.isValid()&&b(t._a,e.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function re(){return this.isValid()?!this._isUTC:!1}function ne(){return this.isValid()?this._isUTC:!1}function ie(){return this.isValid()?this._isUTC&&0===this._offset:!1}function ae(t,e){var r,n,i,a=t,o=null;return $t(t)?a={ms:t._milliseconds,d:t._days,M:t._months}:"number"==typeof t?(a={},e?a[e]=t:a.milliseconds=t):(o=fi.exec(t))?(r="-"===o[1]?-1:1,a={y:0,d:_(o[$n])*r,h:_(o[Vn])*r,m:_(o[Gn])*r,s:_(o[Wn])*r,ms:_(o[Hn])*r}):(o=di.exec(t))?(r="-"===o[1]?-1:1,a={y:oe(o[2],r),M:oe(o[3],r),w:oe(o[4],r),d:oe(o[5],r),h:oe(o[6],r),m:oe(o[7],r),s:oe(o[8],r)}):null==a?a={}:"object"==typeof a&&("from"in a||"to"in a)&&(i=ue(Pt(a.from),Pt(a.to)),a={},a.ms=i.milliseconds,a.M=i.months),n=new Yt(a),$t(t)&&s(t,"_locale")&&(n._locale=t._locale),n}function oe(t,e){var r=t&&parseFloat(t.replace(",","."));return(isNaN(r)?0:r)*e}function se(t,e){var r={milliseconds:0,months:0};return r.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(r.months,"M").isAfter(e)&&--r.months,r.milliseconds=+e-+t.clone().add(r.months,"M"),r}function ue(t,e){var r;return t.isValid()&&e.isValid()?(e=Wt(e,t),t.isBefore(e)?r=se(t,e):(r=se(e,t),r.milliseconds=-r.milliseconds,r.months=-r.months),r):{milliseconds:0,months:0}}function ce(t){return 0>t?-1*Math.round(-1*t):Math.round(t)}function le(t,e){return function(r,n){var i,a;return null===n||isNaN(+n)||(x(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period)."),a=r,r=n,n=a),r="string"==typeof r?+r:r,i=ae(r,n),he(this,i,t),this}}function he(t,e,n,i){var a=e._milliseconds,o=ce(e._days),s=ce(e._months);t.isValid()&&(i=null==i?!0:i,a&&t._d.setTime(t._d.valueOf()+a*n),o&&Y(t,"Date",U(t,"Date")+o*n),s&&ut(t,U(t,"Month")+s*n),i&&r.updateOffset(t,o||s))}function fe(t,e){var r=t||Pt(),n=Wt(r,this).startOf("day"),i=this.diff(n,"days",!0),a=-6>i?"sameElse":-1>i?"lastWeek":0>i?"lastDay":1>i?"sameDay":2>i?"nextDay":7>i?"nextWeek":"sameElse",o=e&&(k(e[a])?e[a]():e[a]);return this.format(o||this.localeData().calendar(a,this,Pt(r)))}function de(){return new y(this)}function pe(t,e){var r=m(t)?t:Pt(t);return this.isValid()&&r.isValid()?(e=P(p(e)?"millisecond":e),"millisecond"===e?this.valueOf()>r.valueOf():r.valueOf()<this.clone().startOf(e).valueOf()):!1}function ge(t,e){var r=m(t)?t:Pt(t);return this.isValid()&&r.isValid()?(e=P(p(e)?"millisecond":e),"millisecond"===e?this.valueOf()<r.valueOf():this.clone().endOf(e).valueOf()<r.valueOf()):!1}function ye(t,e,r,n){return n=n||"()",("("===n[0]?this.isAfter(t,r):!this.isBefore(t,r))&&(")"===n[1]?this.isBefore(e,r):!this.isAfter(e,r))}function me(t,e){var r,n=m(t)?t:Pt(t);return this.isValid()&&n.isValid()?(e=P(e||"millisecond"),"millisecond"===e?this.valueOf()===n.valueOf():(r=n.valueOf(),this.clone().startOf(e).valueOf()<=r&&r<=this.clone().endOf(e).valueOf())):!1}function ve(t,e){return this.isSame(t,e)||this.isAfter(t,e)}function _e(t,e){return this.isSame(t,e)||this.isBefore(t,e)}function be(t,e,r){var n,i,a,o;return this.isValid()?(n=Wt(t,this),n.isValid()?(i=6e4*(n.utcOffset()-this.utcOffset()),e=P(e),"year"===e||"month"===e||"quarter"===e?(o=we(this,n),"quarter"===e?o/=3:"year"===e&&(o/=12)):(a=this-n,o="second"===e?a/1e3:"minute"===e?a/6e4:"hour"===e?a/36e5:"day"===e?(a-i)/864e5:"week"===e?(a-i)/6048e5:a),r?o:v(o)):0/0):0/0}function we(t,e){var r,n,i=12*(e.year()-t.year())+(e.month()-t.month()),a=t.clone().add(i,"months");return 0>e-a?(r=t.clone().add(i-1,"months"),n=(e-a)/(a-r)):(r=t.clone().add(i+1,"months"),n=(e-a)/(r-a)),-(i+n)||0}function Ae(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function xe(){var t=this.clone().utc();return 0<t.year()&&t.year()<=9999?k(Date.prototype.toISOString)?this.toDate().toISOString():z(t,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):z(t,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")}function ke(t){t||(t=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var e=z(this,t);return this.localeData().postformat(e)}function Ee(t,e){return this.isValid()&&(m(t)&&t.isValid()||Pt(t).isValid())?ae({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function De(t){ return this.from(Pt(),t)}function Ce(t,e){return this.isValid()&&(m(t)&&t.isValid()||Pt(t).isValid())?ae({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function Se(t){return this.to(Pt(),t)}function Te(t){var e;return void 0===t?this._locale._abbr:(e=R(t),null!=e&&(this._locale=e),this)}function Fe(){return this._locale}function Be(t){switch(t=P(t)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===t&&this.weekday(0),"isoWeek"===t&&this.isoWeekday(1),"quarter"===t&&this.month(3*Math.floor(this.month()/3)),this}function Le(t){return t=P(t),void 0===t||"millisecond"===t?this:("date"===t&&(t="day"),this.startOf(t).add(1,"isoWeek"===t?"week":t).subtract(1,"ms"))}function Oe(){return this._d.valueOf()-6e4*(this._offset||0)}function Ie(){return Math.floor(this.valueOf()/1e3)}function Re(){return this._offset?new Date(this.valueOf()):this._d}function Me(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]}function Ne(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}}function Pe(){return this.isValid()?this.toISOString():null}function je(){return f(this)}function qe(){return u({},h(this))}function Ue(){return h(this).overflow}function Ye(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function $e(t,e){G(0,[t,t.length],0,e)}function Ve(t){return ze.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function Ge(t){return ze.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)}function We(){return Et(this.year(),1,4)}function He(){var t=this.localeData()._week;return Et(this.year(),t.dow,t.doy)}function ze(t,e,r,n,i){var a;return null==t?kt(this,n,i).year:(a=Et(t,n,i),e>a&&(e=a),Ze.call(this,t,e,r,n,i))}function Ze(t,e,r,n,i){var a=xt(t,e,r,n,i),o=vt(a.year,0,a.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}function Xe(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)}function Ke(t){return kt(t,this._week.dow,this._week.doy).week}function Je(){return this._week.dow}function Qe(){return this._week.doy}function tr(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")}function er(t){var e=kt(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")}function rr(t,e){return"string"!=typeof t?t:isNaN(t)?(t=e.weekdaysParse(t),"number"==typeof t?t:null):parseInt(t,10)}function nr(t,e){return i(this._weekdays)?this._weekdays[t.day()]:this._weekdays[this._weekdays.isFormat.test(e)?"format":"standalone"][t.day()]}function ir(t){return this._weekdaysShort[t.day()]}function ar(t){return this._weekdaysMin[t.day()]}function or(t,e,r){var n,i,a,o=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;7>n;++n)a=c([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(a,"").toLocaleLowerCase();return r?"dddd"===e?(i=gn.call(this._weekdaysParse,o),-1!==i?i:null):"ddd"===e?(i=gn.call(this._shortWeekdaysParse,o),-1!==i?i:null):(i=gn.call(this._minWeekdaysParse,o),-1!==i?i:null):"dddd"===e?(i=gn.call(this._weekdaysParse,o),-1!==i?i:(i=gn.call(this._shortWeekdaysParse,o),-1!==i?i:(i=gn.call(this._minWeekdaysParse,o),-1!==i?i:null))):"ddd"===e?(i=gn.call(this._shortWeekdaysParse,o),-1!==i?i:(i=gn.call(this._weekdaysParse,o),-1!==i?i:(i=gn.call(this._minWeekdaysParse,o),-1!==i?i:null))):(i=gn.call(this._minWeekdaysParse,o),-1!==i?i:(i=gn.call(this._weekdaysParse,o),-1!==i?i:(i=gn.call(this._shortWeekdaysParse,o),-1!==i?i:null)))}function sr(t,e,r){var n,i,a;if(this._weekdaysParseExact)return or.call(this,t,e,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;7>n;n++){if(i=c([2e3,1]).day(n),r&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(i,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(i,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(i,"").replace(".",".?")+"$","i")),this._weekdaysParse[n]||(a="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[n]=new RegExp(a.replace(".",""),"i")),r&&"dddd"===e&&this._fullWeekdaysParse[n].test(t))return n;if(r&&"ddd"===e&&this._shortWeekdaysParse[n].test(t))return n;if(r&&"dd"===e&&this._minWeekdaysParse[n].test(t))return n;if(!r&&this._weekdaysParse[n].test(t))return n}}function ur(t){if(!this.isValid())return null!=t?this:0/0;var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=rr(t,this.localeData()),this.add(t-e,"d")):e}function cr(t){if(!this.isValid())return null!=t?this:0/0;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")}function lr(t){return this.isValid()?null==t?this.day()||7:this.day(this.day()%7?t:t-7):null!=t?this:0/0}function hr(t){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||pr.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex}function fr(t){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||pr.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex}function dr(t){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||pr.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex}function pr(){function t(t,e){return e.length-t.length}var e,r,n,i,a,o=[],s=[],u=[],l=[];for(e=0;7>e;e++)r=c([2e3,1]).day(e),n=this.weekdaysMin(r,""),i=this.weekdaysShort(r,""),a=this.weekdays(r,""),o.push(n),s.push(i),u.push(a),l.push(n),l.push(i),l.push(a);for(o.sort(t),s.sort(t),u.sort(t),l.sort(t),e=0;7>e;e++)s[e]=Q(s[e]),u[e]=Q(u[e]),l[e]=Q(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("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function gr(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")}function yr(){return this.hours()%12||12}function mr(){return this.hours()||24}function vr(t,e){G(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function _r(t,e){return e._meridiemParse}function br(t){return"p"===(t+"").toLowerCase().charAt(0)}function wr(t,e,r){return t>11?r?"pm":"PM":r?"am":"AM"}function Ar(t,e){e[Hn]=_(1e3*("0."+t))}function xr(){return this._isUTC?"UTC":""}function kr(){return this._isUTC?"Coordinated Universal Time":""}function Er(t){return Pt(1e3*t)}function Dr(){return Pt.apply(null,arguments).parseZone()}function Cr(t,e,r){var n=this._calendar[t];return k(n)?n.call(e,r):n}function Sr(t){var e=this._longDateFormat[t],r=this._longDateFormat[t.toUpperCase()];return e||!r?e:(this._longDateFormat[t]=r.replace(/MMMM|MM|DD|dddd/g,function(t){return t.slice(1)}),this._longDateFormat[t])}function Tr(){return this._invalidDate}function Fr(t){return this._ordinal.replace("%d",t)}function Br(t){return t}function Lr(t,e,r,n){var i=this._relativeTime[r];return k(i)?i(t,e,r,n):i.replace(/%d/i,t)}function Or(t,e){var r=this._relativeTime[t>0?"future":"past"];return k(r)?r(e):r.replace(/%s/i,e)}function Ir(t,e,r,n){var i=R(),a=c().set(n,e);return i[r](a,t)}function Rr(t,e,r){if("number"==typeof t&&(e=t,t=void 0),t=t||"",null!=e)return Ir(t,e,r,"month");var n,i=[];for(n=0;12>n;n++)i[n]=Ir(t,n,r,"month");return i}function Mr(t,e,r,n){"boolean"==typeof t?("number"==typeof e&&(r=e,e=void 0),e=e||""):(e=t,r=e,t=!1,"number"==typeof e&&(r=e,e=void 0),e=e||"");var i=R(),a=t?i._week.dow:0;if(null!=r)return Ir(e,(r+a)%7,n,"day");var o,s=[];for(o=0;7>o;o++)s[o]=Ir(e,(o+a)%7,n,"day");return s}function Nr(t,e){return Rr(t,e,"months")}function Pr(t,e){return Rr(t,e,"monthsShort")}function jr(t,e,r){return Mr(t,e,r,"weekdays")}function qr(t,e,r){return Mr(t,e,r,"weekdaysShort")}function Ur(t,e,r){return Mr(t,e,r,"weekdaysMin")}function Yr(){var t=this._data;return this._milliseconds=qi(this._milliseconds),this._days=qi(this._days),this._months=qi(this._months),t.milliseconds=qi(t.milliseconds),t.seconds=qi(t.seconds),t.minutes=qi(t.minutes),t.hours=qi(t.hours),t.months=qi(t.months),t.years=qi(t.years),this}function $r(t,e,r,n){var i=ae(e,r);return t._milliseconds+=n*i._milliseconds,t._days+=n*i._days,t._months+=n*i._months,t._bubble()}function Vr(t,e){return $r(this,t,e,1)}function Gr(t,e){return $r(this,t,e,-1)}function Wr(t){return 0>t?Math.floor(t):Math.ceil(t)}function Hr(){var t,e,r,n,i,a=this._milliseconds,o=this._days,s=this._months,u=this._data;return a>=0&&o>=0&&s>=0||0>=a&&0>=o&&0>=s||(a+=864e5*Wr(Zr(s)+o),o=0,s=0),u.milliseconds=a%1e3,t=v(a/1e3),u.seconds=t%60,e=v(t/60),u.minutes=e%60,r=v(e/60),u.hours=r%24,o+=v(r/24),i=v(zr(o)),s+=i,o-=Wr(Zr(i)),n=v(s/12),s%=12,u.days=o,u.months=s,u.years=n,this}function zr(t){return 4800*t/146097}function Zr(t){return 146097*t/4800}function Xr(t){var e,r,n=this._milliseconds;if(t=P(t),"month"===t||"year"===t)return e=this._days+n/864e5,r=this._months+zr(e),"month"===t?r:r/12;switch(e=this._days+Math.round(Zr(this._months)),t){case"week":return e/7+n/6048e5;case"day":return e+n/864e5;case"hour":return 24*e+n/36e5;case"minute":return 1440*e+n/6e4;case"second":return 86400*e+n/1e3;case"millisecond":return Math.floor(864e5*e)+n;default:throw new Error("Unknown unit "+t)}}function Kr(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*_(this._months/12)}function Jr(t){return function(){return this.as(t)}}function Qr(t){return t=P(t),this[t+"s"]()}function tn(t){return function(){return this._data[t]}}function en(){return v(this.days()/7)}function rn(t,e,r,n,i){return i.relativeTime(e||1,!!r,t,n)}function nn(t,e,r){var n=ae(t).abs(),i=ra(n.as("s")),a=ra(n.as("m")),o=ra(n.as("h")),s=ra(n.as("d")),u=ra(n.as("M")),c=ra(n.as("y")),l=i<na.s&&["s",i]||1>=a&&["m"]||a<na.m&&["mm",a]||1>=o&&["h"]||o<na.h&&["hh",o]||1>=s&&["d"]||s<na.d&&["dd",s]||1>=u&&["M"]||u<na.M&&["MM",u]||1>=c&&["y"]||["yy",c];return l[2]=e,l[3]=+t>0,l[4]=r,rn.apply(null,l)}function an(t,e){return void 0===na[t]?!1:void 0===e?na[t]:(na[t]=e,!0)}function on(t){var e=this.localeData(),r=nn(this,!t,e);return t&&(r=e.pastFuture(+this,r)),e.postformat(r)}function sn(){var t,e,r,n=ia(this._milliseconds)/1e3,i=ia(this._days),a=ia(this._months);t=v(n/60),e=v(t/60),n%=60,t%=60,r=v(a/12),a%=12;var o=r,s=a,u=i,c=e,l=t,h=n,f=this.asSeconds();return f?(0>f?"-":"")+"P"+(o?o+"Y":"")+(s?s+"M":"")+(u?u+"D":"")+(c||l||h?"T":"")+(c?c+"H":"")+(l?l+"M":"")+(h?h+"S":""):"P0D"}var un,cn;cn=Array.prototype.some?Array.prototype.some:function(t){for(var e=Object(this),r=e.length>>>0,n=0;r>n;n++)if(n in e&&t.call(this,e[n],n,e))return!0;return!1};var ln=r.momentProperties=[],hn=!1,fn={};r.suppressDeprecationWarnings=!1,r.deprecationHandler=null;var dn;dn=Object.keys?Object.keys:function(t){var e,r=[];for(e in t)s(t,e)&&r.push(e);return r};var pn,gn,yn={},mn={},vn=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,_n=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,bn={},wn={},An=/\d/,xn=/\d\d/,kn=/\d{3}/,En=/\d{4}/,Dn=/[+-]?\d{6}/,Cn=/\d\d?/,Sn=/\d\d\d\d?/,Tn=/\d\d\d\d\d\d?/,Fn=/\d{1,3}/,Bn=/\d{1,4}/,Ln=/[+-]?\d{1,6}/,On=/\d+/,In=/[+-]?\d+/,Rn=/Z|[+-]\d\d:?\d\d/gi,Mn=/Z|[+-]\d\d(?::?\d\d)?/gi,Nn=/[+-]?\d+(\.\d{1,3})?/,Pn=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,jn={},qn={},Un=0,Yn=1,$n=2,Vn=3,Gn=4,Wn=5,Hn=6,zn=7,Zn=8;gn=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1},G("M",["MM",2],"Mo",function(){return this.month()+1}),G("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)}),G("MMMM",0,0,function(t){return this.localeData().months(this,t)}),N("month","M"),X("M",Cn),X("MM",Cn,xn),X("MMM",function(t,e){return e.monthsShortRegex(t)}),X("MMMM",function(t,e){return e.monthsRegex(t)}),tt(["M","MM"],function(t,e){e[Yn]=_(t)-1}),tt(["MMM","MMMM"],function(t,e,r,n){var i=r._locale.monthsParse(t,n,r._strict);null!=i?e[Yn]=i:h(r).invalidMonth=t});var Xn=/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/,Kn="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Jn="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Qn=Pn,ti=Pn,ei=/^\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)?)?/,ri=/^\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)?)?/,ni=/Z|[+-]\d\d(?::?\d\d)?/,ii=[["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}/]],ai=[["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/]],oi=/^\/?Date\((\-?\d+)/i;r.createFromInputFallback=A("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))}),G("Y",0,0,function(){var t=this.year();return 9999>=t?""+t:"+"+t}),G(0,["YY",2],0,function(){return this.year()%100}),G(0,["YYYY",4],0,"year"),G(0,["YYYYY",5],0,"year"),G(0,["YYYYYY",6,!0],0,"year"),N("year","y"),X("Y",In),X("YY",Cn,xn),X("YYYY",Bn,En),X("YYYYY",Ln,Dn),X("YYYYYY",Ln,Dn),tt(["YYYYY","YYYYYY"],Un),tt("YYYY",function(t,e){e[Un]=2===t.length?r.parseTwoDigitYear(t):_(t)}),tt("YY",function(t,e){e[Un]=r.parseTwoDigitYear(t)}),tt("Y",function(t,e){e[Un]=parseInt(t,10)}),r.parseTwoDigitYear=function(t){return _(t)+(_(t)>68?1900:2e3)};var si=q("FullYear",!0);r.ISO_8601=function(){};var ui=A("moment().min is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(){var t=Pt.apply(null,arguments);return this.isValid()&&t.isValid()?this>t?this:t:d()}),ci=A("moment().max is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(){var t=Pt.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:d()}),li=function(){return Date.now?Date.now():+new Date};Vt("Z",":"),Vt("ZZ",""),X("Z",Mn),X("ZZ",Mn),tt(["Z","ZZ"],function(t,e,r){r._useUTC=!0,r._tzm=Gt(Mn,t)});var hi=/([\+\-]|\d\d)/gi;r.updateOffset=function(){};var fi=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?\d*)?$/,di=/^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;ae.fn=Yt.prototype;var pi=le(1,"add"),gi=le(-1,"subtract");r.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",r.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var yi=A("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return void 0===t?this.localeData():this.locale(t)});G(0,["gg",2],0,function(){return this.weekYear()%100}),G(0,["GG",2],0,function(){return this.isoWeekYear()%100}),$e("gggg","weekYear"),$e("ggggg","weekYear"),$e("GGGG","isoWeekYear"),$e("GGGGG","isoWeekYear"),N("weekYear","gg"),N("isoWeekYear","GG"),X("G",In),X("g",In),X("GG",Cn,xn),X("gg",Cn,xn),X("GGGG",Bn,En),X("gggg",Bn,En),X("GGGGG",Ln,Dn),X("ggggg",Ln,Dn),et(["gggg","ggggg","GGGG","GGGGG"],function(t,e,r,n){e[n.substr(0,2)]=_(t)}),et(["gg","GG"],function(t,e,n,i){e[i]=r.parseTwoDigitYear(t)}),G("Q",0,"Qo","quarter"),N("quarter","Q"),X("Q",An),tt("Q",function(t,e){e[Yn]=3*(_(t)-1)}),G("w",["ww",2],"wo","week"),G("W",["WW",2],"Wo","isoWeek"),N("week","w"),N("isoWeek","W"),X("w",Cn),X("ww",Cn,xn),X("W",Cn),X("WW",Cn,xn),et(["w","ww","W","WW"],function(t,e,r,n){e[n.substr(0,1)]=_(t)});var mi={dow:0,doy:6};G("D",["DD",2],"Do","date"),N("date","D"),X("D",Cn),X("DD",Cn,xn),X("Do",function(t,e){return t?e._ordinalParse:e._ordinalParseLenient}),tt(["D","DD"],$n),tt("Do",function(t,e){e[$n]=_(t.match(Cn)[0],10)});var vi=q("Date",!0);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"),N("day","d"),N("weekday","e"),N("isoWeekday","E"),X("d",Cn),X("e",Cn),X("E",Cn),X("dd",function(t,e){return e.weekdaysMinRegex(t)}),X("ddd",function(t,e){return e.weekdaysShortRegex(t)}),X("dddd",function(t,e){return e.weekdaysRegex(t)}),et(["dd","ddd","dddd"],function(t,e,r,n){var i=r._locale.weekdaysParse(t,n,r._strict);null!=i?e.d=i:h(r).invalidWeekday=t}),et(["d","e","E"],function(t,e,r,n){e[n]=_(t)});var _i="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),bi="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),wi="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ai=Pn,xi=Pn,ki=Pn;G("DDD",["DDDD",3],"DDDo","dayOfYear"),N("dayOfYear","DDD"),X("DDD",Fn),X("DDDD",kn),tt(["DDD","DDDD"],function(t,e,r){r._dayOfYear=_(t)}),G("H",["HH",2],0,"hour"),G("h",["hh",2],0,yr),G("k",["kk",2],0,mr),G("hmm",0,0,function(){return""+yr.apply(this)+V(this.minutes(),2)}),G("hmmss",0,0,function(){return""+yr.apply(this)+V(this.minutes(),2)+V(this.seconds(),2)}),G("Hmm",0,0,function(){return""+this.hours()+V(this.minutes(),2)}),G("Hmmss",0,0,function(){return""+this.hours()+V(this.minutes(),2)+V(this.seconds(),2)}),vr("a",!0),vr("A",!1),N("hour","h"),X("a",_r),X("A",_r),X("H",Cn),X("h",Cn),X("HH",Cn,xn),X("hh",Cn,xn),X("hmm",Sn),X("hmmss",Tn),X("Hmm",Sn),X("Hmmss",Tn),tt(["H","HH"],Vn),tt(["a","A"],function(t,e,r){r._isPm=r._locale.isPM(t),r._meridiem=t}),tt(["h","hh"],function(t,e,r){e[Vn]=_(t),h(r).bigHour=!0}),tt("hmm",function(t,e,r){var n=t.length-2;e[Vn]=_(t.substr(0,n)),e[Gn]=_(t.substr(n)),h(r).bigHour=!0}),tt("hmmss",function(t,e,r){var n=t.length-4,i=t.length-2;e[Vn]=_(t.substr(0,n)),e[Gn]=_(t.substr(n,2)),e[Wn]=_(t.substr(i)),h(r).bigHour=!0}),tt("Hmm",function(t,e){var r=t.length-2;e[Vn]=_(t.substr(0,r)),e[Gn]=_(t.substr(r))}),tt("Hmmss",function(t,e){var r=t.length-4,n=t.length-2;e[Vn]=_(t.substr(0,r)),e[Gn]=_(t.substr(r,2)),e[Wn]=_(t.substr(n))});var Ei=/[ap]\.?m?\.?/i,Di=q("Hours",!0);G("m",["mm",2],0,"minute"),N("minute","m"),X("m",Cn),X("mm",Cn,xn),tt(["m","mm"],Gn);var Ci=q("Minutes",!1);G("s",["ss",2],0,"second"),N("second","s"),X("s",Cn),X("ss",Cn,xn),tt(["s","ss"],Wn);var Si=q("Seconds",!1);G("S",0,0,function(){return~~(this.millisecond()/100)}),G(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),G(0,["SSS",3],0,"millisecond"),G(0,["SSSS",4],0,function(){return 10*this.millisecond()}),G(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),G(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),G(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),G(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),G(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),N("millisecond","ms"),X("S",Fn,An),X("SS",Fn,xn),X("SSS",Fn,kn);var Ti;for(Ti="SSSS";Ti.length<=9;Ti+="S")X(Ti,On);for(Ti="S";Ti.length<=9;Ti+="S")tt(Ti,Ar);var Fi=q("Milliseconds",!1);G("z",0,0,"zoneAbbr"),G("zz",0,0,"zoneName");var Bi=y.prototype;Bi.add=pi,Bi.calendar=fe,Bi.clone=de,Bi.diff=be,Bi.endOf=Le,Bi.format=ke,Bi.from=Ee,Bi.fromNow=De,Bi.to=Ce,Bi.toNow=Se,Bi.get=$,Bi.invalidAt=Ue,Bi.isAfter=pe,Bi.isBefore=ge,Bi.isBetween=ye,Bi.isSame=me,Bi.isSameOrAfter=ve,Bi.isSameOrBefore=_e,Bi.isValid=je,Bi.lang=yi,Bi.locale=Te,Bi.localeData=Fe,Bi.max=ci,Bi.min=ui,Bi.parsingFlags=qe,Bi.set=$,Bi.startOf=Be,Bi.subtract=gi,Bi.toArray=Me,Bi.toObject=Ne,Bi.toDate=Re,Bi.toISOString=xe,Bi.toJSON=Pe,Bi.toString=Ae,Bi.unix=Ie,Bi.valueOf=Oe,Bi.creationData=Ye,Bi.year=si,Bi.isLeapYear=wt,Bi.weekYear=Ve,Bi.isoWeekYear=Ge,Bi.quarter=Bi.quarters=Xe,Bi.month=ct,Bi.daysInMonth=lt,Bi.week=Bi.weeks=tr,Bi.isoWeek=Bi.isoWeeks=er,Bi.weeksInYear=He,Bi.isoWeeksInYear=We,Bi.date=vi,Bi.day=Bi.days=ur,Bi.weekday=cr,Bi.isoWeekday=lr,Bi.dayOfYear=gr,Bi.hour=Bi.hours=Di,Bi.minute=Bi.minutes=Ci,Bi.second=Bi.seconds=Si,Bi.millisecond=Bi.milliseconds=Fi,Bi.utcOffset=zt,Bi.utc=Xt,Bi.local=Kt,Bi.parseZone=Jt,Bi.hasAlignedHourOffset=Qt,Bi.isDST=te,Bi.isDSTShifted=ee,Bi.isLocal=re,Bi.isUtcOffset=ne,Bi.isUtc=ie,Bi.isUTC=ie,Bi.zoneAbbr=xr,Bi.zoneName=kr,Bi.dates=A("dates accessor is deprecated. Use date instead.",vi),Bi.months=A("months accessor is deprecated. Use month instead",ct),Bi.years=A("years accessor is deprecated. Use year instead",si),Bi.zone=A("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",Zt);var Li=Bi,Oi={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},Ii={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"},Ri="Invalid date",Mi="%d",Ni=/\d{1,2}/,Pi={future:"in %s",past:"%s ago",s:"a few 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"},ji=S.prototype;ji._calendar=Oi,ji.calendar=Cr,ji._longDateFormat=Ii,ji.longDateFormat=Sr,ji._invalidDate=Ri,ji.invalidDate=Tr,ji._ordinal=Mi,ji.ordinal=Fr,ji._ordinalParse=Ni,ji.preparse=Br,ji.postformat=Br,ji._relativeTime=Pi,ji.relativeTime=Lr,ji.pastFuture=Or,ji.set=D,ji.months=it,ji._months=Kn,ji.monthsShort=at,ji._monthsShort=Jn,ji.monthsParse=st,ji._monthsRegex=ti,ji.monthsRegex=ft,ji._monthsShortRegex=Qn,ji.monthsShortRegex=ht,ji.week=Ke,ji._week=mi,ji.firstDayOfYear=Qe,ji.firstDayOfWeek=Je,ji.weekdays=nr,ji._weekdays=_i,ji.weekdaysMin=ar,ji._weekdaysMin=wi,ji.weekdaysShort=ir,ji._weekdaysShort=bi,ji.weekdaysParse=sr,ji._weekdaysRegex=Ai,ji.weekdaysRegex=hr,ji._weekdaysShortRegex=xi,ji.weekdaysShortRegex=fr,ji._weekdaysMinRegex=ki,ji.weekdaysMinRegex=dr,ji.isPM=br,ji._meridiemParse=Ei,ji.meridiem=wr,L("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,r=1===_(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th";return t+r}}),r.lang=A("moment.lang is deprecated. Use moment.locale instead.",L),r.langData=A("moment.langData is deprecated. Use moment.localeData instead.",R);var qi=Math.abs,Ui=Jr("ms"),Yi=Jr("s"),$i=Jr("m"),Vi=Jr("h"),Gi=Jr("d"),Wi=Jr("w"),Hi=Jr("M"),zi=Jr("y"),Zi=tn("milliseconds"),Xi=tn("seconds"),Ki=tn("minutes"),Ji=tn("hours"),Qi=tn("days"),ta=tn("months"),ea=tn("years"),ra=Math.round,na={s:45,m:45,h:22,d:26,M:11},ia=Math.abs,aa=Yt.prototype;aa.abs=Yr,aa.add=Vr,aa.subtract=Gr,aa.as=Xr,aa.asMilliseconds=Ui,aa.asSeconds=Yi,aa.asMinutes=$i,aa.asHours=Vi,aa.asDays=Gi,aa.asWeeks=Wi,aa.asMonths=Hi,aa.asYears=zi,aa.valueOf=Kr,aa._bubble=Hr,aa.get=Qr,aa.milliseconds=Zi,aa.seconds=Xi,aa.minutes=Ki,aa.hours=Ji,aa.days=Qi,aa.weeks=en,aa.months=ta,aa.years=ea,aa.humanize=on,aa.toISOString=sn,aa.toString=sn,aa.toJSON=sn,aa.locale=Te,aa.localeData=Fe,aa.toIsoString=A("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",sn),aa.lang=yi,G("X",0,0,"unix"),G("x",0,0,"valueOf"),X("x",In),X("X",Nn),tt("X",function(t,e,r){r._d=new Date(1e3*parseFloat(t,10))}),tt("x",function(t,e,r){r._d=new Date(_(t))}),r.version="2.13.0",n(Pt),r.fn=Li,r.min=qt,r.max=Ut,r.now=li,r.utc=c,r.unix=Er,r.months=Nr,r.isDate=a,r.locale=L,r.invalid=d,r.duration=ae,r.isMoment=m,r.weekdays=jr,r.parseZone=Dr,r.localeData=R,r.isDuration=$t,r.monthsShort=Pr,r.weekdaysMin=Ur,r.defineLocale=O,r.updateLocale=I,r.locales=M,r.weekdaysShort=qr,r.normalizeUnits=P,r.relativeTimeThreshold=an,r.prototype=Li;var oa=r;return oa})},{}],105:[function(t,e,r){(function(t){function e(t,e){for(var r=0,n=t.length-1;n>=0;n--){var i=t[n];"."===i?t.splice(n,1):".."===i?(t.splice(n,1),r++):r&&(t.splice(n,1),r--)}if(e)for(;r--;r)t.unshift("..");return t}function n(t,e){if(t.filter)return t.filter(e);for(var r=[],n=0;n<t.length;n++)e(t[n],n,t)&&r.push(t[n]);return r}var i=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,a=function(t){return i.exec(t).slice(1)};r.resolve=function(){for(var r="",i=!1,a=arguments.length-1;a>=-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&&(r=o+"/"+r,i="/"===o.charAt(0))}return r=e(n(r.split("/"),function(t){return!!t}),!i).join("/"),(i?"/":"")+r||"."},r.normalize=function(t){var i=r.isAbsolute(t),a="/"===o(t,-1);return t=e(n(t.split("/"),function(t){return!!t}),!i).join("/"),t||i||(t="."),t&&a&&(t+="/"),(i?"/":"")+t},r.isAbsolute=function(t){return"/"===t.charAt(0)},r.join=function(){var t=Array.prototype.slice.call(arguments,0);return r.normalize(n(t,function(t){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t}).join("/"))},r.relative=function(t,e){function n(t){for(var e=0;e<t.length&&""===t[e];e++);for(var r=t.length-1;r>=0&&""===t[r];r--);return e>r?[]:t.slice(e,r-e+1)}t=r.resolve(t).substr(1),e=r.resolve(e).substr(1);for(var i=n(t.split("/")),a=n(e.split("/")),o=Math.min(i.length,a.length),s=o,u=0;o>u;u++)if(i[u]!==a[u]){s=u;break}for(var c=[],u=s;u<i.length;u++)c.push("..");return c=c.concat(a.slice(s)),c.join("/")},r.sep="/",r.delimiter=":",r.dirname=function(t){var e=a(t),r=e[0],n=e[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},r.basename=function(t,e){var r=a(t)[2];return e&&r.substr(-1*e.length)===e&&(r=r.substr(0,r.length-e.length)),r},r.extname=function(t){return a(t)[3]};var o="b"==="ab".substr(-1)?function(t,e,r){return t.substr(e,r)}:function(t,e,r){return 0>e&&(e=t.length+e),t.substr(e,r)}}).call(this,t("_process"))},{_process:106}],106:[function(t,e){function r(){}var n=e.exports={};n.nextTick=function(){var t="undefined"!=typeof window&&window.setImmediate,e="undefined"!=typeof window&&window.MutationObserver,r="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(t)return function(t){return window.setImmediate(t)};var n=[];if(e){var i=document.createElement("div"),a=new MutationObserver(function(){var t=n.slice();n.length=0,t.forEach(function(t){t()})});return a.observe(i,{attributes:!0}),function(t){n.length||i.setAttribute("yes","no"),n.push(t)}}return r?(window.addEventListener("message",function(t){var e=t.source;if((e===window||null===e)&&"process-tick"===t.data&&(t.stopPropagation(),n.length>0)){var r=n.shift();r()}},!0),function(t){n.push(t),window.postMessage("process-tick","*")}):function(t){setTimeout(t,0)}}(),n.title="browser",n.browser=!0,n.env={},n.argv=[],n.on=r,n.addListener=r,n.once=r,n.off=r,n.removeListener=r,n.removeAllListeners=r,n.emit=r,n.binding=function(){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(){throw new Error("process.chdir is not supported")}},{}],107:[function(t,e){e.exports={name:"mermaid",version:"7.0.0",description:"Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams and gantt charts.",main:"src/mermaid.js",keywords:["diagram","markdown","flowchart","sequence diagram","gantt"],bin:{mermaid:"./bin/mermaid.js"},scripts:{live:"live-server ./test/examples",lint:"node node_modules/eslint/bin/eslint.js src",jison:"gulp jison_legacy",karma:"node node_modules/karma/bin/karma start karma.conf.js --single-run",watch:"source ./scripts/watch.sh",doc:"rm -r build;rm -r dist/www;gulp vartree;cp dist/www/all.html ../mermaid-pages/index.html;cp dist/mermaid.js ../mermaid-pages/javascripts/lib;cp dist/mermaid.forest.css ../mermaid-pages/stylesheets",tape:"node node_modules/tape/bin/tape test/cli_test-*.js",jasmine:"npm run jison &&node node_modules/jasmine-es6/bin/jasmine.js",pretest:"npm run jison",test:"npm run dist && npm run karma && npm run tape","dist-slim-mermaid":"node node_modules/browserify/bin/cmd.js src/mermaid.js -t babelify -s mermaid -o dist/mermaid.slim.js -x d3 && cat dist/mermaid.slim.js | node node_modules/uglifyjs/bin/uglifyjs -mc > dist/mermaid.slim.min.js","dist-slim-mermaidAPI":"node node_modules/browserify/bin/cmd.js src/mermaidAPI.js -t babelify -s mermaidAPI -o dist/mermaidAPI.slim.js -x d3 && cat dist/mermaidAPI.slim.js | node node_modules/uglifyjs/bin/uglifyjs -mc > dist/mermaidAPI.slim.min.js","dist-mermaid":"node node_modules/browserify/bin/cmd.js src/mermaid.js -t babelify -s mermaid -o dist/mermaid.js && cat dist/mermaid.js | node node_modules/uglifyjs/bin/uglifyjs -mc > dist/mermaid.min.js","dist-mermaid-nomin":"node node_modules/browserify/bin/cmd.js src/mermaid.js -t babelify -s mermaid -o dist/mermaid.js","dist-mermaidAPI":"node node_modules/browserify/bin/cmd.js src/mermaidAPI.js -t babelify -s mermaidAPI -o dist/mermaidAPI.js && cat dist/mermaidAPI.js | node node_modules/uglifyjs/bin/uglifyjs -mc > dist/mermaidAPI.min.js",dist:"npm run dist-slim-mermaid && npm run dist-slim-mermaidAPI && npm run dist-mermaid && npm run dist-mermaidAPI"},repository:{type:"git",url:"https://github.com/knsv/mermaid"},author:"Knut Sveidqvist",license:"MIT",dependencies:{chalk:"^0.5.1",d3:"3.5.6",dagre:"^0.7.4","dagre-d3":"0.4.10",he:"^0.5.0",lodash:"^4.6.1",minimist:"^1.1.0",mkdirp:"^0.5.0",moment:"^2.9.0",semver:"^4.1.1",which:"^1.0.8"},devDependencies:{async:"^0.9.0","babel-eslint":"^4.1.3",babelify:"^6.4.0",browserify:"~6.2.0",clone:"^0.2.0","codeclimate-test-reporter":"0.0.4",dateformat:"^1.0.11",dox:"^0.8.0",eslint:"^1.6.0","eslint-watch":"^2.1.2","event-stream":"^3.2.0",foundation:"^4.2.1-1","front-matter":"^0.2.0",gulp:"~3.9.0","gulp-bower":"0.0.10","gulp-browserify":"^0.5.0","gulp-bump":"^0.1.11","gulp-concat":"~2.4.1","gulp-data":"^1.1.1","gulp-dox":"^0.1.6","gulp-ext-replace":"^0.2.0","gulp-filelog":"^0.4.1","gulp-front-matter":"^1.2.3","gulp-hogan":"^1.1.0","gulp-if":"^1.2.5","gulp-insert":"^0.4.0","gulp-istanbul":"^0.4.0","gulp-jasmine":"~2.1.0","gulp-jasmine-browser":"^0.2.3","gulp-jison":"~1.2.0","gulp-jshint":"^1.9.0","gulp-less":"^3.0.1","gulp-livereload":"^3.8.0","gulp-marked":"^1.0.0","gulp-mdvars":"^2.0.0","gulp-qunit":"~1.2.1","gulp-rename":"~1.2.0","gulp-shell":"^0.2.10","gulp-tag-version":"^1.2.1","gulp-uglify":"~1.0.1","gulp-util":"^3.0.7","gulp-vartree":"^2.0.1","hogan.js":"^3.0.2",jasmine:"2.3.2","jasmine-es6":"0.0.18",jison:"zaach/jison",jsdom:"^7.0.2","jshint-stylish":"^2.0.1",karma:"^0.13.15","karma-babel-preprocessor":"^6.0.1","karma-browserify":"^4.4.0","karma-jasmine":"^0.3.6","karma-phantomjs-launcher":"^0.2.1","live-server":"^0.9.0","map-stream":"0.0.6",marked:"^0.3.2","mock-browser":"^0.91.34",path:"^0.4.9",phantomjs:"^2.1.3",proxyquire:"^1.7.3","proxyquire-universal":"^1.0.8",proxyquireify:"^3.0.0","require-dir":"^0.3.0",rewire:"^2.1.3",rimraf:"^2.2.8",tape:"^3.0.3", testdom:"^2.0.0",uglifyjs:"^2.4.10","vinyl-source-stream":"^1.1.0",watchify:"^3.6.1"}}},{}],108:[function(t,e){"use strict";var r;if("undefined"!=typeof t)try{r=t("d3")}catch(n){}r||(r=window.d3),e.exports=r,function(){var t=!1;if(t="tspans",r.selection.prototype.textwrap)return!1;if("undefined"==typeof t)var t=!1;r.selection.prototype.textwrap=r.selection.enter.prototype.textwrap=function(e,n){var i,n=parseInt(n)||0,a=this,o=function(t){var e=t[0][0],n=e.tagName.toString();if("rect"!==n)return!1;var i={};return i.x=r.select(e).attr("x")||0,i.y=r.select(e).attr("y")||0,i.width=r.select(e).attr("width")||0,i.height=r.select(e).attr("height")||0,i.attr=t.attr,i},s=function(t){if(t.attr||(t.attr=function(t){return this[t]?this[t]:void 0}),"object"==typeof t&&"undefined"!=typeof t.x&&"undefined"!=typeof t.y&&"undefined"!=typeof t.width&&"undefined"!=typeof t.height)return t;if("function"==typeof Array.isArray&&Array.isArray(t)||"[object Array]"===Object.prototype.toString.call(t)){var e=o(t);return e}return!1},u=function(t,e){var r=t;return 0!==e&&(r.x=parseInt(r.x)+e,r.y=parseInt(r.y)+e,r.width-=2*e,r.height-=2*e),r},c=s(e);if(n&&(c=u(c,n)),0!=a.length&&r&&e&&c){e=c;var l,h=function(t){var n=r.select(t[0].parentNode),a=n.select("text"),o=a.style("line-height"),s=a.text();a.remove();var u=n.append("foreignObject");u.attr("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility").attr("x",e.x).attr("y",e.y).attr("width",e.width).attr("height",e.height);var c=u.append("xhtml:div").attr("class","wrapped");c.style("height",e.height).style("width",e.width).html(s),o&&c.style("line-height",o),i=n.select("foreignObject")},f=function(t){var a,o=t[0],s=o.parentNode,u=r.select(o),c=o.getBBox().height,l=o.getBBox().width,h=c,f=u.style("line-height");if(a=f&&parseInt(f)?parseInt(f.replace("px","")):h,l>e.width){var d=u.text();if(u.text(""),d){var p,g;if(-1!==d.indexOf(" ")){var p=" ";g=d.split(" ")}else{p="";var y=d.length,m=Math.ceil(l/e.width),v=Math.floor(y/m);v*m>=y||m++;for(var _,b,g=[],w=0;m>w;w++)b=w*v,_=d.substr(b,v),g.push(_)}for(var A=[],x=0,k={},w=0;w<g.length;w++){var E,D=g[w],C=u.text(),S=o.getComputedTextLength();E=C?C+p+D:D,u.text(E);var T=o.getComputedTextLength();if(T>e.width&&C&&""!==C&&(x+=S,k={string:C,width:S,offset:x},A.push(k),u.text(""),u.text(D),w==g.length-1&&(E=D,u.text(E),T=o.getComputedTextLength())),w==g.length-1){u.text("");var F=E;F&&""!==F&&(T-x>0&&(T-=x),k={string:F,width:T,offset:x},A.push(k))}}var B;u.text("");for(var w=0;w<A.length;w++){var _=A[w].string;if(w>0){A[w-1]}w*a<e.height-1.5*a&&(B=u.append("tspan").text(_),B.attr("dy",function(){return w>0?a:void 0}),B.attr("x",function(){var t=e.x;return n&&(t+=n),t}))}}}u.attr("y",function(){var t=e.y;return a&&(t+=a),n&&(t+=n),t}),u.attr("x",function(){var t=e.x;return n&&(t+=n),t}),i=r.select(s).selectAll("text")};t&&("foreignobjects"==t?l=h:"tspans"==t&&(l=f)),t||(l="undefined"!=typeof SVGForeignObjectElement?h:f);for(var d=0;d<a.length;d++){var p=a[d];l(p)}return i}return a?a:!1}}()},{d3:"d3"}],109:[function(t,e,r){"use strict";var n,i=t("../../logger"),a=new i.Log,o=[];n={};r.addClass=function(t){"undefined"==typeof n[t]&&(n[t]={id:t,methods:[],members:[]})},r.clear=function(){o=[],n={}},e.exports.getClass=function(t){return n[t]},e.exports.getClasses=function(){return n},e.exports.getRelations=function(){return o},r.addRelation=function(t){a.warn("Adding relation: "+JSON.stringify(t)),r.addClass(t.id1),r.addClass(t.id2),o.push(t)},r.addMembers=function(t,e){var r=n[t];"string"==typeof e&&(")"===e.substr(-1)?r.methods.push(e):r.members.push(e))},r.cleanupLabel=function(t){return":"===t.substring(0,1)?t.substr(2).trim():t.trim()},r.lineType={LINE:0,DOTTED_LINE:1},r.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}},{"../../logger":130}],110:[function(t,e){"use strict";var r=t("./parser/classDiagram").parser,n=t("./classDb");r.yy=n;var i,a=t("../../d3"),o=t("../../logger"),s=t("dagre"),u=new o.Log;i={};var c=0,l={dividerMargin:10,padding:5,textHeight:14},h=function(t){var e,r=Object.keys(i);for(e=0;e<r.length;e++)if(i[r[e]].label===t)return r[e];return void 0},f=function(t){t.append("defs").append("marker").attr("id","extensionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id","extensionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),t.append("defs").append("marker").attr("id","compositionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id","compositionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id","aggregationStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id","aggregationEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id","dependencyStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},d=0,p=function(t,e,r){var i=function(t){switch(t){case n.relationType.AGGREGATION:return"aggregation";case n.relationType.EXTENSION:return"extension";case n.relationType.COMPOSITION:return"composition";case n.relationType.DEPENDENCY:return"dependency"}},o=e.points,s=a.svg.line().x(function(t){return t.x}).y(function(t){return t.y}).interpolate("basis"),u=t.append("path").attr("d",s(o)).attr("id","edge"+d).attr("class","relation"),c="";l.arrowMarkerAbsolute&&(c=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,c=c.replace(/\(/g,"\\("),c=c.replace(/\)/g,"\\)")),"none"!==r.relation.type1&&u.attr("marker-start","url("+c+"#"+i(r.relation.type1)+"Start)"),"none"!==r.relation.type2&&u.attr("marker-end","url("+c+"#"+i(r.relation.type2)+"End)");var h,f,p=e.points.length;if(p%2!==0){var g=e.points[Math.floor(p/2)],y=e.points[Math.ceil(p/2)];h=(g.x+y.x)/2,f=(g.y+y.y)/2}else{var m=e.points[Math.floor(p/2)];h=m.x,f=m.y}if("undefined"!=typeof r.title){var v=t.append("g").attr("class","classLabel"),_=v.append("text").attr("class","label").attr("x",h).attr("y",f).attr("fill","red").attr("text-anchor","middle").text(r.title);window.label=_;var b=_.node().getBBox();v.insert("rect",":first-child").attr("class","box").attr("x",b.x-l.padding/2).attr("y",b.y-l.padding/2).attr("width",b.width+2*l.padding/2).attr("height",b.height+2*l.padding/2)}d++},g=function(t,e){u.info("Rendering class "+e);var r=function(t,e,r){var n=t.append("tspan").attr("x",l.padding).text(e);r||n.attr("dy",l.textHeight)},n="classId"+c,a={id:n,label:e.id,width:0,height:0},o=t.append("g").attr("id",n).attr("class","classGroup"),s=o.append("text").attr("x",l.padding).attr("y",l.textHeight+l.padding).text(e.id),h=s.node().getBBox().height,f=o.append("line").attr("x1",0).attr("y1",l.padding+h+l.dividerMargin/2).attr("y2",l.padding+h+l.dividerMargin/2),d=o.append("text").attr("x",l.padding).attr("y",h+l.dividerMargin+l.textHeight).attr("fill","white").attr("class","classText"),p=!0;e.members.forEach(function(t){r(d,t,p),p=!1});var g=d.node().getBBox(),y=o.append("line").attr("x1",0).attr("y1",l.padding+h+3*l.dividerMargin/2+g.height).attr("y2",l.padding+h+3*l.dividerMargin/2+g.height),m=o.append("text").attr("x",l.padding).attr("y",h+2*l.dividerMargin+g.height+l.textHeight).attr("fill","white").attr("class","classText");p=!0,e.methods.forEach(function(t){r(m,t,p),p=!1});var v=o.node().getBBox();return o.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",v.width+2*l.padding).attr("height",v.height+l.padding+.5*l.dividerMargin),f.attr("x2",v.width+2*l.padding),y.attr("x2",v.width+2*l.padding),a.width=v.width+2*l.padding,a.height=v.height+l.padding+.5*l.dividerMargin,i[n]=a,c++,a};e.exports.setConf=function(t){var e=Object.keys(t);e.forEach(function(e){l[e]=t[e]})},e.exports.draw=function(t,e){r.yy.clear(),r.parse(t),u.info("Rendering diagram "+t);var i=a.select("#"+e);f(i);var o=new s.graphlib.Graph({multigraph:!0});o.setGraph({isMultiGraph:!0}),o.setDefaultEdgeLabel(function(){return{}});var c,l=n.getClasses(),d=Object.keys(l);for(c=0;c<d.length;c++){var y=l[d[c]],m=g(i,y);o.setNode(m.id,m),u.info("Org height: "+m.height)}var v=n.getRelations(),c=0;v.forEach(function(t){c+=1,u.info("tjoho"+h(t.id1)+h(t.id2)+JSON.stringify(t)),o.setEdge(h(t.id1),h(t.id2),{relation:t})}),s.layout(o),o.nodes().forEach(function(t){"undefined"!=typeof t&&(u.debug("Node "+t+": "+JSON.stringify(o.node(t))),a.select("#"+t).attr("transform","translate("+(o.node(t).x-o.node(t).width/2)+","+(o.node(t).y-o.node(t).height/2)+" )"))}),o.edges().forEach(function(t){u.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(o.edge(t))),p(i,o.edge(t),o.edge(t).relation)}),i.attr("height","100%"),i.attr("width","100%")}},{"../../d3":108,"../../logger":130,"./classDb":109,"./parser/classDiagram":111,dagre:51}],111:[function(t,e,r){(function(n){"use strict";var i=function(){function t(){this.yy={}}var e=function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},r=[1,11],n=[1,12],i=[1,13],a=[1,15],o=[1,16],s=[1,17],u=[6,8],c=[1,26],l=[1,27],h=[1,28],f=[1,29],d=[1,30],p=[1,31],g=[6,8,13,17,23,26,27,28,29,30,31],y=[6,8,13,17,23,26,27,28,29,30,31,45,46,47],m=[23,45,46,47],v=[23,30,31,45,46,47],_=[23,26,27,28,29,45,46,47],b=[6,8,13],w=[1,46],A={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,relationStatement:12,LABEL:13,classStatement:14,methodStatement:15,CLASS:16,STRUCT_START:17,members:18,STRUCT_STOP:19,MEMBER:20,SEPARATOR:21,relation:22,STR:23,relationType:24,lineType:25,AGGREGATION:26,EXTENSION:27,COMPOSITION:28,DEPENDENCY:29,LINE:30,DOTTED_LINE:31,commentToken:32,textToken:33,graphCodeTokens:34,textNoTagsToken:35,TAGSTART:36,TAGEND:37,"==":38,"--":39,PCT:40,DEFAULT:41,SPACE:42,MINUS:43,keywords:44,UNICODE_TEXT:45,NUM:46,ALPHA:47,$accept:0,$end:1},terminals_:{2:"error",5:"CLASS_DIAGRAM",6:"NEWLINE",8:"EOF",13:"LABEL",16:"CLASS",17:"STRUCT_START",19:"STRUCT_STOP",20:"MEMBER",21:"SEPARATOR",23:"STR",26:"AGGREGATION",27:"EXTENSION",28:"COMPOSITION",29:"DEPENDENCY",30:"LINE",31:"DOTTED_LINE",34:"graphCodeTokens",36:"TAGSTART",37:"TAGEND",38:"==",39:"--",40:"PCT",41:"DEFAULT",42:"SPACE",43:"MINUS",44:"keywords",45:"UNICODE_TEXT",46:"NUM",47:"ALPHA"},productions_:[0,[3,1],[4,4],[7,1],[7,3],[10,2],[10,1],[9,1],[9,2],[9,1],[9,1],[14,2],[14,5],[18,1],[18,2],[15,1],[15,2],[15,1],[15,1],[12,3],[12,4],[12,4],[12,5],[22,3],[22,2],[22,2],[22,1],[24,1],[24,1],[24,1],[24,1],[25,1],[25,1],[32,1],[32,1],[33,1],[33,1],[33,1],[33,1],[33,1],[33,1],[33,1],[35,1],[35,1],[35,1],[35,1],[11,1],[11,1],[11,1]],performAction:function(t,e,r,n,i,a){var o=a.length-1;switch(i){case 5:this.$=a[o-1]+a[o];break;case 6:this.$=a[o];break;case 7:n.addRelation(a[o]);break;case 8:a[o-1].title=n.cleanupLabel(a[o]),n.addRelation(a[o-1]);break;case 12:n.addMembers(a[o-3],a[o-1]);break;case 13:this.$=[a[o]];break;case 14:a[o].push(a[o-1]),this.$=a[o];break;case 15:break;case 16:n.addMembers(a[o-1],n.cleanupLabel(a[o]));break;case 17:console.warn("Member",a[o]);break;case 18:break;case 19:this.$={id1:a[o-2],id2:a[o],relation:a[o-1],relationTitle1:"none",relationTitle2:"none"};break;case 20:this.$={id1:a[o-3],id2:a[o],relation:a[o-1],relationTitle1:a[o-2],relationTitle2:"none"};break;case 21:this.$={id1:a[o-3],id2:a[o],relation:a[o-2],relationTitle1:"none",relationTitle2:a[o-1]};break;case 22:this.$={id1:a[o-4],id2:a[o],relation:a[o-2],relationTitle1:a[o-3],relationTitle2:a[o-1]};break;case 23:this.$={type1:a[o-2],type2:a[o],lineType:a[o-1]};break;case 24:this.$={type1:"none",type2:a[o],lineType:a[o-1]};break;case 25:this.$={type1:a[o-1],type2:"none",lineType:a[o]};break;case 26:this.$={type1:"none",type2:"none",lineType:a[o]};break;case 27:this.$=n.relationType.AGGREGATION;break;case 28:this.$=n.relationType.EXTENSION;break;case 29:this.$=n.relationType.COMPOSITION;break;case 30:this.$=n.relationType.DEPENDENCY;break;case 31:this.$=n.lineType.LINE;break;case 32:this.$=n.lineType.DOTTED_LINE}},table:[{3:1,4:2,5:[1,3]},{1:[3]},{1:[2,1]},{6:[1,4]},{7:5,9:6,10:10,11:14,12:7,14:8,15:9,16:r,20:n,21:i,45:a,46:o,47:s},{8:[1,18]},{6:[1,19],8:[2,3]},e(u,[2,7],{13:[1,20]}),e(u,[2,9]),e(u,[2,10]),e(u,[2,15],{22:21,24:24,25:25,13:[1,23],23:[1,22],26:c,27:l,28:h,29:f,30:d,31:p}),{10:32,11:14,45:a,46:o,47:s},e(u,[2,17]),e(u,[2,18]),e(g,[2,6],{11:14,10:33,45:a,46:o,47:s}),e(y,[2,46]),e(y,[2,47]),e(y,[2,48]),{1:[2,2]},{7:34,9:6,10:10,11:14,12:7,14:8,15:9,16:r,20:n,21:i,45:a,46:o,47:s},e(u,[2,8]),{10:35,11:14,23:[1,36],45:a,46:o,47:s},{22:37,24:24,25:25,26:c,27:l,28:h,29:f,30:d,31:p},e(u,[2,16]),{25:38,30:d,31:p},e(m,[2,26],{24:39,26:c,27:l,28:h,29:f}),e(v,[2,27]),e(v,[2,28]),e(v,[2,29]),e(v,[2,30]),e(_,[2,31]),e(_,[2,32]),e(u,[2,11],{17:[1,40]}),e(g,[2,5]),{8:[2,4]},e(b,[2,19]),{10:41,11:14,45:a,46:o,47:s},{10:42,11:14,23:[1,43],45:a,46:o,47:s},e(m,[2,25],{24:44,26:c,27:l,28:h,29:f}),e(m,[2,24]),{18:45,20:w},e(b,[2,21]),e(b,[2,20]),{10:47,11:14,45:a,46:o,47:s},e(m,[2,23]),{19:[1,48]},{18:49,19:[2,13],20:w},e(b,[2,22]),e(u,[2,12]),{19:[2,14]}],defaultActions:{2:[2,1],18:[2,2],34:[2,4],49:[2,14]},parseError:function(t,e){if(!e.recoverable){var r=function(t,e){this.message=t,this.hash=e};throw r.prototype=Error,new r(t,e)}this.trace(t)},parse:function(t){var e=this,r=[0],n=[null],i=[],a=this.table,o="",s=0,u=0,c=0,l=2,h=1,f=i.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,"undefined"==typeof d.yylloc&&(d.yylloc={});var y=d.yylloc;i.push(y);var m=d.options&&d.options.ranges;this.parseError="function"==typeof p.yy.parseError?p.yy.parseError:Object.getPrototypeOf(this).parseError;for(var v,_,b,w,A,x,k,E,D,C=function(){var t;return t=d.lex()||h,"number"!=typeof t&&(t=e.symbols_[t]||t),t},S={};;){if(b=r[r.length-1],this.defaultActions[b]?w=this.defaultActions[b]:((null===v||"undefined"==typeof v)&&(v=C()),w=a[b]&&a[b][v]),"undefined"==typeof w||!w.length||!w[0]){var T="";D=[];for(x in a[b])this.terminals_[x]&&x>l&&D.push("'"+this.terminals_[x]+"'");T=d.showPosition?"Parse error on line "+(s+1)+":\n"+d.showPosition()+"\nExpecting "+D.join(", ")+", got '"+(this.terminals_[v]||v)+"'":"Parse error on line "+(s+1)+": Unexpected "+(v==h?"end of input":"'"+(this.terminals_[v]||v)+"'"),this.parseError(T,{text:d.match,token:this.terminals_[v]||v,line:d.yylineno,loc:y,expected:D})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+v);switch(w[0]){case 1:r.push(v),n.push(d.yytext),i.push(d.yylloc),r.push(w[1]),v=null,_?(v=_,_=null):(u=d.yyleng,o=d.yytext,s=d.yylineno,y=d.yylloc,c>0&&c--);break;case 2:if(k=this.productions_[w[1]][1],S.$=n[n.length-k],S._$={first_line:i[i.length-(k||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(k||1)].first_column,last_column:i[i.length-1].last_column},m&&(S._$.range=[i[i.length-(k||1)].range[0],i[i.length-1].range[1]]),A=this.performAction.apply(S,[o,u,s,p.yy,w[1],n,i].concat(f)),"undefined"!=typeof A)return A;k&&(r=r.slice(0,-1*k*2),n=n.slice(0,-1*k),i=i.slice(0,-1*k)),r.push(this.productions_[w[1]][0]),n.push(S.$),i.push(S._$),E=a[r[r.length-2]][r[r.length-1]],r.push(E);break;case 3:return!0}}return!0}},x=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(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,r=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 n=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),r.length-1&&(this.yylineno-=r.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:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[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 r,n,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))),n=t[0].match(/(?:\r\n?|\n).*/g),n&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.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],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,e,r,n;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if(r=this._input.match(this.rules[i[a]]),r&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(t=this.test_match(r,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[n]),t!==!1?t:!1):""===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?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>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),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,r,n){switch(r){case 0:break;case 1:return 6;case 2:break;case 3:return 5;case 4:return this.begin("struct"),17;case 5:return this.popState(),19;case 6:break;case 7:return"MEMBER";case 8:return 16;case 9:this.begin("string");break;case 10:this.popState();break;case 11:return"STR";case 12:return 27;case 13:return 27;case 14:return 29;case 15:return 29;case 16:return 28;case 17:return 26;case 18:return 30;case 19:return 31;case 20:return 13;case 21:return 43;case 22:return"DOT";case 23:return"PLUS";case 24:return 40;case 25:return"EQUALS";case 26:return"EQUALS";case 27:return 47;case 28:return"PUNCTUATION";case 29:return 46;case 30:return 45;case 31:return 42;case 32:return 8}},rules:[/^(?:%%[^\n]*)/,/^(?:\n+)/,/^(?:\s+)/,/^(?:classDiagram\b)/,/^(?:[\{])/,/^(?:\})/,/^(?:[\n])/,/^(?:[^\{\}\n]*)/,/^(?:class\b)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\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}}};return t}();return A.lexer=x,t.prototype=A,A.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof r&&(r.parser=i,r.Parser=i.Parser,r.parse=function(){return i.parse.apply(i,arguments)},r.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),n.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return r.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&r.main(n.argv.slice(1)))}).call(this,t("_process"))},{_process:106,fs:1,path:105}],112:[function(t,e,r){(function(e){"use strict";var n=t("../../logger"),i=new n.Log,a="",o=!1;r.setMessage=function(t){i.debug("Setting message to: "+t),a=t},r.getMessage=function(){return a},r.setInfo=function(t){o=t},r.getInfo=function(){return o},r.parseError=function(t,r){e.mermaidAPI.parseError(t,r)}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../../logger":130}],113:[function(t,e,r){"use strict";var n=t("./exampleDb"),i=t("./parser/example.js"),a=t("../../d3"),o=t("../../logger"),s=new o.Log;r.draw=function(t,e,r){var o;o=i.parser,o.yy=n,s.debug("Renering example diagram"),o.parse(t);var u=a.select("#"+e),c=u.append("g");c.append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size","32px").style("text-anchor","middle").text("mermaid "+r),u.attr("height",100),u.attr("width",400)}},{"../../d3":108,"../../logger":130,"./exampleDb":112,"./parser/example.js":114}],114:[function(t,e,r){(function(n){"use strict";var i=function(){function t(){this.yy={}}var e=function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},r=[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,r,n,i,a){var o=a.length-1;switch(i){case 1:return n;case 4:break;case 6:n.setInfo(!0);break;case 7:n.setMessage(a[o]);break;case 8:this.$=a[o-1].substring(1).trim().replace(/\\n/gm,"\n")}},table:[{3:1,4:[1,2]},{1:[3]},e(r,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8],11:9,12:[1,10]},{1:[2,1]},e(r,[2,3]),e(r,[2,4]),e(r,[2,5]),e(r,[2,6]),e(r,[2,7]),{13:[1,11]},e(r,[2,8])],defaultActions:{4:[2,1]},parseError:function(t,e){if(!e.recoverable){var r=function(t,e){this.message=t,this.hash=e};throw r.prototype=Error,new r(t,e)}this.trace(t)},parse:function(t){var e=this,r=[0],n=[null],i=[],a=this.table,o="",s=0,u=0,c=0,l=2,h=1,f=i.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,"undefined"==typeof d.yylloc&&(d.yylloc={});var y=d.yylloc;i.push(y);var m=d.options&&d.options.ranges;this.parseError="function"==typeof p.yy.parseError?p.yy.parseError:Object.getPrototypeOf(this).parseError;for(var v,_,b,w,A,x,k,E,D,C=function(){var t;return t=d.lex()||h,"number"!=typeof t&&(t=e.symbols_[t]||t),t},S={};;){if(b=r[r.length-1],this.defaultActions[b]?w=this.defaultActions[b]:((null===v||"undefined"==typeof v)&&(v=C()),w=a[b]&&a[b][v]),"undefined"==typeof w||!w.length||!w[0]){var T="";D=[];for(x in a[b])this.terminals_[x]&&x>l&&D.push("'"+this.terminals_[x]+"'");T=d.showPosition?"Parse error on line "+(s+1)+":\n"+d.showPosition()+"\nExpecting "+D.join(", ")+", got '"+(this.terminals_[v]||v)+"'":"Parse error on line "+(s+1)+": Unexpected "+(v==h?"end of input":"'"+(this.terminals_[v]||v)+"'"),this.parseError(T,{text:d.match,token:this.terminals_[v]||v,line:d.yylineno,loc:y,expected:D})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+v);switch(w[0]){case 1:r.push(v),n.push(d.yytext),i.push(d.yylloc),r.push(w[1]),v=null,_?(v=_,_=null):(u=d.yyleng,o=d.yytext,s=d.yylineno,y=d.yylloc,c>0&&c--);break;case 2:if(k=this.productions_[w[1]][1],S.$=n[n.length-k],S._$={first_line:i[i.length-(k||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(k||1)].first_column,last_column:i[i.length-1].last_column},m&&(S._$.range=[i[i.length-(k||1)].range[0],i[i.length-1].range[1]]),A=this.performAction.apply(S,[o,u,s,p.yy,w[1],n,i].concat(f)),"undefined"!=typeof A)return A;k&&(r=r.slice(0,-1*k*2),n=n.slice(0,-1*k),i=i.slice(0,-1*k)),r.push(this.productions_[w[1]][0]),n.push(S.$),i.push(S._$),E=a[r[r.length-2]][r[r.length-1]],r.push(E);break;case 3:return!0}}return!0}},i=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0]; this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(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,r=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 n=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),r.length-1&&(this.yylineno-=r.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:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[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 r,n,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))),n=t[0].match(/(?:\r\n?|\n).*/g),n&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.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],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,e,r,n;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if(r=this._input.match(this.rules[i[a]]),r&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(t=this.test_match(r,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[n]),t!==!1?t:!1):""===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?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>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),t>=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,r,n){switch(r){case 0:return 9;case 1:return 10;case 2:return 4;case 3:return 12;case 4:return 13;case 5:return 6;case 6:return"INVALID"}},rules:[/^(?:[\n]+)/i,/^(?:showInfo\b)/i,/^(?:info\b)/i,/^(?:say\b)/i,/^(?::[^#\n;]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6],inclusive:!0}}};return t}();return n.lexer=i,t.prototype=n,n.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof r&&(r.parser=i,r.Parser=i.Parser,r.parse=function(){return i.parse.apply(i,arguments)},r.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),n.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return r.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&r.main(n.argv.slice(1)))}).call(this,t("_process"))},{_process:106,fs:1,path:105}],115:[function(t,e){"use strict";var r,n=t("../../logger"),i=new n.Log;if(t)try{r=t("dagre-d3")}catch(a){i.debug("Could not load dagre-d3")}r||(r=window.dagreD3),e.exports=r},{"../../logger":130,"dagre-d3":2}],116:[function(t,e,r){"use strict";var n=t("./graphDb"),i=t("./parser/flow"),a=t("./parser/dot"),o=t("../../d3"),s=t("./dagre-d3"),u=t("../../logger"),c=new u.Log,l={};e.exports.setConf=function(t){var e,r=Object.keys(t);for(e=0;e<r.length;e++)l[r[e]]=t[r[e]]},r.addVertices=function(t,e){var r=Object.keys(t),n=function(t,e){var r;for(r=0;r<e.length;r++)"undefined"!=typeof e[r]&&(t=t+e[r]+";");return t};r.forEach(function(r){var i,a=t[r],o="";a.classes.length>0&&(o=a.classes.join(" "));var s="";s=n(s,a.styles),i="undefined"==typeof a.text?a.id:a.text;var u="";if(l.htmlLabels)u="html",i=i.replace(/fa:fa[\w\-]+/g,function(t){return'<i class="fa '+t.substring(3)+'"></i>'});else{var c=document.createElementNS("http://www.w3.org/2000/svg","text"),h=i.split(/<br>/),f=0;for(f=0;f<h.length;f++){var d=document.createElementNS("http://www.w3.org/2000/svg","tspan");d.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),d.setAttribute("dy","1em"),d.setAttribute("x","1"),d.textContent=h[f],c.appendChild(d)}u="svg",i=c}var p=0,g="";switch(a.type){case"round":p=5,g="rect";break;case"square":g="rect";break;case"diamond":g="question";break;case"odd":g="rect_left_inv_arrow";break;case"odd_right":g="rect_left_inv_arrow";break;case"circle":g="circle";break;case"ellipse":g="ellipse";break;case"group":g="rect",i=l.htmlLabels?"":document.createElementNS("http://www.w3.org/2000/svg","text");break;default:g="rect"}e.setNode(a.id,{labelType:u,shape:g,label:i,rx:p,ry:p,"class":o,style:s,id:a.id})})},r.addEdges=function(t,e){var r,n=0;"undefined"!=typeof t.defaultStyle&&(r=t.defaultStyle.toString().replace(/,/g,";")),t.forEach(function(i){n++;var a={};a.arrowhead="arrow_open"===i.type?"none":"normal";var o="";if("undefined"!=typeof i.style)i.style.forEach(function(t){o=o+t+";"});else switch(i.stroke){case"normal":o="fill:none","undefined"!=typeof r&&(o=r);break;case"dotted":o="stroke: #333; fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":o="stroke: #333; stroke-width: 3.5px;fill:none"}a.style=o,"undefined"!=typeof i.interpolate?a.lineInterpolate=i.interpolate:"undefined"!=typeof t.defaultInterpolate&&(a.lineInterpolate=t.defaultInterpolate),"undefined"==typeof i.text?"undefined"!=typeof i.style&&(a.arrowheadStyle="fill: #333"):(a.arrowheadStyle="fill: #333","undefined"==typeof i.style?(a.labelpos="c",l.htmlLabels?(a.labelType="html",a.label='<span class="edgeLabel">'+i.text+"</span>"):(a.labelType="text",a.style="stroke: #333; stroke-width: 1.5px;fill:none",a.label=i.text.replace(/<br>/g,"\n"))):a.label=i.text.replace(/<br>/g,"\n")),e.setEdge(i.start,i.end,a,n)})},r.getClasses=function(t,e){var r;n.clear(),r=e?a.parser:i.parser,r.yy=n,r.parse(t);var o=n.getClasses();return"undefined"==typeof o["default"]&&(o["default"]={id:"default"},o["default"].styles=[],o["default"].clusterStyles=["rx:4px","fill: rgb(255, 255, 222)","rx: 4px","stroke: rgb(170, 170, 51)","stroke-width: 1px"],o["default"].nodeLabelStyles=["fill:#000","stroke:none","font-weight:300",'font-family:"Helvetica Neue",Helvetica,Arial,sans-serf',"font-size:14px"],o["default"].edgeLabelStyles=["fill:#000","stroke:none","font-weight:300",'font-family:"Helvetica Neue",Helvetica,Arial,sans-serf',"font-size:14px"]),o},r.draw=function(t,e,u){c.debug("Drawing flowchart");var h;n.clear(),h=u?a.parser:i.parser,h.yy=n;try{h.parse(t)}catch(f){c.debug("Parsing failed")}var d;d=n.getDirection(),"undefined"==typeof d&&(d="TD");var p,g=new s.graphlib.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:d,marginx:20,marginy:20}).setDefaultEdgeLabel(function(){return{}}),y=n.getSubGraphs(),m=0;for(m=y.length-1;m>=0;m--)p=y[m],n.addVertex(p.id,p.title,"group",void 0);var v=n.getVertices(),_=n.getEdges();m=0;var b;for(m=y.length-1;m>=0;m--)for(p=y[m],o.selectAll("cluster").append("text"),b=0;b<p.nodes.length;b++)g.setParent(p.nodes[b],p.id);r.addVertices(v,g),r.addEdges(_,g);var w=new s.render;w.shapes().question=function(t,e,r){var n=e.width,i=e.height,a=.8*(n+i),o=[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}],u=t.insert("polygon",":first-child").attr("points",o.map(function(t){return t.x+","+t.y}).join(" ")).attr("rx",5).attr("ry",5).attr("transform","translate("+-a/2+","+2*a/4+")");return r.intersect=function(t){return s.intersect.polygon(r,o,t)},u},w.shapes().rect_left_inv_arrow=function(t,e,r){var n=e.width,i=e.height,a=[{x:-i/2,y:0},{x:n,y:0},{x:n,y:-i},{x:-i/2,y:-i},{x:0,y:-i/2}],o=t.insert("polygon",":first-child").attr("points",a.map(function(t){return t.x+","+t.y}).join(" ")).attr("transform","translate("+-n/2+","+2*i/4+")");return r.intersect=function(t){return s.intersect.polygon(r,a,t)},o},w.shapes().rect_right_inv_arrow=function(t,e,r){var n=e.width,i=e.height,a=[{x:0,y:0},{x:n+i/2,y:0},{x:n,y:-i/2},{x:n+i/2,y:-i},{x:0,y:-i}],o=t.insert("polygon",":first-child").attr("points",a.map(function(t){return t.x+","+t.y}).join(" ")).attr("transform","translate("+-n/2+","+2*i/4+")");return r.intersect=function(t){return s.intersect.polygon(r,a,t)},o},w.arrows().none=function(t,e,r,n){var i=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),a=i.append("path").attr("d","M 0 0 L 0 0 L 0 0 z");s.util.applyStyle(a,r[n+"Style"])},w.arrows().normal=function(t,e){{var r=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto");r.append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowheadPath").style("stroke-width",1).style("stroke-dasharray","1,0")}};var A=o.select("#"+e),x=o.select("#"+e+" g");for(w(x,g),x.selectAll("g.node").attr("title",function(){return n.getTooltip(this.id)}),l.useMaxWidth?(A.attr("height","100%"),A.attr("width",l.width),A.attr("viewBox","0 0 "+(g.graph().width+20)+" "+(g.graph().height+20)),A.attr("style","max-width:"+(g.graph().width+20)+"px;")):(A.attr("height",g.graph().height),"undefined"==typeof l.width?A.attr("width",g.graph().width):A.attr("width",l.width),A.attr("viewBox","0 0 "+(g.graph().width+20)+" "+(g.graph().height+20))),n.indexNodes("subGraph"+m),m=0;m<y.length;m++)if(p=y[m],"undefined"!==p.title){var k=document.querySelectorAll("#"+e+" #"+p.id+" rect"),E=document.querySelectorAll("#"+e+" #"+p.id),D=k[0].x.baseVal.value,C=k[0].y.baseVal.value,S=k[0].width.baseVal.value,T=o.select(E[0]),F=T.append("text");F.attr("x",D+S/2),F.attr("y",C+14),F.attr("fill","black"),F.attr("stroke","none"),F.attr("id",e+"Text"),F.style("text-anchor","middle"),F.text("undefined"==typeof p.title?"Undef":p.title)}if(!l.htmlLabels){var m,B=document.querySelectorAll("#"+e+" .edgeLabel .label");for(m=0;m<B.length;m++){var L=B[m],O=L.getBBox(),I=document.createElementNS("http://www.w3.org/2000/svg","rect");I.setAttribute("rx",0),I.setAttribute("ry",0),I.setAttribute("width",O.width),I.setAttribute("height",O.height),I.setAttribute("style","fill:#e8e8e8;"),L.insertBefore(I,L.firstChild)}}}},{"../../d3":108,"../../logger":130,"./dagre-d3":115,"./graphDb":117,"./parser/dot":118,"./parser/flow":119}],117:[function(require,module,exports){(function(global){"use strict";var Logger=require("../../logger"),log=new Logger.Log,utils=require("../../utils"),d3=require("../../d3"),vertices={},edges=[],classes=[],subGraphs=[],tooltips={},subCount=0,direction,funs=[];exports.addVertex=function(t,e,r,n){var i;"undefined"!=typeof t&&0!==t.trim().length&&("undefined"==typeof vertices[t]&&(vertices[t]={id:t,styles:[],classes:[]}),"undefined"!=typeof e&&(i=e.trim(),'"'===i[0]&&'"'===i[i.length-1]&&(i=i.substring(1,i.length-1)),vertices[t].text=i),"undefined"!=typeof r&&(vertices[t].type=r),"undefined"!=typeof r&&(vertices[t].type=r),"undefined"!=typeof n&&null!==n&&n.forEach(function(e){vertices[t].styles.push(e)}))},exports.addLink=function(t,e,r,n){log.info("Got edge...",t,e);var i={start:t,end:e,type:void 0,text:""};n=r.text,"undefined"!=typeof n&&(i.text=n.trim(),'"'===i.text[0]&&'"'===i.text[i.text.length-1]&&(i.text=i.text.substring(1,i.text.length-1))),"undefined"!=typeof r&&(i.type=r.type,i.stroke=r.stroke),edges.push(i)},exports.updateLinkInterpolate=function(t,e){"default"===t?edges.defaultInterpolate=e:edges[t].interpolate=e},exports.updateLink=function(t,e){"default"===t?edges.defaultStyle=e:(-1===utils.isSubstringInArray("fill",e)&&e.push("fill:none"),edges[t].style=e)},exports.addClass=function(t,e){"undefined"==typeof classes[t]&&(classes[t]={id:t,styles:[]}),"undefined"!=typeof e&&null!==e&&e.forEach(function(e){classes[t].styles.push(e)})},exports.setDirection=function(t){direction=t},exports.setClass=function(t,e){t.indexOf(",")>0?t.split(",").forEach(function(t){"undefined"!=typeof vertices[t]&&vertices[t].classes.push(e)}):"undefined"!=typeof vertices[t]&&vertices[t].classes.push(e)};var setTooltip=function(t,e){"undefined"!=typeof e&&(tooltips[t]=e)},setClickFun=function setClickFun(id,functionName){"undefined"!=typeof functionName&&"undefined"!=typeof vertices[id]&&funs.push(function(element){var elem=d3.select(element).select("#"+id);null!==elem&&elem.on("click",function(){eval(functionName+"('"+id+"')")})})},setLink=function(t,e){"undefined"!=typeof e&&"undefined"!=typeof vertices[t]&&funs.push(function(r){var n=d3.select(r).select("#"+t);null!==n&&n.on("click",function(){window.open(e,"newTab")})})};exports.getTooltip=function(t){return tooltips[t]},exports.setClickEvent=function(t,e,r,n){t.indexOf(",")>0?t.split(",").forEach(function(t){setTooltip(t,n),setClickFun(t,e),setLink(t,r)}):(setTooltip(t,n),setClickFun(t,e),setLink(t,r))},exports.bindFunctions=function(t){funs.forEach(function(e){e(t)})},exports.getDirection=function(){return direction},exports.getVertices=function(){return vertices},exports.getEdges=function(){return edges},exports.getClasses=function(){return classes};var setupToolTips=function(t){var e=d3.select(".mermaidTooltip");null===e[0][0]&&(e=d3.select("body").append("div").attr("class","mermaidTooltip").style("opacity",0));var r=d3.select(t).select("svg"),n=r.selectAll("g.node");n.on("mouseover",function(){var t=d3.select(this),r=t.attr("title");if(null!==r){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);var t=d3.select(this);t.classed("hover",!1)})};funs.push(setupToolTips),exports.clear=function(){vertices={},classes={},edges=[],funs=[],funs.push(setupToolTips),subGraphs=[],subCount=0,tooltips=[]},exports.defaultStyle=function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},exports.addSubGraph=function(t,e){function r(t){var e={"boolean":{},number:{},string:{}},r=[];return t.filter(function(t){var n=typeof t;return" "===t?!1:n in e?e[n].hasOwnProperty(t)?!1:e[n][t]=!0:r.indexOf(t)>=0?!1:r.push(t)})}var n=[];n=r(n.concat.apply(n,t));var i={id:"subGraph"+subCount,nodes:n,title:e};return subGraphs.push(i),subCount+=1,i.id};var getPosForId=function(t){var e;for(e=0;e<subGraphs.length;e++)if(subGraphs[e].id===t)return e;return-1},secCount=-1,posCrossRef=[],indexNodes=function t(e,r){var n=subGraphs[r].nodes;if(secCount+=1,!(secCount>2e3)){if(posCrossRef[secCount]=r,subGraphs[r].id===e)return{result:!0,count:0};for(var i=0,a=1;i<n.length;){var o=getPosForId(n[i]);if(o>=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}}};exports.getDepthFirstPos=function(t){return posCrossRef[t]},exports.indexNodes=function(){secCount=-1,subGraphs.length>0&&indexNodes("none",subGraphs.length-1,0)},exports.getSubGraphs=function(){return subGraphs},exports.parseError=function(t,e){global.mermaidAPI.parseError(t,e)}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../../d3":108,"../../logger":130,"../../utils":133}],118:[function(t,e,r){(function(n){"use strict";var i=function(){function t(){this.yy={}}var e=function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},r=[1,5],n=[1,6],i=[1,12],a=[1,13],o=[1,14],s=[1,15],u=[1,16],c=[1,17],l=[1,18],h=[1,19],f=[1,20],d=[1,21],p=[1,22],g=[8,16,17,18,19,20,21,22,23,24,25,26],y=[1,37],m=[1,33],v=[1,34],_=[1,35],b=[1,36],w=[8,10,16,17,18,19,20,21,22,23,24,25,26,28,32,37,39,40,45,57,58],A=[10,28],x=[10,28,37,57,58],k=[2,49],E=[1,45],D=[1,48],C=[1,49],S=[1,52],T=[2,65],F=[1,65],B=[1,66],L=[1,67],O=[1,68],I=[1,69],R=[1,70],M=[1,71],N=[1,72],P=[1,73],j=[8,16,17,18,19,20,21,22,23,24,25,26,47],q=[10,28,37],U={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,r,n,i,a){var o=a.length-1;switch(i){case 1:this.$=a[o-1];break;case 2:this.$=a[o-4];break;case 3:this.$=a[o-5];break;case 4:this.$=a[o-3];break;case 8:case 10:case 11:this.$=a[o];break;case 9:this.$=a[o-1]+""+a[o];break;case 12:case 13:case 14:case 15:case 16:case 18:case 19:case 20:this.$=a[o];break;case 17:this.$="<br>";break;case 39:this.$="oy";break;case 40:n.addLink(a[o-1],a[o].id,a[o].op),this.$="oy";break;case 42:n.addLink(a[o-1],a[o].id,a[o].op),this.$={op:a[o-2],id:a[o-1]};break;case 44:this.$={op:a[o-1],id:a[o]};break;case 48:n.addVertex(a[o-1]),this.$=a[o-1];break;case 49:n.addVertex(a[o]),this.$=a[o];break;case 66:this.$="arrow";break;case 67:this.$="arrow_open"}},table:[{3:1,4:2,6:3,11:[1,4],12:r,13:n},{1:[3]},{5:[1,7]},{7:8,8:[1,9],14:10,15:11,16:i,17:a,18:o,19:s,20:u,21:c,22:l,23:h,24:f,25:d,26:p},{6:23,12:r,13:n},e(g,[2,5]),e(g,[2,6]),{1:[2,1]},{8:[1,24]},{7:30,8:y,9:25,12:m,14:10,15:11,16:i,17:a,18:o,19:s,20:u,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:_,42:32,47:b},e([8,10,28,32,37,39,40,45,57,58],[2,7],{15:38,16:i,17:a,18:o,19:s,20:u,21:c,22:l,23:h,24:f,25:d,26:p}),e(w,[2,8]),e(w,[2,10]),e(w,[2,11]),e(w,[2,12]),e(w,[2,13]),e(w,[2,14]),e(w,[2,15]),e(w,[2,16]),e(w,[2,17]),e(w,[2,18]),e(w,[2,19]),e(w,[2,20]),{7:39,14:10,15:11,16:i,17:a,18:o,19:s,20:u,21:c,22:l,23:h,24:f,25:d,26:p},{7:30,8:y,9:40,12:m,14:10,15:11,16:i,17:a,18:o,19:s,20:u,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:_,42:32,47:b},{10:[1,41]},{10:[2,21],28:[1,42]},e(A,[2,23]),e(A,[2,24]),e(A,[2,25]),e(x,k,{44:44,32:[1,43],45:E}),e(A,[2,27],{41:46,43:47,57:D,58:C}),e(A,[2,47],{43:47,34:50,41:51,37:S,57:D,58:C}),{34:53,37:S},{34:54,37:S},{34:55,37:S},{7:56,8:[1,57],14:10,15:11,16:i,17:a,18:o,19:s,20:u,21:c,22:l,23:h,24:f,25:d,26:p},{7:30,8:y,9:58,12:m,14:10,15:11,16:i,17:a,18:o,19:s,20:u,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:_,42:32,47:b},e(w,[2,9]),{8:[1,59]},{10:[1,60]},{5:[2,4]},{7:30,8:y,9:61,12:m,14:10,15:11,16:i,17:a,18:o,19:s,20:u,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:_,42:32,47:b},{7:62,14:10,15:11,16:i,17:a,18:o,19:s,20:u,21:c,22:l,23:h,24:f,25:d,26:p},e(x,[2,48]),e(x,T,{14:10,15:11,7:63,46:64,16:i,17:a,18:o,19:s,20:u,21:c,22:l,23:h,24:f,25:d,26:p,48:F,49:B,50:L,51:O,52:I,53:R,54:M,55:N,56:P}),e(A,[2,41],{34:74,37:S}),{7:77,8:y,14:10,15:11,16:i,17:a,18:o,19:s,20:u,21:c,22:l,23:h,24:f,25:d,26:p,33:76,42:75,47:b},e(j,[2,66]),e(j,[2,67]),e(A,[2,46]),e(A,[2,40],{34:78,37:S}),{7:81,14:10,15:11,16:i,17:a,18:o,19:s,20:u,21:c,22:l,23:h,24:f,25:d,26:p,38:79,39:[1,80]},e(A,[2,28]),e(A,[2,29]),e(A,[2,30]),{8:[1,82]},{7:30,8:y,9:83,12:m,14:10,15:11,16:i,17:a,18:o,19:s,20:u,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:_,42:32,47:b},{10:[1,84]},{7:30,8:y,9:85,12:m,14:10,15:11,16:i,17:a,18:o,19:s,20:u,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:_,42:32,47:b},{5:[2,2]},{10:[2,22]},e(A,[2,26]),e(x,[2,51],{45:[1,86]}),e(x,[2,52]),e(x,[2,56]),e(x,[2,57]),e(x,[2,58]),e(x,[2,59]),e(x,[2,60]),e(x,[2,61]),e(x,[2,62]),e(x,[2,63]),e(x,[2,64]),e(A,[2,38]),e(q,[2,44],{43:47,41:87,57:D,58:C}),e(q,[2,45],{43:47,41:88,57:D,58:C}),e(x,k,{44:44,45:E}),e(A,[2,39]),{39:[1,89]},e(A,[2,34],{34:90,37:S}),{32:[1,91]},{7:30,8:y,9:92,12:m,14:10,15:11,16:i,17:a,18:o,19:s,20:u,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:_,42:32,47:b},{10:[1,93]},e(x,[2,55]),{10:[1,94]},e(x,T,{46:95,48:F,49:B,50:L,51:O,52:I,53:R,54:M,55:N,56:P}),e(q,[2,42]),e(q,[2,43]),e(A,[2,33],{34:96,37:S}),e(A,[2,32]),{7:97,14:10,15:11,16:i,17:a,18:o,19:s,20:u,21:c,22:l,23:h,24:f,25:d,26:p},{10:[1,98]},e(x,[2,54]),{5:[2,3]},e(x,[2,50]),e(A,[2,31]),{28:[1,99],39:[2,37],40:[1,100]},e(x,[2,53]),{7:81,14:10,15:11,16:i,17:a,18:o,19:s,20:u,21:c,22:l,23:h,24:f,25:d,26:p,38:101},{7:81,14:10,15:11,16:i,17:a,18:o,19:s,20:u,21:c,22:l,23:h,24:f,25:d,26:p,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 r=function(t,e){this.message=t,this.hash=e};throw r.prototype=Error,new r(t,e)}this.trace(t)},parse:function(t){var e=this,r=[0],n=[null],i=[],a=this.table,o="",s=0,u=0,c=0,l=2,h=1,f=i.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,"undefined"==typeof d.yylloc&&(d.yylloc={});var y=d.yylloc;i.push(y);var m=d.options&&d.options.ranges;this.parseError="function"==typeof p.yy.parseError?p.yy.parseError:Object.getPrototypeOf(this).parseError;for(var v,_,b,w,A,x,k,E,D,C=function(){var t;return t=d.lex()||h,"number"!=typeof t&&(t=e.symbols_[t]||t),t},S={};;){if(b=r[r.length-1],this.defaultActions[b]?w=this.defaultActions[b]:((null===v||"undefined"==typeof v)&&(v=C()),w=a[b]&&a[b][v]),"undefined"==typeof w||!w.length||!w[0]){var T="";D=[];for(x in a[b])this.terminals_[x]&&x>l&&D.push("'"+this.terminals_[x]+"'");T=d.showPosition?"Parse error on line "+(s+1)+":\n"+d.showPosition()+"\nExpecting "+D.join(", ")+", got '"+(this.terminals_[v]||v)+"'":"Parse error on line "+(s+1)+": Unexpected "+(v==h?"end of input":"'"+(this.terminals_[v]||v)+"'"),this.parseError(T,{text:d.match,token:this.terminals_[v]||v,line:d.yylineno,loc:y,expected:D})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+v);switch(w[0]){case 1:r.push(v),n.push(d.yytext),i.push(d.yylloc),r.push(w[1]),v=null,_?(v=_,_=null):(u=d.yyleng,o=d.yytext,s=d.yylineno,y=d.yylloc,c>0&&c--);break;case 2:if(k=this.productions_[w[1]][1],S.$=n[n.length-k],S._$={first_line:i[i.length-(k||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(k||1)].first_column,last_column:i[i.length-1].last_column},m&&(S._$.range=[i[i.length-(k||1)].range[0],i[i.length-1].range[1]]),A=this.performAction.apply(S,[o,u,s,p.yy,w[1],n,i].concat(f)),"undefined"!=typeof A)return A;k&&(r=r.slice(0,-1*k*2),n=n.slice(0,-1*k),i=i.slice(0,-1*k)),r.push(this.productions_[w[1]][0]),n.push(S.$),i.push(S._$),E=a[r[r.length-2]][r[r.length-1]],r.push(E);break;case 3:return!0}}return!0}},Y=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(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,r=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 n=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),r.length-1&&(this.yylineno-=r.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:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[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 r,n,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))),n=t[0].match(/(?:\r\n?|\n).*/g),n&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.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],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,e,r,n;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if(r=this._input.match(this.rules[i[a]]),r&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(t=this.test_match(r,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[n]),t!==!1?t:!1):""===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?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>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),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,r,n){switch(r){case 0:return"STYLE";case 1:return"LINKSTYLE";case 2:return"CLASSDEF";case 3:return"CLASS";case 4:return"CLICK";case 5:return 12;case 6:return 13;case 7:return 47;case 8:return 35;case 9:return 36;case 10:return"DIR";case 11:return"DIR";case 12:return"DIR";case 13:return"DIR";case 14:return"DIR";case 15:return"DIR";case 16:return 17;case 17:return 23;case 18:return 18;case 19:return 28;case 20:return 40;case 21:return 32;case 22:return 21;case 23:return 22;case 24:return"ARROW_CROSS";case 25:return 57;case 26:return"ARROW_CIRCLE";case 27:return 58;case 28:return 25;case 29:return 19;case 30:return 20;case 31:return 16;case 32:return"PIPE";case 33:return"PS";case 34:return"PE";case 35:return 37;case 36:return 39;case 37:return 8;case 38:return 10;case 39:return"QUOTE";case 40:return 24;case 41:return"NEWLINE";case 42:return 5}},rules:[/^(?:style\b)/,/^(?:linkStyle\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:click\b)/,/^(?:graph\b)/,/^(?:digraph\b)/,/^(?:subgraph\b)/,/^(?:node\b)/,/^(?:edge\b)/,/^(?:LR\b)/,/^(?:RL\b)/,/^(?:TB\b)/,/^(?:BT\b)/,/^(?:TD\b)/,/^(?:BR\b)/,/^(?:[0-9])/,/^(?:#)/,/^(?::)/,/^(?:;)/,/^(?:,)/,/^(?:=)/,/^(?:\*)/,/^(?:\.)/,/^(?:--[x])/,/^(?:->)/,/^(?:--[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}}};return t}();return U.lexer=Y,t.prototype=U,U.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof r&&(r.parser=i,r.Parser=i.Parser,r.parse=function(){return i.parse.apply(i,arguments)},r.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),n.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return r.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&r.main(n.argv.slice(1)))}).call(this,t("_process"))},{_process:106,fs:1,path:105}],119:[function(t,e,r){(function(n){"use strict";var i=function(){function t(){this.yy={}}var e=function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},r=[1,4],n=[1,3],i=[1,5],a=[1,8,9,10,11,13,18,30,46,71,72,73,74,75,81,86,88,89,91,92,94,95,96,97,98],o=[2,2],s=[1,12],u=[1,13],c=[1,14],l=[1,15],h=[1,31],f=[1,33],d=[1,22],p=[1,34],g=[1,24],y=[1,25],m=[1,26],v=[1,27],_=[1,28],b=[1,38],w=[1,40],A=[1,35],x=[1,39],k=[1,45],E=[1,44],D=[1,36],C=[1,37],S=[1,41],T=[1,42],F=[1,43],B=[1,8,9,10,11,13,18,30,32,46,71,72,73,74,75,81,86,88,89,91,92,94,95,96,97,98],L=[1,53],O=[1,52],I=[1,54],R=[1,72],M=[1,80],N=[1,81],P=[1,66],j=[1,65],q=[1,85],U=[1,84],Y=[1,82],$=[1,83],V=[1,73],G=[1,68],W=[1,67],H=[1,63],z=[1,75],Z=[1,76],X=[1,77],K=[1,78],J=[1,79],Q=[1,70],tt=[1,69],et=[8,9,11],rt=[8,9,11,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64],nt=[1,115],it=[8,9,10,11,13,15,18,36,38,40,42,46,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,81,86,88,89,91,92,94,95,96,97,98],at=[8,9,10,11,12,13,15,16,17,18,30,32,36,37,38,39,40,41,42,43,46,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,71,72,73,74,75,78,81,84,86,88,89,91,92,94,95,96,97,98],ot=[1,117],st=[1,118],ut=[8,9,10,11,13,18,30,32,46,71,72,73,74,75,81,86,88,89,91,92,94,95,96,97,98],ct=[8,9,10,11,12,13,15,16,17,18,30,32,37,39,41,43,46,50,51,52,53,54,56,57,58,59,60,61,62,63,64,65,71,72,73,74,75,78,81,84,86,88,89,91,92,94,95,96,97,98],lt=[13,18,46,81,86,88,89,91,92,94,95,96,97,98],ht=[13,18,46,49,65,81,86,88,89,91,92,94,95,96,97,98],ft=[1,191],dt=[1,188],pt=[1,195],gt=[1,192],yt=[1,189],mt=[1,196],vt=[1,186],_t=[1,187],bt=[1,190],wt=[1,193],At=[1,194],xt=[1,213],kt=[8,9,11,86],Et=[8,9,10,11,46,71,80,81,84,86,88,89,90,91,92],Dt={trace:function(){},yy:{},symbols_:{error:2,mermaidDoc:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,DIR:13,FirstStmtSeperator:14,TAGEND:15,TAGSTART:16,UP:17,DOWN:18,ending:19,endToken:20,spaceList:21,spaceListNewline:22,verticeStatement:23,separator:24,styleStatement:25,linkStyleStatement:26,classDefStatement:27,classStatement:28,clickStatement:29,subgraph:30,text:31,end:32,vertex:33,link:34,alphaNum:35,SQS:36,SQE:37,PS:38,PE:39,"(-":40,"-)":41,DIAMOND_START:42,DIAMOND_STOP:43,alphaNumStatement:44,alphaNumToken:45,MINUS:46,linkStatement:47,arrowText:48,TESTSTR:49,"--":50,ARROW_POINT:51,ARROW_CIRCLE:52,ARROW_CROSS:53,ARROW_OPEN:54,"-.":55,DOTTED_ARROW_POINT:56,DOTTED_ARROW_CIRCLE:57,DOTTED_ARROW_CROSS:58,DOTTED_ARROW_OPEN:59,"==":60,THICK_ARROW_POINT:61,THICK_ARROW_CIRCLE:62,THICK_ARROW_CROSS:63,THICK_ARROW_OPEN:64,PIPE:65,textToken:66,STR:67,commentText:68,commentToken:69,keywords:70,STYLE:71,LINKSTYLE:72,CLASSDEF:73,CLASS:74,CLICK:75,textNoTags:76,textNoTagsToken:77,DEFAULT:78,stylesOpt:79,HEX:80,NUM:81,INTERPOLATE:82,commentStatement:83,PCT:84,style:85,COMMA:86,styleComponent:87,ALPHA:88,COLON:89,UNIT:90,BRKT:91,DOT:92,graphCodeTokens:93,PUNCTUATION:94,UNICODE_TEXT:95,PLUS:96,EQUALS:97,MULT:98,TAG_START:99,TAG_END:100,QUOTE:101,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"DIR",15:"TAGEND",16:"TAGSTART",17:"UP",18:"DOWN",30:"subgraph",32:"end",36:"SQS",37:"SQE",38:"PS",39:"PE",40:"(-",41:"-)",42:"DIAMOND_START",43:"DIAMOND_STOP",46:"MINUS",49:"TESTSTR",50:"--",51:"ARROW_POINT",52:"ARROW_CIRCLE",53:"ARROW_CROSS",54:"ARROW_OPEN",55:"-.",56:"DOTTED_ARROW_POINT",57:"DOTTED_ARROW_CIRCLE",58:"DOTTED_ARROW_CROSS",59:"DOTTED_ARROW_OPEN",60:"==",61:"THICK_ARROW_POINT",62:"THICK_ARROW_CIRCLE",63:"THICK_ARROW_CROSS",64:"THICK_ARROW_OPEN",65:"PIPE",67:"STR",71:"STYLE",72:"LINKSTYLE",73:"CLASSDEF",74:"CLASS",75:"CLICK",78:"DEFAULT",80:"HEX",81:"NUM",82:"INTERPOLATE",84:"PCT",86:"COMMA",88:"ALPHA",89:"COLON",90:"UNIT",91:"BRKT",92:"DOT",94:"PUNCTUATION",95:"UNICODE_TEXT",96:"PLUS",97:"EQUALS",98:"MULT",99:"TAG_START",100:"TAG_END",101:"QUOTE"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,4],[4,4],[4,4],[4,4],[4,4],[19,2],[19,1],[20,1],[20,1],[20,1],[14,1],[14,1],[14,2],[22,2],[22,2],[22,1],[22,1],[21,2],[21,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,5],[7,4],[24,1],[24,1],[24,1],[23,3],[23,1],[33,4],[33,5],[33,6],[33,7],[33,4],[33,5],[33,4],[33,5],[33,4],[33,5],[33,4],[33,5],[33,1],[33,2],[35,1],[35,2],[44,1],[44,1],[44,1],[44,1],[34,2],[34,3],[34,3],[34,1],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[47,1],[47,1],[47,1],[47,1],[47,1],[47,1],[47,1],[47,1],[47,1],[47,1],[47,1],[47,1],[48,3],[31,1],[31,2],[31,1],[68,1],[68,2],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[76,1],[76,2],[27,5],[27,5],[28,5],[29,5],[29,7],[29,5],[29,7],[25,5],[25,5],[26,5],[26,5],[26,9],[26,9],[26,7],[26,7],[83,3],[79,1],[79,3],[85,1],[85,2],[87,1],[87,1],[87,1],[87,1],[87,1],[87,1],[87,1],[87,1],[87,1],[87,1],[87,1],[69,1],[69,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[77,1],[77,1],[77,1],[77,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[93,1],[93,1],[93,1],[93,1],[93,1],[93,1],[93,1],[93,1],[93,1],[93,1],[93,1],[93,1],[93,1],[93,1],[93,1]],performAction:function(t,e,r,n,i,a){var o=a.length-1;switch(i){case 2:this.$=[];break;case 3:a[o]!==[]&&a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 57:case 59:case 60:case 92:case 94:case 95:case 108:this.$=a[o];break;case 11:n.setDirection(a[o-1]),this.$=a[o-1];break;case 12:n.setDirection("LR"),this.$=a[o-1];break;case 13:n.setDirection("RL"),this.$=a[o-1];break;case 14:n.setDirection("BT"),this.$=a[o-1];break;case 15:n.setDirection("TB"),this.$=a[o-1];break;case 30:this.$=a[o-1];break;case 31:case 32:case 33:case 34:case 35:this.$=[];break;case 36:this.$=n.addSubGraph(a[o-1],a[o-3]);break;case 37:this.$=n.addSubGraph(a[o-1],void 0);break;case 41:n.addLink(a[o-2],a[o],a[o-1]),this.$=[a[o-2],a[o]];break;case 42:this.$=[a[o]];break;case 43:this.$=a[o-3],n.addVertex(a[o-3],a[o-1],"square");break;case 44:this.$=a[o-4],n.addVertex(a[o-4],a[o-2],"square");break;case 45:this.$=a[o-5],n.addVertex(a[o-5],a[o-2],"circle");break;case 46:this.$=a[o-6],n.addVertex(a[o-6],a[o-3],"circle");break;case 47:this.$=a[o-3],n.addVertex(a[o-3],a[o-1],"ellipse");break;case 48:this.$=a[o-4],n.addVertex(a[o-4],a[o-2],"ellipse");break;case 49:this.$=a[o-3],n.addVertex(a[o-3],a[o-1],"round");break;case 50:this.$=a[o-4],n.addVertex(a[o-4],a[o-2],"round");break;case 51:this.$=a[o-3],n.addVertex(a[o-3],a[o-1],"diamond");break;case 52:this.$=a[o-4],n.addVertex(a[o-4],a[o-2],"diamond");break;case 53:this.$=a[o-3],n.addVertex(a[o-3],a[o-1],"odd");break;case 54:this.$=a[o-4],n.addVertex(a[o-4],a[o-2],"odd");break;case 55:this.$=a[o],n.addVertex(a[o]);break;case 56:this.$=a[o-1],n.addVertex(a[o-1]);break;case 58:case 93:case 96:case 109:this.$=a[o-1]+""+a[o];break;case 61:this.$="v";break;case 62:this.$="-";break;case 63:a[o-1].text=a[o],this.$=a[o-1];break;case 64:case 65:a[o-2].text=a[o-1],this.$=a[o-2];break;case 66:this.$=a[o];break;case 67:this.$={type:"arrow",stroke:"normal",text:a[o-1]};break;case 68:this.$={type:"arrow_circle",stroke:"normal",text:a[o-1]};break;case 69:this.$={type:"arrow_cross",stroke:"normal",text:a[o-1]};break;case 70:this.$={type:"arrow_open",stroke:"normal",text:a[o-1]};break;case 71:this.$={type:"arrow",stroke:"dotted",text:a[o-1]};break;case 72:this.$={type:"arrow_circle",stroke:"dotted",text:a[o-1]};break;case 73:this.$={type:"arrow_cross",stroke:"dotted",text:a[o-1]};break;case 74:this.$={type:"arrow_open",stroke:"dotted",text:a[o-1]};break;case 75:this.$={type:"arrow",stroke:"thick",text:a[o-1]};break;case 76:this.$={type:"arrow_circle",stroke:"thick",text:a[o-1]};break;case 77:this.$={type:"arrow_cross",stroke:"thick",text:a[o-1]};break;case 78:this.$={type:"arrow_open",stroke:"thick",text:a[o-1]};break;case 79:this.$={type:"arrow",stroke:"normal"};break;case 80:this.$={type:"arrow_circle",stroke:"normal"};break;case 81:this.$={type:"arrow_cross",stroke:"normal"};break;case 82:this.$={type:"arrow_open",stroke:"normal"};break;case 83:this.$={type:"arrow",stroke:"dotted"};break;case 84:this.$={type:"arrow_circle",stroke:"dotted"};break;case 85:this.$={type:"arrow_cross",stroke:"dotted"};break;case 86:this.$={type:"arrow_open",stroke:"dotted"};break;case 87:this.$={type:"arrow",stroke:"thick"};break;case 88:this.$={type:"arrow_circle",stroke:"thick"};break;case 89:this.$={type:"arrow_cross",stroke:"thick"};break;case 90:this.$={type:"arrow_open",stroke:"thick"};break;case 91:this.$=a[o-1];break;case 110:case 111:this.$=a[o-4],n.addClass(a[o-2],a[o]);break;case 112:this.$=a[o-4],n.setClass(a[o-2],a[o]);break;case 113:this.$=a[o-4],n.setClickEvent(a[o-2],a[o],void 0,void 0);break;case 114:this.$=a[o-6],n.setClickEvent(a[o-4],a[o-2],void 0,a[o]);break;case 115:this.$=a[o-4],n.setClickEvent(a[o-2],void 0,a[o],void 0);break;case 116:this.$=a[o-6],n.setClickEvent(a[o-4],void 0,a[o-2],a[o]);break;case 117:this.$=a[o-4],n.addVertex(a[o-2],void 0,void 0,a[o]);break;case 118:case 119:case 120:this.$=a[o-4],n.updateLink(a[o-2],a[o]);break;case 121:case 122:this.$=a[o-8],n.updateLinkInterpolate(a[o-6],a[o-2]),n.updateLink(a[o-6],a[o]);break;case 123:case 124:this.$=a[o-6],n.updateLinkInterpolate(a[o-4],a[o]);break;case 126:this.$=[a[o]];break;case 127:a[o-2].push(a[o]),this.$=a[o-2];break;case 129:this.$=a[o-1]+a[o]}},table:[{3:1,4:2,9:r,10:n,12:i},{1:[3]},e(a,o,{5:6}),{4:7,9:r,10:n,12:i},{4:8,9:r,10:n,12:i},{10:[1,9]},{1:[2,1],6:10,7:11,8:s,9:u,10:c,11:l,13:h,18:f,23:16,25:17,26:18,27:19,28:20,29:21,30:d,33:23,35:29,44:30,45:32,46:p,71:g,72:y,73:m,74:v,75:_,81:b,86:w,88:A,89:x,91:k,92:E,94:D,95:C,96:S,97:T,98:F},e(a,[2,9]),e(a,[2,10]),{13:[1,46],15:[1,47],16:[1,48],17:[1,49],18:[1,50]},e(B,[2,3]),e(B,[2,4]),e(B,[2,5]),e(B,[2,6]),e(B,[2,7]),e(B,[2,8]),{8:L,9:O,11:I,24:51},{8:L,9:O,11:I,24:55},{8:L,9:O,11:I,24:56},{8:L,9:O,11:I,24:57},{8:L,9:O,11:I,24:58},{8:L,9:O,11:I,24:59},{8:L,9:O,10:R,11:I,12:M,13:N,15:P,16:j,17:q,18:U,24:61,30:Y,31:60,32:$,45:71,46:V,50:G,60:W,66:62,67:H,70:74,71:z,72:Z,73:X,74:K,75:J,77:64,78:Q,81:b,84:tt,86:w,88:A,89:x,91:k,92:E,94:D,95:C,96:S,97:T,98:F},e(et,[2,42],{34:86,47:87,50:[1,88],51:[1,91],52:[1,92],53:[1,93],54:[1,94],55:[1,89],56:[1,95],57:[1,96],58:[1,97],59:[1,98],60:[1,90],61:[1,99],62:[1,100],63:[1,101],64:[1,102]}),{10:[1,103]},{10:[1,104]},{10:[1,105]},{10:[1,106]},{10:[1,107]},e(rt,[2,55],{45:32,21:113,44:114,10:nt,13:h,15:[1,112],18:f,36:[1,108],38:[1,109],40:[1,110],42:[1,111],46:p,81:b,86:w,88:A,89:x,91:k,92:E,94:D,95:C,96:S,97:T,98:F}),e(it,[2,57]),e(it,[2,59]),e(it,[2,60]),e(it,[2,61]),e(it,[2,62]),e(at,[2,154]),e(at,[2,155]),e(at,[2,156]),e(at,[2,157]),e(at,[2,158]),e(at,[2,159]),e(at,[2,160]),e(at,[2,161]),e(at,[2,162]),e(at,[2,163]),e(at,[2,164]),{8:ot,9:st,10:nt,14:116,21:119},{8:ot,9:st,10:nt,14:120,21:119},{8:ot,9:st,10:nt,14:121,21:119},{8:ot,9:st,10:nt,14:122,21:119},{8:ot,9:st,10:nt,14:123,21:119},e(B,[2,30]),e(B,[2,38]),e(B,[2,39]),e(B,[2,40]),e(B,[2,31]),e(B,[2,32]),e(B,[2,33]),e(B,[2,34]),e(B,[2,35]),{8:L,9:O,10:R,11:I,12:M,13:N,15:P,16:j,17:q,18:U,24:124,30:Y,32:$,45:71,46:V,50:G,60:W,66:125,70:74,71:z,72:Z,73:X,74:K,75:J,77:64,78:Q,81:b,84:tt,86:w,88:A,89:x,91:k,92:E,94:D,95:C,96:S,97:T,98:F},e(ut,o,{5:126}),e(ct,[2,92]),e(ct,[2,94]),e(ct,[2,143]),e(ct,[2,144]),e(ct,[2,145]),e(ct,[2,146]),e(ct,[2,147]),e(ct,[2,148]),e(ct,[2,149]),e(ct,[2,150]),e(ct,[2,151]),e(ct,[2,152]),e(ct,[2,153]),e(ct,[2,97]),e(ct,[2,98]),e(ct,[2,99]),e(ct,[2,100]),e(ct,[2,101]),e(ct,[2,102]),e(ct,[2,103]),e(ct,[2,104]),e(ct,[2,105]),e(ct,[2,106]),e(ct,[2,107]),{13:h,18:f,33:127,35:29,44:30,45:32,46:p,81:b,86:w,88:A,89:x,91:k,92:E,94:D,95:C,96:S,97:T,98:F},e(lt,[2,66],{48:128,49:[1,129],65:[1,130]}),{10:R,12:M,13:N,15:P,16:j,17:q,18:U,30:Y,31:131,32:$,45:71,46:V,50:G,60:W,66:62,67:H,70:74,71:z,72:Z,73:X,74:K,75:J,77:64,78:Q,81:b,84:tt,86:w,88:A,89:x,91:k,92:E,94:D,95:C,96:S,97:T,98:F},{10:R,12:M,13:N,15:P,16:j,17:q,18:U,30:Y,31:132,32:$,45:71,46:V,50:G,60:W,66:62,67:H,70:74,71:z,72:Z,73:X,74:K,75:J,77:64,78:Q,81:b,84:tt,86:w,88:A,89:x,91:k,92:E,94:D,95:C,96:S,97:T,98:F},{10:R,12:M,13:N,15:P,16:j,17:q,18:U,30:Y,31:133,32:$,45:71,46:V,50:G,60:W,66:62,67:H,70:74,71:z,72:Z,73:X,74:K,75:J,77:64,78:Q,81:b,84:tt,86:w,88:A,89:x,91:k,92:E,94:D,95:C,96:S,97:T,98:F},e(ht,[2,79]),e(ht,[2,80]),e(ht,[2,81]),e(ht,[2,82]),e(ht,[2,83]),e(ht,[2,84]),e(ht,[2,85]),e(ht,[2,86]),e(ht,[2,87]),e(ht,[2,88]),e(ht,[2,89]),e(ht,[2,90]),{13:h,18:f,35:134,44:30,45:32,46:p,80:[1,135],81:b,86:w,88:A,89:x,91:k,92:E,94:D,95:C,96:S,97:T,98:F},{78:[1,136],81:[1,137]},{13:h,18:f,35:139,44:30,45:32,46:p,78:[1,138],81:b,86:w,88:A,89:x,91:k,92:E,94:D,95:C,96:S,97:T,98:F},{13:h,18:f,35:140,44:30,45:32,46:p,81:b,86:w,88:A,89:x,91:k,92:E,94:D,95:C,96:S,97:T,98:F},{13:h,18:f,35:141,44:30,45:32,46:p,81:b,86:w,88:A,89:x,91:k,92:E,94:D,95:C,96:S,97:T,98:F},{10:R,12:M,13:N,15:P,16:j,17:q,18:U,30:Y,31:142,32:$,45:71,46:V,50:G,60:W,66:62,67:H,70:74,71:z,72:Z,73:X,74:K,75:J,77:64,78:Q,81:b,84:tt,86:w,88:A,89:x,91:k,92:E,94:D,95:C,96:S,97:T,98:F},{10:R,12:M,13:N,15:P,16:j,17:q,18:U,30:Y,31:144,32:$,38:[1,143],45:71,46:V,50:G,60:W,66:62,67:H,70:74,71:z,72:Z,73:X,74:K,75:J,77:64,78:Q,81:b,84:tt,86:w,88:A,89:x,91:k,92:E,94:D,95:C,96:S,97:T,98:F},{10:R,12:M,13:N,15:P,16:j,17:q,18:U,30:Y,31:145,32:$,45:71,46:V,50:G,60:W,66:62,67:H,70:74,71:z,72:Z,73:X,74:K,75:J,77:64,78:Q,81:b,84:tt,86:w,88:A,89:x,91:k,92:E,94:D,95:C,96:S,97:T,98:F},{10:R,12:M,13:N,15:P,16:j,17:q,18:U,30:Y,31:146,32:$,45:71,46:V,50:G,60:W,66:62,67:H,70:74,71:z,72:Z,73:X,74:K,75:J,77:64,78:Q,81:b,84:tt,86:w,88:A,89:x,91:k,92:E,94:D,95:C,96:S,97:T,98:F},{10:R,12:M,13:N,15:P,16:j,17:q,18:U,30:Y,31:147,32:$,45:71,46:V,50:G,60:W,66:62,67:H,70:74,71:z,72:Z,73:X,74:K,75:J,77:64,78:Q,81:b,84:tt,86:w,88:A,89:x,91:k,92:E,94:D,95:C,96:S,97:T,98:F},e(rt,[2,56]),e(it,[2,58]),e(rt,[2,29],{21:148,10:nt}),e(a,[2,11]),e(a,[2,21]),e(a,[2,22]),{9:[1,149]},e(a,[2,12]),e(a,[2,13]),e(a,[2,14]),e(a,[2,15]),e(ut,o,{5:150}),e(ct,[2,93]),{6:10,7:11,8:s,9:u,10:c,11:l,13:h,18:f,23:16,25:17,26:18,27:19,28:20,29:21,30:d,32:[1,151],33:23,35:29,44:30,45:32,46:p,71:g,72:y,73:m,74:v,75:_,81:b,86:w,88:A,89:x,91:k,92:E,94:D,95:C,96:S,97:T,98:F},e(et,[2,41]),e(lt,[2,63],{10:[1,152]}),{10:[1,153]},{10:R,12:M,13:N,15:P,16:j,17:q,18:U,30:Y,31:154,32:$,45:71,46:V,50:G,60:W,66:62,67:H,70:74,71:z,72:Z,73:X,74:K,75:J,77:64,78:Q,81:b,84:tt,86:w,88:A,89:x,91:k,92:E,94:D,95:C,96:S,97:T,98:F},{10:R,12:M,13:N,15:P,16:j,17:q,18:U,30:Y,32:$,45:71,46:V,50:G,51:[1,155],52:[1,156],53:[1,157],54:[1,158],60:W,66:125,70:74,71:z,72:Z,73:X,74:K,75:J,77:64,78:Q,81:b,84:tt,86:w,88:A,89:x,91:k,92:E,94:D,95:C,96:S,97:T,98:F},{10:R,12:M,13:N,15:P,16:j,17:q,18:U,30:Y,32:$,45:71,46:V,50:G,56:[1,159],57:[1,160],58:[1,161],59:[1,162],60:W,66:125,70:74,71:z,72:Z,73:X,74:K,75:J,77:64,78:Q,81:b,84:tt,86:w,88:A,89:x,91:k,92:E,94:D,95:C,96:S,97:T,98:F},{10:R,12:M,13:N,15:P,16:j,17:q,18:U,30:Y,32:$,45:71,46:V,50:G,60:W,61:[1,163],62:[1,164],63:[1,165],64:[1,166],66:125,70:74,71:z,72:Z,73:X,74:K,75:J,77:64,78:Q,81:b,84:tt,86:w,88:A,89:x,91:k,92:E,94:D,95:C,96:S,97:T,98:F},{10:[1,167],13:h,18:f,44:114,45:32,46:p,81:b,86:w,88:A,89:x,91:k,92:E,94:D,95:C,96:S,97:T,98:F},{10:[1,168]},{10:[1,169]},{10:[1,170]},{10:[1,171]},{10:[1,172],13:h,18:f,44:114,45:32,46:p,81:b,86:w,88:A,89:x,91:k,92:E,94:D,95:C,96:S,97:T,98:F},{10:[1,173],13:h,18:f,44:114,45:32,46:p,81:b,86:w,88:A,89:x,91:k,92:E,94:D,95:C,96:S,97:T,98:F},{10:[1,174],13:h,18:f,44:114,45:32,46:p,81:b,86:w,88:A,89:x,91:k,92:E,94:D,95:C,96:S,97:T,98:F},{10:R,12:M,13:N,15:P,16:j,17:q,18:U,30:Y,32:$,37:[1,175],45:71,46:V,50:G,60:W,66:125,70:74,71:z,72:Z,73:X,74:K,75:J,77:64,78:Q,81:b,84:tt,86:w,88:A,89:x,91:k,92:E,94:D,95:C,96:S,97:T,98:F},{10:R,12:M,13:N,15:P,16:j,17:q,18:U,30:Y,31:176,32:$,45:71,46:V,50:G,60:W,66:62,67:H,70:74,71:z,72:Z,73:X,74:K,75:J,77:64,78:Q,81:b,84:tt,86:w,88:A,89:x,91:k,92:E,94:D,95:C,96:S,97:T,98:F},{10:R,12:M,13:N,15:P,16:j,17:q,18:U,30:Y,32:$,39:[1,177],45:71,46:V,50:G,60:W,66:125,70:74,71:z,72:Z,73:X,74:K,75:J,77:64,78:Q,81:b,84:tt,86:w,88:A,89:x,91:k,92:E,94:D,95:C,96:S,97:T,98:F},{10:R,12:M,13:N,15:P,16:j,17:q,18:U,30:Y,32:$,41:[1,178],45:71,46:V,50:G,60:W,66:125,70:74,71:z,72:Z,73:X,74:K,75:J,77:64,78:Q,81:b,84:tt,86:w,88:A,89:x,91:k,92:E,94:D,95:C,96:S,97:T,98:F},{10:R,12:M,13:N,15:P,16:j,17:q,18:U,30:Y,32:$,43:[1,179],45:71,46:V,50:G,60:W,66:125,70:74,71:z,72:Z,73:X,74:K,75:J,77:64,78:Q,81:b,84:tt,86:w,88:A,89:x,91:k,92:E,94:D,95:C,96:S,97:T,98:F},{10:R,12:M,13:N,15:P,16:j,17:q,18:U,30:Y,32:$,37:[1,180],45:71,46:V,50:G,60:W,66:125,70:74,71:z,72:Z,73:X,74:K,75:J,77:64,78:Q,81:b,84:tt,86:w,88:A,89:x,91:k,92:E,94:D,95:C,96:S,97:T,98:F},e(rt,[2,28]),e(a,[2,23]),{6:10,7:11,8:s,9:u,10:c,11:l,13:h,18:f,23:16,25:17,26:18,27:19,28:20,29:21,30:d,32:[1,181],33:23,35:29,44:30,45:32,46:p,71:g,72:y,73:m,74:v,75:_,81:b,86:w,88:A,89:x,91:k,92:E,94:D,95:C,96:S,97:T,98:F},e(B,[2,37]),e(lt,[2,65]),e(lt,[2,64]),{10:R,12:M,13:N,15:P,16:j,17:q,18:U,30:Y,32:$,45:71,46:V,50:G,60:W,65:[1,182],66:125,70:74,71:z,72:Z,73:X,74:K,75:J,77:64,78:Q,81:b,84:tt,86:w,88:A,89:x,91:k,92:E,94:D,95:C,96:S,97:T,98:F},e(lt,[2,67]),e(lt,[2,68]),e(lt,[2,69]),e(lt,[2,70]),e(lt,[2,71]),e(lt,[2,72]),e(lt,[2,73]),e(lt,[2,74]),e(lt,[2,75]),e(lt,[2,76]),e(lt,[2,77]),e(lt,[2,78]),{10:ft,46:dt,71:pt,79:183,80:gt,81:yt,84:mt,85:184,87:185,88:vt,89:_t,90:bt,91:wt,92:At},{10:ft,46:dt,71:pt,79:197,80:gt,81:yt,84:mt,85:184,87:185,88:vt,89:_t,90:bt,91:wt,92:At},{10:ft,46:dt,71:pt,79:198,80:gt,81:yt,82:[1,199],84:mt,85:184,87:185,88:vt,89:_t,90:bt,91:wt,92:At},{10:ft,46:dt,71:pt,79:200,80:gt,81:yt,82:[1,201],84:mt,85:184,87:185,88:vt,89:_t,90:bt,91:wt,92:At},{10:ft,46:dt,71:pt,79:202,80:gt,81:yt,84:mt,85:184,87:185,88:vt,89:_t,90:bt,91:wt,92:At},{10:ft,46:dt,71:pt,79:203,80:gt,81:yt,84:mt,85:184,87:185,88:vt,89:_t,90:bt,91:wt,92:At},{13:h,18:f,35:204,44:30,45:32,46:p,81:b,86:w,88:A,89:x,91:k,92:E,94:D,95:C,96:S,97:T,98:F},{13:h,18:f,35:205,44:30,45:32,46:p,67:[1,206],81:b,86:w,88:A,89:x,91:k,92:E,94:D,95:C,96:S,97:T,98:F},e(rt,[2,43],{21:207,10:nt}),{10:R,12:M,13:N,15:P,16:j,17:q,18:U,30:Y,32:$,39:[1,208],45:71,46:V,50:G,60:W,66:125,70:74,71:z,72:Z,73:X,74:K,75:J,77:64,78:Q,81:b,84:tt,86:w,88:A,89:x,91:k,92:E,94:D,95:C,96:S,97:T,98:F},e(rt,[2,49],{21:209,10:nt}),e(rt,[2,47],{21:210,10:nt}),e(rt,[2,51],{21:211,10:nt}),e(rt,[2,53],{21:212,10:nt}),e(B,[2,36]),e([10,13,18,46,81,86,88,89,91,92,94,95,96,97,98],[2,91]),e(et,[2,117],{86:xt}),e(kt,[2,126],{87:214,10:ft,46:dt,71:pt,80:gt,81:yt,84:mt,88:vt,89:_t,90:bt,91:wt,92:At}),e(Et,[2,128]),e(Et,[2,130]),e(Et,[2,131]),e(Et,[2,132]),e(Et,[2,133]),e(Et,[2,134]),e(Et,[2,135]),e(Et,[2,136]),e(Et,[2,137]),e(Et,[2,138]),e(Et,[2,139]),e(Et,[2,140]),e(et,[2,118],{86:xt}),e(et,[2,119],{86:xt}),{10:[1,215]},e(et,[2,120],{86:xt}),{10:[1,216]},e(et,[2,110],{86:xt}),e(et,[2,111],{86:xt}),e(et,[2,112],{45:32,44:114,13:h,18:f,46:p,81:b,86:w,88:A,89:x,91:k,92:E,94:D,95:C,96:S,97:T,98:F}),e(et,[2,113],{45:32,44:114,10:[1,217],13:h,18:f,46:p,81:b,86:w,88:A,89:x,91:k,92:E,94:D,95:C,96:S,97:T,98:F}),e(et,[2,115],{10:[1,218]}),e(rt,[2,44]),{39:[1,219]},e(rt,[2,50]),e(rt,[2,48]),e(rt,[2,52]),e(rt,[2,54]),{10:ft,46:dt,71:pt,80:gt,81:yt,84:mt,85:220,87:185,88:vt,89:_t,90:bt,91:wt,92:At},e(Et,[2,129]),{13:h,18:f,35:221,44:30,45:32,46:p,81:b,86:w,88:A,89:x,91:k,92:E,94:D,95:C,96:S,97:T,98:F},{13:h,18:f,35:222,44:30,45:32,46:p,81:b,86:w,88:A,89:x,91:k,92:E,94:D,95:C,96:S,97:T,98:F},{67:[1,223]},{67:[1,224]},e(rt,[2,45],{21:225,10:nt}),e(kt,[2,127],{87:214,10:ft,46:dt,71:pt,80:gt,81:yt,84:mt,88:vt,89:_t,90:bt,91:wt,92:At}),e(et,[2,123],{45:32,44:114,10:[1,226],13:h,18:f,46:p,81:b,86:w,88:A,89:x,91:k,92:E,94:D,95:C,96:S,97:T,98:F}),e(et,[2,124],{45:32,44:114,10:[1,227],13:h,18:f,46:p,81:b,86:w,88:A,89:x,91:k,92:E,94:D,95:C,96:S,97:T,98:F}),e(et,[2,114]),e(et,[2,116]),e(rt,[2,46]),{10:ft,46:dt,71:pt,79:228,80:gt,81:yt,84:mt,85:184,87:185,88:vt,89:_t,90:bt,91:wt,92:At},{10:ft,46:dt,71:pt,79:229,80:gt,81:yt,84:mt,85:184,87:185,88:vt,89:_t,90:bt,91:wt,92:At},e(et,[2,121],{86:xt}),e(et,[2,122],{86:xt})],defaultActions:{},parseError:function(t,e){if(!e.recoverable){var r=function(t,e){this.message=t,this.hash=e};throw r.prototype=Error,new r(t,e)}this.trace(t)},parse:function(t){var e=this,r=[0],n=[null],i=[],a=this.table,o="",s=0,u=0,c=0,l=2,h=1,f=i.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,"undefined"==typeof d.yylloc&&(d.yylloc={});var y=d.yylloc;i.push(y);var m=d.options&&d.options.ranges;this.parseError="function"==typeof p.yy.parseError?p.yy.parseError:Object.getPrototypeOf(this).parseError;for(var v,_,b,w,A,x,k,E,D,C=function(){var t;return t=d.lex()||h,"number"!=typeof t&&(t=e.symbols_[t]||t),t},S={};;){if(b=r[r.length-1],this.defaultActions[b]?w=this.defaultActions[b]:((null===v||"undefined"==typeof v)&&(v=C()),w=a[b]&&a[b][v]),"undefined"==typeof w||!w.length||!w[0]){var T="";D=[];for(x in a[b])this.terminals_[x]&&x>l&&D.push("'"+this.terminals_[x]+"'");T=d.showPosition?"Parse error on line "+(s+1)+":\n"+d.showPosition()+"\nExpecting "+D.join(", ")+", got '"+(this.terminals_[v]||v)+"'":"Parse error on line "+(s+1)+": Unexpected "+(v==h?"end of input":"'"+(this.terminals_[v]||v)+"'"),this.parseError(T,{text:d.match,token:this.terminals_[v]||v,line:d.yylineno,loc:y,expected:D})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+v);switch(w[0]){case 1:r.push(v),n.push(d.yytext),i.push(d.yylloc),r.push(w[1]),v=null,_?(v=_,_=null):(u=d.yyleng,o=d.yytext,s=d.yylineno,y=d.yylloc,c>0&&c--);break;case 2:if(k=this.productions_[w[1]][1],S.$=n[n.length-k],S._$={first_line:i[i.length-(k||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(k||1)].first_column,last_column:i[i.length-1].last_column},m&&(S._$.range=[i[i.length-(k||1)].range[0],i[i.length-1].range[1]]),A=this.performAction.apply(S,[o,u,s,p.yy,w[1],n,i].concat(f)),"undefined"!=typeof A)return A;k&&(r=r.slice(0,-1*k*2),n=n.slice(0,-1*k),i=i.slice(0,-1*k)),r.push(this.productions_[w[1]][0]),n.push(S.$),i.push(S._$),E=a[r[r.length-2]][r[r.length-1]],r.push(E);break;case 3:return!0}}return!0}},Ct=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(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,r=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 n=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),r.length-1&&(this.yylineno-=r.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:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[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 r,n,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))),n=t[0].match(/(?:\r\n?|\n).*/g),n&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.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],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,e,r,n;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if(r=this._input.match(this.rules[i[a]]),r&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(t=this.test_match(r,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[n]),t!==!1?t:!1):""===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?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>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),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,r,n){switch(r){case 0:break;case 1:this.begin("string");break;case 2:this.popState();break;case 3:return"STR";case 4:return 71;case 5:return 78;case 6:return 72;case 7:return 82;case 8:return 73;case 9:return 74;case 10:return 75;case 11:return 12;case 12:return 30;case 13:return 32;case 14:return 13;case 15:return 13;case 16:return 13;case 17:return 13;case 18:return 13;case 19:return 13;case 20:return 81;case 21:return 91;case 22:return 89;case 23:return 8;case 24:return 86;case 25:return 98;case 26:return 16;case 27:return 15;case 28:return 17;case 29:return 18;case 30:return 53;case 31:return 51;case 32:return 52;case 33:return 54;case 34:return 58;case 35:return 56;case 36:return 57;case 37:return 59;case 38:return 58;case 39:return 56;case 40:return 57;case 41:return 59;case 42:return 63;case 43:return 61;case 44:return 62;case 45:return 64;case 46:return 50;case 47:return 55;case 48:return 60;case 49:return 40;case 50:return 41;case 51:return 46;case 52:return 92;case 53:return 96;case 54:return 84;case 55:return 97;case 56:return 97;case 57:return 88;case 58:return 94;case 59:return 95;case 60:return 65;case 61:return 38;case 62:return 39;case 63:return 36;case 64:return 37;case 65:return 42;case 66:return 43;case 67:return 101;case 68:return 9;case 69:return 10;case 70:return 11}},rules:[/^(?:%%[^\n]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:click\b)/,/^(?:graph\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:LR\b)/,/^(?:RL\b)/,/^(?:TB\b)/,/^(?:BT\b)/,/^(?:TD\b)/,/^(?:BR\b)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?: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}}};return t}();return Dt.lexer=Ct,t.prototype=Dt,Dt.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof r&&(r.parser=i,r.Parser=i.Parser,r.parse=function(){return i.parse.apply(i,arguments)},r.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),n.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return r.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&r.main(n.argv.slice(1)))}).call(this,t("_process"))},{_process:106,fs:1,path:105}],120:[function(t,e,r){(function(e){"use strict";var n=t("moment"),i=t("../../logger"),a=new i.Log,o="",s="",u=[],c=[],l="";r.clear=function(){u=[],c=[],l="",s="",g=0,h=void 0,f=void 0,_=[]},r.setDateFormat=function(t){o=t},r.getDateFormat=function(){return o},r.setTitle=function(t){s=t},r.getTitle=function(){return s},r.addSection=function(t){l=t,u.push(t)},r.getTasks=function(){for(var t=w(),e=10,r=0;!t&&e>r;)t=w(),r++;return c=_};var h,f,d=function(t,e,i){i=i.trim();var o=/^after\s+([\d\w\-]+)/,s=o.exec(i.trim());if(null!==s){var u=r.findTaskById(s[1]);if("undefined"==typeof u){var c=new Date;return c.setHours(0,0,0,0),c}return u.endTime}return n(i,e.trim(),!0).isValid()?n(i,e.trim(),!0).toDate():(a.debug("Invalid date:"+i),a.debug("With date format:"+e.trim()),new Date)},p=function(t,e,r){if(r=r.trim(),n(r,e.trim(),!0).isValid())return n(r,e.trim()).toDate();var i=n(t),a=/^([\d]+)([wdhms])/,o=a.exec(r.trim());if(null!==o){switch(o[2]){case"s":i.add(o[1],"seconds");break;case"m":i.add(o[1],"minutes");break;case"h":i.add(o[1],"hours");break;case"d":i.add(o[1],"days");break;case"w":i.add(o[1],"weeks")}return i.toDate()}return i.toDate()},g=0,y=function(t){return"undefined"==typeof t?(g+=1,"task"+g):t},m=function(t,e){var n;n=":"===e.substr(0,1)?e.substr(1,e.length):e;for(var i=n.split(","),a={},o=r.getDateFormat(),s=!0;s;)s=!1,i[0].match(/^\s*active\s*$/)&&(a.active=!0,i.shift(1),s=!0),i[0].match(/^\s*done\s*$/)&&(a.done=!0,i.shift(1),s=!0),i[0].match(/^\s*crit\s*$/)&&(a.crit=!0,i.shift(1),s=!0);var u;for(u=0;u<i.length;u++)i[u]=i[u].trim();switch(i.length){case 1:a.id=y(),a.startTime=t.endTime,a.endTime=p(a.startTime,o,i[0]);break;case 2:a.id=y(),a.startTime=d(void 0,o,i[0]),a.endTime=p(a.startTime,o,i[1]);break;case 3:a.id=y(i[0]),a.startTime=d(void 0,o,i[1]),a.endTime=p(a.startTime,o,i[2])}return a},v=function(t,e){var r;r=":"===e.substr(0,1)?e.substr(1,e.length):e;for(var n=r.split(","),i={},a=!0;a;)a=!1,n[0].match(/^\s*active\s*$/)&&(i.active=!0,n.shift(1),a=!0),n[0].match(/^\s*done\s*$/)&&(i.done=!0,n.shift(1),a=!0),n[0].match(/^\s*crit\s*$/)&&(i.crit=!0,n.shift(1),a=!0);var o;for(o=0;o<n.length;o++)n[o]=n[o].trim();switch(n.length){case 1:i.id=y(),i.startTime={type:"prevTaskEnd",id:t},i.endTime={data:n[0]};break;case 2:i.id=y(),i.startTime={type:"getStartDate",startData:n[0]},i.endTime={data:n[1]};break;case 3:i.id=y(n[0]),i.startTime={type:"getStartDate",startData:n[1]},i.endTime={data:n[2]}}return i},_=[],b={};r.addTask=function(t,e){var r={section:l,type:l,processed:!1,raw:{data:e},task:t},n=v(f,e);r.raw.startTime=n.startTime,r.raw.endTime=n.endTime,r.id=n.id,r.prevTaskId=f,r.active=n.active,r.done=n.done,r.crit=n.crit;var i=_.push(r);f=r.id,b[r.id]=i-1},r.findTaskById=function(t){var e=b[t];return _[e]},r.addTaskOrg=function(t,e){var r={section:l,type:l,description:t,task:t},n=m(h,e);r.startTime=n.startTime,r.endTime=n.endTime,r.id=n.id,r.active=n.active,r.done=n.done,r.crit=n.crit,h=r,c.push(r)};var w=function(){var t,e=r.getDateFormat(),n=function(t){var n=_[t],i="";switch(_[t].raw.startTime.type){case"prevTaskEnd":var a=r.findTaskById(n.prevTaskId);n.startTime=a.endTime;break;case"getStartDate":i=d(void 0,e,_[t].raw.startTime.startData),i&&(_[t].startTime=i)}return _[t].startTime&&(_[t].endTime=p(_[t].startTime,e,_[t].raw.endTime.data),_[t].endTime&&(_[t].processed=!0)),_[t].processed},i=!0;for(t=0;t<_.length;t++)n(t),i=i&&_[t].processed;return i};r.parseError=function(t,r){e.mermaidAPI.parseError(t,r)}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../../logger":130,moment:104}],121:[function(t,e){"use strict";var r=t("./parser/gantt").parser;r.yy=t("./ganttDb");var n,i=t("../../d3"),a=t("moment"),o={titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"'};e.exports.setConf=function(t){var e=Object.keys(t);e.forEach(function(e){o[e]=t[e]})};var s;e.exports.draw=function(t,e){function u(t,e,r){var n=o.barHeight,a=n+o.barGap,s=o.topPadding,u=o.leftPadding,d=i.scale.linear().domain([0,x.length]).range(["#00B9FA","#F95002"]).interpolate(i.interpolateHcl);l(u,s,e,r),c(t,a,s,u,n,d,e,r),h(a,s,u,n,d),f(u,s,e,r)}function c(t,e,r,n,i,a,s){_.append("g").selectAll("rect").data(t).enter().append("rect").attr("x",0).attr("y",function(t,n){return n*e+r-2}).attr("width",function(){return s-o.rightPadding/2}).attr("height",e).attr("class",function(t){for(var e=0;e<x.length;e++)if(t.type===x[e])return"section section"+e%o.numberSectionStyles;return"section section0"});var u=_.append("g").selectAll("rect").data(t).enter();u.append("rect").attr("rx",3).attr("ry",3).attr("x",function(t){return A(t.startTime)+n}).attr("y",function(t,n){return n*e+r}).attr("width",function(t){return A(t.endTime)-A(t.startTime)}).attr("height",i).attr("class",function(t){for(var e="task ",r=0,n=0;n<x.length;n++)t.type===x[n]&&(r=n%o.numberSectionStyles);return t.active?t.crit?e+" activeCrit"+r:e+" active"+r:t.done?t.crit?e+" doneCrit"+r:e+" done"+r:t.crit?e+" crit"+r:e+" task"+r}),u.append("text").text(function(t){return t.task}).attr("font-size",o.fontSize).attr("x",function(t){var e=A(t.startTime),r=A(t.endTime),i=this.getBBox().width;return i>r-e?r+i+1.5*o.leftPadding>s?e+n-5:r+n+5:(r-e)/2+e+n}).attr("y",function(t,n){return n*e+o.barHeight/2+(o.fontSize/2-2)+r}).attr("text-height",i).attr("class",function(t){for(var e=A(t.startTime),r=A(t.endTime),n=this.getBBox().width,i=0,a=0;a<x.length;a++)t.type===x[a]&&(i=a%o.numberSectionStyles);var u="";return t.active&&(u=t.crit?"activeCritText"+i:"activeText"+i),t.done?u=t.crit?u+" doneCritText"+i:u+" doneText"+i:t.crit&&(u=u+" critText"+i),n>r-e?r+n+1.5*o.leftPadding>s?"taskTextOutsideLeft taskTextOutside"+i+" "+u:"taskTextOutsideRight taskTextOutside"+i+" "+u:"taskText taskText"+i+" "+u})}function l(t,e,r,a){var s,u=[[".%L",function(t){return t.getMilliseconds()}],[":%S",function(t){return t.getSeconds()}],["h1 %I:%M",function(t){return t.getMinutes()}]],c=[["%Y",function(){return!0}]],l=[["%I:%M",function(t){return t.getHours()}],["%a %d",function(t){return t.getDay()&&1!=t.getDate()}],["%b %d",function(t){return 1!=t.getDate()}],["%B",function(t){return t.getMonth()}]];"undefined"!=typeof o.axisFormatter&&(l=[],o.axisFormatter.forEach(function(t){var e=[];e[0]=t[0],e[1]=t[1],l.push(e)})),s=u.concat(l).concat(c);var h=i.svg.axis().scale(A).orient("bottom").tickSize(-a+e+o.gridLineStartPadding,0,0).tickFormat(i.time.format.multi(s));n>7&&230>n&&(h=h.ticks(i.time.monday.range)),_.append("g").attr("class","grid").attr("transform","translate("+t+", "+(a-50)+")").call(h).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em")}function h(t,e){for(var r=[],n=0,i=0;i<x.length;i++)r[i]=[x[i],g(x[i],E)];_.append("g").selectAll("text").data(r).enter().append("text").text(function(t){return t[0]}).attr("x",10).attr("y",function(i,a){if(!(a>0))return i[1]*t/2+e;for(var o=0;a>o;o++)return n+=r[a-1][1],i[1]*t/2+n*t+e}).attr("class",function(t){for(var e=0;e<x.length;e++)if(t[0]===x[e])return"sectionTitle sectionTitle"+e%o.numberSectionStyles;return"sectionTitle"})}function f(t,e,r,n){var i=_.append("g").attr("class","today"),a=new Date;i.append("line").attr("x1",A(a)+t).attr("x2",A(a)+t).attr("y1",o.titleTopMargin).attr("y2",n-o.titleTopMargin).attr("class","today")}function d(t){for(var e={},r=[],n=0,i=t.length;i>n;++n)e.hasOwnProperty(t[n])||(e[t[n]]=!0,r.push(t[n]));return r}function p(t){for(var e=t.length,r={};e;)r[t[--e]]=(r[t[e]]||0)+1;return r}function g(t,e){return p(e)[t]||0}r.yy.clear(),r.parse(t);var y=document.getElementById(e);s=y.parentElement.offsetWidth,"undefined"==typeof s&&(s=1200),"undefined"!=typeof o.useWidth&&(s=o.useWidth);var m=r.yy.getTasks(),v=m.length*(o.barHeight+o.barGap)+2*o.topPadding;y.setAttribute("height","100%"),y.setAttribute("viewBox","0 0 "+s+" "+v);var _=i.select("#"+e),b=i.min(m,function(t){return t.startTime}),w=i.max(m,function(t){return t.endTime}),A=i.time.scale().domain([i.min(m,function(t){return t.startTime}),i.max(m,function(t){return t.endTime})]).rangeRound([0,s-o.leftPadding-o.rightPadding]),x=[];n=a.duration(w-b).asDays();for(var k=0;k<m.length;k++)x.push(m[k].type);var E=x;x=d(x),u(m,s,v),"undefined"!=typeof o.useWidth&&y.setAttribute("width",s),_.append("text").text(r.yy.getTitle()).attr("x",s/2).attr("y",o.titleTopMargin).attr("class","titleText")}},{"../../d3":108,"./ganttDb":120,"./parser/gantt":122,moment:104}],122:[function(t,e,r){(function(n){"use strict";var i=function(){function t(){this.yy={}}var e=function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},r=[6,8,10,11,12,13,14],n=[1,9],i=[1,10],a=[1,11],o=[1,12],s={trace:function(){},yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,dateFormat:11,title:12,section:13,taskTxt:14,taskData:15,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",11:"dateFormat",12:"title",13:"section",14:"taskTxt",15:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,1],[9,1],[9,2]],performAction:function(t,e,r,n,i,a){var o=a.length-1;switch(i){case 1:return a[o-1];case 2:this.$=[];break;case 3:a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 5:this.$=a[o];break;case 6:case 7:this.$=[];break;case 8:n.setDateFormat(a[o].substr(11)),this.$=a[o].substr(11);break;case 9:n.setTitle(a[o].substr(6)),this.$=a[o].substr(6);break;case 10:n.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 11:n.addTask(a[o-1],a[o]),this.$="task"}},table:[{3:1,4:[1,2]},{1:[3]},e(r,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:n,12:i,13:a,14:o},e(r,[2,7],{1:[2,1]}),e(r,[2,3]),{9:13,11:n,12:i,13:a,14:o},e(r,[2,5]),e(r,[2,6]),e(r,[2,8]),e(r,[2,9]),e(r,[2,10]),{15:[1,14]},e(r,[2,4]),e(r,[2,11])],defaultActions:{},parseError:function(t,e){if(!e.recoverable){var r=function(t,e){this.message=t,this.hash=e};throw r.prototype=Error,new r(t,e)}this.trace(t)},parse:function(t){var e=this,r=[0],n=[null],i=[],a=this.table,o="",s=0,u=0,c=0,l=2,h=1,f=i.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,"undefined"==typeof d.yylloc&&(d.yylloc={});var y=d.yylloc;i.push(y);var m=d.options&&d.options.ranges;this.parseError="function"==typeof p.yy.parseError?p.yy.parseError:Object.getPrototypeOf(this).parseError;for(var v,_,b,w,A,x,k,E,D,C=function(){var t;return t=d.lex()||h,"number"!=typeof t&&(t=e.symbols_[t]||t),t},S={};;){if(b=r[r.length-1],this.defaultActions[b]?w=this.defaultActions[b]:((null===v||"undefined"==typeof v)&&(v=C()),w=a[b]&&a[b][v]),"undefined"==typeof w||!w.length||!w[0]){var T="";D=[];for(x in a[b])this.terminals_[x]&&x>l&&D.push("'"+this.terminals_[x]+"'");T=d.showPosition?"Parse error on line "+(s+1)+":\n"+d.showPosition()+"\nExpecting "+D.join(", ")+", got '"+(this.terminals_[v]||v)+"'":"Parse error on line "+(s+1)+": Unexpected "+(v==h?"end of input":"'"+(this.terminals_[v]||v)+"'"),this.parseError(T,{text:d.match,token:this.terminals_[v]||v,line:d.yylineno,loc:y,expected:D})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+v);switch(w[0]){case 1:r.push(v),n.push(d.yytext),i.push(d.yylloc),r.push(w[1]),v=null,_?(v=_,_=null):(u=d.yyleng,o=d.yytext,s=d.yylineno,y=d.yylloc,c>0&&c--);break;case 2:if(k=this.productions_[w[1]][1],S.$=n[n.length-k],S._$={first_line:i[i.length-(k||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(k||1)].first_column,last_column:i[i.length-1].last_column},m&&(S._$.range=[i[i.length-(k||1)].range[0],i[i.length-1].range[1]]),A=this.performAction.apply(S,[o,u,s,p.yy,w[1],n,i].concat(f)),"undefined"!=typeof A)return A;k&&(r=r.slice(0,-1*k*2),n=n.slice(0,-1*k),i=i.slice(0,-1*k)),r.push(this.productions_[w[1]][0]),n.push(S.$),i.push(S._$),E=a[r[r.length-2]][r[r.length-1]],r.push(E);break;case 3:return!0}}return!0}},u=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(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,r=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 n=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),r.length-1&&(this.yylineno-=r.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:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[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 r,n,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))),n=t[0].match(/(?:\r\n?|\n).*/g),n&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.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],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,e,r,n;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if(r=this._input.match(this.rules[i[a]]),r&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(t=this.test_match(r,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[n]),t!==!1?t:!1):""===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?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>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),t>=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,r,n){switch(r){case 0:return 10;case 1:break;case 2:break;case 3:break;case 4:return 4;case 5:return 11;case 6:return"date";case 7:return 12;case 8:return 13;case 9:return 14;case 10:return 15;case 11:return":";case 12:return 6;case 13:return"INVALID"}},rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\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:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}};return t}();return s.lexer=u,t.prototype=s,s.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof r&&(r.parser=i,r.Parser=i.Parser,r.parse=function(){return i.parse.apply(i,arguments)},r.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),n.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return r.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&r.main(n.argv.slice(1)))}).call(this,t("_process"))},{_process:106,fs:1,path:105}],123:[function(t,e,r){"use strict";function n(t,e){return Math.floor(Math.random()*(e-t))+t}function i(){for(var t="0123456789abcdef",e="",r=0;7>r;r++)e+=t[n(0,16)];return e}function a(t,e){var r,n=!0;t:for(;n;){var i=t,o=e;for(n=!1,h.debug("Entering isfastforwardable:",i.id,o.id);i.seq<=o.seq&&i!=o&&null!=o.parent;){if(Array.isArray(o.parent)){if(h.debug("In merge commit:",o.parent),r=a(i,f[o.parent[0]]))return r;t=i,e=f[o.parent[1]],n=!0;continue t}o=f[o.parent]}return h.debug(i.id,o.id),i.id==o.id}}function o(t,e){var r=t.seq,n=e.seq;return r>n?a(e,t):!1}function s(t,e,r){var n=l.find(t,e);if(n){var i=l.indexOf(t,l.find(t,e));t.splice(i,1,r)}else t.push(r)}function u(t){var e=l.maxBy(t,"seq"),r="";l.each(t,function(t){r+=t==e?" *":" |"});var n=[r,e.id,e.seq];if(l.each(p,function(t,r){t==e.id&&n.push(r)}),h.debug(n.join(" ")),Array.isArray(e.parent)){var i=f[e.parent[0]];s(t,e,i),t.push(f[e.parent[1]])}else{if(null==e.parent)return;var a=f[e.parent];s(t,e,a)}t=l.uniqBy(t,"id"),u(t)}var c=t("../../logger"),l=t("lodash"),h=new c.Log(1),f={},d=null,p={master:d},g="master",y="LR",m=0;r.setDirection=function(t){y=t};var v={};r.setOptions=function(t){h.debug("options str",t),t=t&&t.trim(),t=t||"{}";try{v=JSON.parse(t)}catch(e){h.error("error while parsing gitGraph options",e.message)}},r.getOptions=function(){return v},r.commit=function(t){var e={id:i(),message:t,seq:m++,parent:null==d?null:d.id};d=e,f[e.id]=e,p[g]=e.id,h.debug("in pushCommit "+e.id)},r.branch=function(t){p[t]=null!=d?d.id:null,h.debug("in createBranch")},r.merge=function(t){var e=f[p[g]],r=f[p[t]];if(o(e,r))return void h.debug("Already merged");if(a(e,r))p[g]=p[t],d=f[p[g]];else{var n={id:i(),message:"merged branch "+t+" into "+g,seq:m++,parent:[null==d?null:d.id,p[t]]};d=n,f[n.id]=n,p[g]=n.id}h.debug(p),h.debug("in mergeBranch")},r.checkout=function(t){h.debug("in checkout"),g=t;var e=p[g];d=f[e]},r.reset=function(t){h.debug("in reset",t);var e=t.split(":")[0],r=parseInt(t.split(":")[1]),n="HEAD"==e?d:f[p[e]];for(h.debug(n,r);r>0;)if(n=f[n.parent],r--,!n){var i="Critical error - unique parent commit not found during reset";throw h.error(i),i}d=n,p[g]=n.id},r.prettyPrint=function(){h.debug(f);var t=r.getCommitsArray()[0];u([t])},r.clear=function(){f={},d=null,p={master:d},g="master",m=0},r.getBranchesAsObjArray=function(){var t=l.map(p,function(t,e){return{name:e,commit:f[t]}});return t},r.getBranches=function(){return p},r.getCommits=function(){return f},r.getCommitsArray=function(){var t=Object.keys(f).map(function(t){return f[t]});return l.each(t,function(t){h.debug(t.id)}),l.orderBy(t,["seq"],["desc"])},r.getCurrentBranch=function(){return g},r.getDirection=function(){return y},r.getHead=function(){return d}},{"../../logger":130,lodash:103}],124:[function(t,e,r){"use strict";function n(t){t.append("defs").append("g").attr("id","def-commit").append("circle").attr("r",v.nodeRadius).attr("cx",0).attr("cy",0),t.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("")}function i(t,e,r,n){n=n||"basis";var i=v.branchColors[r%v.branchColors.length],a=p.svg.line().x(function(t){return Math.round(t.x)}).y(function(t){return Math.round(t.y)}).interpolate(n);t.append("svg:path").attr("d",a(e)).style("stroke",i).style("stroke-width",v.lineStrokeWidth).style("fill","none")}function a(t,e){e=e||t.node().getBBox();var r=t.node().getCTM(),n=r.e+e.x*r.a,i=r.f+e.y*r.d;return{left:n,top:i,width:e.width,height:e.height}}function o(t,e,r,n,o){y.debug("svgDrawLineForCommits: ",e,r);var s=a(t.select("#node-"+e+" circle")),u=a(t.select("#node-"+r+" circle"));switch(n){case"LR":if(s.left-u.left>v.nodeSpacing){var c={x:s.left-v.nodeSpacing,y:u.top+u.height/2},l={x:u.left+u.width,y:u.top+u.height/2};i(t,[c,l],o,"linear"),i(t,[{x:s.left,y:s.top+s.height/2},{x:s.left-v.nodeSpacing/2,y:s.top+s.height/2},{x:s.left-v.nodeSpacing/2,y:c.y},c],o)}else i(t,[{x:s.left,y:s.top+s.height/2},{x:s.left-v.nodeSpacing/2,y:s.top+s.height/2},{x:s.left-v.nodeSpacing/2,y:u.top+u.height/2},{x:u.left+u.width,y:u.top+u.height/2}],o);break;case"BT":u.top-s.top>v.nodeSpacing?(c={x:u.left+u.width/2,y:s.top+s.height+v.nodeSpacing},l={x:u.left+u.width/2,y:u.top},i(t,[c,l],o,"linear"),i(t,[{x:s.left+s.width/2,y:s.top+s.height},{x:s.left+s.width/2,y:s.top+s.height+v.nodeSpacing/2},{x:u.left+u.width/2,y:c.y-v.nodeSpacing/2},c],o)):i(t,[{x:s.left+s.width/2,y:s.top+s.height},{x:s.left+s.width/2,y:s.top+v.nodeSpacing/2},{x:u.left+u.width/2,y:u.top-v.nodeSpacing/2},{x:u.left+u.width/2,y:u.top}],o)}}function s(t,e){return t.select(e).node().cloneNode(!0)}function u(t,e,r,n){var i,a=Object.keys(m).length;if(f.isString(e))do{if(i=m[e],y.debug("in renderCommitHistory",i.id,i.seq),t.select("#node-"+e).size()>0)return;t.append(function(){return s(t,"#def-commit")}).attr("class","commit").attr("id",function(){return"node-"+i.id}).attr("transform",function(){switch(n){case"LR":return"translate("+(i.seq*v.nodeSpacing+v.leftMargin)+", "+l*v.branchOffset+")";case"BT":return"translate("+(l*v.branchOffset+v.leftMargin)+", "+(a-i.seq)*v.nodeSpacing+")"}}).attr("fill",v.nodeFillColor).attr("stroke",v.nodeStrokeColor).attr("stroke-width",v.nodeStrokeWidth);var o=f.find(r,["commit",i]);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"===n&&t.select("#node-"+i.id+" p").append("xhtml:span").attr("class","commit-msg").text(", "+i.message),e=i.parent}while(e&&m[e]);f.isArray(e)&&(y.debug("found merge commmit",e),u(t,e[0],r,n),l++,u(t,e[1],r,n),l--)}function c(t,e,r,n){for(n=n||0;e.seq>0&&!e.lineDrawn;)f.isString(e.parent)?(o(t,e.id,e.parent,r,n),e.lineDrawn=!0,e=m[e.parent]):f.isArray(e.parent)&&(o(t,e.id,e.parent[0],r,n),o(t,e.id,e.parent[1],r,n+1),c(t,m[e.parent[1]],r,n+1),e.lineDrawn=!0,e=m[e.parent[0]])}var l,h=t("./gitGraphAst"),f=t("lodash"),d=t("./parser/gitGraph"),p=t("../../d3"),g=t("../../logger"),y=new g.Log,m={},v={nodeSpacing:75,nodeFillColor:"yellow",nodeStrokeWidth:2,nodeStrokeColor:"grey",lineStrokeWidth:4,branchOffset:50,lineColor:"grey",leftMargin:50,branchColors:["#442f74","#983351","#609732","#AA9A39"],nodeRadius:15,nodeLabel:{width:75,height:100,x:-25,y:15}},_={};r.setConf=function(t){_=t},r.draw=function(t,e,r){try{var i;i=d.parser,i.yy=h,y.debug("in gitgraph renderer",t,e,r),i.parse(t+"\n"),v=f.extend(v,_,h.getOptions()),y.debug("effective options",v);var a=h.getDirection();m=h.getCommits();var o=h.getBranchesAsObjArray();"BT"===a&&(v.nodeLabel.x=o.length*v.branchOffset,v.nodeLabel.width="100%",v.nodeLabel.y=-2*v.nodeRadius);var s=p.select("#"+e);n(s),l=1,f.each(o,function(t){u(s,t.commit.id,o,a),c(s,t.commit,a),l++}),s.attr("height",function(){return"BT"===a?Object.keys(m).length*v.nodeSpacing:(o.length+1)*v.branchOffset})}catch(g){y.error("Error while rendering gitgraph"),y.error(g.message)}}},{"../../d3":108,"../../logger":130,"./gitGraphAst":123,"./parser/gitGraph":125,lodash:103}],125:[function(t,e,r){(function(n){"use strict";var i=function(){function t(){this.yy={}}var e=function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},r=[2,3],n=[1,7],i=[7,12,15,17,19,20,21],a=[7,11,12,15,17,19,20,21],o=[2,20],s=[1,32],u={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,r,n,i,a){var o=a.length-1;switch(i){case 1:return a[o-1];case 2:return n.setDirection(a[o-3]),a[o-1];case 4:n.setOptions(a[o-1]),this.$=a[o];break;case 5:a[o-1]+=a[o],this.$=a[o-1];break;case 7:this.$=[];break;case 8:a[o-1].push(a[o]),this.$=a[o-1];break;case 9:this.$=a[o-1];break;case 11:n.commit(a[o]);break;case 12:n.branch(a[o]);break;case 13:n.checkout(a[o]);break;case 14:n.merge(a[o]);break;case 15:n.reset(a[o]);break;case 16:this.$="";break;case 17:this.$=a[o];break;case 18:this.$=a[o-1]+":"+a[o];break;case 19:this.$=a[o-1]+":"+n.count,n.count=0;break;case 20:n.count=0;break;case 21:n.count+=1}},table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3],8:[1,4]},{6:5,7:r,9:6,12:n},{5:[1,8]},{7:[1,9]},e(i,[2,7],{10:10,11:[1,11]}),e(a,[2,6]),{6:12,7:r,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]},e(a,[2,5]),{7:[1,21]},e(i,[2,8]),{12:[1,22]},e(i,[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]},e(i,[2,9]),{12:[2,11]},{12:[2,17]},{12:[2,12]},{12:[2,13]},{12:[2,14]},{12:[2,15]},{12:o,25:31,26:s},{12:o,25:33,26:s},{12:[2,18]},{12:o,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 r=function(t,e){this.message=t,this.hash=e};throw r.prototype=Error,new r(t,e)}this.trace(t)},parse:function(t){var e=this,r=[0],n=[null],i=[],a=this.table,o="",s=0,u=0,c=0,l=2,h=1,f=i.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,"undefined"==typeof d.yylloc&&(d.yylloc={});var y=d.yylloc;i.push(y);var m=d.options&&d.options.ranges;this.parseError="function"==typeof p.yy.parseError?p.yy.parseError:Object.getPrototypeOf(this).parseError;for(var v,_,b,w,A,x,k,E,D,C=function(){var t;return t=d.lex()||h,"number"!=typeof t&&(t=e.symbols_[t]||t),t},S={};;){if(b=r[r.length-1],this.defaultActions[b]?w=this.defaultActions[b]:((null===v||"undefined"==typeof v)&&(v=C()),w=a[b]&&a[b][v]),"undefined"==typeof w||!w.length||!w[0]){var T="";D=[];for(x in a[b])this.terminals_[x]&&x>l&&D.push("'"+this.terminals_[x]+"'");T=d.showPosition?"Parse error on line "+(s+1)+":\n"+d.showPosition()+"\nExpecting "+D.join(", ")+", got '"+(this.terminals_[v]||v)+"'":"Parse error on line "+(s+1)+": Unexpected "+(v==h?"end of input":"'"+(this.terminals_[v]||v)+"'"),this.parseError(T,{text:d.match,token:this.terminals_[v]||v,line:d.yylineno,loc:y,expected:D})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+v);switch(w[0]){case 1:r.push(v),n.push(d.yytext),i.push(d.yylloc),r.push(w[1]),v=null,_?(v=_,_=null):(u=d.yyleng,o=d.yytext,s=d.yylineno,y=d.yylloc,c>0&&c--);break;case 2:if(k=this.productions_[w[1]][1],S.$=n[n.length-k],S._$={first_line:i[i.length-(k||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(k||1)].first_column,last_column:i[i.length-1].last_column},m&&(S._$.range=[i[i.length-(k||1)].range[0],i[i.length-1].range[1]]),A=this.performAction.apply(S,[o,u,s,p.yy,w[1],n,i].concat(f)),"undefined"!=typeof A)return A;k&&(r=r.slice(0,-1*k*2),n=n.slice(0,-1*k),i=i.slice(0,-1*k)),r.push(this.productions_[w[1]][0]),n.push(S.$),i.push(S._$),E=a[r[r.length-2]][r[r.length-1]],r.push(E);break;case 3:return!0}}return!0}},c=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(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,r=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 n=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),r.length-1&&(this.yylineno-=r.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:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[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 r,n,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))),n=t[0].match(/(?:\r\n?|\n).*/g),n&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.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],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,e,r,n;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if(r=this._input.match(this.rules[i[a]]),r&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(t=this.test_match(r,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[n]),t!==!1?t:!1):""===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?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>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),t>=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,r,n){switch(r){case 0:return 12;case 1:break;case 2:break;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:return 8;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}}};return t}();return u.lexer=c,t.prototype=u,u.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof r&&(r.parser=i,r.Parser=i.Parser,r.parse=function(){return i.parse.apply(i,arguments)},r.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),n.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return r.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&r.main(n.argv.slice(1)))}).call(this,t("_process"))},{_process:106,fs:1,path:105}],126:[function(t,e,r){(function(n){"use strict";var i=function(){function t(){this.yy={}}var e=function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},r=[1,2],n=[1,3],i=[1,4],a=[2,4],o=[1,9],s=[1,11],u=[1,12],c=[1,14],l=[1,15],h=[1,17],f=[1,18],d=[1,19],p=[1,20],g=[1,22],y=[1,23],m=[1,4,5,10,15,16,18,20,21,22,23,24,25,36],v=[1,31],_=[4,5,10,15,16,18,20,21,22,23,25,36],b=[34,35,36],w={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,participant:10,actor:11,AS:12,restOfLine:13,signal:14,activate:15,deactivate:16,note_statement:17,title:18,text2:19,loop:20,end:21,opt:22,alt:23,"else":24,note:25,placement:26,over:27,actor_pair:28,spaceList:29,",":30,left_of:31,right_of:32,signaltype:33,"+":34,"-":35,ACTOR:36,SOLID_OPEN_ARROW:37,DOTTED_OPEN_ARROW:38,SOLID_ARROW:39,DOTTED_ARROW:40,SOLID_CROSS:41,DOTTED_CROSS:42,TXT:43,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",10:"participant",12:"AS",13:"restOfLine",15:"activate",16:"deactivate",18:"title",20:"loop",21:"end",22:"opt",23:"alt",24:"else",25:"note",27:"over",30:",",31:"left_of",32:"right_of",34:"+",35:"-",36:"ACTOR",37:"SOLID_OPEN_ARROW",38:"DOTTED_OPEN_ARROW",39:"SOLID_ARROW",40:"DOTTED_ARROW",41:"SOLID_CROSS",42:"DOTTED_CROSS",43:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,5],[9,3],[9,2],[9,3],[9,3],[9,2],[9,3],[9,4],[9,4],[9,7],[17,4],[17,4],[29,2],[29,1],[28,3],[28,1],[26,1],[26,1],[14,5],[14,5],[14,4],[11,1],[33,1],[33,1],[33,1],[33,1],[33,1],[33,1],[19,1]],performAction:function(t,e,r,n,i,a){var o=a.length-1;switch(i){case 3:return n.apply(a[o]),a[o];case 4:this.$=[];break;case 5:a[o-1].push(a[o]),this.$=a[o-1];break;case 6:case 7:this.$=a[o];break;case 8:this.$=[];break;case 9:a[o-3].description=a[o-1],this.$=a[o-3];break;case 10:this.$=a[o-1];break;case 12:this.$={type:"activeStart",signalType:n.LINETYPE.ACTIVE_START,actor:a[o-1]};break;case 13:this.$={type:"activeEnd",signalType:n.LINETYPE.ACTIVE_END,actor:a[o-1]};break;case 15:this.$=[{type:"setTitle",text:a[o-1]}];break;case 16:a[o-1].unshift({type:"loopStart",loopText:a[o-2],signalType:n.LINETYPE.LOOP_START}),a[o-1].push({type:"loopEnd",loopText:a[o-2],signalType:n.LINETYPE.LOOP_END}),this.$=a[o-1];break;case 17:a[o-1].unshift({type:"optStart",optText:a[o-2],signalType:n.LINETYPE.OPT_START}),a[o-1].push({type:"optEnd",optText:a[o-2],signalType:n.LINETYPE.OPT_END}),this.$=a[o-1];break;case 18:a[o-4].unshift({type:"altStart",altText:a[o-5],signalType:n.LINETYPE.ALT_START}),a[o-4].push({type:"else",altText:a[o-2],signalType:n.LINETYPE.ALT_ELSE}),a[o-4]=a[o-4].concat(a[o-1]),a[o-4].push({type:"altEnd",signalType:n.LINETYPE.ALT_END}),this.$=a[o-4];break;case 19:this.$=[a[o-1],{type:"addNote",placement:a[o-2],actor:a[o-1].actor,text:a[o]}];break;case 20:a[o-2]=[].concat(a[o-1],a[o-1]).slice(0,2),a[o-2][0]=a[o-2][0].actor,a[o-2][1]=a[o-2][1].actor,this.$=[a[o-1],{type:"addNote",placement:n.PLACEMENT.OVER,actor:a[o-2].slice(0,2),text:a[o]}];break;case 23:this.$=[a[o-2],a[o]];break;case 24:this.$=a[o];break;case 25:this.$=n.PLACEMENT.LEFTOF;break;case 26:this.$=n.PLACEMENT.RIGHTOF;break;case 27:this.$=[a[o-4],a[o-1],{type:"addMessage",from:a[o-4].actor,to:a[o-1].actor,signalType:a[o-3],msg:a[o]},{type:"activeStart",signalType:n.LINETYPE.ACTIVE_START,actor:a[o-1]}];break;case 28:this.$=[a[o-4],a[o-1],{type:"addMessage",from:a[o-4].actor,to:a[o-1].actor,signalType:a[o-3],msg:a[o]},{type:"activeEnd",signalType:n.LINETYPE.ACTIVE_END,actor:a[o-4]}];break;case 29:this.$=[a[o-3],a[o-1],{type:"addMessage",from:a[o-3].actor,to:a[o-1].actor,signalType:a[o-2],msg:a[o]}];break;case 30:this.$={type:"addActor",actor:a[o]};break;case 31:this.$=n.LINETYPE.SOLID_OPEN;break;case 32:this.$=n.LINETYPE.DOTTED_OPEN;break;case 33:this.$=n.LINETYPE.SOLID;break;case 34:this.$=n.LINETYPE.DOTTED;break;case 35:this.$=n.LINETYPE.SOLID_CROSS;break;case 36:this.$=n.LINETYPE.DOTTED_CROSS;break;case 37:this.$=a[o].substring(1).trim().replace(/\\n/gm,"\n")}},table:[{3:1,4:r,5:n,6:i},{1:[3]},{3:5,4:r,5:n,6:i},{3:6,4:r,5:n,6:i},e([1,4,5,10,15,16,18,20,22,23,25,36],a,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:o,5:s,8:8,9:10,10:u,11:21,14:13,15:c,16:l,17:16,18:h,20:f,22:d,23:p,25:g,36:y},e(m,[2,5]),{9:24,10:u,11:21,14:13,15:c,16:l,17:16,18:h,20:f,22:d,23:p,25:g,36:y},e(m,[2,7]),e(m,[2,8]),{11:25,36:y},{5:[1,26]},{11:27,36:y},{11:28,36:y},{5:[1,29]},{19:30,43:v},{13:[1,32]},{13:[1,33]},{13:[1,34]},{33:35,37:[1,36],38:[1,37],39:[1,38],40:[1,39],41:[1,40],42:[1,41]},{26:42,27:[1,43],31:[1,44],32:[1,45]},e([5,12,30,37,38,39,40,41,42,43],[2,30]),e(m,[2,6]),{5:[1,47],12:[1,46]},e(m,[2,11]),{5:[1,48]},{5:[1,49]},e(m,[2,14]),{5:[1,50]},{5:[2,37]},e(_,a,{7:51}),e(_,a,{7:52}),e([4,5,10,15,16,18,20,22,23,24,25,36],a,{7:53}),{11:56,34:[1,54],35:[1,55],36:y},e(b,[2,31]),e(b,[2,32]),e(b,[2,33]),e(b,[2,34]),e(b,[2,35]),e(b,[2,36]),{11:57,36:y},{11:59,28:58,36:y},{36:[2,25]},{36:[2,26]},{13:[1,60]},e(m,[2,10]),e(m,[2,12]),e(m,[2,13]),e(m,[2,15]),{4:o,5:s,8:8,9:10,10:u,11:21,14:13,15:c,16:l,17:16,18:h,20:f,21:[1,61],22:d,23:p,25:g,36:y},{4:o,5:s,8:8,9:10,10:u,11:21,14:13,15:c,16:l,17:16,18:h,20:f,21:[1,62],22:d,23:p,25:g,36:y},{4:o,5:s,8:8,9:10,10:u,11:21,14:13,15:c,16:l,17:16,18:h,20:f,22:d,23:p,24:[1,63],25:g,36:y},{11:64,36:y},{11:65,36:y},{19:66,43:v},{19:67,43:v},{19:68,43:v},{30:[1,69],43:[2,24]},{5:[1,70]},e(m,[2,16]),e(m,[2,17]),{13:[1,71]},{19:72,43:v},{19:73,43:v},{5:[2,29]},{5:[2,19]},{5:[2,20]},{11:74,36:y},e(m,[2,9]),e(_,a,{7:75}),{5:[2,27]},{5:[2,28]},{43:[2,23]},{4:o,5:s,8:8,9:10,10:u,11:21,14:13,15:c,16:l,17:16,18:h,20:f,21:[1,76],22:d,23:p,25:g,36:y},e(m,[2,18])],defaultActions:{5:[2,1],6:[2,2],31:[2,37],44:[2,25],45:[2,26],66:[2,29],67:[2,19],68:[2,20],72:[2,27],73:[2,28],74:[2,23]},parseError:function(t,e){if(!e.recoverable){var r=function(t,e){this.message=t,this.hash=e};throw r.prototype=Error,new r(t,e)}this.trace(t)},parse:function(t){var e=this,r=[0],n=[null],i=[],a=this.table,o="",s=0,u=0,c=0,l=2,h=1,f=i.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,"undefined"==typeof d.yylloc&&(d.yylloc={});var y=d.yylloc;i.push(y);var m=d.options&&d.options.ranges;this.parseError="function"==typeof p.yy.parseError?p.yy.parseError:Object.getPrototypeOf(this).parseError;for(var v,_,b,w,A,x,k,E,D,C=function(){var t;return t=d.lex()||h,"number"!=typeof t&&(t=e.symbols_[t]||t),t},S={};;){if(b=r[r.length-1],this.defaultActions[b]?w=this.defaultActions[b]:((null===v||"undefined"==typeof v)&&(v=C()),w=a[b]&&a[b][v]),"undefined"==typeof w||!w.length||!w[0]){var T="";D=[];for(x in a[b])this.terminals_[x]&&x>l&&D.push("'"+this.terminals_[x]+"'");T=d.showPosition?"Parse error on line "+(s+1)+":\n"+d.showPosition()+"\nExpecting "+D.join(", ")+", got '"+(this.terminals_[v]||v)+"'":"Parse error on line "+(s+1)+": Unexpected "+(v==h?"end of input":"'"+(this.terminals_[v]||v)+"'"),this.parseError(T,{text:d.match,token:this.terminals_[v]||v,line:d.yylineno,loc:y,expected:D})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+v);switch(w[0]){case 1:r.push(v),n.push(d.yytext),i.push(d.yylloc),r.push(w[1]),v=null,_?(v=_,_=null):(u=d.yyleng,o=d.yytext,s=d.yylineno,y=d.yylloc,c>0&&c--);break;case 2:if(k=this.productions_[w[1]][1],S.$=n[n.length-k],S._$={first_line:i[i.length-(k||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(k||1)].first_column,last_column:i[i.length-1].last_column},m&&(S._$.range=[i[i.length-(k||1)].range[0],i[i.length-1].range[1]]),A=this.performAction.apply(S,[o,u,s,p.yy,w[1],n,i].concat(f)),"undefined"!=typeof A)return A;k&&(r=r.slice(0,-1*k*2),n=n.slice(0,-1*k),i=i.slice(0,-1*k)),r.push(this.productions_[w[1]][0]),n.push(S.$),i.push(S._$),E=a[r[r.length-2]][r[r.length-1]],r.push(E);break;case 3:return!0}}return!0}},A=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(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,r=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 n=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),r.length-1&&(this.yylineno-=r.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:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[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 r,n,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))),n=t[0].match(/(?:\r\n?|\n).*/g),n&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.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],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,e,r,n;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if(r=this._input.match(this.rules[i[a]]),r&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(t=this.test_match(r,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[n]),t!==!1?t:!1):""===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?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>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),t>=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,r,n){switch(r){case 0:return 5;case 1:break;case 2:break;case 3:break;case 4:break;case 5:return this.begin("ID"),10;case 6:return this.begin("ALIAS"),36;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"),20;case 10:return this.begin("LINE"),22;case 11:return this.begin("LINE"),23;case 12:return this.begin("LINE"),24;case 13:return this.popState(),13;case 14:return 21;case 15:return 31;case 16:return 32;case 17:return 27;case 18:return 25;case 19:return this.begin("ID"),15;case 20:return this.begin("ID"),16;case 21:return 18;case 22:return 6;case 23:return 30;case 24:return 5;case 25:return e.yytext=e.yytext.trim(),36;case 26:return 39;case 27:return 40;case 28:return 37;case 29:return 38;case 30:return 41;case 31:return 42;case 32:return 43;case 33:return 34;case 34:return 35;case 35:return 5;case 36: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,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\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,13],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,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36],inclusive:!0}}};return t}();return w.lexer=A,t.prototype=w,w.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof r&&(r.parser=i,r.Parser=i.Parser,r.parse=function(){return i.parse.apply(i,arguments)},r.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),n.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return r.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&r.main(n.argv.slice(1)))}).call(this,t("_process"))},{_process:106,fs:1,path:105}],127:[function(t,e,r){(function(e){"use strict";var n={},i=[],a=[],o="",s=t("../../logger"),u=new s.Log;r.addActor=function(t,e,r){var i=n[t];i&&e===i.name&&null==r||(null==r&&(r=e),n[t]={name:e,description:r})},r.addMessage=function(t,e,r,n){i.push({from:t,to:e,message:r,answer:n})},r.addSignal=function(t,e,r,n){u.debug("Adding message from="+t+" to="+e+" message="+r+" type="+n),i.push({from:t,to:e,message:r,type:n})},r.getMessages=function(){return i},r.getActors=function(){return n},r.getActor=function(t){return n[t]},r.getActorKeys=function(){return Object.keys(n)},r.getTitle=function(){return o},r.clear=function(){n={},i=[]},r.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},r.ARROWTYPE={FILLED:0,OPEN:1},r.PLACEMENT={LEFTOF:0,RIGHTOF:1,OVER:2},r.addNote=function(t,e,n){var o={actor:t,placement:e,message:n},s=[].concat(t,t);a.push(o),i.push({from:s[0],to:s[1],message:n,type:r.LINETYPE.NOTE,placement:e})},r.setTitle=function(t){o=t},r.parseError=function(t,r){e.mermaidAPI.parseError(t,r)},r.apply=function(t){if(t instanceof Array)t.forEach(function(t){r.apply(t)});else switch(t.type){case"addActor":r.addActor(t.actor,t.actor,t.description);break;case"activeStart":r.addSignal(t.actor,void 0,void 0,t.signalType);break;case"activeEnd":r.addSignal(t.actor,void 0,void 0,t.signalType);break;case"addNote":r.addNote(t.actor,t.placement,t.text);break;case"addMessage":r.addSignal(t.from,t.to,t.msg,t.signalType);break;case"loopStart":r.addSignal(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":r.addSignal(void 0,void 0,void 0,t.signalType);break;case"optStart":r.addSignal(void 0,void 0,t.optText,t.signalType);break;case"optEnd":r.addSignal(void 0,void 0,void 0,t.signalType);break;case"altStart":r.addSignal(void 0,void 0,t.altText,t.signalType);break;case"else":r.addSignal(void 0,void 0,t.altText,t.signalType);break;case"altEnd":r.addSignal(void 0,void 0,void 0,t.signalType);break;case"setTitle":r.setTitle(t.text)}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../../logger":130}],128:[function(t,e,r){"use strict";var n=t("./parser/sequenceDiagram").parser;n.yy=t("./sequenceDb");var i=t("./svgDraw"),a=t("../../d3"),o=t("../../logger"),s=new o.Log,u={diagramMarginX:50,diagramMarginY:30,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!1,bottomMarginAdj:1,activationWidth:10,textPlacement:"tspan"};r.bounds={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,r,n){t[e]="undefined"==typeof t[e]?r:n(r,t[e])},updateBounds:function(t,e,n,i){function a(a){return function(c){s++;var l=o.sequenceItems.length-s+1;o.updateVal(c,"starty",e-l*u.boxMargin,Math.min),o.updateVal(c,"stopy",i+l*u.boxMargin,Math.max),o.updateVal(r.bounds.data,"startx",t-l*u.boxMargin,Math.min),o.updateVal(r.bounds.data,"stopx",n+l*u.boxMargin,Math.max),"activation"!=a&&(o.updateVal(c,"startx",t-l*u.boxMargin,Math.min),o.updateVal(c,"stopx",n+l*u.boxMargin,Math.max),o.updateVal(r.bounds.data,"starty",e-l*u.boxMargin,Math.min),o.updateVal(r.bounds.data,"stopy",i+l*u.boxMargin,Math.max))}}var o=this,s=0;this.sequenceItems.forEach(a()),this.activations.forEach(a("activation"))},insert:function(t,e,n,i){var a,o,s,u;a=Math.min(t,n),s=Math.max(t,n),o=Math.min(e,i),u=Math.max(e,i),this.updateVal(r.bounds.data,"startx",a,Math.min),this.updateVal(r.bounds.data,"starty",o,Math.min),this.updateVal(r.bounds.data,"stopx",s,Math.max),this.updateVal(r.bounds.data,"stopy",u,Math.max),this.updateBounds(a,o,s,u)},newActivation:function(t,e){var r=n.yy.getActors()[t.from.actor],a=h(t.from.actor).length,o=r.x+u.width/2+(a-1)*u.activationWidth/2;this.activations.push({startx:o,starty:this.verticalPos+2,stopx:o+u.activationWidth,stopy:void 0,actor:t.from.actor,anchored:i.anchorElement(e)})},endActivation:function(t){var e=this.activations.map(function(t){return t.actor}).lastIndexOf(t.from.actor),r=this.activations.splice(e,1)[0];return r},newLoop:function(t){this.sequenceItems.push({startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t})},endLoop:function(){var t=this.sequenceItems.pop();return t},addElseToLoop:function(t){var e=this.sequenceItems.pop();e.elsey=r.bounds.getVerticalPos(),e.elseText=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}};var c=function(t,e,n,a,o){var s=i.getNoteRect();s.x=e,s.y=n,s.width=o||u.width,s["class"]="note";var c=t.append("g"),l=i.drawRect(c,s),h=i.getTextObj();h.x=e-4,h.y=n-13,h.textMargin=u.noteMargin,h.dy="1em",h.text=a.message,h["class"]="noteText";var f=i.drawText(c,h,s.width-u.noteMargin),d=f[0][0].getBBox().height;!o&&d>u.width?(f.remove(),c=t.append("g"),f=i.drawText(c,h,2*s.width-u.noteMargin),d=f[0][0].getBBox().height,l.attr("width",2*s.width),r.bounds.insert(e,n,e+2*s.width,n+2*u.noteMargin+d)):r.bounds.insert(e,n,e+s.width,n+2*u.noteMargin+d),l.attr("height",d+2*u.noteMargin),r.bounds.bumpVerticalPos(d+2*u.noteMargin)},l=function(t,e,i,a,o){var s,c=t.append("g"),l=e+(i-e)/2,h=c.append("text").attr("x",l).attr("y",a-7).style("text-anchor","middle").attr("class","messageText").text(o.message);s="undefined"!=typeof h[0][0].getBBox?h[0][0].getBBox().width:h[0][0].getBoundingClientRect();var f;if(e===i){f=c.append("path").attr("d","M "+e+","+a+" C "+(e+60)+","+(a-10)+" "+(e+60)+","+(a+30)+" "+e+","+(a+20)),r.bounds.bumpVerticalPos(30);var d=Math.max(s/2,100);r.bounds.insert(e-d,r.bounds.getVerticalPos()-10,i+d,r.bounds.getVerticalPos())}else f=c.append("line"),f.attr("x1",e),f.attr("y1",a),f.attr("x2",i),f.attr("y2",a),r.bounds.insert(e,r.bounds.getVerticalPos()-10,i,r.bounds.getVerticalPos());o.type===n.yy.LINETYPE.DOTTED||o.type===n.yy.LINETYPE.DOTTED_CROSS||o.type===n.yy.LINETYPE.DOTTED_OPEN?(f.style("stroke-dasharray","3, 3"),f.attr("class","messageLine1")):f.attr("class","messageLine0");var p="";u.arrowMarkerAbsolute&&(p=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,p=p.replace(/\(/g,"\\("),p=p.replace(/\)/g,"\\)")),f.attr("stroke-width",2),f.attr("stroke","black"),f.style("fill","none"),(o.type===n.yy.LINETYPE.SOLID||o.type===n.yy.LINETYPE.DOTTED)&&f.attr("marker-end","url("+p+"#arrowhead)"),(o.type===n.yy.LINETYPE.SOLID_CROSS||o.type===n.yy.LINETYPE.DOTTED_CROSS)&&f.attr("marker-end","url("+p+"#crosshead)")};e.exports.drawActors=function(t,e,n,a){var o;for(o=0;o<n.length;o++){var s=n[o];e[s].x=o*u.actorMargin+o*u.width,e[s].y=a,e[s].width=u.diagramMarginX,e[s].height=u.diagramMarginY,i.drawActor(t,e[s].x,a,e[s].description,u),r.bounds.insert(e[s].x,a,e[s].x+u.width,u.height)}r.bounds.bumpVerticalPos(u.height)},e.exports.setConf=function(t){var e=Object.keys(t);e.forEach(function(e){u[e]=t[e]})};var h=function(t){return e.exports.bounds.activations.filter(function(e){return e.actor==t})},f=function(t){var e=n.yy.getActors(),r=h(t),i=r.reduce(function(t,e){return Math.min(t,e.startx)},e[t].x+u.width/2),a=r.reduce(function(t,e){return Math.max(t,e.stopx)},e[t].x+u.width/2);return[i,a]};e.exports.draw=function(t,o){function h(t,e){var n=r.bounds.endActivation(t);n.starty+18>e&&(n.starty=e-6,e+=12),i.drawActivation(y,n,e,u),r.bounds.insert(n.startx,e-10,n.stopx,e)}n.yy.clear(),n.parse(t+"\n"),r.bounds.init();var d,p,g,y=a.select("#"+o),m=n.yy.getActors(),v=n.yy.getActorKeys(),_=n.yy.getMessages(),b=n.yy.getTitle();e.exports.drawActors(y,m,v,0),i.insertArrowHead(y),i.insertArrowCrossHead(y);var w;_.forEach(function(t){var e;switch(t.type){case n.yy.LINETYPE.NOTE:r.bounds.bumpVerticalPos(u.boxMargin),d=m[t.from].x,p=m[t.to].x,t.placement===n.yy.PLACEMENT.RIGHTOF?c(y,d+(u.width+u.actorMargin)/2,r.bounds.getVerticalPos(),t):t.placement===n.yy.PLACEMENT.LEFTOF?c(y,d-(u.width+u.actorMargin)/2,r.bounds.getVerticalPos(),t):t.to===t.from?c(y,d,r.bounds.getVerticalPos(),t):(g=Math.abs(d-p)+u.actorMargin,c(y,(d+p+u.width-g)/2,r.bounds.getVerticalPos(),t,g));break;case n.yy.LINETYPE.ACTIVE_START:r.bounds.newActivation(t,y);break;case n.yy.LINETYPE.ACTIVE_END:h(t,r.bounds.getVerticalPos());break;case n.yy.LINETYPE.LOOP_START:r.bounds.bumpVerticalPos(u.boxMargin),r.bounds.newLoop(t.message),r.bounds.bumpVerticalPos(u.boxMargin+u.boxTextMargin);break;case n.yy.LINETYPE.LOOP_END:e=r.bounds.endLoop(),i.drawLoop(y,e,"loop",u),r.bounds.bumpVerticalPos(u.boxMargin);break;case n.yy.LINETYPE.OPT_START:r.bounds.bumpVerticalPos(u.boxMargin),r.bounds.newLoop(t.message),r.bounds.bumpVerticalPos(u.boxMargin+u.boxTextMargin);break;case n.yy.LINETYPE.OPT_END:e=r.bounds.endLoop(),i.drawLoop(y,e,"opt",u),r.bounds.bumpVerticalPos(u.boxMargin);break;case n.yy.LINETYPE.ALT_START:r.bounds.bumpVerticalPos(u.boxMargin),r.bounds.newLoop(t.message),r.bounds.bumpVerticalPos(u.boxMargin+u.boxTextMargin);break;case n.yy.LINETYPE.ALT_ELSE:r.bounds.bumpVerticalPos(u.boxMargin),e=r.bounds.addElseToLoop(t.message),r.bounds.bumpVerticalPos(u.boxMargin);break;case n.yy.LINETYPE.ALT_END:e=r.bounds.endLoop(),i.drawLoop(y,e,"alt",u),r.bounds.bumpVerticalPos(u.boxMargin);break;default:try{w=t,r.bounds.bumpVerticalPos(u.messageMargin);var a=f(t.from),o=f(t.to),s=a[0]<=o[0]?1:0,v=a[0]<o[0]?0:1;d=a[s],p=o[v];var _=r.bounds.getVerticalPos();l(y,d,p,_,t);var b=a.concat(o);r.bounds.insert(Math.min.apply(null,b),_,Math.max.apply(null,b),_)}catch(A){console.error("error while drawing message",A)}}}),u.mirrorActors&&(r.bounds.bumpVerticalPos(2*u.boxMargin),e.exports.drawActors(y,m,v,r.bounds.getVerticalPos()));var A=r.bounds.getBounds();s.debug("For line height fix Querying: #"+o+" .actor-line");var x=a.selectAll("#"+o+" .actor-line");x.attr("y2",A.stopy);var k=A.stopy-A.starty+2*u.diagramMarginY;u.mirrorActors&&(k=k-u.boxMargin+u.bottomMarginAdj);var E=A.stopx-A.startx+2*u.diagramMarginX;b&&y.append("text").text(b).attr("x",(A.stopx-A.startx)/2-2*u.diagramMarginX).attr("y",-25),u.useMaxWidth?(y.attr("height","100%"),y.attr("width","100%"),y.attr("style","max-width:"+E+"px;")):(y.attr("height",k),y.attr("width",E));var D=b?40:0;y.attr("viewBox",A.startx-u.diagramMarginX+" -"+(u.diagramMarginY+D)+" "+E+" "+(k+D))}},{"../../d3":108,"../../logger":130,"./parser/sequenceDiagram":126,"./sequenceDb":127,"./svgDraw":129}],129:[function(t,e,r){"use strict";r.drawRect=function(t,e){var r=t.append("rect");return r.attr("x",e.x),r.attr("y",e.y),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("width",e.width),r.attr("height",e.height),r.attr("rx",e.rx),r.attr("ry",e.ry),"undefined"!=typeof e["class"]&&r.attr("class",e["class"]),r},r.drawText=function(t,e,r){var n=e.text.replace(/<br\/?>/gi," "),i=t.append("text");i.attr("x",e.x),i.attr("y",e.y),i.style("text-anchor",e.anchor),i.attr("fill",e.fill),"undefined"!=typeof e["class"]&&i.attr("class",e["class"]);var a=i.append("tspan");return a.attr("x",e.x+2*e.textMargin),a.text(n),"undefined"!=typeof i.textwrap&&i.textwrap({x:e.x,y:e.y,width:r,height:1800},e.textMargin),i},r.drawLabel=function(t,e){var n=r.getNoteRect();n.x=e.x,n.y=e.y,n.width=50,n.height=20,n.fill="#526e52",n.stroke="none",n["class"]="labelBox",r.drawRect(t,n),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,e.fill="white",r.drawText(t,e)};var n=-1;r.drawActor=function(t,e,a,o,s){var u=e+s.width/2,c=t.append("g");0===a&&(n++,c.append("line").attr("id","actor"+n).attr("x1",u).attr("y1",5).attr("x2",u).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999"));var l=r.getNoteRect();l.x=e,l.y=a,l.fill="#eaeaea", l.width=s.width,l.height=s.height,l["class"]="actor",l.rx=3,l.ry=3,r.drawRect(c,l),i(s)(o,c,l.x,l.y,l.width,l.height,{"class":"actor"})},r.anchorElement=function(t){return t.append("g")},r.drawActivation=function(t,e,n){var i=r.getNoteRect(),a=e.anchored;i.x=e.startx,i.y=e.starty,i.fill="#f4f4f4",i.width=e.stopx-e.startx,i.height=n-e.starty,r.drawRect(a,i)},r.drawLoop=function(t,e,n,i){var a=t.append("g"),o=function(t,e,r,n){a.append("line").attr("x1",t).attr("y1",e).attr("x2",r).attr("y2",n).attr("stroke-width",2).attr("stroke","#526e52").attr("class","loopLine")};o(e.startx,e.starty,e.stopx,e.starty),o(e.stopx,e.starty,e.stopx,e.stopy),o(e.startx,e.stopy,e.stopx,e.stopy),o(e.startx,e.starty,e.startx,e.stopy),"undefined"!=typeof e.elsey&&o(e.startx,e.elsey,e.stopx,e.elsey);var s=r.getTextObj();s.text=n,s.x=e.startx,s.y=e.starty,s.labelMargin=15,s["class"]="labelText",s.fill="white",r.drawLabel(a,s),s=r.getTextObj(),s.text="[ "+e.title+" ]",s.x=e.startx+(e.stopx-e.startx)/2,s.y=e.starty+1.5*i.boxMargin,s.anchor="middle",s["class"]="loopText",r.drawText(a,s),"undefined"!=typeof e.elseText&&(s.text="[ "+e.elseText+" ]",s.y=e.elsey+1.5*i.boxMargin,r.drawText(a,s))},r.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")},r.insertArrowCrossHead=function(t){var e=t.append("defs"),r=e.append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);r.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"),r.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")},r.getTextObj=function(){var t={x:0,y:0,fill:"black","text-anchor":"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0};return t},r.getNoteRect=function(){var t={x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0};return t};var i=function(){function t(t,e,r,i,a,o,s){var u=e.append("text").attr("x",r+a/2).attr("y",i+o/2+5).style("text-anchor","middle").text(t);n(u,s)}function e(t,e,r,i,a,o,s){var u=e.append("text").attr("x",r+a/2).attr("y",i).style("text-anchor","middle");if(u.append("tspan").attr("x",r+a/2).attr("dy","0").text(t),"undefined"!=typeof u.textwrap){u.textwrap({x:r+a/2,y:i,width:a,height:o},0);var c=u.selectAll("tspan");c.length>0&&c[0].length>0&&(c=c[0],u.attr("y",i+(o/2-u[0][0].getBBox().height*(1-1/c.length)/2)).attr("dominant-baseline","central").attr("alignment-baseline","central"))}n(u,s)}function r(t,r,i,a,o,s,u){var c=r.append("switch"),l=c.append("foreignObject").attr("x",i).attr("y",a).attr("width",o).attr("height",s),h=l.append("div").style("display","table").style("height","100%").style("width","100%");h.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,c,i,a,o,s,u),n(h,u)}function n(t,e){for(var r in e)e.hasOwnProperty(r)&&t.attr(r,e[r])}return function(n){return"fo"===n.textPlacement?r:"old"===n.textPlacement?t:e}}()},{}],130:[function(t,e,r){"use strict";function n(t){var e=t.getUTCHours(),r=t.getUTCMinutes(),n=t.getSeconds(),i=t.getMilliseconds();10>e&&(e="0"+e),10>r&&(r="0"+r),10>n&&(n="0"+n),100>i&&(i="0"+i),10>i&&(i="00"+i);var a=e+":"+r+":"+n+" ("+i+")";return a}function i(t){var e=n(new Date);return"%c "+e+" :%c"+t+": "}function a(t){this.level=t,this.log=function(){var t=Array.prototype.slice.call(arguments),e=t.shift(),r=this.level;"undefined"==typeof r&&(r=s),e>=r&&"undefined"!=typeof console&&"undefined"!=typeof console.log&&(t.unshift("["+n(new Date)+"] "),console.log.apply(console,t.map(function(t){return"object"==typeof t?t.toString()+JSON.stringify(t,null,2):t})))},this.trace=window.console.debug.bind(window.console,i("TRACE",name),"color:grey;","color: grey;"),this.debug=window.console.debug.bind(window.console,i("DEBUG",name),"color:grey;","color: green;"),this.info=window.console.debug.bind(window.console,i("INFO",name),"color:grey;","color: blue;"),this.warn=window.console.debug.bind(window.console,i("WARN",name),"color:grey;","color: orange;"),this.error=window.console.debug.bind(window.console,i("ERROR",name),"color:grey;","color: red;")}var o={debug:1,info:2,warn:3,error:4,fatal:5,"default":5},s=o.error;r.setLogLevel=function(t){s=t},r.Log=a},{}],131:[function(t,e,r){(function(n){"use strict";var i=t("./logger"),a=new i.Log,o=t("./mermaidAPI"),s=0,u=t("he");e.exports.mermaidAPI=o;var c=function(){var t=o.getConfig();a.debug("Starting rendering diagrams");var e;arguments.length>=2?("undefined"!=typeof arguments[0]&&(n.mermaid.sequenceConfig=arguments[0]),e=arguments[1]):e=arguments[0];var r;"function"==typeof arguments[arguments.length-1]?(r=arguments[arguments.length-1],a.debug("Callback function found")):"undefined"!=typeof t.mermaid&&("function"==typeof t.mermaid.callback?(r=t.mermaid.callback,a.debug("Callback function found")):a.debug("No Callback function found")),e=void 0===e?document.querySelectorAll(".mermaid"):"string"==typeof e?document.querySelectorAll(e):e instanceof Node?[e]:e;var i;"undefined"!=typeof mermaid_config&&o.initialize(n.mermaid_config),a.debug("Start On Load before: "+n.mermaid.startOnLoad),"undefined"!=typeof n.mermaid.startOnLoad&&(a.debug("Start On Load inner: "+n.mermaid.startOnLoad),o.initialize({startOnLoad:n.mermaid.startOnLoad})),"undefined"!=typeof n.mermaid.ganttConfig&&o.initialize({gantt:n.mermaid.ganttConfig});var c,l=function(t,e){h.innerHTML=t,"undefined"!=typeof r&&r(f),e(h)};for(i=0;i<e.length;i++){var h=e[i];if(!h.getAttribute("data-processed")){h.setAttribute("data-processed",!0);var f="mermaidChart"+s++;c=h.innerHTML,c=u.decode(c).trim(),o.render(f,c,l,h)}}};r.init=c,r.parse=o.parse,r.version=function(){return"v"+t("../package.json").version},r.initialize=function(t){a.debug("Initializing mermaid"),"undefined"!=typeof t.mermaid&&("undefined"!=typeof t.mermaid.startOnLoad&&(n.mermaid.startOnLoad=t.mermaid.startOnLoad),"undefined"!=typeof t.mermaid.htmlLabels&&(n.mermaid.htmlLabels=t.mermaid.htmlLabels)),o.initialize(t)};var l=function(t,e){return"undefined"==typeof e?!1:t===e};n.mermaid={startOnLoad:!0,htmlLabels:!0,init:function(){c.apply(null,arguments)},initialize:function(t){r.initialize(t)},version:function(){return o.version()},parse:function(t){return o.parse(t)},parseError:function(t){a.debug("Mermaid Syntax error:"),a.debug(t)},render:function(t,e,r,n){return o.render(t,e,r,n)}},r.parseError=n.mermaid.parseError,r.contentLoaded=function(){var t;"undefined"!=typeof mermaid_config&&l(!1,n.mermaid_config.htmlLabels)&&(n.mermaid.htmlLabels=!1),n.mermaid.startOnLoad?"undefined"!=typeof n.mermaid_config?l(!0,n.mermaid_config.startOnLoad)&&n.mermaid.init():(t=o.getConfig(),t.startOnLoad&&n.mermaid.init()):"undefined"==typeof n.mermaid.startOnLoad&&(a.debug("In start, no config"),t=o.getConfig(),t.startOnLoad&&n.mermaid.init())},"undefined"!=typeof document&&window.addEventListener("load",function(){r.contentLoaded()},!1)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../package.json":107,"./logger":130,"./mermaidAPI":132,he:102}],132:[function(t,e,r){(function(e){"use strict";var n=t("./logger"),i=new n.Log,a=t("./diagrams/flowchart/graphDb"),o=t("./utils"),s=t("./diagrams/flowchart/flowRenderer"),u=t("./diagrams/sequenceDiagram/sequenceRenderer"),c=t("./diagrams/example/exampleRenderer"),l=t("./diagrams/example/parser/example"),h=t("./diagrams/flowchart/parser/flow"),f=t("./diagrams/flowchart/parser/dot"),d=t("./diagrams/sequenceDiagram/parser/sequenceDiagram"),p=t("./diagrams/sequenceDiagram/sequenceDb"),g=t("./diagrams/example/exampleDb"),y=t("./diagrams/gantt/ganttRenderer"),m=t("./diagrams/gantt/parser/gantt"),v=t("./diagrams/gantt/ganttDb"),_=t("./diagrams/classDiagram/parser/classDiagram"),b=t("./diagrams/classDiagram/classRenderer"),w=t("./diagrams/classDiagram/classDb"),A=t("./diagrams/gitGraph/parser/gitGraph"),x=t("./diagrams/gitGraph/gitGraphRenderer"),k=t("./diagrams/gitGraph/gitGraphAst"),E=t("./d3");SVGElement.prototype.getTransformToElement=SVGElement.prototype.getTransformToElement||function(t){return t.getScreenCTM().inverse().multiply(this.getScreenCTM())};var D={logLevel:5,cloneCssStyles:!0,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:{}};n.setLogLevel(D.logLevel);var C=function(t){var e,r=o.detectType(t);switch(r){case"gitGraph":e=A,e.parser.yy=k;break;case"graph":e=h,e.parser.yy=a;break;case"dotGraph":e=f,e.parser.yy=a;break;case"sequenceDiagram":e=d,e.parser.yy=p;break;case"info":e=l,e.parser.yy=g;break;case"gantt":e=m,e.parser.yy=v;break;case"classDiagram":e=_,e.parser.yy=w}try{return e.parse(t),!0}catch(n){return!1}};r.parse=C,r.version=function(){return t("../package.json").version},r.encodeEntities=function(t){var e=t;return e=e.replace(/style.*:\S*#.*;/g,function(t){var e=t.substring(0,t.length-1);return e}),e=e.replace(/classDef.*:\S*#.*;/g,function(t){var e=t.substring(0,t.length-1);return e}),e=e.replace(/#\w+\;/g,function(t){var e=t.substring(1,t.length-1),r=/^\+?\d+$/.test(e);return r?"fl°°"+e+"¶ß":"fl°"+e+"¶ß"})},r.decodeEntities=function(t){var e=t;return e=e.replace(/\fl\°\°/g,function(){return"&#"}),e=e.replace(/\fl\°/g,function(){return"&"}),e=e.replace(/¶ß/g,function(){return";"})};var S=function(t,e,n,l){if("undefined"!=typeof l)l.innerHTML="",E.select(l).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 h=document.querySelector("#d"+t);h&&(h.innerHTML=""),E.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=r.encodeEntities(e);var h=E.select("#d"+t).node(),f=o.detectType(e),d={};switch(f){case"gitGraph":D.flowchart.arrowMarkerAbsolute=D.arrowMarkerAbsolute,x.setConf(D.gitGraph),x.draw(e,t,!1);break;case"graph":D.flowchart.arrowMarkerAbsolute=D.arrowMarkerAbsolute,s.setConf(D.flowchart),s.draw(e,t,!1),D.cloneCssStyles&&(d=s.getClasses(e,!1),o.cloneCssStyles(h.firstChild,d));break;case"dotGraph":D.flowchart.arrowMarkerAbsolute=D.arrowMarkerAbsolute,s.setConf(D.flowchart),s.draw(e,t,!0),D.cloneCssStyles&&(d=s.getClasses(e,!0),o.cloneCssStyles(h.firstChild,d));break;case"sequenceDiagram":D.sequenceDiagram.arrowMarkerAbsolute=D.arrowMarkerAbsolute,u.setConf(D.sequenceDiagram),u.draw(e,t),D.cloneCssStyles&&o.cloneCssStyles(h.firstChild,[]);break;case"gantt":D.gantt.arrowMarkerAbsolute=D.arrowMarkerAbsolute,y.setConf(D.gantt),y.draw(e,t),D.cloneCssStyles&&o.cloneCssStyles(h.firstChild,[]);break;case"classDiagram":D.classDiagram.arrowMarkerAbsolute=D.arrowMarkerAbsolute,b.setConf(D.classDiagram),b.draw(e,t),D.cloneCssStyles&&o.cloneCssStyles(h.firstChild,[]);break;case"info":D.info.arrowMarkerAbsolute=D.arrowMarkerAbsolute,c.draw(e,t,r.version()),D.cloneCssStyles&&o.cloneCssStyles(h.firstChild,[])}E.select("#d"+t).selectAll("foreignobject div").attr("xmlns","http://www.w3.org/1999/xhtml");var p="";D.arrowMarkerAbsolute&&(p=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,p=p.replace(/\(/g,"\\("),p=p.replace(/\)/g,"\\)"));var g=E.select("#d"+t).node().innerHTML.replace(/url\(#arrowhead/g,"url("+p+"#arrowhead","g");g=r.decodeEntities(g),"undefined"!=typeof n?n(g,a.bindFunctions):i.warn("CB = undefined!");var m=E.select("#d"+t).node();return null!==m&&"function"==typeof m.remove&&E.select("#d"+t).node().remove(),g};r.render=function(t,e,r,n){try{if(1===arguments.length&&(e=t,t="mermaidId0"),"undefined"!=typeof document)return S(t,e,r,n)}catch(a){i.warn(a)}};var T=function(t){var e,r=Object.keys(t);for(e=0;e<r.length;e++)if("object"==typeof t[r[e]]){var n,a=Object.keys(t[r[e]]);for(n=0;n<a.length;n++)i.debug("Setting conf ",r[e],"-",a[n]),"undefined"==typeof D[r[e]]&&(D[r[e]]={}),i.debug("Setting config: "+r[e]+" "+a[n]+" to "+t[r[e]][a[n]]),D[r[e]][a[n]]=t[r[e]][a[n]]}else D[r[e]]=t[r[e]]};r.initialize=function(t){i.debug("Initializing mermaidAPI"),"object"==typeof t&&T(t),n.setLogLevel(D.logLevel)},r.getConfig=function(){return D},r.parseError=function(t,r){"undefined"!=typeof mermaid?e.mermaid.parseError(t,r):(i.debug("Mermaid Syntax error:"),i.debug(t))},e.mermaidAPI={render:r.render,parse:r.parse,initialize:r.initialize,detectType:o.detectType,parseError:r.parseError,getConfig:r.getConfig}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../package.json":107,"./d3":108,"./diagrams/classDiagram/classDb":109,"./diagrams/classDiagram/classRenderer":110,"./diagrams/classDiagram/parser/classDiagram":111,"./diagrams/example/exampleDb":112,"./diagrams/example/exampleRenderer":113,"./diagrams/example/parser/example":114,"./diagrams/flowchart/flowRenderer":116,"./diagrams/flowchart/graphDb":117,"./diagrams/flowchart/parser/dot":118,"./diagrams/flowchart/parser/flow":119,"./diagrams/gantt/ganttDb":120,"./diagrams/gantt/ganttRenderer":121,"./diagrams/gantt/parser/gantt":122,"./diagrams/gitGraph/gitGraphAst":123,"./diagrams/gitGraph/gitGraphRenderer":124,"./diagrams/gitGraph/parser/gitGraph":125,"./diagrams/sequenceDiagram/parser/sequenceDiagram":126,"./diagrams/sequenceDiagram/sequenceDb":127,"./diagrams/sequenceDiagram/sequenceRenderer":128,"./logger":130,"./utils":133}],133:[function(t,e,r){"use strict";var n=t("./logger"),i=new n.Log,a=function(t){return t=t.replace(/^\s*%%.*\n/g,"\n"),t.match(/^\s*sequenceDiagram/)?"sequenceDiagram":t.match(/^\s*digraph/)?"dotGraph":t.match(/^\s*info/)?"info":t.match(/^\s*gantt/)?"gantt":t.match(/^\s*classDiagram/)?(i.debug("Detected classDiagram syntax"),"classDiagram"):t.match(/^\s*gitGraph/)?(i.debug("Detected gitGraph syntax"),"gitGraph"):"graph"};r.detectType=a;var o=function(t,e){for(var r,n="",a=document.styleSheets,o=0;o<a.length;o++)if("mermaid-svg-internal-css"!==a[o].title)try{var s=a[o].cssRules;if(null!==s)for(var u=0;u<s.length;u++)if(r=s[u],"undefined"!=typeof r.style){var c;c=t.querySelectorAll(r.selectorText),c.length>0&&(n+=r.selectorText+" { "+r.style.cssText+"}\n")}}catch(l){"undefined"!=typeof r&&i.warn('Invalid CSS selector "'+r.selectorText+'"',l)}var h="",f="";for(var d in e)e.hasOwnProperty(d)&&"undefined"!=typeof d&&("default"===d?(e["default"].styles instanceof Array&&(h+="#"+t.id.trim()+" .node>rect { "+e[d].styles.join("; ")+"; }\n"),e["default"].nodeLabelStyles instanceof Array&&(h+="#"+t.id.trim()+" .node text { "+e[d].nodeLabelStyles.join("; ")+"; }\n"),e["default"].edgeLabelStyles instanceof Array&&(h+="#"+t.id.trim()+" .edgeLabel text { "+e[d].edgeLabelStyles.join("; ")+"; }\n"),e["default"].clusterStyles instanceof Array&&(h+="#"+t.id.trim()+" .cluster rect { "+e[d].clusterStyles.join("; ")+"; }\n")):e[d].styles instanceof Array&&(f+="#"+t.id.trim()+" ."+d+">rect, ."+d+">polygon, ."+d+">circle, ."+d+">ellipse { "+e[d].styles.join("; ")+"; }\n"));if(""!==n||""!==h||""!==f){var p=document.createElement("style");p.setAttribute("type","text/css"),p.setAttribute("title","mermaid-svg-internal-css"),p.innerHTML="/* <![CDATA[ */\n",""!==h&&(p.innerHTML+=h),""!==n&&(p.innerHTML+=n),""!==f&&(p.innerHTML+=f),p.innerHTML+="/* ]]> */\n",t.insertBefore(p,t.firstChild)}};r.cloneCssStyles=o;var s=function(t,e){for(var r=0;r<e.length;r++)if(e[r].match(t))return r;return-1};r.isSubstringInArray=s},{"./logger":130}]},{},[131])(131)}); </script> <style type="text/css">.DiagrammeR,.grViz pre { white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word; } .DiagrammeR g .label { font-family: Helvetica; font-size: 14px; color: #333333; } </style> <script>(function () { var Categories, Color, ColorScale, chromato, CSSColors, Ramp, root, type, _ref, _ref2, _ref3; var __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; child.__super__ = parent.prototype; return child; }; root = typeof exports !== 'undefined' && exports !== null ? exports : this; chromato = (_ref = root.chromato) != null ? _ref : root.chromato = {}; if (typeof module !== 'undefined' && module !== null) module.exports = chromato; Color = (function() { function Color(x, y, z, m) { var me, _ref2; me = this; if (!(x != null) && !(y != null) && !(z != null) && !(m != null)) { x = [255, 0, 255]; } if (type(x) === 'array' && x.length === 3) { if (m == null) m = y; _ref2 = x, x = _ref2[0], y = _ref2[1], z = _ref2[2]; } if (type(x) === 'string') { m = 'hex'; } else { if (m == null) m = 'rgb'; } if (m === 'rgb') { me.rgb = [x, y, z]; } else if (m === 'hsl') { me.rgb = Color.hsl2rgb(x, y, z); } else if (m === 'hsv') { me.rgb = Color.hsv2rgb(x, y, z); } else if (m === 'hex') { me.rgb = Color.hex2rgb(x); } else if (m === 'lab') { me.rgb = Color.lab2rgb(x, y, z); } else if (m === 'hcl') { me.rgb = Color.hcl2rgb(x, y, z); } else if (m === 'hsi') { me.rgb = Color.hsi2rgb(x, y, z); } } Color.prototype.hex = function() { return Color.rgb2hex(this.rgb); }; Color.prototype.toString = function() { return this.hex(); }; Color.prototype.hsl = function() { return Color.rgb2hsl(this.rgb); }; Color.prototype.hsv = function() { return Color.rgb2hsv(this.rgb); }; Color.prototype.lab = function() { return Color.rgb2lab(this.rgb); }; Color.prototype.hcl = function() { return Color.rgb2hcl(this.rgb); }; Color.prototype.hsi = function() { return Color.rgb2hsi(this.rgb); }; Color.prototype.interpolate = function(f, col, m) { var dh, hue, hue0, hue1, lbv, lbv0, lbv1, me, sat, sat0, sat1, xyz0, xyz1; me = this; if (m == null) m = 'rgb'; if (type(col) === 'string') col = new Color(col); if (m === 'hsl' || m === 'hsv' || m === 'hcl' || m === 'hsi') { if (m === 'hsl') { xyz0 = me.hsl(); xyz1 = col.hsl(); } else if (m === 'hsv') { xyz0 = me.hsv(); xyz1 = col.hsv(); } else if (m === 'hcl') { xyz0 = me.hcl(); xyz1 = col.hcl(); } else if (m === 'hsi') { xyz0 = me.hsi(); xyz1 = col.hsi(); } hue0 = xyz0[0], sat0 = xyz0[1], lbv0 = xyz0[2]; hue1 = xyz1[0], sat1 = xyz1[1], lbv1 = xyz1[2]; if (!isNaN(hue0) && !isNaN(hue1)) { if (hue1 > hue0 && hue1 - hue0 > 180) { dh = hue1 - (hue0 + 360); } else if (hue1 < hue0 && hue0 - hue1 > 180) { dh = hue1 + 360 - hue0; } else { dh = hue1 - hue0; } hue = hue0 + f * dh; } else if (!isNaN(hue0)) { hue = hue0; if (lbv1 === 1 || lbv1 === 0) sat = sat0; } else if (!isNaN(hue1)) { hue = hue1; if (lbv0 === 1 || lbv0 === 0) sat = sat1; } else { hue = void 0; } if (sat == null) sat = sat0 + f * (sat1 - sat0); lbv = lbv0 + f * (lbv1 - lbv0); return new Color(hue, sat, lbv, m); } else if (m === 'rgb') { xyz0 = me.rgb; xyz1 = col.rgb; return new Color(xyz0[0] + f * (xyz1[0] - xyz0[0]), xyz0[1] + f * (xyz1[1] - xyz0[1]), xyz0[2] + f * (xyz1[2] - xyz0[2]), m); } else if (m === 'lab') { xyz0 = me.lab(); xyz1 = col.lab(); return new Color(xyz0[0] + f * (xyz1[0] - xyz0[0]), xyz0[1] + f * (xyz1[1] - xyz0[1]), xyz0[2] + f * (xyz1[2] - xyz0[2]), m); } else { throw m + ' is not supported as a color mode'; } }; return Color; })(); Color.hex2rgb = function(hex) { var b, g, r, u; if (!hex.match(/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/)) { if ((chromato.colors != null) && chromato.colors[hex]) { hex = chromato.colors[hex]; } else { throw 'This color format is unknown: ' + hex; } } if (hex.length === 4 || hex.length === 7) hex = hex.substr(1); if (hex.length === 3) { hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2]; } u = parseInt(hex, 16); r = u >> 16; g = u >> 8 & 0xFF; b = u & 0xFF; return [r, g, b]; }; Color.rgb2hex = function(r, g, b) { var str, u, _ref2; if (r !== void 0 && r.length === 3) { _ref2 = r, r = _ref2[0], g = _ref2[1], b = _ref2[2]; } u = r << 16 | g << 8 | b; str = '000000' + u.toString(16).toUpperCase(); return '#' + str.substr(str.length - 6); }; Color.hsv2rgb = function(h, s, v) { var b, f, g, i, l, p, q, r, t, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8; if (type(h) === 'array' && h.length === 3) { _ref2 = h, h = _ref2[0], s = _ref2[1], l = _ref2[2]; } v *= 255; if (s === 0 && isNaN(h)) { r = g = b = v; } else { if (h === 360) h = 0; if (h > 360) h -= 360; if (h < 0) h += 360; h /= 60; i = Math.floor(h); f = h - i; p = v * (1 - s); q = v * (1 - s * f); t = v * (1 - s * (1 - f)); switch (i) { case 0: _ref3 = [v, t, p], r = _ref3[0], g = _ref3[1], b = _ref3[2]; break; case 1: _ref4 = [q, v, p], r = _ref4[0], g = _ref4[1], b = _ref4[2]; break; case 2: _ref5 = [p, v, t], r = _ref5[0], g = _ref5[1], b = _ref5[2]; break; case 3: _ref6 = [p, q, v], r = _ref6[0], g = _ref6[1], b = _ref6[2]; break; case 4: _ref7 = [t, p, v], r = _ref7[0], g = _ref7[1], b = _ref7[2]; break; case 5: _ref8 = [v, p, q], r = _ref8[0], g = _ref8[1], b = _ref8[2]; } } r = Math.round(r); g = Math.round(g); b = Math.round(b); return [r, g, b]; }; Color.rgb2hsv = function(r, g, b) { var delta, h, max, min, s, v, _ref2; if (r !== void 0 && r.length === 3) { _ref2 = r, r = _ref2[0], g = _ref2[1], b = _ref2[2]; } min = Math.min(r, g, b); max = Math.max(r, g, b); delta = max - min; v = max / 255.0; s = delta / max; if (s === 0) { h = void 0; s = 0; } else { if (r === max) h = (g - b) / delta; if (g === max) h = 2 + (b - r) / delta; if (b === max) h = 4 + (r - g) / delta; h *= 60; if (h < 0) h += 360; } return [h, s, v]; }; Color.hsl2rgb = function(h, s, l) { var b, c, g, i, r, t1, t2, t3, _ref2, _ref3; if (h !== void 0 && h.length === 3) { _ref2 = h, h = _ref2[0], s = _ref2[1], l = _ref2[2]; } if (s === 0) { r = g = b = l * 255; } else { t3 = [0, 0, 0]; c = [0, 0, 0]; t2 = l < 0.5 ? l * (1 + s) : l + s - l * s; t1 = 2 * l - t2; h /= 360; t3[0] = h + 1 / 3; t3[1] = h; t3[2] = h - 1 / 3; for (i = 0; i <= 2; i++) { if (t3[i] < 0) t3[i] += 1; if (t3[i] > 1) t3[i] -= 1; if (6 * t3[i] < 1) { c[i] = t1 + (t2 - t1) * 6 * t3[i]; } else if (2 * t3[i] < 1) { c[i] = t2; } else if (3 * t3[i] < 2) { c[i] = t1 + (t2 - t1) * ((2 / 3) - t3[i]) * 6; } else { c[i] = t1; } } _ref3 = [Math.round(c[0] * 255), Math.round(c[1] * 255), Math.round(c[2] * 255)], r = _ref3[0], g = _ref3[1], b = _ref3[2]; } return [r, g, b]; }; Color.rgb2hsl = function(r, g, b) { var h, l, max, min, s, _ref2; if (r !== void 0 && r.length === 3) { _ref2 = r, r = _ref2[0], g = _ref2[1], b = _ref2[2]; } r /= 255; g /= 255; b /= 255; min = Math.min(r, g, b); max = Math.max(r, g, b); l = (max + min) / 2; if (max === min) { s = 0; h = void 0; } else { s = l < 0.5 ? (max - min) / (max + min) : (max - min) / (2 - max - min); } if (r === max) { h = (g - b) / (max - min); } else if (g === max) { h = 2 + (b - r) / (max - min); } else if (b === max) { h = 4 + (r - g) / (max - min); } h *= 60; if (h < 0) h += 360; return [h, s, l]; }; Color.lab2xyz = function(l, a, b) { var finv, ill, sl, x, y, z, _ref2; if (type(l) === 'array' && l.length === 3) { _ref2 = l, l = _ref2[0], a = _ref2[1], b = _ref2[2]; } finv = function(t) { if (t > (6.0 / 29.0)) { return t * t * t; } else { return 3 * (6.0 / 29.0) * (6.0 / 29.0) * (t - 4.0 / 29.0); } }; sl = (l + 0.16) / 1.16; ill = [0.96421, 1.00000, 0.82519]; y = ill[1] * finv(sl); x = ill[0] * finv(sl + (a / 5.0)); z = ill[2] * finv(sl - (b / 2.0)); return [x, y, z]; }; Color.xyz2rgb = function(x, y, z) { var b, bl, clip, correct, g, gl, r, rl, _ref2, _ref3; if (type(x) === 'array' && x.length === 3) { _ref2 = x, x = _ref2[0], y = _ref2[1], z = _ref2[2]; } rl = 3.2406 * x - 1.5372 * y - 0.4986 * z; gl = -0.9689 * x + 1.8758 * y + 0.0415 * z; bl = 0.0557 * x - 0.2040 * y + 1.0570 * z; clip = Math.min(rl, gl, bl) < -0.001 || Math.max(rl, gl, bl) > 1.001; if (clip) { rl = rl < 0.0 ? 0.0 : rl > 1.0 ? 1.0 : rl; gl = gl < 0.0 ? 0.0 : gl > 1.0 ? 1.0 : gl; bl = bl < 0.0 ? 0.0 : bl > 1.0 ? 1.0 : bl; } if (clip) { _ref3 = [void 0, void 0, void 0], rl = _ref3[0], gl = _ref3[1], bl = _ref3[2]; } correct = function(cl) { var a; a = 0.055; if (cl <= 0.0031308) { return 12.92 * cl; } else { return (1 + a) * Math.pow(cl, 1 / 2.4) - a; } }; r = Math.round(255.0 * correct(rl)); g = Math.round(255.0 * correct(gl)); b = Math.round(255.0 * correct(bl)); return [r, g, b]; }; Color.lab2rgb = function(l, a, b) { var x, y, z, _ref2, _ref3, _ref4; if (l !== void 0 && l.length === 3) { _ref2 = l, l = _ref2[0], a = _ref2[1], b = _ref2[2]; } if (l !== void 0 && l.length === 3) { _ref3 = l, l = _ref3[0], a = _ref3[1], b = _ref3[2]; } _ref4 = Color.lab2xyz(l, a, b), x = _ref4[0], y = _ref4[1], z = _ref4[2]; return Color.xyz2rgb(x, y, z); }; Color.hcl2lab = function(c, s, l) { var L, tau_const, a, angle, b, r, _ref2; if (type(c) === 'array' && c.length === 3) { _ref2 = c, c = _ref2[0], s = _ref2[1], l = _ref2[2]; } c /= 360.0; tau_const = 6.283185307179586476925287; L = l * 0.61 + 0.09; angle = tau_const / 6.0 - c * tau_const; r = (l * 0.311 + 0.125) * s; a = Math.sin(angle) * r; b = Math.cos(angle) * r; return [L, a, b]; }; Color.hcl2rgb = function(c, s, l) { var L, a, b, _ref2; _ref2 = Color.hcl2lab(c, s, l), L = _ref2[0], a = _ref2[1], b = _ref2[2]; return Color.lab2rgb(L, a, b); }; Color.rgb2xyz = function(r, g, b) { var bl, correct, gl, rl, x, y, z, _ref2; if (r !== void 0 && r.length === 3) { _ref2 = r, r = _ref2[0], g = _ref2[1], b = _ref2[2]; } correct = function(c) { var a; a = 0.055; if (c <= 0.04045) { return c / 12.92; } else { return Math.pow((c + a) / (1 + a), 2.4); } }; rl = correct(r / 255.0); gl = correct(g / 255.0); bl = correct(b / 255.0); x = 0.4124 * rl + 0.3576 * gl + 0.1805 * bl; y = 0.2126 * rl + 0.7152 * gl + 0.0722 * bl; z = 0.0193 * rl + 0.1192 * gl + 0.9505 * bl; return [x, y, z]; }; Color.xyz2lab = function(x, y, z) { var a, b, f, ill, l, _ref2; if (x !== void 0 && x.length === 3) { _ref2 = x, x = _ref2[0], y = _ref2[1], z = _ref2[2]; } ill = [0.96421, 1.00000, 0.82519]; f = function(t) { if (t > Math.pow(6.0 / 29.0, 3)) { return Math.pow(t, 1 / 3); } else { return (1 / 3) * (29 / 6) * (29 / 6) * t + 4.0 / 29.0; } }; l = 1.16 * f(y / ill[1]) - 0.16; a = 5 * (f(x / ill[0]) - f(y / ill[1])); b = 2 * (f(y / ill[1]) - f(z / ill[2])); return [l, a, b]; }; Color.rgb2lab = function(r, g, b) { var x, y, z, _ref2, _ref3; if (r !== void 0 && r.length === 3) { _ref2 = r, r = _ref2[0], g = _ref2[1], b = _ref2[2]; } _ref3 = Color.rgb2xyz(r, g, b), x = _ref3[0], y = _ref3[1], z = _ref3[2]; return Color.xyz2lab(x, y, z); }; Color.lab2hcl = function(l, a, b) { var L, tau_const, angle, c, r, s, _ref2; if (type(l) === 'array' && l.length === 3) { _ref2 = l, l = _ref2[0], a = _ref2[1], b = _ref2[2]; } L = l; l = (l - 0.09) / 0.61; r = Math.sqrt(a * a + b * b); s = r / (l * 0.311 + 0.125); tau_const = 6.283185307179586476925287; angle = Math.atan2(a, b); c = (tau_const / 6 - angle) / tau_const; c *= 360; if (c < 0) c += 360; return [c, s, l]; }; Color.rgb2hcl = function(r, g, b) { var a, l, _ref2, _ref3; if (type(r) === 'array' && r.length === 3) { _ref2 = r, r = _ref2[0], g = _ref2[1], b = _ref2[2]; } _ref3 = Color.rgb2lab(r, g, b), l = _ref3[0], a = _ref3[1], b = _ref3[2]; return Color.lab2hcl(l, a, b); }; Color.rgb2hsi = function(r, g, b) { var pi_const_x2, h, i, min, s, _ref2; if (type(r) === 'array' && r.length === 3) { _ref2 = r, r = _ref2[0], g = _ref2[1], b = _ref2[2]; } pi_const_x2 = Math.PI * 2; r /= 255; g /= 255; b /= 255; min = Math.min(r, g, b); i = (r + g + b) / 3; s = 1 - min / i; if (s === 0) { h = 0; } else { h = ((r - g) + (r - b)) / 2; h /= Math.sqrt((r - g) * (r - g) + (r - b) * (g - b)); h = Math.acos(h); if (b > g) h = pi_const_x2 - h; h /= pi_const_x2; } return [h * 360, s, i]; }; Color.hsi2rgb = function(h, s, i) { var pi_const_div3, pi_const_x2, b, cos, g, r, _ref2; if (type(h) === 'array' && h.length === 3) { _ref2 = h, h = _ref2[0], s = _ref2[1], i = _ref2[2]; } pi_const_x2 = Math.PI * 2; pi_const_div3 = Math.PI / 3; cos = Math.cos; if (h < 0) h += 360; if (h > 360) h -= 360; h /= 360; if (h < 1 / 3) { b = (1 - s) / 3; r = (1 + s * cos(pi_const_x2 * h) / cos(pi_const_div3 - pi_const_x2 * h)) / 3; g = 1 - (b + r); } else if (h < 2 / 3) { h -= 1 / 3; r = (1 - s) / 3; g = (1 + s * cos(pi_const_x2 * h) / cos(pi_const_div3 - pi_const_x2 * h)) / 3; b = 1 - (r + g); } else { h -= 2 / 3; g = (1 - s) / 3; b = (1 + s * cos(pi_const_x2 * h) / cos(pi_const_div3 - pi_const_x2 * h)) / 3; r = 1 - (g + b); } r = i * r * 3; g = i * g * 3; b = i * b * 3; return [r * 255, g * 255, b * 255]; }; chromato.Color = Color; chromato.hsl = function(h, s, l) { return new Color(h, s, l, 'hsl'); }; chromato.hsv = function(h, s, v) { return new Color(h, s, v, 'hsv'); }; chromato.rgb = function(r, g, b) { return new Color(r, g, b, 'rgb'); }; chromato.hex = function(x) { return new Color(x); }; chromato.lab = function(l, a, b) { return new Color(l, a, b, 'lab'); }; chromato.hcl = function(c, s, l) { return new Color(c, s, l, 'hcl'); }; chromato.hsi = function(h, s, i) { return new Color(h, s, i, 'hsi'); }; chromato.interpolate = function(a, b, f, m) { if (type(a) === 'string') a = new Color(a); if (type(b) === 'string') b = new Color(b); return a.interpolate(f, b, m); }; ColorScale = (function() { function ColorScale(opts) { var c, col, cols, me, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7; me = this; me.colors = cols = (_ref2 = opts.colors) != null ? _ref2 : ['#ddd', '#222']; for (c = 0, _ref3 = cols.length - 1; 0 <= _ref3 ? c <= _ref3 : c >= _ref3; 0 <= _ref3 ? c++ : c--) { col = cols[c]; if (type(col) === 'string') cols[c] = new Color(col); } if (opts.positions != null) { me.pos = opts.positions; } else { me.pos = []; for (c = 0, _ref4 = cols.length - 1; 0 <= _ref4 ? c <= _ref4 : c >= _ref4; 0 <= _ref4 ? c++ : c--) { me.pos.push(c / (cols.length - 1)); } } me.mode = (_ref5 = opts.mode) != null ? _ref5 : 'hsv'; me.nacol = (_ref6 = opts.nacol) != null ? _ref6 : '#ccc'; me.setClasses((_ref7 = opts.limits) != null ? _ref7 : [0, 1]); me; } ColorScale.prototype.getColor = function(value) { var c, f, f0, me; me = this; if (isNaN(value)) return me.nacol; if (me.classLimits.length > 2) { c = me.getClass(value); f = c / (me.numClasses - 1); } else { f = f0 = (value - me.min) / (me.max - me.min); f = Math.min(1, Math.max(0, f)); } return me.fColor(f); }; ColorScale.prototype.fColor = function(f) { var col, cols, i, me, p, _ref2; me = this; cols = me.colors; for (i = 0, _ref2 = me.pos.length - 1; 0 <= _ref2 ? i <= _ref2 : i >= _ref2; 0 <= _ref2 ? i++ : i--) { p = me.pos[i]; if (f <= p) { col = cols[i]; break; } if (f >= p && i === me.pos.length - 1) { col = cols[i]; break; } if (f > p && f < me.pos[i + 1]) { f = (f - p) / (me.pos[i + 1] - p); col = chromato.interpolate(cols[i], cols[i + 1], f, me.mode); break; } } return col; }; ColorScale.prototype.classifyValue = function(value) { var i, limits, maxc, minc, n, self; self = this; limits = self.classLimits; if (limits.length > 2) { n = limits.length - 1; i = self.getClass(value); value = limits[i] + (limits[i + 1] - limits[i]) * 0.5; minc = limits[0]; maxc = limits[n - 1]; value = self.min + ((value - minc) / (maxc - minc)) * (self.max - self.min); } return value; }; ColorScale.prototype.setClasses = function(limits) { var me; if (limits == null) limits = []; me = this; me.classLimits = limits; me.min = limits[0]; me.max = limits[limits.length - 1]; if (limits.length === 2) { return me.numClasses = 0; } else { return me.numClasses = limits.length - 1; } }; ColorScale.prototype.getClass = function(value) { var i, limits, n, self; self = this; limits = self.classLimits; if (limits != null) { n = limits.length - 1; i = 0; while (i < n && value >= limits[i]) { i++; } return i - 1; } }; ColorScale.prototype.validValue = function(value) { return !isNaN(value); }; return ColorScale; })(); chromato.ColorScale = ColorScale; Ramp = (function() { __extends(Ramp, ColorScale); function Ramp(col0, col1, mode) { if (col0 == null) col0 = '#fe0000'; if (col1 == null) col1 = '#feeeee'; if (mode == null) mode = 'hsl'; Ramp.__super__.constructor.call(this, [col0, col1], [0, 1], mode); } return Ramp; })(); chromato.Ramp = Ramp; Categories = (function() { __extends(Categories, ColorScale); function Categories(colors) { var me; me = this; me.colors = colors; } Categories.prototype.parseData = function(data, data_col) {}; Categories.prototype.getColor = function(value) { var me; me = this; if (me.colors.hasOwnProperty(value)) { return me.colors[value]; } else { return '#cccccc'; } }; Categories.prototype.validValue = function(value) { return this.colors.hasOwnProperty(value); }; return Categories; })(); chromato.Categories = Categories; CSSColors = (function() { __extends(CSSColors, ColorScale); function CSSColors(name) { var me; me = this; me.name = name; me.setClasses(7); me; } CSSColors.prototype.getColor = function(value) { var c, me; me = this; c = me.getClass(value); return me.name + ' l' + me.numClasses + ' c' + c; }; return CSSColors; })(); chromato.CSSColors = CSSColors; if ((_ref2 = chromato.scales) == null) chromato.scales = {}; chromato.limits = function(data, mode, num, prop) { var assignments, best, centroids, cluster, clusterSizes, dist, i, j, k, kClusters, limits, max, min, mindist, n, nb_iters, newCentroids, p, pb, pr, repeat, row, sum, tmpKMeansBreaks, val, value, values, _i, _j, _k, _len, _len2, _len3, _ref10, _ref11, _ref12, _ref13, _ref14, _ref15, _ref16, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9; if (mode == null) mode = 'equal'; if (num == null) num = 7; if (prop == null) prop = null; min = Number.MAX_VALUE; max = Number.MAX_VALUE * -1; sum = 0; values = []; if (type(data) === 'array') { if (type(data[0]) !== 'object' && type(data[0]) !== 'array') { for (_i = 0, _len = data.length; _i < _len; _i++) { val = data[_i]; if (!isNaN(val)) values.push(Number(val)); } } else { for (_j = 0, _len2 = data.length; _j < _len2; _j++) { row = data[_j]; values.push(Number(row[prop])); } } } else if (type(data) === 'object') { for (k in data) { val = data[k]; if (type(val) === 'object' && type(prop) === 'string') { if (!isNaN(val[prop])) values.push(Number(val[prop])); } else if (type(val) === 'array' && type(prop) === 'number') { if (!isNaN(val[prop])) values.push(Number(val[prop])); } else if (type(val) === 'number') { if (!isNaN(val)) values.push(Number(val)); } } } for (_k = 0, _len3 = values.length; _k < _len3; _k++) { val = values[_k]; if (!!isNaN(val)) continue; if (val < min) min = val; if (val > max) max = val; sum += val; } values = values.sort(function(a, b) { return a - b; }); limits = []; if (mode.substr(0, 1) === 'c') { limits.push(min); limits.push(max); } if (mode.substr(0, 1) === 'e') { limits.push(min); for (i = 1, _ref3 = num - 1; 1 <= _ref3 ? i <= _ref3 : i >= _ref3; 1 <= _ref3 ? i++ : i--) { limits.push(min + (i / num) * (max - min)); } limits.push(max); } else if (mode.substr(0, 1) === 'q') { limits.push(min); for (i = 1, _ref4 = num - 1; 1 <= _ref4 ? i <= _ref4 : i >= _ref4; 1 <= _ref4 ? i++ : i--) { p = values.length * i / num; pb = Math.floor(p); if (pb === p) { limits.push(values[pb]); } else { pr = p - pb; limits.push(values[pb] * pr + values[pb + 1] * (1 - pr)); } } limits.push(max); } else if (mode.substr(0, 1) === 'k') { n = values.length; assignments = new Array(n); clusterSizes = new Array(num); repeat = true; nb_iters = 0; centroids = null; centroids = []; centroids.push(min); for (i = 1, _ref5 = num - 1; 1 <= _ref5 ? i <= _ref5 : i >= _ref5; 1 <= _ref5 ? i++ : i--) { centroids.push(min + (i / num) * (max - min)); } centroids.push(max); while (repeat) { for (j = 0, _ref6 = num - 1; 0 <= _ref6 ? j <= _ref6 : j >= _ref6; 0 <= _ref6 ? j++ : j--) { clusterSizes[j] = 0; } for (i = 0, _ref7 = n - 1; 0 <= _ref7 ? i <= _ref7 : i >= _ref7; 0 <= _ref7 ? i++ : i--) { value = values[i]; mindist = Number.MAX_VALUE; for (j = 0, _ref8 = num - 1; 0 <= _ref8 ? j <= _ref8 : j >= _ref8; 0 <= _ref8 ? j++ : j--) { dist = Math.abs(centroids[j] - value); if (dist < mindist) { mindist = dist; best = j; } } clusterSizes[best]++; assignments[i] = best; } newCentroids = new Array(num); for (j = 0, _ref9 = num - 1; 0 <= _ref9 ? j <= _ref9 : j >= _ref9; 0 <= _ref9 ? j++ : j--) { newCentroids[j] = null; } for (i = 0, _ref10 = n - 1; 0 <= _ref10 ? i <= _ref10 : i >= _ref10; 0 <= _ref10 ? i++ : i--) { cluster = assignments[i]; if (newCentroids[cluster] === null) { newCentroids[cluster] = values[i]; } else { newCentroids[cluster] += values[i]; } } for (j = 0, _ref11 = num - 1; 0 <= _ref11 ? j <= _ref11 : j >= _ref11; 0 <= _ref11 ? j++ : j--) { newCentroids[j] *= 1 / clusterSizes[j]; } repeat = false; for (j = 0, _ref12 = num - 1; 0 <= _ref12 ? j <= _ref12 : j >= _ref12; 0 <= _ref12 ? j++ : j--) { if (newCentroids[j] !== centroids[i]) { repeat = true; break; } } centroids = newCentroids; nb_iters++; if (nb_iters > 200) repeat = false; } kClusters = {}; for (j = 0, _ref13 = num - 1; 0 <= _ref13 ? j <= _ref13 : j >= _ref13; 0 <= _ref13 ? j++ : j--) { kClusters[j] = []; } for (i = 0, _ref14 = n - 1; 0 <= _ref14 ? i <= _ref14 : i >= _ref14; 0 <= _ref14 ? i++ : i--) { cluster = assignments[i]; kClusters[cluster].push(values[i]); } tmpKMeansBreaks = []; for (j = 0, _ref15 = num - 1; 0 <= _ref15 ? j <= _ref15 : j >= _ref15; 0 <= _ref15 ? j++ : j--) { tmpKMeansBreaks.push(kClusters[j][0]); tmpKMeansBreaks.push(kClusters[j][kClusters[j].length - 1]); } tmpKMeansBreaks = tmpKMeansBreaks.sort(function(a, b) { return a - b; }); limits.push(tmpKMeansBreaks[0]); for (i = 1, _ref16 = tmpKMeansBreaks.length - 1; i <= _ref16; i += 2) { if (!isNaN(tmpKMeansBreaks[i])) limits.push(tmpKMeansBreaks[i]); } } return limits; }; root = typeof exports !== 'undefined' && exports !== null ? exports : this; type = (function() { var classToType, name, _i, _len, _ref3; classToType = {}; _ref3 = 'Boolean Number String Function Array Date RegExp Undefined Null'.split(' '); for (_i = 0, _len = _ref3.length; _i < _len; _i++) { name = _ref3[_i]; classToType['[object ' + name + ']'] = name.toLowerCase(); } return function(obj) { var strType; strType = Object.prototype.toString.call(obj); return classToType[strType] || 'object'; }; })(); if ((_ref3 = root.type) == null) root.type = type; Array.max = function(array) { return Math.max.apply(Math, array); }; Array.min = function(array) { return Math.min.apply(Math, array); }; }).call(this); var createPalette = { generate: function(colorsCount, checkColor, forceMode, quality, ultra_precision){ if(colorsCount === undefined) colorsCount = 8; if(checkColor === undefined) checkColor = function(x){return true;}; if(forceMode === undefined) forceMode = false; if(quality === undefined) quality = 50; ultra_precision = ultra_precision || false if(forceMode){ var colors = []; function checkLab(lab){ var color = chromato.lab(lab[0], lab[1], lab[2]); return !isNaN(color.rgb[0]) && color.rgb[0] >= 0 && color.rgb[1] >= 0 && color.rgb[2] >= 0 && color.rgb[0] < 256 && color.rgb[1] < 256 && color.rgb[2] < 256 && checkColor(color); } var vectors = {}; for(i = 0; i < colorsCount; i++){ var color = [Math.random(), 2 * Math.random() - 1, 2 * Math.random() - 1]; while(!checkLab(color)){ color = [Math.random(), 2 * Math.random() - 1, 2 * Math.random() - 1]; } colors.push(color); } var repulsion = 0.3; var speed = 0.05; var steps = quality * 20; while(steps-- > 0){ for(i = 0; i < colors.length; i++){ vectors[i] = {dl:0, da:0, db:0}; } for(i = 0; i < colors.length; i++){ var color_a = colors[i]; for(j = 0; j < i; j++){ var color_b = colors[j]; var dl = color_a[0] - color_b[0]; var da = color_a[1] - color_b[1]; var db = color_a[2] - color_b[2]; var d = Math.sqrt(Math.pow(dl, 2) + Math.pow(da, 2) + Math.pow(db, 2)); if(d > 0){ var force = repulsion / Math.pow(d, 2); vectors[i].dl += dl * force / d; vectors[i].da += da * force / d; vectors[i].db += db * force / d; vectors[j].dl -= dl * force / d; vectors[j].da -= da * force / d; vectors[j].db -= db * force / d; } else { vectors[j].dl += 0.02 - 0.04 * Math.random(); vectors[j].da += 0.02 - 0.04 * Math.random(); vectors[j].db += 0.02 - 0.04 * Math.random(); } } } for(i = 0; i < colors.length; i++){ var color = colors[i]; var displacement = speed * Math.sqrt(Math.pow(vectors[i].dl, 2) + Math.pow(vectors[i].da, 2) + Math.pow(vectors[i].db, 2)); if(displacement>0){ var ratio = speed * Math.min(0.1, displacement)/displacement; candidateLab = [color[0] + vectors[i].dl * ratio, color[1] + vectors[i].da * ratio, color[2] + vectors[i].db * ratio]; if(checkLab(candidateLab)){ colors[i] = candidateLab; } } } } return colors.map(function(lab){return chromato.lab(lab[0], lab[1], lab[2]);}); } else { function checkColor2(color){ var lab = color.lab(); var hcl = color.hcl(); return !isNaN(color.rgb[0]) && color.rgb[0] >= 0 && color.rgb[1] >= 0 && color.rgb[2] >= 0 && color.rgb[0]<256 && color.rgb[1]<256 && color.rgb[2]<256 && checkColor(color); } var kMeans = []; for(i = 0; i < colorsCount; i++){ var lab = [Math.random(), 2 * Math.random() - 1, 2 * Math.random() - 1]; while(!checkColor2(chromato.lab(lab))){ lab = [Math.random(), 2 * Math.random() - 1, 2 * Math.random() - 1]; } kMeans.push(lab); } var colorSamples = []; var samplesClosest = []; if(ultra_precision){ for(l = 0; l <= 1; l += 0.01){ for(a =- 1; a <= 1; a += 0.05){ for(b =- 1; b <= 1; b += 0.05){ if(checkColor2(chromato.lab(l, a, b))){ colorSamples.push([l, a, b]); samplesClosest.push(null); } } } } } else { for(l = 0; l <= 1; l += 0.05){ for(a =- 1; a <= 1; a += 0.1){ for(b =- 1; b <= 1; b += 0.1){ if(checkColor2(chromato.lab(l, a, b))){ colorSamples.push([l, a, b]); samplesClosest.push(null); } } } } } var steps = quality; while(steps-- > 0){ for(i = 0; i < colorSamples.length; i++){ var lab = colorSamples[i]; var min_dist = 1000000; for(j = 0; j < kMeans.length; j++){ var kMean = kMeans[j]; var distance = Math.sqrt(Math.pow(lab[0] - kMean[0], 2) + Math.pow(lab[1]-kMean[1], 2) + Math.pow(lab[2] - kMean[2], 2)); if(distance < min_dist){ min_dist = distance; samplesClosest[i] = j; } } } var freeColorSamples = colorSamples.slice(0); for(j = 0; j < kMeans.length; j++){ var count = 0; var candidateKMean = [0, 0, 0]; for(i = 0; i < colorSamples.length; i++){ if(samplesClosest[i] == j){ count++; candidateKMean[0] += colorSamples[i][0]; candidateKMean[1] += colorSamples[i][1]; candidateKMean[2] += colorSamples[i][2]; } } if(count != 0){ candidateKMean[0] /= count; candidateKMean[1] /= count; candidateKMean[2] /= count; } if(count != 0 && checkColor2(chromato.lab(candidateKMean[0], candidateKMean[1], candidateKMean[2])) && candidateKMean){ kMeans[j] = candidateKMean; } else { if(freeColorSamples.length>0){ var min_dist = 10000000000; var closest = -1; for(i = 0; i<freeColorSamples.length; i++){ var distance = Math.sqrt(Math.pow(freeColorSamples[i][0] - candidateKMean[0], 2) + Math.pow(freeColorSamples[i][1] - candidateKMean[1], 2) + Math.pow(freeColorSamples[i][2] - candidateKMean[2], 2)); if(distance < min_dist){ min_dist = distance; closest = i; } } kMeans[j] = colorSamples[closest]; } else { var min_dist = 10000000000; var closest = -1; for(i = 0; i < colorSamples.length; i++){ var distance = Math.sqrt(Math.pow(colorSamples[i][0] - candidateKMean[0], 2) + Math.pow(colorSamples[i][1]-candidateKMean[1], 2) + Math.pow(colorSamples[i][2] - candidateKMean[2], 2)); if(distance < min_dist){ min_dist = distance; closest = i; } } kMeans[j] = colorSamples[closest]; } } freeColorSamples = freeColorSamples.filter(function(color){ return color[0] != kMeans[j][0] || color[1] != kMeans[j][1] || color[2] != kMeans[j][2]; }); } } return kMeans.map(function(lab){return chromato.lab(lab[0], lab[1], lab[2]);}); } }, diffSort: function(colorsToSort){ var diffColors = [colorsToSort.shift()]; while(colorsToSort.length > 0){ var index = -1; var maxDistance = -1; for(candidate_index = 0; candidate_index < colorsToSort.length; candidate_index++){ var d = 1000000000; for(i = 0; i < diffColors.length; i++){ var color_a = colorsToSort[candidate_index].lab(); var color_b = diffColors[i].lab(); var dl = color_a[0] - color_b[0]; var da = color_a[1] - color_b[1]; var db = color_a[2] - color_b[2]; d = Math.min(d, Math.sqrt(Math.pow(dl, 2)+Math.pow(da, 2)+Math.pow(db, 2))); } if(d > maxDistance){ maxDistance = d; index = candidate_index; } } var color = colorsToSort[index]; diffColors.push(color); colorsToSort = colorsToSort.filter(function(c,i){return i != index;}); } return diffColors; } } </script> <script>HTMLWidgets.widget({ name: 'DiagrammeR', type: 'output', initialize: function(el, width, height) { /* wait to initialize until renderValue since x not provided until then and mermaid will try to build the diagram as soon as class of the div is set to "mermaid" */ /* to prevent auto init() by mermaid not documented but see lines https://github.com/knsv/mermaid/blob/master/src/main.js#L100-L109 mermaid_config in global with mermaid_config.startOnLoad = false appears to turn off the auto init behavior allowing us to callback after manually init and then callback after complete */ window.mermaid.startOnLoad = false; // set config options for Gantt // undocumented but these can be provided // so from R // m1 <- mermaid(spec) // m1$x$config = list(ganttConfig = list( barHeight = 100 ) ) mermaid.ganttConfig = { titleTopMargin:25, barHeight:20, barGap:4, topPadding:50, sidePadding:100, gridLineStartPadding:35, fontSize:11, numberSectionStyles:4, axisFormatter: [ // Within a day ["%I:%M", function (d) { return d.getHours(); }], // Monday a week ["w. %U", function (d) { return d.getDay() == 1; }], // Day within a week (not monday) ["%a %d", function (d) { return d.getDay() && d.getDate() != 1; }], // within a month ["%b %d", function (d) { return d.getDate() != 1; }], // Month ["%m-%y", function (d) { return d.getMonth(); }] ] }; return { // TODO: add instance fields as required } }, renderValue: function(el, x, instance) { // if no diagram provided then assume // that the diagrams are provided through htmltools tags // and DiagrammeR was just used for dependencies if ( x.diagram != "" ) { el.innerHTML = x.diagram; //if dynamic such as shiny remove data-processed // so mermaid will reprocess and redraw el.removeAttribute("data-processed"); el.classList.add('mermaid'); //make sure if shiny that we turn display back on el.style.display = ""; //again if dynamic such as shiny // explicitly run mermaid.init() } else { // set display to none // should we remove instead?? el.style.display = "none"; } // check for undocumented ganttConfig // to override the defaults manually entered // in initialize above // note this is really sloppy and will not // work well if multiple gantt charts // with custom configs here if( typeof x.config !== "undefined" && typeof x.config.ganttConfig !== "undefined" ){ Object.keys(x.config.ganttConfig).map(function(k){ window.mermaid.ganttConfig[k] = x.config.ganttConfig[k]; }) } // use this to sort of make our diagram responsive // or at a minimum fit within the bounds set by htmlwidgets // for the parent container function makeResponsive(el){ var svg = el.getElementsByTagName("svg")[0]; if(svg){ if(svg.width) {svg.removeAttribute("width")}; if(svg.height) {svg.removeAttribute("height")}; svg.style.width = "100%"; svg.style.height = "100%"; } }; // get all DiagrammeR mermaids widgets dg = document.getElementsByClassName("DiagrammeR"); // run mermaid.init // but use try catch block // to send error to the htmlwidget for display try{ mermaid.init( el ); // sort of make our diagram responsive // should we make this an option? // if so, then could easily add to list of post process tasks makeResponsive( el ); if (HTMLWidgets.shinyMode) { // Get widget id var id = el.id; $("#" + id + " .node").click(function(e) { // Build return object *obj* with node-id and node textContent var obj = { id: e.currentTarget.id, nodeValues: e.currentTarget.textContent }; // Send *obj* to Shiny's inputs (input$[id]+_click e.g.: input$vtree_click)) Shiny.setInputValue(id + "_click", obj, {priority: "event"}); }); } /* // change the id of our SVG assigned by mermaid to prevent conflict // mermaid.init has a counter that will reset to 0 // and cause duplication of SVG id if multiple d3.select(el).select("svg") .attr("id", "mermaidChart-" + el.id); // now we have to change the styling assigned by mermaid // to point to our new id that we have assigned // will add if since sequence diagrams do not have stylesheet if(d3.select(el).select("svg").select("style")[0][0]){ d3.select(el).select("svg").select("style")[0][0].innerHTML = d3.select(el).select("svg") .select("style")[0][0].innerHTML */ /// sep comment for / in regex .replace(/mermaidChart[0-9]*/gi, "mermaidChart-" + el.id); /*} */ // set up a container for tasks to perform after completion // one example would be add callbacks for event handling // styling if (!(typeof x.tasks === "undefined") ){ if ( (typeof x.tasks.length === "undefined") || (typeof x.tasks === "function" ) ) { // handle a function not enclosed in array // should be able to remove once using jsonlite x.tasks = [x.tasks]; } x.tasks.map(function(t){ // for each tasks add it to the mermaid.tasks with el t.call(el); }) } } catch(e) { // if error look for last processed DiagrammeR // and send error to the container div // with pre containing the errors var processedDg = d3.selectAll(".DiagrammeR[data-processed=true]"); // select the last processedDg = d3.select(processedDg[0][processedDg[0].length - 1]) // remove the svg processedDg.select("svg").remove(); //if dynamic such as shiny remove data-processed // so mermaid will reprocess and redraw if (HTMLWidgets.shinyMode) { el.removeAttribute("data-processed") } processedDg.append("pre").html( ["parse error with " + x.diagram, e.message].join("\n") ) } }, resize: function(el, width, height, instance) { } }); </script> <style type="text/css"> code{white-space: pre-wrap;} span.smallcaps{font-variant: small-caps;} span.underline{text-decoration: underline;} div.column{display: inline-block; vertical-align: top; width: 50%;} div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;} ul.task-list{list-style: none;} </style> <style type="text/css"> code { white-space: pre; } .sourceCode { overflow: visible; } </style> <style type="text/css" data-origin="pandoc"> pre > code.sourceCode { white-space: pre; position: relative; } pre > code.sourceCode > span { display: inline-block; line-height: 1.25; } pre > code.sourceCode > span:empty { height: 1.2em; } .sourceCode { overflow: visible; } code.sourceCode > span { color: inherit; text-decoration: inherit; } div.sourceCode { margin: 1em 0; } pre.sourceCode { margin: 0; } @media screen { div.sourceCode { overflow: auto; } } @media print { pre > code.sourceCode { white-space: pre-wrap; } pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; } } pre.numberSource code { counter-reset: source-line 0; } pre.numberSource code > span { position: relative; left: -4em; counter-increment: source-line; } pre.numberSource code > span > a:first-child::before { content: counter(source-line); position: relative; left: -1em; text-align: right; vertical-align: baseline; border: none; display: inline-block; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; padding: 0 4px; width: 4em; color: #aaaaaa; } pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-left: 4px; } div.sourceCode { } @media screen { pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; } } code span.al { color: #ff0000; font-weight: bold; } /* Alert */ code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */ code span.at { color: #7d9029; } /* Attribute */ code span.bn { color: #40a070; } /* BaseN */ code span.bu { } /* BuiltIn */ code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */ code span.ch { color: #4070a0; } /* Char */ code span.cn { color: #880000; } /* Constant */ code span.co { color: #60a0b0; font-style: italic; } /* Comment */ code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */ code span.do { color: #ba2121; font-style: italic; } /* Documentation */ code span.dt { color: #902000; } /* DataType */ code span.dv { color: #40a070; } /* DecVal */ code span.er { color: #ff0000; font-weight: bold; } /* Error */ code span.ex { } /* Extension */ code span.fl { color: #40a070; } /* Float */ code span.fu { color: #06287e; } /* Function */ code span.im { } /* Import */ code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */ code span.kw { color: #007020; font-weight: bold; } /* Keyword */ code span.op { color: #666666; } /* Operator */ code span.ot { color: #007020; } /* Other */ code span.pp { color: #bc7a00; } /* Preprocessor */ code span.sc { color: #4070a0; } /* SpecialChar */ code span.ss { color: #bb6688; } /* SpecialString */ code span.st { color: #4070a0; } /* String */ code span.va { color: #19177c; } /* Variable */ code span.vs { color: #4070a0; } /* VerbatimString */ code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */ </style> <script> // apply pandoc div.sourceCode style to pre.sourceCode instead (function() { var sheets = document.styleSheets; for (var i = 0; i < sheets.length; i++) { if (sheets[i].ownerNode.dataset["origin"] !== "pandoc") continue; try { var rules = sheets[i].cssRules; } catch (e) { continue; } for (var j = 0; j < rules.length; j++) { var rule = rules[j]; // check if there is a div.sourceCode rule if (rule.type !== rule.STYLE_RULE || rule.selectorText !== "div.sourceCode") continue; var style = rule.style.cssText; // check if color or background-color is set if (rule.style.color === '' && rule.style.backgroundColor === '') continue; // replace div.sourceCode by a pre.sourceCode rule sheets[i].deleteRule(j); sheets[i].insertRule('pre.sourceCode{' + style + '}', j); } } })(); </script> <style type="text/css">body { background-color: #fff; margin: 1em auto; max-width: 700px; overflow: visible; padding-left: 2em; padding-right: 2em; font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.35; } #TOC { clear: both; margin: 0 0 10px 10px; padding: 4px; width: 400px; border: 1px solid #CCCCCC; border-radius: 5px; background-color: #f6f6f6; font-size: 13px; line-height: 1.3; } #TOC .toctitle { font-weight: bold; font-size: 15px; margin-left: 5px; } #TOC ul { padding-left: 40px; margin-left: -1.5em; margin-top: 5px; margin-bottom: 5px; } #TOC ul ul { margin-left: -2em; } #TOC li { line-height: 16px; } table { margin: 1em auto; border-width: 1px; border-color: #DDDDDD; border-style: outset; border-collapse: collapse; } table th { border-width: 2px; padding: 5px; border-style: inset; } table td { border-width: 1px; border-style: inset; line-height: 18px; padding: 5px 5px; } table, table th, table td { border-left-style: none; border-right-style: none; } table thead, table tr.even { background-color: #f7f7f7; } p { margin: 0.5em 0; } blockquote { background-color: #f6f6f6; padding: 0.25em 0.75em; } hr { border-style: solid; border: none; border-top: 1px solid #777; margin: 28px 0; } dl { margin-left: 0; } dl dd { margin-bottom: 13px; margin-left: 13px; } dl dt { font-weight: bold; } ul { margin-top: 0; } ul li { list-style: circle outside; } ul ul { margin-bottom: 0; } pre, code { background-color: #f7f7f7; border-radius: 3px; color: #333; white-space: pre-wrap; } pre { border-radius: 3px; margin: 5px 0px 10px 0px; padding: 10px; } pre:not([class]) { background-color: #f7f7f7; } code { font-family: Consolas, Monaco, 'Courier New', monospace; font-size: 85%; } p > code, li > code { padding: 2px 0px; } div.figure { text-align: center; } img { background-color: #FFFFFF; padding: 2px; border: 1px solid #DDDDDD; border-radius: 3px; border: 1px solid #CCCCCC; margin: 0 5px; } h1 { margin-top: 0; font-size: 35px; line-height: 40px; } h2 { border-bottom: 4px solid #f7f7f7; padding-top: 10px; padding-bottom: 2px; font-size: 145%; } h3 { border-bottom: 2px solid #f7f7f7; padding-top: 10px; font-size: 120%; } h4 { border-bottom: 1px solid #f7f7f7; margin-left: 8px; font-size: 105%; } h5, h6 { border-bottom: 1px solid #ccc; font-size: 105%; } a { color: #0033dd; text-decoration: none; } a:hover { color: #6666ff; } a:visited { color: #800080; } a:visited:hover { color: #BB00BB; } a[href^="http:"] { text-decoration: underline; } a[href^="https:"] { text-decoration: underline; } code > span.kw { color: #555; font-weight: bold; } code > span.dt { color: #902000; } code > span.dv { color: #40a070; } code > span.bn { color: #d14; } code > span.fl { color: #d14; } code > span.ch { color: #d14; } code > span.st { color: #d14; } code > span.co { color: #888888; font-style: italic; } code > span.ot { color: #007020; } code > span.al { color: #ff0000; font-weight: bold; } code > span.fu { color: #900; font-weight: bold; } code > span.er { color: #a61717; background-color: #e3d2d2; } </style> </head> <body> <h1 class="title toc-ignore">Printing a tibble: Control and data flow</h1> <div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">library</span>(pillar)</span></code></pre></div> <p>What happens when a tibble is printed? This vignette documents the control flow and the data flow, explains the design choices, and shows the default implementation for the <code>"tbl"</code> class. It is mainly of interest for implementers of table subclasses. Customizing the formatting of a vector class in a tibble is described in <code>vignette("pillar", package = "vctrs")</code>. The different customization options are showcased in <code>vignette("extending")</code>.</p> <div id="requirements" class="section level2"> <h2>Requirements</h2> <ul> <li><p>Fit into pre-specified width, distributing across multiple tiers if necessary</p></li> <li><p>Optionally shrink and stretch individual columns</p></li> <li><p>Header, body and footer for the tibble</p> <ul> <li>Avoid recomputation of information</li> </ul></li> <li><p>Custom components for the pillars in a tibble, top-aligned</p> <ul> <li>The container, not the column vectors, determine the appearance</li> </ul></li> <li><p>Customization of the entire output and of the pillars</p></li> <li><p>Support for data frame columns (packed data frames) and matrix/array columns</p></li> <li><p>Pillars are always shown from left to right, no “holes” in the colonnade</p> <ul> <li>If the first column consumes all available space, the remaining columns are not shown, even if they all would fit if the first column is omitted.</li> </ul></li> <li><p>Printing pillars should take time proportional to the number of characters printed, and be “fast enough”.</p></li> </ul> </div> <div id="overview" class="section level2"> <h2>Overview</h2> <p>The overall control and data flow are illustrated in the diagram below. Boxes are functions and methods. Solid lines are function calls. Dotted lines represent information that a function obtains via argument or (in the case of options) queries actively.</p> <div id="htmlwidget-8914ab822ddd0c8ba0d5" style="width:288px;height:288px;" class="DiagrammeR html-widget"></div> <script type="application/json" data-for="htmlwidget-8914ab822ddd0c8ba0d5">{"x":{"diagram":"graph TD\n print.tbl[\"print.tbl()\"] --> format.tbl[\"format.tbl()\"]\n format.tbl --> tbl_format_setup[\"tbl_format_setup()\"]\n options(Options: n and n_extra) -.-> tbl_format_setup\n format.tbl --> tbl_format_header[\"tbl_format_header()\"]\n format.tbl --> tbl_format_body[\"tbl_format_body()\"]\n format.tbl --> tbl_format_footer[\"tbl_format_footer()\"]\n tbl_format_setup -.-> tbl_sum[\"tbl_sum()\"]\n tbl_sum -.-> setup(Setup object)\n tbl_format_setup -.-> ctl_new_compound_pillar[\"ctl_new_compound_pillar()\"]\n ctl_new_compound_pillar -.-> ctl_new_pillar[\"ctl_new_pillar()\"]\n ctl_new_pillar -.-> setup(Setup object)\n setup -.-> tbl_format_header\n setup -.-> tbl_format_body\n setup -.-> tbl_format_footer\n tbl_format_header -.-> print(Printed output)\n tbl_format_body -.-> print\n tbl_format_footer -.-> print"},"evals":[],"jsHooks":[]}</script> <p>The pillar package uses debugme for debugging. Activating debugging for pillar is another way to track the control flow, see <code>vignette("debugme")</code> for details.</p> </div> <div id="initialization" class="section level2"> <h2>Initialization</h2> <p>A tibble is a list of columns of class <code>"tbl_df"</code> and <code>"tbl"</code>. Printing is designed to work for non-data-frame table-like objects such as lazy tables. The <code>print.tbl()</code> method calls <code>format()</code> for the object and prints the output.</p> <div class="sourceCode" id="cb2"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a>tbl <span class="ot"><-</span> tibble<span class="sc">::</span><span class="fu">tibble</span>(<span class="at">a =</span> <span class="dv">1</span><span class="sc">:</span><span class="dv">3</span>, <span class="at">b =</span> tibble<span class="sc">::</span><span class="fu">tibble</span>(<span class="at">c =</span> <span class="dv">4</span><span class="sc">:</span><span class="dv">6</span>, <span class="at">d =</span> <span class="dv">7</span><span class="sc">:</span><span class="dv">9</span>), <span class="at">e =</span> <span class="dv">10</span><span class="sc">:</span><span class="dv">12</span>)</span> <span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a><span class="fu">print</span>(tbl, <span class="at">width =</span> <span class="dv">23</span>)</span> <span id="cb2-3"><a href="#cb2-3" aria-hidden="true" tabindex="-1"></a><span class="co">#> # A tibble: 3 × 3</span></span> <span id="cb2-4"><a href="#cb2-4" aria-hidden="true" tabindex="-1"></a><span class="co">#> a b$c e</span></span> <span id="cb2-5"><a href="#cb2-5" aria-hidden="true" tabindex="-1"></a><span class="co">#> <int> <int> <int></span></span> <span id="cb2-6"><a href="#cb2-6" aria-hidden="true" tabindex="-1"></a><span class="co">#> 1 1 4 10</span></span> <span id="cb2-7"><a href="#cb2-7" aria-hidden="true" tabindex="-1"></a><span class="co">#> 2 2 5 11</span></span> <span id="cb2-8"><a href="#cb2-8" aria-hidden="true" tabindex="-1"></a><span class="co">#> 3 3 6 12</span></span> <span id="cb2-9"><a href="#cb2-9" aria-hidden="true" tabindex="-1"></a><span class="co">#> # … with 1 more</span></span> <span id="cb2-10"><a href="#cb2-10" aria-hidden="true" tabindex="-1"></a><span class="co">#> # variable:</span></span> <span id="cb2-11"><a href="#cb2-11" aria-hidden="true" tabindex="-1"></a><span class="co">#> # b$d <int></span></span> <span id="cb2-12"><a href="#cb2-12" aria-hidden="true" tabindex="-1"></a><span class="fu">str</span>(tbl)</span> <span id="cb2-13"><a href="#cb2-13" aria-hidden="true" tabindex="-1"></a><span class="co">#> tibble [3 × 3] (S3: tbl_df/tbl/data.frame)</span></span> <span id="cb2-14"><a href="#cb2-14" aria-hidden="true" tabindex="-1"></a><span class="co">#> $ a: int [1:3] 1 2 3</span></span> <span id="cb2-15"><a href="#cb2-15" aria-hidden="true" tabindex="-1"></a><span class="co">#> $ b: tibble [3 × 2] (S3: tbl_df/tbl/data.frame)</span></span> <span id="cb2-16"><a href="#cb2-16" aria-hidden="true" tabindex="-1"></a><span class="co">#> ..$ c: int [1:3] 4 5 6</span></span> <span id="cb2-17"><a href="#cb2-17" aria-hidden="true" tabindex="-1"></a><span class="co">#> ..$ d: int [1:3] 7 8 9</span></span> <span id="cb2-18"><a href="#cb2-18" aria-hidden="true" tabindex="-1"></a><span class="co">#> $ e: int [1:3] 10 11 12</span></span></code></pre></div> <details> <summary> Source code of <code>pillar:::print.tbl()</code> </summary> <div class="sourceCode" id="cb3"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a>print.tbl <span class="ot"><-</span> <span class="cf">function</span> (x, <span class="at">width =</span> <span class="cn">NULL</span>, ..., <span class="at">n =</span> <span class="cn">NULL</span>, <span class="at">max_extra_cols =</span> <span class="cn">NULL</span>, </span> <span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a> <span class="at">max_footer_lines =</span> <span class="cn">NULL</span>) </span> <span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a>{</span> <span id="cb3-4"><a href="#cb3-4" aria-hidden="true" tabindex="-1"></a> <span class="fu">print_tbl</span>(x, width, ..., <span class="at">n =</span> n, <span class="at">max_extra_cols =</span> max_extra_cols, </span> <span id="cb3-5"><a href="#cb3-5" aria-hidden="true" tabindex="-1"></a> <span class="at">max_footer_lines =</span> max_footer_lines)</span> <span id="cb3-6"><a href="#cb3-6" aria-hidden="true" tabindex="-1"></a>}</span></code></pre></div> </details> <p>The <code>format.tbl()</code> method creates a setup object, and uses that object to format header, body and footer.</p> <details> <summary> Source code of <code>pillar:::format.tbl()</code> </summary> <div class="sourceCode" id="cb4"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a>format.tbl <span class="ot"><-</span> <span class="cf">function</span> (x, <span class="at">width =</span> <span class="cn">NULL</span>, ..., <span class="at">n =</span> <span class="cn">NULL</span>, <span class="at">max_extra_cols =</span> <span class="cn">NULL</span>, </span> <span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a> <span class="at">max_footer_lines =</span> <span class="cn">NULL</span>) </span> <span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a>{</span> <span id="cb4-4"><a href="#cb4-4" aria-hidden="true" tabindex="-1"></a> <span class="fu">format_tbl</span>(x, width, ..., <span class="at">n =</span> n, <span class="at">max_extra_cols =</span> max_extra_cols, </span> <span id="cb4-5"><a href="#cb4-5" aria-hidden="true" tabindex="-1"></a> <span class="at">max_footer_lines =</span> max_footer_lines)</span> <span id="cb4-6"><a href="#cb4-6" aria-hidden="true" tabindex="-1"></a>}</span></code></pre></div> </details> <p>While it’s possible to extend or override these methods for your <code>"tbl"</code> subclass, often overriding the more specialized methods shown below is sufficient.</p> </div> <div id="setup" class="section level2"> <h2>Setup</h2> <p>Most of the work for formatting actually happens in <code>tbl_format_setup()</code>. The desired output width is baked into the setup object and must be available when calling. Setup objects print like a tibble but with a clear separation of header, body, and footer.</p> <div class="sourceCode" id="cb5"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a>setup <span class="ot"><-</span> <span class="fu">tbl_format_setup</span>(tbl, <span class="at">width =</span> <span class="dv">24</span>)</span> <span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a>setup</span> <span id="cb5-3"><a href="#cb5-3" aria-hidden="true" tabindex="-1"></a><span class="co">#> <pillar_tbl_format_setup></span></span> <span id="cb5-4"><a href="#cb5-4" aria-hidden="true" tabindex="-1"></a><span class="co">#> <tbl_format_header(setup)></span></span> <span id="cb5-5"><a href="#cb5-5" aria-hidden="true" tabindex="-1"></a><span class="co">#> # A tibble: 3 × 3</span></span> <span id="cb5-6"><a href="#cb5-6" aria-hidden="true" tabindex="-1"></a><span class="co">#> <tbl_format_body(setup)></span></span> <span id="cb5-7"><a href="#cb5-7" aria-hidden="true" tabindex="-1"></a><span class="co">#> a b$c e</span></span> <span id="cb5-8"><a href="#cb5-8" aria-hidden="true" tabindex="-1"></a><span class="co">#> <int> <int> <int></span></span> <span id="cb5-9"><a href="#cb5-9" aria-hidden="true" tabindex="-1"></a><span class="co">#> 1 1 4 10</span></span> <span id="cb5-10"><a href="#cb5-10" aria-hidden="true" tabindex="-1"></a><span class="co">#> 2 2 5 11</span></span> <span id="cb5-11"><a href="#cb5-11" aria-hidden="true" tabindex="-1"></a><span class="co">#> 3 3 6 12</span></span> <span id="cb5-12"><a href="#cb5-12" aria-hidden="true" tabindex="-1"></a><span class="co">#> <tbl_format_footer(setup)></span></span> <span id="cb5-13"><a href="#cb5-13" aria-hidden="true" tabindex="-1"></a><span class="co">#> # … with 1 more</span></span> <span id="cb5-14"><a href="#cb5-14" aria-hidden="true" tabindex="-1"></a><span class="co">#> # variable: b$d <int></span></span></code></pre></div> <p>A setup object is required here to avoid computing information twice. For instance, the dimensions shown in the header or the extra columns displayed in the footer are available only after the body has been computed.</p> <p>The generic dispatches over the container, so that you can override it if necessary. It is responsible for assigning default values to arguments before passing them on to the method.</p> <details> <summary> Source code of <code>tbl_format_setup()</code> </summary> <div class="sourceCode" id="cb6"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a>tbl_format_setup <span class="ot"><-</span> <span class="cf">function</span> (x, <span class="at">width =</span> <span class="cn">NULL</span>, ..., <span class="at">n =</span> <span class="cn">NULL</span>, <span class="at">max_extra_cols =</span> <span class="cn">NULL</span>, </span> <span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a> <span class="at">max_footer_lines =</span> <span class="cn">NULL</span>, <span class="at">focus =</span> <span class="cn">NULL</span>) </span> <span id="cb6-3"><a href="#cb6-3" aria-hidden="true" tabindex="-1"></a>{</span> <span id="cb6-4"><a href="#cb6-4" aria-hidden="true" tabindex="-1"></a> <span class="st">"!!!!DEBUG tbl_format_setup()"</span></span> <span id="cb6-5"><a href="#cb6-5" aria-hidden="true" tabindex="-1"></a> width <span class="ot"><-</span> <span class="fu">get_width_print</span>(width)</span> <span id="cb6-6"><a href="#cb6-6" aria-hidden="true" tabindex="-1"></a> n <span class="ot"><-</span> <span class="fu">get_n_print</span>(n, <span class="fu">nrow</span>(x))</span> <span id="cb6-7"><a href="#cb6-7" aria-hidden="true" tabindex="-1"></a> max_extra_cols <span class="ot"><-</span> <span class="fu">get_max_extra_cols</span>(max_extra_cols)</span> <span id="cb6-8"><a href="#cb6-8" aria-hidden="true" tabindex="-1"></a> max_footer_lines <span class="ot"><-</span> <span class="fu">get_max_footer_lines</span>(max_footer_lines)</span> <span id="cb6-9"><a href="#cb6-9" aria-hidden="true" tabindex="-1"></a> out <span class="ot"><-</span> <span class="fu">tbl_format_setup_dispatch</span>(x, width, ..., <span class="at">n =</span> n, <span class="at">max_extra_cols =</span> max_extra_cols, </span> <span id="cb6-10"><a href="#cb6-10" aria-hidden="true" tabindex="-1"></a> <span class="at">max_footer_lines =</span> max_footer_lines, <span class="at">focus =</span> focus)</span> <span id="cb6-11"><a href="#cb6-11" aria-hidden="true" tabindex="-1"></a> <span class="fu">return</span>(out)</span> <span id="cb6-12"><a href="#cb6-12" aria-hidden="true" tabindex="-1"></a> <span class="fu">UseMethod</span>(<span class="st">"tbl_format_setup"</span>)</span> <span id="cb6-13"><a href="#cb6-13" aria-hidden="true" tabindex="-1"></a>}</span></code></pre></div> </details> <p>The default implementation converts the input to a data frame via <code>as.data.frame(head(x))</code>, and returns an object constructed with <code>new_tbl_format_setup()</code> that contains the data frame and additional information. If you override this method, e.g. to incorporate more information, you can add new items to the default setup object, but you should not overwrite existing items.</p> <details> <summary> Source code of <code>pillar:::tbl_format_setup.tbl()</code> </summary> <div class="sourceCode" id="cb7"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a>tbl_format_setup.tbl <span class="ot"><-</span> <span class="cf">function</span> (x, width, ..., n, max_extra_cols, max_footer_lines, </span> <span id="cb7-2"><a href="#cb7-2" aria-hidden="true" tabindex="-1"></a> focus) </span> <span id="cb7-3"><a href="#cb7-3" aria-hidden="true" tabindex="-1"></a>{</span> <span id="cb7-4"><a href="#cb7-4" aria-hidden="true" tabindex="-1"></a> <span class="st">"!!!!DEBUG tbl_format_setup.tbl()"</span></span> <span id="cb7-5"><a href="#cb7-5" aria-hidden="true" tabindex="-1"></a> rows <span class="ot"><-</span> <span class="fu">nrow</span>(x)</span> <span id="cb7-6"><a href="#cb7-6" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span> (<span class="fu">is.na</span>(rows)) {</span> <span id="cb7-7"><a href="#cb7-7" aria-hidden="true" tabindex="-1"></a> df <span class="ot"><-</span> <span class="fu">df_head</span>(x, n <span class="sc">+</span> <span class="dv">1</span>)</span> <span id="cb7-8"><a href="#cb7-8" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span> (<span class="fu">nrow</span>(df) <span class="sc"><=</span> n) {</span> <span id="cb7-9"><a href="#cb7-9" aria-hidden="true" tabindex="-1"></a> rows <span class="ot"><-</span> <span class="fu">nrow</span>(df)</span> <span id="cb7-10"><a href="#cb7-10" aria-hidden="true" tabindex="-1"></a> }</span> <span id="cb7-11"><a href="#cb7-11" aria-hidden="true" tabindex="-1"></a> <span class="cf">else</span> {</span> <span id="cb7-12"><a href="#cb7-12" aria-hidden="true" tabindex="-1"></a> df <span class="ot"><-</span> <span class="fu">vec_head</span>(df, n)</span> <span id="cb7-13"><a href="#cb7-13" aria-hidden="true" tabindex="-1"></a> }</span> <span id="cb7-14"><a href="#cb7-14" aria-hidden="true" tabindex="-1"></a> }</span> <span id="cb7-15"><a href="#cb7-15" aria-hidden="true" tabindex="-1"></a> <span class="cf">else</span> {</span> <span id="cb7-16"><a href="#cb7-16" aria-hidden="true" tabindex="-1"></a> df <span class="ot"><-</span> <span class="fu">df_head</span>(x, n)</span> <span id="cb7-17"><a href="#cb7-17" aria-hidden="true" tabindex="-1"></a> }</span> <span id="cb7-18"><a href="#cb7-18" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span> (<span class="fu">is.na</span>(rows)) {</span> <span id="cb7-19"><a href="#cb7-19" aria-hidden="true" tabindex="-1"></a> needs_dots <span class="ot"><-</span> (<span class="fu">nrow</span>(df) <span class="sc">>=</span> n)</span> <span id="cb7-20"><a href="#cb7-20" aria-hidden="true" tabindex="-1"></a> }</span> <span id="cb7-21"><a href="#cb7-21" aria-hidden="true" tabindex="-1"></a> <span class="cf">else</span> {</span> <span id="cb7-22"><a href="#cb7-22" aria-hidden="true" tabindex="-1"></a> needs_dots <span class="ot"><-</span> (rows <span class="sc">></span> n)</span> <span id="cb7-23"><a href="#cb7-23" aria-hidden="true" tabindex="-1"></a> }</span> <span id="cb7-24"><a href="#cb7-24" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span> (needs_dots) {</span> <span id="cb7-25"><a href="#cb7-25" aria-hidden="true" tabindex="-1"></a> rows_missing <span class="ot"><-</span> rows <span class="sc">-</span> n</span> <span id="cb7-26"><a href="#cb7-26" aria-hidden="true" tabindex="-1"></a> }</span> <span id="cb7-27"><a href="#cb7-27" aria-hidden="true" tabindex="-1"></a> <span class="cf">else</span> {</span> <span id="cb7-28"><a href="#cb7-28" aria-hidden="true" tabindex="-1"></a> rows_missing <span class="ot"><-</span> <span class="dv">0</span></span> <span id="cb7-29"><a href="#cb7-29" aria-hidden="true" tabindex="-1"></a> }</span> <span id="cb7-30"><a href="#cb7-30" aria-hidden="true" tabindex="-1"></a> tbl_sum <span class="ot"><-</span> <span class="fu">tbl_sum</span>(x)</span> <span id="cb7-31"><a href="#cb7-31" aria-hidden="true" tabindex="-1"></a> <span class="fu">rownames</span>(df) <span class="ot"><-</span> <span class="cn">NULL</span></span> <span id="cb7-32"><a href="#cb7-32" aria-hidden="true" tabindex="-1"></a> colonnade <span class="ot"><-</span> <span class="fu">ctl_colonnade</span>(df, <span class="at">has_row_id =</span> <span class="cf">if</span> (<span class="fu">.row_names_info</span>(x) <span class="sc">></span> </span> <span id="cb7-33"><a href="#cb7-33" aria-hidden="true" tabindex="-1"></a> <span class="dv">0</span>) </span> <span id="cb7-34"><a href="#cb7-34" aria-hidden="true" tabindex="-1"></a> <span class="st">"*"</span></span> <span id="cb7-35"><a href="#cb7-35" aria-hidden="true" tabindex="-1"></a> <span class="cf">else</span> <span class="cn">TRUE</span>, <span class="at">width =</span> width, <span class="at">controller =</span> x, <span class="at">focus =</span> focus)</span> <span id="cb7-36"><a href="#cb7-36" aria-hidden="true" tabindex="-1"></a> body <span class="ot"><-</span> colonnade<span class="sc">$</span>body</span> <span id="cb7-37"><a href="#cb7-37" aria-hidden="true" tabindex="-1"></a> extra_cols <span class="ot"><-</span> colonnade<span class="sc">$</span>extra_cols</span> <span id="cb7-38"><a href="#cb7-38" aria-hidden="true" tabindex="-1"></a> extra_cols_total <span class="ot"><-</span> <span class="fu">length</span>(extra_cols)</span> <span id="cb7-39"><a href="#cb7-39" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span> (extra_cols_total <span class="sc">></span> max_extra_cols) {</span> <span id="cb7-40"><a href="#cb7-40" aria-hidden="true" tabindex="-1"></a> <span class="fu">length</span>(extra_cols) <span class="ot"><-</span> max_extra_cols</span> <span id="cb7-41"><a href="#cb7-41" aria-hidden="true" tabindex="-1"></a> }</span> <span id="cb7-42"><a href="#cb7-42" aria-hidden="true" tabindex="-1"></a> abbrev_cols <span class="ot"><-</span> colonnade<span class="sc">$</span>abbrev_cols</span> <span id="cb7-43"><a href="#cb7-43" aria-hidden="true" tabindex="-1"></a> <span class="fu">new_tbl_format_setup</span>(<span class="at">x =</span> x, <span class="at">df =</span> df, <span class="at">width =</span> width, <span class="at">tbl_sum =</span> tbl_sum, </span> <span id="cb7-44"><a href="#cb7-44" aria-hidden="true" tabindex="-1"></a> <span class="at">body =</span> body, <span class="at">rows_missing =</span> rows_missing, <span class="at">rows_total =</span> rows, </span> <span id="cb7-45"><a href="#cb7-45" aria-hidden="true" tabindex="-1"></a> <span class="at">extra_cols =</span> extra_cols, <span class="at">extra_cols_total =</span> extra_cols_total, </span> <span id="cb7-46"><a href="#cb7-46" aria-hidden="true" tabindex="-1"></a> <span class="at">max_footer_lines =</span> max_footer_lines, <span class="at">abbrev_cols =</span> abbrev_cols)</span> <span id="cb7-47"><a href="#cb7-47" aria-hidden="true" tabindex="-1"></a>}</span></code></pre></div> </details> <p>At the core, the internal function <code>ctl_colonnade()</code> composes the body. Its functionality and the customization points it offers are detailed in the “Colonnade” section below.</p> </div> <div id="header-body-footer" class="section level2"> <h2>Header, body, footer</h2> <p>The components of a tibble are formatted with <code>tbl_format_*()</code> generics, which also dispatch on the container to allow extension or overrides. They return a character vector, with one element per line printed. The setup object is required.</p> <div class="sourceCode" id="cb8"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a><span class="fu">tbl_format_header</span>(tbl, setup)</span> <span id="cb8-2"><a href="#cb8-2" aria-hidden="true" tabindex="-1"></a><span class="co">#> [1] "# A tibble: 3 × 3"</span></span> <span id="cb8-3"><a href="#cb8-3" aria-hidden="true" tabindex="-1"></a><span class="fu">tbl_format_body</span>(tbl, setup)</span> <span id="cb8-4"><a href="#cb8-4" aria-hidden="true" tabindex="-1"></a><span class="co">#> a b$c e</span></span> <span id="cb8-5"><a href="#cb8-5" aria-hidden="true" tabindex="-1"></a><span class="co">#> <int> <int> <int></span></span> <span id="cb8-6"><a href="#cb8-6" aria-hidden="true" tabindex="-1"></a><span class="co">#> 1 1 4 10</span></span> <span id="cb8-7"><a href="#cb8-7" aria-hidden="true" tabindex="-1"></a><span class="co">#> 2 2 5 11</span></span> <span id="cb8-8"><a href="#cb8-8" aria-hidden="true" tabindex="-1"></a><span class="co">#> 3 3 6 12</span></span> <span id="cb8-9"><a href="#cb8-9" aria-hidden="true" tabindex="-1"></a><span class="fu">tbl_format_footer</span>(tbl, setup)</span> <span id="cb8-10"><a href="#cb8-10" aria-hidden="true" tabindex="-1"></a><span class="co">#> [1] "# … with 1 more" "# variable: b$d <int>"</span></span></code></pre></div> <p>(The body is returned as a classed object with a <code>print()</code> method, it is still a <code>character()</code> under the hood.)</p> <div class="sourceCode" id="cb9"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a><span class="fu">class</span>(<span class="fu">tbl_format_body</span>(tbl, setup))</span> <span id="cb9-2"><a href="#cb9-2" aria-hidden="true" tabindex="-1"></a><span class="co">#> [1] "glue" "character"</span></span> <span id="cb9-3"><a href="#cb9-3" aria-hidden="true" tabindex="-1"></a><span class="fu">typeof</span>(<span class="fu">tbl_format_body</span>(tbl, setup))</span> <span id="cb9-4"><a href="#cb9-4" aria-hidden="true" tabindex="-1"></a><span class="co">#> [1] "character"</span></span></code></pre></div> <p>Since most of the work already has been carried out in <code>tbl_format_setup()</code>, the default implementations mostly consist of code that styles and wraps the output.</p> <details> <summary> Source code of <code>pillar:::tbl_format_header.tbl()</code> </summary> <div class="sourceCode" id="cb10"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true" tabindex="-1"></a>tbl_format_header.tbl <span class="ot"><-</span> <span class="cf">function</span> (x, setup, ...) </span> <span id="cb10-2"><a href="#cb10-2" aria-hidden="true" tabindex="-1"></a>{</span> <span id="cb10-3"><a href="#cb10-3" aria-hidden="true" tabindex="-1"></a> named_header <span class="ot"><-</span> setup<span class="sc">$</span>tbl_sum</span> <span id="cb10-4"><a href="#cb10-4" aria-hidden="true" tabindex="-1"></a> focus <span class="ot"><-</span> <span class="fu">attr</span>(x, <span class="st">"pillar_focus"</span>)</span> <span id="cb10-5"><a href="#cb10-5" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span> (<span class="sc">!</span><span class="fu">is.null</span>(focus)) {</span> <span id="cb10-6"><a href="#cb10-6" aria-hidden="true" tabindex="-1"></a> named_header <span class="ot"><-</span> <span class="fu">c</span>(named_header, <span class="st">`</span><span class="at">Focus columns</span><span class="st">`</span> <span class="ot">=</span> <span class="fu">collapse</span>(<span class="fu">tick_if_needed</span>(focus)))</span> <span id="cb10-7"><a href="#cb10-7" aria-hidden="true" tabindex="-1"></a> }</span> <span id="cb10-8"><a href="#cb10-8" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span> (<span class="fu">all</span>(<span class="fu">names2</span>(named_header) <span class="sc">==</span> <span class="st">""</span>)) {</span> <span id="cb10-9"><a href="#cb10-9" aria-hidden="true" tabindex="-1"></a> header <span class="ot"><-</span> named_header</span> <span id="cb10-10"><a href="#cb10-10" aria-hidden="true" tabindex="-1"></a> }</span> <span id="cb10-11"><a href="#cb10-11" aria-hidden="true" tabindex="-1"></a> <span class="cf">else</span> {</span> <span id="cb10-12"><a href="#cb10-12" aria-hidden="true" tabindex="-1"></a> header <span class="ot"><-</span> <span class="fu">paste0</span>(<span class="fu">align</span>(<span class="fu">paste0</span>(<span class="fu">names2</span>(named_header), <span class="st">":"</span>), </span> <span id="cb10-13"><a href="#cb10-13" aria-hidden="true" tabindex="-1"></a> <span class="at">space =</span> NBSP), <span class="st">" "</span>, named_header)</span> <span id="cb10-14"><a href="#cb10-14" aria-hidden="true" tabindex="-1"></a> }</span> <span id="cb10-15"><a href="#cb10-15" aria-hidden="true" tabindex="-1"></a> <span class="fu">style_subtle</span>(<span class="fu">format_comment</span>(header, <span class="at">width =</span> setup<span class="sc">$</span>width))</span> <span id="cb10-16"><a href="#cb10-16" aria-hidden="true" tabindex="-1"></a>}</span></code></pre></div> </details> <details> <summary> Source code of <code>pillar:::tbl_format_body.tbl()</code> </summary> <div class="sourceCode" id="cb11"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true" tabindex="-1"></a>tbl_format_body.tbl <span class="ot"><-</span> <span class="cf">function</span> (x, setup, ...) </span> <span id="cb11-2"><a href="#cb11-2" aria-hidden="true" tabindex="-1"></a>{</span> <span id="cb11-3"><a href="#cb11-3" aria-hidden="true" tabindex="-1"></a> <span class="fu">force</span>(setup)</span> <span id="cb11-4"><a href="#cb11-4" aria-hidden="true" tabindex="-1"></a> setup<span class="sc">$</span>body</span> <span id="cb11-5"><a href="#cb11-5" aria-hidden="true" tabindex="-1"></a>}</span></code></pre></div> </details> <details> <summary> Source code of <code>pillar:::tbl_format_footer.tbl()</code> </summary> <div class="sourceCode" id="cb12"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb12-1"><a href="#cb12-1" aria-hidden="true" tabindex="-1"></a>tbl_format_footer.tbl <span class="ot"><-</span> <span class="cf">function</span> (x, setup, ...) </span> <span id="cb12-2"><a href="#cb12-2" aria-hidden="true" tabindex="-1"></a>{</span> <span id="cb12-3"><a href="#cb12-3" aria-hidden="true" tabindex="-1"></a> footer <span class="ot"><-</span> <span class="fu">format_footer</span>(x, setup)</span> <span id="cb12-4"><a href="#cb12-4" aria-hidden="true" tabindex="-1"></a> footer_comment <span class="ot"><-</span> <span class="fu">wrap_footer</span>(footer, setup)</span> <span id="cb12-5"><a href="#cb12-5" aria-hidden="true" tabindex="-1"></a> footer_advice <span class="ot"><-</span> <span class="fu">format_footer_advice</span>(x, setup)</span> <span id="cb12-6"><a href="#cb12-6" aria-hidden="true" tabindex="-1"></a> footer_advice_comment <span class="ot"><-</span> <span class="fu">wrap_footer</span>(footer_advice, setup, </span> <span id="cb12-7"><a href="#cb12-7" aria-hidden="true" tabindex="-1"></a> <span class="at">lines =</span> <span class="dv">1</span>, <span class="at">ellipsis =</span> <span class="cn">FALSE</span>)</span> <span id="cb12-8"><a href="#cb12-8" aria-hidden="true" tabindex="-1"></a> <span class="fu">style_subtle</span>(<span class="fu">c</span>(footer_comment, footer_advice_comment))</span> <span id="cb12-9"><a href="#cb12-9" aria-hidden="true" tabindex="-1"></a>}</span></code></pre></div> </details> </div> <div id="colonnade" class="section level2"> <h2>Colonnade</h2> <p>The internal function <code>ctl_colonnade()</code> composes the body. It performs the following tasks:</p> <ol style="list-style-type: decimal"> <li>Create a pillar object for every top-level column that fits, using the minimum width, via <code>ctl_new_pillar_list()</code>, <code>ctl_new_pillar()</code> and ultimately <code>pillar()</code> and <code>pillar_shaft()</code></li> <li>Determine the number of tiers and the width for each tier</li> <li>Distribute the pillars across the tiers, assigning a width to each pillar.</li> <li>Format each pillar via its <code>format()</code> function, passing the now known width.</li> <li>Combine the formatted pillars horizontally.</li> <li>Combine the tiers vertically.</li> <li>Return the formatted body, and the columns that could not fit.</li> </ol> <p>In the following, the first and the fourth steps are discussed.</p> </div> <div id="creating-pillar-objects" class="section level2"> <h2>Creating pillar objects</h2> <p>The initial tibble is passed to <code>ctl_new_pillar_list()</code>, which eventually calls <code>ctl_new_pillar()</code> once or several times. For each top-level column, one pillar object is constructed. The loop is terminated when the available width is exhausted even considering the minimum width.</p> <div id="pillar-lists" class="section level3"> <h3>Pillar lists</h3> <p>The <code>ctl_new_pillar_list()</code> generic dispatches on the container:</p> <div class="sourceCode" id="cb13"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb13-1"><a href="#cb13-1" aria-hidden="true" tabindex="-1"></a><span class="fu">ctl_new_pillar_list</span>(tbl, tbl<span class="sc">$</span>a, <span class="at">width =</span> <span class="dv">20</span>)</span> <span id="cb13-2"><a href="#cb13-2" aria-hidden="true" tabindex="-1"></a><span class="co">#> [[1]]</span></span> <span id="cb13-3"><a href="#cb13-3" aria-hidden="true" tabindex="-1"></a><span class="co">#> <pillar></span></span> <span id="cb13-4"><a href="#cb13-4" aria-hidden="true" tabindex="-1"></a><span class="co">#> <int></span></span> <span id="cb13-5"><a href="#cb13-5" aria-hidden="true" tabindex="-1"></a><span class="co">#> 1</span></span> <span id="cb13-6"><a href="#cb13-6" aria-hidden="true" tabindex="-1"></a><span class="co">#> 2</span></span> <span id="cb13-7"><a href="#cb13-7" aria-hidden="true" tabindex="-1"></a><span class="co">#> 3</span></span> <span id="cb13-8"><a href="#cb13-8" aria-hidden="true" tabindex="-1"></a><span class="co">#> </span></span> <span id="cb13-9"><a href="#cb13-9" aria-hidden="true" tabindex="-1"></a><span class="co">#> attr(,"remaining_width")</span></span> <span id="cb13-10"><a href="#cb13-10" aria-hidden="true" tabindex="-1"></a><span class="co">#> [1] 14</span></span> <span id="cb13-11"><a href="#cb13-11" aria-hidden="true" tabindex="-1"></a><span class="co">#> attr(,"simple")</span></span> <span id="cb13-12"><a href="#cb13-12" aria-hidden="true" tabindex="-1"></a><span class="co">#> [1] TRUE</span></span> <span id="cb13-13"><a href="#cb13-13" aria-hidden="true" tabindex="-1"></a><span class="fu">ctl_new_pillar_list</span>(tbl, tbl<span class="sc">$</span>b, <span class="at">width =</span> <span class="dv">20</span>)</span> <span id="cb13-14"><a href="#cb13-14" aria-hidden="true" tabindex="-1"></a><span class="co">#> [[1]]</span></span> <span id="cb13-15"><a href="#cb13-15" aria-hidden="true" tabindex="-1"></a><span class="co">#> <pillar></span></span> <span id="cb13-16"><a href="#cb13-16" aria-hidden="true" tabindex="-1"></a><span class="co">#> c</span></span> <span id="cb13-17"><a href="#cb13-17" aria-hidden="true" tabindex="-1"></a><span class="co">#> <int></span></span> <span id="cb13-18"><a href="#cb13-18" aria-hidden="true" tabindex="-1"></a><span class="co">#> 4</span></span> <span id="cb13-19"><a href="#cb13-19" aria-hidden="true" tabindex="-1"></a><span class="co">#> 5</span></span> <span id="cb13-20"><a href="#cb13-20" aria-hidden="true" tabindex="-1"></a><span class="co">#> 6</span></span> <span id="cb13-21"><a href="#cb13-21" aria-hidden="true" tabindex="-1"></a><span class="co">#> </span></span> <span id="cb13-22"><a href="#cb13-22" aria-hidden="true" tabindex="-1"></a><span class="co">#> [[2]]</span></span> <span id="cb13-23"><a href="#cb13-23" aria-hidden="true" tabindex="-1"></a><span class="co">#> <pillar></span></span> <span id="cb13-24"><a href="#cb13-24" aria-hidden="true" tabindex="-1"></a><span class="co">#> d</span></span> <span id="cb13-25"><a href="#cb13-25" aria-hidden="true" tabindex="-1"></a><span class="co">#> <int></span></span> <span id="cb13-26"><a href="#cb13-26" aria-hidden="true" tabindex="-1"></a><span class="co">#> 7</span></span> <span id="cb13-27"><a href="#cb13-27" aria-hidden="true" tabindex="-1"></a><span class="co">#> 8</span></span> <span id="cb13-28"><a href="#cb13-28" aria-hidden="true" tabindex="-1"></a><span class="co">#> 9</span></span> <span id="cb13-29"><a href="#cb13-29" aria-hidden="true" tabindex="-1"></a><span class="co">#> </span></span> <span id="cb13-30"><a href="#cb13-30" aria-hidden="true" tabindex="-1"></a><span class="co">#> attr(,"extra")</span></span> <span id="cb13-31"><a href="#cb13-31" aria-hidden="true" tabindex="-1"></a><span class="co">#> character(0)</span></span> <span id="cb13-32"><a href="#cb13-32" aria-hidden="true" tabindex="-1"></a><span class="co">#> attr(,"remaining_width")</span></span> <span id="cb13-33"><a href="#cb13-33" aria-hidden="true" tabindex="-1"></a><span class="co">#> [1] 8</span></span> <span id="cb13-34"><a href="#cb13-34" aria-hidden="true" tabindex="-1"></a><span class="co">#> attr(,"simple")</span></span> <span id="cb13-35"><a href="#cb13-35" aria-hidden="true" tabindex="-1"></a><span class="co">#> [1] FALSE</span></span></code></pre></div> <p>In a tibble, each column can be a data frame, matrix, or even array itself, such columns are called <em>compound columns</em>. Such columns are decomposed into sub-pillars and returned as a list of pillars. Regular vectors are forwarded to <code>ctl_new_pillar()</code> and returned as list of length one. Implementers of <code>"tbl"</code> subclasses will rarely if ever need to extend or override this method.</p> <details> <summary> Source code of <code>pillar:::ctl_new_pillar_list.tbl()</code> </summary> <div class="sourceCode" id="cb14"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb14-1"><a href="#cb14-1" aria-hidden="true" tabindex="-1"></a>ctl_new_pillar_list.tbl <span class="ot"><-</span> <span class="cf">function</span> (controller, x, width, ..., <span class="at">title =</span> <span class="cn">NULL</span>, <span class="at">first_pillar =</span> <span class="cn">NULL</span>) </span> <span id="cb14-2"><a href="#cb14-2" aria-hidden="true" tabindex="-1"></a>{</span> <span id="cb14-3"><a href="#cb14-3" aria-hidden="true" tabindex="-1"></a> <span class="st">"!!!!DEBUG ctl_new_pillar_list.tbl(`v(width)`, `v(title)`)"</span></span> <span id="cb14-4"><a href="#cb14-4" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span> (<span class="fu">is.data.frame</span>(x)) {</span> <span id="cb14-5"><a href="#cb14-5" aria-hidden="true" tabindex="-1"></a> <span class="fu">new_data_frame_pillar_list</span>(x, controller, width, <span class="at">title =</span> title, </span> <span id="cb14-6"><a href="#cb14-6" aria-hidden="true" tabindex="-1"></a> <span class="at">first_pillar =</span> first_pillar)</span> <span id="cb14-7"><a href="#cb14-7" aria-hidden="true" tabindex="-1"></a> }</span> <span id="cb14-8"><a href="#cb14-8" aria-hidden="true" tabindex="-1"></a> <span class="cf">else</span> <span class="cf">if</span> (<span class="fu">is.matrix</span>(x) <span class="sc">&&</span> <span class="sc">!</span><span class="fu">inherits</span>(x, <span class="fu">c</span>(<span class="st">"Surv"</span>, <span class="st">"Surv2"</span>))) {</span> <span id="cb14-9"><a href="#cb14-9" aria-hidden="true" tabindex="-1"></a> <span class="fu">new_matrix_pillar_list</span>(x, controller, width, <span class="at">title =</span> title, </span> <span id="cb14-10"><a href="#cb14-10" aria-hidden="true" tabindex="-1"></a> <span class="at">first_pillar =</span> first_pillar)</span> <span id="cb14-11"><a href="#cb14-11" aria-hidden="true" tabindex="-1"></a> }</span> <span id="cb14-12"><a href="#cb14-12" aria-hidden="true" tabindex="-1"></a> <span class="cf">else</span> <span class="cf">if</span> (<span class="fu">is.array</span>(x) <span class="sc">&&</span> <span class="fu">length</span>(<span class="fu">dim</span>(x)) <span class="sc">></span> <span class="dv">2</span>) {</span> <span id="cb14-13"><a href="#cb14-13" aria-hidden="true" tabindex="-1"></a> <span class="fu">new_array_pillar_list</span>(x, controller, width, <span class="at">title =</span> title, </span> <span id="cb14-14"><a href="#cb14-14" aria-hidden="true" tabindex="-1"></a> <span class="at">first_pillar =</span> first_pillar)</span> <span id="cb14-15"><a href="#cb14-15" aria-hidden="true" tabindex="-1"></a> }</span> <span id="cb14-16"><a href="#cb14-16" aria-hidden="true" tabindex="-1"></a> <span class="cf">else</span> {</span> <span id="cb14-17"><a href="#cb14-17" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span> (<span class="fu">is.null</span>(first_pillar)) {</span> <span id="cb14-18"><a href="#cb14-18" aria-hidden="true" tabindex="-1"></a> first_pillar <span class="ot"><-</span> <span class="fu">ctl_new_pillar</span>(controller, x, width, </span> <span id="cb14-19"><a href="#cb14-19" aria-hidden="true" tabindex="-1"></a> ..., <span class="at">title =</span> <span class="fu">prepare_title</span>(title))</span> <span id="cb14-20"><a href="#cb14-20" aria-hidden="true" tabindex="-1"></a> }</span> <span id="cb14-21"><a href="#cb14-21" aria-hidden="true" tabindex="-1"></a> <span class="fu">new_single_pillar_list</span>(first_pillar, width)</span> <span id="cb14-22"><a href="#cb14-22" aria-hidden="true" tabindex="-1"></a> }</span> <span id="cb14-23"><a href="#cb14-23" aria-hidden="true" tabindex="-1"></a>}</span></code></pre></div> </details> </div> <div id="simple-pillars" class="section level3"> <h3>Simple pillars</h3> <p>The <code>ctl_new_pillar()</code> method is called for columns that are not data frames or arrays, and also dispatches over the container.</p> <div class="sourceCode" id="cb15"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb15-1"><a href="#cb15-1" aria-hidden="true" tabindex="-1"></a><span class="fu">ctl_new_pillar</span>(tbl, tbl<span class="sc">$</span>a, <span class="at">width =</span> <span class="dv">20</span>)</span> <span id="cb15-2"><a href="#cb15-2" aria-hidden="true" tabindex="-1"></a><span class="co">#> <pillar></span></span> <span id="cb15-3"><a href="#cb15-3" aria-hidden="true" tabindex="-1"></a><span class="co">#> <int></span></span> <span id="cb15-4"><a href="#cb15-4" aria-hidden="true" tabindex="-1"></a><span class="co">#> 1</span></span> <span id="cb15-5"><a href="#cb15-5" aria-hidden="true" tabindex="-1"></a><span class="co">#> 2</span></span> <span id="cb15-6"><a href="#cb15-6" aria-hidden="true" tabindex="-1"></a><span class="co">#> 3</span></span></code></pre></div> <details> <summary> Source code of <code>pillar:::ctl_new_pillar.tbl()</code> </summary> <div class="sourceCode" id="cb16"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb16-1"><a href="#cb16-1" aria-hidden="true" tabindex="-1"></a>ctl_new_pillar.tbl <span class="ot"><-</span> <span class="cf">function</span> (controller, x, width, ..., <span class="at">title =</span> <span class="cn">NULL</span>) </span> <span id="cb16-2"><a href="#cb16-2" aria-hidden="true" tabindex="-1"></a>{</span> <span id="cb16-3"><a href="#cb16-3" aria-hidden="true" tabindex="-1"></a> <span class="st">"!!!!DEBUG ctl_new_pillar.tbl(`v(width)`, `v(title)`)"</span></span> <span id="cb16-4"><a href="#cb16-4" aria-hidden="true" tabindex="-1"></a> <span class="fu">pillar</span>(x, title, <span class="cf">if</span> (<span class="sc">!</span><span class="fu">is.null</span>(width)) </span> <span id="cb16-5"><a href="#cb16-5" aria-hidden="true" tabindex="-1"></a> <span class="fu">max0</span>(width))</span> <span id="cb16-6"><a href="#cb16-6" aria-hidden="true" tabindex="-1"></a>}</span></code></pre></div> </details> <p>The default method calls <code>pillar()</code> directly, passing the maximum width available.</p> <details> <summary> Source code of <code>pillar()</code> </summary> <div class="sourceCode" id="cb17"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb17-1"><a href="#cb17-1" aria-hidden="true" tabindex="-1"></a>pillar <span class="ot"><-</span> <span class="cf">function</span> (x, <span class="at">title =</span> <span class="cn">NULL</span>, <span class="at">width =</span> <span class="cn">NULL</span>, ...) </span> <span id="cb17-2"><a href="#cb17-2" aria-hidden="true" tabindex="-1"></a>{</span> <span id="cb17-3"><a href="#cb17-3" aria-hidden="true" tabindex="-1"></a> <span class="st">"!!!!DEBUG pillar(`v(class(x))`, `v(title)`, `v(width)`)"</span></span> <span id="cb17-4"><a href="#cb17-4" aria-hidden="true" tabindex="-1"></a> <span class="fu">pillar_from_shaft</span>(<span class="fu">new_pillar_title</span>(title), <span class="fu">new_pillar_type</span>(x), </span> <span id="cb17-5"><a href="#cb17-5" aria-hidden="true" tabindex="-1"></a> <span class="fu">pillar_shaft</span>(x, ...), width)</span> <span id="cb17-6"><a href="#cb17-6" aria-hidden="true" tabindex="-1"></a>}</span></code></pre></div> </details> <p>Formatting for title and type is provided by <code>new_pillar_title()</code> and <code>new_pillar_type()</code>. The body can be customized by implementing <code>pillar_shaft()</code> for a vector class, see <code>vignette("pillar", package = "vctrs")</code> for details. If title or type don’t fit the available width, <code>pillar_shaft()</code> is never called.</p> <p>This function now returns <code>NULL</code> if the width is insufficient to contain the data. It is possible to change the appearance of pillars by overriding or extending <code>ctl_new_pillar()</code>.</p> </div> <div id="components" class="section level3"> <h3>Components</h3> <p>Pillar objects share the same structure and are ultimately constructed with <code>new_pillar()</code>.</p> <details> <summary> Source code of <code>new_pillar()</code> </summary> <div class="sourceCode" id="cb18"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb18-1"><a href="#cb18-1" aria-hidden="true" tabindex="-1"></a>new_pillar <span class="ot"><-</span> <span class="cf">function</span> (components, ..., <span class="at">width =</span> <span class="cn">NULL</span>, <span class="at">class =</span> <span class="cn">NULL</span>, <span class="at">extra =</span> <span class="fu">deprecated</span>()) </span> <span id="cb18-2"><a href="#cb18-2" aria-hidden="true" tabindex="-1"></a>{</span> <span id="cb18-3"><a href="#cb18-3" aria-hidden="true" tabindex="-1"></a> <span class="st">"!!!!DEBUG new_pillar(`v(width)`, `v(class)`)"</span></span> <span id="cb18-4"><a href="#cb18-4" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span> (<span class="fu">is_present</span>(extra)) {</span> <span id="cb18-5"><a href="#cb18-5" aria-hidden="true" tabindex="-1"></a> <span class="fu">deprecate_warn</span>(<span class="st">"1.7.0"</span>, <span class="st">"pillar::new_pillar(extra = )"</span>)</span> <span id="cb18-6"><a href="#cb18-6" aria-hidden="true" tabindex="-1"></a> }</span> <span id="cb18-7"><a href="#cb18-7" aria-hidden="true" tabindex="-1"></a> <span class="fu">check_dots_empty</span>()</span> <span id="cb18-8"><a href="#cb18-8" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span> (<span class="fu">length</span>(components) <span class="sc">></span> <span class="dv">0</span> <span class="sc">&&</span> <span class="sc">!</span><span class="fu">is_named</span>(components)) {</span> <span id="cb18-9"><a href="#cb18-9" aria-hidden="true" tabindex="-1"></a> <span class="fu">abort</span>(<span class="st">"All components must have names."</span>)</span> <span id="cb18-10"><a href="#cb18-10" aria-hidden="true" tabindex="-1"></a> }</span> <span id="cb18-11"><a href="#cb18-11" aria-hidden="true" tabindex="-1"></a> <span class="fu">structure</span>(components, <span class="at">width =</span> width, <span class="at">class =</span> <span class="fu">c</span>(class, <span class="st">"pillar"</span>))</span> <span id="cb18-12"><a href="#cb18-12" aria-hidden="true" tabindex="-1"></a>}</span></code></pre></div> </details> <p>A pillar is stored as a list of components. Each pillar represents only one simple (atomic) column, compound columns are always represented as multiple pillar objects.</p> </div> </div> <div id="formatting-pillars" class="section level2"> <h2>Formatting pillars</h2> <p>When a pillar object is constructed, it has a minimum and a desired (maximum) width. Because it depends on the number and width of other pillar objects that may not be even constructed, the final width is not known yet. It is passed to <code>format()</code>, which uses the desired width if empty:</p> <details> <summary> Source code of <code>pillar:::format.pillar()</code> </summary> <div class="sourceCode" id="cb19"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb19-1"><a href="#cb19-1" aria-hidden="true" tabindex="-1"></a>format.pillar <span class="ot"><-</span> <span class="cf">function</span> (x, <span class="at">width =</span> <span class="cn">NULL</span>, ...) </span> <span id="cb19-2"><a href="#cb19-2" aria-hidden="true" tabindex="-1"></a>{</span> <span id="cb19-3"><a href="#cb19-3" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span> (<span class="fu">is.null</span>(width)) {</span> <span id="cb19-4"><a href="#cb19-4" aria-hidden="true" tabindex="-1"></a> width <span class="ot"><-</span> <span class="fu">get_width</span>(x)</span> <span id="cb19-5"><a href="#cb19-5" aria-hidden="true" tabindex="-1"></a> }</span> <span id="cb19-6"><a href="#cb19-6" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span> (<span class="fu">is.null</span>(width)) {</span> <span id="cb19-7"><a href="#cb19-7" aria-hidden="true" tabindex="-1"></a> width <span class="ot"><-</span> <span class="fu">pillar_get_width</span>(x)</span> <span id="cb19-8"><a href="#cb19-8" aria-hidden="true" tabindex="-1"></a> }</span> <span id="cb19-9"><a href="#cb19-9" aria-hidden="true" tabindex="-1"></a> <span class="fu">as_glue</span>(<span class="fu">pillar_format_parts_2</span>(x, width)<span class="sc">$</span>aligned)</span> <span id="cb19-10"><a href="#cb19-10" aria-hidden="true" tabindex="-1"></a>}</span></code></pre></div> </details> </div> <!-- code folding --> <!-- dynamically load mathjax for compatibility with self-contained --> <script> (function () { var script = document.createElement("script"); script.type = "text/javascript"; script.src = "https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"; document.getElementsByTagName("head")[0].appendChild(script); })(); </script> </body> </html>