!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).dagreD3=t()}}(function(){return function t(e,n,r){function i(a,u){if(!n[a]){if(!e[a]){var c="function"==typeof require&&require;if(!u&&c)return c(a,!0);if(o)return o(a,!0);var s=new Error("Cannot find module '"+a+"'");throw s.code="MODULE_NOT_FOUND",s}var f=n[a]={exports:{}};e[a][0].call(f.exports,function(t){var n=e[a][1][t];return i(n||t)},f,f.exports,t,e,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(t,e,n){
/**
             * @license
             * Copyright (c) 2012-2013 Chris Pettitt
             *
             * Permission is hereby granted, free of charge, to any person obtaining a copy
             * of this software and associated documentation files (the "Software"), to deal
             * in the Software without restriction, including without limitation the rights
             * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
             * copies of the Software, and to permit persons to whom the Software is
             * furnished to do so, subject to the following conditions:
             *
             * The above copyright notice and this permission notice shall be included in
             * all copies or substantial portions of the Software.
             *
             * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
             * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
             * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
             * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
             * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
             * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
             * THE SOFTWARE.
             */
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":8,"./lib/graphlib":9,"./lib/intersect":10,"./lib/render":25,"./lib/util":27,"./lib/version":28}],2:[function(t,e,n){var r=t("./util");function i(t,e,n,i){var o=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").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").style("stroke-width",1).style("stroke-dasharray","1,0");r.applyStyle(o,n[i+"Style"]),n[i+"Class"]&&o.attr("class",n[i+"Class"])}e.exports={default:i,normal:i,reversed:function(t,e,n,i){var o=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").append("path").attr("d","M 16 0 L 16 10 L 6 5 z").style("stroke-width",1).style("stroke-dasharray","1,0");r.applyStyle(o,n[i+"Style"]),n[i+"Class"]&&o.attr("class",n[i+"Class"])},vee:function(t,e,n,i){var o=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").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");r.applyStyle(o,n[i+"Style"]),n[i+"Class"]&&o.attr("class",n[i+"Class"])},undirected:function(t,e,n,i){var o=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").append("path").attr("d","M 0 5 L 10 5").style("stroke-width",1).style("stroke-dasharray","1,0");r.applyStyle(o,n[i+"Style"]),n[i+"Class"]&&o.attr("class",n[i+"Class"])}}},{"./util":27}],3:[function(t,e,n){var r=t("./util"),i=t("./label/add-label");e.exports=function(t,e){var n=e.nodes().filter(function(t){return r.isSubgraph(e,t)}),o=t.selectAll("g.cluster").data(n,function(t){return t});return o.selectAll("*").remove(),o.enter().append("g").attr("class","cluster").attr("id",function(t){return e.node(t).id}).style("opacity",0),r.applyTransition(o,e).style("opacity",1),o.each(function(t){var n=e.node(t),r=d3.select(this);d3.select(this).append("rect");var o=r.append("g").attr("class","label");i(o,n,n.clusterLabelPos)}),o.selectAll("rect").each(function(t){var n=e.node(t),i=d3.select(this);r.applyStyle(i,n.style)}),r.applyTransition(o.exit(),e).style("opacity",0).remove(),o}},{"./label/add-label":18,"./util":27}],4:[function(t,e,n){"use strict";var r=t("./lodash"),i=t("./label/add-label"),o=t("./util"),a=t("./d3");e.exports=function(t,e){var n=t.selectAll("g.edgeLabel").data(e.edges(),function(t){return o.edgeToId(t)}).classed("update",!0);return n.selectAll("*").remove(),n.enter().append("g").classed("edgeLabel",!0).style("opacity",0),n.each(function(t){var n=e.edge(t),o=i(a.select(this),e.edge(t),0,0).classed("label",!0),u=o.node().getBBox();n.labelId&&o.attr("id",n.labelId),r.has(n,"width")||(n.width=u.width),r.has(n,"height")||(n.height=u.height)}),o.applyTransition(n.exit(),e).style("opacity",0).remove(),n}},{"./d3":7,"./label/add-label":18,"./lodash":21,"./util":27}],5:[function(t,e,n){"use strict";var r=t("./lodash"),i=t("./intersect/intersect-node"),o=t("./util"),a=t("./d3");function u(t,e){return t.split("#")[0]+"#"+e}function c(t,e){var n=a.svg.line().x(function(t){return t.x}).y(function(t){return t.y});return r.has(t,"lineInterpolate")&&n.interpolate(t.lineInterpolate),r.has(t,"lineTension")&&n.tension(Number(t.lineTension)),n(e)}e.exports=function(t,e,n){var s=t.selectAll("g.edgePath").data(e.edges(),function(t){return o.edgeToId(t)}).classed("update",!0);return function(t,e){var n=t.enter().append("g").attr("class","edgePath").style("opacity",0);n.append("path").attr("class","path").attr("d",function(t){var n=e.edge(t),i=e.node(t.v).elem,o=r.range(n.points.length).map(function(){return e=(t=i).getBBox(),{x:(n=t.ownerSVGElement.getScreenCTM().inverse().multiply(t.getScreenCTM()).translate(e.width/2,e.height/2)).e,y:n.f};var t,e,n});return c(n,o)}),n.append("defs")}(s,e),function(t,e){var n=t.exit();o.applyTransition(n,e).style("opacity",0).remove(),o.applyTransition(n.select("path.path"),e).attr("d",function(t){var n=e.node(t.v);if(n){var i=r.range(this.getTotalLength()).map(function(){return n});return c({},i)}return a.select(this).attr("d")})}(s,e),o.applyTransition(s,e).style("opacity",1),s.each(function(t){var n=a.select(this),r=e.edge(t);r.elem=this,r.id&&n.attr("id",r.id),o.applyClass(n,r.class,(n.classed("update")?"update ":"")+"edgePath")}),s.selectAll("path.path").each(function(t){var n=e.edge(t);if(n.arrowheadId=r.uniqueId("arrowhead"),"normal"==n.arrowhead)var s=a.select(this).attr("marker-end",function(){return"url("+u(location.href,n.arrowheadId)+")"}).style("fill","none");else s=a.select(this).attr("marker-start",function(){return"url("+u(location.href,n.arrowheadId)+")"}).style("fill","none");o.applyTransition(s,e).attr("d",function(t){return function(t,e){var n=t.edge(e),r=t.node(e.v),o=t.node(e.w),a=n.points.slice(1,n.points.length-1),u=t.graph().rankdir.toLowerCase();return a.unshift(i(r,a[0],!1,u)),a.push(i(o,a[a.length-1],!0,u)),c(n,a)}(e,t)}),o.applyStyle(s,n.style)}),s.selectAll("defs *").remove(),s.selectAll("defs").each(function(t){var r=e.edge(t);(0,n[r.arrowhead])(a.select(this),r.arrowheadId,r,"arrowhead")}),s}},{"./d3":7,"./intersect/intersect-node":14,"./lodash":21,"./util":27}],6:[function(t,e,n){"use strict";var r=t("./lodash"),i=t("./label/add-label"),o=t("./util"),a=t("./d3");e.exports=function(t,e,n){var u=e.nodes().filter(function(t){return!o.isSubgraph(e,t)}),c=t.selectAll("g.node").data(u,function(t){return t}).classed("update",!0);return c.selectAll("*").remove(),c.enter().append("g").attr("class","node").style("opacity",0),c.each(function(t){var u=e.node(t),c=a.select(this),s=c.append("g").attr("class","label"),f=i(s,u),l=n[u.shape],h=r.pick(f.node().getBBox(),"width","height");u.elem=this,u.id&&c.attr("id",u.id),u.labelId&&s.attr("id",u.labelId),o.applyClass(c,u.class,(c.classed("update")?"update ":"")+"node"),r.has(u,"width")&&(h.width=u.width),r.has(u,"height")&&(h.height=u.height),h.width+=u.paddingLeft+u.paddingRight,h.height+=u.paddingTop+u.paddingBottom,s.attr("transform","translate("+(u.paddingLeft-u.paddingRight)/2+","+(u.paddingTop-u.paddingBottom)/2+")");var d=l(a.select(this),h,u);o.applyStyle(d,u.style);var p=d.node().getBBox();0!=p.width?u.width=p.width:u.width=h.width,0!=p.height?u.height=p.height:u.height=h.height}),o.applyTransition(c.exit(),e).style("opacity",0).remove(),c}},{"./d3":7,"./label/add-label":18,"./lodash":21,"./util":27}],7:[function(t,e,n){e.exports=window.d3},{}],8:[function(t,e,n){var r;if(t)try{r=t("dagre")}catch(t){}r||(r=window.dagre),e.exports=r},{dagre:29}],9:[function(t,e,n){var r;if(t)try{r=t("graphlib")}catch(t){}r||(r=window.graphlib),e.exports=r},{graphlib:59}],10:[function(t,e,n){e.exports={node:t("./intersect-node"),circle:t("./intersect-circle"),ellipse:t("./intersect-ellipse"),polygon:t("./intersect-polygon"),rect:t("./intersect-rect")}},{"./intersect-circle":11,"./intersect-ellipse":12,"./intersect-node":14,"./intersect-polygon":15,"./intersect-rect":16}],11:[function(t,e,n){var r=t("./intersect-ellipse");e.exports=function(t,e,n,i,o){return r(t,e,e,n,i,o)}},{"./intersect-ellipse":12}],12:[function(t,e,n){e.exports=function(t,e,n,r,i,o){var a,u,c=t.x,s=t.y,f=c-r.x,l=s-r.y;"tb"==o||"bt"==o?(a=0,u=l>0?-t.height/2:t.height/2):"lr"!=o&&"rl"!=o||(u=0,a=f>0?-t.width/2-1:t.width/2+1);return{x:c+a,y:s+u}}},{}],13:[function(t,e,n){function r(t,e){return t*e>0}e.exports=function(t,e,n,i){var o,a,u,c,s,f,l,h,d,p,g,v,y;if(o=e.y-t.y,u=t.x-e.x,s=e.x*t.y-t.x*e.y,d=o*n.x+u*n.y+s,p=o*i.x+u*i.y+s,0!==d&&0!==p&&r(d,p))return;if(a=i.y-n.y,c=n.x-i.x,f=i.x*n.y-n.x*i.y,l=a*t.x+c*t.y+f,h=a*e.x+c*e.y+f,0!==l&&0!==h&&r(l,h))return;if(0==(g=o*c-a*u))return;return v=Math.abs(g/2),{x:(y=u*f-c*s)<0?(y-v)/g:(y+v)/g,y:(y=a*s-o*f)<0?(y-v)/g:(y+v)/g}}},{}],14:[function(t,e,n){e.exports=function(t,e,n,r){return t.intersect(e,n,r)}},{}],15:[function(t,e,n){var r=t("./intersect-line");e.exports=function(t,e,n){var i=t.x,o=t.y,a=[],u=Number.POSITIVE_INFINITY,c=Number.POSITIVE_INFINITY;e.forEach(function(t){u=Math.min(u,t.x),c=Math.min(c,t.y)});for(var s=i-t.width/2-u,f=o-t.height/2-c,l=0;l<e.length;l++){var h=e[l],d=e[l<e.length-1?l+1:0],p=r(t,n,{x:s+h.x,y:f+h.y},{x:s+d.x,y:f+d.y});p&&a.push(p)}if(!a.length)return console.log("NO INTERSECTION FOUND, RETURN NODE CENTER",t),t;a.length>1&&a.sort(function(t,e){var r=t.x-n.x,i=t.y-n.y,o=Math.sqrt(r*r+i*i),a=e.x-n.x,u=e.y-n.y,c=Math.sqrt(a*a+u*u);return o<c?-1:o===c?0:1});return a[0]}},{"./intersect-line":13}],16:[function(t,e,n){e.exports=function(t,e,n,r){var i,o,a=t.x,u=t.y,c=e.x-a,s=e.y-u,f=t.width/2,l=t.height/2;"tb"==r||"bt"==r?(i=0,o=s<0?-l:l):"lr"!=r&&"rl"!=r||(o=0,i=c<0?-f:f);return{x:a+i,y:u+o}}},{}],17:[function(t,e,n){var r=t("../util");e.exports=function(t,e){var n=t.append("foreignObject").attr("width","100000"),i=n.append("xhtml:div");i.attr("xmlns","http://www.w3.org/1999/xhtml");var o=e.label;switch(typeof o){case"function":i.insert(o);break;case"object":i.insert(function(){return o});break;default:i.html(o)}r.applyStyle(i,e.labelStyle),i.style("display","inline-block"),i.style("white-space","nowrap");var a=i[0][0].getBoundingClientRect();n.attr("width",a.width).attr("height",a.height);var u=n.node().getElementsByTagName("TABLE");if(void 0!==u&&u.length)for(var c=0;c<u.length;c++)u[c].width=a.width,u[c].style="height:"+a.height+"px;";return n}},{"../util":27}],18:[function(t,e,n){var r=t("./add-text-label"),i=t("./add-html-label"),o=t("./add-svg-label");e.exports=function(t,e,n){var a=e.label,u=t.append("g");"svg"===e.labelType?o(u,e):"string"!=typeof a||"html"===e.labelType?i(u,e):r(u,e);var c,s=u.node().getBBox();switch(n){case"top":c=-e.height/2;break;case"bottom":c=e.height/2-s.height;break;default:c=-s.height/2}return u.attr("transform","translate("+-s.width/2+","+c+")"),u}},{"./add-html-label":17,"./add-svg-label":19,"./add-text-label":20}],19:[function(t,e,n){var r=t("../util");e.exports=function(t,e){var n=t;return n.node().appendChild(e.label),r.applyStyle(n,e.labelStyle),n}},{"../util":27}],20:[function(t,e,n){var r=t("../util");e.exports=function(t,e){for(var n=t.append("text"),i=function(t){for(var e,n="",r=!1,i=0;i<t.length;++i)if(e=t[i],r){switch(e){case"n":n+="\n";break;default:n+=e}r=!1}else"\\"===e?r=!0:n+=e;return n}(e.label).split("\n"),o=0;o<i.length;o++)n.append("tspan").attr("xml:space","preserve").attr("dy","1em").attr("x","1").text(i[o]);return r.applyStyle(n,e.labelStyle),n}},{"../util":27}],21:[function(t,e,n){var r;if(t)try{r=t("lodash")}catch(t){}r||(r=window._),e.exports=r},{lodash:79}],22:[function(t,e,n){"use strict";var r=t("./util"),i=t("./d3");e.exports=function(t,e){var n=t.filter(function(){return!i.select(this).classed("update")});function o(t){var n=e.node(t);return"translate("+n.x+","+n.y+")"}n.attr("transform",o),r.applyTransition(t,e).style("opacity",1).attr("transform",o),r.applyTransition(n.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){return-e.node(t).width/2}).attr("y",function(t){return-e.node(t).height/2}),"resize"===e.graph().resizeclusters&&r.applyTransition(n.selectAll("rect"),e).filter(function(t){return e.children(t).length}).attr("width",function(t){return e.node(t).width}).attr("height",function(t){var n,r,i,o=e.node(t);return e.children(t).forEach(function(t){i=e.node(t),r||(n=i.y-i.height/2,r=i.y+i.height/2),n=Math.min(n,i.y-i.height/2),r=Math.max(r,i.y+i.height/2)}),r-(o.y-o.height/2)+e.node(t).paddingTop}).attr("x",function(t){var n=e.node(t);return-n.width/2}).attr("y",function(t){var n=e.node(t);return-n.height/2})}},{"./d3":7,"./util":27}],23:[function(t,e,n){"use strict";var r=t("./util"),i=t("./d3"),o=t("./lodash");e.exports=function(t,e){function n(t){var n=e.edge(t);return o.has(n,"x")?"translate("+n.x+","+n.y+")":""}t.filter(function(){return!i.select(this).classed("update")}).attr("transform",n),r.applyTransition(t,e).style("opacity",1).attr("transform",n)}},{"./d3":7,"./lodash":21,"./util":27}],24:[function(t,e,n){"use strict";var r=t("./util"),i=t("./d3");e.exports=function(t,e){function n(t){var n=e.node(t);return"translate("+n.x+","+n.y+")"}t.filter(function(){return!i.select(this).classed("update")}).attr("transform",n),r.applyTransition(t,e).style("opacity",1).attr("transform",n)}},{"./d3":7,"./util":27}],25:[function(t,e,n){var r=t("./lodash"),i=t("./dagre").layout;e.exports=function(){var e=t("./create-nodes"),n=t("./create-clusters"),c=t("./create-edge-labels"),s=t("./create-edge-paths"),f=t("./position-nodes"),l=t("./position-edge-labels"),h=t("./position-clusters"),d=t("./shapes"),p=t("./arrows"),g=function(t,g){!function(t){t.nodes().forEach(function(e){var n=t.node(e);r.has(n,"label")||t.children(e).length||(n.label=e),r.has(n,"paddingX")&&r.defaults(n,{paddingLeft:n.paddingX,paddingRight:n.paddingX}),r.has(n,"paddingY")&&r.defaults(n,{paddingTop:n.paddingY,paddingBottom:n.paddingY}),r.has(n,"padding")&&r.defaults(n,{paddingLeft:n.padding,paddingRight:n.padding,paddingTop:n.padding,paddingBottom:n.padding}),r.defaults(n,o),r.each(["paddingLeft","paddingRight","paddingTop","paddingBottom"],function(t){n[t]=Number(n[t])}),r.has(n,"width")&&(n._prevWidth=n.width),r.has(n,"height")&&(n._prevHeight=n.height)}),t.edges().forEach(function(e){var n=t.edge(e);r.has(n,"label")||(n.label=""),r.defaults(n,a)})}(g);var v=u(t,"output"),y=u(v,"clusters"),_=c(u(v,"edgeLabels"),g),m=e(u(v,"nodes"),g,d),w=u(v,"edgePaths");i(g),f(m,g),l(_,g),s(w,g,p);var b=n(y,g);h(b,g),function(t){r.each(t.nodes(),function(e){var n=t.node(e);r.has(n,"_prevWidth")?n.width=n._prevWidth:delete n.width,r.has(n,"_prevHeight")?n.height=n._prevHeight:delete n.height,delete n._prevWidth,delete n._prevHeight})}(g)};return g.createNodes=function(t){return arguments.length?(e=t,g):e},g.createClusters=function(t){return arguments.length?(n=t,g):n},g.createEdgeLabels=function(t){return arguments.length?(c=t,g):c},g.createEdgePaths=function(t){return arguments.length?(s=t,g):s},g.shapes=function(t){return arguments.length?(d=t,g):d},g.arrows=function(t){return arguments.length?(p=t,g):p},g};var o={paddingLeft:10,paddingRight:10,paddingTop:10,paddingBottom:10,rx:0,ry:0,shape:"rect"},a={arrowhead:"normal",lineInterpolate:"linear"};function u(t,e){var n=t.select("g."+e);return n.empty()&&(n=t.append("g").attr("class",e)),n}},{"./arrows":2,"./create-clusters":3,"./create-edge-labels":4,"./create-edge-paths":5,"./create-nodes":6,"./dagre":8,"./lodash":21,"./position-clusters":22,"./position-edge-labels":23,"./position-nodes":24,"./shapes":26}],26:[function(t,e,n){"use strict";var r=t("./intersect/intersect-rect"),i=t("./intersect/intersect-ellipse"),o=t("./intersect/intersect-circle"),a=t("./intersect/intersect-polygon");e.exports={rect:function(t,e,n){var i=t.insert("rect",":first-child").attr("rx",n.rx).attr("ry",n.ry).attr("x",-e.width/2).attr("y",-e.height/2).attr("width",e.width).attr("height",e.height);return n.intersect=function(t,e,i){return r(n,t,e,i)},i},ellipse:function(t,e,n){var r=e.width/2,o=e.height/2,a=t.insert("ellipse",":first-child").attr("x",-e.width/2).attr("y",-e.height/2).attr("rx",r).attr("ry",o);return n.intersect=function(t,e){return i(n,r,o,t,e)},a},circle:function(t,e,n){var r=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",r);return n.intersect=function(t,e,i){return o(n,r,t,e,i)},i},diamond:function(t,e,n){var r=e.width*Math.SQRT2/2,i=e.height*Math.SQRT2/2,o=[{x:0,y:-i},{x:-r,y:0},{x:0,y:i},{x:r,y:0}],u=t.insert("polygon",":first-child").attr("points",o.map(function(t){return t.x+","+t.y}).join(" "));return n.intersect=function(t){return a(n,o,t)},u}}},{"./intersect/intersect-circle":11,"./intersect/intersect-ellipse":12,"./intersect/intersect-polygon":15,"./intersect/intersect-rect":16}],27:[function(t,e,n){var r=t("./lodash");e.exports={isSubgraph:function(t,e){return!!t.children(e).length},edgeToId:function(t){return o(t.v)+":"+o(t.w)+":"+o(t.name)},applyStyle:function(t,e){e&&t.attr("style",e)},applyClass:function(t,e,n){e&&t.attr("class",e).attr("class",n+" "+t.attr("class"))},applyTransition:function(t,e){var n=e.graph();if(r.isPlainObject(n)){var i=n.transition;if(r.isFunction(i))return i(t)}return t}};var i=/:/g;function o(t){return t?String(t).replace(i,"\\:"):""}},{"./lodash":21}],28:[function(t,e,n){e.exports="0.4.17"},{}],29:[function(t,e,n){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":34,"./lib/graphlib":35,"./lib/layout":37,"./lib/util":57,"./lib/version":58}],30:[function(t,e,n){"use strict";var r=t("./lodash"),i=t("./greedy-fas");e.exports={run:function(t){var e="greedy"===t.graph().acyclicer?i(t,function(t){return function(e){return t.edge(e).weight}}(t)):function(t){var e=[],n={},i={};return r.each(t.nodes(),function o(a){r.has(i,a)||(i[a]=!0,n[a]=!0,r.each(t.outEdges(a),function(t){r.has(n,t.w)?e.push(t):o(t.w)}),delete n[a])}),e}(t);r.each(e,function(e){var n=t.edge(e);t.removeEdge(e),n.forwardName=e.name,n.reversed=!0,t.setEdge(e.w,e.v,n,r.uniqueId("rev"))})},undo:function(t){r.each(t.edges(),function(e){var n=t.edge(e);if(n.reversed){t.removeEdge(e);var r=n.forwardName;delete n.reversed,delete n.forwardName,t.setEdge(e.w,e.v,n,r)}})}}},{"./greedy-fas":36,"./lodash":38}],31:[function(t,e,n){var r=t("./lodash"),i=t("./util");function o(t,e,n,r,o,a){var u={width:0,height:0,rank:a,borderType:e},c=o[e][a-1],s=i.addDummyNode(t,"border",u,n);o[e][a]=s,t.setParent(s,r),c&&t.setEdge(c,s,{weight:1})}e.exports=function(t){r.each(t.children(),function e(n){var i=t.children(n),a=t.node(n);i.length&&r.each(i,e);if(r.has(a,"minRank")){a.borderLeft=[],a.borderRight=[];for(var u=a.minRank,c=a.maxRank+1;u<c;++u)o(t,"borderLeft","_bl",n,a,u),o(t,"borderRight","_br",n,a,u)}})}},{"./lodash":38,"./util":57}],32:[function(t,e,n){"use strict";var r=t("./lodash");function i(t){r.each(t.nodes(),function(e){o(t.node(e))}),r.each(t.edges(),function(e){o(t.edge(e))})}function o(t){var e=t.width;t.width=t.height,t.height=e}function a(t){t.y=-t.y}function u(t){var e=t.x;t.x=t.y,t.y=e}e.exports={adjust:function(t){var e=t.graph().rankdir.toLowerCase();"lr"!==e&&"rl"!==e||i(t)},undo:function(t){var e=t.graph().rankdir.toLowerCase();"bt"!==e&&"rl"!==e||function(t){r.each(t.nodes(),function(e){a(t.node(e))}),r.each(t.edges(),function(e){var n=t.edge(e);r.each(n.points,a),r.has(n,"y")&&a(n)})}(t);"lr"!==e&&"rl"!==e||(!function(t){r.each(t.nodes(),function(e){u(t.node(e))}),r.each(t.edges(),function(e){var n=t.edge(e);r.each(n.points,u),r.has(n,"x")&&u(n)})}(t),i(t))}}},{"./lodash":38}],33:[function(t,e,n){function r(){var t={};t._next=t._prev=t,this._sentinel=t}function i(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function o(t,e){if("_next"!==t&&"_prev"!==t)return e}e.exports=r,r.prototype.dequeue=function(){var t=this._sentinel,e=t._prev;if(e!==t)return i(e),e},r.prototype.enqueue=function(t){var e=this._sentinel;t._prev&&t._next&&i(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,n=e._prev;n!==e;)t.push(JSON.stringify(n,o)),n=n._prev;return"["+t.join(", ")+"]"}},{}],34:[function(t,e,n){var r=t("./lodash"),i=t("./util"),o=t("./graphlib").Graph;e.exports={debugOrdering:function(t){var e=i.buildLayerMatrix(t),n=new o({compound:!0,multigraph:!0}).setGraph({});return r.each(t.nodes(),function(e){n.setNode(e,{label:e}),n.setParent(e,"layer"+t.node(e).rank)}),r.each(t.edges(),function(t){n.setEdge(t.v,t.w,{},t.name)}),r.each(e,function(t,e){var i="layer"+e;n.setNode(i,{rank:"same"}),r.reduce(t,function(t,e){return n.setEdge(t,e,{style:"invis"}),e})}),n}}},{"./graphlib":35,"./lodash":38,"./util":57}],35:[function(t,e,n){arguments[4][9][0].apply(n,arguments)},{dup:9,graphlib:59}],36:[function(t,e,n){var r=t("./lodash"),i=t("./graphlib").Graph,o=t("./data/list");e.exports=function(t,e){if(t.nodeCount()<=1)return[];var n=function(t,e){var n=new i,a=0,u=0;r.each(t.nodes(),function(t){n.setNode(t,{v:t,in:0,out:0})}),r.each(t.edges(),function(t){var r=n.edge(t.v,t.w)||0,i=e(t),o=r+i;n.setEdge(t.v,t.w,o),u=Math.max(u,n.node(t.v).out+=i),a=Math.max(a,n.node(t.w).in+=i)});var s=r.range(u+a+3).map(function(){return new o}),f=a+1;return r.each(n.nodes(),function(t){c(s,f,n.node(t))}),{graph:n,buckets:s,zeroIdx:f}}(t,e||a),s=function(t,e,n){var r,i=[],o=e[e.length-1],a=e[0];for(;t.nodeCount();){for(;r=a.dequeue();)u(t,e,n,r);for(;r=o.dequeue();)u(t,e,n,r);if(t.nodeCount())for(var c=e.length-2;c>0;--c)if(r=e[c].dequeue()){i=i.concat(u(t,e,n,r,!0));break}}return i}(n.graph,n.buckets,n.zeroIdx);return r.flatten(r.map(s,function(e){return t.outEdges(e.v,e.w)}),!0)};var a=r.constant(1);function u(t,e,n,i,o){var a=o?[]:void 0;return r.each(t.inEdges(i.v),function(r){var i=t.edge(r),u=t.node(r.v);o&&a.push({v:r.v,w:r.w}),u.out-=i,c(e,n,u)}),r.each(t.outEdges(i.v),function(r){var i=t.edge(r),o=r.w,a=t.node(o);a.in-=i,c(e,n,a)}),t.removeNode(i.v),a}function c(t,e,n){n.out?n.in?t[n.out-n.in+e].enqueue(n):t[t.length-1].enqueue(n):t[0].enqueue(n)}},{"./data/list":33,"./graphlib":35,"./lodash":38}],37:[function(t,e,n){"use strict";var r=t("./lodash"),i=t("./acyclic"),o=t("./normalize"),a=t("./rank"),u=t("./util").normalizeRanks,c=t("./parent-dummy-chains"),s=t("./util").removeEmptyRanks,f=t("./nesting-graph"),l=t("./add-border-segments"),h=t("./coordinate-system"),d=t("./order"),p=t("./position"),g=t("./util"),v=t("./graphlib").Graph;e.exports=function(t,e){var n=e&&e.debugTiming?g.time:g.notime;n("layout",function(){var e=n("  buildLayoutGraph",function(){return function(t){var e=new v({multigraph:!0,compound:!0}),n=N(t.graph());return e.setGraph(r.merge({},_,I(n,y),r.pick(n,m))),r.each(t.nodes(),function(n){var i=N(t.node(n));e.setNode(n,r.defaults(I(i,w),b)),e.setParent(n,t.parent(n))}),r.each(t.edges(),function(n){var i=N(t.edge(n));e.setEdge(n,r.merge({},k,I(i,x),r.pick(i,E)))}),e}(t)});n("  runLayout",function(){!function(t,e){e("    makeSpaceForEdgeLabels",function(){!function(t){t.graph().ranksep/=2,r.each(t.edges(),function(e){var n=t.edge(e);n.minlen*=2})}(t)}),e("    removeSelfEdges",function(){!function(t){r.each(t.edges(),function(e){if(e.v===e.w){var n=t.node(e.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:e,label:t.edge(e)}),t.removeEdge(e)}})}(t)}),e("    acyclic",function(){i.run(t)}),e("    nestingGraph.run",function(){f.run(t)}),e("    rank",function(){a(g.asNonCompoundGraph(t))}),e("    injectEdgeLabelProxies",function(){!function(t){r.each(t.edges(),function(e){var n=t.edge(e);if(n.width&&n.height){var r=t.node(e.v),i=t.node(e.w),o={rank:(i.rank-r.rank)/2+r.rank,e:e};g.addDummyNode(t,"edge-proxy",o,"_ep")}})}(t)}),e("    removeEmptyRanks",function(){s(t)}),e("    nestingGraph.cleanup",function(){f.cleanup(t)}),e("    normalizeRanks",function(){u(t)}),e("    assignRankMinMax",function(){!function(t){var e=0;r.each(t.nodes(),function(n){var i=t.node(n);i.borderTop&&(i.minRank=t.node(i.borderTop).rank,i.maxRank=t.node(i.borderBottom).rank,e=r.max(e,i.maxRank))}),t.graph().maxRank=e}(t)}),e("    removeEdgeLabelProxies",function(){!function(t){r.each(t.nodes(),function(e){var n=t.node(e);"edge-proxy"===n.dummy&&(t.edge(n.e).labelRank=n.rank,t.removeNode(e))})}(t)}),e("    normalize.run",function(){o.run(t)}),e("    parentDummyChains",function(){c(t)}),e("    addBorderSegments",function(){l(t)}),e("    order",function(){d(t)}),e("    insertSelfEdges",function(){!function(t){var e=g.buildLayerMatrix(t);r.each(e,function(e){var n=0;r.each(e,function(e,i){var o=t.node(e);o.order=i+n,r.each(o.selfEdges,function(e){g.addDummyNode(t,"selfedge",{width:e.label.width,height:e.label.height,rank:o.rank,order:i+ ++n,e:e.e,label:e.label},"_se")}),delete o.selfEdges})})}(t)}),e("    adjustCoordinateSystem",function(){h.adjust(t)}),e("    position",function(){p(t)}),e("    positionSelfEdges",function(){!function(t){r.each(t.nodes(),function(e){var n=t.node(e);if("selfedge"===n.dummy){var r=t.node(n.e.v),i=r.x+r.width/2,o=r.y,a=n.x-i,u=r.height/2;t.setEdge(n.e,n.label),t.removeNode(e),n.label.points=[{x:i+2*a/3,y:o-u},{x:i+5*a/6,y:o-u},{x:i+a,y:o},{x:i+5*a/6,y:o+u},{x:i+2*a/3,y:o+u}],n.label.x=n.x,n.label.y=n.y}})}(t)}),e("    removeBorderNodes",function(){!function(t){r.each(t.nodes(),function(e){if(t.children(e).length){var n=t.node(e),i=t.node(n.borderTop),o=t.node(n.borderBottom),a=t.node(r.last(n.borderLeft)),u=t.node(r.last(n.borderRight));n.width=Math.abs(u.x-a.x),n.height=Math.abs(o.y-i.y),n.x=a.x+n.width/2,n.y=i.y+n.height/2}}),r.each(t.nodes(),function(e){"border"===t.node(e).dummy&&t.removeNode(e)})}(t)}),e("    normalize.undo",function(){o.undo(t)}),e("    fixupEdgeLabelCoords",function(){!function(t){r.each(t.edges(),function(e){var n=t.edge(e);if(r.has(n,"x"))switch("l"!==n.labelpos&&"r"!==n.labelpos||(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}})}(t)}),e("    undoCoordinateSystem",function(){h.undo(t)}),e("    translateGraph",function(){!function(t){var e=Number.POSITIVE_INFINITY,n=0,i=Number.POSITIVE_INFINITY,o=0,a=t.graph(),u=a.marginx||0,c=a.marginy||0;function s(t){var r=t.x,a=t.y,u=t.width,c=t.height;e=Math.min(e,r-u/2),n=Math.max(n,r+u/2),i=Math.min(i,a-c/2),o=Math.max(o,a+c/2)}r.each(t.nodes(),function(e){s(t.node(e))}),r.each(t.edges(),function(e){var n=t.edge(e);r.has(n,"x")&&s(n)}),e-=u,i-=c,r.each(t.nodes(),function(n){var r=t.node(n);r.x-=e,r.y-=i}),r.each(t.edges(),function(n){var o=t.edge(n);r.each(o.points,function(t){t.x-=e,t.y-=i}),r.has(o,"x")&&(o.x-=e),r.has(o,"y")&&(o.y-=i)}),a.width=n-e+u,a.height=o-i+c}(t)}),e("    assignNodeIntersects",function(){!function(t){r.each(t.edges(),function(e){var n,r,i=t.edge(e),o=t.node(e.v),a=t.node(e.w);i.points?(n=i.points[0],r=i.points[i.points.length-1]):(i.points=[],n=a,r=o),i.points.unshift(g.intersectRect(o,n,!1,t.graph().rankdir.toLowerCase())),i.points.push(g.intersectRect(a,r,!0,t.graph().rankdir.toLowerCase()))})}(t)}),e("    reversePoints",function(){!function(t){r.each(t.edges(),function(e){var n=t.edge(e);n.reversed&&n.points.reverse()})}(t)}),e("    acyclic.undo",function(){i.undo(t)})}(e,n)}),n("  updateInputGraph",function(){!function(t,e){r.each(t.nodes(),function(n){var r=t.node(n),i=e.node(n);r&&(r.x=i.x,r.y=i.y,e.children(n).length&&(r.width=i.width,r.height=i.height))}),r.each(t.edges(),function(n){var i=t.edge(n),o=e.edge(n);i.points=o.points,r.has(o,"x")&&(i.x=o.x,i.y=o.y)}),t.graph().width=e.graph().width,t.graph().height=e.graph().height}(t,e)})})};var y=["nodesep","edgesep","ranksep","marginx","marginy"],_={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb",edgecomplex:"complex",resizeclusters:"resize"},m=["acyclicer","ranker","rankdir","align","edgecomplex","resizeclusters"],w=["width","height"],b={width:1,height:1},x=["minlen","weight","width","height","labeloffset"],k={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},E=["labelpos"];function I(t,e){return r.mapValues(r.pick(t,e),Number)}function N(t){var e={};return r.each(t,function(t,n){e[n.toLowerCase()]=t}),e}},{"./acyclic":30,"./add-border-segments":31,"./coordinate-system":32,"./graphlib":35,"./lodash":38,"./nesting-graph":39,"./normalize":40,"./order":45,"./parent-dummy-chains":50,"./position":52,"./rank":54,"./util":57}],38:[function(t,e,n){arguments[4][21][0].apply(n,arguments)},{dup:21,lodash:79}],39:[function(t,e,n){var r=t("./lodash"),i=t("./util");e.exports={run:function(t){var e=i.addDummyNode(t,"root",{},"_root"),n=function(t){var e={};return r.each(t.children(),function(n){!function n(i,o){var a=t.children(i);a&&a.length&&r.each(a,function(t){n(t,o+1)}),e[i]=o}(n,1)}),e}(t),o=r.max(n)-1,a=2*o+1;t.graph().nestingRoot=e,r.each(t.edges(),function(e){t.edge(e).minlen*=a});var u=function(t){return r.reduce(t.edges(),function(e,n){return e+t.edge(n).weight},0)}(t)+1;r.each(t.children(),function(c){!function t(e,n,o,a,u,c,s){var f=e.children(s);if(!f.length)return void(s!==n&&e.setEdge(n,s,{weight:0,minlen:o}));var l=i.addBorderNode(e,"_bt"),h=i.addBorderNode(e,"_bb"),d=e.node(s);e.setParent(l,s);d.borderTop=l;e.setParent(h,s);d.borderBottom=h;r.each(f,function(r){t(e,n,o,a,u,c,r);var i=e.node(r),f=i.borderTop?i.borderTop:r,d=i.borderBottom?i.borderBottom:r,p=i.borderTop?a:2*a,g=f!==d?1:u-c[s]+1;e.setEdge(l,f,{weight:p,minlen:g,nestingEdge:!0}),e.setEdge(d,h,{weight:p,minlen:g,nestingEdge:!0})});e.parent(s)||e.setEdge(n,l,{weight:0,minlen:u+c[s]})}(t,e,a,u,o,n,c)}),t.graph().nodeRankFactor=a},cleanup:function(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,r.each(t.edges(),function(e){var n=t.edge(e);n.nestingEdge&&t.removeEdge(e)})}}},{"./lodash":38,"./util":57}],40:[function(t,e,n){"use strict";var r=t("./lodash"),i=t("./util");e.exports={run:function(t){t.graph().dummyChains=[],r.each(t.edges(),function(e){!function(t,e){var n,r,o,a=e.v,u=t.node(a).rank,c=e.w,s=t.node(c).rank,f=e.name,l=t.edge(e),h=l.labelRank;if(s===u+1)return;for(t.removeEdge(e),o=0,++u;u<s;++o,++u)l.points=[],r={width:0,height:0,edgeLabel:l,edgeObj:e,rank:u},n=i.addDummyNode(t,"edge",r,"_d"),u===h&&(r.width=l.width,r.height=l.height,r.dummy="edge-label",r.labelpos=l.labelpos),t.setEdge(a,n,{weight:l.weight},f),0===o&&t.graph().dummyChains.push(n),a=n;t.setEdge(a,c,{weight:l.weight},f)}(t,e)})},undo:function(t){r.each(t.graph().dummyChains,function(e){var n,r,i=t.node(e),o=i.edgeLabel;for(t.setEdge(i.edgeObj,o);i.dummy;)n=t.successors(e)[0],t.removeNode(e),r={x:i.x,y:i.y},"complex"===t.graph().edgecomplex&&o.points.push({x:i.x,y:i.y}),"edge-label"===i.dummy&&(o.x=i.x,o.y=i.y,o.width=i.width,o.height=i.height),e=n,i=t.node(e);"simplify"===t.graph().edgecomplex&&void 0!==r&&o.points.push(r)})}}},{"./lodash":38,"./util":57}],41:[function(t,e,n){var r=t("../lodash");e.exports=function(t,e,n){var i,o={};r.each(n,function(n){for(var r,a,u=t.parent(n);u;){if((r=t.parent(u))?(a=o[r],o[r]=u):(a=i,i=u),a&&a!==u)return void e.setEdge(a,u);u=r}})}},{"../lodash":38}],42:[function(t,e,n){var r=t("../lodash");e.exports=function(t,e){return r.map(e,function(e){var n=t.inEdges(e);if(n.length){var i=r.reduce(n,function(e,n){var r=t.edge(n),i=t.node(n.v);return{sum:e.sum+r.weight*i.order,weight:e.weight+r.weight}},{sum:0,weight:0});return{v:e,barycenter:i.sum/i.weight,weight:i.weight}}return{v:e}})}},{"../lodash":38}],43:[function(t,e,n){var r=t("../lodash"),i=t("../graphlib").Graph;e.exports=function(t,e,n){var o=function(t){var e;for(;t.hasNode(e=r.uniqueId("_root")););return e}(t),a=new i({compound:!0}).setGraph({root:o}).setDefaultNodeLabel(function(e){return t.node(e)});return r.each(t.nodes(),function(i){var u=t.node(i),c=t.parent(i);(u.rank===e||u.minRank<=e&&e<=u.maxRank)&&(a.setNode(i),a.setParent(i,c||o),r.each(t[n](i),function(e){var n=e.v===i?e.w:e.v,o=a.edge(n,i),u=r.isUndefined(o)?0:o.weight;a.setEdge(n,i,{weight:t.edge(e).weight+u})}),r.has(u,"minRank")&&a.setNode(i,{borderLeft:u.borderLeft[e],borderRight:u.borderRight[e]}))}),a}},{"../graphlib":35,"../lodash":38}],44:[function(t,e,n){"use strict";var r=t("../lodash");function i(t,e,n){for(var i=r.zipObject(n,r.map(n,function(t,e){return e})),o=r.flatten(r.map(e,function(e){return r.chain(t.outEdges(e)).map(function(e){return{pos:i[e.w],weight:t.edge(e).weight}}).sortBy("pos").value()}),!0),a=1;a<n.length;)a<<=1;var u=2*a-1;a-=1;var c=r.map(new Array(u),function(){return 0}),s=0;return r.each(o.forEach(function(t){var e=t.pos+a;c[e]+=t.weight;for(var n=0;e>0;)e%2&&(n+=c[e+1]),c[e=e-1>>1]+=t.weight;s+=t.weight*n})),s}e.exports=function(t,e){for(var n=0,r=1;r<e.length;++r)n+=i(t,e[r-1],e[r]);return n}},{"../lodash":38}],45:[function(t,e,n){"use strict";var r=t("../lodash"),i=t("./init-order"),o=t("./cross-count"),a=t("./sort-subgraph"),u=t("./build-layer-graph"),c=t("./add-subgraph-constraints"),s=t("../graphlib").Graph,f=t("../util");function l(t,e,n){return r.map(e,function(e){return u(t,e,n)})}function h(t,e){var n=new s;r.each(t,function(t){var i=t.graph().root,o=a(t,i,n,e);r.each(o.vs,function(e,n){t.node(e).order=n}),c(t,n,o.vs)})}function d(t,e){r.each(e,function(e){r.each(e,function(e,n){t.node(e).order=n})})}e.exports=function(t){var e=f.maxRank(t),n=l(t,r.range(1,e+1),"inEdges"),a=l(t,r.range(e-1,-1,-1),"outEdges"),u=i(t);d(t,u);for(var c,s=Number.POSITIVE_INFINITY,p=0,g=0;g<4;++p,++g){h(p%2?n:a,p%4>=2),u=f.buildLayerMatrix(t);var v=o(t,u);v<s&&p%2&&(g=0,c=r.cloneDeep(u),s=v)}d(t,c)}},{"../graphlib":35,"../lodash":38,"../util":57,"./add-subgraph-constraints":41,"./build-layer-graph":43,"./cross-count":44,"./init-order":46,"./sort-subgraph":48}],46:[function(t,e,n){"use strict";var r=t("../lodash");e.exports=function(t){var e={},n=r.filter(t.nodes(),function(e){return!t.children(e).length}),i=r.max(r.map(n,function(e){return t.node(e).rank})),o=r.map(r.range(i+1),function(){return[]});var a=r.sortBy(n,function(e){return t.node(e).rank});return r.each(a,function n(i){if(!r.has(e,i)){e[i]=!0;var a=t.node(i);o[a.rank].push(i),r.each(t.successors(i),n)}}),o}},{"../lodash":38}],47:[function(t,e,n){"use strict";var r=t("../lodash");e.exports=function(t,e){var n={};return r.each(t,function(t,e){var i=n[t.v]={indegree:0,in:[],out:[],vs:[t.v],i:e};r.isUndefined(t.barycenter)||(i.barycenter=t.barycenter,i.weight=t.weight)}),r.each(e.edges(),function(t){var e=n[t.v],i=n[t.w];r.isUndefined(e)||r.isUndefined(i)||(i.indegree++,e.out.push(n[t.w]))}),function(t){var e=[];function n(t){return function(e){var n,i,o,a;e.merged||(r.isUndefined(e.barycenter)||r.isUndefined(t.barycenter)||e.barycenter>=t.barycenter)&&(i=e,o=0,a=0,(n=t).weight&&(o+=n.barycenter*n.weight,a+=n.weight),i.weight&&(o+=i.barycenter*i.weight,a+=i.weight),n.vs=i.vs.concat(n.vs),n.barycenter=o/a,n.weight=a,n.i=Math.min(i.i,n.i),i.merged=!0)}}function i(e){return function(n){n.in.push(e),0==--n.indegree&&t.push(n)}}for(;t.length;){var o=t.pop();e.push(o),r.each(o.in.reverse(),n(o)),r.each(o.out,i(o))}return r.chain(e).filter(function(t){return!t.merged}).map(function(t){return r.pick(t,["vs","i","barycenter","weight"])}).value()}(r.filter(n,function(t){return!t.indegree}))}},{"../lodash":38}],48:[function(t,e,n){var r=t("../lodash"),i=t("./barycenter"),o=t("./resolve-conflicts"),a=t("./sort");e.exports=function t(e,n,u,c){var s=e.children(n),f=e.node(n),l=f?f.borderLeft:void 0,h=f?f.borderRight:void 0,d={};l&&(s=r.filter(s,function(t){return t!==l&&t!==h}));var p=i(e,s);r.each(p,function(n){if(e.children(n.v).length){var i=t(e,n.v,u,c);d[n.v]=i,r.has(i,"barycenter")&&(o=n,a=i,r.isUndefined(o.barycenter)?(o.barycenter=a.barycenter,o.weight=a.weight):(o.barycenter=(o.barycenter*o.weight+a.barycenter*a.weight)/(o.weight+a.weight),o.weight+=a.weight))}var o,a});var g=o(p,u);!function(t,e){r.each(t,function(t){t.vs=r.flatten(t.vs.map(function(t){return e[t]?e[t].vs:t}),!0)})}(g,d);var v=a(g,c);if(l&&(v.vs=r.flatten([l,v.vs,h],!0),e.predecessors(l).length)){var y=e.node(e.predecessors(l)[0]),_=e.node(e.predecessors(h)[0]);r.has(v,"barycenter")||(v.barycenter=0,v.weight=0),v.barycenter=(v.barycenter*v.weight+y.order+_.order)/(v.weight+2),v.weight+=2}return v}},{"../lodash":38,"./barycenter":42,"./resolve-conflicts":47,"./sort":49}],49:[function(t,e,n){var r=t("../lodash"),i=t("../util");function o(t,e,n){for(var i;e.length&&(i=r.last(e)).i<=n;)e.pop(),t.push(i.vs),n++;return n}e.exports=function(t,e){var n=i.partition(t,function(t){return r.has(t,"barycenter")}),a=n.lhs,u=r.sortBy(n.rhs,function(t){return-t.i}),c=[],s=0,f=0,l=0;a.sort((h=!!e,function(t,e){return t.barycenter<e.barycenter?-1:t.barycenter>e.barycenter?1:h?e.i-t.i:t.i-e.i})),l=o(c,u,l),r.each(a,function(t){l+=t.vs.length,c.push(t.vs),s+=t.barycenter*t.weight,f+=t.weight,l=o(c,u,l)});var h;var d={vs:r.flatten(c,!0)};f&&(d.barycenter=s/f,d.weight=f);return d}},{"../lodash":38,"../util":57}],50:[function(t,e,n){var r=t("./lodash");e.exports=function(t){var e=function(t){var e={},n=0;return r.each(t.children(),function i(o){var a=n;r.each(t.children(o),i),e[o]={low:a,lim:n++}}),e}(t);r.each(t.graph().dummyChains,function(n){for(var r=t.node(n),i=r.edgeObj,o=function(t,e,n,r){var i,o,a=[],u=[],c=Math.min(e[n].low,e[r].low),s=Math.max(e[n].lim,e[r].lim);i=n;do{i=t.parent(i),a.push(i)}while(i&&(e[i].low>c||s>e[i].lim));o=i,i=r;for(;(i=t.parent(i))!==o;)u.push(i);return{path:a.concat(u.reverse()),lca:o}}(t,e,i.v,i.w),a=o.path,u=o.lca,c=0,s=a[c],f=!0;n!==i.w;){if(r=t.node(n),f){for(;(s=a[c])!==u&&t.node(s).maxRank<r.rank;)c++;s===u&&(f=!1)}if(!f){for(;c<a.length-1&&t.node(s=a[c+1]).minRank<=r.rank;)c++;s=a[c]}t.setParent(n,s),n=t.successors(n)[0]}})}},{"./lodash":38}],51:[function(t,e,n){"use strict";var r=t("../lodash"),i=t("../graphlib").Graph,o=t("../util");function a(t,e){var n={};return r.reduce(e,function(e,i){var o=0,a=0,u=e.length,s=r.last(i);return r.each(i,function(e,f){var l=function(t,e){if(t.node(e).dummy)return r.find(t.predecessors(e),function(e){return t.node(e).dummy})}(t,e),h=l?t.node(l).order:u;(l||e===s)&&(r.each(i.slice(a,f+1),function(e){r.each(t.predecessors(e),function(r){var i=t.node(r),a=i.order;!(a<o||h<a)||i.dummy&&t.node(e).dummy||c(n,r,e)})}),a=f+1,o=h)}),i}),n}function u(t,e){var n={};function i(e,i,o,a,u){var s;r.each(r.range(i,o),function(i){s=e[i],t.node(s).dummy&&r.each(t.predecessors(s),function(e){var r=t.node(e);r.dummy&&(r.order<a||r.order>u)&&c(n,e,s)})})}return r.reduce(e,function(e,n){var o,a=-1,u=0;return r.each(n,function(r,c){if("border"===t.node(r).dummy){var s=t.predecessors(r);s.length&&(o=t.node(s[0]).order,i(n,u,c,a,o),u=c,a=o)}i(n,u,n.length,o,e.length)}),n}),n}function c(t,e,n){if(e>n){var r=e;e=n,n=r}var i=t[e];i||(t[e]=i={}),i[n]=!0}function s(t,e,n){if(e>n){var i=e;e=n,n=i}return r.has(t[e],n)}function f(t,e,n,i){var o={},a={},u={};return r.each(e,function(t){r.each(t,function(t,e){o[t]=t,a[t]=t,u[t]=e})}),r.each(e,function(t){var e=-1;r.each(t,function(t){var c=i(t);if(c.length)for(var f=((c=r.sortBy(c,function(t){return u[t]})).length-1)/2,l=Math.floor(f),h=Math.ceil(f);l<=h;++l){var d=c[l];a[t]===t&&e<u[d]&&!s(n,t,d)&&(a[d]=t,a[t]=o[t]=o[d],e=u[d])}})}),{root:o,align:a}}function l(t,e,n,o,a){var u={},c=function(t,e,n,o){var a=new i,u=t.graph(),c=function(t,e,n){return function(i,o,a){var u,c=i.node(o),s=i.node(a),f=0;if(f+=c.width/2,r.has(c,"labelpos"))switch(c.labelpos.toLowerCase()){case"l":u=-c.width/2;break;case"r":u=c.width/2}if(u&&(f+=n?u:-u),u=0,f+=(c.dummy?e:t)/2,f+=(s.dummy?e:t)/2,f+=s.width/2,r.has(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":u=s.width/2;break;case"r":u=-s.width/2}return u&&(f+=n?u:-u),u=0,f}}(u.nodesep,u.edgesep,o);return r.each(e,function(e){var i;r.each(e,function(e){var r=n[e];if(a.setNode(r),i){var o=n[i],u=a.edge(o,r);a.setEdge(o,r,Math.max(c(t,e,i),u||0))}i=e})}),a}(t,e,n,a),s={};r.each(c.nodes(),function t(e){r.has(s,e)||(s[e]=!0,u[e]=r.reduce(c.inEdges(e),function(e,n){return t(n.v),Math.max(e,u[n.v]+c.edge(n))},0))});var f=a?"borderLeft":"borderRight";return r.each(c.nodes(),function e(n){if(2!==s[n]){s[n]++;var i=t.node(n),o=r.reduce(c.outEdges(n),function(t,n){return e(n.w),Math.min(t,u[n.w]-c.edge(n))},Number.POSITIVE_INFINITY);o!==Number.POSITIVE_INFINITY&&i.borderType!==f&&(u[n]=Math.max(u[n],o))}}),r.each(o,function(t){u[t]=u[n[t]]}),u}function h(t,e){return r.min(e,function(e){var n=r.min(e,function(e,n){return e-g(t,n)/2});return r.max(e,function(e,n){return e+g(t,n)/2})-n})}function d(t,e){var n=r.min(e),i=r.max(e);r.each(["u","d"],function(o){r.each(["l","r"],function(a){var u,c=o+a,s=t[c];s!==e&&(u="l"===a?n-r.min(s):i-r.max(s))&&(t[c]=r.mapValues(s,function(t){return t+u}))})})}function p(t,e){return r.mapValues(t.ul,function(n,i){if(e)return t[e.toLowerCase()][i];var o=r.sortBy(r.pluck(t,i));return(o[1]+o[2])/2})}function g(t,e){return t.node(e).width}e.exports={positionX:function(t){var e,n=o.buildLayerMatrix(t),i=r.merge(a(t,n),u(t,n)),c={};r.each(["u","d"],function(o){e="u"===o?n:r.values(n).reverse(),r.each(["l","r"],function(n){"r"===n&&(e=r.map(e,function(t){return r.values(t).reverse()}));var a=r.bind("u"===o?t.predecessors:t.successors,t),u=f(t,e,i,a),s=l(t,e,u.root,u.align,"r"===n);"r"===n&&(s=r.mapValues(s,function(t){return-t})),c[o+n]=s})});var s=h(t,c);return d(c,s),p(c,t.graph().align)},findType1Conflicts:a,findType2Conflicts:u,addConflict:c,hasConflict:s,verticalAlignment:f,horizontalCompaction:l,alignCoordinates:d,findSmallestWidthAlignment:h,balance:p}},{"../graphlib":35,"../lodash":38,"../util":57}],52:[function(t,e,n){"use strict";var r=t("../lodash"),i=t("../util"),o=t("./bk").positionX;e.exports=function(t){(function(t){var e=i.buildLayerMatrix(t),n=t.graph().ranksep,o=0;r.each(e,function(e){var i=r.max(r.map(e,function(e){return t.node(e).height}));r.each(e,function(e){t.node(e).y=o+i/2}),o+=i+n})})(t=i.asNonCompoundGraph(t)),r.each(o(t),function(e,n){t.node(n).x=e})}},{"../lodash":38,"../util":57,"./bk":51}],53:[function(t,e,n){"use strict";var r=t("../lodash"),i=t("../graphlib").Graph,o=t("./util").slack;function a(t,e){return r.each(t.nodes(),function n(i){r.each(e.nodeEdges(i),function(r){var a=r.v,u=i===a?r.w:a;t.hasNode(u)||o(e,r)||(t.setNode(u,{}),t.setEdge(i,u,{}),n(u))})}),t.nodeCount()}function u(t,e){return r.min(e.edges(),function(n){if(t.hasNode(n.v)!==t.hasNode(n.w))return o(e,n)})}function c(t,e,n){r.each(t.nodes(),function(t){e.node(t).rank+=n})}e.exports=function(t){var e,n,r=new i({directed:!1}),s=t.nodes()[0],f=t.nodeCount();r.setNode(s,{});for(;a(r,t)<f;)e=u(r,t),n=r.hasNode(e.v)?o(t,e):-o(t,e),c(r,t,n);return r}},{"../graphlib":35,"../lodash":38,"./util":56}],54:[function(t,e,n){"use strict";var r=t("./util").longestPath,i=t("./feasible-tree"),o=t("./network-simplex");e.exports=function(t){switch(t.graph().ranker){case"network-simplex":u(t);break;case"tight-tree":!function(t){r(t),i(t)}(t);break;case"longest-path":a(t);break;default:u(t)}};var a=r;function u(t){o(t)}},{"./feasible-tree":53,"./network-simplex":55,"./util":56}],55:[function(t,e,n){"use strict";var r=t("../lodash"),i=t("./feasible-tree"),o=t("./util").slack,a=t("./util").longestPath,u=t("../graphlib").alg.preorder,c=t("../graphlib").alg.postorder,s=t("../util").simplify;function f(t){t=s(t),a(t);var e,n=i(t);for(d(n),l(n,t);e=p(n);)v(n,t,e,g(n,t,e))}function l(t,e){var n=c(t,t.nodes());n=n.slice(0,n.length-1),r.each(n,function(n){!function(t,e,n){var r=t.node(n).parent;t.edge(n,r).cutvalue=h(t,e,n)}(t,e,n)})}function h(t,e,n){var i=t.node(n).parent,o=!0,a=e.edge(n,i),u=0;return a||(o=!1,a=e.edge(i,n)),u=a.weight,r.each(e.nodeEdges(n),function(r){var a,c,s=r.v===n,f=s?r.w:r.v;if(f!==i){var l=s===o,h=e.edge(r).weight;if(u+=l?h:-h,a=n,c=f,t.hasEdge(a,c)){var d=t.edge(n,f).cutvalue;u+=l?-d:d}}}),u}function d(t,e){arguments.length<2&&(e=t.nodes()[0]),function t(e,n,i,o,a){var u=i,c=e.node(o);n[o]=!0;r.each(e.neighbors(o),function(a){r.has(n,a)||(i=t(e,n,i,a,o))});c.low=u;c.lim=i++;a?c.parent=a:delete c.parent;return i}(t,{},1,e)}function p(t){return r.find(t.edges(),function(e){return t.edge(e).cutvalue<0})}function g(t,e,n){var i=n.v,a=n.w;e.hasEdge(i,a)||(i=n.w,a=n.v);var u=t.node(i),c=t.node(a),s=u,f=!1;u.lim>c.lim&&(s=c,f=!0);var l=r.filter(e.edges(),function(e){return f===y(t,t.node(e.v),s)&&f!==y(t,t.node(e.w),s)});return r.min(l,function(t){return o(e,t)})}function v(t,e,n,i){var o=n.v,a=n.w;t.removeEdge(o,a),t.setEdge(i.v,i.w,{}),d(t),l(t,e),function(t,e){var n=r.find(t.nodes(),function(t){return!e.node(t).parent}),i=u(t,n);i=i.slice(1),r.each(i,function(n){var r=t.node(n).parent,i=e.edge(n,r),o=!1;i||(i=e.edge(r,n),o=!0),e.node(n).rank=e.node(r).rank+(o?i.minlen:-i.minlen)})}(t,e)}function y(t,e,n){return n.low<=e.lim&&e.lim<=n.lim}e.exports=f,f.initLowLimValues=d,f.initCutValues=l,f.calcCutValue=h,f.leaveEdge=p,f.enterEdge=g,f.exchangeEdges=v},{"../graphlib":35,"../lodash":38,"../util":57,"./feasible-tree":53,"./util":56}],56:[function(t,e,n){"use strict";var r=t("../lodash");e.exports={longestPath:function(t){var e={};r.each(t.sources(),function n(i){var o=t.node(i);if(r.has(e,i))return o.rank;e[i]=!0;var a=r.min(r.map(t.outEdges(i),function(e){return n(e.w)-t.edge(e).minlen}));a===Number.POSITIVE_INFINITY&&(a=0);return o.rank=a})},slack:function(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}}},{"../lodash":38}],57:[function(t,e,n){"use strict";var r=t("./lodash"),i=t("./graphlib").Graph;function o(t,e,n,i){var o;do{o=r.uniqueId(i)}while(t.hasNode(o));return n.dummy=e,t.setNode(o,n),o}function a(t){return r.max(r.map(t.nodes(),function(e){var n=t.node(e).rank;if(!r.isUndefined(n))return n}))}e.exports={addDummyNode:o,simplify:function(t){var e=(new i).setGraph(t.graph());return r.each(t.nodes(),function(n){e.setNode(n,t.node(n))}),r.each(t.edges(),function(n){var r=e.edge(n.v,n.w)||{weight:0,minlen:1},i=t.edge(n);e.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})}),e},asNonCompoundGraph:function(t){var e=new i({multigraph:t.isMultigraph()}).setGraph(t.graph());return r.each(t.nodes(),function(n){t.children(n).length||e.setNode(n,t.node(n))}),r.each(t.edges(),function(n){e.setEdge(n,t.edge(n))}),e},successorWeights:function(t){var e=r.map(t.nodes(),function(e){var n={};return r.each(t.outEdges(e),function(e){n[e.w]=(n[e.w]||0)+t.edge(e).weight}),n});return r.zipObject(t.nodes(),e)},predecessorWeights:function(t){var e=r.map(t.nodes(),function(e){var n={};return r.each(t.inEdges(e),function(e){n[e.v]=(n[e.v]||0)+t.edge(e).weight}),n});return r.zipObject(t.nodes(),e)},intersectRect:function(t,e,n,r){var i,o,a=t.x,u=t.y,c=e.x-a,s=e.y-u,f=t.width/2,l=t.height/2;if(!c&&!s)throw new Error("Not possible to find intersection inside of the rectangle");"lr"==r||"rl"==r?(i=0,o=s<0?-l:l):"tb"!=r&&"tb"!=r||(o=0,i=c<0?-f:f);return{x:a+i,y:u+o}},buildLayerMatrix:function(t){var e=r.map(r.range(a(t)+1),function(){return[]});return r.each(t.nodes(),function(n){var i=t.node(n),o=i.rank;r.isUndefined(o)||(e[o][i.order]=n)}),e},normalizeRanks:function(t){var e=r.min(r.map(t.nodes(),function(e){return t.node(e).rank}));r.each(t.nodes(),function(n){var i=t.node(n);r.has(i,"rank")&&(i.rank-=e)})},removeEmptyRanks:function(t){var e=r.min(r.map(t.nodes(),function(e){return t.node(e).rank})),n=[];r.each(t.nodes(),function(r){var i=t.node(r).rank-e;n[i]||(n[i]=[]),n[i].push(r)});var i=0,o=t.graph().nodeRankFactor;r.each(n,function(e,n){r.isUndefined(e)&&n%o!=0?--i:i&&r.each(e,function(e){t.node(e).rank+=i})})},addBorderNode:function(t,e,n,r){var i={width:0,height:0};arguments.length>=4&&(i.rank=n,i.order=r);return o(t,"border",i,e)},maxRank:a,partition:function(t,e){var n={lhs:[],rhs:[]};return r.each(t,function(t){e(t)?n.lhs.push(t):n.rhs.push(t)}),n},time:function(t,e){var n=r.now();try{return e()}finally{console.log(t+" time: "+(r.now()-n)+"ms")}},notime:function(t,e){return e()}}},{"./graphlib":35,"./lodash":38}],58:[function(t,e,n){e.exports="0.7.3"},{}],59:[function(t,e,n){var r=t("./lib");e.exports={Graph:r.Graph,json:t("./lib/json"),alg:t("./lib/alg"),version:r.version}},{"./lib":75,"./lib/alg":66,"./lib/json":76}],60:[function(t,e,n){var r=t("../lodash");e.exports=function(t){var e,n={},i=[];function o(i){r.has(n,i)||(n[i]=!0,e.push(i),r.each(t.successors(i),o),r.each(t.predecessors(i),o))}return r.each(t.nodes(),function(t){e=[],o(t),e.length&&i.push(e)}),i}},{"../lodash":77}],61:[function(t,e,n){var r=t("../lodash");e.exports=function(t,e,n){r.isArray(e)||(e=[e]);var i=[],o={};return r.each(e,function(e){if(!t.hasNode(e))throw new Error("Graph does not have node: "+e);!function t(e,n,i,o,a){r.has(o,n)||(o[n]=!0,i||a.push(n),r.each(e.neighbors(n),function(n){t(e,n,i,o,a)}),i&&a.push(n))}(t,e,"post"===n,o,i)}),i}},{"../lodash":77}],62:[function(t,e,n){var r=t("./dijkstra"),i=t("../lodash");e.exports=function(t,e,n){return i.transform(t.nodes(),function(i,o){i[o]=r(t,o,e,n)},{})}},{"../lodash":77,"./dijkstra":63}],63:[function(t,e,n){var r=t("../lodash"),i=t("../data/priority-queue");e.exports=function(t,e,n,r){return function(t,e,n,r){var o,a,u={},c=new i,s=function(t){var e=t.v!==o?t.v:t.w,r=u[e],i=n(t),s=a.distance+i;if(i<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+t+" Weight: "+i);s<r.distance&&(r.distance=s,r.predecessor=o,c.decrease(e,s))};t.nodes().forEach(function(t){var n=t===e?0:Number.POSITIVE_INFINITY;u[t]={distance:n},c.add(t,n)});for(;c.size()>0&&(o=c.removeMin(),(a=u[o]).distance!==Number.POSITIVE_INFINITY);)r(o).forEach(s);return u}(t,String(e),n||o,r||function(e){return t.outEdges(e)})};var o=r.constant(1)},{"../data/priority-queue":73,"../lodash":77}],64:[function(t,e,n){var r=t("../lodash"),i=t("./tarjan");e.exports=function(t){return r.filter(i(t),function(e){return e.length>1||1===e.length&&t.hasEdge(e[0],e[0])})}},{"../lodash":77,"./tarjan":71}],65:[function(t,e,n){var r=t("../lodash");e.exports=function(t,e,n){return function(t,e,n){var r={},i=t.nodes();return i.forEach(function(t){r[t]={},r[t][t]={distance:0},i.forEach(function(e){t!==e&&(r[t][e]={distance:Number.POSITIVE_INFINITY})}),n(t).forEach(function(n){var i=n.v===t?n.w:n.v,o=e(n);r[t][i]={distance:o,predecessor:t}})}),i.forEach(function(t){var e=r[t];i.forEach(function(n){var o=r[n];i.forEach(function(n){var r=o[t],i=e[n],a=o[n],u=r.distance+i.distance;u<a.distance&&(a.distance=u,a.predecessor=i.predecessor)})})}),r}(t,e||i,n||function(e){return t.outEdges(e)})};var i=r.constant(1)},{"../lodash":77}],66:[function(t,e,n){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":60,"./dijkstra":63,"./dijkstra-all":62,"./find-cycles":64,"./floyd-warshall":65,"./is-acyclic":67,"./postorder":68,"./preorder":69,"./prim":70,"./tarjan":71,"./topsort":72}],67:[function(t,e,n){var r=t("./topsort");e.exports=function(t){try{r(t)}catch(t){if(t instanceof r.CycleException)return!1;throw t}return!0}},{"./topsort":72}],68:[function(t,e,n){var r=t("./dfs");e.exports=function(t,e){return r(t,e,"post")}},{"./dfs":61}],69:[function(t,e,n){var r=t("./dfs");e.exports=function(t,e){return r(t,e,"pre")}},{"./dfs":61}],70:[function(t,e,n){var r=t("../lodash"),i=t("../graph"),o=t("../data/priority-queue");e.exports=function(t,e){var n,a=new i,u={},c=new o;function s(t){var r=t.v===n?t.w:t.v,i=c.priority(r);if(void 0!==i){var o=e(t);o<i&&(u[r]=n,c.decrease(r,o))}}if(0===t.nodeCount())return a;r.each(t.nodes(),function(t){c.add(t,Number.POSITIVE_INFINITY),a.setNode(t)}),c.decrease(t.nodes()[0],0);var f=!1;for(;c.size()>0;){if(n=c.removeMin(),r.has(u,n))a.setEdge(n,u[n]);else{if(f)throw new Error("Input graph is not connected: "+t);f=!0}t.nodeEdges(n).forEach(s)}return a}},{"../data/priority-queue":73,"../graph":74,"../lodash":77}],71:[function(t,e,n){var r=t("../lodash");e.exports=function(t){var e=0,n=[],i={},o=[];return t.nodes().forEach(function(a){r.has(i,a)||function a(u){var c=i[u]={onStack:!0,lowlink:e,index:e++};if(n.push(u),t.successors(u).forEach(function(t){r.has(i,t)?i[t].onStack&&(c.lowlink=Math.min(c.lowlink,i[t].index)):(a(t),c.lowlink=Math.min(c.lowlink,i[t].lowlink))}),c.lowlink===c.index){var s,f=[];do{s=n.pop(),i[s].onStack=!1,f.push(s)}while(u!==s);o.push(f)}}(a)}),o}},{"../lodash":77}],72:[function(t,e,n){var r=t("../lodash");function i(t){var e={},n={},i=[];if(r.each(t.sinks(),function a(u){if(r.has(n,u))throw new o;r.has(e,u)||(n[u]=!0,e[u]=!0,r.each(t.predecessors(u),a),delete n[u],i.push(u))}),r.size(e)!==t.nodeCount())throw new o;return i}function o(){}e.exports=i,i.CycleException=o},{"../lodash":77}],73:[function(t,e,n){var r=t("../lodash");function i(){this._arr=[],this._keyIndices={}}e.exports=i,i.prototype.size=function(){return this._arr.length},i.prototype.keys=function(){return this._arr.map(function(t){return t.key})},i.prototype.has=function(t){return r.has(this._keyIndices,t)},i.prototype.priority=function(t){var e=this._keyIndices[t];if(void 0!==e)return this._arr[e].priority},i.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},i.prototype.add=function(t,e){var n=this._keyIndices;if(t=String(t),!r.has(n,t)){var i=this._arr,o=i.length;return n[t]=o,i.push({key:t,priority:e}),this._decrease(o),!0}return!1},i.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var t=this._arr.pop();return delete this._keyIndices[t.key],this._heapify(0),t.key},i.prototype.decrease=function(t,e){var n=this._keyIndices[t];if(e>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[n].priority+" New: "+e);this._arr[n].priority=e,this._decrease(n)},i.prototype._heapify=function(t){var e=this._arr,n=2*t,r=n+1,i=t;n<e.length&&(i=e[n].priority<e[i].priority?n:i,r<e.length&&(i=e[r].priority<e[i].priority?r:i),i!==t&&(this._swap(t,i),this._heapify(i)))},i.prototype._decrease=function(t){for(var e,n=this._arr,r=n[t].priority;0!==t&&!(n[e=t>>1].priority<r);)this._swap(t,e),t=e},i.prototype._swap=function(t,e){var n=this._arr,r=this._keyIndices,i=n[t],o=n[e];n[t]=o,n[e]=i,r[o.key]=t,r[i.key]=e}},{"../lodash":77}],74:[function(t,e,n){"use strict";var r=t("./lodash");e.exports=u;var i="\0",o="\0",a="";function u(t){this._isDirected=!r.has(t,"directed")||t.directed,this._isMultigraph=!!r.has(t,"multigraph")&&t.multigraph,this._isCompound=!!r.has(t,"compound")&&t.compound,this._label=void 0,this._defaultNodeLabelFn=r.constant(void 0),this._defaultEdgeLabelFn=r.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[o]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function c(t,e){r.has(t,e)?t[e]++:t[e]=1}function s(t,e){--t[e]||delete t[e]}function f(t,e,n,o){if(!t&&e>n){var u=e;e=n,n=u}return e+a+n+a+(r.isUndefined(o)?i:o)}function l(t,e){return f(t,e.v,e.w,e.name)}u.prototype._nodeCount=0,u.prototype._edgeCount=0,u.prototype.isDirected=function(){return this._isDirected},u.prototype.isMultigraph=function(){return this._isMultigraph},u.prototype.isCompound=function(){return this._isCompound},u.prototype.setGraph=function(t){return this._label=t,this},u.prototype.graph=function(){return this._label},u.prototype.setDefaultNodeLabel=function(t){return r.isFunction(t)||(t=r.constant(t)),this._defaultNodeLabelFn=t,this},u.prototype.nodeCount=function(){return this._nodeCount},u.prototype.nodes=function(){return r.keys(this._nodes)},u.prototype.sources=function(){return r.filter(this.nodes(),function(t){return r.isEmpty(this._in[t])},this)},u.prototype.sinks=function(){return r.filter(this.nodes(),function(t){return r.isEmpty(this._out[t])},this)},u.prototype.setNodes=function(t,e){var n=arguments;return r.each(t,function(t){n.length>1?this.setNode(t,e):this.setNode(t)},this),this},u.prototype.setNode=function(t,e){return r.has(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=e),this):(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=o,this._children[t]={},this._children[o][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)},u.prototype.node=function(t){return this._nodes[t]},u.prototype.hasNode=function(t){return r.has(this._nodes,t)},u.prototype.removeNode=function(t){var e=this;if(r.has(this._nodes,t)){var n=function(t){e.removeEdge(e._edgeObjs[t])};delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],r.each(this.children(t),function(t){this.setParent(t)},this),delete this._children[t]),r.each(r.keys(this._in[t]),n),delete this._in[t],delete this._preds[t],r.each(r.keys(this._out[t]),n),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this},u.prototype.setParent=function(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(r.isUndefined(e))e=o;else{for(var n=e+="";!r.isUndefined(n);n=this.parent(n))if(n===t)throw new Error("Setting "+e+" as parent of "+t+" would create create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this},u.prototype._removeFromParentsChildList=function(t){delete this._children[this._parent[t]][t]},u.prototype.parent=function(t){if(this._isCompound){var e=this._parent[t];if(e!==o)return e}},u.prototype.children=function(t){if(r.isUndefined(t)&&(t=o),this._isCompound){var e=this._children[t];if(e)return r.keys(e)}else{if(t===o)return this.nodes();if(this.hasNode(t))return[]}},u.prototype.predecessors=function(t){var e=this._preds[t];if(e)return r.keys(e)},u.prototype.successors=function(t){var e=this._sucs[t];if(e)return r.keys(e)},u.prototype.neighbors=function(t){var e=this.predecessors(t);if(e)return r.union(e,this.successors(t))},u.prototype.setDefaultEdgeLabel=function(t){return r.isFunction(t)||(t=r.constant(t)),this._defaultEdgeLabelFn=t,this},u.prototype.edgeCount=function(){return this._edgeCount},u.prototype.edges=function(){return r.values(this._edgeObjs)},u.prototype.setPath=function(t,e){var n=this,i=arguments;return r.reduce(t,function(t,r){return i.length>1?n.setEdge(t,r,e):n.setEdge(t,r),r}),this},u.prototype.setEdge=function(){var t,e,n,i,o=!1;r.isPlainObject(arguments[0])?(t=arguments[0].v,e=arguments[0].w,n=arguments[0].name,2===arguments.length&&(i=arguments[1],o=!0)):(t=arguments[0],e=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],o=!0)),t=""+t,e=""+e,r.isUndefined(n)||(n=""+n);var a=f(this._isDirected,t,e,n);if(r.has(this._edgeLabels,a))return o&&(this._edgeLabels[a]=i),this;if(!r.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[a]=o?i:this._defaultEdgeLabelFn(t,e,n);var u=function(t,e,n,r){if(!t&&e>n){var i=e;e=n,n=i}var o={v:e,w:n};r&&(o.name=r);return o}(this._isDirected,t,e,n);return t=u.v,e=u.w,Object.freeze(u),this._edgeObjs[a]=u,c(this._preds[e],t),c(this._sucs[t],e),this._in[e][a]=u,this._out[t][a]=u,this._edgeCount++,this},u.prototype.edge=function(t,e,n){var r=1===arguments.length?l(this._isDirected,arguments[0]):f(this._isDirected,t,e,n);return this._edgeLabels[r]},u.prototype.hasEdge=function(t,e,n){var i=1===arguments.length?l(this._isDirected,arguments[0]):f(this._isDirected,t,e,n);return r.has(this._edgeLabels,i)},u.prototype.removeEdge=function(t,e,n){var r=1===arguments.length?l(this._isDirected,arguments[0]):f(this._isDirected,t,e,n),i=this._edgeObjs[r];return i&&(t=i.v,e=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],s(this._preds[e],t),s(this._sucs[t],e),delete this._in[e][r],delete this._out[t][r],this._edgeCount--),this},u.prototype.inEdges=function(t,e){var n=this._in[t];if(n){var i=r.values(n);return e?r.filter(i,function(t){return t.v===e}):i}},u.prototype.outEdges=function(t,e){var n=this._out[t];if(n){var i=r.values(n);return e?r.filter(i,function(t){return t.w===e}):i}},u.prototype.nodeEdges=function(t,e){var n=this.inEdges(t,e);if(n)return n.concat(this.outEdges(t,e))}},{"./lodash":77}],75:[function(t,e,n){e.exports={Graph:t("./graph"),version:t("./version")}},{"./graph":74,"./version":78}],76:[function(t,e,n){var r=t("./lodash"),i=t("./graph");e.exports={write:function(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:function(t){return r.map(t.nodes(),function(e){var n=t.node(e),i=t.parent(e),o={v:e};return r.isUndefined(n)||(o.value=n),r.isUndefined(i)||(o.parent=i),o})}(t),edges:function(t){return r.map(t.edges(),function(e){var n=t.edge(e),i={v:e.v,w:e.w};return r.isUndefined(e.name)||(i.name=e.name),r.isUndefined(n)||(i.value=n),i})}(t)};r.isUndefined(t.graph())||(e.value=r.clone(t.graph()));return e},read:function(t){var e=new i(t.options).setGraph(t.value);return r.each(t.nodes,function(t){e.setNode(t.v,t.value),t.parent&&e.setParent(t.v,t.parent)}),r.each(t.edges,function(t){e.setEdge({v:t.v,w:t.w,name:t.name},t.value)}),e}}},{"./graph":74,"./lodash":77}],77:[function(t,e,n){var r;if("function"==typeof t)try{r=t("lodash")}catch(t){}r||(r=window._),e.exports=r},{lodash:79}],78:[function(t,e,n){e.exports="1.0.5"},{}],79:[function(t,e,n){(function(t){(function(){var r,i,o,a="3.10.0",u=1,c=2,s=4,f=8,l=16,h=32,d=64,p=128,g=256,v=30,y="...",_=150,m=16,w=200,b=1,x=2,k="Expected a function",E="__lodash_placeholder__",I="[object Arguments]",N="[object Array]",C="[object Boolean]",j="[object Date]",T="[object Error]",R="[object Function]",L="[object Number]",A="[object Object]",O="[object RegExp]",S="[object String]",M="[object ArrayBuffer]",B="[object Float32Array]",U="[object Float64Array]",P="[object Int8Array]",F="[object Int16Array]",z="[object Int32Array]",D="[object Uint8Array]",W="[object Uint8ClampedArray]",q="[object Uint16Array]",G="[object Uint32Array]",V=/\b__p \+= '';/g,Y=/\b(__p \+=) '' \+/g,$=/(__e\(.*?\)|\b__t\)) \+\n'';/g,X=/&(?:amp|lt|gt|quot|#39|#96);/g,H=/[&<>"'`]/g,K=RegExp(X.source),Q=RegExp(H.source),J=/<%-([\s\S]+?)%>/g,Z=/<%([\s\S]+?)%>/g,tt=/<%=([\s\S]+?)%>/g,et=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,nt=/^\w*$/,rt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,it=/^[:!,]|[\\^$.*+?()[\]{}|\/]|(^[0-9a-fA-Fnrtuvx])|([\n\r\u2028\u2029])/g,ot=RegExp(it.source),at=/[\u0300-\u036f\ufe20-\ufe23]/g,ut=/\\(\\)?/g,ct=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,st=/\w*$/,ft=/^0[xX]/,lt=/^\[object .+?Constructor\]$/,ht=/^\d+$/,dt=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,pt=/($^)/,gt=/['\n\r\u2028\u2029\\]/g,vt=(i="[A-Z\\xc0-\\xd6\\xd8-\\xde]",o="[a-z\\xdf-\\xf6\\xf8-\\xff]+",RegExp(i+"+(?="+i+o+")|"+i+"?"+o+"|"+i+"+|[0-9]+","g")),yt=["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"],_t=-1,mt={};mt[B]=mt[U]=mt[P]=mt[F]=mt[z]=mt[D]=mt[W]=mt[q]=mt[G]=!0,mt[I]=mt[N]=mt[M]=mt[C]=mt[j]=mt[T]=mt[R]=mt["[object Map]"]=mt[L]=mt[A]=mt[O]=mt["[object Set]"]=mt[S]=mt["[object WeakMap]"]=!1;var wt={};wt[I]=wt[N]=wt[M]=wt[C]=wt[j]=wt[B]=wt[U]=wt[P]=wt[F]=wt[z]=wt[L]=wt[A]=wt[O]=wt[S]=wt[D]=wt[W]=wt[q]=wt[G]=!0,wt[T]=wt[R]=wt["[object Map]"]=wt["[object Set]"]=wt["[object WeakMap]"]=!1;var bt={"À":"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"},xt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","`":"&#96;"},kt={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&#96;":"`"},Et={function:!0,object:!0},It={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"},Nt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ct=Et[typeof n]&&n&&!n.nodeType&&n,jt=Et[typeof e]&&e&&!e.nodeType&&e,Tt=Ct&&jt&&"object"==typeof t&&t&&t.Object&&t,Rt=Et[typeof self]&&self&&self.Object&&self,Lt=Et[typeof window]&&window&&window.Object&&window,At=jt&&jt.exports===Ct&&Ct,Ot=Tt||Lt!==(this&&this.window)&&Lt||Rt||this;function St(t,e){if(t!==e){var n=null===t,i=t===r,o=t==t,a=null===e,u=e===r,c=e==e;if(t>e&&!a||!o||n&&!u&&c||i&&c)return 1;if(t<e&&!n||!c||a&&!i&&o||u&&o)return-1}return 0}function Mt(t,e,n){for(var r=t.length,i=n?r:-1;n?i--:++i<r;)if(e(t[i],i,t))return i;return-1}function Bt(t,e,n){if(e!=e)return Yt(t,n);for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}function Ut(t){return"function"==typeof t||!1}function Pt(t){return null==t?"":t+""}function Ft(t,e){for(var n=-1,r=t.length;++n<r&&e.indexOf(t.charAt(n))>-1;);return n}function zt(t,e){for(var n=t.length;n--&&e.indexOf(t.charAt(n))>-1;);return n}function Dt(t,e){return St(t.criteria,e.criteria)||t.index-e.index}function Wt(t){return bt[t]}function qt(t){return xt[t]}function Gt(t,e,n){return e?t=It[t]:n&&(t=Nt[t]),"\\"+t}function Vt(t){return"\\"+Nt[t]}function Yt(t,e,n){for(var r=t.length,i=e+(n?0:-1);n?i--:++i<r;){var o=t[i];if(o!=o)return i}return-1}function $t(t){return!!t&&"object"==typeof t}function Xt(t){return t<=160&&t>=9&&t<=13||32==t||160==t||5760==t||6158==t||t>=8192&&(t<=8202||8232==t||8233==t||8239==t||8287==t||12288==t||65279==t)}function Ht(t,e){for(var n=-1,r=t.length,i=-1,o=[];++n<r;)t[n]===e&&(t[n]=E,o[++i]=n);return o}function Kt(t){for(var e=-1,n=t.length;++e<n&&Xt(t.charCodeAt(e)););return e}function Qt(t){for(var e=t.length;e--&&Xt(t.charCodeAt(e)););return e}function Jt(t){return kt[t]}var Zt=function t(e){var n=(e=e?Zt.defaults(Ot.Object(),e,Zt.pick(Ot,yt)):Ot).Array,i=e.Date,o=e.Error,bt=e.Function,xt=e.Math,kt=e.Number,Et=e.Object,It=e.RegExp,Nt=e.String,Ct=e.TypeError,jt=n.prototype,Tt=Et.prototype,Rt=Nt.prototype,Lt=bt.prototype.toString,At=Tt.hasOwnProperty,Xt=0,te=Tt.toString,ee=Ot._,ne=It("^"+Lt.call(At).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),re=e.ArrayBuffer,ie=e.clearTimeout,oe=e.parseFloat,ae=xt.pow,ue=Tt.propertyIsEnumerable,ce=_r(e,"Set"),se=e.setTimeout,fe=jt.splice,le=e.Uint8Array,he=_r(e,"WeakMap"),de=xt.ceil,pe=_r(Et,"create"),ge=xt.floor,ve=_r(n,"isArray"),ye=e.isFinite,_e=_r(Et,"keys"),me=xt.max,we=xt.min,be=_r(i,"now"),xe=e.parseInt,ke=xt.random,Ee=kt.NEGATIVE_INFINITY,Ie=kt.POSITIVE_INFINITY,Ne=4294967295,Ce=Ne-1,je=Ne>>>1,Te=9007199254740991,Re=he&&new he,Le={};function Ae(t){if($t(t)&&!Yi(t)&&!(t instanceof Me)){if(t instanceof Se)return t;if(At.call(t,"__chain__")&&At.call(t,"__wrapped__"))return Br(t)}return new Se(t)}function Oe(){}function Se(t,e,n){this.__wrapped__=t,this.__actions__=n||[],this.__chain__=!!e}Ae.support={};function Me(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Ie,this.__views__=[]}function Be(){this.__data__={}}function Ue(t){var e=t?t.length:0;for(this.data={hash:pe(null),set:new ce};e--;)this.push(t[e])}function Pe(t,e){var n=t.data;return("string"==typeof e||Ki(e)?n.set.has(e):n.hash[e])?0:-1}function Fe(t,e){var r=-1,i=t.length;for(e||(e=n(i));++r<i;)e[r]=t[r];return e}function ze(t,e){for(var n=-1,r=t.length;++n<r&&!1!==e(t[n],n,t););return t}function De(t,e){for(var n=-1,r=t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function We(t,e){for(var n=-1,r=t.length,i=-1,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[++i]=a)}return o}function qe(t,e){for(var r=-1,i=t.length,o=n(i);++r<i;)o[r]=e(t[r],r,t);return o}function Ge(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function Ve(t,e,n,r){var i=-1,o=t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}function Ye(t,e){for(var n=-1,r=t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function $e(t,e,n,i){return t!==r&&At.call(i,n)?t:e}function Xe(t,e,n){for(var i=-1,o=_o(e),a=o.length;++i<a;){var u=o[i],c=t[u],s=n(c,e[u],u,t,e);(s==s?s===c:c!=c)&&(c!==r||u in t)||(t[u]=s)}return t}function He(t,e){return null==e?t:Qe(e,_o(e),t)}function Ke(t,e){for(var i=-1,o=null==t,a=!o&&wr(t),u=a?t.length:0,c=e.length,s=n(c);++i<c;){var f=e[i];s[i]=a?br(f,u)?t[f]:r:o?r:t[f]}return s}function Qe(t,e,n){n||(n={});for(var r=-1,i=e.length;++r<i;){var o=e[r];n[o]=t[o]}return n}function Je(t,e,n){var i=typeof t;return"function"==i?e===r?t:Bn(t,e,n):null==t?Po:"object"==i?wn(t):e===r?Go(t):bn(t,e)}function Ze(t,e,n,i,o,a,u){var c;if(n&&(c=o?n(t,i,o):n(t)),c!==r)return c;if(!Ki(t))return t;var s=Yi(t);if(s){if(c=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&At.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!e)return Fe(t,c)}else{var f=te.call(t),l=f==R;if(f!=A&&f!=I&&(!l||o))return wt[f]?function(t,e,n){var r=t.constructor;switch(e){case M:return Un(t);case C:case j:return new r(+t);case B:case U:case P:case F:case z:case D:case W:case q:case G:var i=t.buffer;return new r(n?Un(i):i,t.byteOffset,t.length);case L:case S:return new r(t);case O:var o=new r(t.source,st.exec(t));o.lastIndex=t.lastIndex}return o}(t,f,e):o?t:{};if(c=function(t){var e=t.constructor;return"function"==typeof e&&e instanceof e||(e=Et),new e}(l?{}:t),!e)return He(c,t)}a||(a=[]),u||(u=[]);for(var h=a.length;h--;)if(a[h]==t)return u[h];return a.push(t),u.push(c),(s?ze:dn)(t,function(r,i){c[i]=Ze(r,e,n,i,t,a,u)}),c}Ae.templateSettings={escape:J,evaluate:Z,interpolate:tt,variable:"",imports:{_:Ae}};var tn=function(){function t(){}return function(e){if(Ki(e)){t.prototype=e;var n=new t;t.prototype=r}return n||{}}}();function en(t,e,n){if("function"!=typeof t)throw new Ct(k);return se(function(){t.apply(r,n)},e)}function nn(t,e){var n=t?t.length:0,r=[];if(!n)return r;var i=-1,o=gr(),a=o==Bt,u=a&&e.length>=w?Gn(e):null,c=e.length;u&&(o=Pe,a=!1,e=u);t:for(;++i<n;){var s=t[i];if(a&&s==s){for(var f=c;f--;)if(e[f]===s)continue t;r.push(s)}else o(e,s,0)<0&&r.push(s)}return r}var rn=Wn(dn),on=Wn(pn,!0);function an(t,e){var n=!0;return rn(t,function(t,r,i){return n=!!e(t,r,i)}),n}function un(t,e){var n=[];return rn(t,function(t,r,i){e(t,r,i)&&n.push(t)}),n}function cn(t,e,n,r){var i;return n(t,function(t,n,o){if(e(t,n,o))return i=r?n:t,!1}),i}function sn(t,e,n,r){r||(r=[]);for(var i=-1,o=t.length;++i<o;){var a=t[i];$t(a)&&wr(a)&&(n||Yi(a)||Vi(a))?e?sn(a,e,n,r):Ge(r,a):n||(r[r.length]=a)}return r}var fn=qn(),ln=qn(!0);function hn(t,e){return fn(t,e,mo)}function dn(t,e){return fn(t,e,_o)}function pn(t,e){return ln(t,e,_o)}function gn(t,e){for(var n=-1,r=e.length,i=-1,o=[];++n<r;){var a=e[n];Hi(t[a])&&(o[++i]=a)}return o}function vn(t,e,n){if(null!=t){n!==r&&n in Sr(t)&&(e=[n]);for(var i=0,o=e.length;null!=t&&i<o;)t=t[e[i++]];return i&&i==o?t:r}}function yn(t,e,n,i,o,a){return t===e||(null==t||null==e||!Ki(t)&&!$t(e)?t!=t&&e!=e:function(t,e,n,i,o,a,u){var c=Yi(t),s=Yi(e),f=N,l=N;c||((f=te.call(t))==I?f=A:f!=A&&(c=no(t))),s||((l=te.call(e))==I?l=A:l!=A&&(s=no(e)));var h=f==A,d=l==A,p=f==l;if(p&&!c&&!h)return function(t,e,n){switch(n){case C:case j:return+t==+e;case T:return t.name==e.name&&t.message==e.message;case L:return t!=+t?e!=+e:t==+e;case O:case S:return t==e+""}return!1}(t,e,f);if(!o){var g=h&&At.call(t,"__wrapped__"),v=d&&At.call(e,"__wrapped__");if(g||v)return n(g?t.value():t,v?e.value():e,i,o,a,u)}if(!p)return!1;a||(a=[]),u||(u=[]);for(var y=a.length;y--;)if(a[y]==t)return u[y]==e;a.push(t),u.push(e);var _=(c?function(t,e,n,i,o,a,u){var c=-1,s=t.length,f=e.length;if(s!=f&&!(o&&f>s))return!1;for(;++c<s;){var l=t[c],h=e[c],d=i?i(o?h:l,o?l:h,c):r;if(d!==r){if(d)continue;return!1}if(o){if(!Ye(e,function(t){return l===t||n(l,t,i,o,a,u)}))return!1}else if(l!==h&&!n(l,h,i,o,a,u))return!1}return!0}:function(t,e,n,i,o,a,u){var c=_o(t),s=c.length,f=_o(e).length;if(s!=f&&!o)return!1;for(var l=s;l--;){var h=c[l];if(!(o?h in e:At.call(e,h)))return!1}for(var d=o;++l<s;){h=c[l];var p=t[h],g=e[h],v=i?i(o?g:p,o?p:g,h):r;if(!(v===r?n(p,g,i,o,a,u):v))return!1;d||(d="constructor"==h)}if(!d){var y=t.constructor,_=e.constructor;if(y!=_&&"constructor"in t&&"constructor"in e&&!("function"==typeof y&&y instanceof y&&"function"==typeof _&&_ instanceof _))return!1}return!0})(t,e,n,i,o,a,u);return a.pop(),u.pop(),_}(t,e,yn,n,i,o,a))}function _n(t,e,n){var i=e.length,o=i,a=!n;if(null==t)return!o;for(t=Sr(t);i--;){var u=e[i];if(a&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++i<o;){var c=(u=e[i])[0],s=t[c],f=u[1];if(a&&u[2]){if(s===r&&!(c in t))return!1}else{var l=n?n(s,f,c):r;if(!(l===r?yn(f,s,n,!0):l))return!1}}return!0}function mn(t,e){var r=-1,i=wr(t)?n(t.length):[];return rn(t,function(t,n,o){i[++r]=e(t,n,o)}),i}function wn(t){var e=yr(t);if(1==e.length&&e[0][2]){var n=e[0][0],i=e[0][1];return function(t){return null!=t&&t[n]===i&&(i!==r||n in Sr(t))}}return function(t){return _n(t,e)}}function bn(t,e){var n=Yi(t),i=kr(t)&&Nr(e),o=t+"";return t=Mr(t),function(a){if(null==a)return!1;var u=o;if(a=Sr(a),(n||!i)&&!(u in a)){if(null==(a=1==t.length?a:vn(a,Nn(t,0,-1))))return!1;u=Vr(t),a=Sr(a)}return a[u]===e?e!==r||u in a:yn(e,a[u],r,!0)}}function xn(t){return function(e){return null==e?r:e[t]}}function kn(t,e){for(var n=t?e.length:0;n--;){var r=e[n];if(r!=i&&br(r)){var i=r;fe.call(t,r,1)}}return t}function En(t,e){return t+ge(ke()*(e-t+1))}var In=Re?function(t,e){return Re.set(t,e),t}:Po;function Nn(t,e,i){var o=-1,a=t.length;(e=null==e?0:+e||0)<0&&(e=-e>a?0:a+e),(i=i===r||i>a?a:+i||0)<0&&(i+=a),a=e>i?0:i-e>>>0,e>>>=0;for(var u=n(a);++o<a;)u[o]=t[o+e];return u}function Cn(t,e){var n;return rn(t,function(t,r,i){return!(n=e(t,r,i))}),!!n}function jn(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}function Tn(t,e,n){var r=hr(),i=-1;return e=qe(e,function(t){return r(t)}),jn(mn(t,function(t){return{criteria:qe(e,function(e){return e(t)}),index:++i,value:t}}),function(t,e){return function(t,e,n){for(var r=-1,i=t.criteria,o=e.criteria,a=i.length,u=n.length;++r<a;){var c=St(i[r],o[r]);if(c){if(r>=u)return c;var s=n[r];return c*("asc"===s||!0===s?1:-1)}}return t.index-e.index}(t,e,n)})}function Rn(t,e){var n=-1,r=gr(),i=t.length,o=r==Bt,a=o&&i>=w,u=a?Gn():null,c=[];u?(r=Pe,o=!1):(a=!1,u=e?[]:c);t:for(;++n<i;){var s=t[n],f=e?e(s,n,t):s;if(o&&s==s){for(var l=u.length;l--;)if(u[l]===f)continue t;e&&u.push(f),c.push(s)}else r(u,f,0)<0&&((e||a)&&u.push(f),c.push(s))}return c}function Ln(t,e){for(var r=-1,i=e.length,o=n(i);++r<i;)o[r]=t[e[r]];return o}function An(t,e,n,r){for(var i=t.length,o=r?i:-1;(r?o--:++o<i)&&e(t[o],o,t););return n?Nn(t,r?0:o,r?o+1:i):Nn(t,r?o+1:0,r?i:o)}function On(t,e){var n=t;n instanceof Me&&(n=n.value());for(var r=-1,i=e.length;++r<i;){var o=e[r];n=o.func.apply(o.thisArg,Ge([n],o.args))}return n}function Sn(t,e,n){var r=0,i=t?t.length:r;if("number"==typeof e&&e==e&&i<=je){for(;r<i;){var o=r+i>>>1,a=t[o];(n?a<=e:a<e)&&null!==a?r=o+1:i=o}return i}return Mn(t,e,Po,n)}function Mn(t,e,n,i){e=n(e);for(var o=0,a=t?t.length:0,u=e!=e,c=null===e,s=e===r;o<a;){var f=ge((o+a)/2),l=n(t[f]),h=l!==r,d=l==l;if(u)var p=d||i;else p=c?d&&h&&(i||null!=l):s?d&&(i||h):null!=l&&(i?l<=e:l<e);p?o=f+1:a=f}return we(a,Ce)}function Bn(t,e,n){if("function"!=typeof t)return Po;if(e===r)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 3:return function(n,r,i){return t.call(e,n,r,i)};case 4:return function(n,r,i,o){return t.call(e,n,r,i,o)};case 5:return function(n,r,i,o,a){return t.call(e,n,r,i,o,a)}}return function(){return t.apply(e,arguments)}}function Un(t){var e=new re(t.byteLength);return new le(e).set(new le(t)),e}function Pn(t,e,r){for(var i=r.length,o=-1,a=me(t.length-i,0),u=-1,c=e.length,s=n(c+a);++u<c;)s[u]=e[u];for(;++o<i;)s[r[o]]=t[o];for(;a--;)s[u++]=t[o++];return s}function Fn(t,e,r){for(var i=-1,o=r.length,a=-1,u=me(t.length-o,0),c=-1,s=e.length,f=n(u+s);++a<u;)f[a]=t[a];for(var l=a;++c<s;)f[l+c]=e[c];for(;++i<o;)f[l+r[i]]=t[a++];return f}function zn(t,e){return function(n,r,i){var o=e?e():{};if(r=hr(r,i,3),Yi(n))for(var a=-1,u=n.length;++a<u;){var c=n[a];t(o,c,r(c,a,n),n)}else rn(n,function(e,n,i){t(o,e,r(e,n,i),i)});return o}}function Dn(t){return qi(function(e,n){var i=-1,o=null==e?0:n.length,a=o>2?n[o-2]:r,u=o>2?n[2]:r,c=o>1?n[o-1]:r;for("function"==typeof a?(a=Bn(a,c,5),o-=2):o-=(a="function"==typeof c?c:r)?1:0,u&&xr(n[0],n[1],u)&&(a=o<3?r:a,o=1);++i<o;){var s=n[i];s&&t(e,s,a)}return e})}function Wn(t,e){return function(n,r){var i=n?vr(n):0;if(!Ir(i))return t(n,r);for(var o=e?i:-1,a=Sr(n);(e?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function qn(t){return function(e,n,r){for(var i=Sr(e),o=r(e),a=o.length,u=t?a:-1;t?u--:++u<a;){var c=o[u];if(!1===n(i[c],c,i))break}return e}}function Gn(t){return pe&&ce?new Ue(t):null}function Vn(t){return function(e){for(var n=-1,r=Mo(Co(e)),i=r.length,o="";++n<i;)o=t(o,r[n],n);return o}}function Yn(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 n=tn(t.prototype),r=t.apply(n,e);return Ki(r)?r:n}}function $n(t){return function e(n,i,o){o&&xr(n,i,o)&&(i=r);var a=lr(n,t,r,r,r,r,r,i);return a.placeholder=e.placeholder,a}}function Xn(t,e){return qi(function(n){var i=n[0];return null==i?i:(n.push(e),t.apply(r,n))})}function Hn(t,e){return function(n,i,o){if(o&&xr(n,i,o)&&(i=r),1==(i=hr(i,o,3)).length){var a=function(t,e,n,r){for(var i=-1,o=t.length,a=r,u=a;++i<o;){var c=t[i],s=+e(c);n(s,a)&&(a=s,u=c)}return u}(n=Yi(n)?n:Or(n),i,t,e);if(!n.length||a!==e)return a}return function(t,e,n,r){var i=r,o=i;return rn(t,function(t,a,u){var c=+e(t,a,u);(n(c,i)||c===r&&c===o)&&(i=c,o=t)}),o}(n,i,t,e)}}function Kn(t,e){return function(n,i,o){if(i=hr(i,o,3),Yi(n)){var a=Mt(n,i,e);return a>-1?n[a]:r}return cn(n,i,t)}}function Qn(t){return function(e,n,r){return e&&e.length?Mt(e,n=hr(n,r,3),t):-1}}function Jn(t){return function(e,n,r){return cn(e,n=hr(n,r,3),t,!0)}}function Zn(t){return function(){for(var e,i=arguments.length,o=t?i:-1,a=0,u=n(i);t?o--:++o<i;){var c=u[a++]=arguments[o];if("function"!=typeof c)throw new Ct(k);!e&&Se.prototype.thru&&"wrapper"==pr(c)&&(e=new Se([],!0))}for(o=e?-1:i;++o<i;){var s=pr(c=u[o]),l="wrapper"==s?dr(c):r;e=l&&Er(l[0])&&l[1]==(p|f|h|g)&&!l[4].length&&1==l[9]?e[pr(l[0])].apply(e,l[3]):1==c.length&&Er(c)?e[s]():e.thru(c)}return function(){var t=arguments,n=t[0];if(e&&1==t.length&&Yi(n)&&n.length>=w)return e.plant(n).value();for(var r=0,o=i?u[r].apply(this,t):n;++r<i;)o=u[r].call(this,o);return o}}}function tr(t,e){return function(n,i,o){return"function"==typeof i&&o===r&&Yi(n)?t(n,i):e(n,Bn(i,o,3))}}function er(t){return function(e,n,i){return"function"==typeof n&&i===r||(n=Bn(n,i,3)),t(e,n,mo)}}function nr(t){return function(e,n,i){return"function"==typeof n&&i===r||(n=Bn(n,i,3)),t(e,n)}}function rr(t){return function(e,n,r){var i={};return n=hr(n,r,3),dn(e,function(e,r,o){var a=n(e,r,o);e=t?e:a,i[r=t?a:r]=e}),i}}function ir(t){return function(e,n,r){return e=Pt(e),(t?e:"")+cr(e,n,r)+(t?"":e)}}function or(t){var e=qi(function(n,i){var o=Ht(i,e.placeholder);return lr(n,t,r,i,o)});return e}function ar(t,e){return function(n,i,o,a){var u=arguments.length<3;return"function"==typeof i&&a===r&&Yi(n)?t(n,i,o,u):function(t,e,n,r,i){return i(t,function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)}),n}(n,hr(i,a,4),o,u,e)}}function ur(t,e,i,o,a,g,v,y,_,m){var w=e&p,b=e&u,x=e&c,k=e&f,E=e&s,I=e&l,N=x?r:Yn(t);return function s(){for(var f=arguments.length,l=f,p=n(f);l--;)p[l]=arguments[l];if(o&&(p=Pn(p,o,a)),g&&(p=Fn(p,g,v)),k||I){var C=s.placeholder,j=Ht(p,C);if((f-=j.length)<m){var T=y?Fe(y):r,R=me(m-f,0);e|=k?h:d,e&=~(k?d:h),E||(e&=~(u|c));var L=[t,e,i,k?p:r,k?j:r,k?r:p,k?r:j,T,_,R],A=ur.apply(r,L);return Er(t)&&Lr(A,L),A.placeholder=C,A}}var O=b?i:this,S=x?O[t]:t;return y&&(p=function(t,e){for(var n=t.length,i=we(e.length,n),o=Fe(t);i--;){var a=e[i];t[i]=br(a,n)?o[a]:r}return t}(p,y)),w&&_<p.length&&(p.length=_),this&&this!==Ot&&this instanceof s&&(S=N||Yn(t)),S.apply(O,p)}}function cr(t,e,n){var r=t.length;if(r>=(e=+e)||!ye(e))return"";var i=e-r;return Lo(n=null==n?" ":n+"",de(i/n.length)).slice(0,i)}function sr(t){var e=xt[t];return function(t,n){return(n=n===r?0:+n||0)?(n=ae(10,n),e(t*n)/n):e(t)}}function fr(t){return function(e,n,r,i){var o=hr(r);return null==r&&o===Je?Sn(e,n,t):Mn(e,n,o(r,i,1),t)}}function lr(t,e,i,o,a,l,v,y){var _=e&c;if(!_&&"function"!=typeof t)throw new Ct(k);var m=o?o.length:0;if(m||(e&=~(h|d),o=a=r),m-=a?a.length:0,e&d){var w=o,b=a;o=a=r}var x=_?r:dr(t),I=[t,e,i,o,a,w,b,l,v,y];if(x&&(function(t,e){var n=t[1],r=e[1],i=n|r,o=i<p,a=r==p&&n==f||r==p&&n==g&&t[7].length<=e[8]||r==(p|g)&&n==f;if(!o&&!a)return t;r&u&&(t[2]=e[2],i|=n&u?0:s);var c=e[3];if(c){var l=t[3];t[3]=l?Pn(l,c,e[4]):Fe(c),t[4]=l?Ht(t[3],E):Fe(e[4])}(c=e[5])&&(l=t[5],t[5]=l?Fn(l,c,e[6]):Fe(c),t[6]=l?Ht(t[5],E):Fe(e[6])),(c=e[7])&&(t[7]=Fe(c)),r&p&&(t[8]=null==t[8]?e[8]:we(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i}(I,x),e=I[1],y=I[9]),I[9]=null==y?_?0:t.length:me(y-m,0)||0,e==u)var N=function(t,e){var n=Yn(t);return function r(){return(this&&this!==Ot&&this instanceof r?n:t).apply(e,arguments)}}(I[0],I[2]);else N=e!=h&&e!=(u|h)||I[4].length?ur.apply(r,I):function(t,e,r,i){var o=e&u,a=Yn(t);return function e(){for(var u=-1,c=arguments.length,s=-1,f=i.length,l=n(f+c);++s<f;)l[s]=i[s];for(;c--;)l[s++]=arguments[++u];return(this&&this!==Ot&&this instanceof e?a:t).apply(o?r:this,l)}}.apply(r,I);return(x?In:Lr)(N,I)}function hr(t,e,n){var r=Ae.callback||Uo;return r=r===Uo?Je:r,n?r(t,e,n):r}var dr=Re?function(t){return Re.get(t)}:qo;function pr(t){for(var e=t.name,n=Le[e],r=n?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==t)return i.name}return e}function gr(t,e,n){var r=Ae.indexOf||qr;return r=r===qr?Bt:r,t?r(t,e,n):r}var vr=xn("length");function yr(t){for(var e=ko(t),n=e.length;n--;)e[n][2]=Nr(e[n][1]);return e}function _r(t,e){var n=null==t?r:t[e];return Qi(n)?n:r}function mr(t,e,n){null==t||kr(e,t)||(t=1==(e=Mr(e)).length?t:vn(t,Nn(e,0,-1)),e=Vr(e));var i=null==t?t:t[e];return null==i?r:i.apply(t,n)}function wr(t){return null!=t&&Ir(vr(t))}function br(t,e){return t="number"==typeof t||ht.test(t)?+t:-1,e=null==e?Te:e,t>-1&&t%1==0&&t<e}function xr(t,e,n){if(!Ki(n))return!1;var r=typeof e;if("number"==r?wr(n)&&br(e,n.length):"string"==r&&e in n){var i=n[e];return t==t?t===i:i!=i}return!1}function kr(t,e){var n=typeof t;return!!("string"==n&&nt.test(t)||"number"==n)||!Yi(t)&&(!et.test(t)||null!=e&&t in Sr(e))}function Er(t){var e=pr(t);if(!(e in Me.prototype))return!1;var n=Ae[e];if(t===n)return!0;var r=dr(n);return!!r&&t===r[0]}function Ir(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=Te}function Nr(t){return t==t&&!Ki(t)}function Cr(t,e){t=Sr(t);for(var n=-1,r=e.length,i={};++n<r;){var o=e[n];o in t&&(i[o]=t[o])}return i}function jr(t,e){var n={};return hn(t,function(t,r,i){e(t,r,i)&&(n[r]=t)}),n}var Tr,Rr,Lr=(Tr=0,Rr=0,function(t,e){var n=Ni(),r=m-(n-Rr);if(Rr=n,r>0){if(++Tr>=_)return t}else Tr=0;return In(t,e)});function Ar(t){for(var e=mo(t),n=e.length,r=n&&t.length,i=!!r&&Ir(r)&&(Yi(t)||Vi(t)),o=-1,a=[];++o<n;){var u=e[o];(i&&br(u,r)||At.call(t,u))&&a.push(u)}return a}function Or(t){return null==t?[]:wr(t)?Ki(t)?t:Et(t):Io(t)}function Sr(t){return Ki(t)?t:Et(t)}function Mr(t){if(Yi(t))return t;var e=[];return Pt(t).replace(rt,function(t,n,r,i){e.push(r?i.replace(ut,"$1"):n||t)}),e}function Br(t){return t instanceof Me?t.clone():new Se(t.__wrapped__,t.__chain__,Fe(t.__actions__))}var Ur=qi(function(t,e){return $t(t)&&wr(t)?nn(t,sn(e,!1,!0)):[]});function Pr(t,e,n){return t&&t.length?((n?xr(t,e,n):null==e)&&(e=1),Nn(t,e<0?0:e)):[]}function Fr(t,e,n){var r=t?t.length:0;return r?((n?xr(t,e,n):null==e)&&(e=1),Nn(t,0,(e=r-(+e||0))<0?0:e)):[]}var zr=Qn(),Dr=Qn(!0);function Wr(t){return t?t[0]:r}function qr(t,e,n){var r=t?t.length:0;if(!r)return-1;if("number"==typeof n)n=n<0?me(r+n,0):n;else if(n){var i=Sn(t,e);return i<r&&(e==e?e===t[i]:t[i]!=t[i])?i:-1}return Bt(t,e,n||0)}var Gr=qi(function(t){for(var e=t.length,r=e,i=n(l),o=gr(),a=o==Bt,u=[];r--;){var c=t[r]=wr(c=t[r])?c:[];i[r]=a&&c.length>=120?Gn(r&&c):null}var s=t[0],f=-1,l=s?s.length:0,h=i[0];t:for(;++f<l;)if(c=s[f],(h?Pe(h,c):o(u,c,0))<0){for(r=e;--r;){var d=i[r];if((d?Pe(d,c):o(t[r],c,0))<0)continue t}h&&h.push(c),u.push(c)}return u});function Vr(t){var e=t?t.length:0;return e?t[e-1]:r}var Yr=qi(function(t,e){var n=Ke(t,e=sn(e));return kn(t,e.sort(St)),n});function $r(t){return Pr(t,1)}var Xr=fr(),Hr=fr(!0);var Kr=qi(function(t){return Rn(sn(t,!1,!0))});function Qr(t,e,n,i){if(!t||!t.length)return[];null!=e&&"boolean"!=typeof e&&(n=xr(t,e,i=n)?r:e,e=!1);var o=hr();return null==n&&o===Je||(n=o(n,i,3)),e&&gr()==Bt?function(t,e){for(var n,r=-1,i=t.length,o=-1,a=[];++r<i;){var u=t[r],c=e?e(u,r,t):u;r&&n===c||(n=c,a[++o]=u)}return a}(t,n):Rn(t,n)}function Jr(t){if(!t||!t.length)return[];var e=-1,r=0;t=We(t,function(t){if(wr(t))return r=me(t.length,r),!0});for(var i=n(r);++e<r;)i[e]=qe(t,xn(e));return i}function Zr(t,e,n){if(!t||!t.length)return[];var i=Jr(t);return null==e?i:(e=Bn(e,n,4),qe(i,function(t){return Ve(t,e,r,!0)}))}var ti=qi(function(t,e){return wr(t)?nn(t,e):[]});var ei=qi(Jr);function ni(t,e){var n=-1,r=t?t.length:0,i={};for(!r||e||Yi(t[0])||(e=[]);++n<r;){var o=t[n];e?i[o]=e[n]:o&&(i[o[0]]=o[1])}return i}var ri=qi(function(t){var e=t.length,n=e>2?t[e-2]:r,i=e>1?t[e-1]:r;return e>2&&"function"==typeof n?e-=2:(n=e>1&&"function"==typeof i?(--e,i):r,i=r),t.length=e,Zr(t,n,i)});function ii(t){var e=Ae(t);return e.__chain__=!0,e}function oi(t,e,n){return e.call(n,t)}var ai=qi(function(t){return t=sn(t),this.thru(function(e){return function(t,e){for(var r=-1,i=t.length,o=-1,a=e.length,u=n(i+a);++r<i;)u[r]=t[r];for(;++o<a;)u[r++]=e[o];return u}(Yi(e)?e:[Sr(e)],t)})});var ui=qi(function(t,e){return Ke(t,sn(e))}),ci=zn(function(t,e,n){At.call(t,n)?++t[n]:t[n]=1});function si(t,e,n){var i=Yi(t)?De:an;return n&&xr(t,e,n)&&(e=r),"function"==typeof e&&n===r||(e=hr(e,n,3)),i(t,e)}function fi(t,e,n){return(Yi(t)?We:un)(t,e=hr(e,n,3))}var li=Kn(rn),hi=Kn(on,!0);var di=tr(ze,rn),pi=tr(function(t,e){for(var n=t.length;n--&&!1!==e(t[n],n,t););return t},on),gi=zn(function(t,e,n){At.call(t,n)?t[n].push(e):t[n]=[e]});function vi(t,e,n,r){var i=t?vr(t):0;return Ir(i)||(i=(t=Io(t)).length),n="number"!=typeof n||r&&xr(e,n,r)?0:n<0?me(i+n,0):n||0,"string"==typeof t||!Yi(t)&&eo(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&gr(t,e,n)>-1}var yi=zn(function(t,e,n){t[n]=e}),_i=qi(function(t,e,i){var o=-1,a="function"==typeof e,u=kr(e),c=wr(t)?n(t.length):[];return rn(t,function(t){var n=a?e:u&&null!=t?t[e]:r;c[++o]=n?n.apply(t,i):mr(t,e,i)}),c});function mi(t,e,n){return(Yi(t)?qe:mn)(t,e=hr(e,n,3))}var wi=zn(function(t,e,n){t[n?0:1].push(e)},function(){return[[],[]]});var bi=ar(Ve,rn),xi=ar(function(t,e,n,r){var i=t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n},on);function ki(t,e,n){if(n?xr(t,e,n):null==e)return(i=(t=Or(t)).length)>0?t[En(0,i-1)]:r;var i,o=-1,a=io(t),u=(i=a.length)-1;for(e=we(e<0?0:+e||0,i);++o<e;){var c=En(o,u),s=a[c];a[c]=a[o],a[o]=s}return a.length=e,a}function Ei(t,e,n){var i=Yi(t)?Ye:Cn;return n&&xr(t,e,n)&&(e=r),"function"==typeof e&&n===r||(e=hr(e,n,3)),i(t,e)}var Ii=qi(function(t,e){if(null==t)return[];var n=e[2];return n&&xr(e[0],e[1],n)&&(e.length=1),Tn(t,sn(e),[])});var Ni=be||function(){return(new i).getTime()};function Ci(t,e){var n;if("function"!=typeof e){if("function"!=typeof t)throw new Ct(k);var i=t;t=e,e=i}return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=r),n}}var ji=qi(function(t,e,n){var r=u;if(n.length){var i=Ht(n,ji.placeholder);r|=h}return lr(t,r,e,n,i)}),Ti=qi(function(t,e){for(var n=-1,r=(e=e.length?sn(e):yo(t)).length;++n<r;){var i=e[n];t[i]=lr(t[i],u,t)}return t}),Ri=qi(function(t,e,n){var r=u|c;if(n.length){var i=Ht(n,Ri.placeholder);r|=h}return lr(e,r,t,n,i)}),Li=$n(f),Ai=$n(l);function Oi(t,e,n){var i,o,a,u,c,s,f,l=0,h=!1,d=!0;if("function"!=typeof t)throw new Ct(k);if(e=e<0?0:+e||0,!0===n){var p=!0;d=!1}else Ki(n)&&(p=!!n.leading,h="maxWait"in n&&me(+n.maxWait||0,e),d="trailing"in n?!!n.trailing:d);function g(e,n){n&&ie(n),o=s=f=r,e&&(l=Ni(),a=t.apply(c,i),s||o||(i=c=r))}function v(){var t=e-(Ni()-u);t<=0||t>e?g(f,o):s=se(v,t)}function y(){g(d,s)}function _(){if(i=arguments,u=Ni(),c=this,f=d&&(s||!p),!1===h)var n=p&&!s;else{o||p||(l=u);var g=h-(u-l),_=g<=0||g>h;_?(o&&(o=ie(o)),l=u,a=t.apply(c,i)):o||(o=se(y,g))}return _&&s?s=ie(s):s||e===h||(s=se(v,e)),n&&(_=!0,a=t.apply(c,i)),!_||s||o||(i=c=r),a}return _.cancel=function(){s&&ie(s),o&&ie(o),l=0,o=s=f=r},_}var Si=qi(function(t,e){return en(t,1,e)}),Mi=qi(function(t,e,n){return en(t,e,n)}),Bi=Zn(),Ui=Zn(!0);function Pi(t,e){if("function"!=typeof t||e&&"function"!=typeof e)throw new Ct(k);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a),a};return n.cache=new Pi.Cache,n}var Fi=qi(function(t,e){if(e=sn(e),"function"!=typeof t||!De(e,Ut))throw new Ct(k);var n=e.length;return qi(function(r){for(var i=we(r.length,n);i--;)r[i]=e[i](r[i]);return t.apply(this,r)})});var zi=or(h),Di=or(d),Wi=qi(function(t,e){return lr(t,g,r,r,r,sn(e))});function qi(t,e){if("function"!=typeof t)throw new Ct(k);return e=me(e===r?t.length-1:+e||0,0),function(){for(var r=arguments,i=-1,o=me(r.length-e,0),a=n(o);++i<o;)a[i]=r[e+i];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 u=n(e+1);for(i=-1;++i<e;)u[i]=r[i];return u[e]=a,t.apply(this,u)}}function Gi(t,e){return t>e}function Vi(t){return $t(t)&&wr(t)&&At.call(t,"callee")&&!ue.call(t,"callee")}var Yi=ve||function(t){return $t(t)&&Ir(t.length)&&te.call(t)==N};function $i(t,e,n,i){var o=(n="function"==typeof n?Bn(n,i,3):r)?n(t,e):r;return o===r?yn(t,e,n):!!o}function Xi(t){return $t(t)&&"string"==typeof t.message&&te.call(t)==T}function Hi(t){return Ki(t)&&te.call(t)==R}function Ki(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function Qi(t){return null!=t&&(Hi(t)?ne.test(Lt.call(t)):$t(t)&&lt.test(t))}function Ji(t){return"number"==typeof t||$t(t)&&te.call(t)==L}function Zi(t){var e,n;return!(!$t(t)||te.call(t)!=A||Vi(t)||!(At.call(t,"constructor")||"function"!=typeof(e=t.constructor)||e instanceof e))&&(hn(t,function(t,e){n=e}),n===r||At.call(t,n))}function to(t){return Ki(t)&&te.call(t)==O}function eo(t){return"string"==typeof t||$t(t)&&te.call(t)==S}function no(t){return $t(t)&&Ir(t.length)&&!!mt[te.call(t)]}function ro(t,e){return t<e}function io(t){var e=t?vr(t):0;return Ir(e)?e?Fe(t):[]:Io(t)}function oo(t){return Qe(t,mo(t))}var ao=Dn(function t(e,n,i,o,a){if(!Ki(e))return e;var u=wr(n)&&(Yi(n)||no(n)),c=u?r:_o(n);return ze(c||n,function(s,f){if(c&&(s=n[f=s]),$t(s))o||(o=[]),a||(a=[]),function(t,e,n,i,o,a,u){for(var c=a.length,s=e[n];c--;)if(a[c]==s)return void(t[n]=u[c]);var f=t[n],l=o?o(f,s,n,t,e):r,h=l===r;h&&(l=s,wr(s)&&(Yi(s)||no(s))?l=Yi(f)?f:wr(f)?Fe(f):[]:Zi(s)||Vi(s)?l=Vi(f)?oo(f):Zi(f)?f:{}:h=!1),a.push(s),u.push(l),h?t[n]=i(l,s,o,a,u):(l==l?l!==f:f==f)&&(t[n]=l)}(e,n,f,t,i,o,a);else{var l=e[f],h=i?i(l,s,f,e,n):r,d=h===r;d&&(h=s),h===r&&(!u||f in e)||!d&&(h==h?h===l:l!=l)||(e[f]=h)}}),e}),uo=Dn(function(t,e,n){return n?Xe(t,e,n):He(t,e)});var co=Xn(uo,function(t,e){return t===r?e:t}),so=Xn(ao,function t(e,n){return e===r?n:ao(e,n,t)}),fo=Jn(dn),lo=Jn(pn),ho=er(fn),po=er(ln),go=nr(dn),vo=nr(pn);function yo(t){return gn(t,mo(t))}var _o=_e?function(t){var e=null==t?r:t.constructor;return"function"==typeof e&&e.prototype===t||"function"!=typeof t&&wr(t)?Ar(t):Ki(t)?_e(t):[]}:Ar;function mo(t){if(null==t)return[];Ki(t)||(t=Et(t));var e=t.length;e=e&&Ir(e)&&(Yi(t)||Vi(t))&&e||0;for(var r=t.constructor,i=-1,o="function"==typeof r&&r.prototype===t,a=n(e),u=e>0;++i<e;)a[i]=i+"";for(var c in t)u&&br(c,e)||"constructor"==c&&(o||!At.call(t,c))||a.push(c);return a}var wo=rr(!0),bo=rr(),xo=qi(function(t,e){if(null==t)return{};if("function"!=typeof e[0])return e=qe(sn(e),Nt),Cr(t,nn(mo(t),e));var n=Bn(e[0],e[1],3);return jr(t,function(t,e,r){return!n(t,e,r)})});function ko(t){t=Sr(t);for(var e=-1,r=_o(t),i=r.length,o=n(i);++e<i;){var a=r[e];o[e]=[a,t[a]]}return o}var Eo=qi(function(t,e){return null==t?{}:"function"==typeof e[0]?jr(t,Bn(e[0],e[1],3)):Cr(t,sn(e))});function Io(t){return Ln(t,_o(t))}var No=Vn(function(t,e,n){return e=e.toLowerCase(),t+(n?e.charAt(0).toUpperCase()+e.slice(1):e)});function Co(t){return(t=Pt(t))&&t.replace(dt,Wt).replace(at,"")}var jo=Vn(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()});var To=ir(),Ro=ir(!0);function Lo(t,e){var n="";if(t=Pt(t),(e=+e)<1||!t||!ye(e))return n;do{e%2&&(n+=t),e=ge(e/2),t+=t}while(e);return n}var Ao=Vn(function(t,e,n){return t+(n?"_":"")+e.toLowerCase()}),Oo=Vn(function(t,e,n){return t+(n?" ":"")+(e.charAt(0).toUpperCase()+e.slice(1))});function So(t,e,n){var r=t;return(t=Pt(t))?(n?xr(r,e,n):null==e)?t.slice(Kt(t),Qt(t)+1):(e+="",t.slice(Ft(t,e),zt(t,e)+1)):t}function Mo(t,e,n){return n&&xr(t,e,n)&&(e=r),(t=Pt(t)).match(e||vt)||[]}var Bo=qi(function(t,e){try{return t.apply(r,e)}catch(t){return Xi(t)?t:new o(t)}});function Uo(t,e,n){return n&&xr(t,e,n)&&(e=r),$t(t)?Fo(t):Je(t,e)}function Po(t){return t}function Fo(t){return wn(Ze(t,!0))}var zo=qi(function(t,e){return function(n){return mr(n,t,e)}}),Do=qi(function(t,e){return function(n){return mr(t,n,e)}});function Wo(t,e,n){if(null==n){var i=Ki(e),o=i?_o(e):r,a=o&&o.length?gn(e,o):r;(a?a.length:i)||(a=!1,n=e,e=t,t=this)}a||(a=gn(e,_o(e)));var u=!0,c=-1,s=Hi(t),f=a.length;!1===n?u=!1:Ki(n)&&"chain"in n&&(u=n.chain);for(;++c<f;){var l=a[c],h=e[l];t[l]=h,s&&(t.prototype[l]=function(e){return function(){var n=this.__chain__;if(u||n){var r=t(this.__wrapped__);return(r.__actions__=Fe(this.__actions__)).push({func:e,args:arguments,thisArg:t}),r.__chain__=n,r}return e.apply(t,Ge([this.value()],arguments))}}(h))}return t}function qo(){}function Go(t){return kr(t)?xn(t):function(t){var e=t+"";return t=Mr(t),function(n){return vn(n,t,e)}}(t)}var Vo,Yo=sr("ceil"),$o=sr("floor"),Xo=Hn(Gi,Ee),Ho=Hn(ro,Ie),Ko=sr("round");return Ae.prototype=Oe.prototype,Se.prototype=tn(Oe.prototype),Se.prototype.constructor=Se,Me.prototype=tn(Oe.prototype),Me.prototype.constructor=Me,Be.prototype.delete=function(t){return this.has(t)&&delete this.__data__[t]},Be.prototype.get=function(t){return"__proto__"==t?r:this.__data__[t]},Be.prototype.has=function(t){return"__proto__"!=t&&At.call(this.__data__,t)},Be.prototype.set=function(t,e){return"__proto__"!=t&&(this.__data__[t]=e),this},Ue.prototype.push=function(t){var e=this.data;"string"==typeof t||Ki(t)?e.set.add(t):e.hash[t]=!0},Pi.Cache=Be,Ae.after=function(t,e){if("function"!=typeof e){if("function"!=typeof t)throw new Ct(k);var n=t;t=e,e=n}return t=ye(t=+t)?t:0,function(){if(--t<1)return e.apply(this,arguments)}},Ae.ary=function(t,e,n){return n&&xr(t,e,n)&&(e=r),e=t&&null==e?t.length:me(+e||0,0),lr(t,p,r,r,r,r,e)},Ae.assign=uo,Ae.at=ui,Ae.before=Ci,Ae.bind=ji,Ae.bindAll=Ti,Ae.bindKey=Ri,Ae.callback=Uo,Ae.chain=ii,Ae.chunk=function(t,e,r){e=(r?xr(t,e,r):null==e)?1:me(ge(e)||1,1);for(var i=0,o=t?t.length:0,a=-1,u=n(de(o/e));i<o;)u[++a]=Nn(t,i,i+=e);return u},Ae.compact=function(t){for(var e=-1,n=t?t.length:0,r=-1,i=[];++e<n;){var o=t[e];o&&(i[++r]=o)}return i},Ae.constant=function(t){return function(){return t}},Ae.countBy=ci,Ae.create=function(t,e,n){var i=tn(t);return n&&xr(t,e,n)&&(e=r),e?He(i,e):i},Ae.curry=Li,Ae.curryRight=Ai,Ae.debounce=Oi,Ae.defaults=co,Ae.defaultsDeep=so,Ae.defer=Si,Ae.delay=Mi,Ae.difference=Ur,Ae.drop=Pr,Ae.dropRight=Fr,Ae.dropRightWhile=function(t,e,n){return t&&t.length?An(t,hr(e,n,3),!0,!0):[]},Ae.dropWhile=function(t,e,n){return t&&t.length?An(t,hr(e,n,3),!0):[]},Ae.fill=function(t,e,n,i){var o=t?t.length:0;return o?(n&&"number"!=typeof n&&xr(t,e,n)&&(n=0,i=o),function(t,e,n,i){var o=t.length;for((n=null==n?0:+n||0)<0&&(n=-n>o?0:o+n),(i=i===r||i>o?o:+i||0)<0&&(i+=o),o=n>i?0:i>>>0,n>>>=0;n<o;)t[n++]=e;return t}(t,e,n,i)):[]},Ae.filter=fi,Ae.flatten=function(t,e,n){var r=t?t.length:0;return n&&xr(t,e,n)&&(e=!1),r?sn(t,e):[]},Ae.flattenDeep=function(t){return t&&t.length?sn(t,!0):[]},Ae.flow=Bi,Ae.flowRight=Ui,Ae.forEach=di,Ae.forEachRight=pi,Ae.forIn=ho,Ae.forInRight=po,Ae.forOwn=go,Ae.forOwnRight=vo,Ae.functions=yo,Ae.groupBy=gi,Ae.indexBy=yi,Ae.initial=function(t){return Fr(t,1)},Ae.intersection=Gr,Ae.invert=function(t,e,n){n&&xr(t,e,n)&&(e=r);for(var i=-1,o=_o(t),a=o.length,u={};++i<a;){var c=o[i],s=t[c];e?At.call(u,s)?u[s].push(c):u[s]=[c]:u[s]=c}return u},Ae.invoke=_i,Ae.keys=_o,Ae.keysIn=mo,Ae.map=mi,Ae.mapKeys=wo,Ae.mapValues=bo,Ae.matches=Fo,Ae.matchesProperty=function(t,e){return bn(t,Ze(e,!0))},Ae.memoize=Pi,Ae.merge=ao,Ae.method=zo,Ae.methodOf=Do,Ae.mixin=Wo,Ae.modArgs=Fi,Ae.negate=function(t){if("function"!=typeof t)throw new Ct(k);return function(){return!t.apply(this,arguments)}},Ae.omit=xo,Ae.once=function(t){return Ci(2,t)},Ae.pairs=ko,Ae.partial=zi,Ae.partialRight=Di,Ae.partition=wi,Ae.pick=Eo,Ae.pluck=function(t,e){return mi(t,Go(e))},Ae.property=Go,Ae.propertyOf=function(t){return function(e){return vn(t,Mr(e),e+"")}},Ae.pull=function(){var t=arguments,e=t[0];if(!e||!e.length)return e;for(var n=0,r=gr(),i=t.length;++n<i;)for(var o=0,a=t[n];(o=r(e,a,o))>-1;)fe.call(e,o,1);return e},Ae.pullAt=Yr,Ae.range=function(t,e,i){i&&xr(t,e,i)&&(e=i=r),t=+t||0,null==e?(e=t,t=0):e=+e||0;for(var o=-1,a=me(de((e-t)/((i=null==i?1:+i||0)||1)),0),u=n(a);++o<a;)u[o]=t,t+=i;return u},Ae.rearg=Wi,Ae.reject=function(t,e,n){var r=Yi(t)?We:un;return e=hr(e,n,3),r(t,function(t,n,r){return!e(t,n,r)})},Ae.remove=function(t,e,n){var r=[];if(!t||!t.length)return r;var i=-1,o=[],a=t.length;for(e=hr(e,n,3);++i<a;){var u=t[i];e(u,i,t)&&(r.push(u),o.push(i))}return kn(t,o),r},Ae.rest=$r,Ae.restParam=qi,Ae.set=function(t,e,n){if(null==t)return t;for(var r=e+"",i=-1,o=(e=null!=t[r]||kr(e,t)?[r]:Mr(e)).length,a=o-1,u=t;null!=u&&++i<o;){var c=e[i];Ki(u)&&(i==a?u[c]=n:null==u[c]&&(u[c]=br(e[i+1])?[]:{})),u=u[c]}return t},Ae.shuffle=function(t){return ki(t,Ie)},Ae.slice=function(t,e,n){var r=t?t.length:0;return r?(n&&"number"!=typeof n&&xr(t,e,n)&&(e=0,n=r),Nn(t,e,n)):[]},Ae.sortBy=function(t,e,n){if(null==t)return[];n&&xr(t,e,n)&&(e=r);var i=-1;return e=hr(e,n,3),jn(mn(t,function(t,n,r){return{criteria:e(t,n,r),index:++i,value:t}}),Dt)},Ae.sortByAll=Ii,Ae.sortByOrder=function(t,e,n,i){return null==t?[]:(i&&xr(e,n,i)&&(n=r),Yi(e)||(e=null==e?[]:[e]),Yi(n)||(n=null==n?[]:[n]),Tn(t,e,n))},Ae.spread=function(t){if("function"!=typeof t)throw new Ct(k);return function(e){return t.apply(this,e)}},Ae.take=function(t,e,n){return t&&t.length?((n?xr(t,e,n):null==e)&&(e=1),Nn(t,0,e<0?0:e)):[]},Ae.takeRight=function(t,e,n){var r=t?t.length:0;return r?((n?xr(t,e,n):null==e)&&(e=1),Nn(t,(e=r-(+e||0))<0?0:e)):[]},Ae.takeRightWhile=function(t,e,n){return t&&t.length?An(t,hr(e,n,3),!1,!0):[]},Ae.takeWhile=function(t,e,n){return t&&t.length?An(t,hr(e,n,3)):[]},Ae.tap=function(t,e,n){return e.call(n,t),t},Ae.throttle=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new Ct(k);return!1===n?r=!1:Ki(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Oi(t,e,{leading:r,maxWait:+e,trailing:i})},Ae.thru=oi,Ae.times=function(t,e,r){if((t=ge(t))<1||!ye(t))return[];var i=-1,o=n(we(t,Ne));for(e=Bn(e,r,1);++i<t;)i<Ne?o[i]=e(i):e(i);return o},Ae.toArray=io,Ae.toPlainObject=oo,Ae.transform=function(t,e,n,i){var o=Yi(t)||no(t);if(e=hr(e,i,4),null==n)if(o||Ki(t)){var a=t.constructor;n=o?Yi(t)?new a:[]:tn(Hi(a)?a.prototype:r)}else n={};return(o?ze:dn)(t,function(t,r,i){return e(n,t,r,i)}),n},Ae.union=Kr,Ae.uniq=Qr,Ae.unzip=Jr,Ae.unzipWith=Zr,Ae.values=Io,Ae.valuesIn=function(t){return Ln(t,mo(t))},Ae.where=function(t,e){return fi(t,wn(e))},Ae.without=ti,Ae.wrap=function(t,e){return lr(e=null==e?Po:e,h,r,[t],[])},Ae.xor=function(){for(var t=-1,e=arguments.length;++t<e;){var n=arguments[t];if(wr(n))var r=r?Ge(nn(r,n),nn(n,r)):n}return r?Rn(r):[]},Ae.zip=ei,Ae.zipObject=ni,Ae.zipWith=ri,Ae.backflow=Ui,Ae.collect=mi,Ae.compose=Ui,Ae.each=di,Ae.eachRight=pi,Ae.extend=uo,Ae.iteratee=Uo,Ae.methods=yo,Ae.object=ni,Ae.select=fi,Ae.tail=$r,Ae.unique=Qr,Wo(Ae,Ae),Ae.add=function(t,e){return(+t||0)+(+e||0)},Ae.attempt=Bo,Ae.camelCase=No,Ae.capitalize=function(t){return(t=Pt(t))&&t.charAt(0).toUpperCase()+t.slice(1)},Ae.ceil=Yo,Ae.clone=function(t,e,n,r){return e&&"boolean"!=typeof e&&xr(t,e,n)?e=!1:"function"==typeof e&&(r=n,n=e,e=!1),"function"==typeof n?Ze(t,e,Bn(n,r,1)):Ze(t,e)},Ae.cloneDeep=function(t,e,n){return"function"==typeof e?Ze(t,!0,Bn(e,n,1)):Ze(t,!0)},Ae.deburr=Co,Ae.endsWith=function(t,e,n){e+="";var i=(t=Pt(t)).length;return n=n===r?i:we(n<0?0:+n||0,i),(n-=e.length)>=0&&t.indexOf(e,n)==n},Ae.escape=function(t){return(t=Pt(t))&&Q.test(t)?t.replace(H,qt):t},Ae.escapeRegExp=function(t){return(t=Pt(t))&&ot.test(t)?t.replace(it,Gt):t||"(?:)"},Ae.every=si,Ae.find=li,Ae.findIndex=zr,Ae.findKey=fo,Ae.findLast=hi,Ae.findLastIndex=Dr,Ae.findLastKey=lo,Ae.findWhere=function(t,e){return li(t,wn(e))},Ae.first=Wr,Ae.floor=$o,Ae.get=function(t,e,n){var i=null==t?r:vn(t,Mr(e),e+"");return i===r?n:i},Ae.gt=Gi,Ae.gte=function(t,e){return t>=e},Ae.has=function(t,e){if(null==t)return!1;var n=At.call(t,e);if(!n&&!kr(e)){if(null==(t=1==(e=Mr(e)).length?t:vn(t,Nn(e,0,-1))))return!1;e=Vr(e),n=At.call(t,e)}return n||Ir(t.length)&&br(e,t.length)&&(Yi(t)||Vi(t))},Ae.identity=Po,Ae.includes=vi,Ae.indexOf=qr,Ae.inRange=function(t,e,n){return e=+e||0,n===r?(n=e,e=0):n=+n||0,t>=we(e,n)&&t<me(e,n)},Ae.isArguments=Vi,Ae.isArray=Yi,Ae.isBoolean=function(t){return!0===t||!1===t||$t(t)&&te.call(t)==C},Ae.isDate=function(t){return $t(t)&&te.call(t)==j},Ae.isElement=function(t){return!!t&&1===t.nodeType&&$t(t)&&!Zi(t)},Ae.isEmpty=function(t){return null==t||(wr(t)&&(Yi(t)||eo(t)||Vi(t)||$t(t)&&Hi(t.splice))?!t.length:!_o(t).length)},Ae.isEqual=$i,Ae.isError=Xi,Ae.isFinite=function(t){return"number"==typeof t&&ye(t)},Ae.isFunction=Hi,Ae.isMatch=function(t,e,n,i){return n="function"==typeof n?Bn(n,i,3):r,_n(t,yr(e),n)},Ae.isNaN=function(t){return Ji(t)&&t!=+t},Ae.isNative=Qi,Ae.isNull=function(t){return null===t},Ae.isNumber=Ji,Ae.isObject=Ki,Ae.isPlainObject=Zi,Ae.isRegExp=to,Ae.isString=eo,Ae.isTypedArray=no,Ae.isUndefined=function(t){return t===r},Ae.kebabCase=jo,Ae.last=Vr,Ae.lastIndexOf=function(t,e,n){var r=t?t.length:0;if(!r)return-1;var i=r;if("number"==typeof n)i=(n<0?me(r+n,0):we(n||0,r-1))+1;else if(n){var o=t[i=Sn(t,e,!0)-1];return(e==e?e===o:o!=o)?i:-1}if(e!=e)return Yt(t,i,!0);for(;i--;)if(t[i]===e)return i;return-1},Ae.lt=ro,Ae.lte=function(t,e){return t<=e},Ae.max=Xo,Ae.min=Ho,Ae.noConflict=function(){return Ot._=ee,this},Ae.noop=qo,Ae.now=Ni,Ae.pad=function(t,e,n){e=+e;var r=(t=Pt(t)).length;if(r>=e||!ye(e))return t;var i=(e-r)/2,o=ge(i);return(n=cr("",de(i),n)).slice(0,o)+t+n},Ae.padLeft=To,Ae.padRight=Ro,Ae.parseInt=function(t,e,n){return(n?xr(t,e,n):null==e)?e=0:e&&(e=+e),t=So(t),xe(t,e||(ft.test(t)?16:10))},Ae.random=function(t,e,n){n&&xr(t,e,n)&&(e=n=r);var i=null==t,o=null==e;if(null==n&&(o&&"boolean"==typeof t?(n=t,t=1):"boolean"==typeof e&&(n=e,o=!0)),i&&o&&(e=1,o=!1),t=+t||0,o?(e=t,t=0):e=+e||0,n||t%1||e%1){var a=ke();return we(t+a*(e-t+oe("1e-"+((a+"").length-1))),e)}return En(t,e)},Ae.reduce=bi,Ae.reduceRight=xi,Ae.repeat=Lo,Ae.result=function(t,e,n){var i=null==t?r:t[e];return i===r&&(null==t||kr(e,t)||(i=null==(t=1==(e=Mr(e)).length?t:vn(t,Nn(e,0,-1)))?r:t[Vr(e)]),i=i===r?n:i),Hi(i)?i.call(t):i},Ae.round=Ko,Ae.runInContext=t,Ae.size=function(t){var e=t?vr(t):0;return Ir(e)?e:_o(t).length},Ae.snakeCase=Ao,Ae.some=Ei,Ae.sortedIndex=Xr,Ae.sortedLastIndex=Hr,Ae.startCase=Oo,Ae.startsWith=function(t,e,n){return t=Pt(t),n=null==n?0:we(n<0?0:+n||0,t.length),t.lastIndexOf(e,n)==n},Ae.sum=function(t,e,n){return n&&xr(t,e,n)&&(e=r),1==(e=hr(e,n,3)).length?function(t,e){for(var n=t.length,r=0;n--;)r+=+e(t[n])||0;return r}(Yi(t)?t:Or(t),e):function(t,e){var n=0;return rn(t,function(t,r,i){n+=+e(t,r,i)||0}),n}(t,e)},Ae.template=function(t,e,n){var i=Ae.templateSettings;n&&xr(t,e,n)&&(e=n=r),t=Pt(t);var o,a,u=Xe(He({},(e=Xe(He({},n||e),i,$e)).imports),i.imports,$e),c=_o(u),s=Ln(u,c),f=0,l=e.interpolate||pt,h="__p += '",d=It((e.escape||pt).source+"|"+l.source+"|"+(l===tt?ct:pt).source+"|"+(e.evaluate||pt).source+"|$","g"),p="//# sourceURL="+("sourceURL"in e?e.sourceURL:"lodash.templateSources["+ ++_t+"]")+"\n";t.replace(d,function(e,n,r,i,u,c){return r||(r=i),h+=t.slice(f,c).replace(gt,Vt),n&&(o=!0,h+="' +\n__e("+n+") +\n'"),u&&(a=!0,h+="';\n"+u+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),f=c+e.length,e}),h+="';\n";var g=e.variable;g||(h="with (obj) {\n"+h+"\n}\n"),h=(a?h.replace(V,""):h).replace(Y,"$1").replace($,"$1;"),h="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var v=Bo(function(){return bt(c,p+"return "+h).apply(r,s)});if(v.source=h,Xi(v))throw v;return v},Ae.trim=So,Ae.trimLeft=function(t,e,n){var r=t;return(t=Pt(t))?(n?xr(r,e,n):null==e)?t.slice(Kt(t)):t.slice(Ft(t,e+"")):t},Ae.trimRight=function(t,e,n){var r=t;return(t=Pt(t))?(n?xr(r,e,n):null==e)?t.slice(0,Qt(t)+1):t.slice(0,zt(t,e+"")+1):t},Ae.trunc=function(t,e,n){n&&xr(t,e,n)&&(e=r);var i=v,o=y;if(null!=e)if(Ki(e)){var a="separator"in e?e.separator:a;i="length"in e?+e.length||0:i,o="omission"in e?Pt(e.omission):o}else i=+e||0;if(i>=(t=Pt(t)).length)return t;var u=i-o.length;if(u<1)return o;var c=t.slice(0,u);if(null==a)return c+o;if(to(a)){if(t.slice(u).search(a)){var s,f,l=t.slice(0,u);for(a.global||(a=It(a.source,(st.exec(a)||"")+"g")),a.lastIndex=0;s=a.exec(l);)f=s.index;c=c.slice(0,null==f?u:f)}}else if(t.indexOf(a,u)!=u){var h=c.lastIndexOf(a);h>-1&&(c=c.slice(0,h))}return c+o},Ae.unescape=function(t){return(t=Pt(t))&&K.test(t)?t.replace(X,Jt):t},Ae.uniqueId=function(t){var e=++Xt;return Pt(t)+e},Ae.words=Mo,Ae.all=si,Ae.any=Ei,Ae.contains=vi,Ae.eq=$i,Ae.detect=li,Ae.foldl=bi,Ae.foldr=xi,Ae.head=Wr,Ae.include=vi,Ae.inject=bi,Wo(Ae,(Vo={},dn(Ae,function(t,e){Ae.prototype[e]||(Vo[e]=t)}),Vo),!1),Ae.sample=ki,Ae.prototype.sample=function(t){return this.__chain__||null!=t?this.thru(function(e){return ki(e,t)}):ki(this.value())},Ae.VERSION=a,ze(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){Ae[t].placeholder=Ae}),ze(["drop","take"],function(t,e){Me.prototype[t]=function(n){var r=this.__filtered__;if(r&&!e)return new Me(this);n=null==n?1:me(ge(n)||0,0);var i=this.clone();return r?i.__takeCount__=we(i.__takeCount__,n):i.__views__.push({size:n,type:t+(i.__dir__<0?"Right":"")}),i},Me.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}}),ze(["filter","map","takeWhile"],function(t,e){var n=e+1,r=n!=x;Me.prototype[t]=function(t,e){var i=this.clone();return i.__iteratees__.push({iteratee:hr(t,e,1),type:n}),i.__filtered__=i.__filtered__||r,i}}),ze(["first","last"],function(t,e){var n="take"+(e?"Right":"");Me.prototype[t]=function(){return this[n](1).value()[0]}}),ze(["initial","rest"],function(t,e){var n="drop"+(e?"":"Right");Me.prototype[t]=function(){return this.__filtered__?new Me(this):this[n](1)}}),ze(["pluck","where"],function(t,e){var n=e?"filter":"map",r=e?wn:Go;Me.prototype[t]=function(t){return this[n](r(t))}}),Me.prototype.compact=function(){return this.filter(Po)},Me.prototype.reject=function(t,e){return t=hr(t,e,1),this.filter(function(e){return!t(e)})},Me.prototype.slice=function(t,e){t=null==t?0:+t||0;var n=this;return n.__filtered__&&(t>0||e<0)?new Me(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==r&&(n=(e=+e||0)<0?n.dropRight(-e):n.take(e-t)),n)},Me.prototype.takeRightWhile=function(t,e){return this.reverse().takeWhile(t,e).reverse()},Me.prototype.toArray=function(){return this.take(Ie)},dn(Me.prototype,function(t,e){var n=/^(?:filter|map|reject)|While$/.test(e),i=/^(?:first|last)$/.test(e),o=Ae[i?"take"+("last"==e?"Right":""):e];o&&(Ae.prototype[e]=function(){var e=i?[1]:arguments,a=this.__chain__,u=this.__wrapped__,c=!!this.__actions__.length,s=u instanceof Me,f=e[0],l=s||Yi(u);l&&n&&"function"==typeof f&&1!=f.length&&(s=l=!1);var h=function(t){return i&&a?o(t,1)[0]:o.apply(r,Ge([t],e))},d={func:oi,args:[h],thisArg:r},p=s&&!c;if(i&&!a)return p?((u=u.clone()).__actions__.push(d),t.call(u)):o.call(r,this.value())[0];if(!i&&l){u=p?u:new Me(this);var g=t.apply(u,e);return g.__actions__.push(d),new Se(g,a)}return this.thru(h)})}),ze(["join","pop","push","replace","shift","sort","splice","split","unshift"],function(t){var e=(/^(?:replace|split)$/.test(t)?Rt:jt)[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:join|pop|replace|shift)$/.test(t);Ae.prototype[t]=function(){var t=arguments;return r&&!this.__chain__?e.apply(this.value(),t):this[n](function(n){return e.apply(n,t)})}}),dn(Me.prototype,function(t,e){var n=Ae[e];if(n){var r=n.name;(Le[r]||(Le[r]=[])).push({name:e,func:n})}}),Le[ur(r,c).name]=[{name:"wrapper",func:r}],Me.prototype.clone=function(){var t=new Me(this.__wrapped__);return t.__actions__=Fe(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Fe(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Fe(this.__views__),t},Me.prototype.reverse=function(){if(this.__filtered__){var t=new Me(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Me.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Yi(t),r=e<0,i=n?t.length:0,o=function(t,e,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":t+=a;break;case"dropRight":e-=a;break;case"take":e=we(e,t+a);break;case"takeRight":t=me(t,e-a)}}return{start:t,end:e}}(0,i,this.__views__),a=o.start,u=o.end,c=u-a,s=r?u:a-1,f=this.__iteratees__,l=f.length,h=0,d=we(c,this.__takeCount__);if(!n||i<w||i==c&&d==c)return On(r&&n?t.reverse():t,this.__actions__);var p=[];t:for(;c--&&h<d;){for(var g=-1,v=t[s+=e];++g<l;){var y=f[g],_=y.iteratee,m=y.type,k=_(v);if(m==x)v=k;else if(!k){if(m==b)continue t;break t}}p[h++]=v}return p},Ae.prototype.chain=function(){return ii(this)},Ae.prototype.commit=function(){return new Se(this.value(),this.__chain__)},Ae.prototype.concat=ai,Ae.prototype.plant=function(t){for(var e,n=this;n instanceof Oe;){var r=Br(n);e?i.__wrapped__=r:e=r;var i=r;n=n.__wrapped__}return i.__wrapped__=t,e},Ae.prototype.reverse=function(){var t=this.__wrapped__,e=function(t){return n&&n.__dir__<0?t:t.reverse()};if(t instanceof Me){var n=t;return this.__actions__.length&&(n=new Me(this)),(n=n.reverse()).__actions__.push({func:oi,args:[e],thisArg:r}),new Se(n,this.__chain__)}return this.thru(e)},Ae.prototype.toString=function(){return this.value()+""},Ae.prototype.run=Ae.prototype.toJSON=Ae.prototype.valueOf=Ae.prototype.value=function(){return On(this.__wrapped__,this.__actions__)},Ae.prototype.collect=Ae.prototype.map,Ae.prototype.head=Ae.prototype.first,Ae.prototype.select=Ae.prototype.filter,Ae.prototype.tail=Ae.prototype.rest,Ae}();Ct&&jt?At?(jt.exports=Zt)._=Zt:Ct._=Zt:Ot._=Zt}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)});