ui-widget-toolkit
Version:
UI widgets built on top of D3, Pixi.js and ag-grid-community
8 lines • 757 kB
JavaScript
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("d3"),require("pixi.js"),require("ag-grid-community")):"function"==typeof define&&define.amd?define("UWT",["d3","pixi.js","ag-grid-community"],e):"object"==typeof exports?exports.UWT=e(require("d3"),require("pixi.js"),require("ag-grid-community")):t.UWT=e(t.d3,t.PIXI,t.agGrid)}(window,(function(t,e,n){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=202)}([function(t,e,n){"use strict";var r=function(t,e){return t<e?-1:t>e?1:t>=e?0:NaN},i=function(t){var e;return 1===t.length&&(e=t,t=function(t,n){return r(e(t),n)}),{left:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var o=r+i>>>1;t(e[o],n)<0?r=o+1:i=o}return r},right:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var o=r+i>>>1;t(e[o],n)>0?i=o:r=o+1}return r}}};var o=i(r),a=o.right,s=(o.left,a);var u=function(t){return null===t?NaN:+t},c=Array.prototype,l=(c.slice,c.map,function(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),o=new Array(i);++r<i;)o[r]=t+r*n;return o}),h=Math.sqrt(50),f=Math.sqrt(10),d=Math.sqrt(2),p=function(t,e,n){var r,i,o,a,s=-1;if(n=+n,(t=+t)===(e=+e)&&n>0)return[t];if((r=e<t)&&(i=t,t=e,e=i),0===(a=g(t,e,n))||!isFinite(a))return[];if(a>0)for(t=Math.ceil(t/a),e=Math.floor(e/a),o=new Array(i=Math.ceil(e-t+1));++s<i;)o[s]=(t+s)*a;else for(t=Math.floor(t*a),e=Math.ceil(e*a),o=new Array(i=Math.ceil(t-e+1));++s<i;)o[s]=(t-s)/a;return r&&o.reverse(),o};function g(t,e,n){var r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=h?10:o>=f?5:o>=d?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=h?10:o>=f?5:o>=d?2:1)}function _(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=h?i*=10:o>=f?i*=5:o>=d&&(i*=2),e<t?-i:i}var m=function(t,e,n){if(null==n&&(n=u),r=t.length){if((e=+e)<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,o=Math.floor(i),a=+n(t[o],o,t);return a+(+n(t[o+1],o+1,t)-a)*(i-o)}},v=function(t,e){var n,r,i=t.length,o=-1;if(null==e){for(;++o<i;)if(null!=(n=t[o])&&n>=n)for(r=n;++o<i;)null!=(n=t[o])&&n>r&&(r=n)}else for(;++o<i;)if(null!=(n=e(t[o],o,t))&&n>=n)for(r=n;++o<i;)null!=(n=e(t[o],o,t))&&n>r&&(r=n);return r},y=function(t,e){var n,r,i=t.length,o=-1;if(null==e){for(;++o<i;)if(null!=(n=t[o])&&n>=n)for(r=n;++o<i;)null!=(n=t[o])&&r>n&&(r=n)}else for(;++o<i;)if(null!=(n=e(t[o],o,t))&&n>=n)for(r=n;++o<i;)null!=(n=e(t[o],o,t))&&r>n&&(r=n);return r},x=function(t,e){var n,r=t.length,i=-1,o=0;if(null==e)for(;++i<r;)(n=+t[i])&&(o+=n);else for(;++i<r;)(n=+e(t[i],i,t))&&(o+=n);return o};n.d(e,"b",(function(){return s})),n.d(e,"a",(function(){return r})),n.d(e,"c",(function(){return i})),n.d(e,"d",(function(){return v})),n.d(e,"e",(function(){return y})),n.d(e,"f",(function(){return m})),n.d(e,"g",(function(){return l})),n.d(e,"h",(function(){return x})),n.d(e,"k",(function(){return p})),n.d(e,"i",(function(){return g})),n.d(e,"j",(function(){return _}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){t[t.Left=1]="Left",t[t.Right=2]="Right",t[t.Top=4]="Top",t[t.Bottom=8]="Bottom",t[t.None=0]="None"}(e.Alignment||(e.Alignment={})),function(t){t[t.CursorStart=0]="CursorStart",t[t.CursorMove=1]="CursorMove",t[t.CursorEnd=2]="CursorEnd",t[t.BrushStart=3]="BrushStart",t[t.BrushMove=4]="BrushMove",t[t.BrushEnd=5]="BrushEnd",t[t.HoverStart=6]="HoverStart",t[t.HoverEnd=7]="HoverEnd",t[t.HoverClear=8]="HoverClear",t[t.FocusStart=6]="FocusStart",t[t.FocusEnd=7]="FocusEnd",t[t.FocusClear=8]="FocusClear",t[t.SelectAdd=9]="SelectAdd",t[t.SelectRemove=10]="SelectRemove",t[t.SelectStart=9]="SelectStart",t[t.SelectEnd=10]="SelectEnd",t[t.SelectClear=11]="SelectClear",t[t.Zoom=12]="Zoom",t[t.Click=13]="Click",t[t.DoubleClick=14]="DoubleClick",t[t.RangeUpdate=15]="RangeUpdate"}(e.EventType||(e.EventType={})),function(t){t[t.Unrendered=0]="Unrendered",t[t.Cartesian=1]="Cartesian",t[t.Pie=2]="Pie",t[t.Grid=3]="Grid",t[t.FlowDiagram=4]="FlowDiagram",t[t.ForceDirectedGraph=5]="ForceDirectedGraph",t[t.Sunburst=6]="Sunburst",t[t.HierarchyGraph=7]="HierarchyGraph",t[t.PortDiagram=8]="PortDiagram",t[t.SimpleGraph=9]="SimpleGraph",t[t.TreeMap=10]="TreeMap",t[t.Axis=11]="Axis",t[t.Radar=12]="Radar"}(e.UIType||(e.UIType={})),function(t){t[t.Discrete=0]="Discrete",t[t.Gradient=1]="Gradient"}(e.LegendType||(e.LegendType={})),function(t){t[t.Vertical=0]="Vertical",t[t.Horizontal=1]="Horizontal"}(e.LegendOrientation||(e.LegendOrientation={})),function(t){t[t.Rectangle=0]="Rectangle",t[t.Line=1]="Line",t[t.Circle=2]="Circle"}(e.LegendItemShape||(e.LegendItemShape={}));e.Rect=class{constructor(t,e,n,r){this.x=0,this.y=0,this.width=0,this.height=0,this.x=t,this.y=e,this.width=n,this.height=r}contains(t,e){return t>=this.x&&t<=this.x+this.width&&e>=this.y&&e<=this.y+this.height}};e.Css=class{constructor(t,e){t?this.addClasses(t):this.classes={},this.style=e||{}}addClasses(t){let e=t.split(" ");for(let t=0;t<e.length;++t)this.classes[e[t]]=!0;return this}addStyles(t){for(let e in t)this.style[e]=t[e];return this}setColor(t){return this.addStyles({color:t}),this}setOpacity(t){return this.addStyles({opacity:t}),this}removeClass(t){return delete this.classes[t],this}removeStyle(t){return delete this.style[t],this}getClasses(){return Object.keys(this.classes)}getClassString(){let t="";for(let e in this.classes)t+=e+" ";return t}getStyles(){return this.style}getStyleString(){return JSON.stringify(this.style)}};e.Range=class{constructor(t,e){this.min=t,this.max=e}setMin(t){return this.min=t,this}getMin(){return this.min}setMax(t){return this.max=t,this}getMax(){return this.max}}},function(t,e,n){"use strict";function r(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function i(t){return function(e,n){return r(t(e),n)}}function o(t){return t||(t=r),1===t.length&&(t=i(t)),{left:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var o=r+i>>>1;t(e[o],n)<0?r=o+1:i=o}return r},right:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var o=r+i>>>1;t(e[o],n)>0?i=o:r=o+1}return r}}}Object.defineProperty(e,"__esModule",{value:!0}),e.getSelectionName=function(t){return"number"==typeof t?"n"+t:t?(t.length>0&&!isNaN(Number(t[0]))&&(t="z"+t),t=t.replace(/[\*\%\#\[\]\/\>\<\s\+\(\)\;\@\:\?\"=.,]/g,"-")):""},e.removeFromList=function(t,e){if(t){let n=e.indexOf(t);-1!==n&&e.splice(n,1)}},e.bisect=o,e.bucketData=function(t,e,n){let r=o().right,i=[];for(let t=0;t<e.length-1;++t)i[t]=[];let a=e[0],s=e[e.length-1],u=e.slice(1);for(let e=0;e<t.length;++e){let o=n(t[e]);o<a||o>s||i[r(u,o)].push(t[e])}let c={};for(let t=0;t<e.length-1;++t){c[e[t]+"-"+e[t+1]]=i[t]}return c},e.copy=function(t){let e={};for(let n in t)e[n]=t[n];return e},e.merge=function(t,e){for(let n in e)t[n]=e[n]},e.convertTraceToTrees=function(t){let e=[],n=[],r=[];for(let i=0;i<t.length;i++){let o=t[i],a=n[n.length-1];for(;n.length&&o.x>a.x+a.dx;)--n.length,--r.length,a=n[n.length-1];let s=r[r.length-1],u={key:o.key,value:o.dx,children:[],parent:s};o.name&&(u.name=o.name),s?s.children.push(u):e.push(u),n.push(o),r.push(u)}return e};e.SimpleBuffer=class{constructor(t){this._data=t||[]}push(t){this._data.push(t)}get(t){return this._data[t]}length(){return this._data.length}getData(){return this._data}};e.RingBuffer=class{constructor(t){this._data=new Array(t),this._startIdx=0,this._count=0,this._isRotating=!1}push(t){this._isRotating?(this._data[this._startIdx]=t,++this._startIdx,this._startIdx===this._count&&(this._startIdx=0),this._isRotating=!0):this._count===this._data.length-1?(this._data[this._count]=t,++this._count,this._isRotating=!0):(this._data[this._count]=t,++this._count)}get(t){return this._isRotating&&(t+=this._startIdx)>=this._count&&(t-=this._count),this._data[t]}length(){return this._count}getData(){if(this._isRotating){let t=[];for(let e=this._startIdx;e<this._data.length;++e)t.push(this._data[e]);for(let e=0;e<this._startIdx;++e)t.push(this._data[e]);return t}return this._data}},e.bisectBuffer=function(t){return t||(t=r),1===t.length&&(t=i(t)),{left:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length());r<i;){var o=r+i>>>1;t(e.get(o),n)<0?r=o+1:i=o}return r},right:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length());r<i;){var o=r+i>>>1;t(e.get(o),n)>0?i=o:r=o+1}return r}}},e.transposeKeys=function(t){let e={};function n(t,r,i,o){let a=[];for(let t=0;t<r.length;++t)a[t]=r[t];if(a.push(i.key),Array.isArray(i.data))for(let e=0;e<i.data.length;++e)n(t,a,i.data[e],o+1);else{let n=t;for(let t=a.length-1;t>=0;--t){let r,o=a[t];e.hasOwnProperty(o)?r=e[o]:(r=n.length,e[o]=r),n[r]||(n[r]={key:o,data:[]}),0===t?n[r].data=i.data:n=n[r].data}}}let r=[];for(let e=0;e<t.length;++e)n(r,[],t[e],0);return r},e.runFunctionOnLeaf=function t(e,n){if(e&&e.children&&e.children.length>0)for(let r=0;r<e.children.length;++r)t(e.children[r],n);else n(e)},e.isOverlapping=function(t,e){return t.x<=e.right&&t.right>=e.x&&t.y<=e.bottom&&t.bottom>=e.y}},function(e,n){e.exports=t},function(t,e,n){var r;try{r={cloneDeep:n(365),constant:n(178),defaults:n(422),each:n(426),filter:n(429),find:n(454),flatten:n(192),forEach:n(181),forIn:n(461),has:n(462),isUndefined:n(464),last:n(465),map:n(466),mapValues:n(467),max:n(468),merge:n(470),min:n(477),minBy:n(478),now:n(479),pick:n(480),range:n(485),reduce:n(488),sortBy:n(491),uniqueId:n(496),values:n(497),zipObject:n(499)}}catch(t){}r||(r=window._),t.exports=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(2),i=n(1),o=n(19),a=n(85),s=n(528),u=n(7),c=n(3);function l(t,e,n){return n=n&&"none"!==n?n:void 0,e.has(t.node())||e.set(t.node(),n),e.get(t.node())}function h(t,e,n){let r=t.style("fill");if(r=l(t,e,r),r){let e=a.InteractionState.getFocusColor(r);t.style("fill",e)}if(!t.classed("selected")){let e=t.style("stroke");if(e=l(t,n,e),e){let n=a.InteractionState.getFocusColor(e);t.style("stroke",n)}}t.classed("hover",!0)}function f(t,e,n){let r=l(t,e);if(r&&t.style("fill",r),!t.classed("selected")){let e=t.style("stroke");e&&(e=l(t,n),e&&t.style("stroke",e))}t.classed("hover",!1)}function d(t,e,n){let r=t.style("fill");r=l(t,e,r);let i=!r||"none"===r,o=t.style("stroke");o=l(t,n,o),(o||i)&&t.style("stroke",null),t.classed("selected",!0)}function p(t,e,n){let r=l(t,n);r&&t.style("stroke",r),t.classed("selected",!1)}function g(t,e,n){let r={caller:t,data:e,event:i.EventType.SelectClear},o={caller:t,event:i.EventType.SelectAdd,data:e,selection:n};t.api.select(r),t.api.select(o),t.onClick&&(t.onClick(r),t.onClick(o))}function _(t,e,n){if(t.getScreenCTM&&t.getScreenCTM()){let e=t.getScreenCTM().inverse();return n.matrixTransform(e)}return{x:n.x,y:n.y}}function m(t,e){let n=e.node().getBoundingClientRect(),r=t.node(),i=(e.node(),r.createSVGPoint());i.x=n.left,i.y=n.top;let o=_(r,0,i);i.x=n.right,i.y=n.bottom;let a=_(r,0,i);return{x:o.x,y:o.y,width:a.x-o.x,height:a.y-o.y,right:a.x,bottom:a.y}}e.getStyle=function(t){let e=t.node();return window.getComputedStyle(e)},e.mergeKeys=function(t,e){let n={};for(let e=0;e<t.length;++e)n[t[e]]=!0;for(let r=0;r<e.length;++r)n.hasOwnProperty(e[r])||t.push(e[r])},e.getKeys=function(t,e){let n={},r=[];for(let i=0;i<t.length;++i){let o=e(t[i]);for(let t=0;t<o.length;++t)"string"!=typeof o[t]&&"number"!=typeof o[t]||n.hasOwnProperty(o[t])||(n[o[t]]=!0,r.push(o[t]))}return r},e.focus=h,e.unfocus=f,e.select=d,e.unselect=p,e.onSelectHelper=g,e.addClickHelper=function(t,e,n,r,a,s,u,l,h){let f;t.on("click",(function(t){void 0!==l&&(t=l),r?f=setTimeout((function(){f&&(e.disableSelection||g(u,l,h),n&&n({caller:u,event:i.EventType.Click,data:t}),f=null)}),300):(e.disableSelection||g(u,l,h),n&&n({caller:u,event:i.EventType.Click,data:t}))})),r&&t.on("dblclick",(function(t){void 0!==l&&(t=l),window.clearTimeout(f),f=null,r({caller:u,event:i.EventType.DoubleClick,data:t})})),a&&a.length&&t.on("contextmenu",(function(t){event||(event=c.event),o.showContextMenu(c.event,l,a)}))},e.convertToSVGCoords=m,e.getTextRect=function(t,e){let n=t.append("text").text(e),r=m(t,n);return n.remove(),r},e.animatePath=function(t,e){let n=t.node().getTotalLength();t.attr("stroke-dasharray",n).attr("stroke-dashoffset",n).transition("add").duration(e).attr("stroke-dashoffset",0)};class v{static getAngle(t,e){return 180*Math.atan2(e.y-t.y,e.x-t.x)/Math.PI}static translateArrow(t){return function(e,n,r){return function(e){var n=t.getTotalLength(),r=t.getPointAtLength(e*n),i=t.getPointAtLength(Math.max(n-.01,0)*e),o=t.getPointAtLength((n+.01)*e);return"translate("+r.x+", "+r.y+") rotate( "+v.getAngle(i,o)+")"}}}static createArrow(t,e=4){let n=2*e;return t.append("path").attr("d",`M -${n}, -${e} L0,0 L-${n},${e} z`)}static animateArrow(t,e,n){e.transition().duration(n).attrTween("transform",v.translateArrow(t.node()))}}e.Arrow=v;e.Spinner=class{constructor(t,e){let n=this,r=Math.min(e.width,e.height)/2,i=2*Math.PI;n._svg=t;let o=c.arc().innerRadius(.5*r).outerRadius(.9*r).startAngle(0);n._svg.append("path").classed("spinner",!0).datum({endAngle:.66*i}).style("fill","rgb(0,113,197)").attr("d",o).call((function t(e,r){e.transition().ease(c.easeLinear).duration(r).attrTween("transform",(function(){return c.interpolateString("rotate(0)","rotate(360)")})),setTimeout((function(){n._svg&&t(e,r)}),r)}),1500)}};e.Brush=class{constructor(){let t=this;t._isXY=!1,this.onBrushStart=function(e){if(t._onStartCallback){let e=c.brushSelection(this);t._onStartCallback.call(this,e)}},this.onBrushMove=function(e){if(t._onMoveCallback){let e=c.brushSelection(this);t._onMoveCallback.call(this,e)}},this.onBrushEnd=function(e){if(t._onEndCallback){let e=c.brushSelection(this);t._onEndCallback.call(this,e)}}}moveToFront(){this._brushTargetGraph.each((function(){this.parentNode.appendChild(this)}))}moveToBack(){this._brushTargetGraph.each((function(){let t=this.parentNode.firstChild;t&&this.parentNode.insertBefore(this,t)}))}enableCallbacks(){return this._brush.on("start",this.onBrushStart).on("brush",this.onBrushMove).on("end",this.onBrushEnd),this}disableCallbacks(){return this._brush.on("start",void 0).on("brush",void 0).on("end",void 0),this}brushStart(t){this._brushTargetGraph.call(this._brush.move,null)}brushMove(t){this._brushTargetGraph.call(this._brush.move,t)}brushEnd(){this._brushTargetGraph.call(this._brush.move,null)}setXY(t){return this._isXY=t,this}setTarget(t){return this._brushTargetGraph=t,this}setStartCallback(t){return this._onStartCallback=t,this}setMoveCallback(t){return this._onMoveCallback=t,this}setEndCallback(t){return this._onEndCallback=t,this}setRect(t){return this._rect=t,this}ready(){return this._isXY?this._brush=c.brush().on("start",this.onBrushStart).on("brush",this.onBrushMove).on("end",this.onBrushEnd):this._brush=c.brushX().extent([[0,0],[this._rect.width,this._rect.height]]).on("start",this.onBrushStart).on("brush",this.onBrushMove).on("end",this.onBrushEnd),this._brushTargetGraph.call(this._brush),this}static releaseListeners(t){t.on("brush",null).on("brushend",null).on("brushstart",null)}};e.D3Legend=class{constructor(t,e,n,r){if(this._title=n||"",this._legend=e,this._itemMap={},this._items=[],e.definition){let t=[];for(let n=0;n<e.definition.items.length;++n){let r=e.definition.items[n];t.push({key:r.key,name:r.name?r.name:r.key,color:r.color,shape:this.getShapeString(r.shape),opacity:""})}this.addItems(t)}let o="ordinal";this._legend.definition&&this._legend.definition.type===i.LegendType.Gradient&&(o="gradient"),this._classes=`legend ${o} ${this._title} align-${this._legend.alignment}`,this._legendSvg=t.append("g").classed(this._classes,!0),this.setPosition(r)}getShapeString(t){if("string"==typeof t)return t;switch(t){case i.LegendItemShape.Rectangle:return"rect";case i.LegendItemShape.Line:return"line";case i.LegendItemShape.Circle:return"circle"}}setPosition(t){this._position=t}getPosition(){return this._position}setItems(t){this._items=[],this._itemMap={},this.addItems(t)}addItems(t){for(let e=0;e<t.length;++e){let n=t[e];this._itemMap.hasOwnProperty(n.key)?(this._itemMap[n.key].color=n.color,this._itemMap[n.key].opacity=n.opacity):(n.name||(n.name=n.key,this._legend.showValue&&void 0!==n.value&&(n.name+=": "+n.value,void 0!==n.units&&(n.name+=n.units))),this._itemMap[n.key]=n,this._items.push(n))}}getAlignment(){return this._legend.alignment}getRenderedRect(){return this._renderedRect}getRows(){return this._legend.orientation===i.LegendOrientation.Vertical?this._items.length:this._legendSvg.selectAll(".legendCells").size()}renderDiscreteLegend(t){let e=[],n=[];for(let t=0;t<this._items.length;++t){this._items[t].name;let r=this._items[t].color,i=this._items[t].opacity;i&&r.startsWith("rgb")&&(r="rgba"+r.substr(3,r.length-4)+" , "+i+")"),e.push(this._items[t].name),n.push(r)}let r=2,a=0,u=this,l=function(e,n,a){let l=c.scaleOrdinal().domain(n).range(a),h=s.legendColor();h.on("cellover",(function(t){this.setAttribute("title",t)})).orient(t).labelPosition("right").shape("rect").shapeWidth(10).shapeHeight(10).shapePadding(r).scale(l),u._legend.onClick&&h.on("cellclick",(function(t){u._legend.onClick({event:i.EventType.Click,data:t})})),u._legend.contextMenuItems&&h.on("cellcontextmenu",(function(t){o.showContextMenu(c.event,t,u._legend.contextMenuItems)})),e.call(h)};l(this._legendSvg,e,n);let h=this._position.x;if((this._legend.alignment===i.Alignment.Top||this._legend.alignment===i.Alignment.Bottom)&&this._legend.orientation!==i.LegendOrientation.Vertical){r=0;this._legendSvg.select(".legendCells").selectAll(".cell").each((function(){let t=this.getBBox();r=Math.max(r,t.width)}));a=r+10,this._legendSvg.selectAll("*").remove();let t=Math.max(1,Math.min(e.length,Math.floor(this._position.width/a)));Math.ceil(e.length/t),h=this._position.x+this._position.width/2-a*t/2;let i=0;for(let r=0;r<e.length;r+=t){let o=this._legendSvg.append("g").classed(this._classes,!0);l(o,e.slice(r,r+t),n.slice(r,r+t)),i&&o.attr("transform","translate(0,"+i+")"),i+=o.node().getBoundingClientRect().height}}h=Math.max(0,h),this._legendSvg.attr("transform","translate("+h+","+this._position.y+")")}renderGradientLegend(){this._legendSvg.selectAll("*").remove();let t=this._legend.definition.items,e=r.getSelectionName(`${this._title}align-${this._legend.alignment}`),n=this._legendSvg.append("linearGradient").attr("id",e).attr("x1","0%").attr("y1","0%");t.forEach(t=>{n.append("stop").attr("offset",`${t.key}%`).attr("style",`stop-color:${t.color};stop-opacity:${t.opacity}`)});let o,a=c.scaleLinear().domain(c.extent(t,t=>Number(t.key))),s=this._legendSvg.append("rect"),u=this._legendSvg.append("g");switch(this._legend.alignment){case i.Alignment.Left:n.attr("x2","0%").attr("y2","100%"),s.attr("x",30).attr("width",40).attr("y",0).attr("height",this._position.height),a.range([0,this._position.height]),u.attr("transform","translate(30, 0)"),o=c.axisLeft(a);break;case i.Alignment.Right:n.attr("x2","0%").attr("y2","100%"),s.attr("x",5).attr("width",40).attr("y",0).attr("height",this._position.height),a.range([0,this._position.height]),u.attr("transform","translate(45, 0)"),o=c.axisRight(a);break;case i.Alignment.Top:n.attr("x2","100%").attr("y2","0%"),s.attr("x",0).attr("width",this._position.width).attr("y",10).attr("height",40),a.range([0,this._position.width]),u.attr("transform","translate(0, 10)"),o=c.axisTop(a);break;case i.Alignment.Bottom:n.attr("x2","100%").attr("y2","0%"),s.attr("x",0).attr("width",this._position.width).attr("y",5).attr("height",40),a.range([0,this._position.width]),u.attr("transform","translate(0, 45)"),o=c.axisBottom(a)}s.attr("fill",`url(#${e})`),u.call(o),this._legendSvg.attr("transform","translate("+this._position.x+","+this._position.y+")")}render(){let t;if(t=this._legend.orientation===i.LegendOrientation.Vertical?"vertical":this._legend.orientation===i.LegendOrientation.Horizontal?"horizontal":this._legend.alignment===i.Alignment.Left||this._legend.alignment===i.Alignment.Right?"vertical":"horizontal",this._legendSvg.selectAll("*").remove(),this._legend.definition&&this._legend.definition.type&&this._legend.definition.type===i.LegendType.Gradient){this.renderGradientLegend();let t=this._legendSvg.node().getBoundingClientRect();this._renderedRect=new i.Rect(t.left,t.top,t.right-t.left+40,t.bottom-t.top)}else{this.renderDiscreteLegend(t);let e=this._legendSvg.node().getBoundingClientRect();this._renderedRect=new i.Rect(e.left,e.top,e.right-e.left,e.bottom-e.top)}}};class y extends u.UIElementRenderer{constructor(){super(),this.MIN_MARGIN={TOP:0,BOTTOM:10,LEFT:0,RIGHT:10},this.LEGEND_PADDING={X:10,Y:{TOP:10,BOTTOM:10}},this.AXIS_PADDING={X:10,Y:{TOP:10,BOTTOM:10}},this._fillColors=new WeakMap,this._strokeColors=new WeakMap;let t=this;this._options={},this._minSvgWidth=0,this._maxGraphWidth=Number.MAX_VALUE,this._maxSvgWidth=Number.MAX_VALUE,this._interactionState=new a.InteractionState((function(e){t._focus(e)}),(function(e){t._unfocus(e)}),!1,(function(e){t._select(e)}),(function(e){t._unselect(e)}))}cursorChange(t){}zoom(t){}brush(t){}render(t){}configureTooltip(){}createLayout(){}setColorManager(t){this._colorMgr=t}initialize(t,e,n){this._element=t,this._renderer=e,this._tooltipId="d3-tooltip",this._tooltipAnalyticsName="d3-ui-widget-toolkit",this._parent=n;let r=n.node();r&&(this._options.width||(this._options.width=r.getBoundingClientRect().width),this._svgRect=new i.Rect(0,0,this._options.width,0),this._svg=n.append("svg")),this._handleWidth=10,this._graphRect=new i.Rect(0,0,0,this.DEFAULT_GRAPH_HEIGHT),this._requiresRelayout=!0}loadOptions(t){void 0!==t&&(t.width&&t.width!==this._options.width&&(this._requiresRelayout=!0),t.height&&t.height!==this._options.height&&(this._requiresRelayout=!0),t.topMargin&&t.topMargin!==this._options.topMargin&&(this._requiresRelayout=!0),t.bottomMargin&&t.bottomMargin!==this._options.bottomMargin&&(this._requiresRelayout=!0),t.leftMargin&&t.leftMargin!==this._options.leftMargin&&(this._requiresRelayout=!0),t.rightMargin&&t.rightMargin!==this._options.rightMargin&&(this._requiresRelayout=!0),r.merge(this._options,t))}getElement(){return this._element}getOptions(){return this._options}getAnimateDuration(){return void 0!==this._options.animateDuration?this._options.animateDuration:1e3}getRenderedCss(){return new i.Css}getTooltipData(t){return[{source:this._element,group:"",metrics:{}}]}hover(t){this.focus(t)}focus(t){this._interactionState.focus(t)}select(t){this._interactionState.select(t)}_focus(t){let e=this;t&&e._svg.selectAll("."+t).each((function(){h(c.select(this),e._fillColors,e._strokeColors)}))}_unfocus(t){let e=this;t.length>0&&e._svg.selectAll("."+t).each((function(){f(c.select(this),e._fillColors,e._strokeColors)}))}_select(t){let e=this;t&&e._svg.selectAll("."+t).each((function(){d(c.select(this),e._fillColors,e._strokeColors)}))}_unselect(t){let e=this;t.length>0&&e._svg.selectAll("."+t).each((function(){p(c.select(this),e._fillColors,e._strokeColors)}))}invalidate(t){this.loadOptions(t),this.createLayout(),t.disableResize||this.createHandles(),this.configureTooltip(),this.render(t)}updateHandles(){this._svg.select(".chart-handle.bottom").attr("x",this._graphRect.x).attr("y",this._graphRect.y+this._graphRect.height).attr("width",this._graphRect.width),this._svg.select(".chart-handle.left").attr("x",this._graphRect.x-this._handleWidth-1).attr("y",this._graphRect.y).attr("height",this._graphRect.height),this._svg.select(".chart-handle.right").attr("x",this._graphRect.x+this._graphRect.width+1).attr("y",this._graphRect.y).attr("height",this._graphRect.height)}createHandles(){let t=this;t._options.disableResizeLeft||t._svg.append("rect").attr("opacity",0).attr("width",t._handleWidth).attr("cursor","ew-resize").classed("chart-handle vertical left",!0).call(c.drag().on("start",(function(){y.IS_RESIZING=!0})).on("drag",(function(){if(0===c.event.dx)return;let e=Math.min(t._options.leftMargin+t._graphRect.width,Math.max(t.MIN_MARGIN.LEFT,t._options.leftMargin+c.event.dx)),n={width:t._svg.node().getBoundingClientRect().width,leftMargin:e,xStart:t._options.xStart,xEnd:t._options.xEnd,animateDuration:0};t._element.handleUpdate?t._element.handleUpdate(t._element,n):t.render(n)})).on("end",(function(){y.IS_RESIZING=!1}))),t._options.disableResizeRight||t._svg.append("rect").attr("opacity",0).attr("width",t._handleWidth).attr("cursor","ew-resize").classed("chart-handle vertical right",!0).call(c.drag().on("start",(function(){y.IS_RESIZING=!0})).on("drag",(function(){if(0===c.event.dx)return;t._svg.node();let e=t._options.width+c.event.dx;e=Math.max(t._minSvgWidth,e),e=Math.min(t._maxSvgWidth,e);let n={width:e,xStart:t._options.xStart,xEnd:t._options.xEnd,animateDuration:0};t._element.handleUpdate?t._element.handleUpdate(t._element,n):t.render(n)})).on("end",(function(){y.IS_RESIZING=!1})))}createImage(){let t=this;return new Promise((function(e,n){let r=t._svg,i=Number(r.attr("width")),o=Number(r.attr("height")),a=function(t){t.setAttribute("xlink","http://www.w3.org/1999/xlink"),function(t,e){let n=document.createElement("style");n.setAttribute("type","text/css"),n.innerHTML=t;let r=e.hasChildNodes()?e.children[0]:null;e.insertBefore(n,r)}(function(t){let e=[];e.push("#"+t.id);for(let n=0;n<t.classList.length;n++)i("."+t.classList[n],e)||e.push("."+t.classList[n]);let n=t.getElementsByTagName("*");for(let t=0;t<n.length;t++){let r=n[t].id;i("#"+r,e)||e.push("#"+r);let o=n[t].classList;for(let t=0;t<o.length;t++)i("."+o[t],e)||e.push("."+o[t])}let r="";for(let t=0;t<document.styleSheets.length;t++){let n=document.styleSheets[t];try{if(!n.cssRules)continue}catch(t){if("SecurityError"!==t.name)throw t;continue}let o=n.cssRules;for(let t=0;t<o.length;t++)i(o[t].selectorText,e)&&(r+=o[t].cssText)}return r;function i(t,e){return-1!==e.indexOf(t)}}(t),t);let e=(new XMLSerializer).serializeToString(t);return e=e.replace(/(\w+)?:?xlink=/g,"xmlns:xlink="),e=e.replace(/NS\d+:href/g,"xlink:href"),e}(r.node()),s="data:image/svg+xml;base64,"+btoa(a),u=new Image;u.src=s,u.onload=function(){let t=document.createElement("canvas");t.height=o,t.width=i,t.getContext("2d").drawImage(u,0,0,i,o);let n=t.toDataURL("image/png");e({image:n,type:"image/png",height:o,width:i})}}))}saveImage(){this.createImage().then((function(t){let e=`<img src="${t.image}" height="${t.height}" width="${t.width}">`;c.select("#pngdataurl").html(e);let n=document.createElement("a");n.download="chart.png",n.href=t.image,n.click()}))}}e.SVGRenderer=y},function(t,e){var n=Array.isArray;t.exports=n},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(1),i=n(22),o=n(3);let a,s={};"undefined"!=typeof document&&(a=document.createElement("canvas").getContext("2d")),e.getTextWidth=function(t,e,n){return a.font=n+"px "+e,a.measureText(t).width};e.UIElementRenderer=class{getOptions(){return this._options}getColorManager(){return this._colorMgr}setColorManager(t){this._colorMgr=t}};class u{constructor(t,e=new i.ColorManager){t&&(this._parentId=t,this._parent=o.select("body").select(t)),e&&(this._colorMgr=e),this._rendererMap=new WeakMap}static register(t,e){s[t]=e}setOnRenderCallback(t){this.onRender=t}clearDiv(t){if(t)for(;t.firstChild;)t.removeChild(t.firstChild)}setDiv(t){this._parent=o.select(t)}getRenderedCss(t){return this._rendererMap.has(t)?this._rendererMap.get(t).getRenderedCss():new r.Css}hover(t,e){this.focus(t,e)}focus(t,e){if(this._rendererMap.has(t))return this._rendererMap.get(t).focus||this._rendererMap.get(t).hover(e),this._rendererMap.get(t).focus(e)}select(t,e){this._rendererMap.has(t)&&this._rendererMap.get(t).select(e)}zoom(t,e){this._rendererMap.has(t)&&this._rendererMap.get(t).zoom(e)}getTooltipData(t,e){return this._rendererMap.has(t)?this._rendererMap.get(t).getTooltipData(e):[{source:t,group:"",metrics:{}}]}cursorChange(t,e){if(this._rendererMap.has(t))return this._rendererMap.get(t).cursorChange(e)}brush(t,e){if(this._rendererMap.has(t))return this._rendererMap.get(t).brush(e)}configureElement(t){if(t.renderer=this,!this._rendererMap.has(t)){this._parent.node()||(this._parent=o.select(this._parentId));let e=s[t.type];if(e){let n=new e(t,this,this._parent);n.setColorManager(this._colorMgr),this._rendererMap.set(t,n)}}}render(t,e={}){t.renderer=this,this.configureElement(t),this._rendererMap.has(t)&&(this._rendererMap.get(t).render(e),t.onRender&&t.onRender(e),this.onRender&&this.onRender(t,e))}invalidate(t,e={}){t.renderer=this,this.configureElement(t),this._rendererMap.has(t)&&(this._rendererMap.get(t).invalidate(e),t.onRender&&t.onRender(e),this.onRender&&this.onRender(t,e))}setColorManager(t){this._colorMgr=t}getColorManager(){return this._colorMgr}destroy(t){this._rendererMap.delete(t)}getOptions(t){if(this._rendererMap.has(t))return this._rendererMap.get(t).getOptions()}}e.D3Renderer=u,e.D3ChartRenderer=u,e.D3GraphRenderer=u},function(t,e){var n=Array.isArray;t.exports=n},function(t,e,n){"use strict";var r=n(4),i=n(13).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})))}t.exports={addDummyNode:o,simplify:function(t){var e=(new i).setGraph(t.graph());return r.forEach(t.nodes(),(function(n){e.setNode(n,t.node(n))})),r.forEach(t.edges(),(function(n){var r=e.edge(n.v,n.w)||{weight:0,minlen:1},i=t.edge(n);e.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})})),e},asNonCompoundGraph:function(t){var e=new i({multigraph:t.isMultigraph()}).setGraph(t.graph());return r.forEach(t.nodes(),(function(n){t.children(n).length||e.setNode(n,t.node(n))})),r.forEach(t.edges(),(function(n){e.setEdge(n,t.edge(n))})),e},successorWeights:function(t){var e=r.map(t.nodes(),(function(e){var n={};return r.forEach(t.outEdges(e),(function(e){n[e.w]=(n[e.w]||0)+t.edge(e).weight})),n}));return r.zipObject(t.nodes(),e)},predecessorWeights:function(t){var e=r.map(t.nodes(),(function(e){var n={};return r.forEach(t.inEdges(e),(function(e){n[e.v]=(n[e.v]||0)+t.edge(e).weight})),n}));return r.zipObject(t.nodes(),e)},intersectRect:function(t,e){var n,r,i=t.x,o=t.y,a=e.x-i,s=e.y-o,u=t.width/2,c=t.height/2;if(!a&&!s)throw new Error("Not possible to find intersection inside of the rectangle");Math.abs(s)*u>Math.abs(a)*c?(s<0&&(c=-c),n=c*a/s,r=c):(a<0&&(u=-u),n=u,r=u*s/a);return{x:i+n,y:o+r}},buildLayerMatrix:function(t){var e=r.map(r.range(a(t)+1),(function(){return[]}));return r.forEach(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.forEach(t.nodes(),(function(n){var i=t.node(n);r.has(i,"rank")&&(i.rank-=e)}))},removeEmptyRanks:function(t){var e=r.min(r.map(t.nodes(),(function(e){return t.node(e).rank}))),n=[];r.forEach(t.nodes(),(function(r){var i=t.node(r).rank-e;n[i]||(n[i]=[]),n[i].push(r)}));var i=0,o=t.graph().nodeRankFactor;r.forEach(n,(function(e,n){r.isUndefined(e)&&n%o!=0?--i:i&&r.forEach(e,(function(e){t.node(e).rank+=i}))}))},addBorderNode:function(t,e,n,r){var i={width:0,height:0};arguments.length>=4&&(i.rank=n,i.order=r);return o(t,"border",i,e)},maxRank:a,partition:function(t,e){var n={lhs:[],rhs:[]};return r.forEach(t,(function(t){e(t)?n.lhs.push(t):n.rhs.push(t)})),n},time:function(t,e){var n=r.now();try{return e()}finally{console.log(t+" time: "+(r.now()-n)+"ms")}},notime:function(t,e){return e()}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(1),i=n(82),o=n(11),a=n(2),s=n(5),u=n(7),c=n(51),l=n(19),h=n(23),f=n(86),d=n(3);function p(t,e){return Math.floor(Math.min(Math.max(t,0),e))}e.getBoundedPixelValue=p;class g{static finalize(t){let e,n;c.addCallbacks(t),t.axes||(t.axes=[]);for(let n=0;n<t.axes.length;++n)if(t.axes[n].alignment===r.Alignment.Bottom||t.axes[n].alignment===r.Alignment.Top){e=n;break}if(void 0===e){let n={type:r.UIType.Axis,axisDesc:{scaleType:i.AxisType.Linear,label:"Values1",scalingInfo:new f.ScalingInfo(1,"")},alignment:r.Alignment.Bottom};e=t.axes.length,t.axes.push(n)}for(let e=0;e<t.axes.length;++e)if(t.axes[e].alignment===r.Alignment.Left||t.axes[e].alignment===r.Alignment.Right){n=e;break}if(void 0===n){let e={type:r.UIType.Axis,axisDesc:{scaleType:i.AxisType.Linear,label:"",scalingInfo:new f.ScalingInfo(1,"")},alignment:r.Alignment.Left};n=t.axes.length,t.axes.push(e)}let o=t.dataSets;for(let t=0;t<o.length;++t){let r=o[t];r.xAxisIdx&&-1!==r.xAxisIdx||(r.xAxisIdx=e),r.yAxisIdx&&-1!==r.yAxisIdx||(r.yAxisIdx=n)}return!0}static mergeCharts(t,e,n,i){if(n.isXContinuous!==i.isXContinuous)throw"Merge chart error - charts mix ordinal and continuous axes";let o={type:r.UIType.Cartesian,category:t,title:e,dataSets:n.dataSets.concat(i.dataSets),axes:n.axes,isXContinuous:n.isXContinuous};return g.finalize(o),o}}e.Chart=g;e.ChartGroup=class{static handleChartUpdate(t,e,n,i){if(t){let o=[],a=[];if(i)for(let t=0;t<i.length;++t){let e=i[t];e.alignment===r.Alignment.Top?o.push(e):e.alignment===r.Alignment.Bottom&&a.push(e)}n.elemManager||(n.elemManager=new c.ElementManager),e.length=0;for(let i=0;i<t.length;++i){let o=t[i];g.finalize(o);for(let e=0;e<o.axes.length;++e)o.axes[e].alignment===r.Alignment.Bottom&&(i!==t.length-1?o.axes[e].hidden=!0:o.axes[e].hidden=!1);if(o.legends)for(let t=0;t<o.legends.length;++t){let e=o.legends[t];e.alignment!==r.Alignment.Top&&e.alignment!==r.Alignment.Bottom||o.legends.splice(t,1)}e[i]=n.sharedOptions,o.manager||n.elemManager.addElement(o,void 0,"default","default")}if(t.length>0){let r=t.length-1;e[r]=n.bottomOptions,o.length>0&&(t[0].legends||(t[0].legends=[]),t[0].legends=t[0].legends.concat(o)),a.length>0&&(t[r].legends||(t[r].legends=[]),t[r].legends=t[r].legends.concat(a))}}}static handleRenderOptionsUpdate(t,e,n){if(t.sharedOptions=a.copy(e),t.sharedOptions.topMargin=1,t.sharedOptions.bottomMargin=1,t.sharedOptions.disableAutoResizeWidth=!0,t.bottomOptions=a.copy(e),t.bottomOptions.topMargin=1,t.bottomOptions.bottomMargin=15,t.bottomOptions.disableAutoResizeWidth=!0,n&&0!==n.length){let e=n.length-1;for(let r=0;r<e;++r)n[r]=t.sharedOptions;n[e]=t.bottomOptions}}static handleRemoveChart(t){t.renderer&&t.renderer.destroy(t),t.manager&&t.manager.removeElement(t)}};class _{constructor(t,e,n,i){if(this._title=e,this._position=i,this._className=a.getSelectionName(n),this._title&&this._title.length>0){this._titleSvg=t.append("text").classed(this._className,!0).text(this._title);let e=this._titleSvg.node().getBoundingClientRect();this._renderedRect=new r.Rect(e.left,e.top,e.width,e.height)}}getPosition(){return this._position}setPosition(t){this._position=t}getRenderedRect(){return this._renderedRect}render(){if(this._titleSvg){let t=this._position.x,e=this._position.y+this._position.height/2;this._titleSvg.attr("transform","translate("+t+","+e+")");let n=this._titleSvg.node().getBoundingClientRect();this._renderedRect=new r.Rect(n.left,n.top,n.width,n.height)}}}class m extends s.SVGRenderer{constructor(t,e,n){super(),this._ignoreZoomHack=!1,this._handleWidth=10,this._hasBottomHandle=!0,this.DEFAULT_GRAPH_HEIGHT=120,this._options.height=this.DEFAULT_GRAPH_HEIGHT,this._options.topMargin=0,this._options.bottomMargin=0,this._minGraphHeight=0,this._xMin=Number.MAX_VALUE,this._xMax=-Number.MAX_VALUE,this._zoomMenuItem={title:"Zoom",submenu:[]},this.initialize(t,e,n),this._requiresRelayout=!0,this._brushTooltip=new h.OneLineTooltip("brush","tooltip-t"),this._brushTooltip.setPlaceTooltipLeftRight().alwaysRecalcWidth(!0).setDelay(0);let i,o=this;function u(t){let e=p(d.mouse(o.getGraphGroup().node())[0],o._graphRect.width),n=o._scaleAxis.mapCoordinateToValue(e);if(o._scaleAxis.isBanded()){let e=a.getSelectionName(n);t.event===r.EventType.CursorEnd&&void 0!==i?(o.onHover({caller:o._element,event:r.EventType.HoverEnd,selection:i}),i=void 0):e!==i&&(i&&o.onHover({caller:o._element,event:r.EventType.HoverEnd,selection:i}),o.onHover({caller:o._element,event:r.EventType.HoverStart,selection:e}),i=e)}else t.xEnd=n,function(t){if(!s.SVGRenderer.IS_RESIZING)o.cursorChange(t),o._element.onCursorChanged&&o._element.onCursorChanged(t)}(t);return!0}this.onHover=function(t){if(!s.SVGRenderer.IS_RESIZING)return o.focus(t),o._element.onHover&&o._element.onHover(t),!0},this.cursorEnter=function(){return u({caller:o._element,event:r.EventType.CursorStart})},this.cursorMove=function(){return u({caller:o._element,event:r.EventType.CursorMove})},this.cursorExit=function(){return u({caller:o._element,event:r.EventType.CursorEnd})},this._element.api||(this._element.api={}),this._element.api.getOptions=function(){return o.getOptions()}}getContextMenuItems(){return this._contextMenuItems}getTooltip(){return this._dataTooltip}getTitle(){return this._element.title}getRenderer(){return this._renderer}contextMenu(t,e){let n=this;var r;return"function"==typeof e?r=e:(r=(e=e||{}).onOpen,e.onClose),function(e,i){n._element.brushContextMenuItems&&n._brush&&n._brush.brushEnd(),r&&r();let o=d.mouse(n.getGraphGroup().node()),a=p(o[0],n._graphRect.width),s=o[1],u=n._scaleAxis.mapCoordinateToValue(a);if(n._axes[1]){let e=n._axes[1].mapCoordinateToValue(s);l.showContextMenu(d.event,{x:u,y:e},t)}else l.showContextMenu(d.event,{x:u},t)}}cursorChange(t){if(!this._options.disableHover)switch(t.event){case r.EventType.CursorStart:this._hoverLine&&this._hoverLine.style("display","");break;case r.EventType.CursorMove:this.updateHover(t);break;case r.EventType.CursorEnd:this._hoverLine&&this._hoverLine.style("display","none")}}onZoomChanged(t){this.zoom(t);let e=this._element;e.onZoom&&e.onZoom(t)}updateZoomHelper(t,e,n,r,i){let o=(this._defaultXScale(this._defaultXScale.domain()[1])-this._defaultXScale(this._defaultXScale.domain()[0]))/(this._defaultXScale(n)-this._defaultXScale(e)),a=-this._defaultXScale(e)*o;if(t.call(d.zoom().transform,d.zoomIdentity.translate(a,0).scale(o)),this._options.enableXYZoom){let e=(this._defaultYScale(this._defaultYScale.domain()[1])-this._defaultYScale(this._defaultYScale.domain()[0]))/(this._defaultYScale(i)-this._defaultYScale(r)),n=-this._defaultYScale(r)*e;t.call(d.zoom().transform,d.zoomIdentity.translate(0,n).scale(e))}}updateZoom(t,e,n,r){this._ignoreZoomHack||this.updateZoomHelper(this.getGraphGroup(),t,e,n,r)}zoom(t){if(t.event!==r.EventType.Zoom&&t.event!==r.EventType.RangeUpdate)throw"Error passing a non zoom event to zoom function";if(!this._scaleAxis.isBanded())if(t.event===r.EventType.RangeUpdate)void 0===t.xStart&&void 0===t.xEnd?(this._xMin=this._xMinLimit,this._xMax=this._xMaxLimit):(this._xMin=t.xStart?t.xStart:this._xMinLimit,this._xMax=t.xEnd?t.xEnd:this._xMaxLimit),this._scaleAxis.setDomain([this._xMin,this._xMax]),this.zoom({event:r.EventType.Zoom,xStart:this._options.xStart,xEnd:this._options.xEnd});else if(t.event===r.EventType.Zoom){if(this._options.disableZoomViewUpdate){let e=this._scaleAxis.getScale();if(this._brush.disableCallbacks(),this._options.enableXYZoom){let n=this._axes[1].getScale();this._brush.brushMove([[e(t.xStart),n(t.yStart)],[e(t.xEnd),n(t.yEnd)]])}else this._brush.brushMove([e(t.xStart),e(t.xEnd)]);this._brush.enableCallbacks()}else t.xStart=t.xStart<this._xMin?this._xMin:t.xStart,t.xEnd=t.xEnd>this._xMax?this._xMax:t.xEnd,this.updateZoom(t.xStart,t.xEnd,t.yStart,t.yEnd),this.render(t);this._options.xStart=t.xStart,this._options.xEnd=t.xEnd,this._options.yStart=t.yStart,this._options.yEnd=t.yEnd}}brush(t){let e;if(this._options.enableXYZoom){let n=this._axes[1],r=this._scaleAxis.getScale()(t.xStart),i=this._scaleAxis.getScale()(t.xEnd);e=[[r,t.yStart?n.getScale()(t.yStart):0],[i,t.yEnd?n.getScale()(t.yEnd):n.getRangePixels()]]}else{e=[this._scaleAxis.getScale()(t.xStart),this._scaleAxis.getScale()(t.xEnd)]}if(this._brush)switch(t.event){case r.EventType.BrushStart:t.caller!==this._element&&(this._brush.disableCallbacks(),this._brush.brushStart(e),this._brush.enableCallbacks()),this._brush.moveToFront();break;case r.EventType.BrushMove:t.caller!==this._element&&(this._brush.disableCallbacks(),this._brush.brushMove(e),this._brush.enableCallbacks());break;case r.EventType.BrushEnd:this._options.showSelectionAsOverlay||(this._options.forceBrushToFront||this._brush.moveToBack(),this._brush.disableCallbacks(),this._brush.brushEnd(),this._brush.enableCallbacks())}}getGraphGroup(){return this._svg.select(".graphGroup")}getTooltipData(t){let e=this._element,n=[],r={};for(let i=0;i<e.dataSets.length;++i){let o=e.dataSets[i],a=this._seriesMap.get(o);if(a){let e=a.getTooltipMetrics(this._element,t);for(let t=0;t<e.length;++t){let i=e[t];if(r.hasOwnProperty(i.group)){let t=r[i.group];for(let e in i.metrics)t.metrics[e]=i.metrics[e]}else r[i.group]=i,n.push(i)}}}return n}populateTooltip(t,e){let n,r=this._element,i=r.title?r.title:"",o=this._scaleAxis.mapCoordinateToValue(t),a=0,s=0;if(this._axes[1]&&(a=this._axes[1].mapCoordinateToValue(e),s=this._axes[1].mapCoordinateToValue(e-1)),this._scaleAxis.isBanded()){if(void 0===o)return;i+=" for "+o}else if(n=this._scaleAxis.mapCoordinateToValue(t-1),this._scaleAxis.getAxis().options&&this._scaleAxis.getAxis().options.tickMappingFunc)i+=" at "+this._scaleAxis.getAxis().options.tickMappingFunc(o)+this._scaleAxis.getAxis().axisDesc.scalingInfo.baseScale.units;else{let t=this._scaleAxis.getScale().domain(),e=f.getScalar(this._scaleAxis.getAxis().axisDesc.scalingInfo,t[1]-t[0]);i+=" at "+(o*e.scalar).toLocaleString()+e.units}let u=[];if(u=this._scaleAxis.isBanded()?this.getTooltipData({selection:o}):this.getTooltipData({xEnd:o}),r.onTooltip){let t={tooltip:this._dataTooltip,defaultData:u};this._dataTooltip.setData(i,[]),this._scaleAxis.isBanded()?r.onTooltip({caller:this._element,selection:o,data:t,defaultTitle:i,defaultClass:this}):r.onTooltip({caller:this._element,xStart:n,xEnd:o,yStart:a,yEnd:s,data:t,defaultTitle:i,defaultClass:this})}else this._dataTooltip.setData(i,u)}configureZoomHelper(t){let e=this;if(!(e._scaleAxis.isBanded()||(e._defaultXScale=e._scaleAxis.getScale().copy(),this._options.disableZoomViewUpdate||e._options.disableZoomMouseWheel||this._options.enableXYZoom))){let n=function(){let t=d.event.transform.rescaleX(e._defaultXScale),n={event:r.EventType.Zoom,xStart:t.domain()[0],xEnd:t.domain()[1],caller:e._element};e._ignoreZoomHack=!0,e.onZoomChanged(n),e._ignoreZoomHack=!1};e._zoom=d.zoom().scaleExtent([1,Number.MAX_SAFE_INTEGER]).on("zoom",n),t.call(e._zoom)}}configureZoom(){this.configureZoomHelper(this.getGraphGroup())}configureBrushHelper(t){let e=this,n=e._axes[1];function i(t){return e._options.enableXYZoom?t[0][0]:t[0]}function o(t){return e._options.enableXYZoom?t[1][0]:t[1]}function a(t){return e._options.enableXYZoom?t[0][1]:void 0}function u(t){return e._options.enableXYZoom?t[1][1]:void 0}function c(t,r){let s=e._element,c={event:r,caller:s};return t&&(c.xStart=e._scaleAxis.mapCoordinateToValue(i(t)),c.xEnd=e._scaleAxis.mapCoordinateToValue(o(t)),n&&(c.yStart=n.mapCoordinateToValue(a(t)),c.yEnd=n.mapCoordinateToValue(u(t)))),e.brush(c),s.onBrush&&s.onBrush(c),null!==t}let h=function(t){if(null!==t)if(e._options.enableXYZoom&&!n.isBanded())if(e._scaleAxis.getAxis().options&&e._scaleAxis.getAxis().options.tickMappingFunc){let r=e._scaleAxis.getAxis().options.tickMappingFunc;e._brushTooltip.setData("Selection","("+r(e._scaleAxis.mapCoordinateToValue(i(t)))+", "+n.mapCoordinateToValue(a(t))+") - ("+r(e._scaleAxis.mapCoordinateToValue(o(t)))+", "+n.mapCoordinateToValue(u(t))+")")}else{let r=e._scaleAxis.getScale().domain(),s=f.getScalar(e._scaleAxis.getAxis().axisDesc.scalingInfo,r[1]-r[0]),c=e._scaleAxis.mapCoordinateToValue(i(t)),l=e._scaleAxis.mapCoordinateToValue(o(t)),h=n.mapCoordinateToValue(a(t)),d=n.mapCoordinateToValue(u(t));e._brushTooltip.setData("Selection","("+(c*s.scalar).toLocaleString()+s.units+", "+h.toLocaleString()+") - ("+(l*s.scalar).toLocaleString()+s.units+", "+d.toLocaleString()+")")}else if(e._scaleAxis.getAxis().options&&e._scaleAxis.getAxis().options.tickMappingFunc){let n=e._scaleAxis.getAxis().options.tickMappingFunc;e._brushTooltip.setData("Selection",n(e._scaleAxis.mapCoordinateToValue(i(t)))+" - "+n(e._scaleAxis.mapCoordinateToValue(o(t))))}else{let n=e._scaleAxis.getScale().domain(),r=f.getScalar(e._scaleAxis.getAxis().axisDesc.scalingInfo,n[1]-n[0]),a=e._scaleAxis.mapCoordinateToValue(i(t)),s=e._scaleAxis.mapCoordinateToValue(o(t));e._brushTooltip.setData("Selection",(a*r.scalar).toLocaleString()+r.units+" - "+(s*r.scalar).toLocaleString()+r.units+" = "+((s-a)*r.scalar).toLocaleString()+r.units)}},p=function(t,r){let s={event:t,xStart:e._scaleAxis.mapCoordinateToValue(i(r)),xEnd:e._scaleAxis.mapCoordinateToValue(o(r)),caller:e._element};return n&&(s.yStart=n.mapCoordinateToValue(a(r)),s.yEnd=n.mapCoordinateToValue(u(r))),s},g=function(t){return e._brush.moveToFront(),h(t),e._dataTooltip.onMouseLeave(d.event),e._brushTooltip.onMouseEnter(d.event),e._brushTooltip.onMouseMove(d.event),c(t,r.EventType.BrushStart)},_=function(t){return h(t),e._dataTooltip.onMouseLeave(d.event),e._brushTooltip.onMouseMove(d.event),e._options.disableZoomViewUpdate?(c(t,r.EventType.BrushMove)&&e.onZoomChanged(p(r.EventType.Zoom,t)),!0):c(t,r.EventType.BrushMove)},m=function(t){e._brushTooltip.onMouseLeave(d.event);let n=e._element.brushContextMenuItems;if(t&&n){let i=[];e._scaleAxis.isBanded()||i.push({title:"Zoom",action(n,i,o){e.onZoomChanged({event:r.EventType.Zoom,xStart:i.xStart,xEnd:i.xEnd,caller:i.caller}),c(t,r.EventType.BrushEnd)}});for(let e=0;e<n.length;++e){let o=n[e];i.push({title:o.title,action(e,n,i){o.action(e,n,i),c(t,r.EventType.BrushEnd)}})}l.showContextMenu(d.event.sourceEvent,p(r.EventType.BrushEnd,t),i)}else if(c(t,r.EventType.BrushEnd)&&!e._scaleAxis.isBanded())e.onZoomChanged(p(r.EventType.Zoom,t));else{let t=document.getElementsByClassName("context-menu");t.length>0&&(t[0].style.display="none")}return e._options.showSelectionAsOverlay&&(e._options.forceBrushToFront||e._brush.moveToBack()),!0},v=e._scaleAxis.getAxis().options&&e._scaleAxis.getAxis().options.enableOrdinalBrushSelection;e._scaleAxis.isBanded()&&!v||(t.select(".brush").remove(),e._brush=(new s.Brush).setXY(e._options.enableXYZoom).setTarget(t.append("g").attr("class","brush")).setStartCallback(g).setMoveCallback(_).setEndCallback(m).setRect(new r.Rect(0,0,e._graphRect.width,e._svgRect.height)).ready(),e._brush.moveToBack())}configureBrush(){this.configureBrushHelper(this.getGraphGroup())}configureContextMenu(){this.getGraphGroup().on("contextmenu",this.contextMenu(this._contextMenuItems,this._dataTooltip?this._dataTooltip.onMouseLeave:void 0))}configureTooltip(){let t=this;return this._dataTooltip=new h.CustomDivTooltip(t._tooltipId,"tooltip-t"),this._dataTooltip.setTarget(t.getGraphGroup()).setTarget(t._bottomHandle).setAnalyticsName(t._tooltipAnalyticsName).setPlaceTooltipLeftRight().alwaysRecalcWidth(!0).setDelay(t._options.tooltipDelay?t._options.tooltipDelay:0),void(this._options.disableTooltip||this._dataTooltip.setEnterCallback(e).setMoveCallback(e));function e(){if(s.SVGRenderer.IS_RESIZING)return;let e=d.mouse(t.getGraphGroup().node()),n=p(e[0],t._graphRect.width),r=e[1];return t.populateTooltip(n,r),!0}}_focus(t){t&&this._seriesMap.forEach((function(e){e.focus(t)}))}_unfocus(t){this._seriesMap.forEach((function(e){e.unfocus(t)}))}_select(t){t&&this._seriesMap.forEach((function(e){e.select(t)}))}_unselect(t){this._seriesMap.forEach((function(e){e.unselect(t)}))}updateHover(t){if(this._hoverLine){let e=this._scaleAxis.getScale();if(!this._scaleAxis.isBanded()){let n=t.xEnd,r=e(n)+this._options.leftMargin;isNaN(r)||("number"!=typeof n&&(r+=e.bandwidth()/2),this._hoverLine.attr("transform",(function(){return"translate("+r+",0)"})))}}}configureCursorTracking(){let t=this.getGraphGroup();if(!t.select(".overlay").node()){let n=t.append("rect").attr("class","overlay").attr("fill","none").attr("pointer-events","all");var e=n.node().parentNode.firstChild;e&&n.node().parentNode.insertBefore(n.node(),e)}t.select(".overlay").attr("width",this._graphRect.width).attr("height",this._graphRect.height)}getLegendPositions(){let t={},e=this._element.legends;if(e)for(let n=0;n<e.length;++n){let r=e[n];t[r.alignment]=r}return t}static register(t){m.SERIES_RENDERERS.push(t)}addToD3SeriesMap(t,e){let n,r=this._element,i=this._axes[t.xAxisIdx],o=this._axes[t.yAxisIdx],a=r.isXContinuous;for(let r=0;r<m.SERIES_RENDERERS.length;++r){let s=m.SERIES_RENDERERS[r];if(s.canRender(t)){n=new s(this,t,e,i,o,a);break}}return n&&this._seriesMap.set(t,n),n}createHandles(){super.createHandles();let t=this;t.hasBottomHandle()&&(t._bottomHandle=t._svg.append("rect").attr("opacity",0).attr("height",t._handleWidth).attr("cursor","ns-resize").classed("chart-handle horizontal bottom",!0).call(d.drag().on("start",(function(){s.SVGRenderer.IS_RESIZING=!0})).on("drag",(function(){if(0===d.event.dy)return;let e={height:Math.max(0,t._options.height+d.event.dy),xStart:t._options.xStart,xEnd:t._options.xEnd,animateDuration:0};t.render(e)})).on("end",(function(){s.SVGRenderer.IS_RESIZING=!1}))))}updateGraphRect(){if(this._options.width)this._svgRect.width=this._options.width;else{let t=this._parent.node();t&&(this._svgRect.width=t.getBoundingClientRect().width)}let t=this._options.leftMargin?this._options.leftMargin:0;this._graphRect.x=t,this._graphRect.y=this._options.topMargin,this._graphRect.height=this._options.height;let e=t+(this._options.rightMargin?this._options.rightMargin:0);this._graphRect.width=this._svgRect.width-e,this._svgRect.width<this._options.leftMargin+this._options.rightMargin&&console.log("Error margins too wide for graph"),this._minGraphHeight&&(this._graphRect.height=Math.max(this._minGraphHeight,this._graphRect.height),this._options.height=this._graphRect.height)}createLayout(){let t=this,e=t._element;t._requiresRelayout=!1,this._svg&&this._svg.selectAll("*").remove(),this.updateGraphRect(),t._legends=[],t._axes=[],t._seriesMap=new Map;let n=[],a=0;if(!t._options.hideRowTitle){let n=e.title?e.title:"";t._title=new _(t._svg,n,"lane-title");let r=t._title.getRenderedRect();a=r?r.width:0}t._options.disableBackground||(t._backgroundSVG=this._svg.append("rect").classed("chart-background",!0));for(let t=0;t<e.axes.length;++t){let i=e.axes[t],o=new f.D3Axis(this._svg,i,new r.Rect(this._options.leftMargin,0,0,0));this._axes[t]=o,i.alignment!==r.Alignment.Left&&i.alignment!==r.Alignment.Right||n.push(o)}let u=t.getLegendPositions();for(let n in u){let r=new s.D3Legend(t._svg,u[n],e.title);t._legends.push(r)}let c,l,h=!1,d=e.dataSets;if(void 0!==d){t._graphSvg=this._svg.append("g").attr("class","graphGroup").append("svg");for(let n=0;n<d.length;++n){let r=d[n],a=0!=(r.renderType&o.RenderType.Stacked);if(a&&r.renderType-o.RenderType.Stacked==0){console.warn("Error RenderType.Stacked must be used with a line, area or bar type");continue}let u=t._axes[r.xAxisIdx],c=t.addToD3SeriesMap(r,t._graphSvg);if(!c)continue;if(!c.isXContinuousSeries()){if(e.isXContinuous)throw"Error cannot render continuous and banded data in one chart";h=!0}if(t._minGraphHeight=Math.max(c.getRequiredHeight(),t._minGraphHeight),h){let t=c.getDiscreteXValues(a),e=c;if(e.getBarsPerDomain&&e.getLevelKeys){u.setKeysPerDomain(e.getBarsPerDomain(a));let t=e.getLevelKeys();for(let e=0;e<t.length;++e)u.appendDomain(t[e],e)}else u.appendDomain(t);u.setBanded(!0)}else{let e=c.getXMinMax(),n=u.getDomain();n?(n[0]=Math.min(n[0],e[0]?e[0]:Number.MAX_VALUE),n[1]=Math.max(n[1],e[1]?e[1]:-Number.MAX_VALUE),u.setDomain(n),t._xMin=Math.min(n[0],t._xMin),t._xMax=Math.max(n[1],t._xMax)):(u.setDomain([e[0],e[1]]),t._xMin=Math.min(e[0],t._xMin),t._xMax=Math.max(e[1],t._xMax)),t._xMinLimit=t._xMin,t._xMaxLimit=t._xMax}let l=t._axes[r.yAxisIdx];if(e.axes[r.yAxisIdx].axisDesc.scaleType!==i.AxisType.Ordinal&&c.isYContinuousSeries()){let t=c.getYMinMax(),e=l.getDomain();e?l.setDomain([Math.min(e[0],t[0]?t[0]:Number.MAX_VALUE),Math.max(e[1],t[1]?t[1]:-Number.MAX_VALUE)]):l.setDomain(t),e=l.getDomain(),l.getAxis().options&&l.getAxis().options.enableZeroOffset&&(e[0]>0&&e[1]>0?e[0]=0:e[0]<0&&e[1]<0&&(e[1]=0))}else{let t=c.getDiscreteYValues(),e=l.getDomain();e?s.mergeKeys(e,t):l.setDomain(t),l.setBanded(!0)}}t._minGraphHeight&&(t._options.height=t._minGraphHeight,t._hasBottomHandle=!1);for(let e in t._axes){let n=t._axes[e].getAxis().alignment;if(n===r.Alignment.Top||n===r.Alignment.Bottom){let i=t._axes[e];i.commitRange(t._graphRect.width),n!==r.Alignment.Bottom||c||(c=i),n!==r.Alignment.Top||l||(l=i)}}c?t._scaleAxis=c:l&&(t._scaleAxis=l),t._graphRect.width=t._scaleAxis.getRangePixels(),t._scaleAxis.isBanded()&&(t._maxGraphWidth=t._graphRect.width);for(let t=0;t<n.length;++t){let e=n[t],r=e.getAxis().axisDesc.range;r&&void 0!==r.min&&e.setDomain([r.min,r.max])}if(!this._options.disableAutoResizeWidth){let e=0,i=0;for(let o=0;o<n.length;++o){let a=n[o];a.commitRange(t._options.height),a.render();let s=0;a.getRenderedRect()&&(s=a.getRenderedRect().width+t.AXIS_PADDING.X),a.getAxis().alignment===r.Alignment.Right?i+=s:e+=s}let o=i,s=e;o+=this._handleWidth+this.MIN_MARGIN.RIGHT,s+=this._handleWidth;let c="";for(let e=0;e<d.length;++e){let n=d[e],r="";n.decimator&&(r=n.decimator.getName());let i=t._seriesMap.get(n);if(void 0!==i)for(let t=0;t<n.data.length;++t){let t=i.getName()+r;c=t.length>c.length?t:c,void 0!==i.getMaxName&&(t=i.getMaxName()+r,c=t.length>c.length?t:c)}}for(let e=0;e<t._legends.length;++e){let n=t._legends[e];n.setItems([{key:c}]),n.setPosition(new r.Rect(0,0,0,0)),n.render(),n.setItems([]);let i=n.getRenderedRect().width;n.getAlignment()===r.Alignment.Left&&(s+=Math.max(i,a)),n.getAlignment()===r.Alignment.Right&&(o+=i)}if(u.hasOwnProperty(r.Alignment.Left.toString())||(s+=a),void 0===t._options.leftMargin||void 0===t._options.rightMargin||s>t._options.leftMargin||o>t._options.rightMargin){let e=void 0!==t._options.leftMargin?t._options.leftMargin:0,n=void 0!==t._options.rightMargin?t._options.rightMargin:0;t._options.leftMargin=Math.max(s,e),t._options.rightMargin=Math.max(o,n),t._minSvgWidth=t._options.leftMargin+t._options.rightMargin,t._maxSvgWidth=t._maxGraphWidth+t._options.leftMargin+t._options.rightMargin,t._options.width=Math.min(t._options.width,t._maxSvgWidth),t._requiresRelayout=!0}if(t._requiresRelayout)return void t.createLayout()}t.configureZoom()}else console.log("Error: No Layers defined in chart")}updateAxes(t){let e=this,n=e._scaleAxis.getScale();if(e._scaleAxis.getAxis().axisDesc.scaleType===i.AxisType.Logarithmic&&e._options.xStart<1&&(e._options.xStart=1,n.domain([e._options.xStart,e._options.xEnd])),!this._options.disableZoomViewUpdate&&e._options.hasOwnProperty("xStart")&&void 0!==e._options.xStart&&e._options.hasOwnProperty("xEnd")&&void 0!==e._options.xEnd?n.domain([e._options.xStart,e._options.xEnd]):n.domain(e._scaleAxis.getDomain()),this._options.enableXYZoom){let n=e._axes[1],r=n.getScale();n.getAxis().axisDesc.scaleType===i.AxisType.Logarithmic&&e._options.yStart<1&&(e._options.yStart=1,r.domain([e._options.yEnd,e._options.yStart])),!this._options.disableZoomViewUpdate&&e._options.hasOwnProperty("yStart")&&void 0!==e._options.yStart&&e._options.hasOwnProperty("yEnd")&&void 0!==e._options.yEnd&&r.domain([t.yEnd,t.yStart])}}addHoverline(){this._hoverLine&&this._hoverLine.remove(),this._hoverLine=this._svg.append("line").attr("class","hover-line").attr("x1",0).attr("x2",0).attr("y1",this._graphRect.y-this._options.topMargin).attr("y2",this._graphRect.y+this._graphRect.height+this._options.bottomMargin).attr("stroke","#222222").attr("stroke-width",1).attr("pointer-events","none").style("display","none"),this.getGraphGroup().on("mouseover",this.cursorEnter).on("mousemove",this.cursorMove).on("mouseout",this.cursorExit)}configureSVG(t){this._graphSvg.attr("width",this._graphRect.width).attr("height",this._graphRect.height),this._svg.attr("width",this._svgRect.width).attr("height",this._svgRect.height),this._svg.attr("width",this._svgRect.width).attr("height",this._svgRect.height),this._backgroundSVG&&this._backgroundSVG.attr("x",t).attr("y",0).attr("width",this._svgRect.x+this._svgRect.width-t).attr("height",this._svgRect.height)}hasBottomHandle(){return!this._options.disableResizeBottom&&this._hasBottomHandle}updateLayout(t){let e=this;if(e.updateGraphRect(),e._options.rightMargin=e._svgRect.width-(e._graphRect.x+e._graphRect.width),this._legends)for(let t=0;t<this._legends.length;++t){let n=this._legends[t];n.getAlignment()===r.Alignment.Top&&(n.setPosition(new r.Rect(e._graphRect.x,e._options.topMargin,e._graphRect.width,0)),n.getRenderedRect()||(n.setItems([{key:"dummy",color:"white",opacity:"1",shape:"rect"}]),n.render(),n.setItems([])),e._graphRect.y+=n.getRenderedRect().height)}for(let t in e._axes){let n=e._axes[t];n.getAxis().alignment===r.Alignment.Top&&(n.commitRange(e._graphRect.width),n.getAxis().hidden||(n.setPosition(new r.Rect(e._graphRect.x,e._graphRect.y)),n.render(),e._graphRect.y+=n.getRenderedRect().height,n.setPosition(new r.Rect(e._graphRect.x,e._graphRect.y)),n.render()))}e.getGraphGroup().attr("transform","translate("+e._graphRect.x+","+e._graphRect.y+")"),e._svgRect.height=e._graphRect.y+e._graphRect.height;let n=e._graphRect.x,i=0,o=0,a=!1;for(let t in e._axes){let s,u=e._axes[t];switch(u.getAxis().alignment){case r.Alignment.Left:s=new r.Rect(e._graphRect.x-i,e._graphRect.y),u.commitRange(e._graphRect.height);break;case r.Alignment.Right:s=new r.Rect(e._graphRect.x+e._graphRect.width+o,e._graphRect.y),u.commitRange(e._graphRect.height);break;case r.Alignment.Bottom:s=new r.Rect(e._graphRect.x,e._graphRect.y+e._graphRect.height),u.commitRange(e._graphRect.width)}if(!u.getAxis().hidden&&u.getAxis().alignment!==r.Alignment.Top){u.setPosition(s),u.render();let t=u.getRenderedRect().width;switch(u.getAxis().alignment){case r.Alignment.Left:i+=t+e.AXIS_PADDING.X,n-=t;break;case r.Alignment.Right:o+=t+e.AXIS_PADDING.X;break;case r.Alignment.Bottom:a=!0,e._svgRect.height+=u.getRenderedRect().height}}}if(e._title&&e._title.getRenderedRect()){let t=e._graphRect.x-i-e._title.getRenderedRect().width-10;t=Math.max(0,t),e._title.setPosition(new r.Rect(t,e._graphRect.y,0,e._graphRect.height)),e._title.render()}if(this._legends)for(let t=0;t<this._legends.length;++t){let n=this._legends[t];switch(n.getAlignment()){case r.Alignment.Left:n.setPosition(new r.Rect(0,e._graphRect.y,0,e._graphRect.height));break;case r.Alignment.Right:n.setPosition(new r.Rect(e._graphRect.x+e._graphRect.width+o+e.LEGEND_PADDING.X,e._graphRect.y,0,e._graphRect.height));break;case r.Alignment.Bottom:a=!0,n.setPosition(new r.Rect(e._graphRect.x,e._svgRect.height+e.LEGEND_PADDING.Y.BOTTOM,e._graphRect.width,0)),n.getRenderedRect()?(n.render(),e._svgRect.height+=e.LEGEND_PADDING.Y.BOTTOM+n.getRenderedRect().height):(n.setItems([{key:"dummy",color:"white",opacity:"1",shape:"rect"}]),n.render(),e._svgRect.height+=e.LEGEND_PADDING.Y.BOTTOM+n.getRenderedRect().height,n.setItems([]))}}e._svgRect.height+=e._options.bottomMargin,!a&&e.hasBottomHandle()&&(e._svgRect.height=Math.max(e._handleWidth,e._svgRect.height)),e.addHoverline(),e.configureSVG(n),e.updateHandles(),a||e._svg.select(".chart-handle.bottom").attr("y",e._graphRect.y+e._graphRect.height-e._handleWidth)}updateLayoutToFit(t){let e=this;if(e.updateGraphRect(),e._svgRect.height=this._options.height,e._graphRect.height-=e._options.topMargin,e._graphRect.height-=e._options.bottomMargin,this._legends)for(let t=0;t<this._legends.length;++t){let n=this._legends[t];n.getAlignment()===r.Alignment.Top&&(n.setPosition(new r.Rect(e._graphRect.x,e._options.topMargin,e._graphRect.width,0)),n.getRenderedRect()||(n.setItems([{key:"dummy",color:"white",opacity:"1",shape:"rect"}]),n.render(),n.setItems([])),e._graphRect.y+=n.getRenderedRect().height,e._graphRect.height-=n.getRenderedRect().height)}for(let t in e._axes){let n=e._axes[t];n.getAxis().alignment===r.Alignment.Top&&(n.commitRange(e._graphRect.width),n.getAxis().hidden||(n.setPosition(new r.Rect(e._graphRect.x,e._graphRect.y)),n.render(),e._graphRect.y+=n.getRenderedRect().height,n.setPosition(new r.Rect(e._graphRect.x,e._graphRect.y)),n.render(),e._graphRect.height-=n.getRenderedRect().height))}e.getGraphGroup().attr("transform","translate("+e._graphRect.x+","+e._graphRect.y+")");let n=!1;for(let t=0;t<this._legends.length;++t){let i=this._legends[t];i.getAlignment()===r.Alignment.Bottom&&(n=!0,i.setPosition(new r.Rect(e._graphRect.x,e._svgRect.height+e.LEGEND_PADDING.Y.BOTTOM,e._graphRect.width,0)),i.getRenderedRect()?i.render():(i.setItems([{key:"dummy",color:"white",opacity:"1",shape:"rect"}]),i.render(),i.setItems([])),e._graphRect.height-=e.LEGEND_PADDING.Y.BOTTOM+i.getRenderedRect().height,i.setPosition(new r.Rect(e._graphRect.x,e._svgRect.height-i.getRenderedRect().height-e.LEGEND_PADDING.Y.BOTTOM,e._graphRect.width,0)),i.render())}for(let t in e._axes){let i,o=e._axes[t];if(o.getAxis().alignment===r.Alignment.Bottom&&(n=!0,i=new r.Rect(e._graphRect.x,e._graphRect.y+e._graphRect.height),o.commitRange(e._graphRect.width),!o.getAxis().hidden)){o.setPosition(i),o.render(),o.getRenderedRect().width,e._graphRect.height-=o.getRenderedRect().height,i=new r.Rect(e._graphRect.x,e._graphRect.y+e._graphRect.height),o.setPosition(i),o.render();break}}let i=e._graphRect.x,o=0,a=0;for(let t in e._axes){let n,s,u=e._axes[t];switch(u.getAxis().alignment){case r.Alignment.Left:n=new r.Rect(e._graphRect.x,e._graphRect.y),u.commitRange(e._graphRect.height),u.setPosition(n),u.render(),s=u.getRenderedRect().width,o+=s,i-=s;break;case r.Alignment.Right:n=new r.Rect(e._graphRect.x+e._graphRect.width,e._graphRect.y),u.commitRange(e._graphRect.height),u.setPosition(n),u.render(),s=u.getRenderedRect().width,a+=s}}if(e._title.getRenderedRect()){let t=e._graphRect.x-o-e._title.getRenderedRect().width-10;t=Math.max(0,t),e._title.setPosition(new r.Rect(t,e._graphRect.y,0,e._graphRect.height)),e._title.render()}for(let t=0;t<this._legends.length;++t){let n=this._legends[t];switch(n.getAlignment()){case r.Alignment.Left:n.setPosition(new r.Rect(0,e._graphRect.y,0,0));break;case r.Alignment.Right:n.setPosition(new r.Rect(e._graphRect.x+e._graphRect.width+a+e.LEGEND_PADDING.X,e._graphRect.y,0,0))}}e.addHoverline(),e.configureSVG(i),e.updateHandles(),n||e._svg.select(".chart-handle.bottom").attr("y",e._graphRect.y+e._graphRect.height-e._handleWidth)}addZoomContextMenuItem(t,e){let n={title:t,action:function(t,n,r){e()},disabled:!1};this._contextMenuItems.indexOf(this._zoomMenuItem)&&this._contextMenuItems.push(this._zoomMenuItem),this._zoomMenuItem.submenu.push(n)}updateZoomFunctions(){let t=this,e=t._options.xStart?t._options.xStart:t._xMin,n=t._options.xEnd?t._options.xEnd:t._xMax,i=n-e,o=t._element;o.api||(o.api={}),o.api.zoomReset=function(){let e={caller:t._element,event:r.EventType.Zoom,xStart:t._xMin?t._xMin:void 0,xEnd:t._xMax?t._xMax:void 0,yStart:void 0,yEnd:void 0};t.onZoomChanged(e)};let a=e+.3*i,s=n-.3*i;o.api.zoomIn=function(){let e={caller:t._element,event:r.EventType.Zoom,xStart:a,xEnd:s,yStart:t._options.yStart,yEnd:t._options.yEnd};t.onZoomChanged(e)};let u=e-i*(.3/.4),c=n+i*(.3/.4);o.api.zoomOut=function(){let e={caller:t._element,event:r.EventType.Zoom,xStart:t._xMin>u?t._xMin:u,xEnd:t._xMax<c?t._xMax:c,yStart:t._options.yStart,yEnd:t._options.yEnd};t.onZoomChanged(e)},o.api.rangeUpdate=function(e){e.event=r.EventType.RangeUpdate,t.onZoomChanged(e)},o.api.rangeReset=function(){let e={caller:t._element,event:r.EventType.RangeUpdate};t.onZoomChanged(e)}}createZoomMenuItems(){let t=this,e=t._element;e.api||(e.api={}),this._zoomMenuItem.submenu=[];let n=!(void 0===t._options.xStart&&void 0===t._options.xEnd)&&(t._options.xStart&&t._options.xStart!==t._xMin||t._options.xEnd&&t._options.xEnd!==t._xMax);t._options.disableZoomViewUpdate||t.addZoomContextMenuItem("Zoom In",e.api.zoomIn),n&&(t.addZoomContextMenuItem("Zoom Out",e.api.zoomOut),t.addZoomContextMenuItem("Reset",e.api.zoomReset))}updatePanFunctions(){let t=this,e=t._element;if(e.api||(e.api={}),e.api.panLeft=function(){console.log("Either start or end is undefined for pannning")},e.api.panRight=function(){console.log("Either start or end is undefined for pannning")},t._options.xStart&&t._options.xEnd){let n=t._options.xStart?t._options.xStart:t._xMin,i=(t._options.xEnd?t._options.xEnd:t._xMax)-n,o=i/10,a=t._options.xStart-o,s=t._options.xEnd-o;a<t._xMin&&(a=t._xMin,s=t._xMin+i),e.api.panLeft=function(){let e={caller:t._element,event:r.EventType.Zoom,xStart:a,xEnd:s};t.onZoomChanged(e)};let u=t._options.xStart+o,c=t._options.xEnd+o;c>t._xMax&&(u=t._xMax-i,c=t._xMax),e.api.panRight=function(){let e={caller:t._element,event:r.EventType.Zoom,xStart:u,xEnd:c};t.onZoomChanged(e)}}}render(t){let e=this,n=e._element;if(0===n.axes.length&&(n.dataSets&&0===n.dataSets.length||0===this._seriesMap.size))return void console.warn("Error no data in the chart");if(e.loadOptions(t),e.updateAxes(t),this._options.fitToWindow?e.updateLayoutToFit(t):e.updateLayout(t),e._contextMenuItems=[],!e._scaleAxis.isBanded()){e.updatePanFunctions(),e.updateZoomFunctions(),e.createZoomMenuItems();let t,n=e._scaleAxis.getScale();t=e._axes[1]?e._axes[1].getScale().domain():[0,0],this.updateZoom(n.domain()[0],n.domain()[1],t[0],t[1])}if(e._scaleAxis.render(),n.contextMenuItems)for(let t=0;t<n.contextMenuItems.length;++t)e._contextMenuItems.push(n.contextMenuItems[t]);if(e._options.enableSaveAsImage){let t={title:"Save As Image",action:function(t,n,r){e.saveImage()},disabled:!1};e._contextMenuItems.push(t)}e._element.api.saveImage=e.saveImage,e._element.api.createImage=e.createImage,e._contextMenuItems.length>0&&this.configureContextMenu(),e._options.disableBrush||e.configureBrush(),e.configureCursorTracking();let i=[];e._loadingView&&e._loadingView.remove();e._loadingView=e._svg.append("g").classed("progress-group",!0).attr("transform","translate("+(e._graphRect.x+10)+","+(e._graphRect.y+10)+")").attr("pointer-events","none"),e._options.enableWebWorkers&&new s.Spinner(e._loadingView,new r.Rect(e._graphRect.x,e._graphRect.y,20,20)),e._loadingView.append("text").attr("x",10).attr("y",2).text("Loading...");for(let t=0;t<e._legends.length;++t){e._legends[t].render()}let o=e._element.dataSets;for(let t=0;t<o.length;++t){let e=o[t],n=this._seriesMap.get(e);n&&(n.setData(e),e.enableWebWorkers&&n.render())}let a=[];for(let t=0;t<o.length;++t){let n=o[t],r=this._seriesMap.get(n);r&&a.push(r.decimateData(e._options.xStart,e._options.xEnd,this._axes[n.xAxisIdx],this._axes[n.yAxisIdx]))}Promise.all(a).then((function(){for(let t=0;t<o.length;++t){let n=o[t],r=e._seriesMap.get(n);if(r){if(void 0!==n.yAxisIdx){let t=e._axes[n.yAxisIdx];if(t&&t.getAxis().enableDynamicRange){let e=t.getScale();if(r instanceof y.XYSeries||r instanceof x.XYGroupSeries){let n=r.getRenderedYRange();e.domain(n),t.setDomain(n),t.render()}}}r.render(),n.hideInLegend||(i=i.concat(r.getLegendInfo()))}}for(let n=0;n<e._legends.length;++n){let o=e._legends[n];if(o.getAlignment()===r.Alignment.Top||o.getAlignment()===r.Alignment.Bottom){let n=o.getRows();if(o.addItems(i),o.render(),n!==o.getRows()){if(e._options.fitToWindow)return void e.render(t);e.updateLayout(t)}}else o.addItems(i),o.render()}e._interactionState.onRedraw(),e._options.forceBrushToFront&&e._brush.moveToFront(),e._loadingView&&(e._loadingView.remove(),e._loadingView=void 0)}))}}e.D3Chart=m,m.SERIES_RENDERERS=[];const v=n(207),y=n(43),x=n(126);e.createDecimatorWorker=function(t,e,n,r,i,o,s,u,c){let l;try{l=new v}catch(t){l=new Worker("ui-widget-toolkit-decimator-worker.js")}let h={decimatorName:t.getKey(),xDomain:r.getScale().domain(),xRange:r.getRangePixels(),xAxis:a.copy(r.getAxis()),xStart:e,xEnd:n,values:o,names:s};return delete h.xAxis.options,void 0!==i&&(h.yDomain=i.getScale().domain(),h.yRange=i.getRangePixels(),h.yAxis=a.copy(i.getAxis()),delete h.yAxis.options),l.postMessage(h),l.addEventListener("message",(function(t){l.terminate(),u(t.data)})),l.onerror=function(t){l.terminate(),c(t)},l},u.D3Renderer.register(r.UIType.Cartesian,m)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){t[t.Line=1]="Line",t[t.Area=2]="Area",t[t.Scatter=4]="Scatter",t[t.Bar=8]="Bar",t[t.Stacked=16]="Stacked",t[t.MinMaxValue=32]="MinMaxValue",t[t.FlameChart=64]="FlameChart",t[t.Marker=128]="Marker",t[t.DirectionalArrow=256]="DirectionalArrow",t[t.BoxPlot=512]="BoxPlot",t[t.HeatMap=1024]="HeatMap",t[t.Raw=2048]="Raw"}(e.RenderType||(e.RenderType={})),function(t){t[t.Linear=0]="Linear",t[t.StepBefore=1]="StepBefore",t[t.StepAfter=2]="StepAfter"}(e.InterpolateType||(e.InterpolateType={}))},function(t,e,n){var r;try{r={clone:n(229),constant:n(145),each:n(287),filter:n(293),has:n(316),isArray:n(6),isEmpty:n(318),isFunction:n(54),isUndefined:n(319),keys:n(26),map:n(320),reduce:n(322),size:n(325),transform:n(331),union:n(332),values:n(351)}}catch(t){}r||(r=window._),t.exports=r},function(t,e,n){var r;try{r=n(227)}catch(t){}r||(r=window.graphlib),t.exports=r},function(t,e,n){var r=n(162),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();t.exports=o},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,n){var r=n(128),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();t.exports=o},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e,n){"use strict";function r(t,e,n,a,s){let u;if(u=document.createElement("div"),u.setAttribute("class","context-menu"),u.oncontextmenu=function(t){o(),t.preventDefault()},document.body.appendChild(u),n.length>0){let c=document.createElement("ul");u.appendChild(c);for(let a=0;a<n.length;++a){let u=n[a],l=document.createElement("li");u.divider?(l.className+=" is-divider",l.innerHTML="<hr>"):(u.title||console.error("No title attribute set. Check the spelling of your options."),u.disabled&&(l.className+=" is-disabled"),u.action||u.submenu||(l.className+=" is-header"),u.submenu?l.innerHTML=`<span><text>${u.title}</text>`+'<text style="width: 5px; float: right; color: #000000A0">►</text></span>':l.innerHTML=u.title,l.onclick=function(t){u.disabled||u.action&&(u.action(l,e,a),o())},l.onmouseenter=function(){if(i(n),u.submenu){let n=l.getBoundingClientRect(),i={top:n.top+window.scrollY,bottom:n.bottom+window.scrollY,left:n.left+window.scrollX,right:n.right+window.scrollX,height:n.height,width:n.width};u.submenuDiv=r(t,e,u.submenu,i,s)}}),c.appendChild(l)}u.style.display="block",function(t,e){let n=document.body.clientWidth,r=document.body.clientHeight,i=e.left,o=e.top;i=e.right+t.clientWidth<n?e.right:e.left-t.clientWidth,e.top+t.clientHeight>r&&(o=e.top-t.clientHeight),t.style.left=i-2+"px",t.style.top=o-2+"px"}(u,a),s||t.stopPropagation()}return u}function i(t){t.forEach((function(t,e,n){!function(t){t.submenuDiv&&(document.body.removeChild(t.submenuDiv),delete t.submenuDiv),t.submenu&&i(t.submenu)}(t)}))}function o(){i(a);let t=document.getElementsByClassName("context-menu");for(;t.length;)document.body.removeChild(t[0])}Object.defineProperty(e,"__esModule",{value:!0});let a=[];e.showContextMenu=function(t,e,n,i=!1){t&&(window.onkeyup=function(t){27===t.keyCode&&o()},o(),a=n,r(t,e,n,{left:t.pageX,top:t.pageY,right:t.pageX,bottom:t.pageY,height:0,width:0},i),t.preventDefault())}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(1),i=n(2),o=n(5),a=n(19),s=n(3);e.BaseSeries=class{constructor(t,e,n,r,o,a){this._fillColors=new WeakMap,this._strokeColors=new WeakMap,this._d3svg=a,this._d3Chart=t,this._layer=e,this._d3XAxis=n,this._d3YAxis=r,this._d3Elems=[],this._isXContinuous=o,this._outputData=new i.SimpleBuffer([]),this._contextMenuItems=[],e.xScalingInfo?this._xScalingInfo=e.xScalingInfo:this._xScalingInfo={baseScale:{maxRange:Number.MAX_VALUE,scalar:1,units:""}},e.yScalingInfo?this._yScalingInfo=e.yScalingInfo:this._yScalingInfo={baseScale:{maxRange:Number.MAX_VALUE,scalar:1,units:""}}}initializeContextMenuItems(){this._contextMenuItems=this._layer.contextMenuItems?this._d3Chart.getContextMenuItems().concat(this._layer.contextMenuItems):this._d3Chart.getContextMenuItems()}applyStyles(){if(this._layer.css){let t=this._layer.css.style;if(t)for(let e=0;e<this._d3Elems.length;++e)for(let n in t)this._d3Elems[e].style(n,t[n])}}getMaxNameLength(){return this.getName().length}isXContinuousSeries(){return this._isXContinuous}getXScalingInfo(){return this._xScalingInfo}getYScalingInfo(){return this._yScalingInfo}getName(){return""}getDecimationName(){return""}getClassNames(t,e){let n=` ${t}`;e||(e=this.getName());let r=i.getSelectionName(e);r&&r.length>0&&(n+=" "+i.getSelectionName(e));let o=this._d3Chart.getTitle();o&&o.length>0&&(n+=" "+i.getSelectionName(o));let a=this.getDecimationName();return a&&a.length>0&&(n+=" "+a),n}getRequiredHeight(){return 0}getSelectionClasses(t){return this.getClassNames(t).replace(/\s+/g,".")}focus(t){let e=this;if(this._d3Elems){let n=i.getSelectionName(t);for(let t=0;t<e._d3Elems.length;++t){let r=e._d3Elems[t];if(r.classed&&r.classed(n)){let t=e._d3Chart.getOptions().focusRadiusDelta?e._d3Chart.getOptions().focusRadiusDelta:e._d3Chart.getOptions().hoverRadiusDelta,n=r.attr("r");if(void 0!==n&&void 0!==t){let e=t||0;return void r.attr("r",parseInt(n)+e)}o.focus(r,e._fillColors,e._strokeColors)}}}}unfocus(t){let e=this;if(this._d3svg){let n=i.getSelectionName(t);for(let t=0;t<e._d3Elems.length;++t){let r=e._d3Elems[t];if(r.classed&&r.classed(n)){let t=e._d3Chart.getOptions().focusRadiusDelta?e._d3Chart.getOptions().focusRadiusDelta:e._d3Chart.getOptions().hoverRadiusDelta,n=r.attr("r");if(void 0!==n&&void 0!==t){let e=t||0;return void r.attr("r",parseInt(n)-e)}o.unfocus(r,e._fillColors,e._strokeColors)}}}}select(t){let e=this;if(this._d3Elems&&t){let n=i.getSelectionName(t);for(let t=0;t<e._d3Elems.length;++t){let r=e._d3Elems[t];r.classed&&r.classed(n)&&o.select(r,e._fillColors,e._strokeColors)}}}unselect(t){let e=this;if(this._d3svg&&t){let n=i.getSelectionName(t);for(let t=0;t<e._d3Elems.length;++t){let r=e._d3Elems[t];r.classed&&r.classed(n)&&o.unselect(r,e._fillColors,e._strokeColors)}}}setOutputData(t){Array.isArray(t)?this._outputData=new i.SimpleBuffer(t):this._outputData=t}getOutputData(){return this._outputData}getMinHeight(){return 0}clickCallback(t,e){let n=this;return function(r){if(e){let i={caller:n._d3Chart.getElement(),event:r.event};t?i.data=t:void 0!==r.data&&(isNaN(r.data)?i.data=r.data:i.data=n.getOutputData().get(r.data)),e(i)}}}onClick(t){return this.clickCallback(t,this._layer.onClick)}onDoubleClick(t){return this.clickCallback(t,this._layer.onDoubleClick)}clickExecute(t,e){let n=this;if(t){let i=this._d3Chart.getElement();if(this._layer.onDoubleClick){if(this._dblClickWait){return window.clearTimeout(this._dblClickWait),this._dblClickWait=null,void this.clickCallback(t,this._layer.onDoubleClick)({caller:i,event:r.EventType.DoubleClick,data:t})}this._dblClickWait=setTimeout(()=>{if(this._dblClickWait){n._d3Chart.getOptions().disableSelection||o.onSelectHelper(i,t,e),this.clickCallback(t,this._layer.onClick)({caller:i,event:r.EventType.Click,data:t}),this._dblClickWait=null}},300)}else{n._d3Chart.getOptions().disableSelection||o.onSelectHelper(i,t,e),this.clickCallback(t,this._layer.onClick)({caller:i,event:r.EventType.Click,data:t})}}}configureItemInteraction(t,e,n){let r=this;r._d3Chart.getOptions().disableBrush?(t.attr("cursor","pointer"),o.addClickHelper(t,r._d3Chart.getOptions(),r._layer.onClick?this.onClick(e):void 0,r._layer.onDoubleClick?this.onDoubleClick(e):void 0,r._contextMenuItems,r._d3Chart.getTooltip(),r._d3Chart.getElement(),e,n)):(t.attr("cursor","crosshair"),t.on("contextmenu",(function(t){a.showContextMenu(s.event,e,r._contextMenuItems)})).on("mousedown touchstart",(function(t){r.clickExecute(e,n);let i=r._d3Chart.getGraphGroup().select(".brush"),o=i.on("mousedown.brush"),a=new MouseEvent("mousedown touchstart",s.event);a.changedTouches=s.event.changedTouches,a.touches=s.event.touches;let u=i.select(".overlay").node();Object.defineProperty(a,"target",{value:u,enumerable:!0}),u.dispatchEvent(a),s.customEvent(a,o,i.node()),s.event.preventDefault(),s.event.stopPropagation()})))}configureBandedItemInteration(t,e,n){let r=this;t.node().__data__=e,t.on("mouseenter",(function(){r._d3Chart.cursorEnter()})).on("mouseleave",(function(){r._d3Chart.cursorExit()})),o.addClickHelper(t,r._d3Chart.getOptions(),r._layer.onClick,r._layer.onDoubleClick,r._contextMenuItems,r._d3Chart.getTooltip(),r._d3Chart.getElement(),e,n)}configureItemInteractionPIXI(t,e,n){let r=this;t.interactive=!0,r._d3Chart.getOptions().disableBrush?o.addClickHelper(t,r._d3Chart.getOptions(),r._layer.onClick?this.onClick(e):void 0,r._layer.onDoubleClick?this.onDoubleClick(e):void 0,r._contextMenuItems,r._d3Chart.getTooltip(),r._d3Chart.getElement(),e):(r._d3Chart.getGraphGroup().attr("cursor","crosshair"),t.on("mousedown",(function(t){r.clickExecute(e,n)})))}clear(){this._d3Elems.forEach(t=>{t.remove()})}}},function(t,e,n){var r=n(431),i=n(444),o=n(31),a=n(8),s=n(451);t.exports=function(t){return"function"==typeof t?t:null==t?o:"object"==typeof t?a(t)?i(t[0],t[1]):r(t):s(t)}},function(t,e,n){"use strict";function r(t){var e=Number(t).toString(16);return 1==e.length?"0"+e:e}function i(t){let e=t.substring(t.indexOf("(")+1,t.indexOf(")")).split(",");return r(e[0])+r(e[1])+r(e[2])}Object.defineProperty(e,"__esModule",{value:!0});class o{constructor(t){this._colorMap={},this.getRandomColor=t||function(){for(var t="#",e=0;e<6;e++)t+="0123456789ABCDEF"[Math.floor(16*Math.random())];return t}}hasColor(t){return this._colorMap.hasOwnProperty(t)}setColor(t,e){0===e.indexOf("rgb")&&(e=o.RgbToHex(e)),this._colorMap[t]=e}getColor(t){return this.hasColor(t)||(this._colorMap[t]=this.getRandomColor()),this._colorMap[t]}static IntToHex(t){return"#"+t.toString(16).padStart(6,"0")}static RgbToHex(t){return"#"+i(t)}static RgbToInt(t){return parseInt(i(t),16)}}e.ColorManager=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(3);class i{constructor(t,e="tooltip-t"){if(document.getElementById(t)){let e=t;"#"!==t.charAt(0)&&(e="#"+t),this._tooltipDiv=document.querySelector(e)}else this._tooltipDiv=document.createElement("div"),this._tooltipDiv.style.overflow="auto",this._tooltipDiv.id=t,document.querySelector("body").appendChild(this._tooltipDiv);this._targets=[],this._analyticsName="",this._disabled=!1,this._visibilityTimeoutSecs=0,this._visibilityTimeoutCallLeaveFunction=!0,this._delayMS=i._defaultDelayMS,this._tooltipPlacementFunc=this.defaultTooltipPlacement,this._alwaysRecalcWidth=!1,this._tooltipLeftOfMouse=!0,this._lastShowTs=Date.now(),this._counter=i._counter,i._counter++,this._hide="none",this._tooltipOffset=0,this._tooltipHeight=0,this._tooltipWidth=0,this._windowWidth=0,this._windowHeight=0,this._tooltipDiv.classList.add(e),this._tooltipBackgroundColor=null,this._tooltipFontColor=null,this._tooltipFontType=null,this._tooltipFontSize=null;let n=this;this.onMouseEnter=function(t){n._disabled||(void 0===n._enterfunc||n._enterfunc.call(this,t)?(n.displayTooltip(n._delayMS),n._tooltipHeight=0,n._tooltipWidth=0,n._windowWidth=0,n._windowHeight=0):n.onMouseLeave.call(this,t))},this.onMouseLeave=function(t){if(null!=n._timerId&&window.clearTimeout(n._timerId),n._timerId=void 0,null!=n._visibilityTimerId&&window.clearTimeout(n._visibilityTimerId),void 0!==n._leavefunc){let e=!0;null===t&&(e=n._visibilityTimeoutCallLeaveFunction),e&&n._leavefunc.call(this,t)}n.hideTooltip()},this.onMouseMove=function(t,e){if(!n._disabled){if(void 0!==n._movefunc&&n._movefunc.call(this,t),n._alwaysRecalcWidth||0===n._tooltipWidth){n._tooltipWidth=n._tooltipDiv.offsetWidth;let t=n._tooltipDiv.offsetHeight,e=parseInt(n._tooltipDiv.style.marginTop),r=parseInt(n._tooltipDiv.style.marginBottom);e&&(t+=e),r&&(t+=r),n._tooltipHeight=t}0==n._windowWidth&&(n._windowWidth=window.innerWidth,n._windowHeight=window.innerHeight),e&&e.clientY||(e=r.event.clientY?r.event:r.event.sourceEvent),n._tooltipPlacementFunc(e)}}}adjustVerticalPosition(t,e){(t-=this._tooltipHeight/2)<window.pageYOffset&&(t=window.pageYOffset),(e=t+this._tooltipHeight)>this._windowHeight+window.pageYOffset&&(t-=e-(this._windowHeight+window.pageYOffset)),t<0&&(t=0),this._tooltipDiv.style.top=t+"px"}placeTooltipLeft(t){let e,n;e=window.pageYOffset+t.clientY,n=window.pageXOffset+t.clientX,n-=this._tooltipWidth+10,n<window.pageXOffset&&(n=window.pageXOffset),this._tooltipDiv.style.left=n+"px",this.adjustVerticalPosition(e,void 0)}placeTooltipLeftRight(t){let e,n;e=window.pageYOffset+t.clientY,n=window.pageXOffset+t.clientX,n<this._windowWidth/3&&(this._tooltipLeftOfMouse=!1),n>this._windowWidth/3*2&&(this._tooltipLeftOfMouse=!0),this._tooltipLeftOfMouse?n-=this._tooltipWidth+10:n+=10,n<window.pageXOffset&&(n=window.pageXOffset),this._tooltipDiv.style.left=n+"px",this.adjustVerticalPosition(e,void 0)}defaultTooltipPlacement(t){let e,n,r,i;if(e=window.pageYOffset+t.clientY,i=window.pageXOffset+t.clientX,t.y<this._windowHeight/2){if(e+=20+this._tooltipOffset,n=e+this._tooltipHeight,n<this._windowHeight+window.pageYOffset)return i-=this._tooltipWidth/2,r=i+this._tooltipWidth,r>this._windowWidth&&(i-=r-this._windowWidth),i<window.pageXOffset&&(i=window.pageXOffset),this._tooltipDiv.style.left=i+"px",void this.adjustVerticalPosition(e,n)}else if(e-=this._tooltipHeight+10+this._tooltipOffset,e>=window.pageYOffset)return i-=this._tooltipWidth/2,r=i+this._tooltipWidth,r>this._windowWidth&&(i-=r-this._windowWidth),i<window.pageXOffset&&(i=window.pageXOffset),this._tooltipDiv.style.left=i+"px",void this.adjustVerticalPosition(e,n);t.clientX>this._windowWidth/2?(i-=this._tooltipWidth+10,i<window.pageXOffset&&(i=window.pageXOffset)):(i+=10,r=i+this._tooltipWidth,r>this._windowWidth&&(i-=r-this._windowWidth)),this._tooltipDiv.style.left=i+"px",this.adjustVerticalPosition(e,n)}setOffset(t){return this._tooltipOffset=t,this}setEnabled(t){return this._disabled=!t,this}setHideDisplayValue(t){return this._hide=t,this}setDelay(t){return this._delayMS=t,this}setPlaceTooltipLeft(){return this._tooltipPlacementFunc=this.placeTooltipLeft,this}setPlaceTooltipLeftRight(){return this._tooltipPlacementFunc=this.placeTooltipLeftRight,this}releaseListeners(){this._targets.forEach(t=>{t.on("mouseenter.tooltip",null).on("mouseleave.tooltip",null).on("mousemove.tooltip",null)}),this._targets=[]}setVisibilityTimeout(t,e=!0){return this._visibilityTimeoutSecs=t,this._visibilityTimeoutCallLeaveFunction=e,this}alwaysRecalcWidth(t){return this._alwaysRecalcWidth=t,this}setBackgroundColor(t){return this._tooltipBackgroundColor=t,this._tooltipDiv.style["background-color"]=this._tooltipBackgroundColor,this}setFontColor(t){return this._tooltipFontColor=t,this._tooltipDiv.style.color=this._tooltipFontColor,this}setFontType(t){return this._tooltipFontType=t,this._tooltipDiv.style.font=this._tooltipFontType,this}setFontSize(t){return this._tooltipFontSize=t,this._tooltipDiv.style.font=this._tooltipFontSize,this}setAnalyticsName(t){return this._analyticsName=t,this}setCssClass(t){return this._tooltipDiv.classList.add(t),this}setTarget(t){return t&&(t.on("mouseenter.tooltip",this.onMouseEnter).on("mouseleave.tooltip",this.onMouseLeave).on("mousemove.tooltip",this.onMouseMove),this._targets.push(t)),this}setEnterCallback(t){return this._enterfunc=t,this}setLeaveCallback(t){return this._leavefunc=t,this}setMoveCallback(t){return this._movefunc=t,this}displayTooltip(t){if(this._disabled)return this;let e=this;return 0===t?(n(),this):void 0!==this._timerId?this:(this._timerId=window.setTimeout(n,t),this);function n(){e._disabled||(e._tooltipDiv.style.display="block",e._visibilityTimeoutSecs>0&&(e._visibilityTimerId=window.setTimeout((function(){e.onMouseLeave(null)}),1e3*e._visibilityTimeoutSecs)))}}hideTooltip(){return this._timerId&&window.clearTimeout(this._timerId),this._timerId=void 0,this._tooltipDiv.style.display=this._hide,this}}e.BaseTooltip=i,i._defaultDelayMS=500,i._counter=0;e.OneLineTooltip=class extends i{constructor(t,e="tooltip-t"){super(t,e)}getTitle(){return this._title}setData(t,e){for(;this._tooltipDiv.hasChildNodes();)this._tooltipDiv.removeChild(this._tooltipDiv.lastChild);this._title=t;let n=document.createElement("table");n.classList.add("tooltip-table"),this._tooltipDiv.appendChild(n);let r=document.createElement("tr");n.appendChild(r);let i=document.createElement("td");i.classList.add("tooltip-title"),i.setAttribute("colspan","2"),i.textContent=t,r.appendChild(i),null!=e&&(r=document.createElement("tr"),n.appendChild(r),i=document.createElement("td"),i.setAttribute("colspan","2"),i.textContent=e,r.appendChild(i))}};class o extends i{constructor(t,e="tooltip-t"){super(t,e)}getTitle(){return this._title}setData(t,e){for(;this._tooltipDiv.hasChildNodes();)this._tooltipDiv.removeChild(this._tooltipDiv.lastChild);this._title=t;let n=document.createElement("table");n.classList.add("tooltip-table"),this._tooltipDiv.appendChild(n);let r=document.createElement("tr");n.appendChild(r);let i=document.createElement("td");i.classList.add("tooltip-title"),i.setAttribute("colspan","2"),i.textContent=t,r.appendChild(i);let o=!1;if(e.length>0){let t=e[0].source;for(let n=1;n<e.length;++n)e[n].source!==t&&(o=!0)}for(let t=0;t<e.length;++t){let r=e[t];if(Object.keys(r.metrics).length>0){let t=r.source;if(t&&t.title&&o){let e=document.createElement("tr");n.appendChild(e);let r=document.createElement("td");r.classList.add("tooltip-group-title"),r.setAttribute("colspan","2"),r.textContent=t.title,e.appendChild(r)}if(r.group&&r.group.length>0){let t=document.createElement("tr");n.appendChild(t);let e=document.createElement("td");e.classList.add("tooltip-group-title"),e.setAttribute("colspan","2"),e.textContent=r.group,t.appendChild(e)}for(let t in r.metrics){let e=document.createElement("tr");n.appendChild(e);let i=document.createElement("td");i.classList.add("tooltip-metric-name"),i.textContent=t,e.appendChild(i),i=document.createElement("td"),i.classList.add("tooltip-metric-value"),i.textContent=r.metrics[t],e.appendChild(i)}}}}}e.MetricListTooltip=o;e.CustomDivTooltip=class extends o{constructor(t,e="tooltip-t"){super(t,e)}clearTooltip(){for(;this._tooltipDiv.hasChildNodes();)this._tooltipDiv.removeChild(this._tooltipDiv.lastChild)}getTooltipDiv(){return this._tooltipDiv}}},function(t,e,n){var r=n(241),i=n(246);t.exports=function(t,e){var n=i(t,e);return r(n)?n:void 0}},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,n){var r=n(133),i=n(98),o=n(27);t.exports=function(t){return o(t)?r(t):i(t)}},function(t,e,n){var r=n(54),i=n(95);t.exports=function(t){return null!=t&&i(t.length)&&!r(t)}},function(t,e,n){var r=n(377),i=n(382);t.exports=function(t,e){var n=i(t,e);return r(n)?n:void 0}},function(t,e,n){var r=n(166),i=n(400),o=n(30);t.exports=function(t){return o(t)?r(t):i(t)}},function(t,e,n){var r=n(108),i=n(111);t.exports=function(t){return null!=t&&i(t.length)&&!r(t)}},function(t,e){t.exports=function(t){return t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(125),i=n(2);e.findFirstInsertionIdx=i.bisectBuffer((function(t){return t.x})).left,e.findLastInsertionIdx=i.bisectBuffer((function(t){return t.x})).right;e.XYDummyDecimator=class{constructor(){this._values=[]}initialize(t,e,n){}getKey(){return""}getName(){return""}getValues(){return this._values}decimateValues(t,e,n){return Array.isArray(n)?n.forEach(t=>{this._values.push(t.getData())}):this._values=n.getData(),this._values}};class o{constructor(){this._name="Simple Unimplemented Decimator"}initialize(t,e,n){this._xValueToCoord=t,this._xCoordToValue=e,this._yValueToCoord=n}getKey(){return this._key}getName(){return this._name}getValues(){return this._decimatedValues}decimateValues(t,n,r){if(this._decimatedValues=[],0===r.length())return this._decimatedValues;let i,o,a=e.findFirstInsertionIdx(r,t),s=e.findLastInsertionIdx(r,n);a>0&&--a,s<r.length()&&++s,a<r.length()&&(i=Math.floor(this._xValueToCoord(r.get(a).x)),--i),o=t?Math.floor(this._xValueToCoord(t)):Math.floor(this._xValueToCoord(r.get(a).x));let u,c=a;for(let t=a;t<s;++t){let e=r.get(t),n=Math.floor(this._xValueToCoord(e.x));u=t,n!==i&&(this._decimatedValues=this._decimatedValues.concat(this._customFunc(r,c,u,this._yValueToCoord,this._xValueToCoord,this._xCoordToValue(o),this._xCoordToValue(n))),o=n,i=n,c=u)}return c!==r.length()&&(this._decimatedValues=this._decimatedValues.concat(this._customFunc(r,c,u+1,this._yValueToCoord,this._xValueToCoord,this._xCoordToValue(o),Number.MAX_VALUE))),this._decimatedValues}}e.CustomPointXYDecimator=o;class a extends o{constructor(){super(),this._key=a.KEY,this._name="Min",this._customFunc=function(t,e,n,r){if(t.length()>0&&e!==n){let r,i=Number.MAX_VALUE;for(let o=e;o<n;++o){let e=t.get(o),n=e.y;n<i&&(r=e,i=n)}return[r]}return[]}}}function s(t,e,n,i){if(t.length()>0&&e!==n){let i=0;for(let r=e;r<n;++r){i+=t.get(r).y}return[new r.XYValue(t.get(n-1).x,i/(n-e))]}return[]}e.MinPointDecimator=a,a.KEY="MinPointDecimator";class u extends o{constructor(){super(),this._key=u.KEY,this._name="Avg",this._customFunc=s}}e.AvgPointDecimator=u,u.KEY="AvgPointDecimator";class c extends o{constructor(){super(),this._key=c.KEY,this._name="Max",this._customFunc=function(t,e,n,r){if(t.length()>0&&e!==n){let r,i=-Number.MAX_VALUE;for(let o=e;o<n;++o){let e=t.get(o),n=e.y;n>i&&(r=e,i=n)}return[r]}return[]}}}e.MaxPointDecimator=c,c.KEY="MaxPointDecimator";class l extends o{constructor(){super(),this._key=l.KEY,this._name="XYPointDecimator",this._customFunc=function(t,e,n,r){let i={},o=[];for(let a=e;a<n;++a){let e=t.get(a),n=Math.floor(r(e.y));i.hasOwnProperty(n.toString())||(o.push(e),i[n]=!0)}return o}}}e.XYPointDecimator=l,l.KEY="XYPointDecimator";class h{constructor(){this._name="Simple Unimplemented Decimator"}initialize(t,e,n){this._xValueToCoord=t,this._xCoordToValue=e,this._yValueToCoord=n}getKey(){return this._key}getName(){return this._name}getValues(){return this._decimatedValues}decimateValues(t,n,r){if(this._decimatedValues=[],0===r.length())return this._decimatedValues;let i,o,a=e.findFirstInsertionIdx(r,t),s=e.findLastInsertionIdx(r,n);a>0&&--a,s<r.length()&&++s,a<r.length()&&(i=Math.floor(this._xValueToCoord(r.get(a).x)),--i),o=t?this._xValueToCoord(t):a;let u=a;for(let t=a;t<s;++t){let e=r.get(t),n=Math.floor(this._xValueToCoord(e.x)),a=t+1;n!==i&&(this._decimatedValues=this._decimatedValues.concat(this._customFunc(r,u,a,this._yValueToCoord,this._xValueToCoord,this._xCoordToValue(o),this._xCoordToValue(n))),o=n,i=n,u=a)}return u!==r.length()&&(this._decimatedValues=this._decimatedValues.concat(this._customFunc(r,u,u+1,this._yValueToCoord,this._xValueToCoord,this._xCoordToValue(o),Number.MAX_VALUE))),this._decimatedValues}}e.CustomContinuousXYDecimator=h;class f extends h{constructor(){super(),this._key=f.KEY,this._name="Avg",this._customFunc=s}}function d(t,n,r,i,o,a){let s=[],u=[],c=Math.ceil(t(Number.MAX_VALUE));if(c<0)return;let l=[];for(let t=0;t<=c+1;++t)l.push(n(t));for(let n=0;n<a.length;++n){let r,h,f=a[n],d=e.findFirstInsertionIdx(a[n],i),p=e.findLastInsertionIdx(a[n],o);d>0&&--d,p===f.length()&&--p,u[n]=Array.apply(null,Array(c)).map(Number.prototype.valueOf,0);for(let e=d;e<p;++e){r=f.get(e),h=f.get(e+1);let a=Math.floor(t(r.x)),s=Math.floor(t(h.x)),c=h.x-r.x,d=0===c?0:h.y/c;if(a===s)if(void 0===i||r.x>i&&h.x<o)u[n][a]+=d;else{let t=1/(l[a+1]-l[a]);h.x<o?u[n][a]+=(h.x-l[a])*d*t:u[n][a]+=(l[a+1]-r.x)*d*t}else{let t=1/(l[a+1]-l[a]),e=i?Math.max(i,r.x):r.x,c=l[a+1];u[n][a]+=(c-e)*d*t;for(let t=a+1;t<s;++t)u[n][t]+=d;t=1/(l[s]-l[s-1]);let f=o?Math.min(o,h.x):h.x,p=l[s];u[n][s]+=(f-p)*d*t}}s[n]=[];let g=u[n];for(let t=0;t<g.length;++t)s[n][t]={x:l[t],y:u[n][t]}}return s}e.AvgContinuousDecimator=f,f.KEY="AvgContinuousDecimator",e.sumMultiXYSeriesValues=d;class p{constructor(){}initialize(t,e,n){this._xValueToCoord=t,this._xCoordToValue=e,this._yValueToCoord=n}getKey(){return p.KEY}getName(){return""}getValues(){return this._decimatedValues}decimateValues(t,e,n){return this._decimatedValues=d(this._xValueToCoord,this._xCoordToValue,this._yValueToCoord,t,e,n),this._decimatedValues}}e.SummedValueMultiXYSeriesDecimator=p,p.KEY="SummedValueMultiXYSeriesDecimator";class g extends p{constructor(){super()}getKey(){return g.KEY}getName(){return""}decimateValues(t,e,n){this._decimatedValues=d(this._xValueToCoord,this._xCoordToValue,this._yValueToCoord,t,e,n);for(let t=0;t<this._decimatedValues[0].length;++t){let e=0;for(let n=0;n<this._decimatedValues.length;++n)this._decimatedValues[n][t].y&&(e+=this._decimatedValues[n][t].y);if(e>0){let r=100/e;for(let e=0;e<n.length;++e)this._decimatedValues[e][t].y&&(this._decimatedValues[e][t].y=this._decimatedValues[e][t].y*r)}}return this._decimatedValues}}e.ResidencyDecimator=g,g.KEY="ResidencyDecimator";class _{constructor(){}initialize(t,e,n){this._xValueToCoord=t,this._xCoordToValue=e,this._yValueToCoord=n}getKey(){return _.KEY}getName(){return""}getValues(){return this._decimatedValues}decimateValues(t,e,n){return this._decimatedValues=d(this._xValueToCoord,this._xCoordToValue,this._yValueToCoord,t,e,[n])[0],this._decimatedValues}}e.SummedValueXYSeriesDecimator=_,_.KEY="SummedValueXYSeriesDecimator";class m extends r.CandlestickValue{constructor(t){super(t,void 0,void 0,void 0,void 0),this._bucketPts=0}}e.NEWSDecimationValue=m;class v{initialize(t,e,n){this._xValueToCoord=t,this._xCoordToValue=e,this._yValueToCoord=n}getKey(){return this._key}getName(){return""}getValues(){return this._buckets}_dumpBucket(t,e,n){let r="valuesInBucket = "+n.toFixed(0)+", ";return r+="([avg]Time delta, avgValue) = ("+(e.x-t).toFixed(2)+", "+e.y.toFixed(2)+"), ",r+="(entry, min, max, exit) = ("+e.entry.toFixed(2)+", "+e.min.toFixed(2)+", "+e.max.toFixed(2)+", "+e.exit.toFixed(2)+")",r}decimateValues(t,e,n){throw"Error need to implement decimate code"}}e.NEWSBaseDecimator=v;class y extends v{constructor(){super(),this._key=y.KEY}createNewBucket(t,e){t.entry=e.y,t.exit=e.y,t.min=e.y,t.max=e.y,t.x=0,t.y=0,t._bucketPts=0,this.addToBucket(t,e)}addToBucket(t,e){t.x+=e.x,t.y+=e.y,t.min=Math.min(t.min,e.y),t.max=Math.max(t.max,e.y),t.exit=e.y,t._bucketPts++}finalizeBucket(t,e){void 0!==e&&e!==t._bucketPts&&console.log("AverageTime: mismatching pt calculation"),0===t._bucketPts&&console.log("AverageTime: 0 points"),t.x=t.x/t._bucketPts,t.y=t.y/t._bucketPts}decimateValues(t,n,r){if(this._buckets=[],0===r.length())return this._buckets;let i,o=e.findFirstInsertionIdx(r,t),a=e.findLastInsertionIdx(r,n);o>0&&--o,a<r.length()&&++a;let s=0;o<r.length()&&(s=Math.floor(this._xValueToCoord(r.get(o).x)),--s);for(let t=o;t<a;++t){let e=r.get(t),n=Math.floor(this._xValueToCoord(e.x));n!==s?(i&&(this.finalizeBucket(i),this._buckets.push(i)),i=new m,this.createNewBucket(i,e),s=n):this.addToBucket(i,e)}return i&&(this.finalizeBucket(i),this._buckets.push(i)),this._buckets}}e.NEWSPointDecimator=y,y.KEY="NEWSPointDecimator";class x extends v{constructor(t){super(),this._weightedSums={},this._prevX=0,this._prevX=0,this._key=x.KEY,t&&(this._states=t)}createNewBucket(t,e){let n;this._weightedSums={},t._bucketPts=0,this._isYObject||(n=e.y,t.x=0,t.y=n,t.entry=n,t.exit=n,t.min=n,t.max=n),this.addToBucket(t,e)}addToStateValueToBucket(t,e){0!==e&&(this._weightedSums[t]||(this._weightedSums[t]=0),this._weightedSums[t]+=e)}addToBucket(t,e){if(this._isYObject)if(this._states)for(let t in e.y)this.addToStateValueToBucket(this._states[t],(e.x-this._prevX)*e.y[t]);else for(let t in e.y)this.addToStateValueToBucket(t,(e.x-this._prevX)*e.y[t]);else{let n;n=this._states?this._states[e.y]:e.y,t.exit=n,this.addToStateValueToBucket(n,e.x-this._prevX)}t.x+=e.x,t._bucketPts++,this._prevX=e.x}finalizeBucket(t,e){var n;void 0!==e&&e!==t._bucketPts&&console.log("AverageTime: mismatching pt calculation"),0===t._bucketPts&&console.log("AverageTime: 0 points"),t.x=t.x/t._bucketPts;var r=-Number.MAX_VALUE;let i=-Number.MAX_VALUE,o=Number.MAX_VALUE;for(let e in this._weightedSums){if(void 0!==this._weightedSums[e]){let t=this._weightedSums[e];t>r&&(n=e,r=t)}let a=this._yValueToCoord(e);a>i&&(t.min=e,i=a),a<o&&(t.max=e,o=a)}void 0!==n?t.y=n:this._isYObject||(t.min=t.y,t.max=t.y)}decimateValues(t,n,r){if(this._buckets=[],0===r.length())return this._buckets;let i,o=e.findFirstInsertionIdx(r,t),a=e.findLastInsertionIdx(r,n);o>0&&--o,a<r.length()&&++a;let s=0;o<r.length()&&(this._isYObject="object"==typeof r.get(o).y,s=Math.floor(this._xValueToCoord(r.get(o).x)),--s);for(let t=o;t<a;++t){let e=r.get(t),n=Math.floor(this._xValueToCoord(e.x));if(n!==s){if(i&&(this.finalizeBucket(i),this._buckets.push(i)),s+1<n){let t=new m;this.createNewBucket(t,e),this.finalizeBucket(t),t.x=this._xCoordToValue(n-1),this._buckets.push(t),this._prevX=t.x}i=new m,this.createNewBucket(i,e),s=n}else this.addToBucket(i,e)}return i&&(this.finalizeBucket(i),this._buckets.push(i)),this._buckets}}e.NEWSStateDecimator=x,x.KEY="NEWSStateDecimator";class b{initialize(t,e,n){this._data=[],this._xValueToCoord=t,this._xCoordToValue=e,this._yValueToCoord=n}getKey(){return b.KEY}getName(){return""}getValues(){return this._data}setRectLimit(t){return this._rectLimit=t,this}decimateValues(t,e,n){this._data=[];let r=n.getData();for(let t=0;t<r.length;++t)this._data=this._data.concat(r[t]);return this._rectLimit&&(this._data.sort((function(t,e){return t.traceValue.dx>e.traceValue.dx?-1:t.traceValue.dx<e.traceValue.dx?1:0})),this._data=this._data.splice(0,this._rectLimit)),this._data}}e.FlameChartRectLimitDecimator=b,b.KEY="FlameChartRectLimitDecimator";class w{constructor(){this._minRectDelta=1}initialize(t,e,n){this._data=[],this._xValueToCoord=t,this._xCoordToValue=e,this._yValueToCoord=n}getKey(){return w.KEY}getName(){return""}getValues(){return this._data}setPixelWidth(t){return this._minRectDelta=t-1,this}setUserPixelFunction(t){this._userPixelFunction=t}mergeRects(t){let e=[],n=Math.ceil(this._xValueToCoord(Number.MAX_VALUE))+1,r=[];for(let t=0;t<=n;++t)r.push(this._xCoordToValue(t));let i=0;n>1&&(i=this._xCoordToValue(1)-this._xCoordToValue(0));for(let n=0;n<t.length;++n){let o=t[n];if(void 0===o)continue;let a,s,u,c=[],l=-Number.MAX_VALUE,h=o.length;for(let t=0;t<h;t++){let e,n=o[t];if(a&&a.traceValue.key===n.traceValue.key&&a.traceValue.x+a.traceValue.dx===n.traceValue.x)a.traceValue.dx+=n.traceValue.dx;else{if(s=Math.floor(this._xValueToCoord(n.traceValue.x)),l>s&&(s=l),u=Math.floor(this._xValueToCoord(n.traceValue.x+n.traceValue.dx)),u-s>this._minRectDelta)e={traceValue:{x:r[s],dx:r[u]-r[s],key:n.traceValue.key,name:n.traceValue.name,desc:n.traceValue.desc},decimatedValues:[n.traceValue],depth:n.depth};else{let a={},c=[];for(l=s+this._minRectDelta,n.traceValue.x<r[s]?a[n.traceValue.name]=n.traceValue.x+n.traceValue.dx-r[s]:a[n.traceValue.name]=n.traceValue.dx,c.push(n.traceValue),++t;t<h;++t){if(n=o[t],Math.floor(this._xValueToCoord(n.traceValue.x))>=l){--t;break}if(c.push(n.traceValue),a.hasOwnProperty(n.traceValue.name)||(a[n.traceValue.name]=0),n.traceValue.x+n.traceValue.dx>r[l]){a[n.traceValue.name]+=r[l]-n.traceValue.x,--t;break}a[n.traceValue.name]+=n.traceValue.dx}let f=c[c.length-1];if(1===c.length)e={traceValue:{x:r[s],dx:r[u]-r[s],key:f.key,name:f.name,desc:f.desc},decimatedValues:c,depth:n.depth};else{let t,o=0;for(let e in a){let n=a[e];n>o&&(t=e,o=n)}e={traceValue:{x:r[s],dx:l<r.length?r[l]-r[s]:r[s]+i,key:"merged",name:t,desc:f.desc},decimatedValues:c,depth:n.depth}}}c.push(e),a=e}}a=void 0;let f=0,d=!0;for(let t=0;t<c.length;++t){d=!0;let n=c[t];n.traceValue.dx<i&&(n.traceValue.dx=i),this._userPixelFunction&&(n=this._userPixelFunction(n)),a&&a.traceValue.key===n.traceValue.key&&a.traceValue.name===n.traceValue.name&&(f=a.traceValue.x+a.traceValue.dx,f>=n.traceValue.x&&(a.traceValue.dx=n.traceValue.x+n.traceValue.dx-a.traceValue.x,a.decimatedValues.concat(n.decimatedValues),d=!1)),d&&(e.push(n),a=n)}}return e}decimateValues(t,e,n){return this._data=this.mergeRects(n.getData()),this._data}}e.FlameChartMergeRectDecimator=w,w.KEY="FlameChartMergeRectDecimator";class M{initialize(t,e,n,r){this._decimatedValues=[],this._xValueToCoord=t,this._xCoordToValue=e,this._yValueToCoord=n,this._states=r}getKey(){return M.KEY}getName(){return""}getValues(){return this._decimatedValues}decimateValues(t,n,r){this._decimatedValues=new Array(this._states.length).fill(0).map(()=>new Array);let i=Math.ceil(this._xValueToCoord(Number.MAX_VALUE));if(i<0)return;let o,a,s={},u={};this._states.forEach((t,e)=>{u[t]=e,s[t]=Array.apply(null,Array(i)).map(Number.prototype.valueOf,0)});let c=e.findFirstInsertionIdx(r,t),l=e.findLastInsertionIdx(r,n);c>0&&--c;let h=[];for(let t=0;t<=i;++t)h.push(this._xCoordToValue(t));let f=1/(h[1]-h[0]);for(let e=c;e<l;++e){o=r.get(e),a=o.x+o.dx;let i=Math.floor(this._xValueToCoord(o.x)),u=Math.floor(this._xValueToCoord(a));if(i===u)s[o.name][i]+=o.dx*f;else{let e=t?Math.max(t,o.x):o.x,r=h[i+1];s[o.name][i]+=(r-e)*f;for(let t=i+1;t<u;++t)s[o.name][t]+=1;let c=n?Math.min(n,a):a,l=h[u];s[o.name][u]+=(c-l)*f}}let d=[];for(let t=0;t<i;++t)d[t]={x:h[t],y:0};for(let t=0;t<this._states.length;++t){let e=s[this._states[t]];if(e)for(let n=0;n<e.length;++n){let e=s[this._states[t]][n]?s[this._states[t]][n]:0;this._decimatedValues[t][n]={x:h[n],y:100*e}}else this._decimatedValues[t]=d}return this._decimatedValues}}e.TraceResidencyDecimator=M,M.KEY="TraceResidencyDecimator";class k{initialize(t,e,n,r){this._decimatedValues=[],this._xValueToCoord=t,this._xCoordToValue=e,this._yValueToCoord=n,this._states=r}getKey(){return k.KEY}getName(){return""}getValues(){return this._decimatedValues}decimateValues(t,n,r){let i,o,a=Math.ceil(this._xValueToCoord(Number.MAX_VALUE));if(a<0)return;let s=e.findFirstInsertionIdx(r,t),u=e.findLastInsertionIdx(r,n);s>0&&--s,this._decimatedValues=[];for(let t=0;t<=a;++t)this._decimatedValues[t]=new m(this._xCoordToValue(t));let c={};this._states.forEach((t,e)=>{c[t]=e});for(let t=s;t<u;++t){i=r.get(t),o=i.x+i.dx;let e=Math.floor(this._xValueToCoord(i.x)),n=Math.floor(this._xValueToCoord(o));if(this._decimatedValues[e].entry||(this._decimatedValues[e].entry=c[i.name],this._decimatedValues[e].exit=c[i.name],this._decimatedValues[e].min=c[i.name],this._decimatedValues[e].max=c[i.name]),e===n)this._decimatedValues[e].exit=c[i.name],this._decimatedValues[e].min=Math.min(this._decimatedValues[e].min,c[i.name]),this._decimatedValues[e].max=Math.max(this._decimatedValues[e].max,c[i.name]);else{this._decimatedValues[e].exit=c[i.name],this._decimatedValues[e].min=Math.min(this._decimatedValues[e].min,c[i.name]),this._decimatedValues[e].max=Math.max(this._decimatedValues[e].max,c[i.name]);for(let t=e+1;t<=n;++t)this._decimatedValues[t].entry=c[i.name],this._decimatedValues[t].exit=c[i.name],this._decimatedValues[t].min=c[i.name],this._decimatedValues[t].max=c[i.name]}}for(let t=0;t<this._decimatedValues.length;++t){let e=this._decimatedValues[t],n=e.exit;e.entry=this._states[e.entry],e.exit=this._states[n],e.y=this._states[n],e.min=this._states[e.min],e.max=this._states[e.max]}return this._decimatedValues}}e.TraceStateDecimator=k,k.KEY="TraceStateDecimator";class T{initialize(t,e,n){this._data=[],this._xValueToCoord=t,this._xCoordToValue=e,this._yValueToCoord=n}getKey(){return T.KEY}getName(){return""}getValues(){return this._data}mergeMarkers(t){let e=[],n=-Number.MAX_VALUE;for(let r=0;r<t.length;++r){let i=t[r],o=this._xValueToCoord(i.x);o!==n&&(e.push(i),n=o)}return e}decimateValues(t,e,n){let r=n.getData();if(void 0!==t&&void 0!==e){let n=[];for(let i=0;i<r.length;++i){let o=r[i];o.x<e&&o.x>t?n.push(o):o.dx&&o.x+o.dx<e&&o.x+o.dx>t&&n.push(o)}this._data=this.mergeMarkers(n)}else this._data=this.mergeMarkers(r);return this._data}}e.SimpleMarkerDecimator=T,T.KEY="SimpleMarkerDecimator";class S{constructor(){}initialize(t,e,n){this._xValueToCoord=t,this._xCoordToValue=e,this._yValueToCoord=n}getKey(){return p.KEY}getName(){return""}getValues(){return this._decimatedValues}decimateValues(t,n,r){this._decimatedValues=[];let i=[],o=Math.ceil(this._xValueToCoord(Number.MAX_VALUE));if(o<0)return;let a=[];for(let t=0;t<=o+1;++t)a.push(this._xCoordToValue(t));for(let s=0;s<r.length;++s){let u,c,l=r[s],h=e.findFirstInsertionIdx(r[s],t),f=e.findLastInsertionIdx(r[s],n);h>0&&--h,f===l.length()&&--f,i[s]=Array.apply(null,Array(o)).map(Number.prototype.valueOf,0);for(let e=h;e<f;++e){u=l.get(e),c=l.get(e+1);let r=Math.floor(this._xValueToCoord(u.x)),o=Math.floor(this._xValueToCoord(c.x)),h=c.x-u.x,f=0===h?0:c.y/h;if(r===o)if(void 0===t||u.x>t&&c.x<n)i[s][r]+=f;else{let t=1/(a[r+1]-a[r]);c.x<n?i[s][r]+=(c.x-a[r])*f*t:i[s][r]+=(a[r+1]-u.x)*f*t}else{let e=1/(a[r+1]-a[r]),l=t?Math.max(t,u.x):u.x,h=a[r+1];i[s][r]+=(h-l)*f*e;for(let t=r+1;t<o;++t)i[s][t]+=f;e=1/(a[o]-a[o-1]);let d=n?Math.min(n,c.x):c.x,p=a[o];i[s][o]+=(d-p)*f*e}}this._decimatedValues[s]=[];let d=i[s];for(let t=0;t<d.length;++t)this._decimatedValues[s][t]={x:a[t],y:i[s][t]?i[s][t]:0}}return this._decimatedValues}}e.XYHeatMapDecimator=S,S.KEY="XYHeatMapDecimator";let C=[new g,new a,new u,new c,new f,new w,new b,new y,new x,new T,new l,new _,new p,new M];e.InternalDecimatorMap={},C.forEach((function(t){e.InternalDecimatorMap[t.getKey()]=t}))},function(t,n){t.exports=e},function(t,e,n){var r=n(35),i=n(242),o=n(243),a=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":a&&a in Object(t)?i(t):o(t)}},function(t,e,n){var r=n(16).Symbol;t.exports=r},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){var r=n(273),i=n(92),o=n(274),a=n(142),s=n(275),u=n(34),c=n(129),l=c(r),h=c(i),f=c(o),d=c(a),p=c(s),g=u;(r&&"[object DataView]"!=g(new r(new ArrayBuffer(1)))||i&&"[object Map]"!=g(new i)||o&&"[object Promise]"!=g(o.resolve())||a&&"[object Set]"!=g(new a)||s&&"[object WeakMap]"!=g(new s))&&(g=function(t){var e=u(t),n="[object Object]"==e?t.constructor:void 0,r=n?c(n):"";if(r)switch(r){case l:return"[object DataView]";case h:return"[object Map]";case f:return"[object Promise]";case d:return"[object Set]";case p:return"[object WeakMap]"}return e}),t.exports=g},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,n){var r=n(40),i=n(378),o=n(379),a=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":a&&a in Object(t)?i(t):o(t)}},function(t,e,n){var r=n(14).Symbol;t.exports=r},function(t,e,n){var r=n(166),i=n(403),o=n(30);t.exports=function(t){return o(t)?r(t,!0):i(t)}},function(t,e,n){var r=n(39),i=n(18);t.exports=function(t){return"symbol"==typeof t||i(t)&&"[object Symbol]"==r(t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(1),i=n(11),o=n(32),a=n(2),s=n(22),u=n(5),c=n(44),l=n(10),h=n(20),f=n(3),d=n(33);class p extends h.BaseSeries{constructor(t,e,n,r,i,o){super(t,e,r,i,o,n),this._colors=e.colors,this.setData(e)}static canRender(t){return 0!==(t.renderType&i.RenderType.Line||t.renderType&i.RenderType.Area||t.renderType&i.RenderType.Scatter||t.renderType&i.RenderType.DirectionalArrow)&&1===t.data.length&&!(t.renderType&i.RenderType.Stacked)&&t.data[0]&&t.data[0].hasOwnProperty("values")}initializeClasses(){let t;this._layer.renderType&i.RenderType.Scatter?t="chart-scatter":this._layer.renderType&i.RenderType.Line?t="chart-line":this._layer.renderType&i.RenderType.Area?t="chart-area":this._layer.renderType&i.RenderType.DirectionalArrow&&(t="chart-arrow"),this._classes=this.getClassNames(t),this._selectionClasses=this.getSelectionClasses(t),this._layer.renderType&i.RenderType.Stacked&&(this._classes+=" chart-stacked")}setData(t,e=0){this._data=t.data[e],Array.isArray(this._data.values)?this._values=new a.SimpleBuffer(this._data.values):this._values=this._data.values,this.initializeClasses()}applyStyles(){if(super.applyStyles(),this._data.css){let t=this._data.css.style;if(t)for(let e=0;e<this._d3Elems.length;++e)for(let n in t)this._d3Elems[e].style(n,t[n])}}getDecimationName(){return this._layer.decimator?a.getSelectionName(this._layer.decimator.getName()):""}getInterpolateType(){let t=f.curveLinear;switch(this._layer.interpolateType){case i.InterpolateType.StepBefore:t=f.curveStepBefore;break;case i.InterpolateType.StepAfter:t=f.curveStepAfter}return t}getName(){return this._data.name?this._data.name:""}isYContinuousSeries(){if(Array.isArray(this._data.values)){if(this._data.values.length)return!isNaN(this._data.values[0].y)}else{let t=this._data.values;if(t.length()>0)return!isNaN(t.get(0).y)}return!0}getCss(){return this._data.css}getDiscreteXValues(t){return u.getKeys(this._data.values,(function(t){return[t.x]}))}getDiscreteYValues(){return u.getKeys(this._data.values,(function(t){return[t.y]})).reverse()}getXMinMax(){let t=[Number.MAX_VALUE,Number.MIN_VALUE],e=this._values.length();for(let n=0;n<e;++n)t[0]=Math.min(t[0],this._values.get(n).x),t[1]=Math.max(t[1],this._values.get(n).x);let n=this.getXScalingInfo().baseScale.scalar;return t[0]=t[0]*n,t[1]=t[1]*n,t}getYMinMax(){let t=[Number.MAX_VALUE,Number.MIN_VALUE],e=this._values.length();for(let n=0;n<e;++n)t[0]=Math.min(t[0],this._values.get(n).y),t[1]=Math.max(t[1],this._values.get(n).y);return t}decimateData(t,e,n,r){let a=this;if(a._worker&&(a._worker.terminate(),a._worker=null),a.isXContinuousSeries()){let s;if(a._layer.decimator)s=a._layer.decimator;else if(a._layer.renderType&i.RenderType.Raw)s=new o.XYDummyDecimator;else if(a._layer.renderType&i.RenderType.Line)s=a._d3YAxis.isBanded()?new o.NEWSStateDecimator:new o.NEWSPointDecimator;else if(a._layer.renderType&i.RenderType.Area)s=a._d3YAxis.isBanded()?new o.NEWSStateDecimator:new o.AvgContinuousDecimator;else{if(!(a._layer.renderType&i.RenderType.Scatter)){if(a._layer.renderType&i.RenderType.DirectionalArrow)return new Promise((function(t,e){a.setOutputData(a._values),t()}));throw"Unexpected that there is no way to decimate the given data"}s=new o.XYPointDecimator}let u=n.getScale(),c=r.getScale();return(a._layer.enableWebWorkers||a._d3Chart.getOptions().enableWebWorkers)&&o.InternalDecimatorMap[s.getKey()]?new Promise((function(n,r){a._worker=l.createDecimatorWorker(s,t,e,a._d3XAxis,a._d3YAxis,a._values.getData(),void 0,(function(t){a._worker=null,a.setOutputData(t),n()}),(function(r){a._worker=null,s.initialize(u,u.invert,c),a.setOutputData(s.decimateValues(t,e,a._values)),n()}))})):new Promise((function(n,r){s.initialize(u,u.invert,c),a.setOutputData(s.decimateValues(t,e,a._values)),n()}))}return new Promise((function(t,e){a.setOutputData(a._values),t()}))}getTooltipText(t){return isNaN(t)?t:(t*this.getYScalingInfo().baseScale.scalar).toFixed(2)+this.getYScalingInfo().baseScale.units}getTooltipMetrics(t,e){let n={source:t,group:"",metrics:{}};if(this._layer.renderType&i.RenderType.Raw);else if(this._outputData&&this._outputData.length()>0&&e.xEnd)if(this._layer.renderType&i.RenderType.Line||this._layer.renderType&i.RenderType.Area){if(!this._d3XAxis.isBanded()){let t=a.bisectBuffer((function(t){return t.x})).left(this._outputData,e.xEnd);t>=this._outputData.length()&&(t=this._outputData.length()-1),this._layer.interpolateType&&this._layer.interpolateType===i.InterpolateType.StepAfter&&--t,t=l.getBoundedPixelValue(t,this._outputData.length()-1);let r=this._data.name?this._data.name:"";n.metrics[r]=this.getTooltipText(this._outputData.get(t).y),void 0!==this._outputData.get(t).min&&void 0!==this._outputData.get(t).max&&this._outputData.get(t).max!==this._outputData.get(t).min&&(n.metrics[r+" Min"]=this.getTooltipText(this._outputData.get(t).min),n.metrics[r+" Max"]=this.getTooltipText(this._outputData.get(t).max))}}else this._layer.renderType,i.RenderType.Scatter;else if(e.selection){let t=this.getYScalingInfo().baseScale.scalar,r=this.getYScalingInfo().baseScale.units;for(let i=0;i<this._values.length();++i){let o=this._values.get(i).x,a=this._values.get(i).y;if(o==e.selection){n.metrics[this._data.name]=(a*t).toFixed(2)+r;break}}}return[n]}getLegendInfo(){let t=[];if(this._layer.renderType===i.RenderType.DirectionalArrow)return t;for(let e=0;e<this._d3Elems.length;++e){let n=this._data.name;this._layer.decimator&&(n+=" "+this._layer.decimator.getName());let r="fill",o="rect";this._layer.renderType&i.RenderType.Line?(r="stroke",o="line"):this._layer.renderType&i.RenderType.Scatter&&(o="circle");try{let i=this._d3Elems[e].style(r);t.push({key:n,color:i,opacity:this._d3Elems[e].style("opacity"),shape:o}),""!==i&&this._d3Chart.getRenderer().getColorManager().setColor(n,t[t.length-1].color)}catch(e){t.push({key:n,color:this._d3Chart.getRenderer().getColorManager().getColor(n),opacity:"1",shape:o})}}return t}getAngle(t,e){return 180*Math.atan2(e.y-t.y,e.x-t.x)/Math.PI}getAnimateDuration(){return void 0!==this._d3Chart.getOptions().animateDuration?this._d3Chart.getOptions().animateDuration:1e3}renderArrows(t,e){let n,r=this,i=r._d3svg.selectAll(r._selectionClasses+".line"),o=r._d3svg.selectAll(r._selectionClasses+".arrow");if(i.empty()){if(i=this._d3svg.append("path").classed(this._classes,!0).classed("line",!0).attr("fill","none").attr("stroke-width",1).attr("stroke",e),o=u.Arrow.createArrow(r._d3svg,4).classed(this._classes,!0).classed("arrow",!0).attr("fill",e),this._data.css)for(let t in this._data.css.classes)i.classed(t,!0);this._d3Elems.push(i),this._d3Elems.push(o)}n=f.line().x(r.xIndexMap).y(r.yIndexMap),n.curve(this.getInterpolateType()),this.getOutputData().length()>0&&(i.attr("d",n(t)),u.animatePath(i,r.getAnimateDuration()),u.Arrow.animateArrow(i,o,r.getAnimateDuration()))}optimizeLinePath(t){let e=[],n=this.getOutputData().length();if(n>0){let r={x:this.xIndexMap(0),y:Math.round(t(0))};e.push(r);for(let i=1;i<n;++i){let o={x:this.xIndexMap(i),y:Math.round(t(i))};o.y===r.y&&i!==n-1||(e[e.length-1]!==r&&e.push(r),e.push(o)),r=o}}return e}renderLines(t){let e=this,n=(this._layer.renderType&i.RenderType.Stacked)===i.RenderType.Stacked,o=e._d3svg.select(e._selectionClasses);if(o.empty()){let n=function(){e.configureItemInteraction(f.select(this),void 0,void 0),(e._layer.renderType&i.RenderType.Raw||e._layer.onHover)&&f.select(this).on("mouseenter",(function(){let t={caller:e._d3Chart.getElement(),selection:e.getName(),event:r.EventType.HoverStart,data:e.getName(),tooltip:e._d3Chart.getTooltip()};e._d3Chart.onHover(t),e._layer.onHover&&e._layer.onHover(t)})).on("mouseleave",(function(){let t={caller:e._d3Chart.getElement(),selection:e.getName(),event:r.EventType.HoverEnd,tooltip:e._d3Chart.getTooltip(),data:e.getName()};e._d3Chart.onHover(t),e._layer.onHover&&e._layer.onHover(t)}))};if(o=this._d3svg.append("path").classed(this._classes,!0).attr("id",e._classes).attr("fill","none").attr("stroke-width",1).attr("stroke",t).each(n),this._data.css)for(let t in this._data.css.classes)o.classed(t,!0);if(this._data.description){let n="0%",i="-.5em";e._data.description.text&&(n=e._data.description.percentage?`${e._data.description.percentage}%`:"0%",i=e._data.description.alignment===r.Alignment.Bottom?"1em":"-.5em"),this._d3svg.append("text").classed(e._classes,!0).classed("title",!0).attr("dy",i).attr("fill",t).append("textPath").attr("startOffset",n).attr("xlink:href","#"+e._classes).text(this._data.description.text)}}if(!n&&this._outputData.length()>0&&this._outputData.get(0).hasOwnProperty("min")&&this._outputData.get(0).hasOwnProperty("max")&&this._outputData.get(0).hasOwnProperty("entry")&&this._outputData.get(0).hasOwnProperty("exit")){let t=[];for(let e=0;e<this._outputData.length();++e){let n=this._outputData.get(e),r=n.entry;t.push({x:n.x,y:n.entry}),r!==n.min&&(t.push({x:n.x,y:n.min}),r=n.min),r!==n.max&&(t.push({x:n.x,y:n.max}),r=n.max),r!==n.exit&&t.push({x:n.x,y:n.exit})}let n=f.line().x((function(t){return e.xMap(t.x)})).y((function(t){return e.yMap(t.y)})).curve(this.getInterpolateType());o.attr("d",n(t))}else{let t;t=n?e.optimizeLinePath(e.yIndexPostStackMap):e.optimizeLinePath(e.yIndexMap);let r=f.line().x(t=>t.x).y(t=>t.y).curve(this.getInterpolateType());o.attr("d",r(t))}this._d3Elems.push(o)}optimizeAreaPath(t,e){let n=[],r=this.getOutputData().length();if(r>0){let i={x:this.xIndexMap(0),y0:Math.round(t(0)),y1:Math.round(e(0))};n.push(i);for(let o=1;o<r;++o){let a={x:this.xIndexMap(o),y0:Math.round(t(o)),y1:Math.round(e(o))};a.y0===i.y0&&a.y1===i.y1&&o!==r-1||(n[n.length-1]!==i&&n.push(i),n.push(a)),i=a}}return n}renderAreas(t,e){let n,a=this,s=(this._layer.renderType&i.RenderType.Stacked)===i.RenderType.Stacked,u=a._d3svg.select(this._selectionClasses);if(u.empty()&&(u=this._d3svg.append("path").classed(this._classes,!0).attr("id",a._classes).attr("fill",e),this._data.description)){let t="0%",n="-.5em";a._data.description&&(t=a._data.description.percentage?`${a._data.description.percentage}%`:"0%",n=a._data.description.alignment===r.Alignment.Bottom?"1em":"-.5em"),this._d3svg.append("text").classed(a._classes,!0).classed("title",!0).attr("dy",n).attr("fill",e).append("textPath").attr("startOffset",t).attr("xlink:href","#"+a._classes).text(this._data.description.text)}this.configureItemInteraction(u,void 0,void 0),s?n=this.optimizeAreaPath(a.yIndexPreStackMap,a.yIndexPostStackMap):this._outputData.length()>0&&this._outputData.get(0)instanceof o.NEWSDecimationValue?(u.attr("stroke",e),n=this.optimizeAreaPath((function(t){return a.yMap(a._outputData.get(t).min)}),(function(t){return a.yMap(a._outputData.get(t).max)}))):n=this.optimizeAreaPath((function(t){return a.yMap(0)}),a.yIndexMap);let c=f.area().x(t=>t.x).y0(t=>t.y0).y1(t=>t.y1).curve(this.getInterpolateType());u.attr("d",c(n)),this._d3Elems.push(u)}renderCirclePoints(t,e,n){}render(t){let e=this;if(this._d3Elems=[],this._layer.forceUpdate){let t=this._classes.replace(/ /g,".");this._d3svg.selectAll(t).remove(),this.initializeClasses(),this._layer.forceUpdate=!1}let n=e._d3XAxis.getScale().copy();n.clamp&&n.clamp(!1);let r=e._d3YAxis.getScale().copy();r.clamp&&r.clamp(!1);let o=n.bandwidth?n.bandwidth()/2:0,a=r.bandwidth?r.bandwidth()/2:0,s=f.range(0,this._outputData.length());e.xMap=function(t){return n(t)+o},e.yMap=function(t){let e=r(t);return void 0===e&&(e=0),e+a},e.xIndexMap=function(t){return e.xMap(e._outputData.get(t).x)},e.yIndexMap=function(t){return e.yMap(e._outputData.get(t).y)},e.yIndexPreStackMap=function(n){return e.yMap(t[n])},e.yIndexPostStackMap=function(n){return t[n]+=e._outputData.get(n).y,e.yMap(t[n])};let u,c=e._d3Chart.getGraphGroup();e._layer.getAbsolutePosition=function(t){let n=c.node().getBoundingClientRect();return n?{x:n.left+e.xMap(t.x),y:n.top+e.yMap(t.y)}:{x:void 0,y:void 0}},e._data.css&&(u=e._data.css.style.color),u||(u=e._colors&&e._colors[e.getName()]?e._colors[e.getName()]:e._d3Chart.getRenderer().getColorManager().getColor(e.getName())),this.initializeContextMenuItems(),e._layer.renderType&i.RenderType.Line?e.renderLines(u):e._layer.renderType&i.RenderType.Area?e.renderAreas(s,u):e._layer.renderType&i.RenderType.Scatter&&(e._d3Chart.getOptions().forceSvgRenderer?this.renderCirclePoints=g.prototype.renderCirclePoints.bind(this):(this.renderCirclePoints=_.prototype.renderCirclePoints.bind(this),this.focus=_.prototype.focus.bind(this),this.unfocus=_.prototype.unfocus.bind(this),this.select=_.prototype.select.bind(this),this.unselect=_.prototype.unselect.bind(this)),e.renderCirclePoints(s,u,3)),e._layer.renderType&i.RenderType.DirectionalArrow&&e.renderArrows(s,u),e.applyStyles()}getRenderedYRange(){let t=[Number.MAX_VALUE,-Number.MAX_VALUE];for(let e=0;e<this.getOutputData().length();++e){let n=this.getOutputData().get(e);n.min?t[0]=Math.min(n.min,t[0]):t[0]=Math.min(n.y,t[0]),n.max?t[1]=Math.max(n.max,t[1]):t[1]=Math.max(n.y,t[1])}return t}}e.XYSeries=p,l.D3Chart.register(p);class g extends p{renderCirclePoints(t,e,n){let i=this,o=function(t){let n=i._outputData.get(t);if(n.info&&n.info.colorKey)return i._d3Chart.getRenderer().getColorManager().getColor(n.info.colorKey);let r=n.y;return i._colors&&i._colors[r]?i._colors[r]:e},s=function(t){let e=i._outputData.get(t),n="";e.info&&e.info.title&&(n=e.info.title),i.configureItemInteraction(f.select(this),i.getOutputData().get(t),n),i._layer.onHover&&f.select(this).on("mouseenter",(function(){let t={caller:i._d3Chart.getElement(),selection:n,event:r.EventType.HoverStart,tooltip:i._d3Chart.getTooltip(),data:e};i._d3Chart.onHover(t),i._layer.onHover(t),i._d3Chart.getTooltip().displayTooltip(0)})).on("mousemove",(function(){f.event.stopPropagation()})).on("mouseleave",(function(){let t={caller:i._d3Chart.getElement(),selection:n,event:r.EventType.HoverEnd,tooltip:i._d3Chart.getTooltip(),data:e};i._d3Chart.onHover(t),i._layer.onHover(t),i._d3Chart.getTooltip().hideTooltip()}))},u=function(t){let e=i._outputData.get(t),n=f.select(this);e.info&&(e.info.colorKey&&n.classed(a.getSelectionName(e.info.colorKey),!0),e.info.title&&n.classed(a.getSelectionName(e.info.title),!0))};if(this._data.showTitleText){let e=this._outputData.getData();e=e.sort((t,e)=>t.x*t.x+t.y*t.y-(e.x*e.x+e.y*e.y)),this._outputData=new a.SimpleBuffer(e);let n,r,s=this._d3Chart.getGraphGroup().node().getBoundingClientRect(),c=[],l=function(t,e,i){let o;o=i?-e-10:10;let u=f.select(t);u.attr("dx",`${o}px`);let h=t.getBoundingClientRect();if(h.left<s.left){if(n){let r=Number(u.attr("y"));return u.attr("y",r-1-(h.height-(n.y-h.y))),l(t,e,!i)}t.remove()}else if(h.y<s.y)console.log("Unable to render XY Scatter text in graph area");else for(let o=0;o<c.length;++o){let s=c[o];if(a.isOverlapping(s,h)){if(!i&&Math.round(h.x)===Math.round(s.x)&&Math.round(h.y)===Math.round(s.y)){let r=Number(u.attr("x")),i=u.text();return i.length>0&&0!==i[0].localeCompare(",")&&u.text(","+i),u.attr("x",r+1+s.width),n=s,l(t,e,!1)}let o=Number(u.attr("y"));return i?(r=s,u.attr("y",o-1-(h.height-(n.y-h.y)))):(n=s,r&&u.attr("y",o-1-(h.height-(r.y-h.y)))),l(t,e,!i)}}c.push(h)},h=function(){r=void 0,n=void 0;let t=this.getBoundingClientRect();l(this,t.width,!1)},d=i._d3svg.selectAll(i.getSelectionClasses("chart-scatter")).filter("text").data(t);d.exit().remove(),d.enter().append("text").classed(i._classes,!0).text((function(t){return i._outputData.get(t).info.title})).attr("x",i.xIndexMap).attr("y",i.yIndexMap).attr("dy",.5).attr("fill",o).each(u).each(h),d.classed(i._classes,!0).text((function(t){return i._outputData.get(t).info.title})).attr("x",i.xIndexMap).attr("y",i.yIndexMap).each(u).each(h)}let c=function(t){if(i._layer.useValueWhenRendering){let e=i.getOutputData().get(t);return f.max([e.value,n])}return n},l=i._d3svg.selectAll(i._selectionClasses).filter("circle").data(t);l.exit().remove(),l.enter().append("circle").classed(this._classes,!0).attr("r",c).attr("cx",i.xIndexMap).attr("cy",i.yIndexMap).attr("fill",o).attr("stroke",o).each(u).each(s).each((function(){i._d3Elems.push(f.select(this))})),l.classed(this._classes,!0).attr("r",c).attr("cx",i.xIndexMap).attr("cy",i.yIndexMap).attr("fill",o).attr("stroke",o).each(u).each(s).each((function(){i._d3Elems.push(f.select(this))}))}}class _ extends p{select(t){if(t){let e=this,n=this._d3svg.classed("selected",!0);n.classed("selected",!0);let r=s.ColorManager.RgbToInt(n.style("stroke")),i=parseInt(n.style("stroke-width"),10);this._d3svg.classed("selected",!1);let o=function(t){let n=t.width/2,o=n/2+i,a=e._graphicsMgr.add(e.getName()+o,e.getName()+o,d.SCALE_MODES.LINEAR,1,(function(){let t=new d.Graphics;return t.beginFill(16777215),t.drawCircle(0,0,o),t.endFill(),t}));return a.x=t.x+n-o,a.y=t.y+n-o,a.tint=r,a.__data__=t.__data__,a},a=this._pixiHelper.getSelection(t);a&&(e._selectTempItems||(e._selectTempItems={}),a.forEach((function(n,r){let i=o(n);e._selectTempItems[`${t}Select${r}`]=i,e._stage.addChildAt(i,0)}))),this._pixiHelper.render()}}unselect(t){this._d3svg.select(".segments").classed("selected",!1);let e=this._pixiHelper.getSelection(t);if(e){let n=this;e.forEach((function(e,r){let i=n._selectTempItems[`${t}Select${r}`];n._stage.removeChild(i),delete n._selectTempItems[`${t}Select${r}`]})),this._pixiHelper.render()}}renderCirclePoints(t,e,n){let i=this,o=this._d3Chart.getElement();this._stage=new d.Container,this._pixiHelper||(this._pixiHelper=new c.PIXIHelper(!this._d3Chart.getOptions().forceCanvasRenderer),this._pixi=this._pixiHelper.getRenderer());let s=this._pixiHelper.addPixiSvg(i._d3svg,this._classes,this._d3XAxis.getRangePixels(),this._d3YAxis.getRangePixels());this._pixiHelper.clearSelections(),s.attr("fill",e).style("fill",e),this._d3Elems.push(s),i.configureItemInteraction(s,void 0,void 0),this._graphicsMgr=new c.GraphicsManager(this._pixi);let u=function(t){if(i._layer.useValueWhenRendering){let e=i.getOutputData().get(t);return f.max([e.value,n])}return n};t.forEach((function(t){let n=u(t),s=i._graphicsMgr.add(i.getName()+n,i.getName()+n,d.SCALE_MODES.LINEAR,1,(function(){let t=new d.Graphics;return t.beginFill(16777215),t.drawCircle(0,0,n),t.endFill(),t}));s.x=i.xIndexMap(t)-n,s.y=i.yIndexMap(t)-n,s.tint=parseInt(function(t){let n=i._outputData.get(t);if(n.info&&n.info.colorKey)return i._d3Chart.getRenderer().getColorManager().getColor(n.info.colorKey);let r=n.y;return i._colors&&i._colors[r]?i._colors[r]:e}(t).substring(1),16),function(t,e){let n=i._outputData.get(e),s="";i._layer.onHover&&n.info&&n.info.title&&(s=n.info.title,i._pixiHelper.addSelection(a.getSelectionName(n.info.title),t)),i._pixiHelper.addInteractionHelper(t,i._d3Chart.getOptions(),void 0,void 0,i._contextMenuItems,i._layer.onHover?()=>{let t={caller:i._d3Chart.getElement(),selection:s,event:r.EventType.HoverStart,data:n,tooltip:i._d3Chart.getTooltip()};i._d3Chart.onHover(t),i._layer.onHover(t),i._d3Chart.getTooltip().displayTooltip(0)}:void 0,i._layer.onHover?()=>{let t={caller:i._d3Chart.getElement(),selection:s,event:r.EventType.HoverEnd,data:n,tooltip:i._d3Chart.getTooltip()};i._d3Chart.onHover(t),i._layer.onHover(t),i._d3Chart.getTooltip().hideTooltip()}:void 0,void 0,o,n,n),i.configureItemInteractionPIXI(t,n,s),n.info&&n.info.title&&i._pixiHelper.addSelection(a.getSelectionName(n.info.title),t)}(s,t),i._stage.addChild(s)})),this._data.showTitleText,this._pixiHelper.render(this._stage)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(1),i=n(5),o=n(19),a=n(33);class s{constructor(t){this._graphicsMap={},this._renderer=t}add(t,e,n,r,i){let o;return t?(this._graphicsMap[t]||(this._graphicsMap[t]=this._renderer.generateTexture(i(),n,r)),o=new a.Sprite(this._graphicsMap[t])):(this._graphicsMap[e]||(this._graphicsMap[e]=this._renderer.generateTexture(i(),n,r)),o=new a.Sprite(this._graphicsMap[e])),o}}e.GraphicsManager=s;e.PIXIHelper=class{constructor(t=!0){this._selectionItems={},a.utils.skipHello(),this._renderer=t?new a.Renderer({transparent:!0,antialias:!0}):new a.CanvasRenderer({transparent:!0,antialias:!0});let e=new a.Graphics;e.beginFill(16777215),e.drawRect(0,0,1,1),e.endFill(),this._rectTexture=this._renderer.generateTexture(e,a.SCALE_MODES.LINEAR,128)}getRenderer(){return this._renderer}createGraphicsManager(){return new s(this._renderer)}addPixiSvg(t,e,n,r){let i=t.node().getElementsByClassName(e);for(let t=0;t<i.length;++t){let e=i[t];e.parentNode.removeChild(e)}let o=t.append("foreignObject").attr("class",e).attr("width",n).attr("height",r),a=o.node().appendChild(this._renderer.view),s=function(){let t=navigator.userAgent.match(/Chrom(?:e|ium)\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/);if(null==t||5!=t.length)return;let e=t.map(t=>parseInt(t,10));return{major:e[1],minor:e[2],build:e[3]}}();if(void 0!==s&&s.major<75){a.style.position="fixed",a.style.top=-window.scrollY+"px";let t=-window.scrollY,e=window.scrollY;document.addEventListener("scroll",(function(){t-=window.scrollY-e,a.style.top=t+"px",e=window.scrollY}))}return this._renderer.resize(n,r),o}createRectange(t,e,n){var r=new a.Sprite(this._rectTexture);return r.width=t,r.height=e,r.tint=n,r}createRectangleContainer(t,e,n,r,i){var o=new a.Container;let s=this.createRectange(n,r,i);return o.addChild(s),o.position.x=t,o.position.y=e,o}renderText(t,e,n=0,r=2,i=.5){this._useWebGLRenderer||(r=1,i=1);let o=e.style("font-size");o=Number(o.substring(0,o.length-2))*r+"px";let s=new a.Text(t,{fill:n,fontFamily:e.style("font-family"),fontSize:o,fontWeight:e.style("font-weight")});return s.scale=new a.Point(i,i),s}addInteractionHelper(t,e,n,a,s,u,c,l,h,f,d){t.interactive=!0;let p,g=this;function _(t){t.stopPropagation(),l&&l.onMouseLeave(t),o.showContextMenu(t.data.originalEvent,f,s)}(n||a)&&t.on("click",(function(t){t.stopPropagation(),a?p?(window.clearTimeout(p),p=null,a({caller:h,event:r.EventType.DoubleClick,data:f})):p=setTimeout((function(){p&&(e.disableSelection||i.onSelectHelper(h,f,d||f),n({caller:h,event:r.EventType.Click,data:f}),p=null)}),300):(e.disableSelection||i.onSelectHelper(h,f,d||f),n({caller:h,event:r.EventType.Click,data:f}))})),s&&s.length&&t.on("rightupoutside",_).on("rightup",_),u&&t.on("mouseover",(function(t){t.target&&(this.__data__=f,u.call(this),l&&(g._tooltipTarget=t.target,l.onMouseEnter(f),l.onMouseMove(f,t.data.originalEvent)))})),c&&t.on("mouseout",(function(t){c.call(this),l&&t.currentTarget===g._tooltipTarget&&l.onMouseLeave(f)}))}clearSelections(){this._selectionItems={}}addSelection(t,e){this._selectionItems.hasOwnProperty(t)||(this._selectionItems[t]=[]),this._selectionItems[t].push(e)}getSelection(t){return this._selectionItems[t]}getStage(){return this._stage}render(t){t?(this._stage=t,this._renderer.render(t)):this._stage&&this._renderer.render(this._stage)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(1),i=n(88),o=n(19),a=n(85),s=n(2),u=n(23),c=n(7),l=n(5),h=n(44),f=n(3),d=n(33);class p{static addNode(t,e,n){return n.hasOwnProperty(t.key)?n[t.key]:(t.node=e.length,n[t.key]=t.node,e.push(t),t.node)}initializeGraph(t){t.nodes||(t.nodes=[]);let e={};for(let n=0;n<t.nodes.length;++n){let r=t.nodes[n];r.node=n,e[r.key]=n}for(let n=0;n<t.links.length;++n){let r=t.links[n];r.source=this.getLinkNode(r.from,t.nodes,e),r.target=this.getLinkNode(r.to,t.nodes,e)}}bind(t,e,n,i){let a,s=this;this.getSelectionString=n||(t=>t.source.key+"-"+t.target.key),this.getTooltipString=i||(t=>{let e;return t.source?e=t.source.key+" → "+t.target.key+"\n"+t.value:(e=t.key+"\n",void 0!==t.value&&(e+=t.value)),e}),this.onHoverChanged=function(n){if(!l.SVGRenderer.IS_RESIZING)return t.focus(e,n),e.onHover&&e.onHover(n),!0},this.nodeHoverStart=function(){let t=this.__data__.key;return a=t,s.onHoverChanged({caller:e,event:r.EventType.HoverStart,data:this.__data__,selection:t})},this.linkHoverStart=function(){let t=s.getSelectionString(this.__data__);return a=t,s.onHoverChanged({caller:e,event:r.EventType.HoverStart,data:this.__data__,selection:t})},this.hoverEnd=function(){let t=s.onHoverChanged({caller:e,event:r.EventType.HoverEnd,data:this.__data__,selection:a});return a=void 0,t},this.getTooltipData=function(t){let e=t.data.data;return e&&this._dataTooltip.setData(s.getTooltipString(e),[]),[]};let c=t=>{t.def&&(t=t.def);let n={tooltip:s._dataTooltip,data:t};return e.onTooltip?e.onTooltip({caller:e,data:n}):this.getTooltipData({caller:e,data:n}),!0};this._dataTooltip=new u.CustomDivTooltip(this._tooltipId,"tooltip-t"),this._dataTooltip.setAnalyticsName(this._tooltipAnalyticsName).setEnterCallback(c).setMoveCallback(c).setPlaceTooltipLeftRight().alwaysRecalcWidth(!0).setDelay(0),this.getLinkNode=(t,e,n)=>"string"==typeof t||t instanceof String?p.addNode({key:t},e,n):p.addNode(t,e,n),this.getNextXY=(t,e,n,i)=>{switch(e){case r.Alignment.Bottom:case r.Alignment.Top:return n.x<i.x?{x:t.x+t.width+10,y:n.y}:{x:t.x-10,y:n.y};case r.Alignment.Left:case r.Alignment.Right:return n.y<i.y?{x:n.x,y:t.y+t.height+10}:{x:n.x,y:t.y-10}}},this.addElbow=(t,e,n,i)=>{let o=e.source.node.from===e.source.node.to,a=0;switch(e.target.alignment){case r.Alignment.Bottom:a=o?(n.y+i.y)/2:(n.y-i.y)*Math.random()+i.y,t.push({x:n.x,y:a}),t.push({x:i.x,y:a});break;case r.Alignment.Top:a=o?(n.y+i.y)/2:(i.y-n.y)*Math.random()+n.y,t.push({x:n.x,y:a}),t.push({x:i.x,y:a});break;case r.Alignment.Left:a=o?(n.x+i.x)/2:(i.x-n.x)*Math.random()+n.x,t.push({x:a,y:n.y}),t.push({x:a,y:i.y});break;case r.Alignment.Right:a=o?(n.x+i.x)/2:(n.x-i.x)*Math.random()+n.x,t.push({x:a,y:n.y}),t.push({x:a,y:i.y})}},this.getElbowLinkPath=(t,e,n)=>{let i=this,o=[],a=t.source.alignment===r.Alignment.Left&&t.target.alignment===r.Alignment.Right||t.source.alignment===r.Alignment.Right&&t.target.alignment===r.Alignment.Left||t.source.alignment===r.Alignment.Top&&t.target.alignment===r.Alignment.Bottom||t.source.alignment===r.Alignment.Bottom&&t.target.alignment===r.Alignment.Top;if(a)switch(t.source.alignment){case r.Alignment.Left:n.x>e.x&&(a=!1);break;case r.Alignment.Right:n.x<e.x&&(a=!1);break;case r.Alignment.Top:n.y>e.y&&(a=!1);break;case r.Alignment.Bottom:n.y<e.y&&(a=!1)}if(a)switch(t.target.alignment){case r.Alignment.Left:n.x<e.x&&(a=!1);break;case r.Alignment.Right:n.x>e.x&&(a=!1);break;case r.Alignment.Top:n.y<e.y&&(a=!1);break;case r.Alignment.Bottom:n.y>e.y&&(a=!1)}if(a)o.push(e),this.addElbow(o,t,e,n),o.push(n);else{let r,a;o.push(e);t.source.node;r=i.getNextXY(m(i._graphContainer,t.source.node),t.source.alignment,e,n),o.push(r),a=i.getNextXY(m(i._graphContainer,t.target.node),t.target.alignment,n,e),this.addElbow(o,t,r,a),o.push(a),o.push(n)}return o},this.configureZoom=(t,e,n,r)=>{if(this._options.disableZoomViewUpdate)return;let i=this,o=t[1]-t[0],a=e[1]-e[0],s=o/2+t[0],u=a/2+e[0],c=n/a,l=r/o,h=Math.min(1,c,l);if(i._zoom.scaleExtent([h/3,1.5]),i._options.fitToWindow){let t=f.zoomIdentity.translate(r/2-s*h,n/2-u*h).scale(h);i._graphContainer.call(i._zoom.transform,t)}i._contextMenuItems.push({title:"Reset Graph",action(t,e,o){if(i._options.fitToWindow){let t=f.zoomIdentity.translate(r/2-s*h,n/2-u*h).scale(h);i._graphContainer.transition().duration(i.getAnimateDuration()).call(i._zoom.transform,t)}else i._graphContainer.transition().duration(i.getAnimateDuration()).call(i._zoom.transform,f.zoomIdentity)}})},this.configureBrush=()=>{let t=this;function e(e,n){if(!e)return!1;let r=t._element,i={event:n,xStart:e[0][0],xEnd:e[1][0],yStart:e[0][1],yEnd:e[1][1],caller:r};return r.onBrush&&r.onBrush(i),!0}let n=function(e){null!==e&&t._brushTooltip.setData("Selection","("+e[0][0].toFixed(2)+", "+e[0][1].toFixed(2)+") - ("+e[1][0].toFixed(2)+", "+e[1][1].toFixed(2)+")")};t._svg.select(".brush").remove(),t._brushTooltip=new u.OneLineTooltip("brush","tooltip-t"),t._brushTooltip.setPlaceTooltipLeftRight().alwaysRecalcWidth(!0).setDelay(0),t._brush=(new l.Brush).setXY(!0).setTarget(t._svg.append("g").attr("class","brush")).setStartCallback((function(i){return t._brush.moveToFront(),n(i),t._dataTooltip.onMouseLeave(f.event),t._brushTooltip.onMouseEnter(f.event),t._brushTooltip.onMouseMove(f.event),e(i,r.EventType.BrushStart)})).setMoveCallback((function(i){return n(i),t._dataTooltip.onMouseLeave(f.event),t._brushTooltip.onMouseMove(f.event),e(i,r.EventType.BrushMove)})).setEndCallback((function(n){t._brushTooltip.onMouseLeave(f.event);let i=t._element.brushContextMenuItems;if(n&&i){let a=[];for(let t=0;t<i.length;++t){let o=i[t];a.push({title:o.title,action(t,i,a){i.xStart=n[0][0],i.xEnd=n[1][0],i.yStart=n[0][1],i.yEnd=n[1][1],o.action(t,i,a),e(n,r.EventType.BrushEnd)}})}o.showContextMenu(f.event.sourceEvent,{event:r.EventType.BrushEnd,caller:t._element},a)}else{let t=document.getElementsByClassName("context-menu");t.length>0&&(t[0].style.display="none")}return t._options.forceBrushToFront||t._brush.moveToBack(),!0})).setRect(t._svgRect).ready(),t._brush.moveToBack()}}configureView(t,e){let n=[Number.MAX_VALUE,-Number.MAX_VALUE],r=[Number.MAX_VALUE,-Number.MAX_VALUE];if(this._element.nodes.forEach((function(t){n[0]=Math.min(n[0],t.x),n[1]=Math.max(n[1],t.x),r[0]=Math.min(r[0],t.y),r[1]=Math.max(r[1],t.y)})),t=this.renderLegend(t),this.bindZoom(),this.configureZoom(n,r,t,e),this.configureContextMenu(),this._svg&&!this._options.disableBrush){let t=this;setTimeout((function(){t.configureBrush()}),0)}}}e.ConnectedGraphBase=p;e.DiagramBase=class extends p{bind(t,e){p.prototype.bind.call(this,t,e,t=>t.source.key+"-"+t.target.key,t=>{let e;return e=t.from?t.linkType&&(t.linkType&i.LinkType.Directional)===i.LinkType.Directional?t.from+" → "+t.to+"\n":t.from+" ↔ "+t.to+"\n":t.port?t.node.key+":"+t.port.key:t.label?t.label:t.key,e})}};class g extends l.SVGRenderer{constructor(t,e,n){super(),this.initialize(t,e,n),this._graphContainer=this._svg,p.prototype.bind.call(this,e,t)}renderLegend(t){let e=this,n=e._element;if(n.legend){let i=[];for(let t=0;t<n.nodes.length;++t){let r=n.nodes[t],o=r.type&&r.type.length>0?r.type[0]:r.key,a=e._svg.select(".node."+o);i.push({key:o,color:a.style("fill"),opacity:a.style("opacity")})}let o={},a=0;for(let t=0;t<i.length;++t){let e=i[t];o.hasOwnProperty(e.key)||(o[e.key]=!0,a=Math.max(e.key.length,a))}let s,u=10;switch(n.legend.alignment){case r.Alignment.Top:s=new l.D3Legend(this._svg,n.legend,n.title,new r.Rect(0,u,this._svgRect.width,this._svgRect.height));break;case r.Alignment.Bottom:s=new l.D3Legend(this._svg,n.legend,n.title,new r.Rect(0,this._svgRect.height-this.LEGEND_PADDING.Y.BOTTOM,this._svgRect.width,this._svgRect.height));break;case r.Alignment.Left:s=new l.D3Legend(this._svg,n.legend,n.title,new r.Rect(0,u,this._svgRect.width,this._svgRect.height));break;case r.Alignment.Right:s=new l.D3Legend(this._svg,n.legend,n.title,new r.Rect(this._svgRect.width-10*a,u,this._svgRect.width,this._svgRect.height))}s.addItems(i),s.render(),t||(t=this._options.height),n.legend.alignment!==r.Alignment.Top&&n.legend.alignment!==r.Alignment.Bottom||(t+=s.getRenderedRect().height)}return t}bindZoom(){if(this._options.disableZoomViewUpdate)return;let t=this,e=t._svg.select(".graphArea");t._zoom=f.zoom().on("zoom",(function(){e.attr("transform",f.event.transform)})),t._svg.call(t._zoom),t._element.api||(t._element.api={}),t._element.api.zoom=function(e){e.data&&t._zoom.scaleTo(t._parent,e.data)},t._element.api.pan=function(e){t._zoom.translateTo(t._parent,e.xStart,e.yStart)}}configureContextMenu(){let t=this,e=t._element;if(e.contextMenuItems)for(let n=0;n<e.contextMenuItems.length;++n)t._contextMenuItems.push(e.contextMenuItems[n]);if(t.saveImage&&t._options.enableSaveAsImage){let e={title:"Save As Image",action:function(e,n,r){t.saveImage()},disabled:!1};t._contextMenuItems.push(e)}t._contextMenuItems.length>0&&t._parent.on("contextmenu",(function(e){o.showContextMenu(f.event,void 0,t._contextMenuItems)}))}initializeGraphArea(t){this.loadOptions(t),this._svg.selectAll("*").remove();let e=this._svg.append("g").classed("graphArea",!0);return this._contextMenuItems=[],e}configureLinkHover(t,e){t.on("mouseenter",this.linkHoverStart).on("mouseleave",this.hoverEnd);let n=this._element;l.addClickHelper(t,this.getOptions(),n.onClick,n.onDoubleClick,n.contextMenuItems,this._dataTooltip,n,e.def),t.node().__data__=e}initializeLinkLayer(t){t.append("g").classed("links",!0)}renderLinkHelper(t,e,n){let r=this,o=f.line().x((function(t){return t.x})).y((function(t){return t.y})),a=f.line().x((function(t){return t.x})).y((function(t){return t.y})).curve(f.curveBasis),u=t.select(".links"),c=function(t){let e=t.def.from+"-"+t.def.to+" "+t.def.from+" "+t.def.to;if(t.def.type&&t.def.type.length>0)for(let n=0;n<t.def.type.length;++n)e+=" "+s.getSelectionName(t.def.type[n]);return e},h=function(t){if(t.def.color)return t.def.color;if(t.def.type&&t.def.type.length>0)for(let e=0;e<t.def.type.length;++e)if(r._colorMgr.hasColor(t.def.type[e]))return r._colorMgr.getColor(t.def.type[e]);return"black"};n&&e.forEach((function(e){t.selectAll("."+e.def.from+"-"+e.def.to+"."+e.def.from+"."+e.def.to).remove()})),e.forEach((function(t){let e,s=t.def,f=r.getLinkStartXY(t),d=r.getLinkEndXY(t);(s.linkType&i.LinkType.Linear)===i.LinkType.Linear?t.path=[f,d]:t.path=r.getElbowLinkPath(t,f,d),e=s.linkType&i.LinkType.Curve?a:o;let p,g,_=u.append("path").attr("d",e(t.path)).classed(c(t),!0).classed("link",!0).attr("fill","none").style("stroke",h(t)).attr("stroke-width",s.width?s.width:2);(s.linkType&i.LinkType.Directional||s.linkType&i.LinkType.Bidirectional)&&(g=t.path[t.path.length-1],p=l.Arrow.createArrow(u,4).classed(c(t),!0).classed("arrow",!0).attr("fill",h(t)).attr("transform","translate("+g.x+","+g.y+") rotate( "+l.Arrow.getAngle(t.path[t.path.length-2],g)+")")),s.linkType&i.LinkType.Bidirectional&&l.Arrow.createArrow(u,4).classed(c(t),!0).classed("arrow",!0).attr("fill",h(t)).attr("transform","translate("+t.path[0].x+","+t.path[0].y+") rotate( "+l.Arrow.getAngle(t.path[1],t.path[0])+")"),n||0===r.getAnimateDuration()||(l.animatePath(_,r.getAnimateDuration()),p&&l.Arrow.animateArrow(_,p,r.getAnimateDuration())),r.configureLinkHover(_,t),r._dataTooltip.setTarget(_)}))}configureView(){let t=this._options.height?this._options.height:400,e=this._options.width;this._svg.attr("width",e).attr("height",t),p.prototype.configureView.call(this,t,e)}}e.D3ConnectedGraphSVG=g;class _ extends c.UIElementRenderer{constructor(t,e,n){super(),this._element=t,this._renderer=e,this._options={},this._contextMenuItems=[],this._tooltipId="d3-tooltip",this._tooltipAnalyticsName="d3-ui-widget-toolkit",this._parent=n,this._graphContainer=n,p.prototype.bind.call(this,e,t)}hover(t){this.focus(t)}focus(t){this._interactionState.focus(t)}select(t){this._interactionState.select(t)}brush(t){}changeCursor(t){}getTooltipData(t){return[{source:this._element,group:"",metrics:{}}]}getAnimateDuration(){return void 0!==this._options.animateDuration?this._options.animateDuration:1e3}bindZoom(){if(this._options.disableZoomViewUpdate)return;let t=this,e=t._stage;t._zoom=f.zoom().on("zoom",(function(){e.itemDragging||(e.position.set(f.event.transform.x,f.event.transform.y),e.scale.set(f.event.transform.k,f.event.transform.k),t._pixiHelper.render())})),t._parent.call(t._zoom),t._element.api||(t._element.api={}),t._element.api.zoom=function(e){e.data&&t._zoom.scaleTo(t._parent,e.data)},t._element.api.pan=function(e){t._zoom.translateTo(t._parent,e.xStart,e.yStart)}}_focus(t){if(t){let e=this._pixiHelper.getSelection(t);e&&e.forEach((function(t){t._prevTint=t.tint,t.tint=8947848,t.alpha=136})),this._pixiHelper.render()}}_unfocus(t){let e=this._pixiHelper.getSelection(t);e&&e.forEach((function(t){t.tint=t._prevTint,t.alpha=255})),this._pixiHelper.render()}_select(t){if(t){let e=this._pixiHelper.getSelection(t);e&&e.forEach((function(t){t._prevTint=t.tint,t.tint=8947848,t.alpha=136})),this._pixiHelper.render()}}_unselect(t){let e=this._pixiHelper.getSelection(t);e&&e.forEach((function(t){t.tint=t._prevTint,t.alpha=255})),this._pixiHelper.render()}configureInteractionVisualization(){let t=this;this._interactionState=new a.InteractionState((function(e){t._focus(e)}),(function(e){t._unfocus(e)}),!1,(function(e){t._select(e)}),(function(e){t._unselect(e)}))}configureContextMenu(){let t=this,e=t._element;if(e.contextMenuItems)for(let n=0;n<e.contextMenuItems.length;++n)t._contextMenuItems.push(e.contextMenuItems[n]);t._contextMenuItems.length>0&&t._parent.on("contextmenu",(function(e){o.showContextMenu(f.event,void 0,t._contextMenuItems)}))}initializeGraphArea(t){return this._contextMenuItems=[],s.merge(this._options,t),void 0===this._pixiHelper&&(this._pixiHelper=new h.PIXIHelper(!this.getOptions().forceCanvasRenderer),this._pixi=this._pixiHelper.getRenderer(),this._parent.node().appendChild(this._pixi.view),this._stage=new d.Container,this._stage.interactive=!0,this.createArrowTexture(),this.configureInteractionVisualization()),this._stage.removeChildren(),this._stage}createArrowTexture(){let t=new d.Graphics;t.beginFill(0),t.lineStyle(0,0,0);t.moveTo(0,0),t.lineTo(9*Math.cos(1.1),9*Math.sin(1.1)),t.lineTo(-9*Math.cos(1.1),9*Math.sin(1.1)),t.lineTo(0,0),this._arrowTexture=this._pixi.generateTexture(t,d.SCALE_MODES.LINEAR,10)}createArrow(t,e,n,i,o){let a=new d.Sprite(this._arrowTexture);switch(a.anchor=new d.ObservablePoint(void 0,void 0,.5,0),a.x=e.x,a.y=e.y,a.rotation=-Math.atan2(e.x-n.x,e.y-n.y),o){case r.Alignment.Left:a.rotation+=Math.PI;break;case r.Alignment.Right:a.rotation+=-Math.PI;break;case r.Alignment.Top:a.rotation+=3*Math.PI/2;break;case r.Alignment.Bottom:a.rotation+=-Math.PI/2}t.addChild(a)}renderLinkHelper(t,e){let n=this;n._pixiLinks&&(t.removeChild(n._pixiLinks),n._pixiLinks.destroy(),t.removeChild(n._pixiArrows),n._pixiArrows.destroy()),n._pixiLinks=new d.Graphics,t.addChildAt(n._pixiLinks,0),n._pixiArrows=new d.Container,t.addChildAt(n._pixiArrows,1),e.forEach((function(t){let e=t.def;n._pixiLinks.lineStyle(2,8947848,.4);let r=n.getLinkStartXY(t),o=n.getLinkEndXY(t);if(e.linkType&i.LinkType.Linear?t.path=[r,o]:t.path=n.getElbowLinkPath(t,r,o),e.linkType&i.LinkType.Curve)n._pixiLinks.moveTo(t.path[0].x,t.path[0].y),n._pixiLinks.bezierCurveTo(t.path[1].x,t.path[1].y,t.path[t.path.length-2].x,t.path[t.path.length-2].y,t.path[t.path.length-1].x,t.path[t.path.length-1].y);else{n._pixiLinks.moveTo(t.path[0].x,t.path[0].y);for(let e=1;e<t.path.length;++e)n._pixiLinks.lineTo(t.path[e].x,t.path[e].y)}e.linkType&i.LinkType.Bidirectional&&n.createArrow(n._pixiArrows,t.path[0],t.path[1],e.linkType,t.source.alignment),(e.linkType&i.LinkType.Directional||e.linkType&i.LinkType.Bidirectional)&&n.createArrow(n._pixiArrows,t.path[t.path.length-1],t.path[t.path.length-2],e.linkType,t.target.alignment)}))}renderLegend(t){return t}configureView(){let t=this._options.height?this._options.height:400,e=this._options.width?this._options.width:this._parent.node().getBoundingClientRect().width;this._pixi.resize(e,t),p.prototype.configureView.call(this,t,e)}}function m(t,e){return void 0===e.x&&(e.d3selection||(e.d3selection=f.select(this)),s.merge(e,l.convertToSVGCoords(t,e.d3selection))),e}e.D3ConnectedGraphPixi=_,e.getCoordsAndCache=m},function(t,e,n){(function(t){var r=n(16),i=n(262),o=e&&!e.nodeType&&e,a=o&&"object"==typeof t&&t&&!t.nodeType&&t,s=a&&a.exports===o?r.Buffer:void 0,u=(s?s.isBuffer:void 0)||i;t.exports=u}).call(this,n(36)(t))},function(t,e,n){var r=n(70),i=n(71);t.exports=function(t,e,n,o){var a=!n;n||(n={});for(var s=-1,u=e.length;++s<u;){var c=e[s],l=o?o(n[c],t[c],c,n,t):void 0;void 0===l&&(l=t[c]),a?i(n,c,l):r(n,c,l)}return n}},function(t,e,n){var r=n(42);t.exports=function(t){if("string"==typeof t||r(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}},function(t,e,n){"use strict";e.a=function(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}},function(t,e,n){"use strict";function r(){}function i(t,e){var n=new r;if(t instanceof r)t.each((function(t,e){n.set(e,t)}));else if(Array.isArray(t)){var i,o=-1,a=t.length;if(null==e)for(;++o<a;)n.set(o,t[o]);else for(;++o<a;)n.set(e(i=t[o],o,t),i)}else if(t)for(var s in t)n.set(s,t[s]);return n}r.prototype=i.prototype={constructor:r,has:function(t){return"$"+t in this},get:function(t){return this["$"+t]},set:function(t,e){return this["$"+t]=e,this},remove:function(t){var e="$"+t;return e in this&&delete this[e]},clear:function(){for(var t in this)"$"===t[0]&&delete this[t]},keys:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)"$"===e[0]&&t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)"$"===e[0]&&++t;return t},empty:function(){for(var t in this)if("$"===t[0])return!1;return!0},each:function(t){for(var e in this)"$"===e[0]&&t(this[e],e.slice(1),this)}};var o=i,a=function(){var t,e,n,r=[],i=[];function a(n,i,s,u){if(i>=r.length)return null!=t&&n.sort(t),null!=e?e(n):n;for(var c,l,h,f=-1,d=n.length,p=r[i++],g=o(),_=s();++f<d;)(h=g.get(c=p(l=n[f])+""))?h.push(l):g.set(c,[l]);return g.each((function(t,e){u(_,e,a(t,i,s,u))})),_}return n={object:function(t){return a(t,0,s,u)},map:function(t){return a(t,0,c,l)},entries:function(t){return function t(n,o){if(++o>r.length)return n;var a,s=i[o-1];return null!=e&&o>=r.length?a=n.entries():(a=[],n.each((function(e,n){a.push({key:n,values:t(e,o)})}))),null!=s?a.sort((function(t,e){return s(t.key,e.key)})):a}(a(t,0,c,l),0)},key:function(t){return r.push(t),n},sortKeys:function(t){return i[r.length-1]=t,n},sortValues:function(e){return t=e,n},rollup:function(t){return e=t,n}}};function s(){return{}}function u(t,e,n){t[e]=n}function c(){return o()}function l(t,e,n){t.set(e,n)}function h(){}var f=o.prototype;function d(t,e){var n=new h;if(t instanceof h)t.each((function(t){n.add(t)}));else if(t){var r=-1,i=t.length;if(null==e)for(;++r<i;)n.add(t[r]);else for(;++r<i;)n.add(e(t[r],r,t))}return n}h.prototype=d.prototype={constructor:h,has:f.has,add:function(t){return this["$"+(t+="")]=t,this},remove:f.remove,clear:f.clear,values:f.keys,size:f.size,empty:f.empty,each:f.each};n.d(e,"b",(function(){return a})),n.d(e,"a",(function(){return o}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(2),i=n(1);var o;!function(t){t[t.Tooltip=0]="Tooltip",t[t.Highlight=1]="Highlight",t[t.Render=2]="Render",t[t.Focus=3]="Focus",t[t.Select=4]="Select",t[t.None=5]="None"}(o||(o={}));class a{constructor(){this._nameMap={},this._objectMap=new Map}}function s(t){t.getTooltip||(t.getTooltip=function(e){return t.renderer&&t.renderer.getTooltipData?t.renderer.getTooltipData(t,e):[{source:t,group:"",metrics:{}}]})}function u(t){t.api||(t.api={}),t.api.select||(t.api.select=function(e){if(t.renderer&&t.renderer.select)return t.renderer.select(t,e)})}function c(t){t.api||(t.api={}),t.api.cursorChange||(t.api.cursorChange=function(e){if(t.renderer&&t.renderer.cursorChange)return t.renderer.cursorChange(t,e)}),t.api.focus||(t.api.focus=function(e){return t.renderer&&!t.renderer.focus&&t.renderer.hover?t.renderer.hover(t,e):t.renderer&&t.renderer.focus?t.renderer.focus(t,e):void 0},t.api.hover=t.api.focus),t.api.brush||(t.api.brush=function(e){if(t.renderer&&t.renderer.brush)return t.renderer.brush(t,e)}),t.api.zoom||(t.api.zoom=function(e){if(t.renderer&&t.renderer.zoom)return t.renderer.zoom(t,e)})}function l(t){t.api||(t.api={}),t.api.brush||(t.api.brush=function(e){if(t.renderer&&t.renderer.brush)return t.renderer.brush(t,e)}),t.api.render||(t.api.render=function(e,n){return e?t.renderer=e:e=t.renderer,new Promise((function(r,i){e&&(t.renderer.render(t,n),r("Ok")),i("No renderer available")}))})}function h(t){s(t),c(t),u(t),l(t)}e.GroupInfo=a,e.addCallbacks=h;e.ElementManager=class{constructor(){this._elems=[];let t=this;this._groupInfo=[];for(let t=0;t<5;++t)this._groupInfo.push(new a);this._onHoverCallback=function(e){e.caller||console.warn("Warning no caller specified for this event, cannot propoate changes",e);let n=t._groupInfo[3]._objectMap.get(e.caller);if(n)if(t._hoverCallback)t._hoverCallback(n,e);else for(let t=0;t<n.length;++t){let r=n[t];e.caller!==r&&r.api&&!r.api.focus&&r.api.hover&&r.api.hover(e),e.caller!==r&&r.api&&r.api.focus&&r.api.focus(e)}};let e=function(e,n,r){return function(i){i.caller||console.warn("Warning no caller specified for this event, cannot propagate changes",i);let o=t._groupInfo[e]._objectMap.get(i.caller);if(o)if(n)n(o,i);else for(let t=0;t<o.length;++t){let e=o[t];i.caller!==e&&e.api&&e.api[r]&&e.api[r](i)}}};this._onZoomCallback=e(1,this._zoomCallback,"zoom"),this._onCursorChangeCallback=e(1,this._cursorChangeCallback,"cursorChange"),this._onBrushCallback=e(1,this._brushCallback,"brush"),this._onClickCallback=e(4,this._clickCallback,"select"),this._onTooltipCallback=function(e){e.caller||console.warn("Warning no caller specified for this event, cannot propoate changes",e);let n=[],r=t._groupInfo[0]._objectMap.get(e.caller);if(r){if(t._tooltipCallback)n=n.concat(t._tooltipCallback(r,e));else for(let t=0;t<r.length;++t){let i=r[t].getTooltip(e);n=n.concat(i)}return e.data&&e.data.tooltip&&e.data.tooltip.setData(e.data.tooltip.getTitle(),n),n}},this._onUpdateCallback=function(e,n){e||console.warn("Warning no caller specified for this event, cannot propoate changes");let r=t._groupInfo[2]._objectMap.get(e);if(r)for(let t=0;t<r.length;++t){let e=r[t];e.renderer&&e.renderer.render(e,n)}}}removeFromGroup(t,e){let n=this._groupInfo[e]._objectMap.get(t);n&&r.removeFromList(t,n)}addToGroup(t,e,n){this._groupInfo[n]._nameMap.hasOwnProperty(e)||(this._groupInfo[n]._nameMap[e]=[]),this._groupInfo[n]._nameMap[e].push(t),this._groupInfo[n]._objectMap.set(t,this._groupInfo[n]._nameMap[e])}addElement(t,e,n,r){if(!t)return this;if(-1!==this._elems.indexOf(t))throw"Element already exists in this manager";{let i;h(t),this._elems.push(t),t.getElements||(t.getElements=function(){return[t]}),i=t.getElements();for(let t=0;t<i.length;++t){let o=i[t];e&&this.addToTooltipGroup(o,e),n&&this.addToHighlightGroup(o,n),r&&this.addToRenderGroup(o,r)}}return t.manager=this,this}removeElement(t){if(!t)return this;let e;e=t.getElements?t.getElements():[t];for(let t=0;t<e.length;++t){let n=e[t];this.removeFromTooltipGroup(n),this.removeFromHighlightGroup(n),this.removeFromRenderGroup(n)}return r.removeFromList(t,this._elems),delete t.manager,this}getElements(){return this._elems}setZoomCallback(t){return this._zoomCallback=t,this}setHoverCallback(t){return this._hoverCallback=t,this}setClickCallback(t){return this._clickCallback=t,this}setTooltipCallback(t){return this._tooltipCallback=t,this}setBrushCallback(t){return this._brushCallback=t,this}addToTooltipGroup(t,e){s(t),this.removeFromTooltipGroup(t),this.addToGroup(t,e,0);let n=this;if(t.onTooltip){let e=t.onTooltip;t.onTooltip=function(t){n._onTooltipCallback(t),e(t)}}else t.onTooltip=this._onTooltipCallback;return this}removeFromTooltipGroup(t){return this.removeFromGroup(t,0),this}addToFocusGroup(t,e){c(t),this.removeFromFocusGroup(t);let n=this;if(t.onHover){let e=t.onHover;t.onHover=function(t){n._onHoverCallback(t),e(t)}}else t.onHover=n._onHoverCallback;return this.addToGroup(t,e,3),this}removeFromFocusGroup(t){return this.removeFromGroup(t,3),this}addToSelectGroup(t,e){u(t),this.removeFromSelectGroup(t);let n=this;if(t.onClick){let e=t.onClick;t.onClick=function(t){n._onClickCallback(t),e(t)}}else t.onClick=n._onClickCallback;return this.addToGroup(t,e,4),this}removeFromSelectGroup(t){return this.removeFromGroup(t,4),this}addToHighlightGroup(t,e){c(t),this.removeFromHighlightGroup(t),this.addToFocusGroup(t,e),this.addToSelectGroup(t,e);let n=this;if(t.onBrush){let e=t.onBrush;t.onBrush=function(t){n._onBrushCallback(t),e(t)}}else t.onBrush=n._onBrushCallback;if(t.onCursorChanged){let e=t.onCursorChanged;t.onCursorChanged=function(t){n._onCursorChangeCallback(t),e(t)}}else t.onCursorChanged=this._onCursorChangeCallback;if(t.onZoom){let e=t.onZoom;t.onZoom=function(t){n._onZoomCallback(t),e(t)}}else t.onZoom=this._onZoomCallback;let o=this._groupInfo[1]._nameMap[e];if(o&&o.length){let e=o[0];if(e.api.getOptions&&t.api&&t.api.zoom){let n=e.api.getOptions(),o=r.copy(n);o.event=i.EventType.Zoom,setTimeout(()=>{t.api.zoom(o)})}}return this.addToGroup(t,e,1),this}removeFromHighlightGroup(t){return this.removeFromFocusGroup(t),this.removeFromSelectGroup(t),this.removeFromGroup(t,1),this}addToRenderGroup(t,e){l(t),this.removeFromRenderGroup(t),this.addToGroup(t,e,2);let n=this;if(t.handleUpdate){let e=t.handleUpdate;t.handleUpdate=function(t,r){n._onUpdateCallback(t,r),e(t,r)}}else t.handleUpdate=this._onUpdateCallback;return this}removeFromRenderGroup(t){return this.removeFromGroup(t,2),this}clear(){this._elems.length=0,this._groupInfo.length=0;for(let t=0;t<5;++t)this._groupInfo.push(new a)}}},function(t,e,n){var r=n(231),i=n(232),o=n(233),a=n(234),s=n(235);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,t.exports=u},function(t,e,n){var r=n(91);t.exports=function(t,e){for(var n=t.length;n--;)if(r(t[n][0],e))return n;return-1}},function(t,e,n){var r=n(34),i=n(25);t.exports=function(t){if(!i(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},function(t,e,n){var r=n(24)(Object,"create");t.exports=r},function(t,e,n){var r=n(255);t.exports=function(t,e){var n=t.__data__;return r(e)?n["string"==typeof e?"string":"hash"]:n.map}},function(t,e,n){var r=n(130),i=n(131);t.exports=function(t,e,n,o){var a=!n;n||(n={});for(var s=-1,u=e.length;++s<u;){var c=e[s],l=o?o(n[c],t[c],c,n,t):void 0;void 0===l&&(l=t[c]),a?i(n,c,l):r(n,c,l)}return n}},function(t,e,n){var r=n(261),i=n(17),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(t){return i(t)&&a.call(t,"callee")&&!s.call(t,"callee")};t.exports=u},function(t,e,n){var r=n(263),i=n(96),o=n(97),a=o&&o.isTypedArray,s=a?i(a):r;t.exports=s},function(t,e){var n=Object.prototype;t.exports=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||n)}},function(t,e,n){var r=n(146),i=n(291)(r);t.exports=i},function(t,e){t.exports=function(t){return t}},function(t,e,n){var r=n(295),i=n(305),o=n(62),a=n(6),s=n(314);t.exports=function(t){return"function"==typeof t?t:null==t?o:"object"==typeof t?a(t)?i(t[0],t[1]):r(t):s(t)}},function(t,e,n){var r=n(105);t.exports=function(t){if("string"==typeof t||r(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}},function(t,e,n){var r=n(66),i=n(372),o=n(373),a=n(374),s=n(375),u=n(376);function c(t){var e=this.__data__=new r(t);this.size=e.size}c.prototype.clear=i,c.prototype.delete=o,c.prototype.get=a,c.prototype.has=s,c.prototype.set=u,t.exports=c},function(t,e,n){var r=n(367),i=n(368),o=n(369),a=n(370),s=n(371);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,t.exports=u},function(t,e,n){var r=n(38);t.exports=function(t,e){for(var n=t.length;n--;)if(r(t[n][0],e))return n;return-1}},function(t,e,n){var r=n(28)(Object,"create");t.exports=r},function(t,e,n){var r=n(391);t.exports=function(t,e){var n=t.__data__;return r(e)?n["string"==typeof e?"string":"hash"]:n.map}},function(t,e,n){var r=n(71),i=n(38),o=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var a=t[e];o.call(t,e)&&i(a,n)&&(void 0!==n||e in t)||r(t,e,n)}},function(t,e,n){var r=n(165);t.exports=function(t,e,n){"__proto__"==e&&r?r(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},function(t,e,n){var r=n(397),i=n(18),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(t){return i(t)&&a.call(t,"callee")&&!s.call(t,"callee")};t.exports=u},function(t,e,n){(function(t){var r=n(14),i=n(398),o=e&&!e.nodeType&&e,a=o&&"object"==typeof t&&t&&!t.nodeType&&t,s=a&&a.exports===o?r.Buffer:void 0,u=(s?s.isBuffer:void 0)||i;t.exports=u}).call(this,n(36)(t))},function(t,e){var n=/^(?:0|[1-9]\d*)$/;t.exports=function(t,e){var r=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&n.test(t))&&t>-1&&t%1==0&&t<e}},function(t,e){t.exports=function(t){return function(e){return t(e)}}},function(t,e,n){var r=n(408),i=n(107),o=n(409),a=n(410),s=n(411),u=n(39),c=n(163),l=c(r),h=c(i),f=c(o),d=c(a),p=c(s),g=u;(r&&"[object DataView]"!=g(new r(new ArrayBuffer(1)))||i&&"[object Map]"!=g(new i)||o&&"[object Promise]"!=g(o.resolve())||a&&"[object Set]"!=g(new a)||s&&"[object WeakMap]"!=g(new s))&&(g=function(t){var e=u(t),n="[object Object]"==e?t.constructor:void 0,r=n?c(n):"";if(r)switch(r){case l:return"[object DataView]";case h:return"[object Map]";case f:return"[object Promise]";case d:return"[object Set]";case p:return"[object WeakMap]"}return e}),t.exports=g},function(t,e,n){var r=n(38),i=n(30),o=n(74),a=n(15);t.exports=function(t,e,n){if(!a(n))return!1;var s=typeof e;return!!("number"==s?i(n)&&o(e,n.length):"string"==s&&e in n)&&r(n[e],t)}},function(t,e,n){var r=n(182),i=n(428)(r);t.exports=i},function(t,e,n){var r=n(8),i=n(121),o=n(446),a=n(188);t.exports=function(t,e){return r(t)?t:i(t,e)?[t]:o(a(t))}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}},function(t,e,n){"use strict";var r=n(4);t.exports={longestPath:function(t){var e={};r.forEach(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})));return a!==Number.POSITIVE_INFINITY&&null!=a||(a=0),o.rank=a}))},slack:function(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){t[t.Linear=0]="Linear",t[t.Logarithmic=1]="Logarithmic",t[t.Ordinal=2]="Ordinal"}(e.AxisType||(e.AxisType={}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(204);function i(){let t=window.navigator.userAgent,e=t.indexOf("MSIE ");if(e>0)return r.polyfill(),String.prototype.startsWith||(String.prototype.startsWith=function(t,e){return e=e||0,this.substr(e,t.length)===t}),parseInt(t.substring(e+5,t.indexOf(".",e)),10);if(t.indexOf("Trident/")>0){r.polyfill(),String.prototype.startsWith||(String.prototype.startsWith=function(t,e){return e=e||0,this.substr(e,t.length)===t});let e=t.indexOf("rv:");return parseInt(t.substring(e+3,t.indexOf(".",e)),10)}let n=t.indexOf("Edge/");return n>0&&parseInt(t.substring(n+5,t.indexOf(".",n)),10)}e.detectIE=i,document.addEventListener("DOMContentLoaded",(function(){i()}),!1),e.useIEPolyfill=function(t){try{new CustomEvent("test")}catch(e){let n=function(e,n){n=n||{bubbles:!1,cancelable:!1};var r=document.createEvent("MouseEvent");return r.initMouseEvent(e,n.bubbles,n.cancelable,t,0,0,0,0,0,!1,!1,!1,!1,0,null),r};n.prototype=Event.prototype,t.MouseEvent=n}}},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(2),i=n(1),o=n(3);class a{constructor(t,e,n=!1,r,i){this._currFocus=[],this._currSelection=[],this._focus=t,this._unfocus=e,this._select=r,this._unselect=i,this._doBlink=n}static getFocusColor(t){let e=o.color(t),n=o.color(e).darker(2).toString();return n===e.toString()&&(e.opacity=.6*e.opacity,n=e.toString()),n}_addFocusHelper(t){let e=this;this._focus(t),e._doBlink&&(clearTimeout(this._highlightTimer),this._highlightTimer=setTimeout((function(){e._unfocusHelper(t,!0)}),500))}_unfocusHelper(t,e=!1){let n=this;this._unfocus(t),this._doBlink&&e&&(clearTimeout(this._highlightTimer),this._highlightTimer=setTimeout((function(){n._addFocusHelper(t)}),500))}_addSelectionHelper(t){let e=this;this._select(t),e._doBlink&&(clearTimeout(this._highlightTimer),this._highlightTimer=setTimeout((function(){e._removeSelectionHelper(t,!0)}),500))}_removeSelectionHelper(t,e=!1){let n=this;this._unselect(t),this._doBlink&&e&&(clearTimeout(this._highlightTimer),this._highlightTimer=setTimeout((function(){n._addSelectionHelper(t)}),500))}focus(t){if(!isNaN(Number(t.selection)))return void(void 0===t.selection?console.debug("Chart unable to fire focus event with undefined selection"):0===t.selection.length?console.debug("Chart unable to fire focus event with an empty string selection"):console.debug("Chart unable to fire focus event using a number as the selection class due to CSS limitations"));let e=r.getSelectionName(t.selection),n=this._currFocus.indexOf(e);switch(t.event){case i.EventType.SelectAdd:case i.EventType.HoverStart:case i.EventType.FocusStart:-1===n&&(this._currFocus.push(e),this._addFocusHelper(e));break;case i.EventType.SelectRemove:case i.EventType.HoverEnd:case i.EventType.FocusEnd:-1!==n&&(clearTimeout(this._highlightTimer),this._currFocus.splice(n,1),this._unfocusHelper(e));break;case i.EventType.SelectClear:case i.EventType.HoverClear:case i.EventType.FocusClear:clearTimeout(this._highlightTimer);for(let t=0;t<this._currFocus.length;++t)this._unfocusHelper(this._currFocus[t]);this._currFocus=[]}}select(t){if(!isNaN(Number(t.selection)))return void(void 0===t.selection?console.debug("Chart unable to fire focus event with undefined selection"):0===t.selection.length?console.debug("Chart unable to fire focus event with an empty string selection"):console.debug("Chart unable to fire focus event using a number as the selection class due to CSS limitations"));let e=r.getSelectionName(t.selection),n=this._currSelection.indexOf(e);switch(t.event){case i.EventType.SelectAdd:-1===n&&(this._currSelection.push(e),this._addSelectionHelper(e));break;case i.EventType.SelectRemove:-1!==n&&(clearTimeout(this._highlightTimer),this._currSelection.splice(n,1),this._removeSelectionHelper(e));break;case i.EventType.SelectClear:clearTimeout(this._highlightTimer);for(let t=0;t<this._currSelection.length;++t)this._removeSelectionHelper(this._currSelection[t]);this._currSelection=[]}}onRedraw(){this._currFocus.forEach(t=>{this._addFocusHelper(t)}),this._currSelection.forEach(t=>{this._addSelectionHelper(t)})}}e.InteractionState=a,e.SelectionHelper=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(1),i=n(82),o=n(5),a=n(7),s=n(23),u=n(10),c=n(3);e.MAX_DISCRETE_WIDTH=50;class l{constructor(t=1,e="",n=Number.MAX_VALUE){this.baseScale={maxRange:Number.MAX_VALUE,scalar:t,units:e},this.scalars=[]}getBaseUnit(){return this.baseScale.units}getBaseScalar(){return this.baseScale.scalar}addScalar(t){this.scalars.push(t)}getScalars(){return this.scalars}}function h(t,e){if(!t)return{scalar:1,units:"",maxRange:0};let n,r=[t.baseScale];if(t.scalars)for(let e=0;e<t.scalars.length;++e)r.push(t.scalars[e]);for(r.sort((function(t,e){return e.maxRange-t.maxRange})),n=0;n<r.length&&!(r[n].maxRange<e);++n);return r[n-1]}e.ScalingInfo=l,e.getScalar=h;e.D3Axis=class{constructor(t,e,n){switch(this.cache={pixels:-1,domain:new Array},this._axis=e,this._position=n,this._keysPerDomain=1,this._axisPixels=0,this._position=new r.Rect(0,0,0,0),this._d3axes=[],this._axis.alignment){case r.Alignment.Left:this._d3axes.push(c.axisLeft(c.scaleLinear()));break;case r.Alignment.Right:this._d3axes.push(c.axisRight(c.scaleLinear()));break;case r.Alignment.Top:this._d3axes.push(c.axisTop(c.scaleLinear()));break;case r.Alignment.Bottom:this._d3axes.push(c.axisBottom(c.scaleLinear()))}if(this._axis.axisDesc.scaleType===i.AxisType.Ordinal||this._axis.axisDesc.keys&&this._axis.axisDesc.keys.length>0)this._domain=[this._axis.axisDesc.keys],this._isBanded=!0;else{this._domain=[];let t=e.axisDesc.range;t&&void 0!==t.min&&void 0!==t.max&&this.setDomain([t.min,t.max])}this._d3svg=t;let o="axis";if(this._axis.css)for(let t in this._axis.css.classes)o+=" "+t;this._axis.hidden||(this._axisSVG=this._d3svg.append("g").classed(o,!0),this._axis.axisDesc.label&&this._axis.axisDesc.label.length>0&&(this._axisLabel=this._d3svg.append("text").classed("lane-axis-label",!0).style("text-anchor","middle").text(this._axis.axisDesc.label))),this._formatter=function(t){return t}}setRangePixels(t){return this._axisPixels=t,this.getScale().range([0,t]),this}getRangePixels(){return this._axisPixels}setDomain(t,e=0){return this._domain[e]=t,this.getScale().domain(t),this}appendDomain(t,e=0){return this._domain.length<=e&&(this._domain[e]=[]),o.mergeKeys(this._domain[e],t),this}getDomain(t=0){return this._domain[t]}getLevelCount(){return this._domain.length}setKeysPerDomain(t){this._keysPerDomain=t}getAxis(){return this._axis}getPosition(){return this._position}setPosition(t){this._position=t}getRenderedRect(){return this._renderedRect}setScale(t,e=0){return this._d3axes[e].scale(t)}getScale(t=0){return this._d3axes[t].scale()}getCurrentBand(t){let e=this.getScale(),n=e.domain(),r=e.range(),i=r[1]-r[0],o=i/n.length;if(t<=i){return n[Math.round(t/o-.5)]}}mapCoordinateToValue(t){return this._isBanded?this.getCurrentBand(t):this.getScale().invert(t)}setBanded(t){this._isBanded=t}isBanded(){return this._isBanded}setLinearCommitRange(t){this._axisPixels=t;let e=this._d3axes[0].scale().domain(),n=e?e[0]:0,i=e?e[1]:0;n===i&&(i>0?n=0:i=0),n>i&&(console.log("Error minimum axis value is greater than maximum axis value"),n=0,i=1);let o=c.scaleLinear().domain([n,i]).clamp(!0);switch(this._axis.alignment){case r.Alignment.Left:case r.Alignment.Right:this.setScale(o.range([this._axisPixels,0]));break;case r.Alignment.Top:case r.Alignment.Bottom:this.setScale(o.range([0,this._axisPixels]))}return this}setLogrithmicCommitRange(t){this._axisPixels=t;let e=this._d3axes[0].scale().domain(),n=e?e[0]:0,i=e?e[1]:0;this.setDomain([Math.max(1e-9,n),i]),n=this.getDomain()[0],i=this.getDomain()[1],n>i&&(console.log("Error no data for axis"),n=1,i=2);let o=c.scaleLog().base(10).domain([n,i]).clamp(!0);switch(this._axis.alignment){case r.Alignment.Left:case r.Alignment.Right:this.setScale(o.range([this._axisPixels,0]));break;case r.Alignment.Top:case r.Alignment.Bottom:this.setScale(o.range([0,this._axisPixels]))}return this}setBandCommitRange(t){let n=this;this._axisPixels=Math.min(n.getDomain().length*n._keysPerDomain*e.MAX_DISCRETE_WIDTH,t);let r=c.scaleBand().range([0,this._axisPixels]).padding(.1).align(.5).domain(n.getDomain());this.setScale(r);for(let t=1;t<n._domain.length;++t)this._d3axes[t]=c.axisBottom(c.scaleBand().domain(n.getDomain(t)).range([0,n.getScale(t-1).bandwidth()]));return this}commitRange(t){if(this.isBanded())this.setBandCommitRange(t);else switch(this._axis.axisDesc.scaleType){case i.AxisType.Logarithmic:this.setLogrithmicCommitRange(t);break;case i.AxisType.Linear:default:this.setLinearCommitRange(t)}return this}renderNestedAxes(t,e){switch(this._axis.alignment){case r.Alignment.Bottom:if(t===this._d3axes.length-1)return;let n=this._position.y+30*(this._d3axes.length-t-2),i=this.getScale(t-1),o=i.domain();for(let r=0;r<o.length;++r){let a=i(o[r])+e,s=this._d3svg.append("g").classed("nested-axis",!0).attr("transform","translate("+a+", "+n+")");s.call(this._d3axes[t]),this._nestedAxes.push(s),this.renderNestedAxes(t+1,a)}}}addTooltipToHiddenYTicks(){let t=this;this._axisSVG.selectAll(".tick").append("title").text((function(e){let n=e,r=t._axis.axisDesc.scalingInfo;return r&&r.baseScale&&(n+=r.baseScale.units),n}))}removeOverlappingTicksAsc(t,e){let n=this._axisSVG.selectAll(".tick").selectAll("text").nodes();if(n.length>0){let r={},i=0,o=n[i];for(;i<n.length&&0===o.textContent.length;++i)o=n[i];for(r[o.__data__]=!0;i<n.length;){let t=o.getBoundingClientRect();for(++i;i<n.length;++i){let r=n[i],o=r.getBoundingClientRect();if(0!==r.textContent.length&&e(t,o))break}o=n[i],o&&(r[o.__data__]=!0)}Object.keys(r).length!==n.length&&(t.tickFormat(t=>{if(r[t])return this._formatter(t)}),this._axisSVG.call(t),t.tickFormat(this._formatter))}}removeOverlappingTicksDesc(t,e){let n=this._axisSVG.selectAll(".tick").selectAll("text").nodes();if(n.length>0){let r={},i=n.length-1,o=n[i];for(;i>=0&&0===o.textContent.length;--i)o=n[i];for(r[o.__data__]=!0;i>=0;){let t=o.getBoundingClientRect();for(--i;i>=0;--i){let r=n[i],o=r.getBoundingClientRect();if(0!==r.textContent.length&&e(t,o))break}o=n[i],o&&(r[o.__data__]=!0)}Object.keys(r).length!==n.length&&(t.tickFormat(t=>{if(r[t])return this._formatter(t)}),this._axisSVG.call(t),t.tickFormat(this._formatter))}}removeYOverlappingTicks(t){let e=(t,e)=>t.bottom<e.top+2;this.isBanded()?this.removeOverlappingTicksAsc(t,e):this.removeOverlappingTicksDesc(t,e)}removeXOverlappingTicks(t){this.removeOverlappingTicksDesc(t,(t,e)=>t.left>e.right+5)}saveState(){this.cache.pixels=this.getRangePixels(),this.cache.domain=this.getScale().domain()}render(){let t=this;if(t._axis.hidden)return void(t._axisSVG&&t._axisSVG.remove());let e,n,o,a=t._axis.alignment,s=this.getRangePixels(),u=this._d3axes[0].scale().domain(),f=this.cache.pixels!==s||JSON.stringify(this.cache.domain)!==JSON.stringify(u);if(t._nestedAxes=[],e=t._axis.axisDesc.scalingInfo?t._axis.axisDesc.scalingInfo:new l,t._axis.axisDesc.scaleType===i.AxisType.Ordinal)this._formatter=function(t){let n=t;return n+=e.baseScale.units,n};else{let n=t.getScale().domain(),r=n[1]-n[0];if(!isNaN(r)){let n=h(e,r);switch(t._axis.axisDesc.scaleType){case i.AxisType.Linear:this._formatter=function(e){return t._axis.axisDesc.precision?c.format(",."+t._axis.axisDesc.precision+"f")(e*n.scalar)+n.units:c.format(",")(e*n.scalar)+n.units},t._d3axes[0].tickFormat(this._formatter)}}}t._axis.options&&(void 0!==t._axis.options.tickCount&&t._d3axes[0].ticks(t._axis.options.tickCount),void 0!==t._axis.options.tickSizeInner&&t._d3axes[0].tickSizeInner(t._axis.options.tickSizeInner),void 0!==t._axis.options.tickSizeOuter&&t._d3axes[0].tickSizeOuter(t._axis.options.tickSizeOuter),t._axis.options.tickMappingFunc&&(this._formatter=t._axis.options.tickMappingFunc,t._d3axes[0].tickFormat(this._formatter)));let d=0;switch(a){case r.Alignment.Left:case r.Alignment.Right:if(a===r.Alignment.Left?t._axisSVG.attr("transform","translate("+(t._position.x-1)+", "+t._position.y+")"):t._axisSVG.attr("transform","translate("+t._position.x+", "+t._position.y+")"),f&&(t._axisSVG.call(t._d3axes[0]),t.removeYOverlappingTicks(t._d3axes[0])),n=t._axisSVG.node(),o=n.getBoundingClientRect(),t._axisLabel){let e=-t._axisPixels/2,n=-90,i=-o.width-10;a===r.Alignment.Right&&(n=-n,e=-e),t._axisLabel.attr("transform","translate("+t._position.x+", "+t._position.y+") rotate("+n+")").attr("x",e).attr("y",0).attr("dy",i+"px")}t.addTooltipToHiddenYTicks();break;case r.Alignment.Top:t._axisSVG.attr("transform","translate("+t._position.x+", "+t._position.y+")"),f&&(t._axisSVG.call(t._d3axes[0]),t.removeXOverlappingTicks(t._d3axes[0])),n=t._axisSVG.node(),o=n.getBoundingClientRect(),t._axisLabel&&t._axisLabel.attr("x",t._position.x).attr("y",t._position.y-o.height-20).attr("dx",t._axisPixels/2);break;case r.Alignment.Bottom:let e=t.getLevelCount();if(e>1&&(f=!0,t._d3svg.selectAll(".nested-axis").remove(),t.renderNestedAxes(1,t._position.x),d=30*(e-2)),t._axisSVG.attr("transform","translate("+t._position.x+", "+(t._position.y+d)+")"),f)if(t._axisSVG.call(t._d3axes[0]),t._axis.options&&(t._axis.options.rotateText||t._axis.options.rotateTextDegrees)){let e=t._axis.options.rotateTextDegrees?t._axis.options.rotateTextDegrees:65;t._axisSVG.selectAll("text").style("text-anchor","end").attr("dx","-.8em").attr("dy",".15em").attr("transform","rotate(-"+e+")")}else this.removeXOverlappingTicks(t._d3axes[0]);n=t._axisSVG.node(),o=n.getBoundingClientRect(),t._axisLabel&&t._axisLabel.attr("x",t._position.x).attr("y",t._position.y+o.height+20).attr("dx",t._axisPixels/2)}let p=o.left,g=o.right,_=o.top,m=o.bottom;if(t._axisLabel){let e=t._axisLabel.node().getBoundingClientRect();p=Math.min(e.left,p),g=Math.max(e.right,g),_=Math.min(e.top,_),m=Math.max(e.bottom,m)}t._renderedRect=new r.Rect(p,_,g-p,m-_+d),this.saveState()}};class f extends u.D3Chart{constructor(t,e,n){let i=t;i.axes=[t],i.dataSets=[],t.alignment===r.Alignment.Left||t.alignment===r.Alignment.Right?console.log("Error: cannot render standalone left/right axes"):(super(t,e,n),this._hasBottomHandle=!1,this._options.bottomMargin=this._options.bottomMargin?this._options.bottomMargin:1,this._options.height=0,t.axisDesc.range?(this._xMin=t.axisDesc.range.min,this._xMax=t.axisDesc.range.max):(console.log("Error: standalone axis must have a specified range, defaulting to 0-100"),this._xMin=0,this._xMax=100))}updateHandles(){this._svg.select(".chart-handle.bottom").attr("x",this._options.leftMargin+this._handleWidth).attr("y",this._graphRect.y+this._graphRect.height).attr("width",this._graphRect.width-this._handleWidth-this._handleWidth),this._svg.select(".chart-handle.left").attr("x",this._options.leftMargin).attr("y",0).attr("height",this._svgRect.height),this._svg.select(".chart-handle.right").attr("x",this._svgRect.width-this._options.rightMargin-this._handleWidth).attr("y",0).attr("height",this._svgRect.height)}configureCursorTracking(){let t=this._svg;if(!t.select(".overlay").node()){let n=t.append("rect").attr("class","overlay").attr("fill","none").attr("pointer-events","all");var e=n.node().parentNode.firstChild;e&&n.node().parentNode.insertBefore(n.node(),e)}t.select(".overlay").attr("width",this._svgRect.width).attr("height",this._svgRect.height)}addHoverline(){this._hoverLine&&this._hoverLine.remove(),this._hoverLine=this._svg.append("line").attr("class","hover-line").attr("x1",0).attr("x2",0).attr("y1",0).attr("y2",this._svgRect.height).attr("stroke","#222222").attr("stroke-width",1).attr("pointer-events","none").style("display","none"),this._svg.on("mouseover",this.cursorEnter).on("mousemove",this.cursorMove).on("mouseout",this.cursorExit)}configureBrush(){this.configureBrushHelper(this._svg),this._svg.select(".brush").attr("transform",`translate(${this._options.leftMargin}, 0)`)}configureZoom(){this.configureZoomHelper(this._svg)}configureContextMenu(){this._svg.on("contextmenu",this.contextMenu(this._contextMenuItems,this._dataTooltip?this._dataTooltip.onMouseLeave:void 0))}configureTooltip(){let t=this;return this._dataTooltip=new s.CustomDivTooltip(t._tooltipId,"tooltip-t"),this._dataTooltip.setTarget(t._svg).setAnalyticsName(t._tooltipAnalyticsName).setPlaceTooltipLeftRight().alwaysRecalcWidth(!0).setDelay(t._options.tooltipDelay?t._options.tooltipDelay:0),void(this._options.disableTooltip||this._dataTooltip.setEnterCallback(e).setMoveCallback(e));function e(){if(o.SVGRenderer.IS_RESIZING)return;let e=c.mouse(t.getGraphGroup().node()),n=u.getBoundedPixelValue(e[0],t._graphRect.width),r=e[1];return t.populateTooltip(n,r),!0}}}a.D3Renderer.register(r.UIType.Axis,f)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(1),i=n(2),o=n(23),a=n(5),s=n(3);class u extends a.SVGRenderer{constructor(t,e,n){super();let r=this;r.DEFAULT_GRAPH_HEIGHT=250,r.MIN_MARGIN={TOP:10,BOTTOM:10,LEFT:10,RIGHT:10},r._options.height=r.DEFAULT_GRAPH_HEIGHT,r._options.topMargin=r.MIN_MARGIN.TOP,r._options.leftMargin=r.MIN_MARGIN.LEFT,r._options.rightMargin=r.MIN_MARGIN.RIGHT,r._options.bottomMargin=r.MIN_MARGIN.BOTTOM,r.initialize(t,e,n),r.getDataKey=function(t){return t?t.key:""},r.getDataName=function(t){return t&&t.name?t.name:r.getDataKey(t).toString()},r.getDataValue=function(t){return t.value},r.getDataDisplayValue=function(t){return t.displayValue?t.displayValue:t.value},r.arc=s.arc().innerRadius((function(t){return Math.max(0,t.innerRadius)*r._radius})).outerRadius((function(t){return Math.max(0,t.outerRadius)*r._radius})).startAngle((function(t){return t.startAngle})).endAngle((function(t){return t.endAngle}))}createLayout(){let t=this;t._svg.selectAll("*").remove(),t._graphArea=t._svg.append("g").attr("class","graphArea");let e=t._element.legend;e&&(t._legend=new a.D3Legend(t._svg,e,""))}getSegmentClasses(t){let e=i.getSelectionName(this.getDataKey(t).toString()),n=i.getSelectionName(this.getDataName(t));return e===n?" chart-data arc "+e:" chart-data arc "+e+" "+n}configureItemInteraction(t,e,n){let i=this,o=i._element;t.on("mouseenter",(function(){if(i._hoverItem=e,i._hoverItem)return c({caller:i._element,event:r.EventType.HoverStart,data:e,selection:n});return!1})).on("mouseleave",(function(){if(i._hoverItem){let t=c({caller:i._element,event:r.EventType.HoverEnd,data:e,selection:n});return i._hoverItem=void 0,t}return!1}));let s=i._element,u=s.contextMenuItems;if(i._options.enableSaveAsImage){let t={title:"Save As Image",action:function(t,e,n){i.saveImage()},disabled:!1};u=s.contextMenuItems?s.contextMenuItems.slice(0):[],u.push(t)}return void a.addClickHelper(t,i.getOptions(),s.onClick,s.onDoubleClick,u,i._dataTooltip,s,e,n);function c(t){if(!a.SVGRenderer.IS_RESIZING)return i._renderer.focus(o,t),o.onHover&&o.onHover(t),!0}}configureTooltip(t){if(void 0===t)return;let e=this;return this._dataTooltip=new o.CustomDivTooltip(e._tooltipId,"tooltip-t"),void this._dataTooltip.setAnalyticsName(e._tooltipAnalyticsName).setTarget(t).setEnterCallback(n).setMoveCallback(n).setPlaceTooltipLeftRight().alwaysRecalcWidth(!0).setDelay(e._options.tooltipDelay?e._options.tooltipDelay:0);function n(t){if(a.SVGRenderer.IS_RESIZING)return;let n=e._element,r=e.getDataName(t.rawData);if(n.onTooltip){let i={tooltip:e._dataTooltip};e._dataTooltip.setData(n.title+" for "+e.getDataName(t.rawData),[]),n.onTooltip({caller:n,selection:r,data:i})}else{let r=t.rawData,i=n.units?n.units:"",o={};o[e.getDataName(r)]=e.getDataDisplayValue(r)+i;let a=[{source:n,group:"",metrics:o}],s=e._dataTooltip;n.title?s.setData(n.title+" for "+e.getDataName(r),a):s.setData("",a)}return!0}}renderData(){throw"Please override renderData for D3Polar in subclass"}getLegendData(){throw"Please override getLegendData for D3Polar in subclass"}renderLegend(t,e,n){let o=this,a=this._element,s=a.legend;if(s){let u=this.getLegendData(),c=t,l=e;switch(s.alignment){case r.Alignment.Bottom:l+=n+10;break;case r.Alignment.Right:c+=n+10}o._legend.setPosition(new r.Rect(c,l,o._graphRect.width,o._graphRect.height));let h=o._renderer.getColorManager(),f=[];for(let t=0;t<u.length;++t){let e=u[t],n=o.getDataName(e),r=i.getSelectionName(n),s=o._svg.selectAll("."+r);try{f.push({key:n,color:s.attr("fill"),opacity:s.attr("opacity"),shape:"rect",value:o.getDataValue(e),units:a.units})}catch(t){f.push({key:n,color:h.getColor(n),opacity:"1",shape:"rect",value:o.getDataValue(e),units:a.units})}}o._legend.setItems(f),o._legend.render();let d=o._legend.getRenderedRect();o._options.width=Math.max(o._options.width,c+d.width),o._options.height=Math.max(o._options.height,l+d.height)}}render(t){this.loadOptions(t),this._svgRect.width=this._options.width;let e=this._options.topMargin,n=this._options.height-this._options.bottomMargin,r=this._options.leftMargin,i=this._svgRect.width-this._options.rightMargin,o=Math.min(n-e,i-r);this._radius=o/2,this._graphRect.x=r,this._graphRect.y=e,this._graphRect.width=o,this._graphRect.height=o,this._center={x:this._radius+this._options.leftMargin,y:this._radius+this._options.topMargin},this._graphArea.attr("transform","translate("+this._center.x+","+this._center.y+")"),this.renderData(),this._options.width=r+o+this._options.rightMargin,this._options.height=e+o+this._options.bottomMargin,this.renderLegend(r,e,o),this._svg.attr("width",this._options.width).attr("height",this._options.height)}}e.D3Polar=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){t[t.Linear=1]="Linear",t[t.Elbow=2]="Elbow",t[t.Directional=4]="Directional",t[t.Bidirectional=8]="Bidirectional",t[t.Curve=16]="Curve"}(e.LinkType||(e.LinkType={})),function(t){t[t.NodeSimple=0]="NodeSimple",t[t.NodeRectangle=1]="NodeRectangle"}(e.NodeType||(e.NodeType={}))},function(t,e,n){"use strict";var r=n(12);t.exports=i;function i(t){this._isDirected=!r.has(t,"directed")||t.directed,this._isMultigraph=!!r.has(t,"multigraph")&&t.multigraph,this._isCompound=!!r.has(t,"compound")&&t.compound,this._label=void 0,this._defaultNodeLabelFn=r.constant(void 0),this._defaultEdgeLabelFn=r.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children["\0"]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function o(t,e){t[e]?t[e]++:t[e]=1}function a(t,e){--t[e]||delete t[e]}function s(t,e,n,i){var o=""+e,a=""+n;if(!t&&o>a){var s=o;o=a,a=s}return o+""+a+""+(r.isUndefined(i)?"\0":i)}function u(t,e,n,r){var i=""+e,o=""+n;if(!t&&i>o){var a=i;i=o,o=a}var s={v:i,w:o};return r&&(s.name=r),s}function c(t,e){return s(t,e.v,e.w,e.name)}i.prototype._nodeCount=0,i.prototype._edgeCount=0,i.prototype.isDirected=function(){return this._isDirected},i.prototype.isMultigraph=function(){return this._isMultigraph},i.prototype.isCompound=function(){return this._isCompound},i.prototype.setGraph=function(t){return this._label=t,this},i.prototype.graph=function(){return this._label},i.prototype.setDefaultNodeLabel=function(t){return r.isFunction(t)||(t=r.constant(t)),this._defaultNodeLabelFn=t,this},i.prototype.nodeCount=function(){return this._nodeCount},i.prototype.nodes=function(){return r.keys(this._nodes)},i.prototype.sources=function(){var t=this;return r.filter(this.nodes(),(function(e){return r.isEmpty(t._in[e])}))},i.prototype.sinks=function(){var t=this;return r.filter(this.nodes(),(function(e){return r.isEmpty(t._out[e])}))},i.prototype.setNodes=function(t,e){var n=arguments,i=this;return r.each(t,(function(t){n.length>1?i.setNode(t,e):i.setNode(t)})),this},i.prototype.setNode=function(t,e){return r.has(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=e),this):(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]="\0",this._children[t]={},this._children["\0"][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)},i.prototype.node=function(t){return this._nodes[t]},i.prototype.hasNode=function(t){return r.has(this._nodes,t)},i.prototype.removeNode=function(t){var e=this;if(r.has(this._nodes,t)){var n=function(t){e.removeEdge(e._edgeObjs[t])};delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],r.each(this.children(t),(function(t){e.setParent(t)})),delete this._children[t]),r.each(r.keys(this._in[t]),n),delete this._in[t],delete this._preds[t],r.each(r.keys(this._out[t]),n),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this},i.prototype.setParent=function(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(r.isUndefined(e))e="\0";else{for(var n=e+="";!r.isUndefined(n);n=this.parent(n))if(n===t)throw new Error("Setting "+e+" as parent of "+t+" would create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this},i.prototype._removeFromParentsChildList=function(t){delete this._children[this._parent[t]][t]},i.prototype.parent=function(t){if(this._isCompound){var e=this._parent[t];if("\0"!==e)return e}},i.prototype.children=function(t){if(r.isUndefined(t)&&(t="\0"),this._isCompound){var e=this._children[t];if(e)return r.keys(e)}else{if("\0"===t)return this.nodes();if(this.hasNode(t))return[]}},i.prototype.predecessors=function(t){var e=this._preds[t];if(e)return r.keys(e)},i.prototype.successors=function(t){var e=this._sucs[t];if(e)return r.keys(e)},i.prototype.neighbors=function(t){var e=this.predecessors(t);if(e)return r.union(e,this.successors(t))},i.prototype.isLeaf=function(t){return 0===(this.isDirected()?this.successors(t):this.neighbors(t)).length},i.prototype.filterNodes=function(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var n=this;r.each(this._nodes,(function(n,r){t(r)&&e.setNode(r,n)})),r.each(this._edgeObjs,(function(t){e.hasNode(t.v)&&e.hasNode(t.w)&&e.setEdge(t,n.edge(t))}));var i={};return this._isCompound&&r.each(e.nodes(),(function(t){e.setParent(t,function t(r){var o=n.parent(r);return void 0===o||e.hasNode(o)?(i[r]=o,o):o in i?i[o]:t(o)}(t))})),e},i.prototype.setDefaultEdgeLabel=function(t){return r.isFunction(t)||(t=r.constant(t)),this._defaultEdgeLabelFn=t,this},i.prototype.edgeCount=function(){return this._edgeCount},i.prototype.edges=function(){return r.values(this._edgeObjs)},i.prototype.setPath=function(t,e){var n=this,i=arguments;return r.reduce(t,(function(t,r){return i.length>1?n.setEdge(t,r,e):n.setEdge(t,r),r})),this},i.prototype.setEdge=function(){var t,e,n,i,a=!1,c=arguments[0];"object"==typeof c&&null!==c&&"v"in c?(t=c.v,e=c.w,n=c.name,2===arguments.length&&(i=arguments[1],a=!0)):(t=c,e=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],a=!0)),t=""+t,e=""+e,r.isUndefined(n)||(n=""+n);var l=s(this._isDirected,t,e,n);if(r.has(this._edgeLabels,l))return a&&(this._edgeLabels[l]=i),this;if(!r.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[l]=a?i:this._defaultEdgeLabelFn(t,e,n);var h=u(this._isDirected,t,e,n);return t=h.v,e=h.w,Object.freeze(h),this._edgeObjs[l]=h,o(this._preds[e],t),o(this._sucs[t],e),this._in[e][l]=h,this._out[t][l]=h,this._edgeCount++,this},i.prototype.edge=function(t,e,n){var r=1===arguments.length?c(this._isDirected,arguments[0]):s(this._isDirected,t,e,n);return this._edgeLabels[r]},i.prototype.hasEdge=function(t,e,n){var i=1===arguments.length?c(this._isDirected,arguments[0]):s(this._isDirected,t,e,n);return r.has(this._edgeLabels,i)},i.prototype.removeEdge=function(t,e,n){var r=1===arguments.length?c(this._isDirected,arguments[0]):s(this._isDirected,t,e,n),i=this._edgeObjs[r];return i&&(t=i.v,e=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],a(this._preds[e],t),a(this._sucs[t],e),delete this._in[e][r],delete this._out[t][r],this._edgeCount--),this},i.prototype.inEdges=function(t,e){var n=this._in[t];if(n){var i=r.values(n);return e?r.filter(i,(function(t){return t.v===e})):i}},i.prototype.outEdges=function(t,e){var n=this._out[t];if(n){var i=r.values(n);return e?r.filter(i,(function(t){return t.w===e})):i}},i.prototype.nodeEdges=function(t,e){var n=this.inEdges(t,e);if(n)return n.concat(this.outEdges(t,e))}},function(t,e,n){var r=n(52),i=n(236),o=n(237),a=n(238),s=n(239),u=n(240);function c(t){var e=this.__data__=new r(t);this.size=e.size}c.prototype.clear=i,c.prototype.delete=o,c.prototype.get=a,c.prototype.has=s,c.prototype.set=u,t.exports=c},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,n){var r=n(24)(n(16),"Map");t.exports=r},function(t,e,n){var r=n(247),i=n(254),o=n(256),a=n(257),s=n(258);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,t.exports=u},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}},function(t,e){t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},function(t,e){t.exports=function(t){return function(e){return t(e)}}},function(t,e,n){(function(t){var r=n(128),i=e&&!e.nodeType&&e,o=i&&"object"==typeof t&&t&&!t.nodeType&&t,a=o&&o.exports===i&&r.process,s=function(){try{var t=o&&o.require&&o.require("util").types;return t||a&&a.binding&&a.binding("util")}catch(t){}}();t.exports=s}).call(this,n(36)(t))},function(t,e,n){var r=n(60),i=n(264),o=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return i(t);var e=[];for(var n in Object(t))o.call(t,n)&&"constructor"!=n&&e.push(n);return e}},function(t,e,n){var r=n(137),i=n(138),o=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(t){return null==t?[]:(t=Object(t),r(a(t),(function(e){return o.call(t,e)})))}:i;t.exports=s},function(t,e){t.exports=function(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}},function(t,e,n){var r=n(135)(Object.getPrototypeOf,Object);t.exports=r},function(t,e,n){var r=n(143);t.exports=function(t){var e=new t.constructor(t.byteLength);return new r(e).set(new r(t)),e}},function(t,e){t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}},function(t,e,n){var r=n(6),i=n(105),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;t.exports=function(t,e){if(r(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!i(t))||(a.test(t)||!o.test(t)||null!=e&&t in Object(e))}},function(t,e,n){var r=n(34),i=n(17);t.exports=function(t){return"symbol"==typeof t||i(t)&&"[object Symbol]"==r(t)}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}},function(t,e,n){var r=n(28)(n(14),"Map");t.exports=r},function(t,e,n){var r=n(39),i=n(15);t.exports=function(t){if(!i(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},function(t,e,n){var r=n(383),i=n(390),o=n(392),a=n(393),s=n(394);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,t.exports=u},function(t,e,n){var r=n(399),i=n(75),o=n(112),a=o&&o.isTypedArray,s=a?i(a):r;t.exports=s},function(t,e){t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},function(t,e,n){(function(t){var r=n(162),i=e&&!e.nodeType&&e,o=i&&"object"==typeof t&&t&&!t.nodeType&&t,a=o&&o.exports===i&&r.process,s=function(){try{var t=o&&o.require&&o.require("util").types;return t||a&&a.binding&&a.binding("util")}catch(t){}}();t.exports=s}).call(this,n(36)(t))},function(t,e){var n=Object.prototype;t.exports=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||n)}},function(t,e,n){var r=n(170),i=n(171),o=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(t){return null==t?[]:(t=Object(t),r(a(t),(function(e){return o.call(t,e)})))}:i;t.exports=s},function(t,e){t.exports=function(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}},function(t,e,n){var r=n(167)(Object.getPrototypeOf,Object);t.exports=r},function(t,e,n){var r=n(175);t.exports=function(t){var e=new t.constructor(t.byteLength);return new r(e).set(new r(t)),e}},function(t,e,n){var r=n(31),i=n(179),o=n(180);t.exports=function(t,e){return o(i(t,e,r),t+"")}},function(t,e,n){var r=n(427)();t.exports=r},function(t,e,n){var r=n(79),i=n(48);t.exports=function(t,e){for(var n=0,o=(e=r(e,t)).length;null!=t&&n<o;)t=t[i(e[n++])];return n&&n==o?t:void 0}},function(t,e,n){var r=n(8),i=n(42),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;t.exports=function(t,e){if(r(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!i(t))||(a.test(t)||!o.test(t)||null!=e&&t in Object(e))}},function(t,e,n){var r=n(42);t.exports=function(t,e,n){for(var i=-1,o=t.length;++i<o;){var a=t[i],s=e(a);if(null!=s&&(void 0===u?s==s&&!r(s):n(s,u)))var u=s,c=a}return c}},,,function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.XYValue=class{constructor(t,e){this.x=t,this.y=e}};e.MinMaxValue=class{constructor(t,e,n,r){this.x=t,this.min=e,this.max=n,this.y=r}};e.CandlestickValue=class{constructor(t,e,n,r,i){this.x=t,this.min=e,this.max=n,this.entry=r,this.exit=i}};e.SummaryValue=class{constructor(t,e={}){this.key=t,this.data=e}addValue(t,e){let n=this.data;return n.hasOwnProperty(t)?n[t]+=e:n[t]=e,this}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(11),i=n(32),o=n(2),a=n(10),s=n(43);class u{constructor(t,e,n,r,i,o){this._d3Chart=t,this._isXContinuous=o,this._svg=n,this._xAxis=r,this._yAxis=i,this._d3SeriesList=[],this.setData(e)}static canRender(t){let e=t.renderType&r.RenderType.Line||t.renderType&r.RenderType.Area||t.renderType&r.RenderType.Scatter||t.renderType&r.RenderType.DirectionalArrow,n=!0;return t.data.forEach(t=>{n=n&&t.hasOwnProperty("values")}),e&&n&&t.data.length>1}setData(t){this._layer=t;for(let t=0;t<this._d3SeriesList.length;++t)this._d3SeriesList[t].clear();if(t.data.length!==this._d3SeriesList.length){this._d3SeriesList=[];for(let e=0;e<t.data.length;++e){let e=new s.XYSeries(this._d3Chart,t,this._svg,this._xAxis,this._yAxis,this._isXContinuous);this._d3SeriesList.push(e)}}for(let e=0;e<this._d3SeriesList.length;++e)this._d3SeriesList[e].setData(t,e)}getName(){return""}getMaxName(){let t="";for(let e=0;e<this._d3SeriesList.length;++e){let n=this._d3SeriesList[e].getName();t=n.length>t.length?n:t}return t}isXContinuousSeries(){return this._isXContinuous}isYContinuousSeries(){for(let t=0;t<this._d3SeriesList.length;++t)if(!this._d3SeriesList[t].isYContinuousSeries())return!1;return!0}getDiscreteXValues(t){let e={};for(let n=0;n<this._d3SeriesList.length;++n){let r=this._d3SeriesList[n].getDiscreteXValues(t);for(let t=0;t<r.length;++t)e[r[t]]=!0}return Object.keys(e)}getDiscreteYValues(){let t={};for(let e=0;e<this._d3SeriesList.length;++e){let n=this._d3SeriesList[e].getDiscreteYValues();for(let e=0;e<n.length;++e)t[n[e]]=!0}return Object.keys(t)}getXMinMax(){let t=[Number.MAX_VALUE,-Number.MAX_VALUE];for(let e=0;e<this._layer.data.length;++e){let n=this._d3SeriesList[e].getXMinMax();isNaN(n[0])||(t[0]=Math.min(n[0],t[0])),isNaN(n[1])||(t[1]=Math.max(n[1],t[1]))}return t}getYMinMax(){let t=[Number.MAX_VALUE,0];for(let e=0;e<this._d3SeriesList.length;++e){let n=this._d3SeriesList[e].getYMinMax();t[0]=Math.min(n[0],t[0]),this._layer.renderType&r.RenderType.Stacked?t[1]=n[1]+t[1]:t[1]=Math.max(n[1],t[1])}return t}getRequiredHeight(){return 0}getXScalingInfo(){if(this._d3SeriesList.length>0)return this._d3SeriesList[0].getXScalingInfo()}getYScalingInfo(){if(this._d3SeriesList.length>0)return this._d3SeriesList[0].getXScalingInfo()}decimateData(t,e,n,r){let s=this;s._worker&&(s._worker.terminate(),s._worker=null);let u=n.getScale(),c=r.getScale();if(this.isXContinuousSeries()&&this._layer.decimator){let l=[],h=[];for(let t=0;t<this._layer.data.length;++t){let e,n=this._layer.data[t];l.push(n.name),e=Array.isArray(n.values)?new o.SimpleBuffer(n.values):n.values,h.push(e)}let f=this._layer.decimator;return(s._layer.enableWebWorkers||s._d3Chart.getOptions().enableWebWorkers)&&i.InternalDecimatorMap[f.getKey()]?new Promise((function(i,o){let d=[];for(let t=0;t<h.length;++t)d[t]=h[t].getData();s._worker=a.createDecimatorWorker(f,t,e,n,r,d,l,(function(t){s._worker=null;for(let e=0;e<s._d3SeriesList.length;++e)s._d3SeriesList[e].setOutputData(t[e]);i()}),(function(n){s._worker=null,f.initialize(u,u.invert,c,l);let r=f.decimateValues(t,e,h);for(let t=0;t<s._d3SeriesList.length;++t)s._d3SeriesList[t].setOutputData(r[t]);i()}))})):new Promise((function(n,r){f.initialize(u,u.invert,c,l);let i=f.decimateValues(t,e,h);for(let t=0;t<s._d3SeriesList.length;++t)s._d3SeriesList[t].setOutputData(i[t]);n()}))}{let i=[];for(let o=0;o<this._d3SeriesList.length;++o)i.push(this._d3SeriesList[o].decimateData(t,e,n,r));return Promise.all(i)}}getTooltipMetrics(t,e){let n={source:t,group:"",metrics:{}};for(let r=0;r<this._d3SeriesList.length;++r){let i=this._d3SeriesList[r].getTooltipMetrics(t,e);for(let t=0;t<i.length;++t)for(let e in i[t].metrics)n.metrics[e]=i[t].metrics[e]}return[n]}getLegendInfo(){let t=[];for(let e=0;e<this._d3SeriesList.length;++e)t=t.concat(this._d3SeriesList[e].getLegendInfo());return t}focus(t){for(let e=0;e<this._d3SeriesList.length;++e)this._d3SeriesList[e].focus(t)}unfocus(t){for(let e=0;e<this._d3SeriesList.length;++e)this._d3SeriesList[e].unfocus(t)}select(t){for(let e=0;e<this._d3SeriesList.length;++e)this._d3SeriesList[e].select(t)}unselect(t){for(let e=0;e<this._d3SeriesList.length;++e)this._d3SeriesList[e].unselect(t)}render(t){if(this._d3SeriesList.length>0){let e=0;this._d3SeriesList.forEach(t=>{e=Math.max(e,t.getOutputData().length())}),t=Array.apply(null,Array(e)).map(Number.prototype.valueOf,0);for(let e=0;e<this._d3SeriesList.length;++e)this._d3SeriesList[e].render(t)}}getRenderedYRange(){let t=[0,-Number.MAX_VALUE];if(this._d3SeriesList.length>0){let e=this._d3SeriesList[0].getOutputData().length();for(let n=0;n<e;++n){let e=0;for(let t=0;t<this._d3SeriesList.length;++t){e+=this._d3SeriesList[t].getOutputData().get(n).y}t[0]=Math.min(e,t[0]),t[1]=Math.max(e,t[1])}}return t}}e.XYGroupSeries=u,a.D3Chart.register(u)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(1),i=n(5),o=n(7),a=n(3),s=n(45);class u extends s.D3ConnectedGraphSVG{constructor(t,e,n){super(t,e,n),s.ConnectedGraphBase.prototype.initializeGraph.call(this,t);let r=this._element;r.links.forEach((function(t){"number"==typeof t.source&&(t.source=r.nodes[t.source]),"number"==typeof t.target&&(t.target=r.nodes[t.target])}))}renderLinks(t){let e=this,n=e._element,r=t.append("g").classed("links",!0).selectAll("line").data(n.links).enter().append("line").attr("x1",(function(t){return t.source.x})).attr("y1",(function(t){return t.source.y})).attr("x2",(function(t){return t.target.x})).attr("y2",(function(t){return t.target.y})).attr("stroke-width",1).attr("class",(function(t){return t.source.key+"-"+t.target.key+" "+t.source.key+" "+t.target.key})).classed("link",!0).on("mouseenter",e.linkHoverStart).on("mouseleave",e.hoverEnd).each((function(t){i.addClickHelper(a.select(this),e.getOptions(),n.onClick,n.onDoubleClick,n.contextMenuItems,e._dataTooltip,n,t.key,t.key)}));return e._dataTooltip.setTarget(r),r}renderNodes(t,e,n,r){let o=this,s=o._element,u=o._renderer.getColorManager(),c=t.append("g").classed("nodes",!0).selectAll("circle").data(s.nodes).enter().append("circle").attr("r",5).attr("cx",(function(t){return t.x})).attr("cy",(function(t){return t.y})).attr("fill",(function(t){return t.type?u.getColor(t.type):u.getColor(t.key)})).attr("class",(function(t){return t.type?t.type+" "+t.key:t.key})).each((function(t){i.addClickHelper(a.select(this),o.getOptions(),s.onClick,s.onDoubleClick,s.contextMenuItems,o._dataTooltip,s,t.key,t.key)})).classed("node",!0).on("mouseenter",o.nodeHoverStart).on("mouseleave",o.hoverEnd).call(a.drag().on("start",e).on("drag",n).on("end",r));return o._dataTooltip.setTarget(c),c}render(t){let e=this.initializeGraphArea(t);this.renderLinks(e),this.renderNodes(e,void 0,(function(t){a.select(this).attr("cx",a.event.x).attr("cy",a.event.y),t.x=a.event.x,t.y=a.event.y,e.selectAll("."+t.key+".link").each((function(e){t.key===e.source.key?a.select(this).attr("x1",(function(t){return t.source.x})).attr("y1",(function(t){return t.source.y})):a.select(this).attr("x2",(function(t){return t.target.x})).attr("y2",(function(t){return t.target.y}))}))}),void 0),this.configureView()}}e.D3SimpleGraph=u,o.D3Renderer.register(r.UIType.SimpleGraph,u)},function(t,e,n){(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.exports=n}).call(this,n(84))},function(t,e){var n=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return n.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},function(t,e,n){var r=n(131),i=n(91),o=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var a=t[e];o.call(t,e)&&i(a,n)&&(void 0!==n||e in t)||r(t,e,n)}},function(t,e,n){var r=n(132);t.exports=function(t,e,n){"__proto__"==e&&r?r(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},function(t,e,n){var r=n(24),i=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=i},function(t,e,n){var r=n(260),i=n(58),o=n(6),a=n(46),s=n(134),u=n(59),c=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=o(t),l=!n&&i(t),h=!n&&!l&&a(t),f=!n&&!l&&!h&&u(t),d=n||l||h||f,p=d?r(t.length,String):[],g=p.length;for(var _ in t)!e&&!c.call(t,_)||d&&("length"==_||h&&("offset"==_||"parent"==_)||f&&("buffer"==_||"byteLength"==_||"byteOffset"==_)||s(_,g))||p.push(_);return p}},function(t,e){var n=/^(?:0|[1-9]\d*)$/;t.exports=function(t,e){var r=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&n.test(t))&&t>-1&&t%1==0&&t<e}},function(t,e){t.exports=function(t,e){return function(n){return t(e(n))}}},function(t,e,n){var r=n(133),i=n(266),o=n(27);t.exports=function(t){return o(t)?r(t,!0):i(t)}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}},function(t,e){t.exports=function(){return[]}},function(t,e,n){var r=n(100),i=n(101),o=n(99),a=n(138),s=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)r(e,o(t)),t=i(t);return e}:a;t.exports=s},function(t,e,n){var r=n(141),i=n(99),o=n(26);t.exports=function(t){return r(t,o,i)}},function(t,e,n){var r=n(100),i=n(6);t.exports=function(t,e,n){var o=e(t);return i(t)?o:r(o,n(t))}},function(t,e,n){var r=n(24)(n(16),"Set");t.exports=r},function(t,e,n){var r=n(16).Uint8Array;t.exports=r},function(t,e,n){var r=n(25),i=Object.create,o=function(){function t(){}return function(e){if(!r(e))return{};if(i)return i(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();t.exports=o},function(t,e){t.exports=function(t){return function(){return t}}},function(t,e,n){var r=n(289),i=n(26);t.exports=function(t,e){return t&&r(t,e,i)}},function(t,e,n){var r=n(297),i=n(17);t.exports=function t(e,n,o,a,s){return e===n||(null==e||null==n||!i(e)&&!i(n)?e!=e&&n!=n:r(e,n,o,a,t,s))}},function(t,e,n){var r=n(149),i=n(300),o=n(150);t.exports=function(t,e,n,a,s,u){var c=1&n,l=t.length,h=e.length;if(l!=h&&!(c&&h>l))return!1;var f=u.get(t);if(f&&u.get(e))return f==e;var d=-1,p=!0,g=2&n?new r:void 0;for(u.set(t,e),u.set(e,t);++d<l;){var _=t[d],m=e[d];if(a)var v=c?a(m,_,d,e,t,u):a(_,m,d,t,e,u);if(void 0!==v){if(v)continue;p=!1;break}if(g){if(!i(e,(function(t,e){if(!o(g,e)&&(_===t||s(_,t,n,a,u)))return g.push(e)}))){p=!1;break}}else if(_!==m&&!s(_,m,n,a,u)){p=!1;break}}return u.delete(t),u.delete(e),p}},function(t,e,n){var r=n(93),i=n(298),o=n(299);function a(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new r;++e<n;)this.add(t[e])}a.prototype.add=a.prototype.push=i,a.prototype.has=o,t.exports=a},function(t,e){t.exports=function(t,e){return t.has(e)}},function(t,e,n){var r=n(25);t.exports=function(t){return t==t&&!r(t)}},function(t,e){t.exports=function(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}}},function(t,e,n){var r=n(154),i=n(64);t.exports=function(t,e){for(var n=0,o=(e=r(e,t)).length;null!=t&&n<o;)t=t[i(e[n++])];return n&&n==o?t:void 0}},function(t,e,n){var r=n(6),i=n(104),o=n(307),a=n(310);t.exports=function(t,e){return r(t)?t:i(t,e)?[t]:o(a(t))}},function(t,e,n){var r=n(154),i=n(58),o=n(6),a=n(134),s=n(95),u=n(64);t.exports=function(t,e,n){for(var c=-1,l=(e=r(e,t)).length,h=!1;++c<l;){var f=u(e[c]);if(!(h=null!=t&&n(t,f)))break;t=t[f]}return h||++c!=l?h:!!(l=null==t?0:t.length)&&s(l)&&a(f,l)&&(o(t)||i(t))}},function(t,e){t.exports=function(t){return function(e){return null==e?void 0:e[t]}}},function(t,e,n){var r=n(12),i=n(158);t.exports=function(t,e,n,r){return function(t,e,n,r){var o,a,s={},u=new i,c=function(t){var e=t.v!==o?t.v:t.w,r=s[e],i=n(t),c=a.distance+i;if(i<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+t+" Weight: "+i);c<r.distance&&(r.distance=c,r.predecessor=o,u.decrease(e,c))};t.nodes().forEach((function(t){var n=t===e?0:Number.POSITIVE_INFINITY;s[t]={distance:n},u.add(t,n)}));for(;u.size()>0&&(o=u.removeMin(),(a=s[o]).distance!==Number.POSITIVE_INFINITY);)r(o).forEach(c);return s}(t,String(e),n||o,r||function(e){return t.outEdges(e)})};var o=r.constant(1)},function(t,e,n){var r=n(12);function i(){this._arr=[],this._keyIndices={}}t.exports=i,i.prototype.size=function(){return this._arr.length},i.prototype.keys=function(){return this._arr.map((function(t){return t.key}))},i.prototype.has=function(t){return r.has(this._keyIndices,t)},i.prototype.priority=function(t){var e=this._keyIndices[t];if(void 0!==e)return this._arr[e].priority},i.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},i.prototype.add=function(t,e){var n=this._keyIndices;if(t=String(t),!r.has(n,t)){var i=this._arr,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}},function(t,e,n){var r=n(12);t.exports=function(t){var e=0,n=[],i={},o=[];return t.nodes().forEach((function(a){r.has(i,a)||function a(s){var u=i[s]={onStack:!0,lowlink:e,index:e++};if(n.push(s),t.successors(s).forEach((function(t){r.has(i,t)?i[t].onStack&&(u.lowlink=Math.min(u.lowlink,i[t].index)):(a(t),u.lowlink=Math.min(u.lowlink,i[t].lowlink))})),u.lowlink===u.index){var c,l=[];do{c=n.pop(),i[c].onStack=!1,l.push(c)}while(s!==c);o.push(l)}}(a)})),o}},function(t,e,n){var r=n(12);function i(t){var e={},n={},i=[];if(r.each(t.sinks(),(function a(s){if(r.has(n,s))throw new o;r.has(e,s)||(n[s]=!0,e[s]=!0,r.each(t.predecessors(s),a),delete n[s],i.push(s))})),r.size(e)!==t.nodeCount())throw new o;return i}function o(){}t.exports=i,i.CycleException=o,o.prototype=new Error},function(t,e,n){var r=n(12);t.exports=function(t,e,n){r.isArray(e)||(e=[e]);var i=(t.isDirected()?t.successors:t.neighbors).bind(t),o=[],a={};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,s){r.has(o,n)||(o[n]=!0,i||s.push(n),r.each(a(n),(function(n){t(e,n,i,o,a,s)})),i&&s.push(n))}(t,e,"post"===n,a,i,o)})),o}},function(t,e,n){(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.exports=n}).call(this,n(84))},function(t,e){var n=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return n.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}},function(t,e,n){var r=n(28),i=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=i},function(t,e,n){var r=n(396),i=n(72),o=n(8),a=n(73),s=n(74),u=n(110),c=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=o(t),l=!n&&i(t),h=!n&&!l&&a(t),f=!n&&!l&&!h&&u(t),d=n||l||h||f,p=d?r(t.length,String):[],g=p.length;for(var _ in t)!e&&!c.call(t,_)||d&&("length"==_||h&&("offset"==_||"parent"==_)||f&&("buffer"==_||"byteLength"==_||"byteOffset"==_)||s(_,g))||p.push(_);return p}},function(t,e){t.exports=function(t,e){return function(n){return t(e(n))}}},function(t,e,n){(function(t){var r=n(14),i=e&&!e.nodeType&&e,o=i&&"object"==typeof t&&t&&!t.nodeType&&t,a=o&&o.exports===i?r.Buffer:void 0,s=a?a.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var n=t.length,r=s?s(n):new t.constructor(n);return t.copy(r),r}}).call(this,n(36)(t))},function(t,e){t.exports=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}},function(t,e){t.exports=function(){return[]}},function(t,e,n){var r=n(115),i=n(116),o=n(114),a=n(171),s=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)r(e,o(t)),t=i(t);return e}:a;t.exports=s},function(t,e,n){var r=n(174),i=n(114),o=n(29);t.exports=function(t){return r(t,o,i)}},function(t,e,n){var r=n(115),i=n(8);t.exports=function(t,e,n){var o=e(t);return i(t)?o:r(o,n(t))}},function(t,e,n){var r=n(14).Uint8Array;t.exports=r},function(t,e,n){var r=n(117);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}},function(t,e,n){var r=n(417),i=n(116),o=n(113);t.exports=function(t){return"function"!=typeof t.constructor||o(t)?{}:r(i(t))}},function(t,e){t.exports=function(t){return function(){return t}}},function(t,e,n){var r=n(423),i=Math.max;t.exports=function(t,e,n){return e=i(void 0===e?t.length-1:e,0),function(){for(var o=arguments,a=-1,s=i(o.length-e,0),u=Array(s);++a<s;)u[a]=o[e+a];a=-1;for(var c=Array(e+1);++a<e;)c[a]=o[a];return c[e]=n(u),r(t,this,c)}}},function(t,e,n){var r=n(424),i=n(425)(r);t.exports=i},function(t,e,n){var r=n(164),i=n(78),o=n(183),a=n(8);t.exports=function(t,e){return(a(t)?r:i)(t,o(e))}},function(t,e,n){var r=n(119),i=n(29);t.exports=function(t,e){return t&&r(t,e,i)}},function(t,e,n){var r=n(31);t.exports=function(t){return"function"==typeof t?t:r}},function(t,e,n){var r=n(433),i=n(18);t.exports=function t(e,n,o,a,s){return e===n||(null==e||null==n||!i(e)&&!i(n)?e!=e&&n!=n:r(e,n,o,a,t,s))}},function(t,e,n){var r=n(434),i=n(437),o=n(438);t.exports=function(t,e,n,a,s,u){var c=1&n,l=t.length,h=e.length;if(l!=h&&!(c&&h>l))return!1;var f=u.get(t);if(f&&u.get(e))return f==e;var d=-1,p=!0,g=2&n?new r:void 0;for(u.set(t,e),u.set(e,t);++d<l;){var _=t[d],m=e[d];if(a)var v=c?a(m,_,d,e,t,u):a(_,m,d,t,e,u);if(void 0!==v){if(v)continue;p=!1;break}if(g){if(!i(e,(function(t,e){if(!o(g,e)&&(_===t||s(_,t,n,a,u)))return g.push(e)}))){p=!1;break}}else if(_!==m&&!s(_,m,n,a,u)){p=!1;break}}return u.delete(t),u.delete(e),p}},function(t,e,n){var r=n(15);t.exports=function(t){return t==t&&!r(t)}},function(t,e){t.exports=function(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}}},function(t,e,n){var r=n(449);t.exports=function(t){return null==t?"":r(t)}},function(t,e,n){var r=n(450),i=n(190);t.exports=function(t,e){return null!=t&&i(t,e,r)}},function(t,e,n){var r=n(79),i=n(72),o=n(8),a=n(74),s=n(111),u=n(48);t.exports=function(t,e,n){for(var c=-1,l=(e=r(e,t)).length,h=!1;++c<l;){var f=u(e[c]);if(!(h=null!=t&&n(t,f)))break;t=t[f]}return h||++c!=l?h:!!(l=null==t?0:t.length)&&s(l)&&a(f,l)&&(o(t)||i(t))}},function(t,e,n){var r=n(459);t.exports=function(t){return t?(t=r(t))===1/0||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}},function(t,e,n){var r=n(193);t.exports=function(t){return(null==t?0:t.length)?r(t,1):[]}},function(t,e,n){var r=n(115),i=n(460);t.exports=function t(e,n,o,a,s){var u=-1,c=e.length;for(o||(o=i),s||(s=[]);++u<c;){var l=e[u];n>0&&o(l)?n>1?t(l,n-1,o,a,s):r(s,l):a||(s[s.length]=l)}return s}},function(t,e,n){var r=n(78),i=n(30);t.exports=function(t,e){var n=-1,o=i(t)?Array(t.length):[];return r(t,(function(t,r,i){o[++n]=e(t,r,i)})),o}},function(t,e,n){var r=n(71),i=n(38);t.exports=function(t,e,n){(void 0===n||i(t[e],n))&&(void 0!==n||e in t)||r(t,e,n)}},function(t,e){t.exports=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}},function(t,e){t.exports=function(t,e){return t<e}},function(t,e,n){"use strict";var r=n(4),i=n(13).Graph,o=n(81).slack;function a(t,e){return r.forEach(t.nodes(),(function n(i){r.forEach(e.nodeEdges(i),(function(r){var a=r.v,s=i===a?r.w:a;t.hasNode(s)||o(e,r)||(t.setNode(s,{}),t.setEdge(i,s,{}),n(s))}))})),t.nodeCount()}function s(t,e){return r.minBy(e.edges(),(function(n){if(t.hasNode(n.v)!==t.hasNode(n.w))return o(e,n)}))}function u(t,e,n){r.forEach(t.nodes(),(function(t){e.node(t).rank+=n}))}t.exports=function(t){var e,n,r=new i({directed:!1}),c=t.nodes()[0],l=t.nodeCount();r.setNode(c,{});for(;a(r,t)<l;)e=s(r,t),n=r.hasNode(e.v)?o(t,e):-o(t,e),u(r,t,n);return r}},,,,function(t,e,n){"use strict";function r(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}Object.defineProperty(e,"__esModule",{value:!0}),r(n(203)),r(n(221)),r(n(524)),r(n(19)),r(n(2))},function(t,e,n){"use strict";function r(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}Object.defineProperty(e,"__esModule",{value:!0}),r(n(82)),r(n(11)),r(n(1)),r(n(2)),r(n(83)),r(n(51)),r(n(22)),r(n(206)),r(n(125)),r(n(5)),r(n(32)),r(n(86)),r(n(10)),r(n(209)),r(n(210)),r(n(211)),r(n(212)),r(n(213)),r(n(214)),r(n(215)),r(n(216)),r(n(217)),r(n(43)),r(n(126)),r(n(218)),r(n(219)),r(n(220)),r(n(7))},function(t,e,n){(function(e,n){
/*!
* @overview es6-promise - a tiny implementation of Promises/A+.
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
* @license Licensed under MIT license
* See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
* @version v4.2.8+1e68dce6
*/var r;r=function(){"use strict";function t(t){return"function"==typeof t}var r=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},i=0,o=void 0,a=void 0,s=function(t,e){p[i]=t,p[i+1]=e,2===(i+=2)&&(a?a(g):x())},u="undefined"!=typeof window?window:void 0,c=u||{},l=c.MutationObserver||c.WebKitMutationObserver,h="undefined"==typeof self&&void 0!==e&&"[object process]"==={}.toString.call(e),f="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function d(){var t=setTimeout;return function(){return t(g,1)}}var p=new Array(1e3);function g(){for(var t=0;t<i;t+=2)(0,p[t])(p[t+1]),p[t]=void 0,p[t+1]=void 0;i=0}var _,m,v,y,x=void 0;function b(t,e){var n=this,r=new this.constructor(k);void 0===r[M]&&V(r);var i=n._state;if(i){var o=arguments[i-1];s((function(){return N(i,r,o,n._result)}))}else D(n,r,t,e);return r}function w(t){if(t&&"object"==typeof t&&t.constructor===this)return t;var e=new this(k);return S(e,t),e}h?x=function(){return e.nextTick(g)}:l?(m=0,v=new l(g),y=document.createTextNode(""),v.observe(y,{characterData:!0}),x=function(){y.data=m=++m%2}):f?((_=new MessageChannel).port1.onmessage=g,x=function(){return _.port2.postMessage(0)}):x=void 0===u?function(){try{var t=Function("return this")().require("vertx");return void 0!==(o=t.runOnLoop||t.runOnContext)?function(){o(g)}:d()}catch(t){return d()}}():d();var M=Math.random().toString(36).substring(2);function k(){}function T(e,n,r){n.constructor===e.constructor&&r===b&&n.constructor.resolve===w?function(t,e){1===e._state?A(t,e._result):2===e._state?E(t,e._result):D(e,void 0,(function(e){return S(t,e)}),(function(e){return E(t,e)}))}(e,n):void 0===r?A(e,n):t(r)?function(t,e,n){s((function(t){var r=!1,i=function(t,e,n,r){try{t.call(e,n,r)}catch(t){return t}}(n,e,(function(n){r||(r=!0,e!==n?S(t,n):A(t,n))}),(function(e){r||(r=!0,E(t,e))}),t._label);!r&&i&&(r=!0,E(t,i))}),t)}(e,n,r):A(e,n)}function S(t,e){if(t===e)E(t,new TypeError("You cannot resolve a promise with itself"));else if(i=typeof(r=e),null===r||"object"!==i&&"function"!==i)A(t,e);else{var n=void 0;try{n=e.then}catch(e){return void E(t,e)}T(t,e,n)}var r,i}function C(t){t._onerror&&t._onerror(t._result),R(t)}function A(t,e){void 0===t._state&&(t._result=e,t._state=1,0!==t._subscribers.length&&s(R,t))}function E(t,e){void 0===t._state&&(t._state=2,t._result=e,s(C,t))}function D(t,e,n,r){var i=t._subscribers,o=i.length;t._onerror=null,i[o]=e,i[o+1]=n,i[o+2]=r,0===o&&t._state&&s(R,t)}function R(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r=void 0,i=void 0,o=t._result,a=0;a<e.length;a+=3)r=e[a],i=e[a+n],r?N(n,r,i,o):i(o);t._subscribers.length=0}}function N(e,n,r,i){var o=t(r),a=void 0,s=void 0,u=!0;if(o){try{a=r(i)}catch(t){u=!1,s=t}if(n===a)return void E(n,new TypeError("A promises callback cannot return that same promise."))}else a=i;void 0!==n._state||(o&&u?S(n,a):!1===u?E(n,s):1===e?A(n,a):2===e&&E(n,a))}var I=0;function V(t){t[M]=I++,t._state=void 0,t._result=void 0,t._subscribers=[]}var P=function(){function t(t,e){this._instanceConstructor=t,this.promise=new t(k),this.promise[M]||V(this.promise),r(e)?(this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?A(this.promise,this._result):(this.length=this.length||0,this._enumerate(e),0===this._remaining&&A(this.promise,this._result))):E(this.promise,new Error("Array Methods must be provided an Array"))}return t.prototype._enumerate=function(t){for(var e=0;void 0===this._state&&e<t.length;e++)this._eachEntry(t[e],e)},t.prototype._eachEntry=function(t,e){var n=this._instanceConstructor,r=n.resolve;if(r===w){var i=void 0,o=void 0,a=!1;try{i=t.then}catch(t){a=!0,o=t}if(i===b&&void 0!==t._state)this._settledAt(t._state,e,t._result);else if("function"!=typeof i)this._remaining--,this._result[e]=t;else if(n===L){var s=new n(k);a?E(s,o):T(s,t,i),this._willSettleAt(s,e)}else this._willSettleAt(new n((function(e){return e(t)})),e)}else this._willSettleAt(r(t),e)},t.prototype._settledAt=function(t,e,n){var r=this.promise;void 0===r._state&&(this._remaining--,2===t?E(r,n):this._result[e]=n),0===this._remaining&&A(r,this._result)},t.prototype._willSettleAt=function(t,e){var n=this;D(t,void 0,(function(t){return n._settledAt(1,e,t)}),(function(t){return n._settledAt(2,e,t)}))},t}(),L=function(){function e(t){this[M]=I++,this._result=this._state=void 0,this._subscribers=[],k!==t&&("function"!=typeof t&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof e?function(t,e){try{e((function(e){S(t,e)}),(function(e){E(t,e)}))}catch(e){E(t,e)}}(this,t):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return e.prototype.catch=function(t){return this.then(null,t)},e.prototype.finally=function(e){var n=this.constructor;return t(e)?this.then((function(t){return n.resolve(e()).then((function(){return t}))}),(function(t){return n.resolve(e()).then((function(){throw t}))})):this.then(e,e)},e}();return L.prototype.then=b,L.all=function(t){return new P(this,t).promise},L.race=function(t){var e=this;return r(t)?new e((function(n,r){for(var i=t.length,o=0;o<i;o++)e.resolve(t[o]).then(n,r)})):new e((function(t,e){return e(new TypeError("You must pass an array to race."))}))},L.resolve=w,L.reject=function(t){var e=new this(k);return E(e,t),e},L._setScheduler=function(t){a=t},L._setAsap=function(t){s=t},L._asap=s,L.polyfill=function(){var t=void 0;if(void 0!==n)t=n;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var e=t.Promise;if(e){var r=null;try{r=Object.prototype.toString.call(e.resolve())}catch(t){}if("[object Promise]"===r&&!e.cast)return}t.Promise=L},L.Promise=L,L},t.exports=r()}).call(this,n(205),n(84))},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var u,c=[],l=!1,h=-1;function f(){l&&u&&(l=!1,u.length?c=u.concat(c):h=-1,c.length&&d())}function d(){if(!l){var t=s(f);l=!0;for(var e=c.length;e;){for(u=c,c=[];++h<e;)u&&u[h].run();h=-1,e=c.length}u=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function g(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new p(t,e)),1!==c.length||l||s(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=g,i.addListener=g,i.once=g,i.off=g,i.removeListener=g,i.removeAllListeners=g,i.emit=g,i.prependListener=g,i.prependOnceListener=g,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(1),i=n(19),o=n(23),a=n(5),s=n(7),u=n(3);function c(t,e){if(e.data.color)return e.data.color;if(t){if(t.hasColor(e.data.id))return t.getColor(e.data.id);if(t.hasColor(e.data.type))return t.getColor(e.data.type)}return"gray"}function l(t){let e=t.data()[0],n=s.getTextWidth(e.data.name,t.node().style["font-family"],t.node().style["font-size"]);e.y1-e.y0>15&&n<e.x1-e.x0&&t.append("text").attr("class","label").attr("y",14).text(e.data.name)}class h extends a.SVGRenderer{constructor(t,e,n){super();let i,s=this;function u(t){let e={tooltip:s._dataTooltip,data:t};return s._element.onTooltip?s._element.onTooltip({caller:s._element,data:e}):s._dataTooltip.setData(t.id,[]),!0}s.DEFAULT_GRAPH_HEIGHT=250,s.MIN_MARGIN={TOP:10,BOTTOM:10,LEFT:10,RIGHT:10},s._options.height=s.DEFAULT_GRAPH_HEIGHT,s.initialize(t,e,n),this._options.animateDuration=1e3,s._dataTooltip=new o.CustomDivTooltip(s._tooltipId,"tooltip-t"),s._dataTooltip.setAnalyticsName(s._tooltipAnalyticsName).setEnterCallback(u).setMoveCallback(u).setPlaceTooltipLeftRight().alwaysRecalcWidth(!0).setDelay(0),s._onHoverChanged=function(t){if(!a.SVGRenderer.IS_RESIZING)return s.focus(t),s._element.onHover&&s._element.onHover(t),!0},s._hoverStart=function(){let t=this.__data__.data.id;return i=t,s._onHoverChanged({caller:s._element,event:r.EventType.HoverStart,selection:t})},s._hoverEnd=function(){let t=s._onHoverChanged({caller:s._element,event:r.EventType.HoverEnd,selection:i});return i=void 0,t}}_showChildMap(t,e){let n,r=this;r._graphArea.selectAll(".childmap").remove();let i=r._graphArea.append("g").attr("class","childmap").on("mousemove",(function(t){r._dataTooltip.onMouseMove(n)})).on("mouseleave",(function(t){i.remove(),r._dataTooltip.onMouseLeave(n)})).on("click",(function(e){t.node().dispatchEvent(new MouseEvent("click"))})),o=i.selectAll(".tnodes").data([e].concat(e.children)).enter().each((function(t){t.data.id||(t.data.id=t.data.name)})).append("g").attr("class","tnode").attr("transform",(function(t){return"translate("+t.x0+","+(t.y0+r._navBarHeight)+")"})).on("mouseenter",(function(t){n=t.data,r._dataTooltip.onMouseEnter(n),r._dataTooltip.onMouseMove(n,t.evt),r._hoverStart.call(this)})).on("mouseleave",(function(t){r._hoverEnd.call(this)}));return o.append("rect").attr("class",(function(t){return"trect level-"+t.depth+" "+t.data.id})).attr("title",(function(t){return t.data.name})).style("stroke","white").style("fill",(function(t){return c(r._colorMgr,t)})).attr("width",(function(t){return t.x1-t.x0+"px"})).attr("height",(function(t){return t.y1-t.y0+"px"})),o.each((function(){l(u.select(this))})),i}_hasChildMap(t){return this._element.showChildrenOnHover&&t!==this._currentRoot&&t.children}_addInteractionHelper(t,e,n,o){let s,c=this;t.on("click",(function(t){n?s=setTimeout((function(){s&&(t!==c._currentRoot&&t.children&&(c._childMap&&c._childMap.remove(),c._hoverEnd(t),c._navBarText+="."+t.data.name,c._renderTreeMap(c._currentRoot,t)),c.getOptions().disableSelection||a.onSelectHelper(c._element,t.data,t.data.id),e&&(e({caller:c._element,event:r.EventType.Click,data:t.data,selection:t.data.id}),s=null))}),300):(t!==c._currentRoot&&t.children&&(c._childMap&&c._childMap.remove(),c._hoverEnd(t),c._navBarText+="."+t.data.name,c._renderTreeMap(c._currentRoot,t)),e&&(c.getOptions().disableSelection||a.onSelectHelper(c._element,t.data,t.data.id),e({caller:c._element,event:r.EventType.Click,data:t.data,selection:t.data.id})))})),n&&t.on("dblclick",(function(t){window.clearTimeout(s),s=null,n({caller:c._element,event:r.EventType.DoubleClick,data:t.data,selection:t.data.id})})),o&&o.length&&t.on("contextmenu",(function(t){c._dataTooltip.onMouseLeave(u.event),i.showContextMenu(u.event,t.data,o)})),t.on("mouseenter",(function(e){c._hasChildMap(e)?c._childMap=c._showChildMap(t,e):(c._hoverStart.call(this),c._dataTooltip.onMouseEnter(e.data),c._dataTooltip.onMouseMove(e.data,e.evt))})).on("mousemove",(function(t){c._dataTooltip.onMouseMove(t.data,t.evt)})).on("mouseleave",(function(t){c._hasChildMap(t)||(c._hoverEnd.call(this),c._dataTooltip.onMouseLeave(t.data))}))}_renderTreeMap(t,e){let n=this,r=n._element;function i(t,e){n.getAnimateDuration()?(t.transition().duration(n.getAnimateDuration()).on("end",(function(){e(u.select(this))})).attr("transform",(function(t){return"translate("+t.x0+","+(t.y0+n._navBarHeight)+")"})),t.each((function(t){u.select(this).selectAll("rect").transition().duration(n.getAnimateDuration()).attr("width",(function(e){return t.x1-t.x0+"px"})).attr("height",(function(e){return t.y1-t.y0+"px"}))}))):t.attr("transform",(function(t){return"translate("+t.x0+","+(t.y0+n._navBarHeight)+")"})).each((function(t){let n=u.select(this);n.selectAll("rect").attr("width",(function(e){return t.x1-t.x0+"px"})).attr("height",(function(e){return t.y1-t.y0+"px"})),e(n)}))}let o,a=n._graphArea.selectAll(".treemap"),s=t===e.parent;if(o=s?n._graphArea.append("g"):n._graphArea.insert("g",":first-child"),o.attr("class","treemap").selectAll(".tnode").data([e].concat(e.children)).enter().each((function(t){t.data.id||(t.data.id=t.data.name)})).append("g").attr("class","tnode").attr("transform",(function(t){return"translate("+t.x0+","+(t.y0+n._navBarHeight)+")"})).append("rect").attr("class",(function(t){return"trect level-"+t.depth+" "+t.data.id})).attr("title",(function(t){return t.data.name})).style("stroke","white").style("fill",(function(t){return c(n._colorMgr,t)})).attr("width",(function(t){return t.x1-t.x0+"px"})).attr("height",(function(t){return t.y1-t.y0+"px"})),s){let t=t=>t.value,s=u.hierarchy(e.data).sum(t);n._treemap(s),i(o.selectAll(".tnode").data([s].concat(s.children)),(function(t){l(t),n._addInteractionHelper(t,r.onClick,r.onDoubleClick,r.contextMenuItems),a.remove()})),n._currentRoot=s}else{if(t){let n;for(let r=0;r<e.children.length;++r)if(e.children[r].data===t.data){n=e.children[r];break}i(a.selectAll(".tnode").data([n].concat(n.children)),(function(){a.remove()}))}i(o.selectAll(".tnode"),(function(t){l(t),n._addInteractionHelper(t,r.onClick,r.onDoubleClick,r.contextMenuItems)})),n._currentRoot=e}n._navBarSvg.text(n._navBarText)}createLayout(){this._svg.selectAll("*").remove(),this._graphArea=this._svg.append("g").attr("class","graphArea")}render(t){let e=this,n=e._element;this.loadOptions(t),e._navBarHeight=20;let r=e._svgRect.width=e._options.width?e._options.width:400,i=(e._svgRect.height=e._options.height?e._options.height:400)-e._navBarHeight;e._navBarText=n.root.name,function t(e){e.children&&e.children.forEach((function(n){n.parent=e,t(n)}))}(n.root),e._currentRoot||(e._currentRoot=u.hierarchy(n.root).sum((function(t){return t.value})).sort((function(t,e){return e.height-t.height||e.value-t.value}))),e._treemap=u.treemap().paddingInner(1).round(!0).tile(u.treemapResquarify).size([r,i]),e._treemap(e._currentRoot);let o=e._graphArea.append("g");function a(){if(e._currentRoot.data.parent){e._navBarText=e._navBarText.substring(0,e._navBarText.lastIndexOf("."));let t=u.hierarchy(e._currentRoot.data.parent).sum((function(t){return t.value})).sort((function(t,e){return e.height-t.height||e.value-t.value}));e._treemap(t),e._renderTreeMap(e._currentRoot,t)}}o.append("rect").attr("width",r).attr("height",e._navBarHeight).style("fill","orange").on("mousedown touchstart",(function(){a()})),e._navBarSvg=o.append("text").attr("class","header").attr("y",14).text(e._navBarText).on("mousedown touchstart",(function(){a()})),e._renderTreeMap(void 0,e._currentRoot),e._svg.attr("width",e._svgRect.width).attr("height",e._svgRect.height),e._options.rightMargin=e._svgRect.width-(e._graphRect.x+e._graphRect.width),e.updateHandles()}}e.TreeMap=h,s.D3Renderer.register(r.UIType.TreeMap,h)},function(t,e,n){t.exports=function(){return n(208)('!function(t){var n={};function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var i in t)e.d(r,i,function(n){return t[n]}.bind(null,i));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=1)}([function(t,n,e){"use strict";function r(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}function i(t){return function(n,e){return r(t(n),e)}}function u(t){return t||(t=r),1===t.length&&(t=i(t)),{left:function(n,e,r,i){for(null==r&&(r=0),null==i&&(i=n.length);r<i;){var u=r+i>>>1;t(n[u],e)<0?r=u+1:i=u}return r},right:function(n,e,r,i){for(null==r&&(r=0),null==i&&(i=n.length);r<i;){var u=r+i>>>1;t(n[u],e)>0?i=u:r=u+1}return r}}}Object.defineProperty(n,"__esModule",{value:!0}),n.getSelectionName=function(t){return"number"==typeof t?"n"+t:t?(t.length>0&&!isNaN(Number(t[0]))&&(t="z"+t),t=t.replace(/[\\*\\%\\#\\[\\]\\/\\>\\<\\s\\+\\(\\)\\;\\@\\:\\?\\"=.,]/g,"-")):""},n.removeFromList=function(t,n){if(t){let e=n.indexOf(t);-1!==e&&n.splice(e,1)}},n.bisect=u,n.bucketData=function(t,n,e){let r=u().right,i=[];for(let t=0;t<n.length-1;++t)i[t]=[];let o=n[0],a=n[n.length-1],c=n.slice(1);for(let n=0;n<t.length;++n){let u=e(t[n]);u<o||u>a||i[r(c,u)].push(t[n])}let f={};for(let t=0;t<n.length-1;++t){f[n[t]+"-"+n[t+1]]=i[t]}return f},n.copy=function(t){let n={};for(let e in t)n[e]=t[e];return n},n.merge=function(t,n){for(let e in n)t[e]=n[e]},n.convertTraceToTrees=function(t){let n=[],e=[],r=[];for(let i=0;i<t.length;i++){let u=t[i],o=e[e.length-1];for(;e.length&&u.x>o.x+o.dx;)--e.length,--r.length,o=e[e.length-1];let a=r[r.length-1],c={key:u.key,value:u.dx,children:[],parent:a};u.name&&(c.name=u.name),a?a.children.push(c):n.push(c),e.push(u),r.push(c)}return n};n.SimpleBuffer=class{constructor(t){this._data=t||[]}push(t){this._data.push(t)}get(t){return this._data[t]}length(){return this._data.length}getData(){return this._data}};n.RingBuffer=class{constructor(t){this._data=new Array(t),this._startIdx=0,this._count=0,this._isRotating=!1}push(t){this._isRotating?(this._data[this._startIdx]=t,++this._startIdx,this._startIdx===this._count&&(this._startIdx=0),this._isRotating=!0):this._count===this._data.length-1?(this._data[this._count]=t,++this._count,this._isRotating=!0):(this._data[this._count]=t,++this._count)}get(t){return this._isRotating&&(t+=this._startIdx)>=this._count&&(t-=this._count),this._data[t]}length(){return this._count}getData(){if(this._isRotating){let t=[];for(let n=this._startIdx;n<this._data.length;++n)t.push(this._data[n]);for(let n=0;n<this._startIdx;++n)t.push(this._data[n]);return t}return this._data}},n.bisectBuffer=function(t){return t||(t=r),1===t.length&&(t=i(t)),{left:function(n,e,r,i){for(null==r&&(r=0),null==i&&(i=n.length());r<i;){var u=r+i>>>1;t(n.get(u),e)<0?r=u+1:i=u}return r},right:function(n,e,r,i){for(null==r&&(r=0),null==i&&(i=n.length());r<i;){var u=r+i>>>1;t(n.get(u),e)>0?i=u:r=u+1}return r}}},n.transposeKeys=function(t){let n={};function e(t,r,i,u){let o=[];for(let t=0;t<r.length;++t)o[t]=r[t];if(o.push(i.key),Array.isArray(i.data))for(let n=0;n<i.data.length;++n)e(t,o,i.data[n],u+1);else{let e=t;for(let t=o.length-1;t>=0;--t){let r,u=o[t];n.hasOwnProperty(u)?r=n[u]:(r=e.length,n[u]=r),e[r]||(e[r]={key:u,data:[]}),0===t?e[r].data=i.data:e=e[r].data}}}let r=[];for(let n=0;n<t.length;++n)e(r,[],t[n],0);return r},n.runFunctionOnLeaf=function t(n,e){if(n&&n.children&&n.children.length>0)for(let r=0;r<n.children.length;++r)t(n.children[r],e);else e(n)},n.isOverlapping=function(t,n){return t.x<=n.right&&t.right>=n.x&&t.y<=n.bottom&&t.bottom>=n.y}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e(2),i=e(0),u=e(3),o=e(5),a=self;a.addEventListener("message",t=>{let n,e,c=t.data;c.xAxis.axisDesc.scaleType===r.AxisType.Ordinal?n=o.scaleBand().range([0,c.xRange]).padding(.1).align(.5).domain(c.xDomain):(c.xAxis.axisDesc.scaleType===r.AxisType.Linear?n=o.scaleLinear().domain(c.xDomain).clamp(!0):c.xAxis.axisDesc.scaleType===r.AxisType.Logarithmic&&(n=o.scaleLog().domain(c.xDomain).clamp(!0)),n.range([0,c.xRange])),c.yAxis&&(c.yAxis.axisDesc.scaleType===r.AxisType.Ordinal?e=o.scaleBand().range([0,c.yRange]).padding(.1).align(.5).domain(c.yDomain):(c.yAxis.axisDesc.scaleType===r.AxisType.Linear?e=o.scaleLinear().domain(c.yDomain).clamp(!0):c.yAxis.axisDesc.scaleType===r.AxisType.Logarithmic&&(e=o.scaleLog().domain(c.yDomain).clamp(!0)),e.range([c.yRange,0])));let f,s=u.InternalDecimatorMap[c.decimatorName];if(s.initialize(n,n.invert,e,c.names),c.names){f=[];for(let t=0;t<c.values.length;++t)f[t]=new i.SimpleBuffer(c.values[t])}else f=new i.SimpleBuffer(c.values);let l=s.decimateValues(c.xStart,c.xEnd,f);a.postMessage(l,void 0)})},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),function(t){t[t.Linear=0]="Linear",t[t.Logarithmic=1]="Logarithmic",t[t.Ordinal=2]="Ordinal"}(n.AxisType||(n.AxisType={}))},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e(4),i=e(0);n.findFirstInsertionIdx=i.bisectBuffer((function(t){return t.x})).left,n.findLastInsertionIdx=i.bisectBuffer((function(t){return t.x})).right;n.XYDummyDecimator=class{constructor(){this._values=[]}initialize(t,n,e){}getKey(){return""}getName(){return""}getValues(){return this._values}decimateValues(t,n,e){return Array.isArray(e)?e.forEach(t=>{this._values.push(t.getData())}):this._values=e.getData(),this._values}};class u{constructor(){this._name="Simple Unimplemented Decimator"}initialize(t,n,e){this._xValueToCoord=t,this._xCoordToValue=n,this._yValueToCoord=e}getKey(){return this._key}getName(){return this._name}getValues(){return this._decimatedValues}decimateValues(t,e,r){if(this._decimatedValues=[],0===r.length())return this._decimatedValues;let i,u,o=n.findFirstInsertionIdx(r,t),a=n.findLastInsertionIdx(r,e);o>0&&--o,a<r.length()&&++a,o<r.length()&&(i=Math.floor(this._xValueToCoord(r.get(o).x)),--i),u=t?Math.floor(this._xValueToCoord(t)):Math.floor(this._xValueToCoord(r.get(o).x));let c,f=o;for(let t=o;t<a;++t){let n=r.get(t),e=Math.floor(this._xValueToCoord(n.x));c=t,e!==i&&(this._decimatedValues=this._decimatedValues.concat(this._customFunc(r,f,c,this._yValueToCoord,this._xValueToCoord,this._xCoordToValue(u),this._xCoordToValue(e))),u=e,i=e,f=c)}return f!==r.length()&&(this._decimatedValues=this._decimatedValues.concat(this._customFunc(r,f,c+1,this._yValueToCoord,this._xValueToCoord,this._xCoordToValue(u),Number.MAX_VALUE))),this._decimatedValues}}n.CustomPointXYDecimator=u;class o extends u{constructor(){super(),this._key=o.KEY,this._name="Min",this._customFunc=function(t,n,e,r){if(t.length()>0&&n!==e){let r,i=Number.MAX_VALUE;for(let u=n;u<e;++u){let n=t.get(u),e=n.y;e<i&&(r=n,i=e)}return[r]}return[]}}}function a(t,n,e,i){if(t.length()>0&&n!==e){let i=0;for(let r=n;r<e;++r){i+=t.get(r).y}return[new r.XYValue(t.get(e-1).x,i/(e-n))]}return[]}n.MinPointDecimator=o,o.KEY="MinPointDecimator";class c extends u{constructor(){super(),this._key=c.KEY,this._name="Avg",this._customFunc=a}}n.AvgPointDecimator=c,c.KEY="AvgPointDecimator";class f extends u{constructor(){super(),this._key=f.KEY,this._name="Max",this._customFunc=function(t,n,e,r){if(t.length()>0&&n!==e){let r,i=-Number.MAX_VALUE;for(let u=n;u<e;++u){let n=t.get(u),e=n.y;e>i&&(r=n,i=e)}return[r]}return[]}}}n.MaxPointDecimator=f,f.KEY="MaxPointDecimator";class s extends u{constructor(){super(),this._key=s.KEY,this._name="XYPointDecimator",this._customFunc=function(t,n,e,r){let i={},u=[];for(let o=n;o<e;++o){let n=t.get(o),e=Math.floor(r(n.y));i.hasOwnProperty(e.toString())||(u.push(n),i[e]=!0)}return u}}}n.XYPointDecimator=s,s.KEY="XYPointDecimator";class l{constructor(){this._name="Simple Unimplemented Decimator"}initialize(t,n,e){this._xValueToCoord=t,this._xCoordToValue=n,this._yValueToCoord=e}getKey(){return this._key}getName(){return this._name}getValues(){return this._decimatedValues}decimateValues(t,e,r){if(this._decimatedValues=[],0===r.length())return this._decimatedValues;let i,u,o=n.findFirstInsertionIdx(r,t),a=n.findLastInsertionIdx(r,e);o>0&&--o,a<r.length()&&++a,o<r.length()&&(i=Math.floor(this._xValueToCoord(r.get(o).x)),--i),u=t?this._xValueToCoord(t):o;let c=o;for(let t=o;t<a;++t){let n=r.get(t),e=Math.floor(this._xValueToCoord(n.x)),o=t+1;e!==i&&(this._decimatedValues=this._decimatedValues.concat(this._customFunc(r,c,o,this._yValueToCoord,this._xValueToCoord,this._xCoordToValue(u),this._xCoordToValue(e))),u=e,i=e,c=o)}return c!==r.length()&&(this._decimatedValues=this._decimatedValues.concat(this._customFunc(r,c,c+1,this._yValueToCoord,this._xValueToCoord,this._xCoordToValue(u),Number.MAX_VALUE))),this._decimatedValues}}n.CustomContinuousXYDecimator=l;class h extends l{constructor(){super(),this._key=h.KEY,this._name="Avg",this._customFunc=a}}function d(t,e,r,i,u,o){let a=[],c=[],f=Math.ceil(t(Number.MAX_VALUE));if(f<0)return;let s=[];for(let t=0;t<=f+1;++t)s.push(e(t));for(let e=0;e<o.length;++e){let r,l,h=o[e],d=n.findFirstInsertionIdx(o[e],i),p=n.findLastInsertionIdx(o[e],u);d>0&&--d,p===h.length()&&--p,c[e]=Array.apply(null,Array(f)).map(Number.prototype.valueOf,0);for(let n=d;n<p;++n){r=h.get(n),l=h.get(n+1);let o=Math.floor(t(r.x)),a=Math.floor(t(l.x)),f=l.x-r.x,d=0===f?0:l.y/f;if(o===a)if(void 0===i||r.x>i&&l.x<u)c[e][o]+=d;else{let t=1/(s[o+1]-s[o]);l.x<u?c[e][o]+=(l.x-s[o])*d*t:c[e][o]+=(s[o+1]-r.x)*d*t}else{let t=1/(s[o+1]-s[o]),n=i?Math.max(i,r.x):r.x,f=s[o+1];c[e][o]+=(f-n)*d*t;for(let t=o+1;t<a;++t)c[e][t]+=d;t=1/(s[a]-s[a-1]);let h=u?Math.min(u,l.x):l.x,p=s[a];c[e][a]+=(h-p)*d*t}}a[e]=[];let g=c[e];for(let t=0;t<g.length;++t)a[e][t]={x:s[t],y:c[e][t]}}return a}n.AvgContinuousDecimator=h,h.KEY="AvgContinuousDecimator",n.sumMultiXYSeriesValues=d;class p{constructor(){}initialize(t,n,e){this._xValueToCoord=t,this._xCoordToValue=n,this._yValueToCoord=e}getKey(){return p.KEY}getName(){return""}getValues(){return this._decimatedValues}decimateValues(t,n,e){return this._decimatedValues=d(this._xValueToCoord,this._xCoordToValue,this._yValueToCoord,t,n,e),this._decimatedValues}}n.SummedValueMultiXYSeriesDecimator=p,p.KEY="SummedValueMultiXYSeriesDecimator";class g extends p{constructor(){super()}getKey(){return g.KEY}getName(){return""}decimateValues(t,n,e){this._decimatedValues=d(this._xValueToCoord,this._xCoordToValue,this._yValueToCoord,t,n,e);for(let t=0;t<this._decimatedValues[0].length;++t){let n=0;for(let e=0;e<this._decimatedValues.length;++e)this._decimatedValues[e][t].y&&(n+=this._decimatedValues[e][t].y);if(n>0){let r=100/n;for(let n=0;n<e.length;++n)this._decimatedValues[n][t].y&&(this._decimatedValues[n][t].y=this._decimatedValues[n][t].y*r)}}return this._decimatedValues}}n.ResidencyDecimator=g,g.KEY="ResidencyDecimator";class _{constructor(){}initialize(t,n,e){this._xValueToCoord=t,this._xCoordToValue=n,this._yValueToCoord=e}getKey(){return _.KEY}getName(){return""}getValues(){return this._decimatedValues}decimateValues(t,n,e){return this._decimatedValues=d(this._xValueToCoord,this._xCoordToValue,this._yValueToCoord,t,n,[e])[0],this._decimatedValues}}n.SummedValueXYSeriesDecimator=_,_.KEY="SummedValueXYSeriesDecimator";class v extends r.CandlestickValue{constructor(t){super(t,void 0,void 0,void 0,void 0),this._bucketPts=0}}n.NEWSDecimationValue=v;class y{initialize(t,n,e){this._xValueToCoord=t,this._xCoordToValue=n,this._yValueToCoord=e}getKey(){return this._key}getName(){return""}getValues(){return this._buckets}_dumpBucket(t,n,e){let r="valuesInBucket = "+e.toFixed(0)+", ";return r+="([avg]Time delta, avgValue) = ("+(n.x-t).toFixed(2)+", "+n.y.toFixed(2)+"), ",r+="(entry, min, max, exit) = ("+n.entry.toFixed(2)+", "+n.min.toFixed(2)+", "+n.max.toFixed(2)+", "+n.exit.toFixed(2)+")",r}decimateValues(t,n,e){throw"Error need to implement decimate code"}}n.NEWSBaseDecimator=y;class m extends y{constructor(){super(),this._key=m.KEY}createNewBucket(t,n){t.entry=n.y,t.exit=n.y,t.min=n.y,t.max=n.y,t.x=0,t.y=0,t._bucketPts=0,this.addToBucket(t,n)}addToBucket(t,n){t.x+=n.x,t.y+=n.y,t.min=Math.min(t.min,n.y),t.max=Math.max(t.max,n.y),t.exit=n.y,t._bucketPts++}finalizeBucket(t,n){void 0!==n&&n!==t._bucketPts&&console.log("AverageTime: mismatching pt calculation"),0===t._bucketPts&&console.log("AverageTime: 0 points"),t.x=t.x/t._bucketPts,t.y=t.y/t._bucketPts}decimateValues(t,e,r){if(this._buckets=[],0===r.length())return this._buckets;let i,u=n.findFirstInsertionIdx(r,t),o=n.findLastInsertionIdx(r,e);u>0&&--u,o<r.length()&&++o;let a=0;u<r.length()&&(a=Math.floor(this._xValueToCoord(r.get(u).x)),--a);for(let t=u;t<o;++t){let n=r.get(t),e=Math.floor(this._xValueToCoord(n.x));e!==a?(i&&(this.finalizeBucket(i),this._buckets.push(i)),i=new v,this.createNewBucket(i,n),a=e):this.addToBucket(i,n)}return i&&(this.finalizeBucket(i),this._buckets.push(i)),this._buckets}}n.NEWSPointDecimator=m,m.KEY="NEWSPointDecimator";class b extends y{constructor(t){super(),this._weightedSums={},this._prevX=0,this._prevX=0,this._key=b.KEY,t&&(this._states=t)}createNewBucket(t,n){let e;this._weightedSums={},t._bucketPts=0,this._isYObject||(e=n.y,t.x=0,t.y=e,t.entry=e,t.exit=e,t.min=e,t.max=e),this.addToBucket(t,n)}addToStateValueToBucket(t,n){0!==n&&(this._weightedSums[t]||(this._weightedSums[t]=0),this._weightedSums[t]+=n)}addToBucket(t,n){if(this._isYObject)if(this._states)for(let t in n.y)this.addToStateValueToBucket(this._states[t],(n.x-this._prevX)*n.y[t]);else for(let t in n.y)this.addToStateValueToBucket(t,(n.x-this._prevX)*n.y[t]);else{let e;e=this._states?this._states[n.y]:n.y,t.exit=e,this.addToStateValueToBucket(e,n.x-this._prevX)}t.x+=n.x,t._bucketPts++,this._prevX=n.x}finalizeBucket(t,n){var e;void 0!==n&&n!==t._bucketPts&&console.log("AverageTime: mismatching pt calculation"),0===t._bucketPts&&console.log("AverageTime: 0 points"),t.x=t.x/t._bucketPts;var r=-Number.MAX_VALUE;let i=-Number.MAX_VALUE,u=Number.MAX_VALUE;for(let n in this._weightedSums){if(void 0!==this._weightedSums[n]){let t=this._weightedSums[n];t>r&&(e=n,r=t)}let o=this._yValueToCoord(n);o>i&&(t.min=n,i=o),o<u&&(t.max=n,u=o)}void 0!==e?t.y=e:this._isYObject||(t.min=t.y,t.max=t.y)}decimateValues(t,e,r){if(this._buckets=[],0===r.length())return this._buckets;let i,u=n.findFirstInsertionIdx(r,t),o=n.findLastInsertionIdx(r,e);u>0&&--u,o<r.length()&&++o;let a=0;u<r.length()&&(this._isYObject="object"==typeof r.get(u).y,a=Math.floor(this._xValueToCoord(r.get(u).x)),--a);for(let t=u;t<o;++t){let n=r.get(t),e=Math.floor(this._xValueToCoord(n.x));if(e!==a){if(i&&(this.finalizeBucket(i),this._buckets.push(i)),a+1<e){let t=new v;this.createNewBucket(t,n),this.finalizeBucket(t),t.x=this._xCoordToValue(e-1),this._buckets.push(t),this._prevX=t.x}i=new v,this.createNewBucket(i,n),a=e}else this.addToBucket(i,n)}return i&&(this.finalizeBucket(i),this._buckets.push(i)),this._buckets}}n.NEWSStateDecimator=b,b.KEY="NEWSStateDecimator";class x{initialize(t,n,e){this._data=[],this._xValueToCoord=t,this._xCoordToValue=n,this._yValueToCoord=e}getKey(){return x.KEY}getName(){return""}getValues(){return this._data}setRectLimit(t){return this._rectLimit=t,this}decimateValues(t,n,e){this._data=[];let r=e.getData();for(let t=0;t<r.length;++t)this._data=this._data.concat(r[t]);return this._rectLimit&&(this._data.sort((function(t,n){return t.traceValue.dx>n.traceValue.dx?-1:t.traceValue.dx<n.traceValue.dx?1:0})),this._data=this._data.splice(0,this._rectLimit)),this._data}}n.FlameChartRectLimitDecimator=x,x.KEY="FlameChartRectLimitDecimator";class w{constructor(){this._minRectDelta=1}initialize(t,n,e){this._data=[],this._xValueToCoord=t,this._xCoordToValue=n,this._yValueToCoord=e}getKey(){return w.KEY}getName(){return""}getValues(){return this._data}setPixelWidth(t){return this._minRectDelta=t-1,this}setUserPixelFunction(t){this._userPixelFunction=t}mergeRects(t){let n=[],e=Math.ceil(this._xValueToCoord(Number.MAX_VALUE))+1,r=[];for(let t=0;t<=e;++t)r.push(this._xCoordToValue(t));let i=0;e>1&&(i=this._xCoordToValue(1)-this._xCoordToValue(0));for(let e=0;e<t.length;++e){let u=t[e];if(void 0===u)continue;let o,a,c,f=[],s=-Number.MAX_VALUE,l=u.length;for(let t=0;t<l;t++){let n,e=u[t];if(o&&o.traceValue.key===e.traceValue.key&&o.traceValue.x+o.traceValue.dx===e.traceValue.x)o.traceValue.dx+=e.traceValue.dx;else{if(a=Math.floor(this._xValueToCoord(e.traceValue.x)),s>a&&(a=s),c=Math.floor(this._xValueToCoord(e.traceValue.x+e.traceValue.dx)),c-a>this._minRectDelta)n={traceValue:{x:r[a],dx:r[c]-r[a],key:e.traceValue.key,name:e.traceValue.name,desc:e.traceValue.desc},decimatedValues:[e.traceValue],depth:e.depth};else{let o={},f=[];for(s=a+this._minRectDelta,e.traceValue.x<r[a]?o[e.traceValue.name]=e.traceValue.x+e.traceValue.dx-r[a]:o[e.traceValue.name]=e.traceValue.dx,f.push(e.traceValue),++t;t<l;++t){if(e=u[t],Math.floor(this._xValueToCoord(e.traceValue.x))>=s){--t;break}if(f.push(e.traceValue),o.hasOwnProperty(e.traceValue.name)||(o[e.traceValue.name]=0),e.traceValue.x+e.traceValue.dx>r[s]){o[e.traceValue.name]+=r[s]-e.traceValue.x,--t;break}o[e.traceValue.name]+=e.traceValue.dx}let h=f[f.length-1];if(1===f.length)n={traceValue:{x:r[a],dx:r[c]-r[a],key:h.key,name:h.name,desc:h.desc},decimatedValues:f,depth:e.depth};else{let t,u=0;for(let n in o){let e=o[n];e>u&&(t=n,u=e)}n={traceValue:{x:r[a],dx:s<r.length?r[s]-r[a]:r[a]+i,key:"merged",name:t,desc:h.desc},decimatedValues:f,depth:e.depth}}}f.push(n),o=n}}o=void 0;let h=0,d=!0;for(let t=0;t<f.length;++t){d=!0;let e=f[t];e.traceValue.dx<i&&(e.traceValue.dx=i),this._userPixelFunction&&(e=this._userPixelFunction(e)),o&&o.traceValue.key===e.traceValue.key&&o.traceValue.name===e.traceValue.name&&(h=o.traceValue.x+o.traceValue.dx,h>=e.traceValue.x&&(o.traceValue.dx=e.traceValue.x+e.traceValue.dx-o.traceValue.x,o.decimatedValues.concat(e.decimatedValues),d=!1)),d&&(n.push(e),o=e)}}return n}decimateValues(t,n,e){return this._data=this.mergeRects(e.getData()),this._data}}n.FlameChartMergeRectDecimator=w,w.KEY="FlameChartMergeRectDecimator";class M{initialize(t,n,e,r){this._decimatedValues=[],this._xValueToCoord=t,this._xCoordToValue=n,this._yValueToCoord=e,this._states=r}getKey(){return M.KEY}getName(){return""}getValues(){return this._decimatedValues}decimateValues(t,e,r){this._decimatedValues=new Array(this._states.length).fill(0).map(()=>new Array);let i=Math.ceil(this._xValueToCoord(Number.MAX_VALUE));if(i<0)return;let u,o,a={},c={};this._states.forEach((t,n)=>{c[t]=n,a[t]=Array.apply(null,Array(i)).map(Number.prototype.valueOf,0)});let f=n.findFirstInsertionIdx(r,t),s=n.findLastInsertionIdx(r,e);f>0&&--f;let l=[];for(let t=0;t<=i;++t)l.push(this._xCoordToValue(t));let h=1/(l[1]-l[0]);for(let n=f;n<s;++n){u=r.get(n),o=u.x+u.dx;let i=Math.floor(this._xValueToCoord(u.x)),c=Math.floor(this._xValueToCoord(o));if(i===c)a[u.name][i]+=u.dx*h;else{let n=t?Math.max(t,u.x):u.x,r=l[i+1];a[u.name][i]+=(r-n)*h;for(let t=i+1;t<c;++t)a[u.name][t]+=1;let f=e?Math.min(e,o):o,s=l[c];a[u.name][c]+=(f-s)*h}}let d=[];for(let t=0;t<i;++t)d[t]={x:l[t],y:0};for(let t=0;t<this._states.length;++t){let n=a[this._states[t]];if(n)for(let e=0;e<n.length;++e){let n=a[this._states[t]][e]?a[this._states[t]][e]:0;this._decimatedValues[t][e]={x:l[e],y:100*n}}else this._decimatedValues[t]=d}return this._decimatedValues}}n.TraceResidencyDecimator=M,M.KEY="TraceResidencyDecimator";class T{initialize(t,n,e,r){this._decimatedValues=[],this._xValueToCoord=t,this._xCoordToValue=n,this._yValueToCoord=e,this._states=r}getKey(){return T.KEY}getName(){return""}getValues(){return this._decimatedValues}decimateValues(t,e,r){let i,u,o=Math.ceil(this._xValueToCoord(Number.MAX_VALUE));if(o<0)return;let a=n.findFirstInsertionIdx(r,t),c=n.findLastInsertionIdx(r,e);a>0&&--a,this._decimatedValues=[];for(let t=0;t<=o;++t)this._decimatedValues[t]=new v(this._xCoordToValue(t));let f={};this._states.forEach((t,n)=>{f[t]=n});for(let t=a;t<c;++t){i=r.get(t),u=i.x+i.dx;let n=Math.floor(this._xValueToCoord(i.x)),e=Math.floor(this._xValueToCoord(u));if(this._decimatedValues[n].entry||(this._decimatedValues[n].entry=f[i.name],this._decimatedValues[n].exit=f[i.name],this._decimatedValues[n].min=f[i.name],this._decimatedValues[n].max=f[i.name]),n===e)this._decimatedValues[n].exit=f[i.name],this._decimatedValues[n].min=Math.min(this._decimatedValues[n].min,f[i.name]),this._decimatedValues[n].max=Math.max(this._decimatedValues[n].max,f[i.name]);else{this._decimatedValues[n].exit=f[i.name],this._decimatedValues[n].min=Math.min(this._decimatedValues[n].min,f[i.name]),this._decimatedValues[n].max=Math.max(this._decimatedValues[n].max,f[i.name]);for(let t=n+1;t<=e;++t)this._decimatedValues[t].entry=f[i.name],this._decimatedValues[t].exit=f[i.name],this._decimatedValues[t].min=f[i.name],this._decimatedValues[t].max=f[i.name]}}for(let t=0;t<this._decimatedValues.length;++t){let n=this._decimatedValues[t],e=n.exit;n.entry=this._states[n.entry],n.exit=this._states[e],n.y=this._states[e],n.min=this._states[n.min],n.max=this._states[n.max]}return this._decimatedValues}}n.TraceStateDecimator=T,T.KEY="TraceStateDecimator";class k{initialize(t,n,e){this._data=[],this._xValueToCoord=t,this._xCoordToValue=n,this._yValueToCoord=e}getKey(){return k.KEY}getName(){return""}getValues(){return this._data}mergeMarkers(t){let n=[],e=-Number.MAX_VALUE;for(let r=0;r<t.length;++r){let i=t[r],u=this._xValueToCoord(i.x);u!==e&&(n.push(i),e=u)}return n}decimateValues(t,n,e){let r=e.getData();if(void 0!==t&&void 0!==n){let e=[];for(let i=0;i<r.length;++i){let u=r[i];u.x<n&&u.x>t?e.push(u):u.dx&&u.x+u.dx<n&&u.x+u.dx>t&&e.push(u)}this._data=this.mergeMarkers(e)}else this._data=this.mergeMarkers(r);return this._data}}n.SimpleMarkerDecimator=k,k.KEY="SimpleMarkerDecimator";class A{constructor(){}initialize(t,n,e){this._xValueToCoord=t,this._xCoordToValue=n,this._yValueToCoord=e}getKey(){return p.KEY}getName(){return""}getValues(){return this._decimatedValues}decimateValues(t,e,r){this._decimatedValues=[];let i=[],u=Math.ceil(this._xValueToCoord(Number.MAX_VALUE));if(u<0)return;let o=[];for(let t=0;t<=u+1;++t)o.push(this._xCoordToValue(t));for(let a=0;a<r.length;++a){let c,f,s=r[a],l=n.findFirstInsertionIdx(r[a],t),h=n.findLastInsertionIdx(r[a],e);l>0&&--l,h===s.length()&&--h,i[a]=Array.apply(null,Array(u)).map(Number.prototype.valueOf,0);for(let n=l;n<h;++n){c=s.get(n),f=s.get(n+1);let r=Math.floor(this._xValueToCoord(c.x)),u=Math.floor(this._xValueToCoord(f.x)),l=f.x-c.x,h=0===l?0:f.y/l;if(r===u)if(void 0===t||c.x>t&&f.x<e)i[a][r]+=h;else{let t=1/(o[r+1]-o[r]);f.x<e?i[a][r]+=(f.x-o[r])*h*t:i[a][r]+=(o[r+1]-c.x)*h*t}else{let n=1/(o[r+1]-o[r]),s=t?Math.max(t,c.x):c.x,l=o[r+1];i[a][r]+=(l-s)*h*n;for(let t=r+1;t<u;++t)i[a][t]+=h;n=1/(o[u]-o[u-1]);let d=e?Math.min(e,f.x):f.x,p=o[u];i[a][u]+=(d-p)*h*n}}this._decimatedValues[a]=[];let d=i[a];for(let t=0;t<d.length;++t)this._decimatedValues[a][t]={x:o[t],y:i[a][t]?i[a][t]:0}}return this._decimatedValues}}n.XYHeatMapDecimator=A,A.KEY="XYHeatMapDecimator";let N=[new g,new o,new c,new f,new h,new w,new x,new m,new b,new k,new s,new _,new p,new M];n.InternalDecimatorMap={},N.forEach((function(t){n.InternalDecimatorMap[t.getKey()]=t}))},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.XYValue=class{constructor(t,n){this.x=t,this.y=n}};n.MinMaxValue=class{constructor(t,n,e,r){this.x=t,this.min=n,this.max=e,this.y=r}};n.CandlestickValue=class{constructor(t,n,e,r,i){this.x=t,this.min=n,this.max=e,this.entry=r,this.exit=i}};n.SummaryValue=class{constructor(t,n={}){this.key=t,this.data=n}addValue(t,n){let e=this.data;return e.hasOwnProperty(t)?e[t]+=n:e[t]=n,this}}},function(t,n,e){"use strict";e.r(n);var r=function(t,n){return t<n?-1:t>n?1:t>=n?0:NaN},i=function(t){var n;return 1===t.length&&(n=t,t=function(t,e){return r(n(t),e)}),{left:function(n,e,r,i){for(null==r&&(r=0),null==i&&(i=n.length);r<i;){var u=r+i>>>1;t(n[u],e)<0?r=u+1:i=u}return r},right:function(n,e,r,i){for(null==r&&(r=0),null==i&&(i=n.length);r<i;){var u=r+i>>>1;t(n[u],e)>0?i=u:r=u+1}return r}}};var u=i(r),o=u.right,a=u.left,c=o,f=function(t,n){null==n&&(n=s);for(var e=0,r=t.length-1,i=t[0],u=new Array(r<0?0:r);e<r;)u[e]=n(i,i=t[++e]);return u};function s(t,n){return[t,n]}var l=function(t,n,e){var r,i,u,o,a=t.length,c=n.length,f=new Array(a*c);for(null==e&&(e=s),r=u=0;r<a;++r)for(o=t[r],i=0;i<c;++i,++u)f[u]=e(o,n[i]);return f},h=function(t,n){return n<t?-1:n>t?1:n>=t?0:NaN},d=function(t){return null===t?NaN:+t},p=function(t,n){var e,r,i=t.length,u=0,o=-1,a=0,c=0;if(null==n)for(;++o<i;)isNaN(e=d(t[o]))||(c+=(r=e-a)*(e-(a+=r/++u)));else for(;++o<i;)isNaN(e=d(n(t[o],o,t)))||(c+=(r=e-a)*(e-(a+=r/++u)));if(u>1)return c/(u-1)},g=function(t,n){var e=p(t,n);return e?Math.sqrt(e):e},_=function(t,n){var e,r,i,u=t.length,o=-1;if(null==n){for(;++o<u;)if(null!=(e=t[o])&&e>=e)for(r=i=e;++o<u;)null!=(e=t[o])&&(r>e&&(r=e),i<e&&(i=e))}else for(;++o<u;)if(null!=(e=n(t[o],o,t))&&e>=e)for(r=i=e;++o<u;)null!=(e=n(t[o],o,t))&&(r>e&&(r=e),i<e&&(i=e));return[r,i]},v=Array.prototype,y=v.slice,m=v.map,b=function(t){return function(){return t}},x=function(t){return t},w=function(t,n,e){t=+t,n=+n,e=(i=arguments.length)<2?(n=t,t=0,1):i<3?1:+e;for(var r=-1,i=0|Math.max(0,Math.ceil((n-t)/e)),u=new Array(i);++r<i;)u[r]=t+r*e;return u},M=Math.sqrt(50),T=Math.sqrt(10),k=Math.sqrt(2),A=function(t,n,e){var r,i,u,o,a=-1;if(e=+e,(t=+t)===(n=+n)&&e>0)return[t];if((r=n<t)&&(i=t,t=n,n=i),0===(o=N(t,n,e))||!isFinite(o))return[];if(o>0)for(t=Math.ceil(t/o),n=Math.floor(n/o),u=new Array(i=Math.ceil(n-t+1));++a<i;)u[a]=(t+a)*o;else for(t=Math.floor(t*o),n=Math.ceil(n*o),u=new Array(i=Math.ceil(t-n+1));++a<i;)u[a]=(t-a)/o;return r&&u.reverse(),u};function N(t,n,e){var r=(n-t)/Math.max(0,e),i=Math.floor(Math.log(r)/Math.LN10),u=r/Math.pow(10,i);return i>=0?(u>=M?10:u>=T?5:u>=k?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(u>=M?10:u>=T?5:u>=k?2:1)}function C(t,n,e){var r=Math.abs(n-t)/Math.max(0,e),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),u=r/i;return u>=M?i*=10:u>=T?i*=5:u>=k&&(i*=2),n<t?-i:i}var S=function(t){return Math.ceil(Math.log(t.length)/Math.LN2)+1},E=function(){var t=x,n=_,e=S;function r(r){var i,u,o=r.length,a=new Array(o);for(i=0;i<o;++i)a[i]=t(r[i],i,r);var f=n(a),s=f[0],l=f[1],h=e(a,s,l);Array.isArray(h)||(h=C(s,l,h),h=w(Math.ceil(s/h)*h,l,h));for(var d=h.length;h[0]<=s;)h.shift(),--d;for(;h[d-1]>l;)h.pop(),--d;var p,g=new Array(d+1);for(i=0;i<=d;++i)(p=g[i]=[]).x0=i>0?h[i-1]:s,p.x1=i<d?h[i]:l;for(i=0;i<o;++i)s<=(u=a[i])&&u<=l&&g[c(h,u,0,d)].push(r[i]);return g}return r.value=function(n){return arguments.length?(t="function"==typeof n?n:b(n),r):t},r.domain=function(t){return arguments.length?(n="function"==typeof t?t:b([t[0],t[1]]),r):n},r.thresholds=function(t){return arguments.length?(e="function"==typeof t?t:Array.isArray(t)?b(y.call(t)):b(t),r):e},r},V=function(t,n,e){if(null==e&&(e=d),r=t.length){if((n=+n)<=0||r<2)return+e(t[0],0,t);if(n>=1)return+e(t[r-1],r-1,t);var r,i=(r-1)*n,u=Math.floor(i),o=+e(t[u],u,t);return o+(+e(t[u+1],u+1,t)-o)*(i-u)}},P=function(t,n,e){return t=m.call(t,d).sort(r),Math.ceil((e-n)/(2*(V(t,.75)-V(t,.25))*Math.pow(t.length,-1/3)))},D=function(t,n,e){return Math.ceil((e-n)/(3.5*g(t)*Math.pow(t.length,-1/3)))},z=function(t,n){var e,r,i=t.length,u=-1;if(null==n){for(;++u<i;)if(null!=(e=t[u])&&e>=e)for(r=e;++u<i;)null!=(e=t[u])&&e>r&&(r=e)}else for(;++u<i;)if(null!=(e=n(t[u],u,t))&&e>=e)for(r=e;++u<i;)null!=(e=n(t[u],u,t))&&e>r&&(r=e);return r},R=function(t,n){var e,r=t.length,i=r,u=-1,o=0;if(null==n)for(;++u<r;)isNaN(e=d(t[u]))?--i:o+=e;else for(;++u<r;)isNaN(e=d(n(t[u],u,t)))?--i:o+=e;if(i)return o/i},L=function(t,n){var e,i=t.length,u=-1,o=[];if(null==n)for(;++u<i;)isNaN(e=d(t[u]))||o.push(e);else for(;++u<i;)isNaN(e=d(n(t[u],u,t)))||o.push(e);return V(o.sort(r),.5)},Y=function(t){for(var n,e,r,i=t.length,u=-1,o=0;++u<i;)o+=t[u].length;for(e=new Array(o);--i>=0;)for(n=(r=t[i]).length;--n>=0;)e[--o]=r[n];return e},U=function(t,n){var e,r,i=t.length,u=-1;if(null==n){for(;++u<i;)if(null!=(e=t[u])&&e>=e)for(r=e;++u<i;)null!=(e=t[u])&&r>e&&(r=e)}else for(;++u<i;)if(null!=(e=n(t[u],u,t))&&e>=e)for(r=e;++u<i;)null!=(e=n(t[u],u,t))&&r>e&&(r=e);return r},B=function(t,n){for(var e=n.length,r=new Array(e);e--;)r[e]=t[n[e]];return r},I=function(t,n){if(e=t.length){var e,i,u=0,o=0,a=t[o];for(null==n&&(n=r);++u<e;)(n(i=t[u],a)<0||0!==n(a,a))&&(a=i,o=u);return 0===n(a,a)?o:void 0}},O=function(t,n,e){for(var r,i,u=(null==e?t.length:e)-(n=null==n?0:+n);u;)i=Math.random()*u--|0,r=t[u+n],t[u+n]=t[i+n],t[i+n]=r;return t},F=function(t,n){var e,r=t.length,i=-1,u=0;if(null==n)for(;++i<r;)(e=+t[i])&&(u+=e);else for(;++i<r;)(e=+n(t[i],i,t))&&(u+=e);return u},q=function(t){if(!(i=t.length))return[];for(var n=-1,e=U(t,X),r=new Array(e);++n<e;)for(var i,u=-1,o=r[n]=new Array(i);++u<i;)o[u]=t[u][n];return r};function X(t){return t.length}var j=function(){return q(arguments)},H=Array.prototype.slice,K=function(t){return t};function G(t){return"translate("+(t+.5)+",0)"}function W(t){return"translate(0,"+(t+.5)+")"}function $(t){return function(n){return+t(n)}}function Z(t){var n=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(n=Math.round(n)),function(e){return+t(e)+n}}function Q(){return!this.__axis}function J(t,n){var e=[],r=null,i=null,u=6,o=6,a=3,c=1===t||4===t?-1:1,f=4===t||2===t?"x":"y",s=1===t||3===t?G:W;function l(l){var h=null==r?n.ticks?n.ticks.apply(n,e):n.domain():r,d=null==i?n.tickFormat?n.tickFormat.apply(n,e):K:i,p=Math.max(u,0)+a,g=n.range(),_=+g[0]+.5,v=+g[g.length-1]+.5,y=(n.bandwidth?Z:$)(n.copy()),m=l.selection?l.selection():l,b=m.selectAll(".domain").data([null]),x=m.selectAll(".tick").data(h,n).order(),w=x.exit(),M=x.enter().append("g").attr("class","tick"),T=x.select("line"),k=x.select("text");b=b.merge(b.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),x=x.merge(M),T=T.merge(M.append("line").attr("stroke","currentColor").attr(f+"2",c*u)),k=k.merge(M.append("text").attr("fill","currentColor").attr(f,c*p).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),l!==m&&(b=b.transition(l),x=x.transition(l),T=T.transition(l),k=k.transition(l),w=w.transition(l).attr("opacity",1e-6).attr("transform",(function(t){return isFinite(t=y(t))?s(t):this.getAttribute("transform")})),M.attr("opacity",1e-6).attr("transform",(function(t){var n=this.parentNode.__axis;return s(n&&isFinite(n=n(t))?n:y(t))}))),w.remove(),b.attr("d",4===t||2==t?o?"M"+c*o+","+_+"H0.5V"+v+"H"+c*o:"M0.5,"+_+"V"+v:o?"M"+_+","+c*o+"V0.5H"+v+"V"+c*o:"M"+_+",0.5H"+v),x.attr("opacity",1).attr("transform",(function(t){return s(y(t))})),T.attr(f+"2",c*u),k.attr(f,c*p).text(d),m.filter(Q).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),m.each((function(){this.__axis=y}))}return l.scale=function(t){return arguments.length?(n=t,l):n},l.ticks=function(){return e=H.call(arguments),l},l.tickArguments=function(t){return arguments.length?(e=null==t?[]:H.call(t),l):e.slice()},l.tickValues=function(t){return arguments.length?(r=null==t?null:H.call(t),l):r&&r.slice()},l.tickFormat=function(t){return arguments.length?(i=t,l):i},l.tickSize=function(t){return arguments.length?(u=o=+t,l):u},l.tickSizeInner=function(t){return arguments.length?(u=+t,l):u},l.tickSizeOuter=function(t){return arguments.length?(o=+t,l):o},l.tickPadding=function(t){return arguments.length?(a=+t,l):a},l}function tt(t){return J(1,t)}function nt(t){return J(2,t)}function et(t){return J(3,t)}function rt(t){return J(4,t)}var it={value:function(){}};function ut(){for(var t,n=0,e=arguments.length,r={};n<e;++n){if(!(t=arguments[n]+"")||t in r||/[\\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new ot(r)}function ot(t){this._=t}function at(t,n){return t.trim().split(/^|\\s+/).map((function(t){var e="",r=t.indexOf(".");if(r>=0&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!n.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))}function ct(t,n){for(var e,r=0,i=t.length;r<i;++r)if((e=t[r]).name===n)return e.value}function ft(t,n,e){for(var r=0,i=t.length;r<i;++r)if(t[r].name===n){t[r]=it,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=e&&t.push({name:n,value:e}),t}ot.prototype=ut.prototype={constructor:ot,on:function(t,n){var e,r=this._,i=at(t+"",r),u=-1,o=i.length;if(!(arguments.length<2)){if(null!=n&&"function"!=typeof n)throw new Error("invalid callback: "+n);for(;++u<o;)if(e=(t=i[u]).type)r[e]=ft(r[e],t.name,n);else if(null==n)for(e in r)r[e]=ft(r[e],t.name,null);return this}for(;++u<o;)if((e=(t=i[u]).type)&&(e=ct(r[e],t.name)))return e},copy:function(){var t={},n=this._;for(var e in n)t[e]=n[e].slice();return new ot(t)},call:function(t,n){if((e=arguments.length-2)>0)for(var e,r,i=new Array(e),u=0;u<e;++u)i[u]=arguments[u+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(u=0,e=(r=this._[t]).length;u<e;++u)r[u].value.apply(n,i)},apply:function(t,n,e){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,u=r.length;i<u;++i)r[i].value.apply(n,e)}};var st=ut;function lt(){}var ht=function(t){return null==t?lt:function(){return this.querySelector(t)}};function dt(){return[]}var pt=function(t){return null==t?dt:function(){return this.querySelectorAll(t)}},gt=function(t){return function(){return this.matches(t)}},_t=function(t){return new Array(t.length)};function vt(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}vt.prototype={constructor:vt,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function yt(t,n,e,r,i,u){for(var o,a=0,c=n.length,f=u.length;a<f;++a)(o=n[a])?(o.__data__=u[a],r[a]=o):e[a]=new vt(t,u[a]);for(;a<c;++a)(o=n[a])&&(i[a]=o)}function mt(t,n,e,r,i,u,o){var a,c,f,s={},l=n.length,h=u.length,d=new Array(l);for(a=0;a<l;++a)(c=n[a])&&(d[a]=f="$"+o.call(c,c.__data__,a,n),f in s?i[a]=c:s[f]=c);for(a=0;a<h;++a)(c=s[f="$"+o.call(t,u[a],a,u)])?(r[a]=c,c.__data__=u[a],s[f]=null):e[a]=new vt(t,u[a]);for(a=0;a<l;++a)(c=n[a])&&s[d[a]]===c&&(i[a]=c)}function bt(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}var xt="http://www.w3.org/1999/xhtml",wt={svg:"http://www.w3.org/2000/svg",xhtml:xt,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},Mt=function(t){var n=t+="",e=n.indexOf(":");return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),wt.hasOwnProperty(n)?{space:wt[n],local:t}:t};function Tt(t){return function(){this.removeAttribute(t)}}function kt(t){return function(){this.removeAttributeNS(t.space,t.local)}}function At(t,n){return function(){this.setAttribute(t,n)}}function Nt(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function Ct(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function St(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}var Et=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function Vt(t){return function(){this.style.removeProperty(t)}}function Pt(t,n,e){return function(){this.style.setProperty(t,n,e)}}function Dt(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}function zt(t,n){return t.style.getPropertyValue(n)||Et(t).getComputedStyle(t,null).getPropertyValue(n)}function Rt(t){return function(){delete this[t]}}function Lt(t,n){return function(){this[t]=n}}function Yt(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function Ut(t){return t.trim().split(/^|\\s+/)}function Bt(t){return t.classList||new It(t)}function It(t){this._node=t,this._names=Ut(t.getAttribute("class")||"")}function Ot(t,n){for(var e=Bt(t),r=-1,i=n.length;++r<i;)e.add(n[r])}function Ft(t,n){for(var e=Bt(t),r=-1,i=n.length;++r<i;)e.remove(n[r])}function qt(t){return function(){Ot(this,t)}}function Xt(t){return function(){Ft(this,t)}}function jt(t,n){return function(){(n.apply(this,arguments)?Ot:Ft)(this,t)}}It.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function Ht(){this.textContent=""}function Kt(t){return function(){this.textContent=t}}function Gt(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}}function Wt(){this.innerHTML=""}function $t(t){return function(){this.innerHTML=t}}function Zt(t){return function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}}function Qt(){this.nextSibling&&this.parentNode.appendChild(this)}function Jt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function tn(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===xt&&n.documentElement.namespaceURI===xt?n.createElement(t):n.createElementNS(e,t)}}function nn(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}var en=function(t){var n=Mt(t);return(n.local?nn:tn)(n)};function rn(){return null}function un(){var t=this.parentNode;t&&t.removeChild(this)}function on(){var t=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function an(){var t=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}var cn={},fn=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(cn={mouseenter:"mouseover",mouseleave:"mouseout"}));function sn(t,n,e){return t=ln(t,n,e),function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t.call(this,n)}}function ln(t,n,e){return function(r){var i=fn;fn=r;try{t.call(this,this.__data__,n,e)}finally{fn=i}}}function hn(t){return t.trim().split(/^|\\s+/).map((function(t){var n="",e=t.indexOf(".");return e>=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}}))}function dn(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,u=n.length;r<u;++r)e=n[r],t.type&&e.type!==t.type||e.name!==t.name?n[++i]=e:this.removeEventListener(e.type,e.listener,e.capture);++i?n.length=i:delete this.__on}}}function pn(t,n,e){var r=cn.hasOwnProperty(t.type)?sn:ln;return function(i,u,o){var a,c=this.__on,f=r(n,u,o);if(c)for(var s=0,l=c.length;s<l;++s)if((a=c[s]).type===t.type&&a.name===t.name)return this.removeEventListener(a.type,a.listener,a.capture),this.addEventListener(a.type,a.listener=f,a.capture=e),void(a.value=n);this.addEventListener(t.type,f,e),a={type:t.type,name:t.name,value:n,listener:f,capture:e},c?c.push(a):this.__on=[a]}}function gn(t,n,e,r){var i=fn;t.sourceEvent=fn,fn=t;try{return n.apply(e,r)}finally{fn=i}}function _n(t,n,e){var r=Et(t),i=r.CustomEvent;"function"==typeof i?i=new i(n,e):(i=r.document.createEvent("Event"),e?(i.initEvent(n,e.bubbles,e.cancelable),i.detail=e.detail):i.initEvent(n,!1,!1)),t.dispatchEvent(i)}function vn(t,n){return function(){return _n(this,t,n)}}function yn(t,n){return function(){return _n(this,t,n.apply(this,arguments))}}var mn=[null];function bn(t,n){this._groups=t,this._parents=n}function xn(){return new bn([[document.documentElement]],mn)}bn.prototype=xn.prototype={constructor:bn,select:function(t){"function"!=typeof t&&(t=ht(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var u,o,a=n[i],c=a.length,f=r[i]=new Array(c),s=0;s<c;++s)(u=a[s])&&(o=t.call(u,u.__data__,s,a))&&("__data__"in u&&(o.__data__=u.__data__),f[s]=o);return new bn(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=pt(t));for(var n=this._groups,e=n.length,r=[],i=[],u=0;u<e;++u)for(var o,a=n[u],c=a.length,f=0;f<c;++f)(o=a[f])&&(r.push(t.call(o,o.__data__,f,a)),i.push(o));return new bn(r,i)},filter:function(t){"function"!=typeof t&&(t=gt(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var u,o=n[i],a=o.length,c=r[i]=[],f=0;f<a;++f)(u=o[f])&&t.call(u,u.__data__,f,o)&&c.push(u);return new bn(r,this._parents)},data:function(t,n){if(!t)return p=new Array(this.size()),s=-1,this.each((function(t){p[++s]=t})),p;var e,r=n?mt:yt,i=this._parents,u=this._groups;"function"!=typeof t&&(e=t,t=function(){return e});for(var o=u.length,a=new Array(o),c=new Array(o),f=new Array(o),s=0;s<o;++s){var l=i[s],h=u[s],d=h.length,p=t.call(l,l&&l.__data__,s,i),g=p.length,_=c[s]=new Array(g),v=a[s]=new Array(g);r(l,h,_,v,f[s]=new Array(d),p,n);for(var y,m,b=0,x=0;b<g;++b)if(y=_[b]){for(b>=x&&(x=b+1);!(m=v[x])&&++x<g;);y._next=m||null}}return(a=new bn(a,i))._enter=c,a._exit=f,a},enter:function(){return new bn(this._enter||this._groups.map(_t),this._parents)},exit:function(){return new bn(this._exit||this._groups.map(_t),this._parents)},join:function(t,n,e){var r=this.enter(),i=this,u=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=n&&(i=n(i)),null==e?u.remove():e(u),r&&i?r.merge(i).order():i},merge:function(t){for(var n=this._groups,e=t._groups,r=n.length,i=e.length,u=Math.min(r,i),o=new Array(r),a=0;a<u;++a)for(var c,f=n[a],s=e[a],l=f.length,h=o[a]=new Array(l),d=0;d<l;++d)(c=f[d]||s[d])&&(h[d]=c);for(;a<r;++a)o[a]=n[a];return new bn(o,this._parents)},order:function(){for(var t=this._groups,n=-1,e=t.length;++n<e;)for(var r,i=t[n],u=i.length-1,o=i[u];--u>=0;)(r=i[u])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=bt);for(var e=this._groups,r=e.length,i=new Array(r),u=0;u<r;++u){for(var o,a=e[u],c=a.length,f=i[u]=new Array(c),s=0;s<c;++s)(o=a[s])&&(f[s]=o);f.sort(n)}return new bn(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),n=-1;return this.each((function(){t[++n]=this})),t},node:function(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r=t[n],i=0,u=r.length;i<u;++i){var o=r[i];if(o)return o}return null},size:function(){var t=0;return this.each((function(){++t})),t},empty:function(){return!this.node()},each:function(t){for(var n=this._groups,e=0,r=n.length;e<r;++e)for(var i,u=n[e],o=0,a=u.length;o<a;++o)(i=u[o])&&t.call(i,i.__data__,o,u);return this},attr:function(t,n){var e=Mt(t);if(arguments.length<2){var r=this.node();return e.local?r.getAttributeNS(e.space,e.local):r.getAttribute(e)}return this.each((null==n?e.local?kt:Tt:"function"==typeof n?e.local?St:Ct:e.local?Nt:At)(e,n))},style:function(t,n,e){return arguments.length>1?this.each((null==n?Vt:"function"==typeof n?Dt:Pt)(t,n,null==e?"":e)):zt(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?Rt:"function"==typeof n?Yt:Lt)(t,n)):this.node()[t]},classed:function(t,n){var e=Ut(t+"");if(arguments.length<2){for(var r=Bt(this.node()),i=-1,u=e.length;++i<u;)if(!r.contains(e[i]))return!1;return!0}return this.each(("function"==typeof n?jt:n?qt:Xt)(e,n))},text:function(t){return arguments.length?this.each(null==t?Ht:("function"==typeof t?Gt:Kt)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Wt:("function"==typeof t?Zt:$t)(t)):this.node().innerHTML},raise:function(){return this.each(Qt)},lower:function(){return this.each(Jt)},append:function(t){var n="function"==typeof t?t:en(t);return this.select((function(){return this.appendChild(n.apply(this,arguments))}))},insert:function(t,n){var e="function"==typeof t?t:en(t),r=null==n?rn:"function"==typeof n?n:ht(n);return this.select((function(){return this.insertBefore(e.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(un)},clone:function(t){return this.select(t?an:on)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,n,e){var r,i,u=hn(t+""),o=u.length;if(!(arguments.length<2)){for(a=n?pn:dn,null==e&&(e=!1),r=0;r<o;++r)this.each(a(u[r],n,e));return this}var a=this.node().__on;if(a)for(var c,f=0,s=a.length;f<s;++f)for(r=0,c=a[f];r<o;++r)if((i=u[r]).type===c.type&&i.name===c.name)return c.value},dispatch:function(t,n){return this.each(("function"==typeof n?yn:vn)(t,n))}};var wn=xn,Mn=function(t){return"string"==typeof t?new bn([[document.querySelector(t)]],[document.documentElement]):new bn([[t]],mn)};function Tn(){fn.stopImmediatePropagation()}var kn=function(){fn.preventDefault(),fn.stopImmediatePropagation()},An=function(t){var n=t.document.documentElement,e=Mn(t).on("dragstart.drag",kn,!0);"onselectstart"in n?e.on("selectstart.drag",kn,!0):(n.__noselect=n.style.MozUserSelect,n.style.MozUserSelect="none")};function Nn(t,n){var e=t.document.documentElement,r=Mn(t).on("dragstart.drag",null);n&&(r.on("click.drag",kn,!0),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in e?r.on("selectstart.drag",null):(e.style.MozUserSelect=e.__noselect,delete e.__noselect)}var Cn=function(t,n,e){t.prototype=n.prototype=e,e.constructor=t};function Sn(t,n){var e=Object.create(t.prototype);for(var r in n)e[r]=n[r];return e}function En(){}var Vn="\\\\s*([+-]?\\\\d+)\\\\s*",Pn="\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*",Dn="\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*",zn=/^#([0-9a-f]{3,8})$/,Rn=new RegExp("^rgb\\\\("+[Vn,Vn,Vn]+"\\\\)$"),Ln=new RegExp("^rgb\\\\("+[Dn,Dn,Dn]+"\\\\)$"),Yn=new RegExp("^rgba\\\\("+[Vn,Vn,Vn,Pn]+"\\\\)$"),Un=new RegExp("^rgba\\\\("+[Dn,Dn,Dn,Pn]+"\\\\)$"),Bn=new RegExp("^hsl\\\\("+[Pn,Dn,Dn]+"\\\\)$"),In=new RegExp("^hsla\\\\("+[Pn,Dn,Dn,Pn]+"\\\\)$"),On={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Fn(){return this.rgb().formatHex()}function qn(){return this.rgb().formatRgb()}function Xn(t){var n,e;return t=(t+"").trim().toLowerCase(),(n=zn.exec(t))?(e=n[1].length,n=parseInt(n[1],16),6===e?jn(n):3===e?new Wn(n>>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):8===e?new Wn(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):4===e?new Wn(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|240&n,((15&n)<<4|15&n)/255):null):(n=Rn.exec(t))?new Wn(n[1],n[2],n[3],1):(n=Ln.exec(t))?new Wn(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=Yn.exec(t))?Hn(n[1],n[2],n[3],n[4]):(n=Un.exec(t))?Hn(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=Bn.exec(t))?Jn(n[1],n[2]/100,n[3]/100,1):(n=In.exec(t))?Jn(n[1],n[2]/100,n[3]/100,n[4]):On.hasOwnProperty(t)?jn(On[t]):"transparent"===t?new Wn(NaN,NaN,NaN,0):null}function jn(t){return new Wn(t>>16&255,t>>8&255,255&t,1)}function Hn(t,n,e,r){return r<=0&&(t=n=e=NaN),new Wn(t,n,e,r)}function Kn(t){return t instanceof En||(t=Xn(t)),t?new Wn((t=t.rgb()).r,t.g,t.b,t.opacity):new Wn}function Gn(t,n,e,r){return 1===arguments.length?Kn(t):new Wn(t,n,e,null==r?1:r)}function Wn(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function $n(){return"#"+Qn(this.r)+Qn(this.g)+Qn(this.b)}function Zn(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function Qn(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Jn(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new ee(t,n,e,r)}function te(t){if(t instanceof ee)return new ee(t.h,t.s,t.l,t.opacity);if(t instanceof En||(t=Xn(t)),!t)return new ee;if(t instanceof ee)return t;var n=(t=t.rgb()).r/255,e=t.g/255,r=t.b/255,i=Math.min(n,e,r),u=Math.max(n,e,r),o=NaN,a=u-i,c=(u+i)/2;return a?(o=n===u?(e-r)/a+6*(e<r):e===u?(r-n)/a+2:(n-e)/a+4,a/=c<.5?u+i:2-u-i,o*=60):a=c>0&&c<1?0:o,new ee(o,a,c,t.opacity)}function ne(t,n,e,r){return 1===arguments.length?te(t):new ee(t,n,e,null==r?1:r)}function ee(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function re(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}function ie(t,n,e,r,i){var u=t*t,o=u*t;return((1-3*t+3*u-o)*n+(4-6*u+3*o)*e+(1+3*t+3*u-3*o)*r+o*i)/6}Cn(En,Xn,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Fn,formatHex:Fn,formatHsl:function(){return te(this).formatHsl()},formatRgb:qn,toString:qn}),Cn(Wn,Gn,Sn(En,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Wn(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Wn(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:$n,formatHex:$n,formatRgb:Zn,toString:Zn})),Cn(ee,ne,Sn(En,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new ee(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new ee(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,r=e+(e<.5?e:1-e)*n,i=2*e-r;return new Wn(re(t>=240?t-240:t+120,i,r),re(t,i,r),re(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var ue=function(t){var n=t.length-1;return function(e){var r=e<=0?e=0:e>=1?(e=1,n-1):Math.floor(e*n),i=t[r],u=t[r+1],o=r>0?t[r-1]:2*i-u,a=r<n-1?t[r+2]:2*u-i;return ie((e-r/n)*n,o,i,u,a)}},oe=function(t){var n=t.length;return function(e){var r=Math.floor(((e%=1)<0?++e:e)*n),i=t[(r+n-1)%n],u=t[r%n],o=t[(r+1)%n],a=t[(r+2)%n];return ie((e-r/n)*n,i,u,o,a)}},ae=function(t){return function(){return t}};function ce(t,n){return function(e){return t+e*n}}function fe(t,n){var e=n-t;return e?ce(t,e>180||e<-180?e-360*Math.round(e/360):e):ae(isNaN(t)?n:t)}function se(t){return 1==(t=+t)?le:function(n,e){return e-n?function(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(r){return Math.pow(t+r*n,e)}}(n,e,t):ae(isNaN(n)?e:n)}}function le(t,n){var e=n-t;return e?ce(t,e):ae(isNaN(t)?n:t)}var he=function t(n){var e=se(n);function r(t,n){var r=e((t=Gn(t)).r,(n=Gn(n)).r),i=e(t.g,n.g),u=e(t.b,n.b),o=le(t.opacity,n.opacity);return function(n){return t.r=r(n),t.g=i(n),t.b=u(n),t.opacity=o(n),t+""}}return r.gamma=t,r}(1);function de(t){return function(n){var e,r,i=n.length,u=new Array(i),o=new Array(i),a=new Array(i);for(e=0;e<i;++e)r=Gn(n[e]),u[e]=r.r||0,o[e]=r.g||0,a[e]=r.b||0;return u=t(u),o=t(o),a=t(a),r.opacity=1,function(t){return r.r=u(t),r.g=o(t),r.b=a(t),r+""}}}var pe=de(ue),ge=de(oe),_e=function(t,n){n||(n=[]);var e,r=t?Math.min(n.length,t.length):0,i=n.slice();return function(u){for(e=0;e<r;++e)i[e]=t[e]*(1-u)+n[e]*u;return i}};function ve(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}var ye=function(t,n){return(ve(n)?_e:me)(t,n)};function me(t,n){var e,r=n?n.length:0,i=t?Math.min(r,t.length):0,u=new Array(i),o=new Array(r);for(e=0;e<i;++e)u[e]=Ce(t[e],n[e]);for(;e<r;++e)o[e]=n[e];return function(t){for(e=0;e<i;++e)o[e]=u[e](t);return o}}var be=function(t,n){var e=new Date;return t=+t,n=+n,function(r){return e.setTime(t*(1-r)+n*r),e}},xe=function(t,n){return t=+t,n=+n,function(e){return t*(1-e)+n*e}},we=function(t,n){var e,r={},i={};for(e in null!==t&&"object"==typeof t||(t={}),null!==n&&"object"==typeof n||(n={}),n)e in t?r[e]=Ce(t[e],n[e]):i[e]=n[e];return function(t){for(e in r)i[e]=r[e](t);return i}},Me=/[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,Te=new RegExp(Me.source,"g");var ke,Ae,Ne=function(t,n){var e,r,i,u=Me.lastIndex=Te.lastIndex=0,o=-1,a=[],c=[];for(t+="",n+="";(e=Me.exec(t))&&(r=Te.exec(n));)(i=r.index)>u&&(i=n.slice(u,i),a[o]?a[o]+=i:a[++o]=i),(e=e[0])===(r=r[0])?a[o]?a[o]+=r:a[++o]=r:(a[++o]=null,c.push({i:o,x:xe(e,r)})),u=Te.lastIndex;return u<n.length&&(i=n.slice(u),a[o]?a[o]+=i:a[++o]=i),a.length<2?c[0]?function(t){return function(n){return t(n)+""}}(c[0].x):function(t){return function(){return t}}(n):(n=c.length,function(t){for(var e,r=0;r<n;++r)a[(e=c[r]).i]=e.x(t);return a.join("")})},Ce=function(t,n){var e,r=typeof n;return null==n||"boolean"===r?ae(n):("number"===r?xe:"string"===r?(e=Xn(n))?(n=e,he):Ne:n instanceof Xn?he:n instanceof Date?be:ve(n)?_e:Array.isArray(n)?me:"function"!=typeof n.valueOf&&"function"!=typeof n.toString||isNaN(n)?we:xe)(t,n)},Se=function(){for(var t,n=fn;t=n.sourceEvent;)n=t;return n},Ee=function(t,n){var e=t.ownerSVGElement||t;if(e.createSVGPoint){var r=e.createSVGPoint();return r.x=n.clientX,r.y=n.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}var i=t.getBoundingClientRect();return[n.clientX-i.left-t.clientLeft,n.clientY-i.top-t.clientTop]},Ve=function(t,n,e){arguments.length<3&&(e=n,n=Se().changedTouches);for(var r,i=0,u=n?n.length:0;i<u;++i)if((r=n[i]).identifier===e)return Ee(t,r);return null},Pe=function(t){var n=Se();return n.changedTouches&&(n=n.changedTouches[0]),Ee(t,n)},De=0,ze=0,Re=0,Le=0,Ye=0,Ue=0,Be="object"==typeof performance&&performance.now?performance:Date,Ie="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Oe(){return Ye||(Ie(Fe),Ye=Be.now()+Ue)}function Fe(){Ye=0}function qe(){this._call=this._time=this._next=null}function Xe(t,n,e){var r=new qe;return r.restart(t,n,e),r}function je(){Oe(),++De;for(var t,n=ke;n;)(t=Ye-n._time)>=0&&n._call.call(null,t),n=n._next;--De}function He(){Ye=(Le=Be.now())+Ue,De=ze=0;try{je()}finally{De=0,function(){var t,n,e=ke,r=1/0;for(;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:ke=n);Ae=t,Ge(r)}(),Ye=0}}function Ke(){var t=Be.now(),n=t-Le;n>1e3&&(Ue-=n,Le=t)}function Ge(t){De||(ze&&(ze=clearTimeout(ze)),t-Ye>24?(t<1/0&&(ze=setTimeout(He,t-Be.now()-Ue)),Re&&(Re=clearInterval(Re))):(Re||(Le=Be.now(),Re=setInterval(Ke,1e3)),De=1,Ie(He)))}qe.prototype=Xe.prototype={constructor:qe,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?Oe():+e)+(null==n?0:+n),this._next||Ae===this||(Ae?Ae._next=this:ke=this,Ae=this),this._call=t,this._time=e,Ge()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ge())}};var We=function(t,n,e){var r=new qe;return n=null==n?0:+n,r.restart((function(e){r.stop(),t(e+n)}),n,e),r},$e=st("start","end","cancel","interrupt"),Ze=[],Qe=function(t,n,e,r,i,u){var o=t.__transition;if(o){if(e in o)return}else t.__transition={};!function(t,n,e){var r,i=t.__transition;function u(c){var f,s,l,h;if(1!==e.state)return a();for(f in i)if((h=i[f]).name===e.name){if(3===h.state)return We(u);4===h.state?(h.state=6,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[f]):+f<n&&(h.state=6,h.timer.stop(),h.on.call("cancel",t,t.__data__,h.index,h.group),delete i[f])}if(We((function(){3===e.state&&(e.state=4,e.timer.restart(o,e.delay,e.time),o(c))})),e.state=2,e.on.call("start",t,t.__data__,e.index,e.group),2===e.state){for(e.state=3,r=new Array(l=e.tween.length),f=0,s=-1;f<l;++f)(h=e.tween[f].value.call(t,t.__data__,e.index,e.group))&&(r[++s]=h);r.length=s+1}}function o(n){for(var i=n<e.duration?e.ease.call(null,n/e.duration):(e.timer.restart(a),e.state=5,1),u=-1,o=r.length;++u<o;)r[u].call(t,i);5===e.state&&(e.on.call("end",t,t.__data__,e.index,e.group),a())}function a(){for(var r in e.state=6,e.timer.stop(),delete i[n],i)return;delete t.__transition}i[n]=e,e.timer=Xe((function(t){e.state=1,e.timer.restart(u,e.delay,e.time),e.delay<=t&&u(t-e.delay)}),0,e.time)}(t,e,{name:n,index:r,group:i,on:$e,tween:Ze,time:u.time,delay:u.delay,duration:u.duration,ease:u.ease,timer:null,state:0})};function Je(t,n){var e=nr(t,n);if(e.state>0)throw new Error("too late; already scheduled");return e}function tr(t,n){var e=nr(t,n);if(e.state>3)throw new Error("too late; already running");return e}function nr(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}var er,rr,ir,ur,or=function(t,n){var e,r,i,u=t.__transition,o=!0;if(u){for(i in n=null==n?null:n+"",u)(e=u[i]).name===n?(r=e.state>2&&e.state<5,e.state=6,e.timer.stop(),e.on.call(r?"interrupt":"cancel",t,t.__data__,e.index,e.group),delete u[i]):o=!1;o&&delete t.__transition}},ar=180/Math.PI,cr={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},fr=function(t,n,e,r,i,u){var o,a,c;return(o=Math.sqrt(t*t+n*n))&&(t/=o,n/=o),(c=t*e+n*r)&&(e-=t*c,r-=n*c),(a=Math.sqrt(e*e+r*r))&&(e/=a,r/=a,c/=a),t*r<n*e&&(t=-t,n=-n,c=-c,o=-o),{translateX:i,translateY:u,rotate:Math.atan2(n,t)*ar,skewX:Math.atan(c)*ar,scaleX:o,scaleY:a}};function sr(t,n,e,r){function i(t){return t.length?t.pop()+" ":""}return function(u,o){var a=[],c=[];return u=t(u),o=t(o),function(t,r,i,u,o,a){if(t!==i||r!==u){var c=o.push("translate(",null,n,null,e);a.push({i:c-4,x:xe(t,i)},{i:c-2,x:xe(r,u)})}else(i||u)&&o.push("translate("+i+n+u+e)}(u.translateX,u.translateY,o.translateX,o.translateY,a,c),function(t,n,e,u){t!==n?(t-n>180?n+=360:n-t>180&&(t+=360),u.push({i:e.push(i(e)+"rotate(",null,r)-2,x:xe(t,n)})):n&&e.push(i(e)+"rotate("+n+r)}(u.rotate,o.rotate,a,c),function(t,n,e,u){t!==n?u.push({i:e.push(i(e)+"skewX(",null,r)-2,x:xe(t,n)}):n&&e.push(i(e)+"skewX("+n+r)}(u.skewX,o.skewX,a,c),function(t,n,e,r,u,o){if(t!==e||n!==r){var a=u.push(i(u)+"scale(",null,",",null,")");o.push({i:a-4,x:xe(t,e)},{i:a-2,x:xe(n,r)})}else 1===e&&1===r||u.push(i(u)+"scale("+e+","+r+")")}(u.scaleX,u.scaleY,o.scaleX,o.scaleY,a,c),u=o=null,function(t){for(var n,e=-1,r=c.length;++e<r;)a[(n=c[e]).i]=n.x(t);return a.join("")}}}var lr=sr((function(t){return"none"===t?cr:(er||(er=document.createElement("DIV"),rr=document.documentElement,ir=document.defaultView),er.style.transform=t,t=ir.getComputedStyle(rr.appendChild(er),null).getPropertyValue("transform"),rr.removeChild(er),t=t.slice(7,-1).split(","),fr(+t[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),hr=sr((function(t){return null==t?cr:(ur||(ur=document.createElementNS("http://www.w3.org/2000/svg","g")),ur.setAttribute("transform",t),(t=ur.transform.baseVal.consolidate())?(t=t.matrix,fr(t.a,t.b,t.c,t.d,t.e,t.f)):cr)}),", ",")",")");function dr(t,n){var e,r;return function(){var i=tr(this,t),u=i.tween;if(u!==e)for(var o=0,a=(r=e=u).length;o<a;++o)if(r[o].name===n){(r=r.slice()).splice(o,1);break}i.tween=r}}function pr(t,n,e){var r,i;if("function"!=typeof e)throw new Error;return function(){var u=tr(this,t),o=u.tween;if(o!==r){i=(r=o).slice();for(var a={name:n,value:e},c=0,f=i.length;c<f;++c)if(i[c].name===n){i[c]=a;break}c===f&&i.push(a)}u.tween=i}}function gr(t,n,e){var r=t._id;return t.each((function(){var t=tr(this,r);(t.value||(t.value={}))[n]=e.apply(this,arguments)})),function(t){return nr(t,r).value[n]}}var _r=function(t,n){var e;return("number"==typeof n?xe:n instanceof Xn?he:(e=Xn(n))?(n=e,he):Ne)(t,n)};function vr(t){return function(){this.removeAttribute(t)}}function yr(t){return function(){this.removeAttributeNS(t.space,t.local)}}function mr(t,n,e){var r,i,u=e+"";return function(){var o=this.getAttribute(t);return o===u?null:o===r?i:i=n(r=o,e)}}function br(t,n,e){var r,i,u=e+"";return function(){var o=this.getAttributeNS(t.space,t.local);return o===u?null:o===r?i:i=n(r=o,e)}}function xr(t,n,e){var r,i,u;return function(){var o,a,c=e(this);if(null!=c)return(o=this.getAttribute(t))===(a=c+"")?null:o===r&&a===i?u:(i=a,u=n(r=o,c));this.removeAttribute(t)}}function wr(t,n,e){var r,i,u;return function(){var o,a,c=e(this);if(null!=c)return(o=this.getAttributeNS(t.space,t.local))===(a=c+"")?null:o===r&&a===i?u:(i=a,u=n(r=o,c));this.removeAttributeNS(t.space,t.local)}}function Mr(t,n){return function(e){this.setAttribute(t,n.call(this,e))}}function Tr(t,n){return function(e){this.setAttributeNS(t.space,t.local,n.call(this,e))}}function kr(t,n){var e,r;function i(){var i=n.apply(this,arguments);return i!==r&&(e=(r=i)&&Tr(t,i)),e}return i._value=n,i}function Ar(t,n){var e,r;function i(){var i=n.apply(this,arguments);return i!==r&&(e=(r=i)&&Mr(t,i)),e}return i._value=n,i}function Nr(t,n){return function(){Je(this,t).delay=+n.apply(this,arguments)}}function Cr(t,n){return n=+n,function(){Je(this,t).delay=n}}function Sr(t,n){return function(){tr(this,t).duration=+n.apply(this,arguments)}}function Er(t,n){return n=+n,function(){tr(this,t).duration=n}}function Vr(t,n){if("function"!=typeof n)throw new Error;return function(){tr(this,t).ease=n}}function Pr(t,n,e){var r,i,u=function(t){return(t+"").trim().split(/^|\\s+/).every((function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||"start"===t}))}(n)?Je:tr;return function(){var o=u(this,t),a=o.on;a!==r&&(i=(r=a).copy()).on(n,e),o.on=i}}var Dr=wn.prototype.constructor;function zr(t){return function(){this.style.removeProperty(t)}}function Rr(t,n,e){return function(r){this.style.setProperty(t,n.call(this,r),e)}}function Lr(t,n,e){var r,i;function u(){var u=n.apply(this,arguments);return u!==i&&(r=(i=u)&&Rr(t,u,e)),r}return u._value=n,u}function Yr(t){return function(n){this.textContent=t.call(this,n)}}function Ur(t){var n,e;function r(){var r=t.apply(this,arguments);return r!==e&&(n=(e=r)&&Yr(r)),n}return r._value=t,r}var Br=0;function Ir(t,n,e,r){this._groups=t,this._parents=n,this._name=e,this._id=r}function Or(t){return wn().transition(t)}function Fr(){return++Br}var qr=wn.prototype;function Xr(t){return t*t*t}function jr(t){return--t*t*t+1}function Hr(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}Ir.prototype=Or.prototype={constructor:Ir,select:function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=ht(t));for(var r=this._groups,i=r.length,u=new Array(i),o=0;o<i;++o)for(var a,c,f=r[o],s=f.length,l=u[o]=new Array(s),h=0;h<s;++h)(a=f[h])&&(c=t.call(a,a.__data__,h,f))&&("__data__"in a&&(c.__data__=a.__data__),l[h]=c,Qe(l[h],n,e,h,l,nr(a,e)));return new Ir(u,this._parents,n,e)},selectAll:function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=pt(t));for(var r=this._groups,i=r.length,u=[],o=[],a=0;a<i;++a)for(var c,f=r[a],s=f.length,l=0;l<s;++l)if(c=f[l]){for(var h,d=t.call(c,c.__data__,l,f),p=nr(c,e),g=0,_=d.length;g<_;++g)(h=d[g])&&Qe(h,n,e,g,d,p);u.push(d),o.push(c)}return new Ir(u,o,n,e)},filter:function(t){"function"!=typeof t&&(t=gt(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var u,o=n[i],a=o.length,c=r[i]=[],f=0;f<a;++f)(u=o[f])&&t.call(u,u.__data__,f,o)&&c.push(u);return new Ir(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var n=this._groups,e=t._groups,r=n.length,i=e.length,u=Math.min(r,i),o=new Array(r),a=0;a<u;++a)for(var c,f=n[a],s=e[a],l=f.length,h=o[a]=new Array(l),d=0;d<l;++d)(c=f[d]||s[d])&&(h[d]=c);for(;a<r;++a)o[a]=n[a];return new Ir(o,this._parents,this._name,this._id)},selection:function(){return new Dr(this._groups,this._parents)},transition:function(){for(var t=this._name,n=this._id,e=Fr(),r=this._groups,i=r.length,u=0;u<i;++u)for(var o,a=r[u],c=a.length,f=0;f<c;++f)if(o=a[f]){var s=nr(o,n);Qe(o,t,e,f,a,{time:s.time+s.delay+s.duration,delay:0,duration:s.duration,ease:s.ease})}return new Ir(r,this._parents,t,e)},call:qr.call,nodes:qr.nodes,node:qr.node,size:qr.size,empty:qr.empty,each:qr.each,on:function(t,n){var e=this._id;return arguments.length<2?nr(this.node(),e).on.on(t):this.each(Pr(e,t,n))},attr:function(t,n){var e=Mt(t),r="transform"===e?hr:_r;return this.attrTween(t,"function"==typeof n?(e.local?wr:xr)(e,r,gr(this,"attr."+t,n)):null==n?(e.local?yr:vr)(e):(e.local?br:mr)(e,r,n))},attrTween:function(t,n){var e="attr."+t;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(null==n)return this.tween(e,null);if("function"!=typeof n)throw new Error;var r=Mt(t);return this.tween(e,(r.local?kr:Ar)(r,n))},style:function(t,n,e){var r="transform"==(t+="")?lr:_r;return null==n?this.styleTween(t,function(t,n){var e,r,i;return function(){var u=zt(this,t),o=(this.style.removeProperty(t),zt(this,t));return u===o?null:u===e&&o===r?i:i=n(e=u,r=o)}}(t,r)).on("end.style."+t,zr(t)):"function"==typeof n?this.styleTween(t,function(t,n,e){var r,i,u;return function(){var o=zt(this,t),a=e(this),c=a+"";return null==a&&(this.style.removeProperty(t),c=a=zt(this,t)),o===c?null:o===r&&c===i?u:(i=c,u=n(r=o,a))}}(t,r,gr(this,"style."+t,n))).each(function(t,n){var e,r,i,u,o="style."+n,a="end."+o;return function(){var c=tr(this,t),f=c.on,s=null==c.value[o]?u||(u=zr(n)):void 0;f===e&&i===s||(r=(e=f).copy()).on(a,i=s),c.on=r}}(this._id,t)):this.styleTween(t,function(t,n,e){var r,i,u=e+"";return function(){var o=zt(this,t);return o===u?null:o===r?i:i=n(r=o,e)}}(t,r,n),e).on("end.style."+t,null)},styleTween:function(t,n,e){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==n)return this.tween(r,null);if("function"!=typeof n)throw new Error;return this.tween(r,Lr(t,n,null==e?"":e))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var n=t(this);this.textContent=null==n?"":n}}(gr(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var n="text";if(arguments.length<1)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw new Error;return this.tween(n,Ur(t))},remove:function(){return this.on("end.remove",(t=this._id,function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}));var t},tween:function(t,n){var e=this._id;if(t+="",arguments.length<2){for(var r,i=nr(this.node(),e).tween,u=0,o=i.length;u<o;++u)if((r=i[u]).name===t)return r.value;return null}return this.each((null==n?dr:pr)(e,t,n))},delay:function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?Nr:Cr)(n,t)):nr(this.node(),n).delay},duration:function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?Sr:Er)(n,t)):nr(this.node(),n).duration},ease:function(t){var n=this._id;return arguments.length?this.each(Vr(n,t)):nr(this.node(),n).ease},end:function(){var t,n,e=this,r=e._id,i=e.size();return new Promise((function(u,o){var a={value:o},c={value:function(){0==--i&&u()}};e.each((function(){var e=tr(this,r),i=e.on;i!==t&&((n=(t=i).copy())._.cancel.push(a),n._.interrupt.push(a),n._.end.push(c)),e.on=n}))}))}};var Kr={time:null,delay:0,duration:250,ease:Hr};function Gr(t,n){for(var e;!(e=t.__transition)||!(e=e[n]);)if(!(t=t.parentNode))return Kr.time=Oe(),Kr;return e}wn.prototype.interrupt=function(t){return this.each((function(){or(this,t)}))},wn.prototype.transition=function(t){var n,e;t instanceof Ir?(n=t._id,t=t._name):(n=Fr(),(e=Kr).time=Oe(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,u=0;u<i;++u)for(var o,a=r[u],c=a.length,f=0;f<c;++f)(o=a[f])&&Qe(o,t,n,f,a,e||Gr(o,n));return new Ir(r,this._parents,t,n)};var Wr=[null],$r=function(t,n){var e,r,i=t.__transition;if(i)for(r in n=null==n?null:n+"",i)if((e=i[r]).state>1&&e.name===n)return new Ir([[t]],Wr,n,+r);return null},Zr=function(t){return function(){return t}},Qr=function(t,n,e){this.target=t,this.type=n,this.selection=e};function Jr(){fn.stopImmediatePropagation()}var ti=function(){fn.preventDefault(),fn.stopImmediatePropagation()},ni={name:"drag"},ei={name:"space"},ri={name:"handle"},ii={name:"center"};function ui(t){return[+t[0],+t[1]]}function oi(t){return[ui(t[0]),ui(t[1])]}function ai(t){return function(n){return Ve(n,fn.touches,t)}}var ci={name:"x",handles:["w","e"].map(_i),input:function(t,n){return null==t?null:[[+t[0],n[0][1]],[+t[1],n[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},fi={name:"y",handles:["n","s"].map(_i),input:function(t,n){return null==t?null:[[n[0][0],+t[0]],[n[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},si={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(_i),input:function(t){return null==t?null:oi(t)},output:function(t){return t}},li={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},hi={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},di={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},pi={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},gi={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function _i(t){return{type:t}}function vi(){return!fn.ctrlKey&&!fn.button}function yi(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function mi(){return navigator.maxTouchPoints||"ontouchstart"in this}function bi(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function xi(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function wi(t){var n=t.__brush;return n?n.dim.output(n.selection):null}function Mi(){return Ai(ci)}function Ti(){return Ai(fi)}var ki=function(){return Ai(si)};function Ai(t){var n,e=yi,r=vi,i=mi,u=!0,o=st("start","brush","end"),a=6;function c(n){var e=n.property("__brush",g).selectAll(".overlay").data([_i("overlay")]);e.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",li.overlay).merge(e).each((function(){var t=bi(this).extent;Mn(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])})),n.selectAll(".selection").data([_i("selection")]).enter().append("rect").attr("class","selection").attr("cursor",li.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=n.selectAll(".handle").data(t.handles,(function(t){return t.type}));r.exit().remove(),r.enter().append("rect").attr("class",(function(t){return"handle handle--"+t.type})).attr("cursor",(function(t){return li[t.type]})),n.each(f).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",h).filter(i).on("touchstart.brush",h).on("touchmove.brush",d).on("touchend.brush touchcancel.brush",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function f(){var t=Mn(this),n=bi(this).selection;n?(t.selectAll(".selection").style("display",null).attr("x",n[0][0]).attr("y",n[0][1]).attr("width",n[1][0]-n[0][0]).attr("height",n[1][1]-n[0][1]),t.selectAll(".handle").style("display",null).attr("x",(function(t){return"e"===t.type[t.type.length-1]?n[1][0]-a/2:n[0][0]-a/2})).attr("y",(function(t){return"s"===t.type[0]?n[1][1]-a/2:n[0][1]-a/2})).attr("width",(function(t){return"n"===t.type||"s"===t.type?n[1][0]-n[0][0]+a:a})).attr("height",(function(t){return"e"===t.type||"w"===t.type?n[1][1]-n[0][1]+a:a}))):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function s(t,n,e){return!e&&t.__brush.emitter||new l(t,n)}function l(t,n){this.that=t,this.args=n,this.state=t.__brush,this.active=0}function h(){if((!n||fn.touches)&&r.apply(this,arguments)){var e,i,o,a,c,l,h,d,p,g,_,v=this,y=fn.target.__data__.type,m="selection"===(u&&fn.metaKey?y="overlay":y)?ni:u&&fn.altKey?ii:ri,b=t===fi?null:pi[y],x=t===ci?null:gi[y],w=bi(v),M=w.extent,T=w.selection,k=M[0][0],A=M[0][1],N=M[1][0],C=M[1][1],S=0,E=0,V=b&&x&&u&&fn.shiftKey,P=fn.touches?ai(fn.changedTouches[0].identifier):Pe,D=P(v),z=D,R=s(v,arguments,!0).beforestart();"overlay"===y?(T&&(p=!0),w.selection=T=[[e=t===fi?k:D[0],o=t===ci?A:D[1]],[c=t===fi?N:e,h=t===ci?C:o]]):(e=T[0][0],o=T[0][1],c=T[1][0],h=T[1][1]),i=e,a=o,l=c,d=h;var L=Mn(v).attr("pointer-events","none"),Y=L.selectAll(".overlay").attr("cursor",li[y]);if(fn.touches)R.moved=B,R.ended=O;else{var U=Mn(fn.view).on("mousemove.brush",B,!0).on("mouseup.brush",O,!0);u&&U.on("keydown.brush",F,!0).on("keyup.brush",q,!0),An(fn.view)}Jr(),or(v),f.call(v),R.start()}function B(){var t=P(v);!V||g||_||(Math.abs(t[0]-z[0])>Math.abs(t[1]-z[1])?_=!0:g=!0),z=t,p=!0,ti(),I()}function I(){var t;switch(S=z[0]-D[0],E=z[1]-D[1],m){case ei:case ni:b&&(S=Math.max(k-e,Math.min(N-c,S)),i=e+S,l=c+S),x&&(E=Math.max(A-o,Math.min(C-h,E)),a=o+E,d=h+E);break;case ri:b<0?(S=Math.max(k-e,Math.min(N-e,S)),i=e+S,l=c):b>0&&(S=Math.max(k-c,Math.min(N-c,S)),i=e,l=c+S),x<0?(E=Math.max(A-o,Math.min(C-o,E)),a=o+E,d=h):x>0&&(E=Math.max(A-h,Math.min(C-h,E)),a=o,d=h+E);break;case ii:b&&(i=Math.max(k,Math.min(N,e-S*b)),l=Math.max(k,Math.min(N,c+S*b))),x&&(a=Math.max(A,Math.min(C,o-E*x)),d=Math.max(A,Math.min(C,h+E*x)))}l<i&&(b*=-1,t=e,e=c,c=t,t=i,i=l,l=t,y in hi&&Y.attr("cursor",li[y=hi[y]])),d<a&&(x*=-1,t=o,o=h,h=t,t=a,a=d,d=t,y in di&&Y.attr("cursor",li[y=di[y]])),w.selection&&(T=w.selection),g&&(i=T[0][0],l=T[1][0]),_&&(a=T[0][1],d=T[1][1]),T[0][0]===i&&T[0][1]===a&&T[1][0]===l&&T[1][1]===d||(w.selection=[[i,a],[l,d]],f.call(v),R.brush())}function O(){if(Jr(),fn.touches){if(fn.touches.length)return;n&&clearTimeout(n),n=setTimeout((function(){n=null}),500)}else Nn(fn.view,p),U.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);L.attr("pointer-events","all"),Y.attr("cursor",li.overlay),w.selection&&(T=w.selection),xi(T)&&(w.selection=null,f.call(v)),R.end()}function F(){switch(fn.keyCode){case 16:V=b&&x;break;case 18:m===ri&&(b&&(c=l-S*b,e=i+S*b),x&&(h=d-E*x,o=a+E*x),m=ii,I());break;case 32:m!==ri&&m!==ii||(b<0?c=l-S:b>0&&(e=i-S),x<0?h=d-E:x>0&&(o=a-E),m=ei,Y.attr("cursor",li.selection),I());break;default:return}ti()}function q(){switch(fn.keyCode){case 16:V&&(g=_=V=!1,I());break;case 18:m===ii&&(b<0?c=l:b>0&&(e=i),x<0?h=d:x>0&&(o=a),m=ri,I());break;case 32:m===ei&&(fn.altKey?(b&&(c=l-S*b,e=i+S*b),x&&(h=d-E*x,o=a+E*x),m=ii):(b<0?c=l:b>0&&(e=i),x<0?h=d:x>0&&(o=a),m=ri),Y.attr("cursor",li[y]),I());break;default:return}ti()}}function d(){s(this,arguments).moved()}function p(){s(this,arguments).ended()}function g(){var n=this.__brush||{selection:null};return n.extent=oi(e.apply(this,arguments)),n.dim=t,n}return c.move=function(n,e){n.selection?n.on("start.brush",(function(){s(this,arguments).beforestart().start()})).on("interrupt.brush end.brush",(function(){s(this,arguments).end()})).tween("brush",(function(){var n=this,r=n.__brush,i=s(n,arguments),u=r.selection,o=t.input("function"==typeof e?e.apply(this,arguments):e,r.extent),a=Ce(u,o);function c(t){r.selection=1===t&&null===o?null:a(t),f.call(n),i.brush()}return null!==u&&null!==o?c:c(1)})):n.each((function(){var n=this,r=arguments,i=n.__brush,u=t.input("function"==typeof e?e.apply(n,r):e,i.extent),o=s(n,r).beforestart();or(n),i.selection=null===u?null:u,f.call(n),o.start().brush().end()}))},c.clear=function(t){c.move(t,null)},l.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(){return this.starting?(this.starting=!1,this.emit("start")):this.emit("brush"),this},brush:function(){return this.emit("brush"),this},end:function(){return 0==--this.active&&(delete this.state.emitter,this.emit("end")),this},emit:function(n){gn(new Qr(c,n,t.output(this.state.selection)),o.apply,o,[n,this.that,this.args])}},c.extent=function(t){return arguments.length?(e="function"==typeof t?t:Zr(oi(t)),c):e},c.filter=function(t){return arguments.length?(r="function"==typeof t?t:Zr(!!t),c):r},c.touchable=function(t){return arguments.length?(i="function"==typeof t?t:Zr(!!t),c):i},c.handleSize=function(t){return arguments.length?(a=+t,c):a},c.keyModifiers=function(t){return arguments.length?(u=!!t,c):u},c.on=function(){var t=o.on.apply(o,arguments);return t===o?c:t},c}var Ni=Math.cos,Ci=Math.sin,Si=Math.PI,Ei=Si/2,Vi=2*Si,Pi=Math.max;function Di(t){return function(n,e){return t(n.source.value+n.target.value,e.source.value+e.target.value)}}var zi=function(){var t=0,n=null,e=null,r=null;function i(i){var u,o,a,c,f,s,l=i.length,h=[],d=w(l),p=[],g=[],_=g.groups=new Array(l),v=new Array(l*l);for(u=0,f=-1;++f<l;){for(o=0,s=-1;++s<l;)o+=i[f][s];h.push(o),p.push(w(l)),u+=o}for(n&&d.sort((function(t,e){return n(h[t],h[e])})),e&&p.forEach((function(t,n){t.sort((function(t,r){return e(i[n][t],i[n][r])}))})),c=(u=Pi(0,Vi-t*l)/u)?t:Vi/l,o=0,f=-1;++f<l;){for(a=o,s=-1;++s<l;){var y=d[f],m=p[y][s],b=i[y][m],x=o,M=o+=b*u;v[m*l+y]={index:y,subindex:m,startAngle:x,endAngle:M,value:b}}_[y]={index:y,startAngle:a,endAngle:o,value:h[y]},o+=c}for(f=-1;++f<l;)for(s=f-1;++s<l;){var T=v[s*l+f],k=v[f*l+s];(T.value||k.value)&&g.push(T.value<k.value?{source:k,target:T}:{source:T,target:k})}return r?g.sort(r):g}return i.padAngle=function(n){return arguments.length?(t=Pi(0,n),i):t},i.sortGroups=function(t){return arguments.length?(n=t,i):n},i.sortSubgroups=function(t){return arguments.length?(e=t,i):e},i.sortChords=function(t){return arguments.length?(null==t?r=null:(r=Di(t))._=t,i):r&&r._},i},Ri=Array.prototype.slice,Li=function(t){return function(){return t}},Yi=Math.PI,Ui=2*Yi,Bi=Ui-1e-6;function Ii(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Oi(){return new Ii}Ii.prototype=Oi.prototype={constructor:Ii,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,e,r){this._+="Q"+ +t+","+ +n+","+(this._x1=+e)+","+(this._y1=+r)},bezierCurveTo:function(t,n,e,r,i,u){this._+="C"+ +t+","+ +n+","+ +e+","+ +r+","+(this._x1=+i)+","+(this._y1=+u)},arcTo:function(t,n,e,r,i){t=+t,n=+n,e=+e,r=+r,i=+i;var u=this._x1,o=this._y1,a=e-t,c=r-n,f=u-t,s=o-n,l=f*f+s*s;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(l>1e-6)if(Math.abs(s*a-c*f)>1e-6&&i){var h=e-u,d=r-o,p=a*a+c*c,g=h*h+d*d,_=Math.sqrt(p),v=Math.sqrt(l),y=i*Math.tan((Yi-Math.acos((p+l-g)/(2*_*v)))/2),m=y/v,b=y/_;Math.abs(m-1)>1e-6&&(this._+="L"+(t+m*f)+","+(n+m*s)),this._+="A"+i+","+i+",0,0,"+ +(s*h>f*d)+","+(this._x1=t+b*a)+","+(this._y1=n+b*c)}else this._+="L"+(this._x1=t)+","+(this._y1=n);else;},arc:function(t,n,e,r,i,u){t=+t,n=+n,u=!!u;var o=(e=+e)*Math.cos(r),a=e*Math.sin(r),c=t+o,f=n+a,s=1^u,l=u?r-i:i-r;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+c+","+f:(Math.abs(this._x1-c)>1e-6||Math.abs(this._y1-f)>1e-6)&&(this._+="L"+c+","+f),e&&(l<0&&(l=l%Ui+Ui),l>Bi?this._+="A"+e+","+e+",0,1,"+s+","+(t-o)+","+(n-a)+"A"+e+","+e+",0,1,"+s+","+(this._x1=c)+","+(this._y1=f):l>1e-6&&(this._+="A"+e+","+e+",0,"+ +(l>=Yi)+","+s+","+(this._x1=t+e*Math.cos(i))+","+(this._y1=n+e*Math.sin(i))))},rect:function(t,n,e,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +e+"v"+ +r+"h"+-e+"Z"},toString:function(){return this._}};var Fi=Oi;function qi(t){return t.source}function Xi(t){return t.target}function ji(t){return t.radius}function Hi(t){return t.startAngle}function Ki(t){return t.endAngle}var Gi=function(){var t=qi,n=Xi,e=ji,r=Hi,i=Ki,u=null;function o(){var o,a=Ri.call(arguments),c=t.apply(this,a),f=n.apply(this,a),s=+e.apply(this,(a[0]=c,a)),l=r.apply(this,a)-Ei,h=i.apply(this,a)-Ei,d=s*Ni(l),p=s*Ci(l),g=+e.apply(this,(a[0]=f,a)),_=r.apply(this,a)-Ei,v=i.apply(this,a)-Ei;if(u||(u=o=Fi()),u.moveTo(d,p),u.arc(0,0,s,l,h),l===_&&h===v||(u.quadraticCurveTo(0,0,g*Ni(_),g*Ci(_)),u.arc(0,0,g,_,v)),u.quadraticCurveTo(0,0,d,p),u.closePath(),o)return u=null,o+""||null}return o.radius=function(t){return arguments.length?(e="function"==typeof t?t:Li(+t),o):e},o.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:Li(+t),o):r},o.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:Li(+t),o):i},o.source=function(n){return arguments.length?(t=n,o):t},o.target=function(t){return arguments.length?(n=t,o):n},o.context=function(t){return arguments.length?(u=null==t?null:t,o):u},o};function Wi(){}function $i(t,n){var e=new Wi;if(t instanceof Wi)t.each((function(t,n){e.set(n,t)}));else if(Array.isArray(t)){var r,i=-1,u=t.length;if(null==n)for(;++i<u;)e.set(i,t[i]);else for(;++i<u;)e.set(n(r=t[i],i,t),r)}else if(t)for(var o in t)e.set(o,t[o]);return e}Wi.prototype=$i.prototype={constructor:Wi,has:function(t){return"$"+t in this},get:function(t){return this["$"+t]},set:function(t,n){return this["$"+t]=n,this},remove:function(t){var n="$"+t;return n in this&&delete this[n]},clear:function(){for(var t in this)"$"===t[0]&&delete this[t]},keys:function(){var t=[];for(var n in this)"$"===n[0]&&t.push(n.slice(1));return t},values:function(){var t=[];for(var n in this)"$"===n[0]&&t.push(this[n]);return t},entries:function(){var t=[];for(var n in this)"$"===n[0]&&t.push({key:n.slice(1),value:this[n]});return t},size:function(){var t=0;for(var n in this)"$"===n[0]&&++t;return t},empty:function(){for(var t in this)if("$"===t[0])return!1;return!0},each:function(t){for(var n in this)"$"===n[0]&&t(this[n],n.slice(1),this)}};var Zi=$i,Qi=function(){var t,n,e,r=[],i=[];function u(e,i,o,a){if(i>=r.length)return null!=t&&e.sort(t),null!=n?n(e):e;for(var c,f,s,l=-1,h=e.length,d=r[i++],p=Zi(),g=o();++l<h;)(s=p.get(c=d(f=e[l])+""))?s.push(f):p.set(c,[f]);return p.each((function(t,n){a(g,n,u(t,i,o,a))})),g}return e={object:function(t){return u(t,0,Ji,tu)},map:function(t){return u(t,0,nu,eu)},entries:function(t){return function t(e,u){if(++u>r.length)return e;var o,a=i[u-1];return null!=n&&u>=r.length?o=e.entries():(o=[],e.each((function(n,e){o.push({key:e,values:t(n,u)})}))),null!=a?o.sort((function(t,n){return a(t.key,n.key)})):o}(u(t,0,nu,eu),0)},key:function(t){return r.push(t),e},sortKeys:function(t){return i[r.length-1]=t,e},sortValues:function(n){return t=n,e},rollup:function(t){return n=t,e}}};function Ji(){return{}}function tu(t,n,e){t[n]=e}function nu(){return Zi()}function eu(t,n,e){t.set(n,e)}function ru(){}var iu=Zi.prototype;function uu(t,n){var e=new ru;if(t instanceof ru)t.each((function(t){e.add(t)}));else if(t){var r=-1,i=t.length;if(null==n)for(;++r<i;)e.add(t[r]);else for(;++r<i;)e.add(n(t[r],r,t))}return e}ru.prototype=uu.prototype={constructor:ru,has:iu.has,add:function(t){return this["$"+(t+="")]=t,this},remove:iu.remove,clear:iu.clear,values:iu.keys,size:iu.size,empty:iu.empty,each:iu.each};var ou=uu,au=function(t){var n=[];for(var e in t)n.push(e);return n},cu=function(t){var n=[];for(var e in t)n.push(t[e]);return n},fu=function(t){var n=[];for(var e in t)n.push({key:e,value:t[e]});return n},su=Math.PI/180,lu=180/Math.PI;function hu(t){if(t instanceof gu)return new gu(t.l,t.a,t.b,t.opacity);if(t instanceof Mu)return Tu(t);t instanceof Wn||(t=Kn(t));var n,e,r=mu(t.r),i=mu(t.g),u=mu(t.b),o=_u((.2225045*r+.7168786*i+.0606169*u)/1);return r===i&&i===u?n=e=o:(n=_u((.4360747*r+.3850649*i+.1430804*u)/.96422),e=_u((.0139322*r+.0971045*i+.7141733*u)/.82521)),new gu(116*o-16,500*(n-o),200*(o-e),t.opacity)}function du(t,n){return new gu(t,0,0,null==n?1:n)}function pu(t,n,e,r){return 1===arguments.length?hu(t):new gu(t,n,e,null==r?1:r)}function gu(t,n,e,r){this.l=+t,this.a=+n,this.b=+e,this.opacity=+r}function _u(t){return t>6/29*(6/29)*(6/29)?Math.pow(t,1/3):t/(6/29*3*(6/29))+4/29}function vu(t){return t>6/29?t*t*t:6/29*3*(6/29)*(t-4/29)}function yu(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function mu(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function bu(t){if(t instanceof Mu)return new Mu(t.h,t.c,t.l,t.opacity);if(t instanceof gu||(t=hu(t)),0===t.a&&0===t.b)return new Mu(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var n=Math.atan2(t.b,t.a)*lu;return new Mu(n<0?n+360:n,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function xu(t,n,e,r){return 1===arguments.length?bu(t):new Mu(e,n,t,null==r?1:r)}function wu(t,n,e,r){return 1===arguments.length?bu(t):new Mu(t,n,e,null==r?1:r)}function Mu(t,n,e,r){this.h=+t,this.c=+n,this.l=+e,this.opacity=+r}function Tu(t){if(isNaN(t.h))return new gu(t.l,0,0,t.opacity);var n=t.h*su;return new gu(t.l,Math.cos(n)*t.c,Math.sin(n)*t.c,t.opacity)}Cn(gu,pu,Sn(En,{brighter:function(t){return new gu(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new gu(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,n=isNaN(this.a)?t:t+this.a/500,e=isNaN(this.b)?t:t-this.b/200;return new Wn(yu(3.1338561*(n=.96422*vu(n))-1.6168667*(t=1*vu(t))-.4906146*(e=.82521*vu(e))),yu(-.9787684*n+1.9161415*t+.033454*e),yu(.0719453*n-.2289914*t+1.4052427*e),this.opacity)}})),Cn(Mu,wu,Sn(En,{brighter:function(t){return new Mu(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new Mu(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return Tu(this).rgb()}}));var ku=-.29227,Au=-1.7884503806,Nu=3.5172982438,Cu=-.6557636667999999;function Su(t){if(t instanceof Vu)return new Vu(t.h,t.s,t.l,t.opacity);t instanceof Wn||(t=Kn(t));var n=t.r/255,e=t.g/255,r=t.b/255,i=(Cu*r+Au*n-Nu*e)/(Cu+Au-Nu),u=r-i,o=(1.97294*(e-i)-ku*u)/-.90649,a=Math.sqrt(o*o+u*u)/(1.97294*i*(1-i)),c=a?Math.atan2(o,u)*lu-120:NaN;return new Vu(c<0?c+360:c,a,i,t.opacity)}function Eu(t,n,e,r){return 1===arguments.length?Su(t):new Vu(t,n,e,null==r?1:r)}function Vu(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}Cn(Vu,Eu,Sn(En,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Vu(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Vu(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*su,n=+this.l,e=isNaN(this.s)?0:this.s*n*(1-n),r=Math.cos(t),i=Math.sin(t);return new Wn(255*(n+e*(-.14861*r+1.78277*i)),255*(n+e*(ku*r+-.90649*i)),255*(n+e*(1.97294*r)),this.opacity)}}));var Pu=Array.prototype.slice,Du=function(t,n){return t-n},zu=function(t){return function(){return t}},Ru=function(t,n){for(var e,r=-1,i=n.length;++r<i;)if(e=Lu(t,n[r]))return e;return 0};function Lu(t,n){for(var e=n[0],r=n[1],i=-1,u=0,o=t.length,a=o-1;u<o;a=u++){var c=t[u],f=c[0],s=c[1],l=t[a],h=l[0],d=l[1];if(Yu(c,l,n))return 0;s>r!=d>r&&e<(h-f)*(r-s)/(d-s)+f&&(i=-i)}return i}function Yu(t,n,e){var r,i,u,o;return function(t,n,e){return(n[0]-t[0])*(e[1]-t[1])==(e[0]-t[0])*(n[1]-t[1])}(t,n,e)&&(i=t[r=+(t[0]===n[0])],u=e[r],o=n[r],i<=u&&u<=o||o<=u&&u<=i)}var Uu=function(){},Bu=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]],Iu=function(){var t=1,n=1,e=S,r=a;function i(t){var n=e(t);if(Array.isArray(n))n=n.slice().sort(Du);else{var r=_(t),i=r[0],o=r[1];n=C(i,o,n),n=w(Math.floor(i/n)*n,Math.floor(o/n)*n,n)}return n.map((function(n){return u(t,n)}))}function u(e,i){var u=[],a=[];return function(e,r,i){var u,a,c,f,s,l,h=new Array,d=new Array;u=a=-1,f=e[0]>=r,Bu[f<<1].forEach(p);for(;++u<t-1;)c=f,f=e[u+1]>=r,Bu[c|f<<1].forEach(p);Bu[f<<0].forEach(p);for(;++a<n-1;){for(u=-1,f=e[a*t+t]>=r,s=e[a*t]>=r,Bu[f<<1|s<<2].forEach(p);++u<t-1;)c=f,f=e[a*t+t+u+1]>=r,l=s,s=e[a*t+u+1]>=r,Bu[c|f<<1|s<<2|l<<3].forEach(p);Bu[f|s<<3].forEach(p)}u=-1,s=e[a*t]>=r,Bu[s<<2].forEach(p);for(;++u<t-1;)l=s,s=e[a*t+u+1]>=r,Bu[s<<2|l<<3].forEach(p);function p(t){var n,e,r=[t[0][0]+u,t[0][1]+a],c=[t[1][0]+u,t[1][1]+a],f=o(r),s=o(c);(n=d[f])?(e=h[s])?(delete d[n.end],delete h[e.start],n===e?(n.ring.push(c),i(n.ring)):h[n.start]=d[e.end]={start:n.start,end:e.end,ring:n.ring.concat(e.ring)}):(delete d[n.end],n.ring.push(c),d[n.end=s]=n):(n=h[s])?(e=d[f])?(delete h[n.start],delete d[e.end],n===e?(n.ring.push(c),i(n.ring)):h[e.start]=d[n.end]={start:e.start,end:n.end,ring:e.ring.concat(n.ring)}):(delete h[n.start],n.ring.unshift(r),h[n.start=f]=n):h[f]=d[s]={start:f,end:s,ring:[r,c]}}Bu[s<<3].forEach(p)}(e,i,(function(t){r(t,e,i),function(t){for(var n=0,e=t.length,r=t[e-1][1]*t[0][0]-t[e-1][0]*t[0][1];++n<e;)r+=t[n-1][1]*t[n][0]-t[n-1][0]*t[n][1];return r}(t)>0?u.push([t]):a.push(t)})),a.forEach((function(t){for(var n,e=0,r=u.length;e<r;++e)if(-1!==Ru((n=u[e])[0],t))return void n.push(t)})),{type:"MultiPolygon",value:i,coordinates:u}}function o(n){return 2*n[0]+n[1]*(t+1)*4}function a(e,r,i){e.forEach((function(e){var u,o=e[0],a=e[1],c=0|o,f=0|a,s=r[f*t+c];o>0&&o<t&&c===o&&(u=r[f*t+c-1],e[0]=o+(i-u)/(s-u)-.5),a>0&&a<n&&f===a&&(u=r[(f-1)*t+c],e[1]=a+(i-u)/(s-u)-.5)}))}return i.contour=u,i.size=function(e){if(!arguments.length)return[t,n];var r=Math.ceil(e[0]),u=Math.ceil(e[1]);if(!(r>0&&u>0))throw new Error("invalid size");return t=r,n=u,i},i.thresholds=function(t){return arguments.length?(e="function"==typeof t?t:Array.isArray(t)?zu(Pu.call(t)):zu(t),i):e},i.smooth=function(t){return arguments.length?(r=t?a:Uu,i):r===a},i};function Ou(t,n,e){for(var r=t.width,i=t.height,u=1+(e<<1),o=0;o<i;++o)for(var a=0,c=0;a<r+e;++a)a<r&&(c+=t.data[a+o*r]),a>=e&&(a>=u&&(c-=t.data[a-u+o*r]),n.data[a-e+o*r]=c/Math.min(a+1,r-1+u-a,u))}function Fu(t,n,e){for(var r=t.width,i=t.height,u=1+(e<<1),o=0;o<r;++o)for(var a=0,c=0;a<i+e;++a)a<i&&(c+=t.data[o+a*r]),a>=e&&(a>=u&&(c-=t.data[o+(a-u)*r]),n.data[o+(a-e)*r]=c/Math.min(a+1,i-1+u-a,u))}function qu(t){return t[0]}function Xu(t){return t[1]}function ju(){return 1}var Hu=function(){var t=qu,n=Xu,e=ju,r=960,i=500,u=20,o=2,a=3*u,c=r+2*a>>o,f=i+2*a>>o,s=zu(20);function l(r){var i=new Float32Array(c*f),l=new Float32Array(c*f);r.forEach((function(r,u,s){var l=+t(r,u,s)+a>>o,h=+n(r,u,s)+a>>o,d=+e(r,u,s);l>=0&&l<c&&h>=0&&h<f&&(i[l+h*c]+=d)})),Ou({width:c,height:f,data:i},{width:c,height:f,data:l},u>>o),Fu({width:c,height:f,data:l},{width:c,height:f,data:i},u>>o),Ou({width:c,height:f,data:i},{width:c,height:f,data:l},u>>o),Fu({width:c,height:f,data:l},{width:c,height:f,data:i},u>>o),Ou({width:c,height:f,data:i},{width:c,height:f,data:l},u>>o),Fu({width:c,height:f,data:l},{width:c,height:f,data:i},u>>o);var d=s(i);if(!Array.isArray(d)){var p=z(i);d=C(0,p,d),(d=w(0,Math.floor(p/d)*d,d)).shift()}return Iu().thresholds(d).size([c,f])(i).map(h)}function h(t){return t.value*=Math.pow(2,-2*o),t.coordinates.forEach(d),t}function d(t){t.forEach(p)}function p(t){t.forEach(g)}function g(t){t[0]=t[0]*Math.pow(2,o)-a,t[1]=t[1]*Math.pow(2,o)-a}function _(){return c=r+2*(a=3*u)>>o,f=i+2*a>>o,l}return l.x=function(n){return arguments.length?(t="function"==typeof n?n:zu(+n),l):t},l.y=function(t){return arguments.length?(n="function"==typeof t?t:zu(+t),l):n},l.weight=function(t){return arguments.length?(e="function"==typeof t?t:zu(+t),l):e},l.size=function(t){if(!arguments.length)return[r,i];var n=Math.ceil(t[0]),e=Math.ceil(t[1]);if(!(n>=0||n>=0))throw new Error("invalid size");return r=n,i=e,_()},l.cellSize=function(t){if(!arguments.length)return 1<<o;if(!((t=+t)>=1))throw new Error("invalid cell size");return o=Math.floor(Math.log(t)/Math.LN2),_()},l.thresholds=function(t){return arguments.length?(s="function"==typeof t?t:Array.isArray(t)?zu(Pu.call(t)):zu(t),l):s},l.bandwidth=function(t){if(!arguments.length)return Math.sqrt(u*(u+1));if(!((t=+t)>=0))throw new Error("invalid bandwidth");return u=Math.round((Math.sqrt(4*t*t+1)-1)/2),_()},l},Ku=function(t){return function(){return t}};function Gu(t,n,e,r,i,u,o,a,c,f){this.target=t,this.type=n,this.subject=e,this.identifier=r,this.active=i,this.x=u,this.y=o,this.dx=a,this.dy=c,this._=f}function Wu(){return!fn.ctrlKey&&!fn.button}function $u(){return this.parentNode}function Zu(t){return null==t?{x:fn.x,y:fn.y}:t}function Qu(){return navigator.maxTouchPoints||"ontouchstart"in this}Gu.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var Ju=function(){var t,n,e,r,i=Wu,u=$u,o=Zu,a=Qu,c={},f=st("start","drag","end"),s=0,l=0;function h(t){t.on("mousedown.drag",d).filter(a).on("touchstart.drag",_).on("touchmove.drag",v).on("touchend.drag touchcancel.drag",y).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function d(){if(!r&&i.apply(this,arguments)){var o=m("mouse",u.apply(this,arguments),Pe,this,arguments);o&&(Mn(fn.view).on("mousemove.drag",p,!0).on("mouseup.drag",g,!0),An(fn.view),Tn(),e=!1,t=fn.clientX,n=fn.clientY,o("start"))}}function p(){if(kn(),!e){var r=fn.clientX-t,i=fn.clientY-n;e=r*r+i*i>l}c.mouse("drag")}function g(){Mn(fn.view).on("mousemove.drag mouseup.drag",null),Nn(fn.view,e),kn(),c.mouse("end")}function _(){if(i.apply(this,arguments)){var t,n,e=fn.changedTouches,r=u.apply(this,arguments),o=e.length;for(t=0;t<o;++t)(n=m(e[t].identifier,r,Ve,this,arguments))&&(Tn(),n("start"))}}function v(){var t,n,e=fn.changedTouches,r=e.length;for(t=0;t<r;++t)(n=c[e[t].identifier])&&(kn(),n("drag"))}function y(){var t,n,e=fn.changedTouches,i=e.length;for(r&&clearTimeout(r),r=setTimeout((function(){r=null}),500),t=0;t<i;++t)(n=c[e[t].identifier])&&(Tn(),n("end"))}function m(t,n,e,r,i){var u,a,l,d=e(n,t),p=f.copy();if(gn(new Gu(h,"beforestart",u,t,s,d[0],d[1],0,0,p),(function(){return null!=(fn.subject=u=o.apply(r,i))&&(a=u.x-d[0]||0,l=u.y-d[1]||0,!0)})))return function o(f){var g,_=d;switch(f){case"start":c[t]=o,g=s++;break;case"end":delete c[t],--s;case"drag":d=e(n,t),g=s}gn(new Gu(h,f,u,t,g,d[0]+a,d[1]+l,d[0]-_[0],d[1]-_[1],p),p.apply,p,[f,r,i])}}return h.filter=function(t){return arguments.length?(i="function"==typeof t?t:Ku(!!t),h):i},h.container=function(t){return arguments.length?(u="function"==typeof t?t:Ku(t),h):u},h.subject=function(t){return arguments.length?(o="function"==typeof t?t:Ku(t),h):o},h.touchable=function(t){return arguments.length?(a="function"==typeof t?t:Ku(!!t),h):a},h.on=function(){var t=f.on.apply(f,arguments);return t===f?h:t},h.clickDistance=function(t){return arguments.length?(l=(t=+t)*t,h):Math.sqrt(l)},h},to={},no={};function eo(t){return new Function("d","return {"+t.map((function(t,n){return JSON.stringify(t)+": d["+n+\'] || ""\'})).join(",")+"}")}function ro(t){var n=Object.create(null),e=[];return t.forEach((function(t){for(var r in t)r in n||e.push(n[r]=r)})),e}function io(t,n){var e=t+"",r=e.length;return r<n?new Array(n-r+1).join(0)+e:e}function uo(t){var n,e=t.getUTCHours(),r=t.getUTCMinutes(),i=t.getUTCSeconds(),u=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((n=t.getUTCFullYear())<0?"-"+io(-n,6):n>9999?"+"+io(n,6):io(n,4))+"-"+io(t.getUTCMonth()+1,2)+"-"+io(t.getUTCDate(),2)+(u?"T"+io(e,2)+":"+io(r,2)+":"+io(i,2)+"."+io(u,3)+"Z":i?"T"+io(e,2)+":"+io(r,2)+":"+io(i,2)+"Z":r||e?"T"+io(e,2)+":"+io(r,2)+"Z":"")}var oo=function(t){var n=new RegExp(\'["\'+t+"\\n\\r]"),e=t.charCodeAt(0);function r(t,n){var r,i=[],u=t.length,o=0,a=0,c=u<=0,f=!1;function s(){if(c)return no;if(f)return f=!1,to;var n,r,i=o;if(34===t.charCodeAt(i)){for(;o++<u&&34!==t.charCodeAt(o)||34===t.charCodeAt(++o););return(n=o)>=u?c=!0:10===(r=t.charCodeAt(o++))?f=!0:13===r&&(f=!0,10===t.charCodeAt(o)&&++o),t.slice(i+1,n-1).replace(/""/g,\'"\')}for(;o<u;){if(10===(r=t.charCodeAt(n=o++)))f=!0;else if(13===r)f=!0,10===t.charCodeAt(o)&&++o;else if(r!==e)continue;return t.slice(i,n)}return c=!0,t.slice(i,u)}for(10===t.charCodeAt(u-1)&&--u,13===t.charCodeAt(u-1)&&--u;(r=s())!==no;){for(var l=[];r!==to&&r!==no;)l.push(r),r=s();n&&null==(l=n(l,a++))||i.push(l)}return i}function i(n,e){return n.map((function(n){return e.map((function(t){return o(n[t])})).join(t)}))}function u(n){return n.map(o).join(t)}function o(t){return null==t?"":t instanceof Date?uo(t):n.test(t+="")?\'"\'+t.replace(/"/g,\'""\')+\'"\':t}return{parse:function(t,n){var e,i,u=r(t,(function(t,r){if(e)return e(t,r-1);i=t,e=n?function(t,n){var e=eo(t);return function(r,i){return n(e(r),i,t)}}(t,n):eo(t)}));return u.columns=i||[],u},parseRows:r,format:function(n,e){return null==e&&(e=ro(n)),[e.map(o).join(t)].concat(i(n,e)).join("\\n")},formatBody:function(t,n){return null==n&&(n=ro(t)),i(t,n).join("\\n")},formatRows:function(t){return t.map(u).join("\\n")},formatRow:u,formatValue:o}},ao=oo(","),co=ao.parse,fo=ao.parseRows,so=ao.format,lo=ao.formatBody,ho=ao.formatRows,po=ao.formatRow,go=ao.formatValue,_o=oo("\\t"),vo=_o.parse,yo=_o.parseRows,mo=_o.format,bo=_o.formatBody,xo=_o.formatRows,wo=_o.formatRow,Mo=_o.formatValue;function To(t){for(var n in t){var e,r,i=t[n].trim();if(i)if("true"===i)i=!0;else if("false"===i)i=!1;else if("NaN"===i)i=NaN;else if(isNaN(e=+i)){if(!(r=i.match(/^([-+]\\d{2})?\\d{4}(-\\d{2}(-\\d{2})?)?(T\\d{2}:\\d{2}(:\\d{2}(\\.\\d{3})?)?(Z|[-+]\\d{2}:\\d{2})?)?$/)))continue;ko&&r[4]&&!r[7]&&(i=i.replace(/-/g,"/").replace(/T/," ")),i=new Date(i)}else i=e;else i=null;t[n]=i}return t}var ko=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();function Ao(t){return+t}function No(t){return t*t}function Co(t){return t*(2-t)}function So(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}var Eo=function t(n){function e(t){return Math.pow(t,n)}return n=+n,e.exponent=t,e}(3),Vo=function t(n){function e(t){return 1-Math.pow(1-t,n)}return n=+n,e.exponent=t,e}(3),Po=function t(n){function e(t){return((t*=2)<=1?Math.pow(t,n):2-Math.pow(2-t,n))/2}return n=+n,e.exponent=t,e}(3),Do=Math.PI,zo=Do/2;function Ro(t){return 1-Math.cos(t*zo)}function Lo(t){return Math.sin(t*zo)}function Yo(t){return(1-Math.cos(Do*t))/2}function Uo(t){return Math.pow(2,10*t-10)}function Bo(t){return 1-Math.pow(2,-10*t)}function Io(t){return((t*=2)<=1?Math.pow(2,10*t-10):2-Math.pow(2,10-10*t))/2}function Oo(t){return 1-Math.sqrt(1-t*t)}function Fo(t){return Math.sqrt(1- --t*t)}function qo(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}function Xo(t){return 1-jo(1-t)}function jo(t){return(t=+t)<4/11?7.5625*t*t:t<8/11?7.5625*(t-=6/11)*t+.75:t<10/11?7.5625*(t-=9/11)*t+.9375:7.5625*(t-=21/22)*t+63/64}function Ho(t){return((t*=2)<=1?1-jo(1-t):jo(t-1)+1)/2}var Ko=function t(n){function e(t){return t*t*((n+1)*t-n)}return n=+n,e.overshoot=t,e}(1.70158),Go=function t(n){function e(t){return--t*t*((n+1)*t+n)+1}return n=+n,e.overshoot=t,e}(1.70158),Wo=function t(n){function e(t){return((t*=2)<1?t*t*((n+1)*t-n):(t-=2)*t*((n+1)*t+n)+2)/2}return n=+n,e.overshoot=t,e}(1.70158),$o=2*Math.PI,Zo=function t(n,e){var r=Math.asin(1/(n=Math.max(1,n)))*(e/=$o);function i(t){return n*Math.pow(2,10*--t)*Math.sin((r-t)/e)}return i.amplitude=function(n){return t(n,e*$o)},i.period=function(e){return t(n,e)},i}(1,.3),Qo=function t(n,e){var r=Math.asin(1/(n=Math.max(1,n)))*(e/=$o);function i(t){return 1-n*Math.pow(2,-10*(t=+t))*Math.sin((t+r)/e)}return i.amplitude=function(n){return t(n,e*$o)},i.period=function(e){return t(n,e)},i}(1,.3),Jo=function t(n,e){var r=Math.asin(1/(n=Math.max(1,n)))*(e/=$o);function i(t){return((t=2*t-1)<0?n*Math.pow(2,10*t)*Math.sin((r-t)/e):2-n*Math.pow(2,-10*t)*Math.sin((r+t)/e))/2}return i.amplitude=function(n){return t(n,e*$o)},i.period=function(e){return t(n,e)},i}(1,.3);function ta(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.blob()}var na=function(t,n){return fetch(t,n).then(ta)};function ea(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.arrayBuffer()}var ra=function(t,n){return fetch(t,n).then(ea)};function ia(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}var ua=function(t,n){return fetch(t,n).then(ia)};function oa(t){return function(n,e,r){return 2===arguments.length&&"function"==typeof e&&(r=e,e=void 0),ua(n,e).then((function(n){return t(n,r)}))}}function aa(t,n,e,r){3===arguments.length&&"function"==typeof e&&(r=e,e=void 0);var i=oo(t);return ua(n,e).then((function(t){return i.parse(t,r)}))}var ca=oa(co),fa=oa(vo),sa=function(t,n){return new Promise((function(e,r){var i=new Image;for(var u in n)i[u]=n[u];i.onerror=r,i.onload=function(){e(i)},i.src=t}))};function la(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.json()}var ha=function(t,n){return fetch(t,n).then(la)};function da(t){return function(n,e){return ua(n,e).then((function(n){return(new DOMParser).parseFromString(n,t)}))}}var pa=da("application/xml"),ga=da("text/html"),_a=da("image/svg+xml"),va=function(t,n){var e;function r(){var r,i,u=e.length,o=0,a=0;for(r=0;r<u;++r)o+=(i=e[r]).x,a+=i.y;for(o=o/u-t,a=a/u-n,r=0;r<u;++r)(i=e[r]).x-=o,i.y-=a}return null==t&&(t=0),null==n&&(n=0),r.initialize=function(t){e=t},r.x=function(n){return arguments.length?(t=+n,r):t},r.y=function(t){return arguments.length?(n=+t,r):n},r},ya=function(t){return function(){return t}},ma=function(){return 1e-6*(Math.random()-.5)};function ba(t,n,e,r){if(isNaN(n)||isNaN(e))return t;var i,u,o,a,c,f,s,l,h,d=t._root,p={data:r},g=t._x0,_=t._y0,v=t._x1,y=t._y1;if(!d)return t._root=p,t;for(;d.length;)if((f=n>=(u=(g+v)/2))?g=u:v=u,(s=e>=(o=(_+y)/2))?_=o:y=o,i=d,!(d=d[l=s<<1|f]))return i[l]=p,t;if(a=+t._x.call(null,d.data),c=+t._y.call(null,d.data),n===a&&e===c)return p.next=d,i?i[l]=p:t._root=p,t;do{i=i?i[l]=new Array(4):t._root=new Array(4),(f=n>=(u=(g+v)/2))?g=u:v=u,(s=e>=(o=(_+y)/2))?_=o:y=o}while((l=s<<1|f)==(h=(c>=o)<<1|a>=u));return i[h]=d,i[l]=p,t}var xa=function(t,n,e,r,i){this.node=t,this.x0=n,this.y0=e,this.x1=r,this.y1=i};function wa(t){return t[0]}function Ma(t){return t[1]}function Ta(t,n,e){var r=new ka(null==n?wa:n,null==e?Ma:e,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function ka(t,n,e,r,i,u){this._x=t,this._y=n,this._x0=e,this._y0=r,this._x1=i,this._y1=u,this._root=void 0}function Aa(t){for(var n={data:t.data},e=n;t=t.next;)e=e.next={data:t.data};return n}var Na=Ta.prototype=ka.prototype;function Ca(t){return t.x+t.vx}function Sa(t){return t.y+t.vy}Na.copy=function(){var t,n,e=new ka(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return e;if(!r.length)return e._root=Aa(r),e;for(t=[{source:r,target:e._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(n=r.source[i])&&(n.length?t.push({source:n,target:r.target[i]=new Array(4)}):r.target[i]=Aa(n));return e},Na.add=function(t){var n=+this._x.call(null,t),e=+this._y.call(null,t);return ba(this.cover(n,e),n,e,t)},Na.addAll=function(t){var n,e,r,i,u=t.length,o=new Array(u),a=new Array(u),c=1/0,f=1/0,s=-1/0,l=-1/0;for(e=0;e<u;++e)isNaN(r=+this._x.call(null,n=t[e]))||isNaN(i=+this._y.call(null,n))||(o[e]=r,a[e]=i,r<c&&(c=r),r>s&&(s=r),i<f&&(f=i),i>l&&(l=i));if(c>s||f>l)return this;for(this.cover(c,f).cover(s,l),e=0;e<u;++e)ba(this,o[e],a[e],t[e]);return this},Na.cover=function(t,n){if(isNaN(t=+t)||isNaN(n=+n))return this;var e=this._x0,r=this._y0,i=this._x1,u=this._y1;if(isNaN(e))i=(e=Math.floor(t))+1,u=(r=Math.floor(n))+1;else{for(var o,a,c=i-e,f=this._root;e>t||t>=i||r>n||n>=u;)switch(a=(n<r)<<1|t<e,(o=new Array(4))[a]=f,f=o,c*=2,a){case 0:i=e+c,u=r+c;break;case 1:e=i-c,u=r+c;break;case 2:i=e+c,r=u-c;break;case 3:e=i-c,r=u-c}this._root&&this._root.length&&(this._root=f)}return this._x0=e,this._y0=r,this._x1=i,this._y1=u,this},Na.data=function(){var t=[];return this.visit((function(n){if(!n.length)do{t.push(n.data)}while(n=n.next)})),t},Na.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},Na.find=function(t,n,e){var r,i,u,o,a,c,f,s=this._x0,l=this._y0,h=this._x1,d=this._y1,p=[],g=this._root;for(g&&p.push(new xa(g,s,l,h,d)),null==e?e=1/0:(s=t-e,l=n-e,h=t+e,d=n+e,e*=e);c=p.pop();)if(!(!(g=c.node)||(i=c.x0)>h||(u=c.y0)>d||(o=c.x1)<s||(a=c.y1)<l))if(g.length){var _=(i+o)/2,v=(u+a)/2;p.push(new xa(g[3],_,v,o,a),new xa(g[2],i,v,_,a),new xa(g[1],_,u,o,v),new xa(g[0],i,u,_,v)),(f=(n>=v)<<1|t>=_)&&(c=p[p.length-1],p[p.length-1]=p[p.length-1-f],p[p.length-1-f]=c)}else{var y=t-+this._x.call(null,g.data),m=n-+this._y.call(null,g.data),b=y*y+m*m;if(b<e){var x=Math.sqrt(e=b);s=t-x,l=n-x,h=t+x,d=n+x,r=g.data}}return r},Na.remove=function(t){if(isNaN(u=+this._x.call(null,t))||isNaN(o=+this._y.call(null,t)))return this;var n,e,r,i,u,o,a,c,f,s,l,h,d=this._root,p=this._x0,g=this._y0,_=this._x1,v=this._y1;if(!d)return this;if(d.length)for(;;){if((f=u>=(a=(p+_)/2))?p=a:_=a,(s=o>=(c=(g+v)/2))?g=c:v=c,n=d,!(d=d[l=s<<1|f]))return this;if(!d.length)break;(n[l+1&3]||n[l+2&3]||n[l+3&3])&&(e=n,h=l)}for(;d.data!==t;)if(r=d,!(d=d.next))return this;return(i=d.next)&&delete d.next,r?(i?r.next=i:delete r.next,this):n?(i?n[l]=i:delete n[l],(d=n[0]||n[1]||n[2]||n[3])&&d===(n[3]||n[2]||n[1]||n[0])&&!d.length&&(e?e[h]=d:this._root=d),this):(this._root=i,this)},Na.removeAll=function(t){for(var n=0,e=t.length;n<e;++n)this.remove(t[n]);return this},Na.root=function(){return this._root},Na.size=function(){var t=0;return this.visit((function(n){if(!n.length)do{++t}while(n=n.next)})),t},Na.visit=function(t){var n,e,r,i,u,o,a=[],c=this._root;for(c&&a.push(new xa(c,this._x0,this._y0,this._x1,this._y1));n=a.pop();)if(!t(c=n.node,r=n.x0,i=n.y0,u=n.x1,o=n.y1)&&c.length){var f=(r+u)/2,s=(i+o)/2;(e=c[3])&&a.push(new xa(e,f,s,u,o)),(e=c[2])&&a.push(new xa(e,r,s,f,o)),(e=c[1])&&a.push(new xa(e,f,i,u,s)),(e=c[0])&&a.push(new xa(e,r,i,f,s))}return this},Na.visitAfter=function(t){var n,e=[],r=[];for(this._root&&e.push(new xa(this._root,this._x0,this._y0,this._x1,this._y1));n=e.pop();){var i=n.node;if(i.length){var u,o=n.x0,a=n.y0,c=n.x1,f=n.y1,s=(o+c)/2,l=(a+f)/2;(u=i[0])&&e.push(new xa(u,o,a,s,l)),(u=i[1])&&e.push(new xa(u,s,a,c,l)),(u=i[2])&&e.push(new xa(u,o,l,s,f)),(u=i[3])&&e.push(new xa(u,s,l,c,f))}r.push(n)}for(;n=r.pop();)t(n.node,n.x0,n.y0,n.x1,n.y1);return this},Na.x=function(t){return arguments.length?(this._x=t,this):this._x},Na.y=function(t){return arguments.length?(this._y=t,this):this._y};var Ea=function(t){var n,e,r=1,i=1;function u(){for(var t,u,a,c,f,s,l,h=n.length,d=0;d<i;++d)for(u=Ta(n,Ca,Sa).visitAfter(o),t=0;t<h;++t)a=n[t],s=e[a.index],l=s*s,c=a.x+a.vx,f=a.y+a.vy,u.visit(p);function p(t,n,e,i,u){var o=t.data,h=t.r,d=s+h;if(!o)return n>c+d||i<c-d||e>f+d||u<f-d;if(o.index>a.index){var p=c-o.x-o.vx,g=f-o.y-o.vy,_=p*p+g*g;_<d*d&&(0===p&&(_+=(p=ma())*p),0===g&&(_+=(g=ma())*g),_=(d-(_=Math.sqrt(_)))/_*r,a.vx+=(p*=_)*(d=(h*=h)/(l+h)),a.vy+=(g*=_)*d,o.vx-=p*(d=1-d),o.vy-=g*d)}}}function o(t){if(t.data)return t.r=e[t.data.index];for(var n=t.r=0;n<4;++n)t[n]&&t[n].r>t.r&&(t.r=t[n].r)}function a(){if(n){var r,i,u=n.length;for(e=new Array(u),r=0;r<u;++r)i=n[r],e[i.index]=+t(i,r,n)}}return"function"!=typeof t&&(t=ya(null==t?1:+t)),u.initialize=function(t){n=t,a()},u.iterations=function(t){return arguments.length?(i=+t,u):i},u.strength=function(t){return arguments.length?(r=+t,u):r},u.radius=function(n){return arguments.length?(t="function"==typeof n?n:ya(+n),a(),u):t},u};function Va(t){return t.index}function Pa(t,n){var e=t.get(n);if(!e)throw new Error("missing: "+n);return e}var Da=function(t){var n,e,r,i,u,o=Va,a=function(t){return 1/Math.min(i[t.source.index],i[t.target.index])},c=ya(30),f=1;function s(r){for(var i=0,o=t.length;i<f;++i)for(var a,c,s,l,h,d,p,g=0;g<o;++g)c=(a=t[g]).source,l=(s=a.target).x+s.vx-c.x-c.vx||ma(),h=s.y+s.vy-c.y-c.vy||ma(),l*=d=((d=Math.sqrt(l*l+h*h))-e[g])/d*r*n[g],h*=d,s.vx-=l*(p=u[g]),s.vy-=h*p,c.vx+=l*(p=1-p),c.vy+=h*p}function l(){if(r){var a,c,f=r.length,s=t.length,l=Zi(r,o);for(a=0,i=new Array(f);a<s;++a)(c=t[a]).index=a,"object"!=typeof c.source&&(c.source=Pa(l,c.source)),"object"!=typeof c.target&&(c.target=Pa(l,c.target)),i[c.source.index]=(i[c.source.index]||0)+1,i[c.target.index]=(i[c.target.index]||0)+1;for(a=0,u=new Array(s);a<s;++a)c=t[a],u[a]=i[c.source.index]/(i[c.source.index]+i[c.target.index]);n=new Array(s),h(),e=new Array(s),d()}}function h(){if(r)for(var e=0,i=t.length;e<i;++e)n[e]=+a(t[e],e,t)}function d(){if(r)for(var n=0,i=t.length;n<i;++n)e[n]=+c(t[n],n,t)}return null==t&&(t=[]),s.initialize=function(t){r=t,l()},s.links=function(n){return arguments.length?(t=n,l(),s):t},s.id=function(t){return arguments.length?(o=t,s):o},s.iterations=function(t){return arguments.length?(f=+t,s):f},s.strength=function(t){return arguments.length?(a="function"==typeof t?t:ya(+t),h(),s):a},s.distance=function(t){return arguments.length?(c="function"==typeof t?t:ya(+t),d(),s):c},s};function za(t){return t.x}function Ra(t){return t.y}var La=Math.PI*(3-Math.sqrt(5)),Ya=function(t){var n,e=1,r=.001,i=1-Math.pow(r,1/300),u=0,o=.6,a=Zi(),c=Xe(s),f=st("tick","end");function s(){l(),f.call("tick",n),e<r&&(c.stop(),f.call("end",n))}function l(r){var c,f,s=t.length;void 0===r&&(r=1);for(var l=0;l<r;++l)for(e+=(u-e)*i,a.each((function(t){t(e)})),c=0;c<s;++c)null==(f=t[c]).fx?f.x+=f.vx*=o:(f.x=f.fx,f.vx=0),null==f.fy?f.y+=f.vy*=o:(f.y=f.fy,f.vy=0);return n}function h(){for(var n,e=0,r=t.length;e<r;++e){if((n=t[e]).index=e,null!=n.fx&&(n.x=n.fx),null!=n.fy&&(n.y=n.fy),isNaN(n.x)||isNaN(n.y)){var i=10*Math.sqrt(e),u=e*La;n.x=i*Math.cos(u),n.y=i*Math.sin(u)}(isNaN(n.vx)||isNaN(n.vy))&&(n.vx=n.vy=0)}}function d(n){return n.initialize&&n.initialize(t),n}return null==t&&(t=[]),h(),n={tick:l,restart:function(){return c.restart(s),n},stop:function(){return c.stop(),n},nodes:function(e){return arguments.length?(t=e,h(),a.each(d),n):t},alpha:function(t){return arguments.length?(e=+t,n):e},alphaMin:function(t){return arguments.length?(r=+t,n):r},alphaDecay:function(t){return arguments.length?(i=+t,n):+i},alphaTarget:function(t){return arguments.length?(u=+t,n):u},velocityDecay:function(t){return arguments.length?(o=1-t,n):1-o},force:function(t,e){return arguments.length>1?(null==e?a.remove(t):a.set(t,d(e)),n):a.get(t)},find:function(n,e,r){var i,u,o,a,c,f=0,s=t.length;for(null==r?r=1/0:r*=r,f=0;f<s;++f)(o=(i=n-(a=t[f]).x)*i+(u=e-a.y)*u)<r&&(c=a,r=o);return c},on:function(t,e){return arguments.length>1?(f.on(t,e),n):f.on(t)}}},Ua=function(){var t,n,e,r,i=ya(-30),u=1,o=1/0,a=.81;function c(r){var i,u=t.length,o=Ta(t,za,Ra).visitAfter(s);for(e=r,i=0;i<u;++i)n=t[i],o.visit(l)}function f(){if(t){var n,e,u=t.length;for(r=new Array(u),n=0;n<u;++n)e=t[n],r[e.index]=+i(e,n,t)}}function s(t){var n,e,i,u,o,a=0,c=0;if(t.length){for(i=u=o=0;o<4;++o)(n=t[o])&&(e=Math.abs(n.value))&&(a+=n.value,c+=e,i+=e*n.x,u+=e*n.y);t.x=i/c,t.y=u/c}else{(n=t).x=n.data.x,n.y=n.data.y;do{a+=r[n.data.index]}while(n=n.next)}t.value=a}function l(t,i,c,f){if(!t.value)return!0;var s=t.x-n.x,l=t.y-n.y,h=f-i,d=s*s+l*l;if(h*h/a<d)return d<o&&(0===s&&(d+=(s=ma())*s),0===l&&(d+=(l=ma())*l),d<u&&(d=Math.sqrt(u*d)),n.vx+=s*t.value*e/d,n.vy+=l*t.value*e/d),!0;if(!(t.length||d>=o)){(t.data!==n||t.next)&&(0===s&&(d+=(s=ma())*s),0===l&&(d+=(l=ma())*l),d<u&&(d=Math.sqrt(u*d)));do{t.data!==n&&(h=r[t.data.index]*e/d,n.vx+=s*h,n.vy+=l*h)}while(t=t.next)}}return c.initialize=function(n){t=n,f()},c.strength=function(t){return arguments.length?(i="function"==typeof t?t:ya(+t),f(),c):i},c.distanceMin=function(t){return arguments.length?(u=t*t,c):Math.sqrt(u)},c.distanceMax=function(t){return arguments.length?(o=t*t,c):Math.sqrt(o)},c.theta=function(t){return arguments.length?(a=t*t,c):Math.sqrt(a)},c},Ba=function(t,n,e){var r,i,u,o=ya(.1);function a(t){for(var o=0,a=r.length;o<a;++o){var c=r[o],f=c.x-n||1e-6,s=c.y-e||1e-6,l=Math.sqrt(f*f+s*s),h=(u[o]-l)*i[o]*t/l;c.vx+=f*h,c.vy+=s*h}}function c(){if(r){var n,e=r.length;for(i=new Array(e),u=new Array(e),n=0;n<e;++n)u[n]=+t(r[n],n,r),i[n]=isNaN(u[n])?0:+o(r[n],n,r)}}return"function"!=typeof t&&(t=ya(+t)),null==n&&(n=0),null==e&&(e=0),a.initialize=function(t){r=t,c()},a.strength=function(t){return arguments.length?(o="function"==typeof t?t:ya(+t),c(),a):o},a.radius=function(n){return arguments.length?(t="function"==typeof n?n:ya(+n),c(),a):t},a.x=function(t){return arguments.length?(n=+t,a):n},a.y=function(t){return arguments.length?(e=+t,a):e},a},Ia=function(t){var n,e,r,i=ya(.1);function u(t){for(var i,u=0,o=n.length;u<o;++u)(i=n[u]).vx+=(r[u]-i.x)*e[u]*t}function o(){if(n){var u,o=n.length;for(e=new Array(o),r=new Array(o),u=0;u<o;++u)e[u]=isNaN(r[u]=+t(n[u],u,n))?0:+i(n[u],u,n)}}return"function"!=typeof t&&(t=ya(null==t?0:+t)),u.initialize=function(t){n=t,o()},u.strength=function(t){return arguments.length?(i="function"==typeof t?t:ya(+t),o(),u):i},u.x=function(n){return arguments.length?(t="function"==typeof n?n:ya(+n),o(),u):t},u},Oa=function(t){var n,e,r,i=ya(.1);function u(t){for(var i,u=0,o=n.length;u<o;++u)(i=n[u]).vy+=(r[u]-i.y)*e[u]*t}function o(){if(n){var u,o=n.length;for(e=new Array(o),r=new Array(o),u=0;u<o;++u)e[u]=isNaN(r[u]=+t(n[u],u,n))?0:+i(n[u],u,n)}}return"function"!=typeof t&&(t=ya(null==t?0:+t)),u.initialize=function(t){n=t,o()},u.strength=function(t){return arguments.length?(i="function"==typeof t?t:ya(+t),o(),u):i},u.y=function(n){return arguments.length?(t="function"==typeof n?n:ya(+n),o(),u):t},u},Fa=function(t,n){if((e=(t=n?t.toExponential(n-1):t.toExponential()).indexOf("e"))<0)return null;var e,r=t.slice(0,e);return[r.length>1?r[0]+r.slice(2):r,+t.slice(e+1)]},qa=function(t){return(t=Fa(Math.abs(t)))?t[1]:NaN},Xa=/^(?:(.)?([<>=^]))?([+\\-( ])?([$#])?(0)?(\\d+)?(,)?(\\.\\d+)?(~)?([a-z%])?$/i;function ja(t){if(!(n=Xa.exec(t)))throw new Error("invalid format: "+t);var n;return new Ha({fill:n[1],align:n[2],sign:n[3],symbol:n[4],zero:n[5],width:n[6],comma:n[7],precision:n[8]&&n[8].slice(1),trim:n[9],type:n[10]})}function Ha(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}ja.prototype=Ha.prototype,Ha.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Ka,Ga,Wa,$a,Za=function(t,n){var e=Fa(t,n);if(!e)return t+"";var r=e[0],i=e[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")},Qa={"%":function(t,n){return(100*t).toFixed(n)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,n){return t.toExponential(n)},f:function(t,n){return t.toFixed(n)},g:function(t,n){return t.toPrecision(n)},o:function(t){return Math.round(t).toString(8)},p:function(t,n){return Za(100*t,n)},r:Za,s:function(t,n){var e=Fa(t,n);if(!e)return t+"";var r=e[0],i=e[1],u=i-(Ka=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=r.length;return u===o?r:u>o?r+new Array(u-o+1).join("0"):u>0?r.slice(0,u)+"."+r.slice(u):"0."+new Array(1-u).join("0")+Fa(t,Math.max(0,n+u-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}},Ja=function(t){return t},tc=Array.prototype.map,nc=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"],ec=function(t){var n,e,r=void 0===t.grouping||void 0===t.thousands?Ja:(n=tc.call(t.grouping,Number),e=t.thousands+"",function(t,r){for(var i=t.length,u=[],o=0,a=n[0],c=0;i>0&&a>0&&(c+a+1>r&&(a=Math.max(1,r-c)),u.push(t.substring(i-=a,i+a)),!((c+=a+1)>r));)a=n[o=(o+1)%n.length];return u.reverse().join(e)}),i=void 0===t.currency?"":t.currency[0]+"",u=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",a=void 0===t.numerals?Ja:function(t){return function(n){return n.replace(/[0-9]/g,(function(n){return t[+n]}))}}(tc.call(t.numerals,String)),c=void 0===t.percent?"%":t.percent+"",f=void 0===t.minus?"-":t.minus+"",s=void 0===t.nan?"NaN":t.nan+"";function l(t){var n=(t=ja(t)).fill,e=t.align,l=t.sign,h=t.symbol,d=t.zero,p=t.width,g=t.comma,_=t.precision,v=t.trim,y=t.type;"n"===y?(g=!0,y="g"):Qa[y]||(void 0===_&&(_=12),v=!0,y="g"),(d||"0"===n&&"="===e)&&(d=!0,n="0",e="=");var m="$"===h?i:"#"===h&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",b="$"===h?u:/[%p]/.test(y)?c:"",x=Qa[y],w=/[defgprs%]/.test(y);function M(t){var i,u,c,h=m,M=b;if("c"===y)M=x(t)+M,t="";else{var T=(t=+t)<0;if(t=isNaN(t)?s:x(Math.abs(t),_),v&&(t=function(t){t:for(var n,e=t.length,r=1,i=-1;r<e;++r)switch(t[r]){case".":i=n=r;break;case"0":0===i&&(i=r),n=r;break;default:if(!+t[r])break t;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(n+1):t}(t)),T&&0==+t&&(T=!1),h=(T?"("===l?l:f:"-"===l||"("===l?"":l)+h,M=("s"===y?nc[8+Ka/3]:"")+M+(T&&"("===l?")":""),w)for(i=-1,u=t.length;++i<u;)if(48>(c=t.charCodeAt(i))||c>57){M=(46===c?o+t.slice(i+1):t.slice(i))+M,t=t.slice(0,i);break}}g&&!d&&(t=r(t,1/0));var k=h.length+t.length+M.length,A=k<p?new Array(p-k+1).join(n):"";switch(g&&d&&(t=r(A+t,A.length?p-M.length:1/0),A=""),e){case"<":t=h+t+M+A;break;case"=":t=h+A+t+M;break;case"^":t=A.slice(0,k=A.length>>1)+h+t+M+A.slice(k);break;default:t=A+h+t+M}return a(t)}return _=void 0===_?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_)),M.toString=function(){return t+""},M}return{format:l,formatPrefix:function(t,n){var e=l(((t=ja(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(qa(n)/3))),i=Math.pow(10,-r),u=nc[8+r/3];return function(t){return e(i*t)+u}}}};function rc(t){return Ga=ec(t),Wa=Ga.format,$a=Ga.formatPrefix,Ga}rc({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});var ic=function(t){return Math.max(0,-qa(Math.abs(t)))},uc=function(t,n){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(qa(n)/3)))-qa(Math.abs(t)))},oc=function(t,n){return t=Math.abs(t),n=Math.abs(n)-t,Math.max(0,qa(n)-qa(t))+1},ac=function(){return new cc};function cc(){this.reset()}cc.prototype={constructor:cc,reset:function(){this.s=this.t=0},add:function(t){sc(fc,t,this.t),sc(this,fc.s,this.s),this.s?this.t+=fc.t:this.s=fc.t},valueOf:function(){return this.s}};var fc=new cc;function sc(t,n,e){var r=t.s=n+e,i=r-n,u=r-i;t.t=n-u+(e-i)}var lc=Math.PI,hc=lc/2,dc=lc/4,pc=2*lc,gc=180/lc,_c=lc/180,vc=Math.abs,yc=Math.atan,mc=Math.atan2,bc=Math.cos,xc=Math.ceil,wc=Math.exp,Mc=(Math.floor,Math.log),Tc=Math.pow,kc=Math.sin,Ac=Math.sign||function(t){return t>0?1:t<0?-1:0},Nc=Math.sqrt,Cc=Math.tan;function Sc(t){return t>1?0:t<-1?lc:Math.acos(t)}function Ec(t){return t>1?hc:t<-1?-hc:Math.asin(t)}function Vc(t){return(t=kc(t/2))*t}function Pc(){}function Dc(t,n){t&&Rc.hasOwnProperty(t.type)&&Rc[t.type](t,n)}var zc={Feature:function(t,n){Dc(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,r=-1,i=e.length;++r<i;)Dc(e[r].geometry,n)}},Rc={Sphere:function(t,n){n.sphere()},Point:function(t,n){t=t.coordinates,n.point(t[0],t[1],t[2])},MultiPoint:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;++r<i;)t=e[r],n.point(t[0],t[1],t[2])},LineString:function(t,n){Lc(t.coordinates,n,0)},MultiLineString:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;++r<i;)Lc(e[r],n,0)},Polygon:function(t,n){Yc(t.coordinates,n)},MultiPolygon:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;++r<i;)Yc(e[r],n)},GeometryCollection:function(t,n){for(var e=t.geometries,r=-1,i=e.length;++r<i;)Dc(e[r],n)}};function Lc(t,n,e){var r,i=-1,u=t.length-e;for(n.lineStart();++i<u;)r=t[i],n.point(r[0],r[1],r[2]);n.lineEnd()}function Yc(t,n){var e=-1,r=t.length;for(n.polygonStart();++e<r;)Lc(t[e],n,1);n.polygonEnd()}var Uc,Bc,Ic,Oc,Fc,qc=function(t,n){t&&zc.hasOwnProperty(t.type)?zc[t.type](t,n):Dc(t,n)},Xc=ac(),jc=ac(),Hc={point:Pc,lineStart:Pc,lineEnd:Pc,polygonStart:function(){Xc.reset(),Hc.lineStart=Kc,Hc.lineEnd=Gc},polygonEnd:function(){var t=+Xc;jc.add(t<0?pc+t:t),this.lineStart=this.lineEnd=this.point=Pc},sphere:function(){jc.add(pc)}};function Kc(){Hc.point=Wc}function Gc(){$c(Uc,Bc)}function Wc(t,n){Hc.point=$c,Uc=t,Bc=n,Ic=t*=_c,Oc=bc(n=(n*=_c)/2+dc),Fc=kc(n)}function $c(t,n){var e=(t*=_c)-Ic,r=e>=0?1:-1,i=r*e,u=bc(n=(n*=_c)/2+dc),o=kc(n),a=Fc*o,c=Oc*u+a*bc(i),f=a*r*kc(i);Xc.add(mc(f,c)),Ic=t,Oc=u,Fc=o}var Zc=function(t){return jc.reset(),qc(t,Hc),2*jc};function Qc(t){return[mc(t[1],t[0]),Ec(t[2])]}function Jc(t){var n=t[0],e=t[1],r=bc(e);return[r*bc(n),r*kc(n),kc(e)]}function tf(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function nf(t,n){return[t[1]*n[2]-t[2]*n[1],t[2]*n[0]-t[0]*n[2],t[0]*n[1]-t[1]*n[0]]}function ef(t,n){t[0]+=n[0],t[1]+=n[1],t[2]+=n[2]}function rf(t,n){return[t[0]*n,t[1]*n,t[2]*n]}function uf(t){var n=Nc(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=n,t[1]/=n,t[2]/=n}var of,af,cf,ff,sf,lf,hf,df,pf,gf,_f=ac(),vf={point:yf,lineStart:bf,lineEnd:xf,polygonStart:function(){vf.point=wf,vf.lineStart=Mf,vf.lineEnd=Tf,_f.reset(),Hc.polygonStart()},polygonEnd:function(){Hc.polygonEnd(),vf.point=yf,vf.lineStart=bf,vf.lineEnd=xf,Xc<0?(of=-(cf=180),af=-(ff=90)):_f>1e-6?ff=90:_f<-1e-6&&(af=-90),gf[0]=of,gf[1]=cf},sphere:function(){of=-(cf=180),af=-(ff=90)}};function yf(t,n){pf.push(gf=[of=t,cf=t]),n<af&&(af=n),n>ff&&(ff=n)}function mf(t,n){var e=Jc([t*_c,n*_c]);if(df){var r=nf(df,e),i=nf([r[1],-r[0],0],r);uf(i),i=Qc(i);var u,o=t-sf,a=o>0?1:-1,c=i[0]*gc*a,f=vc(o)>180;f^(a*sf<c&&c<a*t)?(u=i[1]*gc)>ff&&(ff=u):f^(a*sf<(c=(c+360)%360-180)&&c<a*t)?(u=-i[1]*gc)<af&&(af=u):(n<af&&(af=n),n>ff&&(ff=n)),f?t<sf?kf(of,t)>kf(of,cf)&&(cf=t):kf(t,cf)>kf(of,cf)&&(of=t):cf>=of?(t<of&&(of=t),t>cf&&(cf=t)):t>sf?kf(of,t)>kf(of,cf)&&(cf=t):kf(t,cf)>kf(of,cf)&&(of=t)}else pf.push(gf=[of=t,cf=t]);n<af&&(af=n),n>ff&&(ff=n),df=e,sf=t}function bf(){vf.point=mf}function xf(){gf[0]=of,gf[1]=cf,vf.point=yf,df=null}function wf(t,n){if(df){var e=t-sf;_f.add(vc(e)>180?e+(e>0?360:-360):e)}else lf=t,hf=n;Hc.point(t,n),mf(t,n)}function Mf(){Hc.lineStart()}function Tf(){wf(lf,hf),Hc.lineEnd(),vc(_f)>1e-6&&(of=-(cf=180)),gf[0]=of,gf[1]=cf,df=null}function kf(t,n){return(n-=t)<0?n+360:n}function Af(t,n){return t[0]-n[0]}function Nf(t,n){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:n<t[0]||t[1]<n}var Cf,Sf,Ef,Vf,Pf,Df,zf,Rf,Lf,Yf,Uf,Bf,If,Of,Ff,qf,Xf=function(t){var n,e,r,i,u,o,a;if(ff=cf=-(of=af=1/0),pf=[],qc(t,vf),e=pf.length){for(pf.sort(Af),n=1,u=[r=pf[0]];n<e;++n)Nf(r,(i=pf[n])[0])||Nf(r,i[1])?(kf(r[0],i[1])>kf(r[0],r[1])&&(r[1]=i[1]),kf(i[0],r[1])>kf(r[0],r[1])&&(r[0]=i[0])):u.push(r=i);for(o=-1/0,n=0,r=u[e=u.length-1];n<=e;r=i,++n)i=u[n],(a=kf(r[1],i[0]))>o&&(o=a,of=i[0],cf=r[1])}return pf=gf=null,of===1/0||af===1/0?[[NaN,NaN],[NaN,NaN]]:[[of,af],[cf,ff]]},jf={sphere:Pc,point:Hf,lineStart:Gf,lineEnd:Zf,polygonStart:function(){jf.lineStart=Qf,jf.lineEnd=Jf},polygonEnd:function(){jf.lineStart=Gf,jf.lineEnd=Zf}};function Hf(t,n){t*=_c;var e=bc(n*=_c);Kf(e*bc(t),e*kc(t),kc(n))}function Kf(t,n,e){++Cf,Ef+=(t-Ef)/Cf,Vf+=(n-Vf)/Cf,Pf+=(e-Pf)/Cf}function Gf(){jf.point=Wf}function Wf(t,n){t*=_c;var e=bc(n*=_c);Of=e*bc(t),Ff=e*kc(t),qf=kc(n),jf.point=$f,Kf(Of,Ff,qf)}function $f(t,n){t*=_c;var e=bc(n*=_c),r=e*bc(t),i=e*kc(t),u=kc(n),o=mc(Nc((o=Ff*u-qf*i)*o+(o=qf*r-Of*u)*o+(o=Of*i-Ff*r)*o),Of*r+Ff*i+qf*u);Sf+=o,Df+=o*(Of+(Of=r)),zf+=o*(Ff+(Ff=i)),Rf+=o*(qf+(qf=u)),Kf(Of,Ff,qf)}function Zf(){jf.point=Hf}function Qf(){jf.point=ts}function Jf(){ns(Bf,If),jf.point=Hf}function ts(t,n){Bf=t,If=n,t*=_c,n*=_c,jf.point=ns;var e=bc(n);Of=e*bc(t),Ff=e*kc(t),qf=kc(n),Kf(Of,Ff,qf)}function ns(t,n){t*=_c;var e=bc(n*=_c),r=e*bc(t),i=e*kc(t),u=kc(n),o=Ff*u-qf*i,a=qf*r-Of*u,c=Of*i-Ff*r,f=Nc(o*o+a*a+c*c),s=Ec(f),l=f&&-s/f;Lf+=l*o,Yf+=l*a,Uf+=l*c,Sf+=s,Df+=s*(Of+(Of=r)),zf+=s*(Ff+(Ff=i)),Rf+=s*(qf+(qf=u)),Kf(Of,Ff,qf)}var es=function(t){Cf=Sf=Ef=Vf=Pf=Df=zf=Rf=Lf=Yf=Uf=0,qc(t,jf);var n=Lf,e=Yf,r=Uf,i=n*n+e*e+r*r;return i<1e-12&&(n=Df,e=zf,r=Rf,Sf<1e-6&&(n=Ef,e=Vf,r=Pf),(i=n*n+e*e+r*r)<1e-12)?[NaN,NaN]:[mc(e,n)*gc,Ec(r/Nc(i))*gc]},rs=function(t){return function(){return t}},is=function(t,n){function e(e,r){return e=t(e,r),n(e[0],e[1])}return t.invert&&n.invert&&(e.invert=function(e,r){return(e=n.invert(e,r))&&t.invert(e[0],e[1])}),e};function us(t,n){return[vc(t)>lc?t+Math.round(-t/pc)*pc:t,n]}function os(t,n,e){return(t%=pc)?n||e?is(cs(t),fs(n,e)):cs(t):n||e?fs(n,e):us}function as(t){return function(n,e){return[(n+=t)>lc?n-pc:n<-lc?n+pc:n,e]}}function cs(t){var n=as(t);return n.invert=as(-t),n}function fs(t,n){var e=bc(t),r=kc(t),i=bc(n),u=kc(n);function o(t,n){var o=bc(n),a=bc(t)*o,c=kc(t)*o,f=kc(n),s=f*e+a*r;return[mc(c*i-s*u,a*e-f*r),Ec(s*i+c*u)]}return o.invert=function(t,n){var o=bc(n),a=bc(t)*o,c=kc(t)*o,f=kc(n),s=f*i-c*u;return[mc(c*i+f*u,a*e+s*r),Ec(s*e-a*r)]},o}us.invert=us;var ss=function(t){function n(n){return(n=t(n[0]*_c,n[1]*_c))[0]*=gc,n[1]*=gc,n}return t=os(t[0]*_c,t[1]*_c,t.length>2?t[2]*_c:0),n.invert=function(n){return(n=t.invert(n[0]*_c,n[1]*_c))[0]*=gc,n[1]*=gc,n},n};function ls(t,n,e,r,i,u){if(e){var o=bc(n),a=kc(n),c=r*e;null==i?(i=n+r*pc,u=n-c/2):(i=hs(o,i),u=hs(o,u),(r>0?i<u:i>u)&&(i+=r*pc));for(var f,s=i;r>0?s>u:s<u;s-=c)f=Qc([o,-a*bc(s),-a*kc(s)]),t.point(f[0],f[1])}}function hs(t,n){(n=Jc(n))[0]-=t,uf(n);var e=Sc(-n[1]);return((-n[2]<0?-e:e)+pc-1e-6)%pc}var ds=function(){var t,n,e=rs([0,0]),r=rs(90),i=rs(6),u={point:function(e,r){t.push(e=n(e,r)),e[0]*=gc,e[1]*=gc}};function o(){var o=e.apply(this,arguments),a=r.apply(this,arguments)*_c,c=i.apply(this,arguments)*_c;return t=[],n=os(-o[0]*_c,-o[1]*_c,0).invert,ls(u,a,c,1),o={type:"Polygon",coordinates:[t]},t=n=null,o}return o.center=function(t){return arguments.length?(e="function"==typeof t?t:rs([+t[0],+t[1]]),o):e},o.radius=function(t){return arguments.length?(r="function"==typeof t?t:rs(+t),o):r},o.precision=function(t){return arguments.length?(i="function"==typeof t?t:rs(+t),o):i},o},ps=function(){var t,n=[];return{point:function(n,e){t.push([n,e])},lineStart:function(){n.push(t=[])},lineEnd:Pc,rejoin:function(){n.length>1&&n.push(n.pop().concat(n.shift()))},result:function(){var e=n;return n=[],t=null,e}}},gs=function(t,n){return vc(t[0]-n[0])<1e-6&&vc(t[1]-n[1])<1e-6};function _s(t,n,e,r){this.x=t,this.z=n,this.o=e,this.e=r,this.v=!1,this.n=this.p=null}var vs=function(t,n,e,r,i){var u,o,a=[],c=[];if(t.forEach((function(t){if(!((n=t.length-1)<=0)){var n,e,r=t[0],o=t[n];if(gs(r,o)){for(i.lineStart(),u=0;u<n;++u)i.point((r=t[u])[0],r[1]);i.lineEnd()}else a.push(e=new _s(r,t,null,!0)),c.push(e.o=new _s(r,null,e,!1)),a.push(e=new _s(o,t,null,!1)),c.push(e.o=new _s(o,null,e,!0))}})),a.length){for(c.sort(n),ys(a),ys(c),u=0,o=c.length;u<o;++u)c[u].e=e=!e;for(var f,s,l=a[0];;){for(var h=l,d=!0;h.v;)if((h=h.n)===l)return;f=h.z,i.lineStart();do{if(h.v=h.o.v=!0,h.e){if(d)for(u=0,o=f.length;u<o;++u)i.point((s=f[u])[0],s[1]);else r(h.x,h.n.x,1,i);h=h.n}else{if(d)for(f=h.p.z,u=f.length-1;u>=0;--u)i.point((s=f[u])[0],s[1]);else r(h.x,h.p.x,-1,i);h=h.p}f=(h=h.o).z,d=!d}while(!h.v);i.lineEnd()}}};function ys(t){if(n=t.length){for(var n,e,r=0,i=t[0];++r<n;)i.n=e=t[r],e.p=i,i=e;i.n=e=t[0],e.p=i}}var ms=ac();function bs(t){return vc(t[0])<=lc?t[0]:Ac(t[0])*((vc(t[0])+lc)%pc-lc)}var xs=function(t,n){var e=bs(n),r=n[1],i=kc(r),u=[kc(e),-bc(e),0],o=0,a=0;ms.reset(),1===i?r=hc+1e-6:-1===i&&(r=-hc-1e-6);for(var c=0,f=t.length;c<f;++c)if(l=(s=t[c]).length)for(var s,l,h=s[l-1],d=bs(h),p=h[1]/2+dc,g=kc(p),_=bc(p),v=0;v<l;++v,d=m,g=x,_=w,h=y){var y=s[v],m=bs(y),b=y[1]/2+dc,x=kc(b),w=bc(b),M=m-d,T=M>=0?1:-1,k=T*M,A=k>lc,N=g*x;if(ms.add(mc(N*T*kc(k),_*w+N*bc(k))),o+=A?M+T*pc:M,A^d>=e^m>=e){var C=nf(Jc(h),Jc(y));uf(C);var S=nf(u,C);uf(S);var E=(A^M>=0?-1:1)*Ec(S[2]);(r>E||r===E&&(C[0]||C[1]))&&(a+=A^M>=0?1:-1)}}return(o<-1e-6||o<1e-6&&ms<-1e-6)^1&a},ws=function(t,n,e,r){return function(i){var u,o,a,c=n(i),f=ps(),s=n(f),l=!1,h={point:d,lineStart:g,lineEnd:_,polygonStart:function(){h.point=v,h.lineStart=y,h.lineEnd=m,o=[],u=[]},polygonEnd:function(){h.point=d,h.lineStart=g,h.lineEnd=_,o=Y(o);var t=xs(u,r);o.length?(l||(i.polygonStart(),l=!0),vs(o,Ts,t,e,i)):t&&(l||(i.polygonStart(),l=!0),i.lineStart(),e(null,null,1,i),i.lineEnd()),l&&(i.polygonEnd(),l=!1),o=u=null},sphere:function(){i.polygonStart(),i.lineStart(),e(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function d(n,e){t(n,e)&&i.point(n,e)}function p(t,n){c.point(t,n)}function g(){h.point=p,c.lineStart()}function _(){h.point=d,c.lineEnd()}function v(t,n){a.push([t,n]),s.point(t,n)}function y(){s.lineStart(),a=[]}function m(){v(a[0][0],a[0][1]),s.lineEnd();var t,n,e,r,c=s.clean(),h=f.result(),d=h.length;if(a.pop(),u.push(a),a=null,d)if(1&c){if((n=(e=h[0]).length-1)>0){for(l||(i.polygonStart(),l=!0),i.lineStart(),t=0;t<n;++t)i.point((r=e[t])[0],r[1]);i.lineEnd()}}else d>1&&2&c&&h.push(h.pop().concat(h.shift())),o.push(h.filter(Ms))}return h}};function Ms(t){return t.length>1}function Ts(t,n){return((t=t.x)[0]<0?t[1]-hc-1e-6:hc-t[1])-((n=n.x)[0]<0?n[1]-hc-1e-6:hc-n[1])}var ks=ws((function(){return!0}),(function(t){var n,e=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),n=1},point:function(u,o){var a=u>0?lc:-lc,c=vc(u-e);vc(c-lc)<1e-6?(t.point(e,r=(r+o)/2>0?hc:-hc),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(a,r),t.point(u,r),n=0):i!==a&&c>=lc&&(vc(e-i)<1e-6&&(e-=1e-6*i),vc(u-a)<1e-6&&(u-=1e-6*a),r=function(t,n,e,r){var i,u,o=kc(t-e);return vc(o)>1e-6?yc((kc(n)*(u=bc(r))*kc(e)-kc(r)*(i=bc(n))*kc(t))/(i*u*o)):(n+r)/2}(e,r,u,o),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(a,r),n=0),t.point(e=u,r=o),i=a},lineEnd:function(){t.lineEnd(),e=r=NaN},clean:function(){return 2-n}}}),(function(t,n,e,r){var i;if(null==t)i=e*hc,r.point(-lc,i),r.point(0,i),r.point(lc,i),r.point(lc,0),r.point(lc,-i),r.point(0,-i),r.point(-lc,-i),r.point(-lc,0),r.point(-lc,i);else if(vc(t[0]-n[0])>1e-6){var u=t[0]<n[0]?lc:-lc;i=e*u/2,r.point(-u,i),r.point(0,i),r.point(u,i)}else r.point(n[0],n[1])}),[-lc,-hc]);var As=function(t){var n=bc(t),e=6*_c,r=n>0,i=vc(n)>1e-6;function u(t,e){return bc(t)*bc(e)>n}function o(t,e,r){var i=[1,0,0],u=nf(Jc(t),Jc(e)),o=tf(u,u),a=u[0],c=o-a*a;if(!c)return!r&&t;var f=n*o/c,s=-n*a/c,l=nf(i,u),h=rf(i,f);ef(h,rf(u,s));var d=l,p=tf(h,d),g=tf(d,d),_=p*p-g*(tf(h,h)-1);if(!(_<0)){var v=Nc(_),y=rf(d,(-p-v)/g);if(ef(y,h),y=Qc(y),!r)return y;var m,b=t[0],x=e[0],w=t[1],M=e[1];x<b&&(m=b,b=x,x=m);var T=x-b,k=vc(T-lc)<1e-6;if(!k&&M<w&&(m=w,w=M,M=m),k||T<1e-6?k?w+M>0^y[1]<(vc(y[0]-b)<1e-6?w:M):w<=y[1]&&y[1]<=M:T>lc^(b<=y[0]&&y[0]<=x)){var A=rf(d,(-p+v)/g);return ef(A,h),[y,Qc(A)]}}}function a(n,e){var i=r?t:lc-t,u=0;return n<-i?u|=1:n>i&&(u|=2),e<-i?u|=4:e>i&&(u|=8),u}return ws(u,(function(t){var n,e,c,f,s;return{lineStart:function(){f=c=!1,s=1},point:function(l,h){var d,p=[l,h],g=u(l,h),_=r?g?0:a(l,h):g?a(l+(l<0?lc:-lc),h):0;if(!n&&(f=c=g)&&t.lineStart(),g!==c&&(!(d=o(n,p))||gs(n,d)||gs(p,d))&&(p[0]+=1e-6,p[1]+=1e-6,g=u(p[0],p[1])),g!==c)s=0,g?(t.lineStart(),d=o(p,n),t.point(d[0],d[1])):(d=o(n,p),t.point(d[0],d[1]),t.lineEnd()),n=d;else if(i&&n&&r^g){var v;_&e||!(v=o(p,n,!0))||(s=0,r?(t.lineStart(),t.point(v[0][0],v[0][1]),t.point(v[1][0],v[1][1]),t.lineEnd()):(t.point(v[1][0],v[1][1]),t.lineEnd(),t.lineStart(),t.point(v[0][0],v[0][1])))}!g||n&&gs(n,p)||t.point(p[0],p[1]),n=p,c=g,e=_},lineEnd:function(){c&&t.lineEnd(),n=null},clean:function(){return s|(f&&c)<<1}}}),(function(n,r,i,u){ls(u,t,e,i,n,r)}),r?[0,-t]:[-lc,t-lc])};function Ns(t,n,e,r){function i(i,u){return t<=i&&i<=e&&n<=u&&u<=r}function u(i,u,a,f){var s=0,l=0;if(null==i||(s=o(i,a))!==(l=o(u,a))||c(i,u)<0^a>0)do{f.point(0===s||3===s?t:e,s>1?r:n)}while((s=(s+a+4)%4)!==l);else f.point(u[0],u[1])}function o(r,i){return vc(r[0]-t)<1e-6?i>0?0:3:vc(r[0]-e)<1e-6?i>0?2:1:vc(r[1]-n)<1e-6?i>0?1:0:i>0?3:2}function a(t,n){return c(t.x,n.x)}function c(t,n){var e=o(t,1),r=o(n,1);return e!==r?e-r:0===e?n[1]-t[1]:1===e?t[0]-n[0]:2===e?t[1]-n[1]:n[0]-t[0]}return function(o){var c,f,s,l,h,d,p,g,_,v,y,m=o,b=ps(),x={point:w,lineStart:function(){x.point=M,f&&f.push(s=[]);v=!0,_=!1,p=g=NaN},lineEnd:function(){c&&(M(l,h),d&&_&&b.rejoin(),c.push(b.result()));x.point=w,_&&m.lineEnd()},polygonStart:function(){m=b,c=[],f=[],y=!0},polygonEnd:function(){var n=function(){for(var n=0,e=0,i=f.length;e<i;++e)for(var u,o,a=f[e],c=1,s=a.length,l=a[0],h=l[0],d=l[1];c<s;++c)u=h,o=d,l=a[c],h=l[0],d=l[1],o<=r?d>r&&(h-u)*(r-o)>(d-o)*(t-u)&&++n:d<=r&&(h-u)*(r-o)<(d-o)*(t-u)&&--n;return n}(),e=y&&n,i=(c=Y(c)).length;(e||i)&&(o.polygonStart(),e&&(o.lineStart(),u(null,null,1,o),o.lineEnd()),i&&vs(c,a,n,u,o),o.polygonEnd());m=o,c=f=s=null}};function w(t,n){i(t,n)&&m.point(t,n)}function M(u,o){var a=i(u,o);if(f&&s.push([u,o]),v)l=u,h=o,d=a,v=!1,a&&(m.lineStart(),m.point(u,o));else if(a&&_)m.point(u,o);else{var c=[p=Math.max(-1e9,Math.min(1e9,p)),g=Math.max(-1e9,Math.min(1e9,g))],b=[u=Math.max(-1e9,Math.min(1e9,u)),o=Math.max(-1e9,Math.min(1e9,o))];!function(t,n,e,r,i,u){var o,a=t[0],c=t[1],f=0,s=1,l=n[0]-a,h=n[1]-c;if(o=e-a,l||!(o>0)){if(o/=l,l<0){if(o<f)return;o<s&&(s=o)}else if(l>0){if(o>s)return;o>f&&(f=o)}if(o=i-a,l||!(o<0)){if(o/=l,l<0){if(o>s)return;o>f&&(f=o)}else if(l>0){if(o<f)return;o<s&&(s=o)}if(o=r-c,h||!(o>0)){if(o/=h,h<0){if(o<f)return;o<s&&(s=o)}else if(h>0){if(o>s)return;o>f&&(f=o)}if(o=u-c,h||!(o<0)){if(o/=h,h<0){if(o>s)return;o>f&&(f=o)}else if(h>0){if(o<f)return;o<s&&(s=o)}return f>0&&(t[0]=a+f*l,t[1]=c+f*h),s<1&&(n[0]=a+s*l,n[1]=c+s*h),!0}}}}}(c,b,t,n,e,r)?a&&(m.lineStart(),m.point(u,o),y=!1):(_||(m.lineStart(),m.point(c[0],c[1])),m.point(b[0],b[1]),a||m.lineEnd(),y=!1)}p=u,g=o,_=a}return x}}var Cs,Ss,Es,Vs=function(){var t,n,e,r=0,i=0,u=960,o=500;return e={stream:function(e){return t&&n===e?t:t=Ns(r,i,u,o)(n=e)},extent:function(a){return arguments.length?(r=+a[0][0],i=+a[0][1],u=+a[1][0],o=+a[1][1],t=n=null,e):[[r,i],[u,o]]}}},Ps=ac(),Ds={sphere:Pc,point:Pc,lineStart:function(){Ds.point=Rs,Ds.lineEnd=zs},lineEnd:Pc,polygonStart:Pc,polygonEnd:Pc};function zs(){Ds.point=Ds.lineEnd=Pc}function Rs(t,n){Cs=t*=_c,Ss=kc(n*=_c),Es=bc(n),Ds.point=Ls}function Ls(t,n){t*=_c;var e=kc(n*=_c),r=bc(n),i=vc(t-Cs),u=bc(i),o=r*kc(i),a=Es*e-Ss*r*u,c=Ss*e+Es*r*u;Ps.add(mc(Nc(o*o+a*a),c)),Cs=t,Ss=e,Es=r}var Ys=function(t){return Ps.reset(),qc(t,Ds),+Ps},Us=[null,null],Bs={type:"LineString",coordinates:Us},Is=function(t,n){return Us[0]=t,Us[1]=n,Ys(Bs)},Os={Feature:function(t,n){return qs(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,r=-1,i=e.length;++r<i;)if(qs(e[r].geometry,n))return!0;return!1}},Fs={Sphere:function(){return!0},Point:function(t,n){return Xs(t.coordinates,n)},MultiPoint:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;++r<i;)if(Xs(e[r],n))return!0;return!1},LineString:function(t,n){return js(t.coordinates,n)},MultiLineString:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;++r<i;)if(js(e[r],n))return!0;return!1},Polygon:function(t,n){return Hs(t.coordinates,n)},MultiPolygon:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;++r<i;)if(Hs(e[r],n))return!0;return!1},GeometryCollection:function(t,n){for(var e=t.geometries,r=-1,i=e.length;++r<i;)if(qs(e[r],n))return!0;return!1}};function qs(t,n){return!(!t||!Fs.hasOwnProperty(t.type))&&Fs[t.type](t,n)}function Xs(t,n){return 0===Is(t,n)}function js(t,n){for(var e,r,i,u=0,o=t.length;u<o;u++){if(0===(r=Is(t[u],n)))return!0;if(u>0&&(i=Is(t[u],t[u-1]))>0&&e<=i&&r<=i&&(e+r-i)*(1-Math.pow((e-r)/i,2))<1e-12*i)return!0;e=r}return!1}function Hs(t,n){return!!xs(t.map(Ks),Gs(n))}function Ks(t){return(t=t.map(Gs)).pop(),t}function Gs(t){return[t[0]*_c,t[1]*_c]}var Ws=function(t,n){return(t&&Os.hasOwnProperty(t.type)?Os[t.type]:qs)(t,n)};function $s(t,n,e){var r=w(t,n-1e-6,e).concat(n);return function(t){return r.map((function(n){return[t,n]}))}}function Zs(t,n,e){var r=w(t,n-1e-6,e).concat(n);return function(t){return r.map((function(n){return[n,t]}))}}function Qs(){var t,n,e,r,i,u,o,a,c,f,s,l,h=10,d=h,p=90,g=360,_=2.5;function v(){return{type:"MultiLineString",coordinates:y()}}function y(){return w(xc(r/p)*p,e,p).map(s).concat(w(xc(a/g)*g,o,g).map(l)).concat(w(xc(n/h)*h,t,h).filter((function(t){return vc(t%p)>1e-6})).map(c)).concat(w(xc(u/d)*d,i,d).filter((function(t){return vc(t%g)>1e-6})).map(f))}return v.lines=function(){return y().map((function(t){return{type:"LineString",coordinates:t}}))},v.outline=function(){return{type:"Polygon",coordinates:[s(r).concat(l(o).slice(1),s(e).reverse().slice(1),l(a).reverse().slice(1))]}},v.extent=function(t){return arguments.length?v.extentMajor(t).extentMinor(t):v.extentMinor()},v.extentMajor=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],a=+t[0][1],o=+t[1][1],r>e&&(t=r,r=e,e=t),a>o&&(t=a,a=o,o=t),v.precision(_)):[[r,a],[e,o]]},v.extentMinor=function(e){return arguments.length?(n=+e[0][0],t=+e[1][0],u=+e[0][1],i=+e[1][1],n>t&&(e=n,n=t,t=e),u>i&&(e=u,u=i,i=e),v.precision(_)):[[n,u],[t,i]]},v.step=function(t){return arguments.length?v.stepMajor(t).stepMinor(t):v.stepMinor()},v.stepMajor=function(t){return arguments.length?(p=+t[0],g=+t[1],v):[p,g]},v.stepMinor=function(t){return arguments.length?(h=+t[0],d=+t[1],v):[h,d]},v.precision=function(h){return arguments.length?(_=+h,c=$s(u,i,90),f=Zs(n,t,_),s=$s(a,o,90),l=Zs(r,e,_),v):_},v.extentMajor([[-180,1e-6-90],[180,90-1e-6]]).extentMinor([[-180,-80-1e-6],[180,80+1e-6]])}function Js(){return Qs()()}var tl,nl,el,rl,il=function(t,n){var e=t[0]*_c,r=t[1]*_c,i=n[0]*_c,u=n[1]*_c,o=bc(r),a=kc(r),c=bc(u),f=kc(u),s=o*bc(e),l=o*kc(e),h=c*bc(i),d=c*kc(i),p=2*Ec(Nc(Vc(u-r)+o*c*Vc(i-e))),g=kc(p),_=p?function(t){var n=kc(t*=p)/g,e=kc(p-t)/g,r=e*s+n*h,i=e*l+n*d,u=e*a+n*f;return[mc(i,r)*gc,mc(u,Nc(r*r+i*i))*gc]}:function(){return[e*gc,r*gc]};return _.distance=p,_},ul=function(t){return t},ol=ac(),al=ac(),cl={point:Pc,lineStart:Pc,lineEnd:Pc,polygonStart:function(){cl.lineStart=fl,cl.lineEnd=hl},polygonEnd:function(){cl.lineStart=cl.lineEnd=cl.point=Pc,ol.add(vc(al)),al.reset()},result:function(){var t=ol/2;return ol.reset(),t}};function fl(){cl.point=sl}function sl(t,n){cl.point=ll,tl=el=t,nl=rl=n}function ll(t,n){al.add(rl*t-el*n),el=t,rl=n}function hl(){ll(tl,nl)}var dl=cl,pl=1/0,gl=pl,_l=-pl,vl=_l;var yl,ml,bl,xl,wl={point:function(t,n){t<pl&&(pl=t);t>_l&&(_l=t);n<gl&&(gl=n);n>vl&&(vl=n)},lineStart:Pc,lineEnd:Pc,polygonStart:Pc,polygonEnd:Pc,result:function(){var t=[[pl,gl],[_l,vl]];return _l=vl=-(gl=pl=1/0),t}},Ml=0,Tl=0,kl=0,Al=0,Nl=0,Cl=0,Sl=0,El=0,Vl=0,Pl={point:Dl,lineStart:zl,lineEnd:Yl,polygonStart:function(){Pl.lineStart=Ul,Pl.lineEnd=Bl},polygonEnd:function(){Pl.point=Dl,Pl.lineStart=zl,Pl.lineEnd=Yl},result:function(){var t=Vl?[Sl/Vl,El/Vl]:Cl?[Al/Cl,Nl/Cl]:kl?[Ml/kl,Tl/kl]:[NaN,NaN];return Ml=Tl=kl=Al=Nl=Cl=Sl=El=Vl=0,t}};function Dl(t,n){Ml+=t,Tl+=n,++kl}function zl(){Pl.point=Rl}function Rl(t,n){Pl.point=Ll,Dl(bl=t,xl=n)}function Ll(t,n){var e=t-bl,r=n-xl,i=Nc(e*e+r*r);Al+=i*(bl+t)/2,Nl+=i*(xl+n)/2,Cl+=i,Dl(bl=t,xl=n)}function Yl(){Pl.point=Dl}function Ul(){Pl.point=Il}function Bl(){Ol(yl,ml)}function Il(t,n){Pl.point=Ol,Dl(yl=bl=t,ml=xl=n)}function Ol(t,n){var e=t-bl,r=n-xl,i=Nc(e*e+r*r);Al+=i*(bl+t)/2,Nl+=i*(xl+n)/2,Cl+=i,Sl+=(i=xl*t-bl*n)*(bl+t),El+=i*(xl+n),Vl+=3*i,Dl(bl=t,xl=n)}var Fl=Pl;function ql(t){this._context=t}ql.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,n){switch(this._point){case 0:this._context.moveTo(t,n),this._point=1;break;case 1:this._context.lineTo(t,n);break;default:this._context.moveTo(t+this._radius,n),this._context.arc(t,n,this._radius,0,pc)}},result:Pc};var Xl,jl,Hl,Kl,Gl,Wl=ac(),$l={point:Pc,lineStart:function(){$l.point=Zl},lineEnd:function(){Xl&&Ql(jl,Hl),$l.point=Pc},polygonStart:function(){Xl=!0},polygonEnd:function(){Xl=null},result:function(){var t=+Wl;return Wl.reset(),t}};function Zl(t,n){$l.point=Ql,jl=Kl=t,Hl=Gl=n}function Ql(t,n){Kl-=t,Gl-=n,Wl.add(Nc(Kl*Kl+Gl*Gl)),Kl=t,Gl=n}var Jl=$l;function th(){this._string=[]}function nh(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}th.prototype={_radius:4.5,_circle:nh(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,n){switch(this._point){case 0:this._string.push("M",t,",",n),this._point=1;break;case 1:this._string.push("L",t,",",n);break;default:null==this._circle&&(this._circle=nh(this._radius)),this._string.push("M",t,",",n,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}};var eh=function(t,n){var e,r,i=4.5;function u(t){return t&&("function"==typeof i&&r.pointRadius(+i.apply(this,arguments)),qc(t,e(r))),r.result()}return u.area=function(t){return qc(t,e(dl)),dl.result()},u.measure=function(t){return qc(t,e(Jl)),Jl.result()},u.bounds=function(t){return qc(t,e(wl)),wl.result()},u.centroid=function(t){return qc(t,e(Fl)),Fl.result()},u.projection=function(n){return arguments.length?(e=null==n?(t=null,ul):(t=n).stream,u):t},u.context=function(t){return arguments.length?(r=null==t?(n=null,new th):new ql(n=t),"function"!=typeof i&&r.pointRadius(i),u):n},u.pointRadius=function(t){return arguments.length?(i="function"==typeof t?t:(r.pointRadius(+t),+t),u):i},u.projection(t).context(n)},rh=function(t){return{stream:ih(t)}};function ih(t){return function(n){var e=new uh;for(var r in t)e[r]=t[r];return e.stream=n,e}}function uh(){}function oh(t,n,e){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),qc(e,t.stream(wl)),n(wl.result()),null!=r&&t.clipExtent(r),t}function ah(t,n,e){return oh(t,(function(e){var r=n[1][0]-n[0][0],i=n[1][1]-n[0][1],u=Math.min(r/(e[1][0]-e[0][0]),i/(e[1][1]-e[0][1])),o=+n[0][0]+(r-u*(e[1][0]+e[0][0]))/2,a=+n[0][1]+(i-u*(e[1][1]+e[0][1]))/2;t.scale(150*u).translate([o,a])}),e)}function ch(t,n,e){return ah(t,[[0,0],n],e)}function fh(t,n,e){return oh(t,(function(e){var r=+n,i=r/(e[1][0]-e[0][0]),u=(r-i*(e[1][0]+e[0][0]))/2,o=-i*e[0][1];t.scale(150*i).translate([u,o])}),e)}function sh(t,n,e){return oh(t,(function(e){var r=+n,i=r/(e[1][1]-e[0][1]),u=-i*e[0][0],o=(r-i*(e[1][1]+e[0][1]))/2;t.scale(150*i).translate([u,o])}),e)}uh.prototype={constructor:uh,point:function(t,n){this.stream.point(t,n)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var lh=bc(30*_c),hh=function(t,n){return+n?function(t,n){function e(r,i,u,o,a,c,f,s,l,h,d,p,g,_){var v=f-r,y=s-i,m=v*v+y*y;if(m>4*n&&g--){var b=o+h,x=a+d,w=c+p,M=Nc(b*b+x*x+w*w),T=Ec(w/=M),k=vc(vc(w)-1)<1e-6||vc(u-l)<1e-6?(u+l)/2:mc(x,b),A=t(k,T),N=A[0],C=A[1],S=N-r,E=C-i,V=y*S-v*E;(V*V/m>n||vc((v*S+y*E)/m-.5)>.3||o*h+a*d+c*p<lh)&&(e(r,i,u,o,a,c,N,C,k,b/=M,x/=M,w,g,_),_.point(N,C),e(N,C,k,b,x,w,f,s,l,h,d,p,g,_))}}return function(n){var r,i,u,o,a,c,f,s,l,h,d,p,g={point:_,lineStart:v,lineEnd:m,polygonStart:function(){n.polygonStart(),g.lineStart=b},polygonEnd:function(){n.polygonEnd(),g.lineStart=v}};function _(e,r){e=t(e,r),n.point(e[0],e[1])}function v(){s=NaN,g.point=y,n.lineStart()}function y(r,i){var u=Jc([r,i]),o=t(r,i);e(s,l,f,h,d,p,s=o[0],l=o[1],f=r,h=u[0],d=u[1],p=u[2],16,n),n.point(s,l)}function m(){g.point=_,n.lineEnd()}function b(){v(),g.point=x,g.lineEnd=w}function x(t,n){y(r=t,n),i=s,u=l,o=h,a=d,c=p,g.point=y}function w(){e(s,l,f,h,d,p,i,u,r,o,a,c,16,n),g.lineEnd=m,m()}return g}}(t,n):function(t){return ih({point:function(n,e){n=t(n,e),this.stream.point(n[0],n[1])}})}(t)};var dh=ih({point:function(t,n){this.stream.point(t*_c,n*_c)}});function ph(t,n,e){function r(r,i){return[n+t*r,e-t*i]}return r.invert=function(r,i){return[(r-n)/t,(e-i)/t]},r}function gh(t,n,e,r){var i=bc(r),u=kc(r),o=i*t,a=u*t,c=i/t,f=u/t,s=(u*e-i*n)/t,l=(u*n+i*e)/t;function h(t,r){return[o*t-a*r+n,e-a*t-o*r]}return h.invert=function(t,n){return[c*t-f*n+s,l-f*t-c*n]},h}function _h(t){return vh((function(){return t}))()}function vh(t){var n,e,r,i,u,o,a,c,f,s,l=150,h=480,d=250,p=0,g=0,_=0,v=0,y=0,m=0,b=null,x=ks,w=null,M=ul,T=.5;function k(t){return c(t[0]*_c,t[1]*_c)}function A(t){return(t=c.invert(t[0],t[1]))&&[t[0]*gc,t[1]*gc]}function N(){var t=gh(l,0,0,m).apply(null,n(p,g)),r=(m?gh:ph)(l,h-t[0],d-t[1],m);return e=os(_,v,y),a=is(n,r),c=is(e,a),o=hh(a,T),C()}function C(){return f=s=null,k}return k.stream=function(t){return f&&s===t?f:f=dh(function(t){return ih({point:function(n,e){var r=t(n,e);return this.stream.point(r[0],r[1])}})}(e)(x(o(M(s=t)))))},k.preclip=function(t){return arguments.length?(x=t,b=void 0,C()):x},k.postclip=function(t){return arguments.length?(M=t,w=r=i=u=null,C()):M},k.clipAngle=function(t){return arguments.length?(x=+t?As(b=t*_c):(b=null,ks),C()):b*gc},k.clipExtent=function(t){return arguments.length?(M=null==t?(w=r=i=u=null,ul):Ns(w=+t[0][0],r=+t[0][1],i=+t[1][0],u=+t[1][1]),C()):null==w?null:[[w,r],[i,u]]},k.scale=function(t){return arguments.length?(l=+t,N()):l},k.translate=function(t){return arguments.length?(h=+t[0],d=+t[1],N()):[h,d]},k.center=function(t){return arguments.length?(p=t[0]%360*_c,g=t[1]%360*_c,N()):[p*gc,g*gc]},k.rotate=function(t){return arguments.length?(_=t[0]%360*_c,v=t[1]%360*_c,y=t.length>2?t[2]%360*_c:0,N()):[_*gc,v*gc,y*gc]},k.angle=function(t){return arguments.length?(m=t%360*_c,N()):m*gc},k.precision=function(t){return arguments.length?(o=hh(a,T=t*t),C()):Nc(T)},k.fitExtent=function(t,n){return ah(k,t,n)},k.fitSize=function(t,n){return ch(k,t,n)},k.fitWidth=function(t,n){return fh(k,t,n)},k.fitHeight=function(t,n){return sh(k,t,n)},function(){return n=t.apply(this,arguments),k.invert=n.invert&&A,N()}}function yh(t){var n=0,e=lc/3,r=vh(t),i=r(n,e);return i.parallels=function(t){return arguments.length?r(n=t[0]*_c,e=t[1]*_c):[n*gc,e*gc]},i}function mh(t,n){var e=kc(t),r=(e+kc(n))/2;if(vc(r)<1e-6)return function(t){var n=bc(t);function e(t,e){return[t*n,kc(e)/n]}return e.invert=function(t,e){return[t/n,Ec(e*n)]},e}(t);var i=1+e*(2*r-e),u=Nc(i)/r;function o(t,n){var e=Nc(i-2*r*kc(n))/r;return[e*kc(t*=r),u-e*bc(t)]}return o.invert=function(t,n){var e=u-n;return[mc(t,vc(e))/r*Ac(e),Ec((i-(t*t+e*e)*r*r)/(2*r))]},o}var bh=function(){return yh(mh).scale(155.424).center([0,33.6442])},xh=function(){return bh().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])};var wh=function(){var t,n,e,r,i,u,o=xh(),a=bh().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=bh().rotate([157,0]).center([-3,19.9]).parallels([8,18]),f={point:function(t,n){u=[t,n]}};function s(t){var n=t[0],o=t[1];return u=null,e.point(n,o),u||(r.point(n,o),u)||(i.point(n,o),u)}function l(){return t=n=null,s}return s.invert=function(t){var n=o.scale(),e=o.translate(),r=(t[0]-e[0])/n,i=(t[1]-e[1])/n;return(i>=.12&&i<.234&&r>=-.425&&r<-.214?a:i>=.166&&i<.234&&r>=-.214&&r<-.115?c:o).invert(t)},s.stream=function(e){return t&&n===e?t:(r=[o.stream(n=e),a.stream(e),c.stream(e)],i=r.length,t={point:function(t,n){for(var e=-1;++e<i;)r[e].point(t,n)},sphere:function(){for(var t=-1;++t<i;)r[t].sphere()},lineStart:function(){for(var t=-1;++t<i;)r[t].lineStart()},lineEnd:function(){for(var t=-1;++t<i;)r[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<i;)r[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<i;)r[t].polygonEnd()}});var r,i},s.precision=function(t){return arguments.length?(o.precision(t),a.precision(t),c.precision(t),l()):o.precision()},s.scale=function(t){return arguments.length?(o.scale(t),a.scale(.35*t),c.scale(t),s.translate(o.translate())):o.scale()},s.translate=function(t){if(!arguments.length)return o.translate();var n=o.scale(),u=+t[0],s=+t[1];return e=o.translate(t).clipExtent([[u-.455*n,s-.238*n],[u+.455*n,s+.238*n]]).stream(f),r=a.translate([u-.307*n,s+.201*n]).clipExtent([[u-.425*n+1e-6,s+.12*n+1e-6],[u-.214*n-1e-6,s+.234*n-1e-6]]).stream(f),i=c.translate([u-.205*n,s+.212*n]).clipExtent([[u-.214*n+1e-6,s+.166*n+1e-6],[u-.115*n-1e-6,s+.234*n-1e-6]]).stream(f),l()},s.fitExtent=function(t,n){return ah(s,t,n)},s.fitSize=function(t,n){return ch(s,t,n)},s.fitWidth=function(t,n){return fh(s,t,n)},s.fitHeight=function(t,n){return sh(s,t,n)},s.scale(1070)};function Mh(t){return function(n,e){var r=bc(n),i=bc(e),u=t(r*i);return[u*i*kc(n),u*kc(e)]}}function Th(t){return function(n,e){var r=Nc(n*n+e*e),i=t(r),u=kc(i),o=bc(i);return[mc(n*u,r*o),Ec(r&&e*u/r)]}}var kh=Mh((function(t){return Nc(2/(1+t))}));kh.invert=Th((function(t){return 2*Ec(t/2)}));var Ah=function(){return _h(kh).scale(124.75).clipAngle(179.999)},Nh=Mh((function(t){return(t=Sc(t))&&t/kc(t)}));Nh.invert=Th((function(t){return t}));var Ch=function(){return _h(Nh).scale(79.4188).clipAngle(179.999)};function Sh(t,n){return[t,Mc(Cc((hc+n)/2))]}Sh.invert=function(t,n){return[t,2*yc(wc(n))-hc]};var Eh=function(){return Vh(Sh).scale(961/pc)};function Vh(t){var n,e,r,i=_h(t),u=i.center,o=i.scale,a=i.translate,c=i.clipExtent,f=null;function s(){var u=lc*o(),a=i(ss(i.rotate()).invert([0,0]));return c(null==f?[[a[0]-u,a[1]-u],[a[0]+u,a[1]+u]]:t===Sh?[[Math.max(a[0]-u,f),n],[Math.min(a[0]+u,e),r]]:[[f,Math.max(a[1]-u,n)],[e,Math.min(a[1]+u,r)]])}return i.scale=function(t){return arguments.length?(o(t),s()):o()},i.translate=function(t){return arguments.length?(a(t),s()):a()},i.center=function(t){return arguments.length?(u(t),s()):u()},i.clipExtent=function(t){return arguments.length?(null==t?f=n=e=r=null:(f=+t[0][0],n=+t[0][1],e=+t[1][0],r=+t[1][1]),s()):null==f?null:[[f,n],[e,r]]},s()}function Ph(t){return Cc((hc+t)/2)}function Dh(t,n){var e=bc(t),r=t===n?kc(t):Mc(e/bc(n))/Mc(Ph(n)/Ph(t)),i=e*Tc(Ph(t),r)/r;if(!r)return Sh;function u(t,n){i>0?n<1e-6-hc&&(n=1e-6-hc):n>hc-1e-6&&(n=hc-1e-6);var e=i/Tc(Ph(n),r);return[e*kc(r*t),i-e*bc(r*t)]}return u.invert=function(t,n){var e=i-n,u=Ac(r)*Nc(t*t+e*e);return[mc(t,vc(e))/r*Ac(e),2*yc(Tc(i/u,1/r))-hc]},u}var zh=function(){return yh(Dh).scale(109.5).parallels([30,30])};function Rh(t,n){return[t,n]}Rh.invert=Rh;var Lh=function(){return _h(Rh).scale(152.63)};function Yh(t,n){var e=bc(t),r=t===n?kc(t):(e-bc(n))/(n-t),i=e/r+t;if(vc(r)<1e-6)return Rh;function u(t,n){var e=i-n,u=r*t;return[e*kc(u),i-e*bc(u)]}return u.invert=function(t,n){var e=i-n;return[mc(t,vc(e))/r*Ac(e),i-Ac(r)*Nc(t*t+e*e)]},u}var Uh=function(){return yh(Yh).scale(131.154).center([0,13.9389])},Bh=1.340264,Ih=-.081106,Oh=893e-6,Fh=.003796,qh=Nc(3)/2;function Xh(t,n){var e=Ec(qh*kc(n)),r=e*e,i=r*r*r;return[t*bc(e)/(qh*(Bh+3*Ih*r+i*(7*Oh+9*Fh*r))),e*(Bh+Ih*r+i*(Oh+Fh*r))]}Xh.invert=function(t,n){for(var e,r=n,i=r*r,u=i*i*i,o=0;o<12&&(u=(i=(r-=e=(r*(Bh+Ih*i+u*(Oh+Fh*i))-n)/(Bh+3*Ih*i+u*(7*Oh+9*Fh*i)))*r)*i*i,!(vc(e)<1e-12));++o);return[qh*t*(Bh+3*Ih*i+u*(7*Oh+9*Fh*i))/bc(r),Ec(kc(r)/qh)]};var jh=function(){return _h(Xh).scale(177.158)};function Hh(t,n){var e=bc(n),r=bc(t)*e;return[e*kc(t)/r,kc(n)/r]}Hh.invert=Th(yc);var Kh=function(){return _h(Hh).scale(144.049).clipAngle(60)};function Gh(t,n,e,r){return 1===t&&1===n&&0===e&&0===r?ul:ih({point:function(i,u){this.stream.point(i*t+e,u*n+r)}})}var Wh=function(){var t,n,e,r,i,u,o=1,a=0,c=0,f=1,s=1,l=ul,h=null,d=ul;function p(){return r=i=null,u}return u={stream:function(t){return r&&i===t?r:r=l(d(i=t))},postclip:function(r){return arguments.length?(d=r,h=t=n=e=null,p()):d},clipExtent:function(r){return arguments.length?(d=null==r?(h=t=n=e=null,ul):Ns(h=+r[0][0],t=+r[0][1],n=+r[1][0],e=+r[1][1]),p()):null==h?null:[[h,t],[n,e]]},scale:function(t){return arguments.length?(l=Gh((o=+t)*f,o*s,a,c),p()):o},translate:function(t){return arguments.length?(l=Gh(o*f,o*s,a=+t[0],c=+t[1]),p()):[a,c]},reflectX:function(t){return arguments.length?(l=Gh(o*(f=t?-1:1),o*s,a,c),p()):f<0},reflectY:function(t){return arguments.length?(l=Gh(o*f,o*(s=t?-1:1),a,c),p()):s<0},fitExtent:function(t,n){return ah(u,t,n)},fitSize:function(t,n){return ch(u,t,n)},fitWidth:function(t,n){return fh(u,t,n)},fitHeight:function(t,n){return sh(u,t,n)}}};function $h(t,n){var e=n*n,r=e*e;return[t*(.8707-.131979*e+r*(r*(.003971*e-.001529*r)-.013791)),n*(1.007226+e*(.015085+r*(.028874*e-.044475-.005916*r)))]}$h.invert=function(t,n){var e,r=n,i=25;do{var u=r*r,o=u*u;r-=e=(r*(1.007226+u*(.015085+o*(.028874*u-.044475-.005916*o)))-n)/(1.007226+u*(.045255+o*(.259866*u-.311325-.005916*11*o)))}while(vc(e)>1e-6&&--i>0);return[t/(.8707+(u=r*r)*(u*(u*u*u*(.003971-.001529*u)-.013791)-.131979)),r]};var Zh=function(){return _h($h).scale(175.295)};function Qh(t,n){return[bc(n)*kc(t),kc(n)]}Qh.invert=Th(Ec);var Jh=function(){return _h(Qh).scale(249.5).clipAngle(90+1e-6)};function td(t,n){var e=bc(n),r=1+bc(t)*e;return[e*kc(t)/r,kc(n)/r]}td.invert=Th((function(t){return 2*yc(t)}));var nd=function(){return _h(td).scale(250).clipAngle(142)};function ed(t,n){return[Mc(Cc((hc+n)/2)),-t]}ed.invert=function(t,n){return[-n,2*yc(wc(t))-hc]};var rd=function(){var t=Vh(ed),n=t.center,e=t.rotate;return t.center=function(t){return arguments.length?n([-t[1],t[0]]):[(t=n())[1],-t[0]]},t.rotate=function(t){return arguments.length?e([t[0],t[1],t.length>2?t[2]+90:90]):[(t=e())[0],t[1],t[2]-90]},e([0,0,90]).scale(159.155)};function id(t,n){return t.parent===n.parent?1:2}function ud(t,n){return t+n.x}function od(t,n){return Math.max(t,n.y)}var ad=function(){var t=id,n=1,e=1,r=!1;function i(i){var u,o=0;i.eachAfter((function(n){var e=n.children;e?(n.x=function(t){return t.reduce(ud,0)/t.length}(e),n.y=function(t){return 1+t.reduce(od,0)}(e)):(n.x=u?o+=t(n,u):0,n.y=0,u=n)}));var a=function(t){for(var n;n=t.children;)t=n[0];return t}(i),c=function(t){for(var n;n=t.children;)t=n[n.length-1];return t}(i),f=a.x-t(a,c)/2,s=c.x+t(c,a)/2;return i.eachAfter(r?function(t){t.x=(t.x-i.x)*n,t.y=(i.y-t.y)*e}:function(t){t.x=(t.x-f)/(s-f)*n,t.y=(1-(i.y?t.y/i.y:1))*e})}return i.separation=function(n){return arguments.length?(t=n,i):t},i.size=function(t){return arguments.length?(r=!1,n=+t[0],e=+t[1],i):r?null:[n,e]},i.nodeSize=function(t){return arguments.length?(r=!0,n=+t[0],e=+t[1],i):r?[n,e]:null},i};function cd(t){var n=0,e=t.children,r=e&&e.length;if(r)for(;--r>=0;)n+=e[r].value;else n=1;t.value=n}function fd(t,n){var e,r,i,u,o,a=new dd(t),c=+t.value&&(a.value=t.value),f=[a];for(null==n&&(n=sd);e=f.pop();)if(c&&(e.value=+e.data.value),(i=n(e.data))&&(o=i.length))for(e.children=new Array(o),u=o-1;u>=0;--u)f.push(r=e.children[u]=new dd(i[u])),r.parent=e,r.depth=e.depth+1;return a.eachBefore(hd)}function sd(t){return t.children}function ld(t){t.data=t.data.data}function hd(t){var n=0;do{t.height=n}while((t=t.parent)&&t.height<++n)}function dd(t){this.data=t,this.depth=this.height=0,this.parent=null}dd.prototype=fd.prototype={constructor:dd,count:function(){return this.eachAfter(cd)},each:function(t){var n,e,r,i,u=this,o=[u];do{for(n=o.reverse(),o=[];u=n.pop();)if(t(u),e=u.children)for(r=0,i=e.length;r<i;++r)o.push(e[r])}while(o.length);return this},eachAfter:function(t){for(var n,e,r,i=this,u=[i],o=[];i=u.pop();)if(o.push(i),n=i.children)for(e=0,r=n.length;e<r;++e)u.push(n[e]);for(;i=o.pop();)t(i);return this},eachBefore:function(t){for(var n,e,r=this,i=[r];r=i.pop();)if(t(r),n=r.children)for(e=n.length-1;e>=0;--e)i.push(n[e]);return this},sum:function(t){return this.eachAfter((function(n){for(var e=+t(n.data)||0,r=n.children,i=r&&r.length;--i>=0;)e+=r[i].value;n.value=e}))},sort:function(t){return this.eachBefore((function(n){n.children&&n.children.sort(t)}))},path:function(t){for(var n=this,e=function(t,n){if(t===n)return t;var e=t.ancestors(),r=n.ancestors(),i=null;t=e.pop(),n=r.pop();for(;t===n;)i=t,t=e.pop(),n=r.pop();return i}(n,t),r=[n];n!==e;)n=n.parent,r.push(n);for(var i=r.length;t!==e;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,n=[t];t=t.parent;)n.push(t);return n},descendants:function(){var t=[];return this.each((function(n){t.push(n)})),t},leaves:function(){var t=[];return this.eachBefore((function(n){n.children||t.push(n)})),t},links:function(){var t=this,n=[];return t.each((function(e){e!==t&&n.push({source:e.parent,target:e})})),n},copy:function(){return fd(this).eachBefore(ld)}};var pd=Array.prototype.slice;var gd=function(t){for(var n,e,r=0,i=(t=function(t){for(var n,e,r=t.length;r;)e=Math.random()*r--|0,n=t[r],t[r]=t[e],t[e]=n;return t}(pd.call(t))).length,u=[];r<i;)n=t[r],e&&yd(e,n)?++r:(e=bd(u=_d(u,n)),r=0);return e};function _d(t,n){var e,r;if(md(n,t))return[n];for(e=0;e<t.length;++e)if(vd(n,t[e])&&md(xd(t[e],n),t))return[t[e],n];for(e=0;e<t.length-1;++e)for(r=e+1;r<t.length;++r)if(vd(xd(t[e],t[r]),n)&&vd(xd(t[e],n),t[r])&&vd(xd(t[r],n),t[e])&&md(wd(t[e],t[r],n),t))return[t[e],t[r],n];throw new Error}function vd(t,n){var e=t.r-n.r,r=n.x-t.x,i=n.y-t.y;return e<0||e*e<r*r+i*i}function yd(t,n){var e=t.r-n.r+1e-6,r=n.x-t.x,i=n.y-t.y;return e>0&&e*e>r*r+i*i}function md(t,n){for(var e=0;e<n.length;++e)if(!yd(t,n[e]))return!1;return!0}function bd(t){switch(t.length){case 1:return{x:(n=t[0]).x,y:n.y,r:n.r};case 2:return xd(t[0],t[1]);case 3:return wd(t[0],t[1],t[2])}var n}function xd(t,n){var e=t.x,r=t.y,i=t.r,u=n.x,o=n.y,a=n.r,c=u-e,f=o-r,s=a-i,l=Math.sqrt(c*c+f*f);return{x:(e+u+c/l*s)/2,y:(r+o+f/l*s)/2,r:(l+i+a)/2}}function wd(t,n,e){var r=t.x,i=t.y,u=t.r,o=n.x,a=n.y,c=n.r,f=e.x,s=e.y,l=e.r,h=r-o,d=r-f,p=i-a,g=i-s,_=c-u,v=l-u,y=r*r+i*i-u*u,m=y-o*o-a*a+c*c,b=y-f*f-s*s+l*l,x=d*p-h*g,w=(p*b-g*m)/(2*x)-r,M=(g*_-p*v)/x,T=(d*m-h*b)/(2*x)-i,k=(h*v-d*_)/x,A=M*M+k*k-1,N=2*(u+w*M+T*k),C=w*w+T*T-u*u,S=-(A?(N+Math.sqrt(N*N-4*A*C))/(2*A):C/N);return{x:r+w+M*S,y:i+T+k*S,r:S}}function Md(t,n,e){var r,i,u,o,a=t.x-n.x,c=t.y-n.y,f=a*a+c*c;f?(i=n.r+e.r,i*=i,o=t.r+e.r,i>(o*=o)?(r=(f+o-i)/(2*f),u=Math.sqrt(Math.max(0,o/f-r*r)),e.x=t.x-r*a-u*c,e.y=t.y-r*c+u*a):(r=(f+i-o)/(2*f),u=Math.sqrt(Math.max(0,i/f-r*r)),e.x=n.x+r*a-u*c,e.y=n.y+r*c+u*a)):(e.x=n.x+e.r,e.y=n.y)}function Td(t,n){var e=t.r+n.r-1e-6,r=n.x-t.x,i=n.y-t.y;return e>0&&e*e>r*r+i*i}function kd(t){var n=t._,e=t.next._,r=n.r+e.r,i=(n.x*e.r+e.x*n.r)/r,u=(n.y*e.r+e.y*n.r)/r;return i*i+u*u}function Ad(t){this._=t,this.next=null,this.previous=null}function Nd(t){if(!(i=t.length))return 0;var n,e,r,i,u,o,a,c,f,s,l;if((n=t[0]).x=0,n.y=0,!(i>1))return n.r;if(e=t[1],n.x=-e.r,e.x=n.r,e.y=0,!(i>2))return n.r+e.r;Md(e,n,r=t[2]),n=new Ad(n),e=new Ad(e),r=new Ad(r),n.next=r.previous=e,e.next=n.previous=r,r.next=e.previous=n;t:for(a=3;a<i;++a){Md(n._,e._,r=t[a]),r=new Ad(r),c=e.next,f=n.previous,s=e._.r,l=n._.r;do{if(s<=l){if(Td(c._,r._)){e=c,n.next=e,e.previous=n,--a;continue t}s+=c._.r,c=c.next}else{if(Td(f._,r._)){(n=f).next=e,e.previous=n,--a;continue t}l+=f._.r,f=f.previous}}while(c!==f.next);for(r.previous=n,r.next=e,n.next=e.previous=e=r,u=kd(n);(r=r.next)!==e;)(o=kd(r))<u&&(n=r,u=o);e=n.next}for(n=[e._],r=e;(r=r.next)!==e;)n.push(r._);for(r=gd(n),a=0;a<i;++a)(n=t[a]).x-=r.x,n.y-=r.y;return r.r}var Cd=function(t){return Nd(t),t};function Sd(t){return null==t?null:Ed(t)}function Ed(t){if("function"!=typeof t)throw new Error;return t}function Vd(){return 0}var Pd=function(t){return function(){return t}};function Dd(t){return Math.sqrt(t.value)}var zd=function(){var t=null,n=1,e=1,r=Vd;function i(i){return i.x=n/2,i.y=e/2,t?i.eachBefore(Rd(t)).eachAfter(Ld(r,.5)).eachBefore(Yd(1)):i.eachBefore(Rd(Dd)).eachAfter(Ld(Vd,1)).eachAfter(Ld(r,i.r/Math.min(n,e))).eachBefore(Yd(Math.min(n,e)/(2*i.r))),i}return i.radius=function(n){return arguments.length?(t=Sd(n),i):t},i.size=function(t){return arguments.length?(n=+t[0],e=+t[1],i):[n,e]},i.padding=function(t){return arguments.length?(r="function"==typeof t?t:Pd(+t),i):r},i};function Rd(t){return function(n){n.children||(n.r=Math.max(0,+t(n)||0))}}function Ld(t,n){return function(e){if(r=e.children){var r,i,u,o=r.length,a=t(e)*n||0;if(a)for(i=0;i<o;++i)r[i].r+=a;if(u=Nd(r),a)for(i=0;i<o;++i)r[i].r-=a;e.r=u+a}}}function Yd(t){return function(n){var e=n.parent;n.r*=t,e&&(n.x=e.x+t*n.x,n.y=e.y+t*n.y)}}var Ud=function(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)},Bd=function(t,n,e,r,i){for(var u,o=t.children,a=-1,c=o.length,f=t.value&&(r-n)/t.value;++a<c;)(u=o[a]).y0=e,u.y1=i,u.x0=n,u.x1=n+=u.value*f},Id=function(){var t=1,n=1,e=0,r=!1;function i(i){var u=i.height+1;return i.x0=i.y0=e,i.x1=t,i.y1=n/u,i.eachBefore(function(t,n){return function(r){r.children&&Bd(r,r.x0,t*(r.depth+1)/n,r.x1,t*(r.depth+2)/n);var i=r.x0,u=r.y0,o=r.x1-e,a=r.y1-e;o<i&&(i=o=(i+o)/2),a<u&&(u=a=(u+a)/2),r.x0=i,r.y0=u,r.x1=o,r.y1=a}}(n,u)),r&&i.eachBefore(Ud),i}return i.round=function(t){return arguments.length?(r=!!t,i):r},i.size=function(e){return arguments.length?(t=+e[0],n=+e[1],i):[t,n]},i.padding=function(t){return arguments.length?(e=+t,i):e},i},Od={depth:-1},Fd={};function qd(t){return t.id}function Xd(t){return t.parentId}var jd=function(){var t=qd,n=Xd;function e(e){var r,i,u,o,a,c,f,s=e.length,l=new Array(s),h={};for(i=0;i<s;++i)r=e[i],a=l[i]=new dd(r),null!=(c=t(r,i,e))&&(c+="")&&(h[f="$"+(a.id=c)]=f in h?Fd:a);for(i=0;i<s;++i)if(a=l[i],null!=(c=n(e[i],i,e))&&(c+="")){if(!(o=h["$"+c]))throw new Error("missing: "+c);if(o===Fd)throw new Error("ambiguous: "+c);o.children?o.children.push(a):o.children=[a],a.parent=o}else{if(u)throw new Error("multiple roots");u=a}if(!u)throw new Error("no root");if(u.parent=Od,u.eachBefore((function(t){t.depth=t.parent.depth+1,--s})).eachBefore(hd),u.parent=null,s>0)throw new Error("cycle");return u}return e.id=function(n){return arguments.length?(t=Ed(n),e):t},e.parentId=function(t){return arguments.length?(n=Ed(t),e):n},e};function Hd(t,n){return t.parent===n.parent?1:2}function Kd(t){var n=t.children;return n?n[0]:t.t}function Gd(t){var n=t.children;return n?n[n.length-1]:t.t}function Wd(t,n,e){var r=e/(n.i-t.i);n.c-=r,n.s+=e,t.c+=r,n.z+=e,n.m+=e}function $d(t,n,e){return t.a.parent===n.parent?t.a:e}function Zd(t,n){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=n}Zd.prototype=Object.create(dd.prototype);var Qd=function(){var t=Hd,n=1,e=1,r=null;function i(i){var c=function(t){for(var n,e,r,i,u,o=new Zd(t,0),a=[o];n=a.pop();)if(r=n._.children)for(n.children=new Array(u=r.length),i=u-1;i>=0;--i)a.push(e=n.children[i]=new Zd(r[i],i)),e.parent=n;return(o.parent=new Zd(null,0)).children=[o],o}(i);if(c.eachAfter(u),c.parent.m=-c.z,c.eachBefore(o),r)i.eachBefore(a);else{var f=i,s=i,l=i;i.eachBefore((function(t){t.x<f.x&&(f=t),t.x>s.x&&(s=t),t.depth>l.depth&&(l=t)}));var h=f===s?1:t(f,s)/2,d=h-f.x,p=n/(s.x+h+d),g=e/(l.depth||1);i.eachBefore((function(t){t.x=(t.x+d)*p,t.y=t.depth*g}))}return i}function u(n){var e=n.children,r=n.parent.children,i=n.i?r[n.i-1]:null;if(e){!function(t){for(var n,e=0,r=0,i=t.children,u=i.length;--u>=0;)(n=i[u]).z+=e,n.m+=e,e+=n.s+(r+=n.c)}(n);var u=(e[0].z+e[e.length-1].z)/2;i?(n.z=i.z+t(n._,i._),n.m=n.z-u):n.z=u}else i&&(n.z=i.z+t(n._,i._));n.parent.A=function(n,e,r){if(e){for(var i,u=n,o=n,a=e,c=u.parent.children[0],f=u.m,s=o.m,l=a.m,h=c.m;a=Gd(a),u=Kd(u),a&&u;)c=Kd(c),(o=Gd(o)).a=n,(i=a.z+l-u.z-f+t(a._,u._))>0&&(Wd($d(a,n,r),n,i),f+=i,s+=i),l+=a.m,f+=u.m,h+=c.m,s+=o.m;a&&!Gd(o)&&(o.t=a,o.m+=l-s),u&&!Kd(c)&&(c.t=u,c.m+=f-h,r=n)}return r}(n,i,n.parent.A||r[0])}function o(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function a(t){t.x*=n,t.y=t.depth*e}return i.separation=function(n){return arguments.length?(t=n,i):t},i.size=function(t){return arguments.length?(r=!1,n=+t[0],e=+t[1],i):r?null:[n,e]},i.nodeSize=function(t){return arguments.length?(r=!0,n=+t[0],e=+t[1],i):r?[n,e]:null},i},Jd=function(t,n,e,r,i){for(var u,o=t.children,a=-1,c=o.length,f=t.value&&(i-e)/t.value;++a<c;)(u=o[a]).x0=n,u.x1=r,u.y0=e,u.y1=e+=u.value*f},tp=(1+Math.sqrt(5))/2;function np(t,n,e,r,i,u){for(var o,a,c,f,s,l,h,d,p,g,_,v=[],y=n.children,m=0,b=0,x=y.length,w=n.value;m<x;){c=i-e,f=u-r;do{s=y[b++].value}while(!s&&b<x);for(l=h=s,_=s*s*(g=Math.max(f/c,c/f)/(w*t)),p=Math.max(h/_,_/l);b<x;++b){if(s+=a=y[b].value,a<l&&(l=a),a>h&&(h=a),_=s*s*g,(d=Math.max(h/_,_/l))>p){s-=a;break}p=d}v.push(o={value:s,dice:c<f,children:y.slice(m,b)}),o.dice?Bd(o,e,r,i,w?r+=f*s/w:u):Jd(o,e,r,w?e+=c*s/w:i,u),w-=s,m=b}return v}var ep=function t(n){function e(t,e,r,i,u){np(n,t,e,r,i,u)}return e.ratio=function(n){return t((n=+n)>1?n:1)},e}(tp),rp=function(){var t=ep,n=!1,e=1,r=1,i=[0],u=Vd,o=Vd,a=Vd,c=Vd,f=Vd;function s(t){return t.x0=t.y0=0,t.x1=e,t.y1=r,t.eachBefore(l),i=[0],n&&t.eachBefore(Ud),t}function l(n){var e=i[n.depth],r=n.x0+e,s=n.y0+e,l=n.x1-e,h=n.y1-e;l<r&&(r=l=(r+l)/2),h<s&&(s=h=(s+h)/2),n.x0=r,n.y0=s,n.x1=l,n.y1=h,n.children&&(e=i[n.depth+1]=u(n)/2,r+=f(n)-e,s+=o(n)-e,(l-=a(n)-e)<r&&(r=l=(r+l)/2),(h-=c(n)-e)<s&&(s=h=(s+h)/2),t(n,r,s,l,h))}return s.round=function(t){return arguments.length?(n=!!t,s):n},s.size=function(t){return arguments.length?(e=+t[0],r=+t[1],s):[e,r]},s.tile=function(n){return arguments.length?(t=Ed(n),s):t},s.padding=function(t){return arguments.length?s.paddingInner(t).paddingOuter(t):s.paddingInner()},s.paddingInner=function(t){return arguments.length?(u="function"==typeof t?t:Pd(+t),s):u},s.paddingOuter=function(t){return arguments.length?s.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):s.paddingTop()},s.paddingTop=function(t){return arguments.length?(o="function"==typeof t?t:Pd(+t),s):o},s.paddingRight=function(t){return arguments.length?(a="function"==typeof t?t:Pd(+t),s):a},s.paddingBottom=function(t){return arguments.length?(c="function"==typeof t?t:Pd(+t),s):c},s.paddingLeft=function(t){return arguments.length?(f="function"==typeof t?t:Pd(+t),s):f},s},ip=function(t,n,e,r,i){var u,o,a=t.children,c=a.length,f=new Array(c+1);for(f[0]=o=u=0;u<c;++u)f[u+1]=o+=a[u].value;!function t(n,e,r,i,u,o,c){if(n>=e-1){var s=a[n];return s.x0=i,s.y0=u,s.x1=o,void(s.y1=c)}var l=f[n],h=r/2+l,d=n+1,p=e-1;for(;d<p;){var g=d+p>>>1;f[g]<h?d=g+1:p=g}h-f[d-1]<f[d]-h&&n+1<d&&--d;var _=f[d]-l,v=r-_;if(o-i>c-u){var y=(i*v+o*_)/r;t(n,d,_,i,u,y,c),t(d,e,v,y,u,o,c)}else{var m=(u*v+c*_)/r;t(n,d,_,i,u,o,m),t(d,e,v,i,m,o,c)}}(0,c,t.value,n,e,r,i)},up=function(t,n,e,r,i){(1&t.depth?Jd:Bd)(t,n,e,r,i)},op=function t(n){function e(t,e,r,i,u){if((o=t._squarify)&&o.ratio===n)for(var o,a,c,f,s,l=-1,h=o.length,d=t.value;++l<h;){for(c=(a=o[l]).children,f=a.value=0,s=c.length;f<s;++f)a.value+=c[f].value;a.dice?Bd(a,e,r,i,r+=(u-r)*a.value/d):Jd(a,e,r,e+=(i-e)*a.value/d,u),d-=a.value}else t._squarify=o=np(n,t,e,r,i,u),o.ratio=n}return e.ratio=function(n){return t((n=+n)>1?n:1)},e}(tp),ap=function(t){var n=t.length;return function(e){return t[Math.max(0,Math.min(n-1,Math.floor(e*n)))]}},cp=function(t,n){var e=fe(+t,+n);return function(t){var n=e(t);return n-360*Math.floor(n/360)}},fp=function(t,n){return t=+t,n=+n,function(e){return Math.round(t*(1-e)+n*e)}},sp=Math.SQRT2;function lp(t){return((t=Math.exp(t))+1/t)/2}var hp=function(t,n){var e,r,i=t[0],u=t[1],o=t[2],a=n[0],c=n[1],f=n[2],s=a-i,l=c-u,h=s*s+l*l;if(h<1e-12)r=Math.log(f/o)/sp,e=function(t){return[i+t*s,u+t*l,o*Math.exp(sp*t*r)]};else{var d=Math.sqrt(h),p=(f*f-o*o+4*h)/(2*o*2*d),g=(f*f-o*o-4*h)/(2*f*2*d),_=Math.log(Math.sqrt(p*p+1)-p),v=Math.log(Math.sqrt(g*g+1)-g);r=(v-_)/sp,e=function(t){var n,e=t*r,a=lp(_),c=o/(2*d)*(a*(n=sp*e+_,((n=Math.exp(2*n))-1)/(n+1))-function(t){return((t=Math.exp(t))-1/t)/2}(_));return[i+c*s,u+c*l,o*a/lp(sp*e+_)]}}return e.duration=1e3*r,e};function dp(t){return function(n,e){var r=t((n=ne(n)).h,(e=ne(e)).h),i=le(n.s,e.s),u=le(n.l,e.l),o=le(n.opacity,e.opacity);return function(t){return n.h=r(t),n.s=i(t),n.l=u(t),n.opacity=o(t),n+""}}}var pp=dp(fe),gp=dp(le);function _p(t,n){var e=le((t=pu(t)).l,(n=pu(n)).l),r=le(t.a,n.a),i=le(t.b,n.b),u=le(t.opacity,n.opacity);return function(n){return t.l=e(n),t.a=r(n),t.b=i(n),t.opacity=u(n),t+""}}function vp(t){return function(n,e){var r=t((n=wu(n)).h,(e=wu(e)).h),i=le(n.c,e.c),u=le(n.l,e.l),o=le(n.opacity,e.opacity);return function(t){return n.h=r(t),n.c=i(t),n.l=u(t),n.opacity=o(t),n+""}}}var yp=vp(fe),mp=vp(le);function bp(t){return function n(e){function r(n,r){var i=t((n=Eu(n)).h,(r=Eu(r)).h),u=le(n.s,r.s),o=le(n.l,r.l),a=le(n.opacity,r.opacity);return function(t){return n.h=i(t),n.s=u(t),n.l=o(Math.pow(t,e)),n.opacity=a(t),n+""}}return e=+e,r.gamma=n,r}(1)}var xp=bp(fe),wp=bp(le);function Mp(t,n){for(var e=0,r=n.length-1,i=n[0],u=new Array(r<0?0:r);e<r;)u[e]=t(i,i=n[++e]);return function(t){var n=Math.max(0,Math.min(r-1,Math.floor(t*=r)));return u[n](t-n)}}var Tp=function(t,n){for(var e=new Array(n),r=0;r<n;++r)e[r]=t(r/(n-1));return e},kp=function(t){for(var n,e=-1,r=t.length,i=t[r-1],u=0;++e<r;)n=i,i=t[e],u+=n[1]*i[0]-n[0]*i[1];return u/2},Ap=function(t){for(var n,e,r=-1,i=t.length,u=0,o=0,a=t[i-1],c=0;++r<i;)n=a,a=t[r],c+=e=n[0]*a[1]-a[0]*n[1],u+=(n[0]+a[0])*e,o+=(n[1]+a[1])*e;return[u/(c*=3),o/c]};function Np(t,n){return t[0]-n[0]||t[1]-n[1]}function Cp(t){for(var n,e,r,i=t.length,u=[0,1],o=2,a=2;a<i;++a){for(;o>1&&(n=t[u[o-2]],e=t[u[o-1]],r=t[a],(e[0]-n[0])*(r[1]-n[1])-(e[1]-n[1])*(r[0]-n[0])<=0);)--o;u[o++]=a}return u.slice(0,o)}var Sp=function(t){if((e=t.length)<3)return null;var n,e,r=new Array(e),i=new Array(e);for(n=0;n<e;++n)r[n]=[+t[n][0],+t[n][1],n];for(r.sort(Np),n=0;n<e;++n)i[n]=[r[n][0],-r[n][1]];var u=Cp(r),o=Cp(i),a=o[0]===u[0],c=o[o.length-1]===u[u.length-1],f=[];for(n=u.length-1;n>=0;--n)f.push(t[r[u[n]][2]]);for(n=+a;n<o.length-c;++n)f.push(t[r[o[n]][2]]);return f},Ep=function(t,n){for(var e,r,i=t.length,u=t[i-1],o=n[0],a=n[1],c=u[0],f=u[1],s=!1,l=0;l<i;++l)e=(u=t[l])[0],(r=u[1])>a!=f>a&&o<(c-e)*(a-r)/(f-r)+e&&(s=!s),c=e,f=r;return s},Vp=function(t){for(var n,e,r=-1,i=t.length,u=t[i-1],o=u[0],a=u[1],c=0;++r<i;)n=o,e=a,n-=o=(u=t[r])[0],e-=a=u[1],c+=Math.sqrt(n*n+e*e);return c},Pp=function(){return Math.random()},Dp=function t(n){function e(t,e){return t=null==t?0:+t,e=null==e?1:+e,1===arguments.length?(e=t,t=0):e-=t,function(){return n()*e+t}}return e.source=t,e}(Pp),zp=function t(n){function e(t,e){var r,i;return t=null==t?0:+t,e=null==e?1:+e,function(){var u;if(null!=r)u=r,r=null;else do{r=2*n()-1,u=2*n()-1,i=r*r+u*u}while(!i||i>1);return t+e*u*Math.sqrt(-2*Math.log(i)/i)}}return e.source=t,e}(Pp),Rp=function t(n){function e(){var t=zp.source(n).apply(this,arguments);return function(){return Math.exp(t())}}return e.source=t,e}(Pp),Lp=function t(n){function e(t){return function(){for(var e=0,r=0;r<t;++r)e+=n();return e}}return e.source=t,e}(Pp),Yp=function t(n){function e(t){var e=Lp.source(n)(t);return function(){return e()/t}}return e.source=t,e}(Pp),Up=function t(n){function e(t){return function(){return-Math.log(1-n())/t}}return e.source=t,e}(Pp);function Bp(t,n){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(n).domain(t)}return this}function Ip(t,n){switch(arguments.length){case 0:break;case 1:this.interpolator(t);break;default:this.interpolator(n).domain(t)}return this}var Op=Array.prototype,Fp=Op.map,qp=Op.slice,Xp={name:"implicit"};function jp(){var t=Zi(),n=[],e=[],r=Xp;function i(i){var u=i+"",o=t.get(u);if(!o){if(r!==Xp)return r;t.set(u,o=n.push(i))}return e[(o-1)%e.length]}return i.domain=function(e){if(!arguments.length)return n.slice();n=[],t=Zi();for(var r,u,o=-1,a=e.length;++o<a;)t.has(u=(r=e[o])+"")||t.set(u,n.push(r));return i},i.range=function(t){return arguments.length?(e=qp.call(t),i):e.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return jp(n,e).unknown(r)},Bp.apply(i,arguments),i}function Hp(){var t,n,e=jp().unknown(void 0),r=e.domain,i=e.range,u=[0,1],o=!1,a=0,c=0,f=.5;function s(){var e=r().length,s=u[1]<u[0],l=u[s-0],h=u[1-s];t=(h-l)/Math.max(1,e-a+2*c),o&&(t=Math.floor(t)),l+=(h-l-t*(e-a))*f,n=t*(1-a),o&&(l=Math.round(l),n=Math.round(n));var d=w(e).map((function(n){return l+t*n}));return i(s?d.reverse():d)}return delete e.unknown,e.domain=function(t){return arguments.length?(r(t),s()):r()},e.range=function(t){return arguments.length?(u=[+t[0],+t[1]],s()):u.slice()},e.rangeRound=function(t){return u=[+t[0],+t[1]],o=!0,s()},e.bandwidth=function(){return n},e.step=function(){return t},e.round=function(t){return arguments.length?(o=!!t,s()):o},e.padding=function(t){return arguments.length?(a=Math.min(1,c=+t),s()):a},e.paddingInner=function(t){return arguments.length?(a=Math.min(1,t),s()):a},e.paddingOuter=function(t){return arguments.length?(c=+t,s()):c},e.align=function(t){return arguments.length?(f=Math.max(0,Math.min(1,t)),s()):f},e.copy=function(){return Hp(r(),u).round(o).paddingInner(a).paddingOuter(c).align(f)},Bp.apply(s(),arguments)}function Kp(t){var n=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return Kp(n())},t}function Gp(){return Kp(Hp.apply(null,arguments).paddingInner(1))}var Wp=function(t){return+t},$p=[0,1];function Zp(t){return t}function Qp(t,n){return(n-=t=+t)?function(e){return(e-t)/n}:(e=isNaN(n)?NaN:.5,function(){return e});var e}function Jp(t){var n,e=t[0],r=t[t.length-1];return e>r&&(n=e,e=r,r=n),function(t){return Math.max(e,Math.min(r,t))}}function tg(t,n,e){var r=t[0],i=t[1],u=n[0],o=n[1];return i<r?(r=Qp(i,r),u=e(o,u)):(r=Qp(r,i),u=e(u,o)),function(t){return u(r(t))}}function ng(t,n,e){var r=Math.min(t.length,n.length)-1,i=new Array(r),u=new Array(r),o=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),n=n.slice().reverse());++o<r;)i[o]=Qp(t[o],t[o+1]),u[o]=e(n[o],n[o+1]);return function(n){var e=c(t,n,1,r)-1;return u[e](i[e](n))}}function eg(t,n){return n.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function rg(){var t,n,e,r,i,u,o=$p,a=$p,c=Ce,f=Zp;function s(){return r=Math.min(o.length,a.length)>2?ng:tg,i=u=null,l}function l(n){return isNaN(n=+n)?e:(i||(i=r(o.map(t),a,c)))(t(f(n)))}return l.invert=function(e){return f(n((u||(u=r(a,o.map(t),xe)))(e)))},l.domain=function(t){return arguments.length?(o=Fp.call(t,Wp),f===Zp||(f=Jp(o)),s()):o.slice()},l.range=function(t){return arguments.length?(a=qp.call(t),s()):a.slice()},l.rangeRound=function(t){return a=qp.call(t),c=fp,s()},l.clamp=function(t){return arguments.length?(f=t?Jp(o):Zp,l):f!==Zp},l.interpolate=function(t){return arguments.length?(c=t,s()):c},l.unknown=function(t){return arguments.length?(e=t,l):e},function(e,r){return t=e,n=r,s()}}function ig(t,n){return rg()(t,n)}var ug=function(t,n,e,r){var i,u=C(t,n,e);switch((r=ja(null==r?",f":r)).type){case"s":var o=Math.max(Math.abs(t),Math.abs(n));return null!=r.precision||isNaN(i=uc(u,o))||(r.precision=i),$a(r,o);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=oc(u,Math.max(Math.abs(t),Math.abs(n))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=ic(u))||(r.precision=i-2*("%"===r.type))}return Wa(r)};function og(t){var n=t.domain;return t.ticks=function(t){var e=n();return A(e[0],e[e.length-1],null==t?10:t)},t.tickFormat=function(t,e){var r=n();return ug(r[0],r[r.length-1],null==t?10:t,e)},t.nice=function(e){null==e&&(e=10);var r,i=n(),u=0,o=i.length-1,a=i[u],c=i[o];return c<a&&(r=a,a=c,c=r,r=u,u=o,o=r),(r=N(a,c,e))>0?r=N(a=Math.floor(a/r)*r,c=Math.ceil(c/r)*r,e):r<0&&(r=N(a=Math.ceil(a*r)/r,c=Math.floor(c*r)/r,e)),r>0?(i[u]=Math.floor(a/r)*r,i[o]=Math.ceil(c/r)*r,n(i)):r<0&&(i[u]=Math.ceil(a*r)/r,i[o]=Math.floor(c*r)/r,n(i)),t},t}function ag(){var t=ig(Zp,Zp);return t.copy=function(){return eg(t,ag())},Bp.apply(t,arguments),og(t)}function cg(t){var n;function e(t){return isNaN(t=+t)?n:t}return e.invert=e,e.domain=e.range=function(n){return arguments.length?(t=Fp.call(n,Wp),e):t.slice()},e.unknown=function(t){return arguments.length?(n=t,e):n},e.copy=function(){return cg(t).unknown(n)},t=arguments.length?Fp.call(t,Wp):[0,1],og(e)}var fg=function(t,n){var e,r=0,i=(t=t.slice()).length-1,u=t[r],o=t[i];return o<u&&(e=r,r=i,i=e,e=u,u=o,o=e),t[r]=n.floor(u),t[i]=n.ceil(o),t};function sg(t){return Math.log(t)}function lg(t){return Math.exp(t)}function hg(t){return-Math.log(-t)}function dg(t){return-Math.exp(-t)}function pg(t){return isFinite(t)?+("1e"+t):t<0?0:t}function gg(t){return function(n){return-t(-n)}}function _g(t){var n,e,r=t(sg,lg),i=r.domain,u=10;function o(){return n=function(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),function(n){return Math.log(n)/t})}(u),e=function(t){return 10===t?pg:t===Math.E?Math.exp:function(n){return Math.pow(t,n)}}(u),i()[0]<0?(n=gg(n),e=gg(e),t(hg,dg)):t(sg,lg),r}return r.base=function(t){return arguments.length?(u=+t,o()):u},r.domain=function(t){return arguments.length?(i(t),o()):i()},r.ticks=function(t){var r,o=i(),a=o[0],c=o[o.length-1];(r=c<a)&&(h=a,a=c,c=h);var f,s,l,h=n(a),d=n(c),p=null==t?10:+t,g=[];if(!(u%1)&&d-h<p){if(h=Math.round(h)-1,d=Math.round(d)+1,a>0){for(;h<d;++h)for(s=1,f=e(h);s<u;++s)if(!((l=f*s)<a)){if(l>c)break;g.push(l)}}else for(;h<d;++h)for(s=u-1,f=e(h);s>=1;--s)if(!((l=f*s)<a)){if(l>c)break;g.push(l)}}else g=A(h,d,Math.min(d-h,p)).map(e);return r?g.reverse():g},r.tickFormat=function(t,i){if(null==i&&(i=10===u?".0e":","),"function"!=typeof i&&(i=Wa(i)),t===1/0)return i;null==t&&(t=10);var o=Math.max(1,u*t/r.ticks().length);return function(t){var r=t/e(Math.round(n(t)));return r*u<u-.5&&(r*=u),r<=o?i(t):""}},r.nice=function(){return i(fg(i(),{floor:function(t){return e(Math.floor(n(t)))},ceil:function(t){return e(Math.ceil(n(t)))}}))},r}function vg(){var t=_g(rg()).domain([1,10]);return t.copy=function(){return eg(t,vg()).base(t.base())},Bp.apply(t,arguments),t}function yg(t){return function(n){return Math.sign(n)*Math.log1p(Math.abs(n/t))}}function mg(t){return function(n){return Math.sign(n)*Math.expm1(Math.abs(n))*t}}function bg(t){var n=1,e=t(yg(n),mg(n));return e.constant=function(e){return arguments.length?t(yg(n=+e),mg(n)):n},og(e)}function xg(){var t=bg(rg());return t.copy=function(){return eg(t,xg()).constant(t.constant())},Bp.apply(t,arguments)}function wg(t){return function(n){return n<0?-Math.pow(-n,t):Math.pow(n,t)}}function Mg(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function Tg(t){return t<0?-t*t:t*t}function kg(t){var n=t(Zp,Zp),e=1;function r(){return 1===e?t(Zp,Zp):.5===e?t(Mg,Tg):t(wg(e),wg(1/e))}return n.exponent=function(t){return arguments.length?(e=+t,r()):e},og(n)}function Ag(){var t=kg(rg());return t.copy=function(){return eg(t,Ag()).exponent(t.exponent())},Bp.apply(t,arguments),t}function Ng(){return Ag.apply(null,arguments).exponent(.5)}function Cg(){var t,n=[],e=[],i=[];function u(){var t=0,r=Math.max(1,e.length);for(i=new Array(r-1);++t<r;)i[t-1]=V(n,t/r);return o}function o(n){return isNaN(n=+n)?t:e[c(i,n)]}return o.invertExtent=function(t){var r=e.indexOf(t);return r<0?[NaN,NaN]:[r>0?i[r-1]:n[0],r<i.length?i[r]:n[n.length-1]]},o.domain=function(t){if(!arguments.length)return n.slice();n=[];for(var e,i=0,o=t.length;i<o;++i)null==(e=t[i])||isNaN(e=+e)||n.push(e);return n.sort(r),u()},o.range=function(t){return arguments.length?(e=qp.call(t),u()):e.slice()},o.unknown=function(n){return arguments.length?(t=n,o):t},o.quantiles=function(){return i.slice()},o.copy=function(){return Cg().domain(n).range(e).unknown(t)},Bp.apply(o,arguments)}function Sg(){var t,n=0,e=1,r=1,i=[.5],u=[0,1];function o(n){return n<=n?u[c(i,n,0,r)]:t}function a(){var t=-1;for(i=new Array(r);++t<r;)i[t]=((t+1)*e-(t-r)*n)/(r+1);return o}return o.domain=function(t){return arguments.length?(n=+t[0],e=+t[1],a()):[n,e]},o.range=function(t){return arguments.length?(r=(u=qp.call(t)).length-1,a()):u.slice()},o.invertExtent=function(t){var o=u.indexOf(t);return o<0?[NaN,NaN]:o<1?[n,i[0]]:o>=r?[i[r-1],e]:[i[o-1],i[o]]},o.unknown=function(n){return arguments.length?(t=n,o):o},o.thresholds=function(){return i.slice()},o.copy=function(){return Sg().domain([n,e]).range(u).unknown(t)},Bp.apply(og(o),arguments)}function Eg(){var t,n=[.5],e=[0,1],r=1;function i(i){return i<=i?e[c(n,i,0,r)]:t}return i.domain=function(t){return arguments.length?(n=qp.call(t),r=Math.min(n.length,e.length-1),i):n.slice()},i.range=function(t){return arguments.length?(e=qp.call(t),r=Math.min(n.length,e.length-1),i):e.slice()},i.invertExtent=function(t){var r=e.indexOf(t);return[n[r-1],n[r]]},i.unknown=function(n){return arguments.length?(t=n,i):t},i.copy=function(){return Eg().domain(n).range(e).unknown(t)},Bp.apply(i,arguments)}var Vg=new Date,Pg=new Date;function Dg(t,n,e,r){function i(n){return t(n=0===arguments.length?new Date:new Date(+n)),n}return i.floor=function(n){return t(n=new Date(+n)),n},i.ceil=function(e){return t(e=new Date(e-1)),n(e,1),t(e),e},i.round=function(t){var n=i(t),e=i.ceil(t);return t-n<e-t?n:e},i.offset=function(t,e){return n(t=new Date(+t),null==e?1:Math.floor(e)),t},i.range=function(e,r,u){var o,a=[];if(e=i.ceil(e),u=null==u?1:Math.floor(u),!(e<r&&u>0))return a;do{a.push(o=new Date(+e)),n(e,u),t(e)}while(o<e&&e<r);return a},i.filter=function(e){return Dg((function(n){if(n>=n)for(;t(n),!e(n);)n.setTime(n-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;n(t,-1),!e(t););else for(;--r>=0;)for(;n(t,1),!e(t););}))},e&&(i.count=function(n,r){return Vg.setTime(+n),Pg.setTime(+r),t(Vg),t(Pg),Math.floor(e(Vg,Pg))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(n){return r(n)%t==0}:function(n){return i.count(0,n)%t==0}):i:null}),i}var zg=Dg((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n)}),(function(t,n){return n.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));zg.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Dg((function(n){n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)}),(function(n,e){n.setFullYear(n.getFullYear()+e*t)})):null};var Rg=zg,Lg=zg.range,Yg=Dg((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,n){t.setMonth(t.getMonth()+n)}),(function(t,n){return n.getMonth()-t.getMonth()+12*(n.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()})),Ug=Yg,Bg=Yg.range;function Ig(t){return Dg((function(n){n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)}),(function(t,n){t.setDate(t.getDate()+7*n)}),(function(t,n){return(n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/6048e5}))}var Og=Ig(0),Fg=Ig(1),qg=Ig(2),Xg=Ig(3),jg=Ig(4),Hg=Ig(5),Kg=Ig(6),Gg=Og.range,Wg=Fg.range,$g=qg.range,Zg=Xg.range,Qg=jg.range,Jg=Hg.range,t_=Kg.range,n_=Dg((function(t){t.setHours(0,0,0,0)}),(function(t,n){t.setDate(t.getDate()+n)}),(function(t,n){return(n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/864e5}),(function(t){return t.getDate()-1})),e_=n_,r_=n_.range,i_=Dg((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-6e4*t.getMinutes())}),(function(t,n){t.setTime(+t+36e5*n)}),(function(t,n){return(n-t)/36e5}),(function(t){return t.getHours()})),u_=i_,o_=i_.range,a_=Dg((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())}),(function(t,n){t.setTime(+t+6e4*n)}),(function(t,n){return(n-t)/6e4}),(function(t){return t.getMinutes()})),c_=a_,f_=a_.range,s_=Dg((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,n){t.setTime(+t+1e3*n)}),(function(t,n){return(n-t)/1e3}),(function(t){return t.getUTCSeconds()})),l_=s_,h_=s_.range,d_=Dg((function(){}),(function(t,n){t.setTime(+t+n)}),(function(t,n){return n-t}));d_.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?Dg((function(n){n.setTime(Math.floor(n/t)*t)}),(function(n,e){n.setTime(+n+e*t)}),(function(n,e){return(e-n)/t})):d_:null};var p_=d_,g_=d_.range;function __(t){return Dg((function(n){n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCDate(t.getUTCDate()+7*n)}),(function(t,n){return(n-t)/6048e5}))}var v_=__(0),y_=__(1),m_=__(2),b_=__(3),x_=__(4),w_=__(5),M_=__(6),T_=v_.range,k_=y_.range,A_=m_.range,N_=b_.range,C_=x_.range,S_=w_.range,E_=M_.range,V_=Dg((function(t){t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCDate(t.getUTCDate()+n)}),(function(t,n){return(n-t)/864e5}),(function(t){return t.getUTCDate()-1})),P_=V_,D_=V_.range,z_=Dg((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n)}),(function(t,n){return n.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));z_.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Dg((function(n){n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)}),(function(n,e){n.setUTCFullYear(n.getUTCFullYear()+e*t)})):null};var R_=z_,L_=z_.range;function Y_(t){if(0<=t.y&&t.y<100){var n=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return n.setFullYear(t.y),n}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function U_(t){if(0<=t.y&&t.y<100){var n=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return n.setUTCFullYear(t.y),n}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function B_(t,n,e){return{y:t,m:n,d:e,H:0,M:0,S:0,L:0}}function I_(t){var n=t.dateTime,e=t.date,r=t.time,i=t.periods,u=t.days,o=t.shortDays,a=t.months,c=t.shortMonths,f=Q_(i),s=J_(i),l=Q_(u),h=J_(u),d=Q_(o),p=J_(o),g=Q_(a),_=J_(a),v=Q_(c),y=J_(c),m={a:function(t){return o[t.getDay()]},A:function(t){return u[t.getDay()]},b:function(t){return c[t.getMonth()]},B:function(t){return a[t.getMonth()]},c:null,d:bv,e:bv,f:kv,H:xv,I:wv,j:Mv,L:Tv,m:Av,M:Nv,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:ny,s:ey,S:Cv,u:Sv,U:Ev,V:Vv,w:Pv,W:Dv,x:null,X:null,y:zv,Y:Rv,Z:Lv,"%":ty},b={a:function(t){return o[t.getUTCDay()]},A:function(t){return u[t.getUTCDay()]},b:function(t){return c[t.getUTCMonth()]},B:function(t){return a[t.getUTCMonth()]},c:null,d:Yv,e:Yv,f:Fv,H:Uv,I:Bv,j:Iv,L:Ov,m:qv,M:Xv,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:ny,s:ey,S:jv,u:Hv,U:Kv,V:Gv,w:Wv,W:$v,x:null,X:null,y:Zv,Y:Qv,Z:Jv,"%":ty},x={a:function(t,n,e){var r=d.exec(n.slice(e));return r?(t.w=p[r[0].toLowerCase()],e+r[0].length):-1},A:function(t,n,e){var r=l.exec(n.slice(e));return r?(t.w=h[r[0].toLowerCase()],e+r[0].length):-1},b:function(t,n,e){var r=v.exec(n.slice(e));return r?(t.m=y[r[0].toLowerCase()],e+r[0].length):-1},B:function(t,n,e){var r=g.exec(n.slice(e));return r?(t.m=_[r[0].toLowerCase()],e+r[0].length):-1},c:function(t,e,r){return T(t,n,e,r)},d:sv,e:sv,f:_v,H:hv,I:hv,j:lv,L:gv,m:fv,M:dv,p:function(t,n,e){var r=f.exec(n.slice(e));return r?(t.p=s[r[0].toLowerCase()],e+r[0].length):-1},q:cv,Q:yv,s:mv,S:pv,u:nv,U:ev,V:rv,w:tv,W:iv,x:function(t,n,r){return T(t,e,n,r)},X:function(t,n,e){return T(t,r,n,e)},y:ov,Y:uv,Z:av,"%":vv};function w(t,n){return function(e){var r,i,u,o=[],a=-1,c=0,f=t.length;for(e instanceof Date||(e=new Date(+e));++a<f;)37===t.charCodeAt(a)&&(o.push(t.slice(c,a)),null!=(i=H_[r=t.charAt(++a)])?r=t.charAt(++a):i="e"===r?" ":"0",(u=n[r])&&(r=u(e,i)),o.push(r),c=a+1);return o.push(t.slice(c,a)),o.join("")}}function M(t,n){return function(e){var r,i,u=B_(1900,void 0,1);if(T(u,t,e+="",0)!=e.length)return null;if("Q"in u)return new Date(u.Q);if("s"in u)return new Date(1e3*u.s+("L"in u?u.L:0));if(!n||"Z"in u||(u.Z=0),"p"in u&&(u.H=u.H%12+12*u.p),void 0===u.m&&(u.m="q"in u?u.q:0),"V"in u){if(u.V<1||u.V>53)return null;"w"in u||(u.w=1),"Z"in u?(i=(r=U_(B_(u.y,0,1))).getUTCDay(),r=i>4||0===i?y_.ceil(r):y_(r),r=P_.offset(r,7*(u.V-1)),u.y=r.getUTCFullYear(),u.m=r.getUTCMonth(),u.d=r.getUTCDate()+(u.w+6)%7):(i=(r=Y_(B_(u.y,0,1))).getDay(),r=i>4||0===i?Fg.ceil(r):Fg(r),r=e_.offset(r,7*(u.V-1)),u.y=r.getFullYear(),u.m=r.getMonth(),u.d=r.getDate()+(u.w+6)%7)}else("W"in u||"U"in u)&&("w"in u||(u.w="u"in u?u.u%7:"W"in u?1:0),i="Z"in u?U_(B_(u.y,0,1)).getUTCDay():Y_(B_(u.y,0,1)).getDay(),u.m=0,u.d="W"in u?(u.w+6)%7+7*u.W-(i+5)%7:u.w+7*u.U-(i+6)%7);return"Z"in u?(u.H+=u.Z/100|0,u.M+=u.Z%100,U_(u)):Y_(u)}}function T(t,n,e,r){for(var i,u,o=0,a=n.length,c=e.length;o<a;){if(r>=c)return-1;if(37===(i=n.charCodeAt(o++))){if(i=n.charAt(o++),!(u=x[i in H_?n.charAt(o++):i])||(r=u(t,e,r))<0)return-1}else if(i!=e.charCodeAt(r++))return-1}return r}return(m.x=w(e,m),m.X=w(r,m),m.c=w(n,m),b.x=w(e,b),b.X=w(r,b),b.c=w(n,b),{format:function(t){var n=w(t+="",m);return n.toString=function(){return t},n},parse:function(t){var n=M(t+="",!1);return n.toString=function(){return t},n},utcFormat:function(t){var n=w(t+="",b);return n.toString=function(){return t},n},utcParse:function(t){var n=M(t+="",!0);return n.toString=function(){return t},n}})}var O_,F_,q_,X_,j_,H_={"-":"",_:" ",0:"0"},K_=/^\\s*\\d+/,G_=/^%/,W_=/[\\\\^$*+?|[\\]().{}]/g;function $_(t,n,e){var r=t<0?"-":"",i=(r?-t:t)+"",u=i.length;return r+(u<e?new Array(e-u+1).join(n)+i:i)}function Z_(t){return t.replace(W_,"\\\\$&")}function Q_(t){return new RegExp("^(?:"+t.map(Z_).join("|")+")","i")}function J_(t){for(var n={},e=-1,r=t.length;++e<r;)n[t[e].toLowerCase()]=e;return n}function tv(t,n,e){var r=K_.exec(n.slice(e,e+1));return r?(t.w=+r[0],e+r[0].length):-1}function nv(t,n,e){var r=K_.exec(n.slice(e,e+1));return r?(t.u=+r[0],e+r[0].length):-1}function ev(t,n,e){var r=K_.exec(n.slice(e,e+2));return r?(t.U=+r[0],e+r[0].length):-1}function rv(t,n,e){var r=K_.exec(n.slice(e,e+2));return r?(t.V=+r[0],e+r[0].length):-1}function iv(t,n,e){var r=K_.exec(n.slice(e,e+2));return r?(t.W=+r[0],e+r[0].length):-1}function uv(t,n,e){var r=K_.exec(n.slice(e,e+4));return r?(t.y=+r[0],e+r[0].length):-1}function ov(t,n,e){var r=K_.exec(n.slice(e,e+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),e+r[0].length):-1}function av(t,n,e){var r=/^(Z)|([+-]\\d\\d)(?::?(\\d\\d))?/.exec(n.slice(e,e+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),e+r[0].length):-1}function cv(t,n,e){var r=K_.exec(n.slice(e,e+1));return r?(t.q=3*r[0]-3,e+r[0].length):-1}function fv(t,n,e){var r=K_.exec(n.slice(e,e+2));return r?(t.m=r[0]-1,e+r[0].length):-1}function sv(t,n,e){var r=K_.exec(n.slice(e,e+2));return r?(t.d=+r[0],e+r[0].length):-1}function lv(t,n,e){var r=K_.exec(n.slice(e,e+3));return r?(t.m=0,t.d=+r[0],e+r[0].length):-1}function hv(t,n,e){var r=K_.exec(n.slice(e,e+2));return r?(t.H=+r[0],e+r[0].length):-1}function dv(t,n,e){var r=K_.exec(n.slice(e,e+2));return r?(t.M=+r[0],e+r[0].length):-1}function pv(t,n,e){var r=K_.exec(n.slice(e,e+2));return r?(t.S=+r[0],e+r[0].length):-1}function gv(t,n,e){var r=K_.exec(n.slice(e,e+3));return r?(t.L=+r[0],e+r[0].length):-1}function _v(t,n,e){var r=K_.exec(n.slice(e,e+6));return r?(t.L=Math.floor(r[0]/1e3),e+r[0].length):-1}function vv(t,n,e){var r=G_.exec(n.slice(e,e+1));return r?e+r[0].length:-1}function yv(t,n,e){var r=K_.exec(n.slice(e));return r?(t.Q=+r[0],e+r[0].length):-1}function mv(t,n,e){var r=K_.exec(n.slice(e));return r?(t.s=+r[0],e+r[0].length):-1}function bv(t,n){return $_(t.getDate(),n,2)}function xv(t,n){return $_(t.getHours(),n,2)}function wv(t,n){return $_(t.getHours()%12||12,n,2)}function Mv(t,n){return $_(1+e_.count(Rg(t),t),n,3)}function Tv(t,n){return $_(t.getMilliseconds(),n,3)}function kv(t,n){return Tv(t,n)+"000"}function Av(t,n){return $_(t.getMonth()+1,n,2)}function Nv(t,n){return $_(t.getMinutes(),n,2)}function Cv(t,n){return $_(t.getSeconds(),n,2)}function Sv(t){var n=t.getDay();return 0===n?7:n}function Ev(t,n){return $_(Og.count(Rg(t)-1,t),n,2)}function Vv(t,n){var e=t.getDay();return t=e>=4||0===e?jg(t):jg.ceil(t),$_(jg.count(Rg(t),t)+(4===Rg(t).getDay()),n,2)}function Pv(t){return t.getDay()}function Dv(t,n){return $_(Fg.count(Rg(t)-1,t),n,2)}function zv(t,n){return $_(t.getFullYear()%100,n,2)}function Rv(t,n){return $_(t.getFullYear()%1e4,n,4)}function Lv(t){var n=t.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+$_(n/60|0,"0",2)+$_(n%60,"0",2)}function Yv(t,n){return $_(t.getUTCDate(),n,2)}function Uv(t,n){return $_(t.getUTCHours(),n,2)}function Bv(t,n){return $_(t.getUTCHours()%12||12,n,2)}function Iv(t,n){return $_(1+P_.count(R_(t),t),n,3)}function Ov(t,n){return $_(t.getUTCMilliseconds(),n,3)}function Fv(t,n){return Ov(t,n)+"000"}function qv(t,n){return $_(t.getUTCMonth()+1,n,2)}function Xv(t,n){return $_(t.getUTCMinutes(),n,2)}function jv(t,n){return $_(t.getUTCSeconds(),n,2)}function Hv(t){var n=t.getUTCDay();return 0===n?7:n}function Kv(t,n){return $_(v_.count(R_(t)-1,t),n,2)}function Gv(t,n){var e=t.getUTCDay();return t=e>=4||0===e?x_(t):x_.ceil(t),$_(x_.count(R_(t),t)+(4===R_(t).getUTCDay()),n,2)}function Wv(t){return t.getUTCDay()}function $v(t,n){return $_(y_.count(R_(t)-1,t),n,2)}function Zv(t,n){return $_(t.getUTCFullYear()%100,n,2)}function Qv(t,n){return $_(t.getUTCFullYear()%1e4,n,4)}function Jv(){return"+0000"}function ty(){return"%"}function ny(t){return+t}function ey(t){return Math.floor(+t/1e3)}function ry(t){return O_=I_(t),F_=O_.format,q_=O_.parse,X_=O_.utcFormat,j_=O_.utcParse,O_}ry({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function iy(t){return new Date(t)}function uy(t){return t instanceof Date?+t:+new Date(+t)}function oy(t,n,e,r,u,o,a,c,f){var s=ig(Zp,Zp),l=s.invert,h=s.domain,d=f(".%L"),p=f(":%S"),g=f("%I:%M"),_=f("%I %p"),v=f("%a %d"),y=f("%b %d"),m=f("%B"),b=f("%Y"),x=[[a,1,1e3],[a,5,5e3],[a,15,15e3],[a,30,3e4],[o,1,6e4],[o,5,3e5],[o,15,9e5],[o,30,18e5],[u,1,36e5],[u,3,108e5],[u,6,216e5],[u,12,432e5],[r,1,864e5],[r,2,1728e5],[e,1,6048e5],[n,1,2592e6],[n,3,7776e6],[t,1,31536e6]];function w(i){return(a(i)<i?d:o(i)<i?p:u(i)<i?g:r(i)<i?_:n(i)<i?e(i)<i?v:y:t(i)<i?m:b)(i)}function M(n,e,r,u){if(null==n&&(n=10),"number"==typeof n){var o=Math.abs(r-e)/n,a=i((function(t){return t[2]})).right(x,o);a===x.length?(u=C(e/31536e6,r/31536e6,n),n=t):a?(u=(a=x[o/x[a-1][2]<x[a][2]/o?a-1:a])[1],n=a[0]):(u=Math.max(C(e,r,n),1),n=c)}return null==u?n:n.every(u)}return s.invert=function(t){return new Date(l(t))},s.domain=function(t){return arguments.length?h(Fp.call(t,uy)):h().map(iy)},s.ticks=function(t,n){var e,r=h(),i=r[0],u=r[r.length-1],o=u<i;return o&&(e=i,i=u,u=e),e=(e=M(t,i,u,n))?e.range(i,u+1):[],o?e.reverse():e},s.tickFormat=function(t,n){return null==n?w:f(n)},s.nice=function(t,n){var e=h();return(t=M(t,e[0],e[e.length-1],n))?h(fg(e,t)):s},s.copy=function(){return eg(s,oy(t,n,e,r,u,o,a,c,f))},s}var ay=function(){return Bp.apply(oy(Rg,Ug,Og,e_,u_,c_,l_,p_,F_).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)},cy=Dg((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCMonth(t.getUTCMonth()+n)}),(function(t,n){return n.getUTCMonth()-t.getUTCMonth()+12*(n.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()})),fy=cy,sy=cy.range,ly=Dg((function(t){t.setUTCMinutes(0,0,0)}),(function(t,n){t.setTime(+t+36e5*n)}),(function(t,n){return(n-t)/36e5}),(function(t){return t.getUTCHours()})),hy=ly,dy=ly.range,py=Dg((function(t){t.setUTCSeconds(0,0)}),(function(t,n){t.setTime(+t+6e4*n)}),(function(t,n){return(n-t)/6e4}),(function(t){return t.getUTCMinutes()})),gy=py,_y=py.range,vy=function(){return Bp.apply(oy(R_,fy,v_,P_,hy,gy,l_,p_,X_).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)};function yy(){var t,n,e,r,i,u=0,o=1,a=Zp,c=!1;function f(n){return isNaN(n=+n)?i:a(0===e?.5:(n=(r(n)-t)*e,c?Math.max(0,Math.min(1,n)):n))}return f.domain=function(i){return arguments.length?(t=r(u=+i[0]),n=r(o=+i[1]),e=t===n?0:1/(n-t),f):[u,o]},f.clamp=function(t){return arguments.length?(c=!!t,f):c},f.interpolator=function(t){return arguments.length?(a=t,f):a},f.unknown=function(t){return arguments.length?(i=t,f):i},function(i){return r=i,t=i(u),n=i(o),e=t===n?0:1/(n-t),f}}function my(t,n){return n.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function by(){var t=og(yy()(Zp));return t.copy=function(){return my(t,by())},Ip.apply(t,arguments)}function xy(){var t=_g(yy()).domain([1,10]);return t.copy=function(){return my(t,xy()).base(t.base())},Ip.apply(t,arguments)}function wy(){var t=bg(yy());return t.copy=function(){return my(t,wy()).constant(t.constant())},Ip.apply(t,arguments)}function My(){var t=kg(yy());return t.copy=function(){return my(t,My()).exponent(t.exponent())},Ip.apply(t,arguments)}function Ty(){return My.apply(null,arguments).exponent(.5)}function ky(){var t=[],n=Zp;function e(e){if(!isNaN(e=+e))return n((c(t,e)-1)/(t.length-1))}return e.domain=function(n){if(!arguments.length)return t.slice();t=[];for(var i,u=0,o=n.length;u<o;++u)null==(i=n[u])||isNaN(i=+i)||t.push(i);return t.sort(r),e},e.interpolator=function(t){return arguments.length?(n=t,e):n},e.copy=function(){return ky(n).domain(t)},Ip.apply(e,arguments)}function Ay(){var t,n,e,r,i,u,o,a=0,c=.5,f=1,s=Zp,l=!1;function h(t){return isNaN(t=+t)?o:(t=.5+((t=+u(t))-n)*(t<n?r:i),s(l?Math.max(0,Math.min(1,t)):t))}return h.domain=function(o){return arguments.length?(t=u(a=+o[0]),n=u(c=+o[1]),e=u(f=+o[2]),r=t===n?0:.5/(n-t),i=n===e?0:.5/(e-n),h):[a,c,f]},h.clamp=function(t){return arguments.length?(l=!!t,h):l},h.interpolator=function(t){return arguments.length?(s=t,h):s},h.unknown=function(t){return arguments.length?(o=t,h):o},function(o){return u=o,t=o(a),n=o(c),e=o(f),r=t===n?0:.5/(n-t),i=n===e?0:.5/(e-n),h}}function Ny(){var t=og(Ay()(Zp));return t.copy=function(){return my(t,Ny())},Ip.apply(t,arguments)}function Cy(){var t=_g(Ay()).domain([.1,1,10]);return t.copy=function(){return my(t,Cy()).base(t.base())},Ip.apply(t,arguments)}function Sy(){var t=bg(Ay());return t.copy=function(){return my(t,Sy()).constant(t.constant())},Ip.apply(t,arguments)}function Ey(){var t=kg(Ay());return t.copy=function(){return my(t,Ey()).exponent(t.exponent())},Ip.apply(t,arguments)}function Vy(){return Ey.apply(null,arguments).exponent(.5)}var Py=function(t){for(var n=t.length/6|0,e=new Array(n),r=0;r<n;)e[r]="#"+t.slice(6*r,6*++r);return e},Dy=Py("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),zy=Py("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),Ry=Py("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),Ly=Py("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),Yy=Py("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),Uy=Py("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),By=Py("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),Iy=Py("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),Oy=Py("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),Fy=Py("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"),qy=function(t){return pe(t[t.length-1])},Xy=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(Py),jy=qy(Xy),Hy=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(Py),Ky=qy(Hy),Gy=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(Py),Wy=qy(Gy),$y=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(Py),Zy=qy($y),Qy=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(Py),Jy=qy(Qy),tm=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(Py),nm=qy(tm),em=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(Py),rm=qy(em),im=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(Py),um=qy(im),om=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(Py),am=qy(om),cm=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(Py),fm=qy(cm),sm=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(Py),lm=qy(sm),hm=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(Py),dm=qy(hm),pm=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(Py),gm=qy(pm),_m=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(Py),vm=qy(_m),ym=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(Py),mm=qy(ym),bm=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(Py),xm=qy(bm),wm=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(Py),Mm=qy(wm),Tm=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(Py),km=qy(Tm),Am=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(Py),Nm=qy(Am),Cm=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(Py),Sm=qy(Cm),Em=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(Py),Vm=qy(Em),Pm=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(Py),Dm=qy(Pm),zm=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(Py),Rm=qy(zm),Lm=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(Py),Ym=qy(Lm),Um=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(Py),Bm=qy(Um),Im=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(Py),Om=qy(Im),Fm=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(Py),qm=qy(Fm),Xm=function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-2710.57*t)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-67.37*t)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-2475.67*t)))))))+")"},jm=wp(Eu(300,.5,0),Eu(-240,.5,1)),Hm=wp(Eu(-100,.75,.35),Eu(80,1.5,.8)),Km=wp(Eu(260,.75,.35),Eu(80,1.5,.8)),Gm=Eu(),Wm=function(t){(t<0||t>1)&&(t-=Math.floor(t));var n=Math.abs(t-.5);return Gm.h=360*t-100,Gm.s=1.5-1.5*n,Gm.l=.8-.9*n,Gm+""},$m=Gn(),Zm=Math.PI/3,Qm=2*Math.PI/3,Jm=function(t){var n;return t=(.5-t)*Math.PI,$m.r=255*(n=Math.sin(t))*n,$m.g=255*(n=Math.sin(t+Zm))*n,$m.b=255*(n=Math.sin(t+Qm))*n,$m+""},tb=function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-14825.05*t)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+707.56*t)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-6838.66*t)))))))+")"};function nb(t){var n=t.length;return function(e){return t[Math.max(0,Math.min(n-1,Math.floor(e*n)))]}}var eb=nb(Py("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),rb=nb(Py("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),ib=nb(Py("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),ub=nb(Py("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),ob=function(t){return Mn(en(t).call(document.documentElement))},ab=0;function cb(){return new fb}function fb(){this._="@"+(++ab).toString(36)}fb.prototype=cb.prototype={constructor:fb,get:function(t){for(var n=this._;!(n in t);)if(!(t=t.parentNode))return;return t[n]},set:function(t,n){return t[this._]=n},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};var sb=function(t){return"string"==typeof t?new bn([document.querySelectorAll(t)],[document.documentElement]):new bn([null==t?[]:t],mn)},lb=function(t,n){null==n&&(n=Se().touches);for(var e=0,r=n?n.length:0,i=new Array(r);e<r;++e)i[e]=Ee(t,n[e]);return i},hb=function(t){return function(){return t}},db=Math.abs,pb=Math.atan2,gb=Math.cos,_b=Math.max,vb=Math.min,yb=Math.sin,mb=Math.sqrt,bb=Math.PI,xb=bb/2,wb=2*bb;function Mb(t){return t>1?0:t<-1?bb:Math.acos(t)}function Tb(t){return t>=1?xb:t<=-1?-xb:Math.asin(t)}function kb(t){return t.innerRadius}function Ab(t){return t.outerRadius}function Nb(t){return t.startAngle}function Cb(t){return t.endAngle}function Sb(t){return t&&t.padAngle}function Eb(t,n,e,r,i,u,o,a){var c=e-t,f=r-n,s=o-i,l=a-u,h=l*c-s*f;if(!(h*h<1e-12))return[t+(h=(s*(n-u)-l*(t-i))/h)*c,n+h*f]}function Vb(t,n,e,r,i,u,o){var a=t-e,c=n-r,f=(o?u:-u)/mb(a*a+c*c),s=f*c,l=-f*a,h=t+s,d=n+l,p=e+s,g=r+l,_=(h+p)/2,v=(d+g)/2,y=p-h,m=g-d,b=y*y+m*m,x=i-u,w=h*g-p*d,M=(m<0?-1:1)*mb(_b(0,x*x*b-w*w)),T=(w*m-y*M)/b,k=(-w*y-m*M)/b,A=(w*m+y*M)/b,N=(-w*y+m*M)/b,C=T-_,S=k-v,E=A-_,V=N-v;return C*C+S*S>E*E+V*V&&(T=A,k=N),{cx:T,cy:k,x01:-s,y01:-l,x11:T*(i/x-1),y11:k*(i/x-1)}}var Pb=function(){var t=kb,n=Ab,e=hb(0),r=null,i=Nb,u=Cb,o=Sb,a=null;function c(){var c,f,s=+t.apply(this,arguments),l=+n.apply(this,arguments),h=i.apply(this,arguments)-xb,d=u.apply(this,arguments)-xb,p=db(d-h),g=d>h;if(a||(a=c=Fi()),l<s&&(f=l,l=s,s=f),l>1e-12)if(p>wb-1e-12)a.moveTo(l*gb(h),l*yb(h)),a.arc(0,0,l,h,d,!g),s>1e-12&&(a.moveTo(s*gb(d),s*yb(d)),a.arc(0,0,s,d,h,g));else{var _,v,y=h,m=d,b=h,x=d,w=p,M=p,T=o.apply(this,arguments)/2,k=T>1e-12&&(r?+r.apply(this,arguments):mb(s*s+l*l)),A=vb(db(l-s)/2,+e.apply(this,arguments)),N=A,C=A;if(k>1e-12){var S=Tb(k/s*yb(T)),E=Tb(k/l*yb(T));(w-=2*S)>1e-12?(b+=S*=g?1:-1,x-=S):(w=0,b=x=(h+d)/2),(M-=2*E)>1e-12?(y+=E*=g?1:-1,m-=E):(M=0,y=m=(h+d)/2)}var V=l*gb(y),P=l*yb(y),D=s*gb(x),z=s*yb(x);if(A>1e-12){var R,L=l*gb(m),Y=l*yb(m),U=s*gb(b),B=s*yb(b);if(p<bb&&(R=Eb(V,P,U,B,L,Y,D,z))){var I=V-R[0],O=P-R[1],F=L-R[0],q=Y-R[1],X=1/yb(Mb((I*F+O*q)/(mb(I*I+O*O)*mb(F*F+q*q)))/2),j=mb(R[0]*R[0]+R[1]*R[1]);N=vb(A,(s-j)/(X-1)),C=vb(A,(l-j)/(X+1))}}M>1e-12?C>1e-12?(_=Vb(U,B,V,P,l,C,g),v=Vb(L,Y,D,z,l,C,g),a.moveTo(_.cx+_.x01,_.cy+_.y01),C<A?a.arc(_.cx,_.cy,C,pb(_.y01,_.x01),pb(v.y01,v.x01),!g):(a.arc(_.cx,_.cy,C,pb(_.y01,_.x01),pb(_.y11,_.x11),!g),a.arc(0,0,l,pb(_.cy+_.y11,_.cx+_.x11),pb(v.cy+v.y11,v.cx+v.x11),!g),a.arc(v.cx,v.cy,C,pb(v.y11,v.x11),pb(v.y01,v.x01),!g))):(a.moveTo(V,P),a.arc(0,0,l,y,m,!g)):a.moveTo(V,P),s>1e-12&&w>1e-12?N>1e-12?(_=Vb(D,z,L,Y,s,-N,g),v=Vb(V,P,U,B,s,-N,g),a.lineTo(_.cx+_.x01,_.cy+_.y01),N<A?a.arc(_.cx,_.cy,N,pb(_.y01,_.x01),pb(v.y01,v.x01),!g):(a.arc(_.cx,_.cy,N,pb(_.y01,_.x01),pb(_.y11,_.x11),!g),a.arc(0,0,s,pb(_.cy+_.y11,_.cx+_.x11),pb(v.cy+v.y11,v.cx+v.x11),g),a.arc(v.cx,v.cy,N,pb(v.y11,v.x11),pb(v.y01,v.x01),!g))):a.arc(0,0,s,x,b,g):a.lineTo(D,z)}else a.moveTo(0,0);if(a.closePath(),c)return a=null,c+""||null}return c.centroid=function(){var e=(+t.apply(this,arguments)+ +n.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +u.apply(this,arguments))/2-bb/2;return[gb(r)*e,yb(r)*e]},c.innerRadius=function(n){return arguments.length?(t="function"==typeof n?n:hb(+n),c):t},c.outerRadius=function(t){return arguments.length?(n="function"==typeof t?t:hb(+t),c):n},c.cornerRadius=function(t){return arguments.length?(e="function"==typeof t?t:hb(+t),c):e},c.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:hb(+t),c):r},c.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:hb(+t),c):i},c.endAngle=function(t){return arguments.length?(u="function"==typeof t?t:hb(+t),c):u},c.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:hb(+t),c):o},c.context=function(t){return arguments.length?(a=null==t?null:t,c):a},c};function Db(t){this._context=t}Db.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._context.lineTo(t,n)}}};var zb=function(t){return new Db(t)};function Rb(t){return t[0]}function Lb(t){return t[1]}var Yb=function(){var t=Rb,n=Lb,e=hb(!0),r=null,i=zb,u=null;function o(o){var a,c,f,s=o.length,l=!1;for(null==r&&(u=i(f=Fi())),a=0;a<=s;++a)!(a<s&&e(c=o[a],a,o))===l&&((l=!l)?u.lineStart():u.lineEnd()),l&&u.point(+t(c,a,o),+n(c,a,o));if(f)return u=null,f+""||null}return o.x=function(n){return arguments.length?(t="function"==typeof n?n:hb(+n),o):t},o.y=function(t){return arguments.length?(n="function"==typeof t?t:hb(+t),o):n},o.defined=function(t){return arguments.length?(e="function"==typeof t?t:hb(!!t),o):e},o.curve=function(t){return arguments.length?(i=t,null!=r&&(u=i(r)),o):i},o.context=function(t){return arguments.length?(null==t?r=u=null:u=i(r=t),o):r},o},Ub=function(){var t=Rb,n=null,e=hb(0),r=Lb,i=hb(!0),u=null,o=zb,a=null;function c(c){var f,s,l,h,d,p=c.length,g=!1,_=new Array(p),v=new Array(p);for(null==u&&(a=o(d=Fi())),f=0;f<=p;++f){if(!(f<p&&i(h=c[f],f,c))===g)if(g=!g)s=f,a.areaStart(),a.lineStart();else{for(a.lineEnd(),a.lineStart(),l=f-1;l>=s;--l)a.point(_[l],v[l]);a.lineEnd(),a.areaEnd()}g&&(_[f]=+t(h,f,c),v[f]=+e(h,f,c),a.point(n?+n(h,f,c):_[f],r?+r(h,f,c):v[f]))}if(d)return a=null,d+""||null}function f(){return Yb().defined(i).curve(o).context(u)}return c.x=function(e){return arguments.length?(t="function"==typeof e?e:hb(+e),n=null,c):t},c.x0=function(n){return arguments.length?(t="function"==typeof n?n:hb(+n),c):t},c.x1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:hb(+t),c):n},c.y=function(t){return arguments.length?(e="function"==typeof t?t:hb(+t),r=null,c):e},c.y0=function(t){return arguments.length?(e="function"==typeof t?t:hb(+t),c):e},c.y1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:hb(+t),c):r},c.lineX0=c.lineY0=function(){return f().x(t).y(e)},c.lineY1=function(){return f().x(t).y(r)},c.lineX1=function(){return f().x(n).y(e)},c.defined=function(t){return arguments.length?(i="function"==typeof t?t:hb(!!t),c):i},c.curve=function(t){return arguments.length?(o=t,null!=u&&(a=o(u)),c):o},c.context=function(t){return arguments.length?(null==t?u=a=null:a=o(u=t),c):u},c},Bb=function(t,n){return n<t?-1:n>t?1:n>=t?0:NaN},Ib=function(t){return t},Ob=function(){var t=Ib,n=Bb,e=null,r=hb(0),i=hb(wb),u=hb(0);function o(o){var a,c,f,s,l,h=o.length,d=0,p=new Array(h),g=new Array(h),_=+r.apply(this,arguments),v=Math.min(wb,Math.max(-wb,i.apply(this,arguments)-_)),y=Math.min(Math.abs(v)/h,u.apply(this,arguments)),m=y*(v<0?-1:1);for(a=0;a<h;++a)(l=g[p[a]=a]=+t(o[a],a,o))>0&&(d+=l);for(null!=n?p.sort((function(t,e){return n(g[t],g[e])})):null!=e&&p.sort((function(t,n){return e(o[t],o[n])})),a=0,f=d?(v-h*m)/d:0;a<h;++a,_=s)c=p[a],s=_+((l=g[c])>0?l*f:0)+m,g[c]={data:o[c],index:a,value:l,startAngle:_,endAngle:s,padAngle:y};return g}return o.value=function(n){return arguments.length?(t="function"==typeof n?n:hb(+n),o):t},o.sortValues=function(t){return arguments.length?(n=t,e=null,o):n},o.sort=function(t){return arguments.length?(e=t,n=null,o):e},o.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:hb(+t),o):r},o.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:hb(+t),o):i},o.padAngle=function(t){return arguments.length?(u="function"==typeof t?t:hb(+t),o):u},o},Fb=Xb(zb);function qb(t){this._curve=t}function Xb(t){function n(n){return new qb(t(n))}return n._curve=t,n}function jb(t){var n=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?n(Xb(t)):n()._curve},t}qb.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,n){this._curve.point(n*Math.sin(t),n*-Math.cos(t))}};var Hb=function(){return jb(Yb().curve(Fb))},Kb=function(){var t=Ub().curve(Fb),n=t.curve,e=t.lineX0,r=t.lineX1,i=t.lineY0,u=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return jb(e())},delete t.lineX0,t.lineEndAngle=function(){return jb(r())},delete t.lineX1,t.lineInnerRadius=function(){return jb(i())},delete t.lineY0,t.lineOuterRadius=function(){return jb(u())},delete t.lineY1,t.curve=function(t){return arguments.length?n(Xb(t)):n()._curve},t},Gb=function(t,n){return[(n=+n)*Math.cos(t-=Math.PI/2),n*Math.sin(t)]},Wb=Array.prototype.slice;function $b(t){return t.source}function Zb(t){return t.target}function Qb(t){var n=$b,e=Zb,r=Rb,i=Lb,u=null;function o(){var o,a=Wb.call(arguments),c=n.apply(this,a),f=e.apply(this,a);if(u||(u=o=Fi()),t(u,+r.apply(this,(a[0]=c,a)),+i.apply(this,a),+r.apply(this,(a[0]=f,a)),+i.apply(this,a)),o)return u=null,o+""||null}return o.source=function(t){return arguments.length?(n=t,o):n},o.target=function(t){return arguments.length?(e=t,o):e},o.x=function(t){return arguments.length?(r="function"==typeof t?t:hb(+t),o):r},o.y=function(t){return arguments.length?(i="function"==typeof t?t:hb(+t),o):i},o.context=function(t){return arguments.length?(u=null==t?null:t,o):u},o}function Jb(t,n,e,r,i){t.moveTo(n,e),t.bezierCurveTo(n=(n+r)/2,e,n,i,r,i)}function tx(t,n,e,r,i){t.moveTo(n,e),t.bezierCurveTo(n,e=(e+i)/2,r,e,r,i)}function nx(t,n,e,r,i){var u=Gb(n,e),o=Gb(n,e=(e+i)/2),a=Gb(r,e),c=Gb(r,i);t.moveTo(u[0],u[1]),t.bezierCurveTo(o[0],o[1],a[0],a[1],c[0],c[1])}function ex(){return Qb(Jb)}function rx(){return Qb(tx)}function ix(){var t=Qb(nx);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}var ux={draw:function(t,n){var e=Math.sqrt(n/bb);t.moveTo(e,0),t.arc(0,0,e,0,wb)}},ox={draw:function(t,n){var e=Math.sqrt(n/5)/2;t.moveTo(-3*e,-e),t.lineTo(-e,-e),t.lineTo(-e,-3*e),t.lineTo(e,-3*e),t.lineTo(e,-e),t.lineTo(3*e,-e),t.lineTo(3*e,e),t.lineTo(e,e),t.lineTo(e,3*e),t.lineTo(-e,3*e),t.lineTo(-e,e),t.lineTo(-3*e,e),t.closePath()}},ax=Math.sqrt(1/3),cx=2*ax,fx={draw:function(t,n){var e=Math.sqrt(n/cx),r=e*ax;t.moveTo(0,-e),t.lineTo(r,0),t.lineTo(0,e),t.lineTo(-r,0),t.closePath()}},sx=Math.sin(bb/10)/Math.sin(7*bb/10),lx=Math.sin(wb/10)*sx,hx=-Math.cos(wb/10)*sx,dx={draw:function(t,n){var e=Math.sqrt(.8908130915292852*n),r=lx*e,i=hx*e;t.moveTo(0,-e),t.lineTo(r,i);for(var u=1;u<5;++u){var o=wb*u/5,a=Math.cos(o),c=Math.sin(o);t.lineTo(c*e,-a*e),t.lineTo(a*r-c*i,c*r+a*i)}t.closePath()}},px={draw:function(t,n){var e=Math.sqrt(n),r=-e/2;t.rect(r,r,e,e)}},gx=Math.sqrt(3),_x={draw:function(t,n){var e=-Math.sqrt(n/(3*gx));t.moveTo(0,2*e),t.lineTo(-gx*e,-e),t.lineTo(gx*e,-e),t.closePath()}},vx=Math.sqrt(3)/2,yx=1/Math.sqrt(12),mx=3*(yx/2+1),bx={draw:function(t,n){var e=Math.sqrt(n/mx),r=e/2,i=e*yx,u=r,o=e*yx+e,a=-u,c=o;t.moveTo(r,i),t.lineTo(u,o),t.lineTo(a,c),t.lineTo(-.5*r-vx*i,vx*r+-.5*i),t.lineTo(-.5*u-vx*o,vx*u+-.5*o),t.lineTo(-.5*a-vx*c,vx*a+-.5*c),t.lineTo(-.5*r+vx*i,-.5*i-vx*r),t.lineTo(-.5*u+vx*o,-.5*o-vx*u),t.lineTo(-.5*a+vx*c,-.5*c-vx*a),t.closePath()}},xx=[ux,ox,fx,px,dx,_x,bx],wx=function(){var t=hb(ux),n=hb(64),e=null;function r(){var r;if(e||(e=r=Fi()),t.apply(this,arguments).draw(e,+n.apply(this,arguments)),r)return e=null,r+""||null}return r.type=function(n){return arguments.length?(t="function"==typeof n?n:hb(n),r):t},r.size=function(t){return arguments.length?(n="function"==typeof t?t:hb(+t),r):n},r.context=function(t){return arguments.length?(e=null==t?null:t,r):e},r},Mx=function(){};function Tx(t,n,e){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+n)/6,(t._y0+4*t._y1+e)/6)}function kx(t){this._context=t}kx.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Tx(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Tx(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};var Ax=function(t){return new kx(t)};function Nx(t){this._context=t}Nx.prototype={areaStart:Mx,areaEnd:Mx,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x2=t,this._y2=n;break;case 1:this._point=2,this._x3=t,this._y3=n;break;case 2:this._point=3,this._x4=t,this._y4=n,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+n)/6);break;default:Tx(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};var Cx=function(t){return new Nx(t)};function Sx(t){this._context=t}Sx.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var e=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+n)/6;this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break;case 3:this._point=4;default:Tx(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};var Ex=function(t){return new Sx(t)};function Vx(t,n){this._basis=new kx(t),this._beta=n}Vx.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,n=this._y,e=t.length-1;if(e>0)for(var r,i=t[0],u=n[0],o=t[e]-i,a=n[e]-u,c=-1;++c<=e;)r=c/e,this._basis.point(this._beta*t[c]+(1-this._beta)*(i+r*o),this._beta*n[c]+(1-this._beta)*(u+r*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,n){this._x.push(+t),this._y.push(+n)}};var Px=function t(n){function e(t){return 1===n?new kx(t):new Vx(t,n)}return e.beta=function(n){return t(+n)},e}(.85);function Dx(t,n,e){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-n),t._y2+t._k*(t._y1-e),t._x2,t._y2)}function zx(t,n){this._context=t,this._k=(1-n)/6}zx.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Dx(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2,this._x1=t,this._y1=n;break;case 2:this._point=3;default:Dx(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Rx=function t(n){function e(t){return new zx(t,n)}return e.tension=function(n){return t(+n)},e}(0);function Lx(t,n){this._context=t,this._k=(1-n)/6}Lx.prototype={areaStart:Mx,areaEnd:Mx,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:Dx(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Yx=function t(n){function e(t){return new Lx(t,n)}return e.tension=function(n){return t(+n)},e}(0);function Ux(t,n){this._context=t,this._k=(1-n)/6}Ux.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Dx(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Bx=function t(n){function e(t){return new Ux(t,n)}return e.tension=function(n){return t(+n)},e}(0);function Ix(t,n,e){var r=t._x1,i=t._y1,u=t._x2,o=t._y2;if(t._l01_a>1e-12){var a=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,i=(i*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>1e-12){var f=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,s=3*t._l23_a*(t._l23_a+t._l12_a);u=(u*f+t._x1*t._l23_2a-n*t._l12_2a)/s,o=(o*f+t._y1*t._l23_2a-e*t._l12_2a)/s}t._context.bezierCurveTo(r,i,u,o,t._x2,t._y2)}function Ox(t,n){this._context=t,this._alpha=n}Ox.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3;default:Ix(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Fx=function t(n){function e(t){return n?new Ox(t,n):new zx(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function qx(t,n){this._context=t,this._alpha=n}qx.prototype={areaStart:Mx,areaEnd:Mx,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:Ix(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Xx=function t(n){function e(t){return n?new qx(t,n):new Lx(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function jx(t,n){this._context=t,this._alpha=n}jx.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ix(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Hx=function t(n){function e(t){return n?new jx(t,n):new Ux(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function Kx(t){this._context=t}Kx.prototype={areaStart:Mx,areaEnd:Mx,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,n){t=+t,n=+n,this._point?this._context.lineTo(t,n):(this._point=1,this._context.moveTo(t,n))}};var Gx=function(t){return new Kx(t)};function Wx(t){return t<0?-1:1}function $x(t,n,e){var r=t._x1-t._x0,i=n-t._x1,u=(t._y1-t._y0)/(r||i<0&&-0),o=(e-t._y1)/(i||r<0&&-0),a=(u*i+o*r)/(r+i);return(Wx(u)+Wx(o))*Math.min(Math.abs(u),Math.abs(o),.5*Math.abs(a))||0}function Zx(t,n){var e=t._x1-t._x0;return e?(3*(t._y1-t._y0)/e-n)/2:n}function Qx(t,n,e){var r=t._x0,i=t._y0,u=t._x1,o=t._y1,a=(u-r)/3;t._context.bezierCurveTo(r+a,i+a*n,u-a,o-a*e,u,o)}function Jx(t){this._context=t}function tw(t){this._context=new nw(t)}function nw(t){this._context=t}function ew(t){return new Jx(t)}function rw(t){return new tw(t)}function iw(t){this._context=t}function uw(t){var n,e,r=t.length-1,i=new Array(r),u=new Array(r),o=new Array(r);for(i[0]=0,u[0]=2,o[0]=t[0]+2*t[1],n=1;n<r-1;++n)i[n]=1,u[n]=4,o[n]=4*t[n]+2*t[n+1];for(i[r-1]=2,u[r-1]=7,o[r-1]=8*t[r-1]+t[r],n=1;n<r;++n)e=i[n]/u[n-1],u[n]-=e,o[n]-=e*o[n-1];for(i[r-1]=o[r-1]/u[r-1],n=r-2;n>=0;--n)i[n]=(o[n]-i[n+1])/u[n];for(u[r-1]=(t[r]+i[r-1])/2,n=0;n<r-1;++n)u[n]=2*t[n+1]-i[n+1];return[i,u]}Jx.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Qx(this,this._t0,Zx(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){var e=NaN;if(n=+n,(t=+t)!==this._x1||n!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,Qx(this,Zx(this,e=$x(this,t,n)),e);break;default:Qx(this,this._t0,e=$x(this,t,n))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n,this._t0=e}}},(tw.prototype=Object.create(Jx.prototype)).point=function(t,n){Jx.prototype.point.call(this,n,t)},nw.prototype={moveTo:function(t,n){this._context.moveTo(n,t)},closePath:function(){this._context.closePath()},lineTo:function(t,n){this._context.lineTo(n,t)},bezierCurveTo:function(t,n,e,r,i,u){this._context.bezierCurveTo(n,t,r,e,u,i)}},iw.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,n=this._y,e=t.length;if(e)if(this._line?this._context.lineTo(t[0],n[0]):this._context.moveTo(t[0],n[0]),2===e)this._context.lineTo(t[1],n[1]);else for(var r=uw(t),i=uw(n),u=0,o=1;o<e;++u,++o)this._context.bezierCurveTo(r[0][u],i[0][u],r[1][u],i[1][u],t[o],n[o]);(this._line||0!==this._line&&1===e)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,n){this._x.push(+t),this._y.push(+n)}};var ow=function(t){return new iw(t)};function aw(t,n){this._context=t,this._t=n}aw.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(t,n);else{var e=this._x*(1-this._t)+t*this._t;this._context.lineTo(e,this._y),this._context.lineTo(e,n)}}this._x=t,this._y=n}};var cw=function(t){return new aw(t,.5)};function fw(t){return new aw(t,0)}function sw(t){return new aw(t,1)}var lw=function(t,n){if((i=t.length)>1)for(var e,r,i,u=1,o=t[n[0]],a=o.length;u<i;++u)for(r=o,o=t[n[u]],e=0;e<a;++e)o[e][1]+=o[e][0]=isNaN(r[e][1])?r[e][0]:r[e][1]},hw=function(t){for(var n=t.length,e=new Array(n);--n>=0;)e[n]=n;return e};function dw(t,n){return t[n]}var pw=function(){var t=hb([]),n=hw,e=lw,r=dw;function i(i){var u,o,a=t.apply(this,arguments),c=i.length,f=a.length,s=new Array(f);for(u=0;u<f;++u){for(var l,h=a[u],d=s[u]=new Array(c),p=0;p<c;++p)d[p]=l=[0,+r(i[p],h,p,i)],l.data=i[p];d.key=h}for(u=0,o=n(s);u<f;++u)s[o[u]].index=u;return e(s,o),s}return i.keys=function(n){return arguments.length?(t="function"==typeof n?n:hb(Wb.call(n)),i):t},i.value=function(t){return arguments.length?(r="function"==typeof t?t:hb(+t),i):r},i.order=function(t){return arguments.length?(n=null==t?hw:"function"==typeof t?t:hb(Wb.call(t)),i):n},i.offset=function(t){return arguments.length?(e=null==t?lw:t,i):e},i},gw=function(t,n){if((r=t.length)>0){for(var e,r,i,u=0,o=t[0].length;u<o;++u){for(i=e=0;e<r;++e)i+=t[e][u][1]||0;if(i)for(e=0;e<r;++e)t[e][u][1]/=i}lw(t,n)}},_w=function(t,n){if((a=t.length)>0)for(var e,r,i,u,o,a,c=0,f=t[n[0]].length;c<f;++c)for(u=o=0,e=0;e<a;++e)(i=(r=t[n[e]][c])[1]-r[0])>0?(r[0]=u,r[1]=u+=i):i<0?(r[1]=o,r[0]=o+=i):(r[0]=0,r[1]=i)},vw=function(t,n){if((e=t.length)>0){for(var e,r=0,i=t[n[0]],u=i.length;r<u;++r){for(var o=0,a=0;o<e;++o)a+=t[o][r][1]||0;i[r][1]+=i[r][0]=-a/2}lw(t,n)}},yw=function(t,n){if((i=t.length)>0&&(r=(e=t[n[0]]).length)>0){for(var e,r,i,u=0,o=1;o<r;++o){for(var a=0,c=0,f=0;a<i;++a){for(var s=t[n[a]],l=s[o][1]||0,h=(l-(s[o-1][1]||0))/2,d=0;d<a;++d){var p=t[n[d]];h+=(p[o][1]||0)-(p[o-1][1]||0)}c+=l,f+=h*l}e[o-1][1]+=e[o-1][0]=u,c&&(u-=f/c)}e[o-1][1]+=e[o-1][0]=u,lw(t,n)}},mw=function(t){var n=t.map(bw);return hw(t).sort((function(t,e){return n[t]-n[e]}))};function bw(t){for(var n,e=-1,r=0,i=t.length,u=-1/0;++e<i;)(n=+t[e][1])>u&&(u=n,r=e);return r}var xw=function(t){var n=t.map(ww);return hw(t).sort((function(t,e){return n[t]-n[e]}))};function ww(t){for(var n,e=0,r=-1,i=t.length;++r<i;)(n=+t[r][1])&&(e+=n);return e}var Mw=function(t){return xw(t).reverse()},Tw=function(t){var n,e,r=t.length,i=t.map(ww),u=mw(t),o=0,a=0,c=[],f=[];for(n=0;n<r;++n)e=u[n],o<a?(o+=i[e],c.push(e)):(a+=i[e],f.push(e));return f.reverse().concat(c)},kw=function(t){return hw(t).reverse()};var Aw=Date.prototype.toISOString?function(t){return t.toISOString()}:X_("%Y-%m-%dT%H:%M:%S.%LZ");var Nw=+new Date("2000-01-01T00:00:00.000Z")?function(t){var n=new Date(t);return isNaN(n)?null:n}:j_("%Y-%m-%dT%H:%M:%S.%LZ"),Cw=function(t,n,e){var r=new qe,i=n;return null==n?(r.restart(t,n,e),r):(n=+n,e=null==e?Oe():+e,r.restart((function u(o){o+=i,r.restart(u,i+=n,e),t(o)}),n,e),r)},Sw=function(t){return function(){return t}};function Ew(t){return t[0]}function Vw(t){return t[1]}function Pw(){this._=null}function Dw(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function zw(t,n){var e=n,r=n.R,i=e.U;i?i.L===e?i.L=r:i.R=r:t._=r,r.U=i,e.U=r,e.R=r.L,e.R&&(e.R.U=e),r.L=e}function Rw(t,n){var e=n,r=n.L,i=e.U;i?i.L===e?i.L=r:i.R=r:t._=r,r.U=i,e.U=r,e.L=r.R,e.L&&(e.L.U=e),r.R=e}function Lw(t){for(;t.L;)t=t.L;return t}Pw.prototype={constructor:Pw,insert:function(t,n){var e,r,i;if(t){if(n.P=t,n.N=t.N,t.N&&(t.N.P=n),t.N=n,t.R){for(t=t.R;t.L;)t=t.L;t.L=n}else t.R=n;e=t}else this._?(t=Lw(this._),n.P=null,n.N=t,t.P=t.L=n,e=t):(n.P=n.N=null,this._=n,e=null);for(n.L=n.R=null,n.U=e,n.C=!0,t=n;e&&e.C;)e===(r=e.U).L?(i=r.R)&&i.C?(e.C=i.C=!1,r.C=!0,t=r):(t===e.R&&(zw(this,e),e=(t=e).U),e.C=!1,r.C=!0,Rw(this,r)):(i=r.L)&&i.C?(e.C=i.C=!1,r.C=!0,t=r):(t===e.L&&(Rw(this,e),e=(t=e).U),e.C=!1,r.C=!0,zw(this,r)),e=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var n,e,r,i=t.U,u=t.L,o=t.R;if(e=u?o?Lw(o):u:o,i?i.L===t?i.L=e:i.R=e:this._=e,u&&o?(r=e.C,e.C=t.C,e.L=u,u.U=e,e!==o?(i=e.U,e.U=t.U,t=e.R,i.L=t,e.R=o,o.U=e):(e.U=i,i=e,t=e.R)):(r=t.C,t=e),t&&(t.U=i),!r)if(t&&t.C)t.C=!1;else{do{if(t===this._)break;if(t===i.L){if((n=i.R).C&&(n.C=!1,i.C=!0,zw(this,i),n=i.R),n.L&&n.L.C||n.R&&n.R.C){n.R&&n.R.C||(n.L.C=!1,n.C=!0,Rw(this,n),n=i.R),n.C=i.C,i.C=n.R.C=!1,zw(this,i),t=this._;break}}else if((n=i.L).C&&(n.C=!1,i.C=!0,Rw(this,i),n=i.L),n.L&&n.L.C||n.R&&n.R.C){n.L&&n.L.C||(n.R.C=!1,n.C=!0,zw(this,n),n=i.L),n.C=i.C,i.C=n.L.C=!1,Rw(this,i),t=this._;break}n.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}};var Yw=Pw;function Uw(t,n,e,r){var i=[null,null],u=cM.push(i)-1;return i.left=t,i.right=n,e&&Iw(i,t,n,e),r&&Iw(i,n,t,r),oM[t.index].halfedges.push(u),oM[n.index].halfedges.push(u),i}function Bw(t,n,e){var r=[n,e];return r.left=t,r}function Iw(t,n,e,r){t[0]||t[1]?t.left===e?t[1]=r:t[0]=r:(t[0]=r,t.left=n,t.right=e)}function Ow(t,n,e,r,i){var u,o=t[0],a=t[1],c=o[0],f=o[1],s=0,l=1,h=a[0]-c,d=a[1]-f;if(u=n-c,h||!(u>0)){if(u/=h,h<0){if(u<s)return;u<l&&(l=u)}else if(h>0){if(u>l)return;u>s&&(s=u)}if(u=r-c,h||!(u<0)){if(u/=h,h<0){if(u>l)return;u>s&&(s=u)}else if(h>0){if(u<s)return;u<l&&(l=u)}if(u=e-f,d||!(u>0)){if(u/=d,d<0){if(u<s)return;u<l&&(l=u)}else if(d>0){if(u>l)return;u>s&&(s=u)}if(u=i-f,d||!(u<0)){if(u/=d,d<0){if(u>l)return;u>s&&(s=u)}else if(d>0){if(u<s)return;u<l&&(l=u)}return!(s>0||l<1)||(s>0&&(t[0]=[c+s*h,f+s*d]),l<1&&(t[1]=[c+l*h,f+l*d]),!0)}}}}}function Fw(t,n,e,r,i){var u=t[1];if(u)return!0;var o,a,c=t[0],f=t.left,s=t.right,l=f[0],h=f[1],d=s[0],p=s[1],g=(l+d)/2,_=(h+p)/2;if(p===h){if(g<n||g>=r)return;if(l>d){if(c){if(c[1]>=i)return}else c=[g,e];u=[g,i]}else{if(c){if(c[1]<e)return}else c=[g,i];u=[g,e]}}else if(a=_-(o=(l-d)/(p-h))*g,o<-1||o>1)if(l>d){if(c){if(c[1]>=i)return}else c=[(e-a)/o,e];u=[(i-a)/o,i]}else{if(c){if(c[1]<e)return}else c=[(i-a)/o,i];u=[(e-a)/o,e]}else if(h<p){if(c){if(c[0]>=r)return}else c=[n,o*n+a];u=[r,o*r+a]}else{if(c){if(c[0]<n)return}else c=[r,o*r+a];u=[n,o*n+a]}return t[0]=c,t[1]=u,!0}function qw(t,n){var e=t.site,r=n.left,i=n.right;return e===i&&(i=r,r=e),i?Math.atan2(i[1]-r[1],i[0]-r[0]):(e===r?(r=n[1],i=n[0]):(r=n[0],i=n[1]),Math.atan2(r[0]-i[0],i[1]-r[1]))}function Xw(t,n){return n[+(n.left!==t.site)]}function jw(t,n){return n[+(n.left===t.site)]}var Hw,Kw=[];function Gw(){Dw(this),this.x=this.y=this.arc=this.site=this.cy=null}function Ww(t){var n=t.P,e=t.N;if(n&&e){var r=n.site,i=t.site,u=e.site;if(r!==u){var o=i[0],a=i[1],c=r[0]-o,f=r[1]-a,s=u[0]-o,l=u[1]-a,h=2*(c*l-f*s);if(!(h>=-sM)){var d=c*c+f*f,p=s*s+l*l,g=(l*d-f*p)/h,_=(c*p-s*d)/h,v=Kw.pop()||new Gw;v.arc=t,v.site=i,v.x=g+o,v.y=(v.cy=_+a)+Math.sqrt(g*g+_*_),t.circle=v;for(var y=null,m=aM._;m;)if(v.y<m.y||v.y===m.y&&v.x<=m.x){if(!m.L){y=m.P;break}m=m.L}else{if(!m.R){y=m;break}m=m.R}aM.insert(y,v),y||(Hw=v)}}}}function $w(t){var n=t.circle;n&&(n.P||(Hw=n.N),aM.remove(n),Kw.push(n),Dw(n),t.circle=null)}var Zw=[];function Qw(){Dw(this),this.edge=this.site=this.circle=null}function Jw(t){var n=Zw.pop()||new Qw;return n.site=t,n}function tM(t){$w(t),uM.remove(t),Zw.push(t),Dw(t)}function nM(t){var n=t.circle,e=n.x,r=n.cy,i=[e,r],u=t.P,o=t.N,a=[t];tM(t);for(var c=u;c.circle&&Math.abs(e-c.circle.x)<fM&&Math.abs(r-c.circle.cy)<fM;)u=c.P,a.unshift(c),tM(c),c=u;a.unshift(c),$w(c);for(var f=o;f.circle&&Math.abs(e-f.circle.x)<fM&&Math.abs(r-f.circle.cy)<fM;)o=f.N,a.push(f),tM(f),f=o;a.push(f),$w(f);var s,l=a.length;for(s=1;s<l;++s)f=a[s],c=a[s-1],Iw(f.edge,c.site,f.site,i);c=a[0],(f=a[l-1]).edge=Uw(c.site,f.site,null,i),Ww(c),Ww(f)}function eM(t){for(var n,e,r,i,u=t[0],o=t[1],a=uM._;a;)if((r=rM(a,o)-u)>fM)a=a.L;else{if(!((i=u-iM(a,o))>fM)){r>-fM?(n=a.P,e=a):i>-fM?(n=a,e=a.N):n=e=a;break}if(!a.R){n=a;break}a=a.R}!function(t){oM[t.index]={site:t,halfedges:[]}}(t);var c=Jw(t);if(uM.insert(n,c),n||e){if(n===e)return $w(n),e=Jw(n.site),uM.insert(c,e),c.edge=e.edge=Uw(n.site,c.site),Ww(n),void Ww(e);if(e){$w(n),$w(e);var f=n.site,s=f[0],l=f[1],h=t[0]-s,d=t[1]-l,p=e.site,g=p[0]-s,_=p[1]-l,v=2*(h*_-d*g),y=h*h+d*d,m=g*g+_*_,b=[(_*y-d*m)/v+s,(h*m-g*y)/v+l];Iw(e.edge,f,p,b),c.edge=Uw(f,t,null,b),e.edge=Uw(t,p,null,b),Ww(n),Ww(e)}else c.edge=Uw(n.site,c.site)}}function rM(t,n){var e=t.site,r=e[0],i=e[1],u=i-n;if(!u)return r;var o=t.P;if(!o)return-1/0;var a=(e=o.site)[0],c=e[1],f=c-n;if(!f)return a;var s=a-r,l=1/u-1/f,h=s/f;return l?(-h+Math.sqrt(h*h-2*l*(s*s/(-2*f)-c+f/2+i-u/2)))/l+r:(r+a)/2}function iM(t,n){var e=t.N;if(e)return rM(e,n);var r=t.site;return r[1]===n?r[0]:1/0}var uM,oM,aM,cM,fM=1e-6,sM=1e-12;function lM(t,n){return n[1]-t[1]||n[0]-t[0]}function hM(t,n){var e,r,i,u=t.sort(lM).pop();for(cM=[],oM=new Array(t.length),uM=new Yw,aM=new Yw;;)if(i=Hw,u&&(!i||u[1]<i.y||u[1]===i.y&&u[0]<i.x))u[0]===e&&u[1]===r||(eM(u),e=u[0],r=u[1]),u=t.pop();else{if(!i)break;nM(i.arc)}if(function(){for(var t,n,e,r,i=0,u=oM.length;i<u;++i)if((t=oM[i])&&(r=(n=t.halfedges).length)){var o=new Array(r),a=new Array(r);for(e=0;e<r;++e)o[e]=e,a[e]=qw(t,cM[n[e]]);for(o.sort((function(t,n){return a[n]-a[t]})),e=0;e<r;++e)a[e]=n[o[e]];for(e=0;e<r;++e)n[e]=a[e]}}(),n){var o=+n[0][0],a=+n[0][1],c=+n[1][0],f=+n[1][1];!function(t,n,e,r){for(var i,u=cM.length;u--;)Fw(i=cM[u],t,n,e,r)&&Ow(i,t,n,e,r)&&(Math.abs(i[0][0]-i[1][0])>fM||Math.abs(i[0][1]-i[1][1])>fM)||delete cM[u]}(o,a,c,f),function(t,n,e,r){var i,u,o,a,c,f,s,l,h,d,p,g,_=oM.length,v=!0;for(i=0;i<_;++i)if(u=oM[i]){for(o=u.site,a=(c=u.halfedges).length;a--;)cM[c[a]]||c.splice(a,1);for(a=0,f=c.length;a<f;)p=(d=jw(u,cM[c[a]]))[0],g=d[1],l=(s=Xw(u,cM[c[++a%f]]))[0],h=s[1],(Math.abs(p-l)>fM||Math.abs(g-h)>fM)&&(c.splice(a,0,cM.push(Bw(o,d,Math.abs(p-t)<fM&&r-g>fM?[t,Math.abs(l-t)<fM?h:r]:Math.abs(g-r)<fM&&e-p>fM?[Math.abs(h-r)<fM?l:e,r]:Math.abs(p-e)<fM&&g-n>fM?[e,Math.abs(l-e)<fM?h:n]:Math.abs(g-n)<fM&&p-t>fM?[Math.abs(h-n)<fM?l:t,n]:null))-1),++f);f&&(v=!1)}if(v){var y,m,b,x=1/0;for(i=0,v=null;i<_;++i)(u=oM[i])&&(b=(y=(o=u.site)[0]-t)*y+(m=o[1]-n)*m)<x&&(x=b,v=u);if(v){var w=[t,n],M=[t,r],T=[e,r],k=[e,n];v.halfedges.push(cM.push(Bw(o=v.site,w,M))-1,cM.push(Bw(o,M,T))-1,cM.push(Bw(o,T,k))-1,cM.push(Bw(o,k,w))-1)}}for(i=0;i<_;++i)(u=oM[i])&&(u.halfedges.length||delete oM[i])}(o,a,c,f)}this.edges=cM,this.cells=oM,uM=aM=cM=oM=null}hM.prototype={constructor:hM,polygons:function(){var t=this.edges;return this.cells.map((function(n){var e=n.halfedges.map((function(e){return Xw(n,t[e])}));return e.data=n.site.data,e}))},triangles:function(){var t=[],n=this.edges;return this.cells.forEach((function(e,r){if(u=(i=e.halfedges).length)for(var i,u,o,a,c,f,s=e.site,l=-1,h=n[i[u-1]],d=h.left===s?h.right:h.left;++l<u;)o=d,d=(h=n[i[l]]).left===s?h.right:h.left,o&&d&&r<o.index&&r<d.index&&(c=o,f=d,((a=s)[0]-f[0])*(c[1]-a[1])-(a[0]-c[0])*(f[1]-a[1])<0)&&t.push([s.data,o.data,d.data])})),t},links:function(){return this.edges.filter((function(t){return t.right})).map((function(t){return{source:t.left.data,target:t.right.data}}))},find:function(t,n,e){for(var r,i,u=this,o=u._found||0,a=u.cells.length;!(i=u.cells[o]);)if(++o>=a)return null;var c=t-i.site[0],f=n-i.site[1],s=c*c+f*f;do{i=u.cells[r=o],o=null,i.halfedges.forEach((function(e){var r=u.edges[e],a=r.left;if(a!==i.site&&a||(a=r.right)){var c=t-a[0],f=n-a[1],l=c*c+f*f;l<s&&(s=l,o=a.index)}}))}while(null!==o);return u._found=r,null==e||s<=e*e?i.site:null}};var dM=function(){var t=Ew,n=Vw,e=null;function r(r){return new hM(r.map((function(e,i){var u=[Math.round(t(e,i,r)/fM)*fM,Math.round(n(e,i,r)/fM)*fM];return u.index=i,u.data=e,u})),e)}return r.polygons=function(t){return r(t).polygons()},r.links=function(t){return r(t).links()},r.triangles=function(t){return r(t).triangles()},r.x=function(n){return arguments.length?(t="function"==typeof n?n:Sw(+n),r):t},r.y=function(t){return arguments.length?(n="function"==typeof t?t:Sw(+t),r):n},r.extent=function(t){return arguments.length?(e=null==t?null:[[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]],r):e&&[[e[0][0],e[0][1]],[e[1][0],e[1][1]]]},r.size=function(t){return arguments.length?(e=null==t?null:[[0,0],[+t[0],+t[1]]],r):e&&[e[1][0]-e[0][0],e[1][1]-e[0][1]]},r},pM=function(t){return function(){return t}};function gM(t,n,e){this.target=t,this.type=n,this.transform=e}function _M(t,n,e){this.k=t,this.x=n,this.y=e}_M.prototype={constructor:_M,scale:function(t){return 1===t?this:new _M(this.k*t,this.x,this.y)},translate:function(t,n){return 0===t&0===n?this:new _M(this.k,this.x+this.k*t,this.y+this.k*n)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var vM=new _M(1,0,0);function yM(t){for(;!t.__zoom;)if(!(t=t.parentNode))return vM;return t.__zoom}function mM(){fn.stopImmediatePropagation()}yM.prototype=_M.prototype;var bM=function(){fn.preventDefault(),fn.stopImmediatePropagation()};function xM(){return!fn.ctrlKey&&!fn.button}function wM(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function MM(){return this.__zoom||vM}function TM(){return-fn.deltaY*(1===fn.deltaMode?.05:fn.deltaMode?1:.002)}function kM(){return navigator.maxTouchPoints||"ontouchstart"in this}function AM(t,n,e){var r=t.invertX(n[0][0])-e[0][0],i=t.invertX(n[1][0])-e[1][0],u=t.invertY(n[0][1])-e[0][1],o=t.invertY(n[1][1])-e[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>u?(u+o)/2:Math.min(0,u)||Math.max(0,o))}var NM=function(){var t,n,e=xM,r=wM,i=AM,u=TM,o=kM,a=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],f=250,s=hp,l=st("start","zoom","end"),h=0;function d(t){t.property("__zoom",MM).on("wheel.zoom",b).on("mousedown.zoom",x).on("dblclick.zoom",w).filter(o).on("touchstart.zoom",M).on("touchmove.zoom",T).on("touchend.zoom touchcancel.zoom",k).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(t,n){return(n=Math.max(a[0],Math.min(a[1],n)))===t.k?t:new _M(n,t.x,t.y)}function g(t,n,e){var r=n[0]-e[0]*t.k,i=n[1]-e[1]*t.k;return r===t.x&&i===t.y?t:new _M(t.k,r,i)}function _(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function v(t,n,e){t.on("start.zoom",(function(){y(this,arguments).start()})).on("interrupt.zoom end.zoom",(function(){y(this,arguments).end()})).tween("zoom",(function(){var t=this,i=arguments,u=y(t,i),o=r.apply(t,i),a=null==e?_(o):"function"==typeof e?e.apply(t,i):e,c=Math.max(o[1][0]-o[0][0],o[1][1]-o[0][1]),f=t.__zoom,l="function"==typeof n?n.apply(t,i):n,h=s(f.invert(a).concat(c/f.k),l.invert(a).concat(c/l.k));return function(t){if(1===t)t=l;else{var n=h(t),e=c/n[2];t=new _M(e,a[0]-n[0]*e,a[1]-n[1]*e)}u.zoom(null,t)}}))}function y(t,n,e){return!e&&t.__zooming||new m(t,n)}function m(t,n){this.that=t,this.args=n,this.active=0,this.extent=r.apply(t,n),this.taps=0}function b(){if(e.apply(this,arguments)){var t=y(this,arguments),n=this.__zoom,r=Math.max(a[0],Math.min(a[1],n.k*Math.pow(2,u.apply(this,arguments)))),o=Pe(this);if(t.wheel)t.mouse[0][0]===o[0]&&t.mouse[0][1]===o[1]||(t.mouse[1]=n.invert(t.mouse[0]=o)),clearTimeout(t.wheel);else{if(n.k===r)return;t.mouse=[o,n.invert(o)],or(this),t.start()}bM(),t.wheel=setTimeout(f,150),t.zoom("mouse",i(g(p(n,r),t.mouse[0],t.mouse[1]),t.extent,c))}function f(){t.wheel=null,t.end()}}function x(){if(!n&&e.apply(this,arguments)){var t=y(this,arguments,!0),r=Mn(fn.view).on("mousemove.zoom",f,!0).on("mouseup.zoom",s,!0),u=Pe(this),o=fn.clientX,a=fn.clientY;An(fn.view),mM(),t.mouse=[u,this.__zoom.invert(u)],or(this),t.start()}function f(){if(bM(),!t.moved){var n=fn.clientX-o,e=fn.clientY-a;t.moved=n*n+e*e>h}t.zoom("mouse",i(g(t.that.__zoom,t.mouse[0]=Pe(t.that),t.mouse[1]),t.extent,c))}function s(){r.on("mousemove.zoom mouseup.zoom",null),Nn(fn.view,t.moved),bM(),t.end()}}function w(){if(e.apply(this,arguments)){var t=this.__zoom,n=Pe(this),u=t.invert(n),o=t.k*(fn.shiftKey?.5:2),a=i(g(p(t,o),n,u),r.apply(this,arguments),c);bM(),f>0?Mn(this).transition().duration(f).call(v,a,n):Mn(this).call(d.transform,a)}}function M(){if(e.apply(this,arguments)){var n,r,i,u,o=fn.touches,a=o.length,c=y(this,arguments,fn.changedTouches.length===a);for(mM(),r=0;r<a;++r)i=o[r],u=[u=Ve(this,o,i.identifier),this.__zoom.invert(u),i.identifier],c.touch0?c.touch1||c.touch0[2]===u[2]||(c.touch1=u,c.taps=0):(c.touch0=u,n=!0,c.taps=1+!!t);t&&(t=clearTimeout(t)),n&&(c.taps<2&&(t=setTimeout((function(){t=null}),500)),or(this),c.start())}}function T(){if(this.__zooming){var n,e,r,u,o=y(this,arguments),a=fn.changedTouches,f=a.length;for(bM(),t&&(t=clearTimeout(t)),o.taps=0,n=0;n<f;++n)e=a[n],r=Ve(this,a,e.identifier),o.touch0&&o.touch0[2]===e.identifier?o.touch0[0]=r:o.touch1&&o.touch1[2]===e.identifier&&(o.touch1[0]=r);if(e=o.that.__zoom,o.touch1){var s=o.touch0[0],l=o.touch0[1],h=o.touch1[0],d=o.touch1[1],_=(_=h[0]-s[0])*_+(_=h[1]-s[1])*_,v=(v=d[0]-l[0])*v+(v=d[1]-l[1])*v;e=p(e,Math.sqrt(_/v)),r=[(s[0]+h[0])/2,(s[1]+h[1])/2],u=[(l[0]+d[0])/2,(l[1]+d[1])/2]}else{if(!o.touch0)return;r=o.touch0[0],u=o.touch0[1]}o.zoom("touch",i(g(e,r,u),o.extent,c))}}function k(){if(this.__zooming){var t,e,r=y(this,arguments),i=fn.changedTouches,u=i.length;for(mM(),n&&clearTimeout(n),n=setTimeout((function(){n=null}),500),t=0;t<u;++t)e=i[t],r.touch0&&r.touch0[2]===e.identifier?delete r.touch0:r.touch1&&r.touch1[2]===e.identifier&&delete r.touch1;if(r.touch1&&!r.touch0&&(r.touch0=r.touch1,delete r.touch1),r.touch0)r.touch0[1]=this.__zoom.invert(r.touch0[0]);else if(r.end(),2===r.taps){var o=Mn(this).on("dblclick.zoom");o&&o.apply(this,arguments)}}}return d.transform=function(t,n,e){var r=t.selection?t.selection():t;r.property("__zoom",MM),t!==r?v(t,n,e):r.interrupt().each((function(){y(this,arguments).start().zoom(null,"function"==typeof n?n.apply(this,arguments):n).end()}))},d.scaleBy=function(t,n,e){d.scaleTo(t,(function(){var t=this.__zoom.k,e="function"==typeof n?n.apply(this,arguments):n;return t*e}),e)},d.scaleTo=function(t,n,e){d.transform(t,(function(){var t=r.apply(this,arguments),u=this.__zoom,o=null==e?_(t):"function"==typeof e?e.apply(this,arguments):e,a=u.invert(o),f="function"==typeof n?n.apply(this,arguments):n;return i(g(p(u,f),o,a),t,c)}),e)},d.translateBy=function(t,n,e){d.transform(t,(function(){return i(this.__zoom.translate("function"==typeof n?n.apply(this,arguments):n,"function"==typeof e?e.apply(this,arguments):e),r.apply(this,arguments),c)}))},d.translateTo=function(t,n,e,u){d.transform(t,(function(){var t=r.apply(this,arguments),o=this.__zoom,a=null==u?_(t):"function"==typeof u?u.apply(this,arguments):u;return i(vM.translate(a[0],a[1]).scale(o.k).translate("function"==typeof n?-n.apply(this,arguments):-n,"function"==typeof e?-e.apply(this,arguments):-e),t,c)}),u)},m.prototype={start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(t,n){return this.mouse&&"mouse"!==t&&(this.mouse[1]=n.invert(this.mouse[0])),this.touch0&&"touch"!==t&&(this.touch0[1]=n.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=n.invert(this.touch1[0])),this.that.__zoom=n,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(t){gn(new gM(d,t,this.that.__zoom),l.apply,l,[t,this.that,this.args])}},d.wheelDelta=function(t){return arguments.length?(u="function"==typeof t?t:pM(+t),d):u},d.filter=function(t){return arguments.length?(e="function"==typeof t?t:pM(!!t),d):e},d.touchable=function(t){return arguments.length?(o="function"==typeof t?t:pM(!!t),d):o},d.extent=function(t){return arguments.length?(r="function"==typeof t?t:pM([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),d):r},d.scaleExtent=function(t){return arguments.length?(a[0]=+t[0],a[1]=+t[1],d):[a[0],a[1]]},d.translateExtent=function(t){return arguments.length?(c[0][0]=+t[0][0],c[1][0]=+t[1][0],c[0][1]=+t[0][1],c[1][1]=+t[1][1],d):[[c[0][0],c[0][1]],[c[1][0],c[1][1]]]},d.constrain=function(t){return arguments.length?(i=t,d):i},d.duration=function(t){return arguments.length?(f=+t,d):f},d.interpolate=function(t){return arguments.length?(s=t,d):s},d.on=function(){var t=l.on.apply(l,arguments);return t===l?d:t},d.clickDistance=function(t){return arguments.length?(h=(t=+t)*t,d):Math.sqrt(h)},d};e.d(n,"version",(function(){return"5.15.0"})),e.d(n,"bisect",(function(){return c})),e.d(n,"bisectRight",(function(){return o})),e.d(n,"bisectLeft",(function(){return a})),e.d(n,"ascending",(function(){return r})),e.d(n,"bisector",(function(){return i})),e.d(n,"cross",(function(){return l})),e.d(n,"descending",(function(){return h})),e.d(n,"deviation",(function(){return g})),e.d(n,"extent",(function(){return _})),e.d(n,"histogram",(function(){return E})),e.d(n,"thresholdFreedmanDiaconis",(function(){return P})),e.d(n,"thresholdScott",(function(){return D})),e.d(n,"thresholdSturges",(function(){return S})),e.d(n,"max",(function(){return z})),e.d(n,"mean",(function(){return R})),e.d(n,"median",(function(){return L})),e.d(n,"merge",(function(){return Y})),e.d(n,"min",(function(){return U})),e.d(n,"pairs",(function(){return f})),e.d(n,"permute",(function(){return B})),e.d(n,"quantile",(function(){return V})),e.d(n,"range",(function(){return w})),e.d(n,"scan",(function(){return I})),e.d(n,"shuffle",(function(){return O})),e.d(n,"sum",(function(){return F})),e.d(n,"ticks",(function(){return A})),e.d(n,"tickIncrement",(function(){return N})),e.d(n,"tickStep",(function(){return C})),e.d(n,"transpose",(function(){return q})),e.d(n,"variance",(function(){return p})),e.d(n,"zip",(function(){return j})),e.d(n,"axisTop",(function(){return tt})),e.d(n,"axisRight",(function(){return nt})),e.d(n,"axisBottom",(function(){return et})),e.d(n,"axisLeft",(function(){return rt})),e.d(n,"brush",(function(){return ki})),e.d(n,"brushX",(function(){return Mi})),e.d(n,"brushY",(function(){return Ti})),e.d(n,"brushSelection",(function(){return wi})),e.d(n,"chord",(function(){return zi})),e.d(n,"ribbon",(function(){return Gi})),e.d(n,"nest",(function(){return Qi})),e.d(n,"set",(function(){return ou})),e.d(n,"map",(function(){return Zi})),e.d(n,"keys",(function(){return au})),e.d(n,"values",(function(){return cu})),e.d(n,"entries",(function(){return fu})),e.d(n,"color",(function(){return Xn})),e.d(n,"rgb",(function(){return Gn})),e.d(n,"hsl",(function(){return ne})),e.d(n,"lab",(function(){return pu})),e.d(n,"hcl",(function(){return wu})),e.d(n,"lch",(function(){return xu})),e.d(n,"gray",(function(){return du})),e.d(n,"cubehelix",(function(){return Eu})),e.d(n,"contours",(function(){return Iu})),e.d(n,"contourDensity",(function(){return Hu})),e.d(n,"dispatch",(function(){return st})),e.d(n,"drag",(function(){return Ju})),e.d(n,"dragDisable",(function(){return An})),e.d(n,"dragEnable",(function(){return Nn})),e.d(n,"dsvFormat",(function(){return oo})),e.d(n,"csvParse",(function(){return co})),e.d(n,"csvParseRows",(function(){return fo})),e.d(n,"csvFormat",(function(){return so})),e.d(n,"csvFormatBody",(function(){return lo})),e.d(n,"csvFormatRows",(function(){return ho})),e.d(n,"csvFormatRow",(function(){return po})),e.d(n,"csvFormatValue",(function(){return go})),e.d(n,"tsvParse",(function(){return vo})),e.d(n,"tsvParseRows",(function(){return yo})),e.d(n,"tsvFormat",(function(){return mo})),e.d(n,"tsvFormatBody",(function(){return bo})),e.d(n,"tsvFormatRows",(function(){return xo})),e.d(n,"tsvFormatRow",(function(){return wo})),e.d(n,"tsvFormatValue",(function(){return Mo})),e.d(n,"autoType",(function(){return To})),e.d(n,"easeLinear",(function(){return Ao})),e.d(n,"easeQuad",(function(){return So})),e.d(n,"easeQuadIn",(function(){return No})),e.d(n,"easeQuadOut",(function(){return Co})),e.d(n,"easeQuadInOut",(function(){return So})),e.d(n,"easeCubic",(function(){return Hr})),e.d(n,"easeCubicIn",(function(){return Xr})),e.d(n,"easeCubicOut",(function(){return jr})),e.d(n,"easeCubicInOut",(function(){return Hr})),e.d(n,"easePoly",(function(){return Po})),e.d(n,"easePolyIn",(function(){return Eo})),e.d(n,"easePolyOut",(function(){return Vo})),e.d(n,"easePolyInOut",(function(){return Po})),e.d(n,"easeSin",(function(){return Yo})),e.d(n,"easeSinIn",(function(){return Ro})),e.d(n,"easeSinOut",(function(){return Lo})),e.d(n,"easeSinInOut",(function(){return Yo})),e.d(n,"easeExp",(function(){return Io})),e.d(n,"easeExpIn",(function(){return Uo})),e.d(n,"easeExpOut",(function(){return Bo})),e.d(n,"easeExpInOut",(function(){return Io})),e.d(n,"easeCircle",(function(){return qo})),e.d(n,"easeCircleIn",(function(){return Oo})),e.d(n,"easeCircleOut",(function(){return Fo})),e.d(n,"easeCircleInOut",(function(){return qo})),e.d(n,"easeBounce",(function(){return jo})),e.d(n,"easeBounceIn",(function(){return Xo})),e.d(n,"easeBounceOut",(function(){return jo})),e.d(n,"easeBounceInOut",(function(){return Ho})),e.d(n,"easeBack",(function(){return Wo})),e.d(n,"easeBackIn",(function(){return Ko})),e.d(n,"easeBackOut",(function(){return Go})),e.d(n,"easeBackInOut",(function(){return Wo})),e.d(n,"easeElastic",(function(){return Qo})),e.d(n,"easeElasticIn",(function(){return Zo})),e.d(n,"easeElasticOut",(function(){return Qo})),e.d(n,"easeElasticInOut",(function(){return Jo})),e.d(n,"blob",(function(){return na})),e.d(n,"buffer",(function(){return ra})),e.d(n,"dsv",(function(){return aa})),e.d(n,"csv",(function(){return ca})),e.d(n,"tsv",(function(){return fa})),e.d(n,"image",(function(){return sa})),e.d(n,"json",(function(){return ha})),e.d(n,"text",(function(){return ua})),e.d(n,"xml",(function(){return pa})),e.d(n,"html",(function(){return ga})),e.d(n,"svg",(function(){return _a})),e.d(n,"forceCenter",(function(){return va})),e.d(n,"forceCollide",(function(){return Ea})),e.d(n,"forceLink",(function(){return Da})),e.d(n,"forceManyBody",(function(){return Ua})),e.d(n,"forceRadial",(function(){return Ba})),e.d(n,"forceSimulation",(function(){return Ya})),e.d(n,"forceX",(function(){return Ia})),e.d(n,"forceY",(function(){return Oa})),e.d(n,"formatDefaultLocale",(function(){return rc})),e.d(n,"format",(function(){return Wa})),e.d(n,"formatPrefix",(function(){return $a})),e.d(n,"formatLocale",(function(){return ec})),e.d(n,"formatSpecifier",(function(){return ja})),e.d(n,"FormatSpecifier",(function(){return Ha})),e.d(n,"precisionFixed",(function(){return ic})),e.d(n,"precisionPrefix",(function(){return uc})),e.d(n,"precisionRound",(function(){return oc})),e.d(n,"geoArea",(function(){return Zc})),e.d(n,"geoBounds",(function(){return Xf})),e.d(n,"geoCentroid",(function(){return es})),e.d(n,"geoCircle",(function(){return ds})),e.d(n,"geoClipAntimeridian",(function(){return ks})),e.d(n,"geoClipCircle",(function(){return As})),e.d(n,"geoClipExtent",(function(){return Vs})),e.d(n,"geoClipRectangle",(function(){return Ns})),e.d(n,"geoContains",(function(){return Ws})),e.d(n,"geoDistance",(function(){return Is})),e.d(n,"geoGraticule",(function(){return Qs})),e.d(n,"geoGraticule10",(function(){return Js})),e.d(n,"geoInterpolate",(function(){return il})),e.d(n,"geoLength",(function(){return Ys})),e.d(n,"geoPath",(function(){return eh})),e.d(n,"geoAlbers",(function(){return xh})),e.d(n,"geoAlbersUsa",(function(){return wh})),e.d(n,"geoAzimuthalEqualArea",(function(){return Ah})),e.d(n,"geoAzimuthalEqualAreaRaw",(function(){return kh})),e.d(n,"geoAzimuthalEquidistant",(function(){return Ch})),e.d(n,"geoAzimuthalEquidistantRaw",(function(){return Nh})),e.d(n,"geoConicConformal",(function(){return zh})),e.d(n,"geoConicConformalRaw",(function(){return Dh})),e.d(n,"geoConicEqualArea",(function(){return bh})),e.d(n,"geoConicEqualAreaRaw",(function(){return mh})),e.d(n,"geoConicEquidistant",(function(){return Uh})),e.d(n,"geoConicEquidistantRaw",(function(){return Yh})),e.d(n,"geoEqualEarth",(function(){return jh})),e.d(n,"geoEqualEarthRaw",(function(){return Xh})),e.d(n,"geoEquirectangular",(function(){return Lh})),e.d(n,"geoEquirectangularRaw",(function(){return Rh})),e.d(n,"geoGnomonic",(function(){return Kh})),e.d(n,"geoGnomonicRaw",(function(){return Hh})),e.d(n,"geoIdentity",(function(){return Wh})),e.d(n,"geoProjection",(function(){return _h})),e.d(n,"geoProjectionMutator",(function(){return vh})),e.d(n,"geoMercator",(function(){return Eh})),e.d(n,"geoMercatorRaw",(function(){return Sh})),e.d(n,"geoNaturalEarth1",(function(){return Zh})),e.d(n,"geoNaturalEarth1Raw",(function(){return $h})),e.d(n,"geoOrthographic",(function(){return Jh})),e.d(n,"geoOrthographicRaw",(function(){return Qh})),e.d(n,"geoStereographic",(function(){return nd})),e.d(n,"geoStereographicRaw",(function(){return td})),e.d(n,"geoTransverseMercator",(function(){return rd})),e.d(n,"geoTransverseMercatorRaw",(function(){return ed})),e.d(n,"geoRotation",(function(){return ss})),e.d(n,"geoStream",(function(){return qc})),e.d(n,"geoTransform",(function(){return rh})),e.d(n,"cluster",(function(){return ad})),e.d(n,"hierarchy",(function(){return fd})),e.d(n,"pack",(function(){return zd})),e.d(n,"packSiblings",(function(){return Cd})),e.d(n,"packEnclose",(function(){return gd})),e.d(n,"partition",(function(){return Id})),e.d(n,"stratify",(function(){return jd})),e.d(n,"tree",(function(){return Qd})),e.d(n,"treemap",(function(){return rp})),e.d(n,"treemapBinary",(function(){return ip})),e.d(n,"treemapDice",(function(){return Bd})),e.d(n,"treemapSlice",(function(){return Jd})),e.d(n,"treemapSliceDice",(function(){return up})),e.d(n,"treemapSquarify",(function(){return ep})),e.d(n,"treemapResquarify",(function(){return op})),e.d(n,"interpolate",(function(){return Ce})),e.d(n,"interpolateArray",(function(){return ye})),e.d(n,"interpolateBasis",(function(){return ue})),e.d(n,"interpolateBasisClosed",(function(){return oe})),e.d(n,"interpolateDate",(function(){return be})),e.d(n,"interpolateDiscrete",(function(){return ap})),e.d(n,"interpolateHue",(function(){return cp})),e.d(n,"interpolateNumber",(function(){return xe})),e.d(n,"interpolateNumberArray",(function(){return _e})),e.d(n,"interpolateObject",(function(){return we})),e.d(n,"interpolateRound",(function(){return fp})),e.d(n,"interpolateString",(function(){return Ne})),e.d(n,"interpolateTransformCss",(function(){return lr})),e.d(n,"interpolateTransformSvg",(function(){return hr})),e.d(n,"interpolateZoom",(function(){return hp})),e.d(n,"interpolateRgb",(function(){return he})),e.d(n,"interpolateRgbBasis",(function(){return pe})),e.d(n,"interpolateRgbBasisClosed",(function(){return ge})),e.d(n,"interpolateHsl",(function(){return pp})),e.d(n,"interpolateHslLong",(function(){return gp})),e.d(n,"interpolateLab",(function(){return _p})),e.d(n,"interpolateHcl",(function(){return yp})),e.d(n,"interpolateHclLong",(function(){return mp})),e.d(n,"interpolateCubehelix",(function(){return xp})),e.d(n,"interpolateCubehelixLong",(function(){return wp})),e.d(n,"piecewise",(function(){return Mp})),e.d(n,"quantize",(function(){return Tp})),e.d(n,"path",(function(){return Fi})),e.d(n,"polygonArea",(function(){return kp})),e.d(n,"polygonCentroid",(function(){return Ap})),e.d(n,"polygonHull",(function(){return Sp})),e.d(n,"polygonContains",(function(){return Ep})),e.d(n,"polygonLength",(function(){return Vp})),e.d(n,"quadtree",(function(){return Ta})),e.d(n,"randomUniform",(function(){return Dp})),e.d(n,"randomNormal",(function(){return zp})),e.d(n,"randomLogNormal",(function(){return Rp})),e.d(n,"randomBates",(function(){return Yp})),e.d(n,"randomIrwinHall",(function(){return Lp})),e.d(n,"randomExponential",(function(){return Up})),e.d(n,"scaleBand",(function(){return Hp})),e.d(n,"scalePoint",(function(){return Gp})),e.d(n,"scaleIdentity",(function(){return cg})),e.d(n,"scaleLinear",(function(){return ag})),e.d(n,"scaleLog",(function(){return vg})),e.d(n,"scaleSymlog",(function(){return xg})),e.d(n,"scaleOrdinal",(function(){return jp})),e.d(n,"scaleImplicit",(function(){return Xp})),e.d(n,"scalePow",(function(){return Ag})),e.d(n,"scaleSqrt",(function(){return Ng})),e.d(n,"scaleQuantile",(function(){return Cg})),e.d(n,"scaleQuantize",(function(){return Sg})),e.d(n,"scaleThreshold",(function(){return Eg})),e.d(n,"scaleTime",(function(){return ay})),e.d(n,"scaleUtc",(function(){return vy})),e.d(n,"scaleSequential",(function(){return by})),e.d(n,"scaleSequentialLog",(function(){return xy})),e.d(n,"scaleSequentialPow",(function(){return My})),e.d(n,"scaleSequentialSqrt",(function(){return Ty})),e.d(n,"scaleSequentialSymlog",(function(){return wy})),e.d(n,"scaleSequentialQuantile",(function(){return ky})),e.d(n,"scaleDiverging",(function(){return Ny})),e.d(n,"scaleDivergingLog",(function(){return Cy})),e.d(n,"scaleDivergingPow",(function(){return Ey})),e.d(n,"scaleDivergingSqrt",(function(){return Vy})),e.d(n,"scaleDivergingSymlog",(function(){return Sy})),e.d(n,"tickFormat",(function(){return ug})),e.d(n,"schemeCategory10",(function(){return Dy})),e.d(n,"schemeAccent",(function(){return zy})),e.d(n,"schemeDark2",(function(){return Ry})),e.d(n,"schemePaired",(function(){return Ly})),e.d(n,"schemePastel1",(function(){return Yy})),e.d(n,"schemePastel2",(function(){return Uy})),e.d(n,"schemeSet1",(function(){return By})),e.d(n,"schemeSet2",(function(){return Iy})),e.d(n,"schemeSet3",(function(){return Oy})),e.d(n,"schemeTableau10",(function(){return Fy})),e.d(n,"interpolateBrBG",(function(){return jy})),e.d(n,"schemeBrBG",(function(){return Xy})),e.d(n,"interpolatePRGn",(function(){return Ky})),e.d(n,"schemePRGn",(function(){return Hy})),e.d(n,"interpolatePiYG",(function(){return Wy})),e.d(n,"schemePiYG",(function(){return Gy})),e.d(n,"interpolatePuOr",(function(){return Zy})),e.d(n,"schemePuOr",(function(){return $y})),e.d(n,"interpolateRdBu",(function(){return Jy})),e.d(n,"schemeRdBu",(function(){return Qy})),e.d(n,"interpolateRdGy",(function(){return nm})),e.d(n,"schemeRdGy",(function(){return tm})),e.d(n,"interpolateRdYlBu",(function(){return rm})),e.d(n,"schemeRdYlBu",(function(){return em})),e.d(n,"interpolateRdYlGn",(function(){return um})),e.d(n,"schemeRdYlGn",(function(){return im})),e.d(n,"interpolateSpectral",(function(){return am})),e.d(n,"schemeSpectral",(function(){return om})),e.d(n,"interpolateBuGn",(function(){return fm})),e.d(n,"schemeBuGn",(function(){return cm})),e.d(n,"interpolateBuPu",(function(){return lm})),e.d(n,"schemeBuPu",(function(){return sm})),e.d(n,"interpolateGnBu",(function(){return dm})),e.d(n,"schemeGnBu",(function(){return hm})),e.d(n,"interpolateOrRd",(function(){return gm})),e.d(n,"schemeOrRd",(function(){return pm})),e.d(n,"interpolatePuBuGn",(function(){return vm})),e.d(n,"schemePuBuGn",(function(){return _m})),e.d(n,"interpolatePuBu",(function(){return mm})),e.d(n,"schemePuBu",(function(){return ym})),e.d(n,"interpolatePuRd",(function(){return xm})),e.d(n,"schemePuRd",(function(){return bm})),e.d(n,"interpolateRdPu",(function(){return Mm})),e.d(n,"schemeRdPu",(function(){return wm})),e.d(n,"interpolateYlGnBu",(function(){return km})),e.d(n,"schemeYlGnBu",(function(){return Tm})),e.d(n,"interpolateYlGn",(function(){return Nm})),e.d(n,"schemeYlGn",(function(){return Am})),e.d(n,"interpolateYlOrBr",(function(){return Sm})),e.d(n,"schemeYlOrBr",(function(){return Cm})),e.d(n,"interpolateYlOrRd",(function(){return Vm})),e.d(n,"schemeYlOrRd",(function(){return Em})),e.d(n,"interpolateBlues",(function(){return Dm})),e.d(n,"schemeBlues",(function(){return Pm})),e.d(n,"interpolateGreens",(function(){return Rm})),e.d(n,"schemeGreens",(function(){return zm})),e.d(n,"interpolateGreys",(function(){return Ym})),e.d(n,"schemeGreys",(function(){return Lm})),e.d(n,"interpolatePurples",(function(){return Bm})),e.d(n,"schemePurples",(function(){return Um})),e.d(n,"interpolateReds",(function(){return Om})),e.d(n,"schemeReds",(function(){return Im})),e.d(n,"interpolateOranges",(function(){return qm})),e.d(n,"schemeOranges",(function(){return Fm})),e.d(n,"interpolateCividis",(function(){return Xm})),e.d(n,"interpolateCubehelixDefault",(function(){return jm})),e.d(n,"interpolateRainbow",(function(){return Wm})),e.d(n,"interpolateWarm",(function(){return Hm})),e.d(n,"interpolateCool",(function(){return Km})),e.d(n,"interpolateSinebow",(function(){return Jm})),e.d(n,"interpolateTurbo",(function(){return tb})),e.d(n,"interpolateViridis",(function(){return eb})),e.d(n,"interpolateMagma",(function(){return rb})),e.d(n,"interpolateInferno",(function(){return ib})),e.d(n,"interpolatePlasma",(function(){return ub})),e.d(n,"create",(function(){return ob})),e.d(n,"creator",(function(){return en})),e.d(n,"local",(function(){return cb})),e.d(n,"matcher",(function(){return gt})),e.d(n,"mouse",(function(){return Pe})),e.d(n,"namespace",(function(){return Mt})),e.d(n,"namespaces",(function(){return wt})),e.d(n,"clientPoint",(function(){return Ee})),e.d(n,"select",(function(){return Mn})),e.d(n,"selectAll",(function(){return sb})),e.d(n,"selection",(function(){return wn})),e.d(n,"selector",(function(){return ht})),e.d(n,"selectorAll",(function(){return pt})),e.d(n,"style",(function(){return zt})),e.d(n,"touch",(function(){return Ve})),e.d(n,"touches",(function(){return lb})),e.d(n,"window",(function(){return Et})),e.d(n,"event",(function(){return fn})),e.d(n,"customEvent",(function(){return gn})),e.d(n,"arc",(function(){return Pb})),e.d(n,"area",(function(){return Ub})),e.d(n,"line",(function(){return Yb})),e.d(n,"pie",(function(){return Ob})),e.d(n,"areaRadial",(function(){return Kb})),e.d(n,"radialArea",(function(){return Kb})),e.d(n,"lineRadial",(function(){return Hb})),e.d(n,"radialLine",(function(){return Hb})),e.d(n,"pointRadial",(function(){return Gb})),e.d(n,"linkHorizontal",(function(){return ex})),e.d(n,"linkVertical",(function(){return rx})),e.d(n,"linkRadial",(function(){return ix})),e.d(n,"symbol",(function(){return wx})),e.d(n,"symbols",(function(){return xx})),e.d(n,"symbolCircle",(function(){return ux})),e.d(n,"symbolCross",(function(){return ox})),e.d(n,"symbolDiamond",(function(){return fx})),e.d(n,"symbolSquare",(function(){return px})),e.d(n,"symbolStar",(function(){return dx})),e.d(n,"symbolTriangle",(function(){return _x})),e.d(n,"symbolWye",(function(){return bx})),e.d(n,"curveBasisClosed",(function(){return Cx})),e.d(n,"curveBasisOpen",(function(){return Ex})),e.d(n,"curveBasis",(function(){return Ax})),e.d(n,"curveBundle",(function(){return Px})),e.d(n,"curveCardinalClosed",(function(){return Yx})),e.d(n,"curveCardinalOpen",(function(){return Bx})),e.d(n,"curveCardinal",(function(){return Rx})),e.d(n,"curveCatmullRomClosed",(function(){return Xx})),e.d(n,"curveCatmullRomOpen",(function(){return Hx})),e.d(n,"curveCatmullRom",(function(){return Fx})),e.d(n,"curveLinearClosed",(function(){return Gx})),e.d(n,"curveLinear",(function(){return zb})),e.d(n,"curveMonotoneX",(function(){return ew})),e.d(n,"curveMonotoneY",(function(){return rw})),e.d(n,"curveNatural",(function(){return ow})),e.d(n,"curveStep",(function(){return cw})),e.d(n,"curveStepAfter",(function(){return sw})),e.d(n,"curveStepBefore",(function(){return fw})),e.d(n,"stack",(function(){return pw})),e.d(n,"stackOffsetExpand",(function(){return gw})),e.d(n,"stackOffsetDiverging",(function(){return _w})),e.d(n,"stackOffsetNone",(function(){return lw})),e.d(n,"stackOffsetSilhouette",(function(){return vw})),e.d(n,"stackOffsetWiggle",(function(){return yw})),e.d(n,"stackOrderAppearance",(function(){return mw})),e.d(n,"stackOrderAscending",(function(){return xw})),e.d(n,"stackOrderDescending",(function(){return Mw})),e.d(n,"stackOrderInsideOut",(function(){return Tw})),e.d(n,"stackOrderNone",(function(){return hw})),e.d(n,"stackOrderReverse",(function(){return kw})),e.d(n,"timeInterval",(function(){return Dg})),e.d(n,"timeMillisecond",(function(){return p_})),e.d(n,"timeMilliseconds",(function(){return g_})),e.d(n,"utcMillisecond",(function(){return p_})),e.d(n,"utcMilliseconds",(function(){return g_})),e.d(n,"timeSecond",(function(){return l_})),e.d(n,"timeSeconds",(function(){return h_})),e.d(n,"utcSecond",(function(){return l_})),e.d(n,"utcSeconds",(function(){return h_})),e.d(n,"timeMinute",(function(){return c_})),e.d(n,"timeMinutes",(function(){return f_})),e.d(n,"timeHour",(function(){return u_})),e.d(n,"timeHours",(function(){return o_})),e.d(n,"timeDay",(function(){return e_})),e.d(n,"timeDays",(function(){return r_})),e.d(n,"timeWeek",(function(){return Og})),e.d(n,"timeWeeks",(function(){return Gg})),e.d(n,"timeSunday",(function(){return Og})),e.d(n,"timeSundays",(function(){return Gg})),e.d(n,"timeMonday",(function(){return Fg})),e.d(n,"timeMondays",(function(){return Wg})),e.d(n,"timeTuesday",(function(){return qg})),e.d(n,"timeTuesdays",(function(){return $g})),e.d(n,"timeWednesday",(function(){return Xg})),e.d(n,"timeWednesdays",(function(){return Zg})),e.d(n,"timeThursday",(function(){return jg})),e.d(n,"timeThursdays",(function(){return Qg})),e.d(n,"timeFriday",(function(){return Hg})),e.d(n,"timeFridays",(function(){return Jg})),e.d(n,"timeSaturday",(function(){return Kg})),e.d(n,"timeSaturdays",(function(){return t_})),e.d(n,"timeMonth",(function(){return Ug})),e.d(n,"timeMonths",(function(){return Bg})),e.d(n,"timeYear",(function(){return Rg})),e.d(n,"timeYears",(function(){return Lg})),e.d(n,"utcMinute",(function(){return gy})),e.d(n,"utcMinutes",(function(){return _y})),e.d(n,"utcHour",(function(){return hy})),e.d(n,"utcHours",(function(){return dy})),e.d(n,"utcDay",(function(){return P_})),e.d(n,"utcDays",(function(){return D_})),e.d(n,"utcWeek",(function(){return v_})),e.d(n,"utcWeeks",(function(){return T_})),e.d(n,"utcSunday",(function(){return v_})),e.d(n,"utcSundays",(function(){return T_})),e.d(n,"utcMonday",(function(){return y_})),e.d(n,"utcMondays",(function(){return k_})),e.d(n,"utcTuesday",(function(){return m_})),e.d(n,"utcTuesdays",(function(){return A_})),e.d(n,"utcWednesday",(function(){return b_})),e.d(n,"utcWednesdays",(function(){return N_})),e.d(n,"utcThursday",(function(){return x_})),e.d(n,"utcThursdays",(function(){return C_})),e.d(n,"utcFriday",(function(){return w_})),e.d(n,"utcFridays",(function(){return S_})),e.d(n,"utcSaturday",(function(){return M_})),e.d(n,"utcSaturdays",(function(){return E_})),e.d(n,"utcMonth",(function(){return fy})),e.d(n,"utcMonths",(function(){return sy})),e.d(n,"utcYear",(function(){return R_})),e.d(n,"utcYears",(function(){return L_})),e.d(n,"timeFormatDefaultLocale",(function(){return ry})),e.d(n,"timeFormat",(function(){return F_})),e.d(n,"timeParse",(function(){return q_})),e.d(n,"utcFormat",(function(){return X_})),e.d(n,"utcParse",(function(){return j_})),e.d(n,"timeFormatLocale",(function(){return I_})),e.d(n,"isoFormat",(function(){return Aw})),e.d(n,"isoParse",(function(){return Nw})),e.d(n,"now",(function(){return Oe})),e.d(n,"timer",(function(){return Xe})),e.d(n,"timerFlush",(function(){return je})),e.d(n,"timeout",(function(){return We})),e.d(n,"interval",(function(){return Cw})),e.d(n,"transition",(function(){return Or})),e.d(n,"active",(function(){return $r})),e.d(n,"interrupt",(function(){return or})),e.d(n,"voronoi",(function(){return dM})),e.d(n,"zoom",(function(){return NM})),e.d(n,"zoomTransform",(function(){return yM})),e.d(n,"zoomIdentity",(function(){return vM}))}]);',null)}},function(t,e,n){"use strict";var r=window.URL||window.webkitURL;t.exports=function(t,e){try{try{var n;try{(n=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder)).append(t),n=n.getBlob()}catch(e){n=new Blob([t])}return new Worker(r.createObjectURL(n))}catch(e){return new Worker("data:application/javascript,"+encodeURIComponent(t))}}catch(t){if(!e)throw Error("Inline worker is not supported");return new Worker(e)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(11),i=n(2),o=n(10),a=n(20),s=n(3);class u extends a.BaseSeries{constructor(t,e,n,r,i,o){super(t,e,r,i,!1,n),this.setData(e)}static canRender(t){return 0!=(t.renderType&r.RenderType.BoxPlot)}setData(t){this._data=t.data}isYContinuousSeries(){return!0}getCss(){}getDiscreteXValues(){let t={};for(let e=0;e<this._data.length;++e)t[this._data[e].x]=!0;return Object.keys(t)}getDiscreteYValues(){return[]}getXMinMax(){return[]}getYMinMax(){let t=[0,0];return this._data.length>0&&(t[0]=s.min(this._data,(function(t){return t.min})),t[1]=s.max(this._data,(function(t){return t.max})),t[0]=t[0]>0?0:t[0]),t}decimateData(t,e,n,r){let i=this;return new Promise((function(t,e){i.setOutputData(i._data),t()}))}getLegendInfo(){return[]}getTooltipMetrics(t,e){let n={source:t,group:"",metrics:{}},r=this.getYScalingInfo().baseScale.scalar,i=this.getYScalingInfo().baseScale.units;for(let t=0;t<this._data.length;++t){let o=this._data[t];o.x===e.selection&&(o.min&&(n.metrics.Min=(o.min*r).toFixed(2)+i),o.max&&(n.metrics.Max=(o.max*r).toFixed(2)+i),o.y&&(n.metrics.y=(o.y*r).toFixed(2)+i),o.entry&&(n.metrics.entry=(o.entry*r).toFixed(2)+i),o.exit&&(n.metrics.exit=(o.exit*r).toFixed(2)+i))}return[n]}render(){let t=this;this._d3Chart.getOptions().disableBrush=!0;for(let t=0;t<this._d3Elems.length;++t)this._d3Elems[t].remove();this._d3Elems=[],this.initializeContextMenuItems();let e=t._d3XAxis.getScale(),n=t._d3YAxis.getScale(),r=this.getClassNames("chart-box-plot");if(this._layer.css)for(let t in this._layer.css.classes)r+=t+" ";let o=t._d3Chart.getRenderer().getColorManager().getColor(t.getName());this._layer.css&&this._layer.css.style&&this._layer.css.style.hasOwnProperty("color")&&(o=this._layer.css.style.color);let a=function(t){return i.getSelectionName(t.x)},s=t._d3Chart.getAnimateDuration(),u=e.bandwidth()/2,c=e.bandwidth()/4;this._data.forEach(i=>{let l=e(i.x),h=l+u,f=n(i.y),d=t._d3svg.append("line").attr("class",a(i)).classed(r+" chart-box-plot-line",!0).attr("x1",h).attr("x2",h).attr("fill",o).attr("stroke",o).attr("stroke-width",1).attr("y1",f).attr("y2",f);d.transition().duration(s).attr("y1",n(i.min)).attr("y2",n(i.max)),this._d3Elems.push(d),this.configureBandedItemInteration(d,i,i.x);let p=t._d3svg.append("rect").attr("x",l).attr("width",e.bandwidth).attr("class",a(i)+" chart-box").classed(r,!0).attr("stroke",o).attr("fill","white").attr("y",f).attr("height",0),g=n(i.entry),_=n(i.exit),m=i.entry>i.exit?g:_;p.transition().duration(s).attr("y",m).attr("height",Math.abs(g-_)),this._d3Elems.push(p),this.configureBandedItemInteration(p,i,i.x);let v=(e,u)=>{let c=t._d3svg.append("line").attr("class",a(i)).classed(r+" chart-box-plot-line",!0).attr("x1",h-u).attr("x2",h+u).attr("fill",o).attr("stroke",o).attr("stroke-width",1).attr("y1",f).attr("y2",f);c.transition().duration(s).attr("y1",n(e)).attr("y2",n(e)),this._d3Elems.push(c),this.configureBandedItemInteration(c,i,i.x)};v(i.min,c),v(i.max,c),v(i.y,u)}),this._d3Chart.getOptions().disableBrush=!0,this.applyStyles()}}e.BoxPlotSeries=u,o.D3Chart.register(u)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(1),i=n(11),o=n(32),a=n(2),s=n(44),u=n(22),c=n(85),l=n(10),h=n(20),f=n(3),d=n(33);class p extends h.BaseSeries{constructor(t,e,n,r,i,o){super(t,e,r,void 0,!0,n),this._allRects=[],this._minHeight=0,this._stackHeight=20;let a=this;a.setData(e),a.getDataKey=function(t){return t.key},a.getDataName=function(t){return t&&t.name?t.name:a.getDataKey(t).toString()},a.getDataStart=function(t){return t.x},a.getDataDuration=function(t){return t.dx};let s=a.getClassNames("chart-flame");a._d3svg.append("path").classed(s,!0).classed("background",!0).attr("fill","black").attr("opacity",.2).attr("stroke","black"),a._d3svg.append("g").attr("class",s).classed("segments",!0),a._d3svg.append("g").attr("class",s).classed("labels",!0),t.getOptions().forceSvgRenderer?a.render=g.prototype.render.bind(this):(a.render=_.prototype.render.bind(this),a.focus=_.prototype.focus.bind(this),a.unfocus=_.prototype.unfocus.bind(this),a.select=_.prototype.select.bind(this),a.unselect=_.prototype.unselect.bind(this))}static canRender(t){return t.renderType===i.RenderType.FlameChart}getEventDataValue(t){if(t&&t.decimatedValues)return t.decimatedValues.length>1?t.decimatedValues:t.decimatedValues[0]}generateRects(t){let e=[],n=[],r=t.length(),i=-Number.MAX_VALUE;for(let o=0;o<r;o++){let r=t.get(o);r.x=Number(r.x);let a=n[n.length-1];for(;n.length&&Number(r.x)>=a.x+a.dx;)--n.length,a=n[n.length-1];let s={traceValue:r,depth:n.length};n.push(r),s.depth>=e.length&&(e[s.depth]=[]),e[s.depth].push(s),console.assert(i<=r.x,"Error flame chart start times are not sorted: "+i+" and "+r.x),i=r.x}return e}getVisibleRects(t,e){if(!t||!e)return this._allRects;let n=a.bisectBuffer((function(t){return t.traceValue.x})).left,r=a.bisectBuffer((function(t){return t.traceValue.x})).right,i=[];return this._allRects.forEach(o=>{let s=new a.SimpleBuffer(o),u=n(s,t),c=r(s,e);u>0&&--u;let l=o[u].traceValue;l.x+l.dx<t&&++u,u<c&&i.push(o.slice(u,c))}),i}generateBackground(t,e){let n=[],r=[],i=0;for(let o=0;o<e.length;o++){let a=e[o],s=r[r.length-1];for(;r.length&&a.traceValue.x>=s.traceValue.x+s.traceValue.dx;){--r.length;let e=s.traceValue.x+s.traceValue.dx,o=t(e);if(o!==i)n.push({x:e,min:0,max:r.length}),i=o;else{let t=n[n.length-1];r.length>t.max&&(t.max=r.length)}s=r[r.length-1]}r.push(a);let u=t(a.traceValue.x),c=n[n.length-1];u!==i||void 0===c?(n.push({x:a.traceValue.x,min:0,max:r.length}),i=u):r.length>c.max&&(c.max=r.length)}let o=r[r.length-1];for(;r.length;){--r.length;let e=o.traceValue.x+o.traceValue.dx,a=t(e);if(a!==i)n.push({x:e,min:0,max:r.length}),i=a;else{let t=n[n.length-1];r.length>t.max&&(t.max=r.length)}o=r[r.length-1]}return n}setData(t){if(t.data&&t.data.length>0&&void 0!==t.data[0].depth){this._data=t.data,this._allRects=[];for(let e=0;e<t.data.length;++e){let n=t.data[e];this._allRects[n.depth]||(this._allRects[n.depth]=[]),this._allRects[n.depth].push(n)}}else t.data!=this._data&&(this._data=t.data,this._allRects=this.generateRects(new a.SimpleBuffer(this._data)))}getDecimationName(){return this._layer.decimator?a.getSelectionName(this._layer.decimator.getName()):""}isYContinuousSeries(){return!1}getCss(){}getDiscreteXValues(t){return[]}getDiscreteYValues(){return[]}getXMinMax(){let t=this,e=[Number.MAX_VALUE,-Number.MAX_VALUE];return this._allRects.length>0&&this._allRects.forEach(n=>{e[0]=Math.min(t.getDataStart(n[0].traceValue),e[0]),e[1]=f.max(n,(function(e,n,r){return t.getDataStart(e.traceValue)+t.getDataDuration(e.traceValue)}))}),e}getYMinMax(){return[]}decimateData(t,e,n,r){let i=this;i._worker&&(i._worker.terminate(),i._worker=null),i._layer.decimator&&(i._decimator=i._layer.decimator);let s=n.getScale(),u=r.getScale(),c=i.getVisibleRects(t,e);if(i._layer.enableBackground){let t=[];c.forEach(e=>{t=t.concat(e)}),t.sort((t,e)=>t.traceValue.x-e.traceValue.x),i._backgroundData=i.generateBackground(s,t)}return i._decimator||(i._decimator=new o.FlameChartMergeRectDecimator),i._layer.enableWebWorkers||i._d3Chart.getOptions().enableWebWorkers?new Promise((function(n,r){i._worker=l.createDecimatorWorker(i._decimator,t,e,i._d3XAxis,i._d3YAxis,c,void 0,(function(t){i.setOutputData(t),i._worker=null,n()}),(function(r){i._worker=null;let o=i._decimator.decimateValues(t,e,new a.SimpleBuffer(c));i.setOutputData(o),n()}))})):new Promise((function(n,r){i._decimator.initialize(s,s.invert,u);let o=i._decimator.decimateValues(t,e,new a.SimpleBuffer(c));i.setOutputData(o),n()}))}getLegendInfo(){return[]}getTooltipMetrics(t,e){let n=[];if(this._selection){let e={};e[this.getDataName(this._selection)]=this.getDataDuration(this._selection),n.push({source:t,group:"",metrics:e})}if(this._allRects.length>1){let r={source:t,group:"Stack",metrics:{}};this._allRects.forEach(t=>{for(let n=0;n<t.length;++n){let i=t[n].traceValue,o=this.getDataStart(i);if(!(e.xEnd>o))break;e.xEnd<=o+this.getDataDuration(i)&&(r.metrics[this.getDataName(i)]="")}}),n.push(r)}return n}getRequiredHeight(){if(this._minHeight)return this._minHeight;let t=0;for(let e in this._allRects)t=Math.max(t,Number(e))+1;return this._minHeight=(t+1)*this._stackHeight,this._minHeight}configureSegmentInteraction(t,e){let n=this;n._layer.disableHover||t.on("mouseenter",(function(){n._selection=e.traceValue,e&&n._d3Chart.onHover({caller:n._d3Chart.getElement(),event:r.EventType.HoverStart,data:n.getEventDataValue(e),selection:a.getSelectionName(n.getDataName(e.traceValue))})})).on("mouseleave",(function(){e&&n._d3Chart.onHover({caller:n._d3Chart.getElement(),event:r.EventType.HoverEnd,data:n.getEventDataValue(e),selection:a.getSelectionName(n.getDataName(e.traceValue))}),n._selection=void 0})),this._d3Elems.push(t),n.configureItemInteraction(t,n.getEventDataValue(e),e?a.getSelectionName(n.getDataName(e.traceValue)):void 0)}getSegmentClasses(t){let e=a.getSelectionName(this.getDataKey(t).toString()),n=a.getSelectionName(this.getDataName(t));return e===n?e:e+" "+n}renderBackground(){let t=this,e=t._d3XAxis.getScale(),n=f.area().curve(f.curveStepAfter).x((function(t){return e(t.x)})).y0((function(t){return 0})).y1((function(e){return e.max*t._stackHeight}));if(this._backgroundData){let e=t._d3svg.select(this.getSelectionClasses("chart-flame")+".background").attr("d",n(this._backgroundData));this.configureItemInteraction(e,void 0,void 0)}}render(){}}e.FlameChartSeries=p;class g extends p{render(){let t=this;this.renderBackground(),this.initializeContextMenuItems();let e=t._d3XAxis.getScale(),n=this.getClassNames("chart-flame");if(this._layer.css)for(let t in this._layer.css.classes)n+=t+" ";let r=t._d3svg.select(".segments");r.selectAll("*").remove();let i=t._d3svg.select(".labels");i.selectAll("*").remove();let o=this.getOutputData(),a=o.length();for(let s=0;s<a;s++){let a=o.get(s),u=a.traceValue,c=t.getDataKey(u).toString(),l=t.getDataName(u),h=a.depth*this._stackHeight,f=e(t.getDataStart(u)),d=e(t.getDataStart(u)+t.getDataDuration(u))-f,p=r.append("rect").attr("class",n).classed(t.getSegmentClasses(u),!0).attr("fill",t._d3Chart.getRenderer().getColorManager().getColor(l)).attr("x",f).attr("width",d).attr("y",h).attr("height",this._stackHeight);if(this.configureSegmentInteraction(p,a),d>50&&"merged"!==c){let t=i.append("svg").attr("x",f).attr("width",d).attr("y",h).attr("height",this._stackHeight);this.configureSegmentInteraction(t,a),t.append("text").text(l).attr("fill","black").attr("text-anchor","middle").attr("alignment-baseline","central").attr("x",d/2).attr("y",this._stackHeight/2)}}this.applyStyles()}}class _ extends p{focus(t){if(t){let e=this._pixiHelper.getSelection(t);e&&e.forEach((function(t){t._prevTint=t.tint,t.tint&&(t.tint=u.ColorManager.RgbToInt(c.SelectionHelper.getFocusColor(u.ColorManager.IntToHex(t.tint)))),t.alpha=136})),this._pixiHelper.render()}}unfocus(t){let e=this._pixiHelper.getSelection(t);e&&e.forEach((function(t){t.tint=t._prevTint,t.alpha=255})),this._pixiHelper.render()}select(t){if(t){let e=this,n=this._d3svg.select(".segments");n.classed("selected",!0);let r=u.ColorManager.RgbToInt(n.style("stroke")),i=parseInt(n.style("stroke-width"),10),o=function(t){return e._pixiHelper.createRectange(t.width,t.height,r)},a=this._pixiHelper.getSelection(t);a&&a.forEach((function(t){let e=o(t);t.parent.getChildAt(0);let n=2*i;t.width=t.width-n,t.height=t.height-n,t.x=i,t.y=i,t.parent.addChildAt(e,0)})),this._pixiHelper.render()}}unselect(t){this._d3svg.select(".segments").classed("selected",!1);let e=this._pixiHelper.getSelection(t);e&&e.forEach((function(t){let e=t.parent.removeChildAt(0);t.width=e.width,t.height=e.height,t.x=e.x,t.y=e.y})),this._pixiHelper.render()}render(){this._textMap||(this._textMap={}),this.initializeContextMenuItems(),this.renderBackground();let t=this._d3svg.select(".segments");t.selectAll("*").remove();let e=this._d3svg.select(".labels");e.selectAll("*").remove();let n=this.getClassNames("chart-flame");if(this._layer.css)for(let t in this._layer.css.classes)n+=t+" ";this._pixiHelper||(this._pixiHelper=new s.PIXIHelper(!this._d3Chart.getOptions().forceCanvasRenderer),this._pixi=this._pixiHelper.getRenderer());let i=this._pixiHelper.addPixiSvg(t,n,this._d3XAxis.getRangePixels(),this.getRequiredHeight());this._pixiHelper.clearSelections(),this._d3Elems.push(i),this.configureItemInteraction(i,void 0,void 0);let o=this._d3XAxis.getScale(),u=new d.Container,c=o(Number.MAX_VALUE),l=this._pixiHelper.createRectangleContainer(0,0,c,this.getRequiredHeight(),0);l.alpha=0,this.configureItemInteractionPIXI(l,void 0,void 0),u.addChild(l);let h=this.getOutputData(),f=h.length(),p=this._d3Chart.getElement();for(let t=0;t<f;t++){let n=h.get(t),i=n.traceValue,s=this.getDataKey(i).toString(),c=this.getDataName(i),l=n.depth*this._stackHeight,f=o(this.getDataStart(i)),g=o(this.getDataStart(i)+this.getDataDuration(i))-f,_=this._pixiHelper.createRectangleContainer(f,l,g,this._stackHeight,parseInt(this._d3Chart.getRenderer().getColorManager().getColor(c).substring(1),16)),m=_.children[0];if(this._pixiHelper.addSelection(a.getSelectionName(c),m),this._pixiHelper.addSelection(a.getSelectionName(s),m),this._pixiHelper.addInteractionHelper(m,this._d3Chart.getOptions(),void 0,void 0,this._contextMenuItems,this._layer.disableHover?void 0:()=>{this._selection=i,i&&this._d3Chart.onHover({caller:p,event:r.EventType.HoverStart,selection:a.getSelectionName(c)})},this._layer.disableHover?void 0:()=>{i&&this._d3Chart.onHover({caller:p,event:r.EventType.HoverEnd,selection:a.getSelectionName(c)}),this._selection=void 0},void 0,p,this.getEventDataValue(n.decimatedValues),n.traceValue),this.configureItemInteractionPIXI(m,this.getEventDataValue(n),a.getSelectionName(s)),"merged"!==s){let t=this._textMap[c];if(t||(t=this._pixiHelper.renderText(c,e),this._textMap[c]=t),t.width<_.width){let e=new d.Sprite(this._pixi.generateTexture(t,d.SCALE_MODES.LINEAR,1));e.x=.5*(_.width-t.width),e.y=.5*this._stackHeight-.5*t.height,_.addChild(e)}}u.addChild(_)}this._pixi.resize(this._d3XAxis.getRangePixels(),this.getRequiredHeight()),this._pixiHelper.render(u)}}l.D3Chart.register(p)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(1),i=n(11),o=n(2),a=n(5),s=n(44),u=n(10),c=n(20),l=n(3),h=n(33);class f extends c.BaseSeries{getXMinMax(){throw"Error please override this function"}getYMinMax(){throw"Error please override this function"}isXContinuousSeries(){throw"Error please override this function"}isYContinuousSeries(){throw"Error please override this function"}decimateData(t,e,n,r){throw"Error please override this function"}setData(t,e=0){throw"Error please override this function"}getTooltipMetrics(t,e){throw"Error please override this function"}getName(){throw"Error please override this function"}initializeClasses(){this._classes=this.getClassNames("chart-heat-map"),this._selectionClasses=this.getSelectionClasses("chart-heat-map")}applyStyles(){if(super.applyStyles(),this._layer.css){let t=this._layer.css.style;if(t)for(let e=0;e<this._d3Elems.length;++e)for(let n in t)this._d3Elems[e].style(n,t[n])}}getLegendInfo(){return[]}configureTooltip(t){let e=this;function n(t){return e._d3Chart.getTooltip().setData(`${t.y}: ${t.x} ${t.value}`,[]),!0}e._d3Chart.getTooltip().setTarget(t),this._d3Chart.getTooltip().setEnterCallback(n).setMoveCallback(n)}render(){let t=this;this._d3Elems=[],this.initializeContextMenuItems(),this.isXContinuousSeries()||(t._d3XAxis.getScale().padding(0),t._d3XAxis.render());let e=t._d3XAxis.getScale().copy();e.clamp&&e.clamp(!1);let n=t._d3YAxis;if(!this.isYContinuousSeries()){let t=this._d3Chart.getOptions().height;n.getScale().padding(0),n.getRangePixels()<t&&n.setRangePixels(t),n.render()}let i=n.getScale().copy();i.clamp&&i.clamp(!1);let a=[];this._layer.gradient.forEach(t=>{a.push(parseInt(t.color.substring(1),16))});let u,c=l.scaleQuantize().domain(l.extent(this._layer.gradient,t=>t.key)).range(a),f=t._d3Chart.getGraphGroup(),d=this.getClassNames("chart-heat-map");if(this._layer.css)for(let t in this._layer.css.classes)d+=t+" ";let p,g,_,m=i.bandwidth?i.bandwidth():void 0,v=e.bandwidth?e.bandwidth():void 0,y=(t,n)=>{void 0===t.y1?u=i(t.y):(u=i(t.y),m=i(t.y1)-u),void 0===t.x1?p=e(t.x):(p=e(t.x),v=e(t.x1)-p),n.x=p,n.y=u,n.width=v,n.height=m},x=this.getOutputData(),b=x.length(),w=!0;if(this._pixiHelper&&(_=f.select(this._selectionClasses),g=this._pixiHelper.getStage(),g)){let t=this._pixiHelper.getStage().children;if(t.length===b){for(let e=0;e<b;e++){y(x.get(e),t[e])}w=!1}}if(w){if(!this._pixiHelper){this._pixiHelper=new s.PIXIHelper(!this._d3Chart.getOptions().forceCanvasRenderer),this._pixi=this._pixiHelper.getRenderer();let t=new h.Graphics;t.beginFill(16777215),t.drawRect(0,0,1,1),t.endFill(),this._rectTexture=this._pixi.generateTexture(t,h.SCALE_MODES.LINEAR,8)}_=this._pixiHelper.addPixiSvg(f,d,this._d3XAxis.getRangePixels(),this._d3YAxis.getRangePixels()),_.attr("cursor","pointer"),this._pixiHelper.clearSelections(),g=new h.Container;let e=t._d3Chart.getElement();this._d3Chart.getTooltip().releaseListeners();for(let n=0;n<b;n++){let i=x.get(n),a=c(i.value);var M=new h.Sprite(this._rectTexture);M.tint=a,M.x=p,M.y=u,M.width=v,M.height=m;let s=M;this._pixiHelper.addInteractionHelper(s,this._d3Chart.getOptions(),this._layer.onClick,this._layer.onDoubleClick,t._contextMenuItems,()=>{this._selection=i,i&&this._d3Chart.onHover({caller:e,event:r.EventType.HoverStart,data:i,selection:o.getSelectionName(i.y)})},()=>{i&&this._d3Chart.onHover({caller:e,event:r.EventType.HoverEnd,data:i,selection:o.getSelectionName(i.y)}),this._selection=void 0},t._d3Chart.getTooltip(),e,i,i),g.addChild(M),this.configureTooltip(M),y(i,M)}}let k=this._d3XAxis.getRangePixels(),T=this._d3YAxis.getRangePixels();_.attr("width",k).attr("height",T),this._pixi.resize(k,T),this._pixiHelper.render(g),t.applyStyles()}}e.BaseHeatMap=f;class d extends f{constructor(t,e,n,r,i,o){super(t,e,r,i,!1,n),this.setData(e)}static canRender(t){return 0!=(t.renderType&i.RenderType.HeatMap)&&t.data[0]&&t.data[0].hasOwnProperty("values")}setData(t,e=0){this._data=t.data[e],Array.isArray(this._data.values)?this._values=new o.SimpleBuffer(this._data.values):this._values=this._data.values,this.initializeClasses()}applyStyles(){if(super.applyStyles(),this._data.css){let t=this._data.css.style;if(t)for(let e=0;e<this._d3Elems.length;++e)for(let n in t)this._d3Elems[e].style(n,t[n])}}getDecimationName(){return this._layer.decimator?o.getSelectionName(this._layer.decimator.getName()):""}getName(){return this._data.name?this._data.name:""}isXContinuousSeries(){return!1}isYContinuousSeries(){return!1}getCss(){return this._data.css}getDiscreteXValues(t){return a.getKeys(this._data.values,(function(t){return[t.x]}))}getDiscreteYValues(){return a.getKeys(this._data.values,(function(t){return[t.y]})).reverse()}decimateData(t,e,n,r){let i=this;i._worker&&(i._worker.terminate(),i._worker=null),i._layer.decimator&&(i._decimator=i._layer.decimator);n.getScale(),r.getScale();return i._decimator,i._layer.enableWebWorkers||i._d3Chart.getOptions().enableWebWorkers?new Promise((function(n,r){i._worker=u.createDecimatorWorker(i._decimator,t,e,i._d3XAxis,i._d3YAxis,i._values.getData(),void 0,(function(t){i.setOutputData(t),i._worker=null,n()}),(function(r){i._worker=null;let o=i._decimator.decimateValues(t,e,i._values);i.setOutputData(o),n()}))})):new Promise((function(t,e){let n=i._values;i.setOutputData(n),t()}))}getTooltipMetrics(t,e){return[{source:t,group:"",metrics:{}}]}}e.XYHeatMapSeries=d,u.D3Chart.register(d);class p extends f{constructor(t,e,n,r,i,o){super(t,e,r,i,!0,n),this.setData(e)}static canRender(t){return 0!=(t.renderType&i.RenderType.HeatMap)&&t.data[0]&&t.data[0].hasOwnProperty("dx")}setData(t,e=0){Array.isArray(this._layer.data)?this._values=new o.SimpleBuffer(this._layer.data):this._values=this._layer.data,this.initializeClasses()}getName(){return""}getDecimationName(){return this._layer.decimator?o.getSelectionName(this._layer.decimator.getName()):""}isXContinuousSeries(){return!0}isYContinuousSeries(){return!1}getCss(){return this._layer.css}getDiscreteYValues(){return a.getKeys(this._layer.data,(function(t){return[t.y]})).reverse()}getXMinMax(){let t=[];return this._layer.data.length>0&&(t.push(this._layer.data[0].x),t.push(l.max(this._layer.data,(function(t,e,n){return t.x+t.dx})))),t}decimateData(t,e,n,r){let i=this;i._worker&&(i._worker.terminate(),i._worker=null),i._layer.decimator&&(i._decimator=i._layer.decimator);n.getScale(),r.getScale();return i._decimator,i._layer.enableWebWorkers||i._d3Chart.getOptions().enableWebWorkers?new Promise((function(n,r){i._worker=u.createDecimatorWorker(i._decimator,t,e,i._d3XAxis,i._d3YAxis,i._values.getData(),void 0,(function(t){i.setOutputData(t),i._worker=null,n()}),(function(r){i._worker=null;let o=i._decimator.decimateValues(t,e,i._values);i.setOutputData(o),n()}))})):new Promise((function(t,e){let n=i._layer.data;i.setOutputData(n),t()}))}getTooltipMetrics(t,e){return[{source:t,group:"",metrics:{}}]}}e.TraceHeatMapSeries=p,u.D3Chart.register(p)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(11),i=n(32),o=n(2),a=n(10),s=n(43);class u{constructor(t,e,n,r,i,o){this._d3Chart=t,this._isXContinuous=!0,this._svg=n,this._xAxis=r,this._yAxis=i,this._d3SeriesList=[],this.setData(e)}static canRender(t){return t.data[0]&&t.data[0].hasOwnProperty("dx")&&(0!=(t.renderType&r.RenderType.Area)||0!=(t.renderType&r.RenderType.Line)||0!=(t.renderType&r.RenderType.Stacked))}setData(t){if(this._layer&&this._data&&this._data===this._layer.data)return;this._layer=t;let e={};this._data=this._layer.data;for(let t=0;t<this._data.length;++t)e[this._data[t].name]=!0;if(this._states=Object.keys(e).sort((t,e)=>t.localeCompare(e)),1===this._states.length&&"undefined"===this._states[0]&&console.warn("Warning ITraceData does not have the name property: This is used for when rendering trace data"),this._isStackedArea=0!=(this._layer.renderType&r.RenderType.Area)||0!=(this._layer.renderType&r.RenderType.Stacked),this._d3SeriesList=[],this._isStackedArea)for(let e=0;e<this._states.length;++e){let n={renderType:t.renderType|r.RenderType.Area,interpolateType:t.interpolateType,data:[{name:this._states[e]}]},i=new s.XYSeries(this._d3Chart,n,this._svg,this._xAxis,this._yAxis,this._isXContinuous);this._d3SeriesList.push(i)}else{let e={renderType:r.RenderType.Line,interpolateType:t.interpolateType,data:[{name:this._d3Chart.getTitle()}]},n=new s.XYSeries(this._d3Chart,e,this._svg,this._xAxis,this._yAxis,this._isXContinuous);this._d3SeriesList.push(n)}}getName(){return""}getMaxNameLength(){let t=0;for(let e=0;e<this._d3SeriesList.length;++e)t=Math.max(t,this._d3SeriesList[e].getName().length);return t}isXContinuousSeries(){return!0}isYContinuousSeries(){return this._isStackedArea}getDiscreteXValues(t){return[]}getDiscreteYValues(){return this._states}getXMinMax(){let t=[Number.MAX_VALUE,-Number.MAX_VALUE],e=this._layer.data;if(e.length>0){let n=e[e.length-1];t=[e[0].x,n.x+n.dx]}return t}getYMinMax(){return[0,100]}getRequiredHeight(){return 0}getXScalingInfo(){if(this._d3SeriesList.length>0)return this._d3SeriesList[0].getXScalingInfo()}getYScalingInfo(){if(this._d3SeriesList.length>0)return this._d3SeriesList[0].getXScalingInfo()}decimateData(t,e,n,r){let s=this;s._worker&&(s._worker.terminate(),s._worker=null);let u,c=n.getScale(),l=r.getScale();u=this._layer.decimator?this._layer.decimator:this._isStackedArea?new i.TraceResidencyDecimator:new i.TraceStateDecimator;let h=t=>{if(this._isStackedArea)for(let e=0;e<s._d3SeriesList.length;++e)s._d3SeriesList[e].setOutputData(t[e]);else s._d3SeriesList[0].setOutputData(t)};return(s._layer.enableWebWorkers||s._d3Chart.getOptions().enableWebWorkers)&&i.InternalDecimatorMap[u.getKey()]?new Promise((function(i,f){s._worker=a.createDecimatorWorker(u,t,e,n,r,s._layer.data,s._states,(function(t){s._worker=null,h(t),i()}),(function(n){s._worker=null,u.initialize(c,c.invert,l,s._states);let r=u.decimateValues(t,e,new o.SimpleBuffer(s._layer.data));h(r),i()}))})):new Promise((function(n,r){u.initialize(c,c.invert,l,s._states);let i=u.decimateValues(t,e,new o.SimpleBuffer(s._layer.data));h(i),n()}))}getTooltipMetrics(t,e){let n={source:t,group:"",metrics:{}};for(let r=0;r<this._d3SeriesList.length;++r){let i=this._d3SeriesList[r].getTooltipMetrics(t,e);for(let t=0;t<i.length;++t)for(let e in i[t].metrics)n.metrics[e]=i[t].metrics[e]}return[n]}getLegendInfo(){let t=[];for(let e=0;e<this._d3SeriesList.length;++e)t=t.concat(this._d3SeriesList[e].getLegendInfo());return t}focus(t){for(let e=0;e<this._d3SeriesList.length;++e)this._d3SeriesList[e].focus(t)}unfocus(t){for(let e=0;e<this._d3SeriesList.length;++e)this._d3SeriesList[e].unfocus(t)}select(t){for(let e=0;e<this._d3SeriesList.length;++e)this._d3SeriesList[e].select(t)}unselect(t){for(let e=0;e<this._d3SeriesList.length;++e)this._d3SeriesList[e].unselect(t)}render(t){if(this._d3SeriesList.length>0){let e=0;this._d3SeriesList.forEach(t=>{e=Math.max(e,t.getOutputData().length())}),t=Array.apply(null,Array(e)).map(Number.prototype.valueOf,0);for(let e=0;e<this._d3SeriesList.length;++e)this._d3SeriesList[e].render(t)}}}e.TraceSeries=u,a.D3Chart.register(u)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(10),i=n(43);class o extends i.XYSeries{constructor(t,e,n,r,i,o){super(t,e,n,r,i,o),this.setData(e)}static canRender(t){return t.data[0]&&t.data[0].hasOwnProperty("functionMap")}setData(t){super.setData(t)}isYContinuousSeries(){return!0}getCss(){return this._data.css}getDiscreteXValues(t){}getDiscreteYValues(){}getXMinMax(){return[this._data.functionMap.xMin,this._data.functionMap.xMax]}getYMinMax(){return[this._data.functionMap.yMin,this._data.functionMap.yMax]}decimateData(t,e,n,r){let i=this;return new Promise((function(n,r){let o=i._d3XAxis.getDomain(),a=i._d3XAxis.getRangePixels();if(t||(t=o[0]),e||(e=o[1]),a>0){let n=[],r=(e-t)/a,o=t,s=i._data.functionMap.y;for(let t=0;t<a;++t)n.push({x:o,y:s(o)}),o+=r;i.setOutputData(n)}n()}))}}e.FunctionSeries=o,r.D3Chart.register(o)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(11),i=n(2),o=n(10),a=n(20),s=n(3);class u extends a.BaseSeries{constructor(t,e,n,r,i,o){super(t,e,r,i,!1,n),this.setData(e)}static canRender(t){return 0!=(t.renderType&r.RenderType.MinMaxValue)}setData(t){this._data=t.data}isYContinuousSeries(){return!0}getCss(){}getDiscreteXValues(t){let e={};for(let t=0;t<this._data.length;++t)e[this._data[t].x]=!0;return Object.keys(e)}getDiscreteYValues(){return[]}getXMinMax(){return[]}getYMinMax(){let t=[0,0];return this._data.length>0&&(t[0]=s.min(this._data,(function(t){return t.min})),t[1]=s.max(this._data,(function(t){return t.max})),t[0]=t[0]>0?0:t[0]),t}decimateData(t,e,n,r){let i=this;return new Promise((function(t,e){i.setOutputData(i._data),t()}))}getLegendInfo(){return[]}getTooltipMetrics(t,e){let n={source:t,group:"",metrics:{}},r=this.getYScalingInfo().baseScale.scalar,i=this.getYScalingInfo().baseScale.units;for(let t=0;t<this._data.length;++t){let o=this._data[t];o.x===e.selection&&(o.min&&(n.metrics.Min=(o.min*r).toFixed(2)+i),o.max&&(n.metrics.Max=(o.max*r).toFixed(2)+i),o.y&&(n.metrics.Avg=(o.y*r).toFixed(2)+i))}return[n]}render(){let t=this;for(let t=0;t<this._d3Elems.length;++t)this._d3Elems[t].remove();this._d3Elems=[],this.initializeContextMenuItems();let e=t._d3XAxis.getScale(),n=t._d3YAxis.getScale(),r=this.getClassNames("chart-min-max-value");if(this._layer.css)for(let t in this._layer.css.classes)r+=t+" ";let o=t._d3Chart.getRenderer().getColorManager().getColor(t.getName());function a(t){return e(t.x)+e.bandwidth()/2}function u(t){return void 0===t.y?t.y:n(t.y)}this._layer.css&&this._layer.css.style&&this._layer.css.style.hasOwnProperty("color")&&(o=this._layer.css.style.color);let c=function(t){return i.getSelectionName(t.x)},l=t._d3svg.selectAll(this.getSelectionClasses("chart-min-max-value")).data(this._data);l.enter().append("circle").attr("class",c).classed(r+" chart-min-max-value",!0).attr("r",(function(t){return t.y?2.5:0})).attr("cx",a).attr("cy",u).attr("fill",o).attr("stroke",o).each((function(e,n){t._d3Elems.push(s.select(this)),t.configureBandedItemInteration(s.select(this),e,e.x)}));let h=t._d3Chart.getAnimateDuration();l=t._d3svg.selectAll(".chart-min-max-value-line"+this.getSelectionClasses("chart-min-max-value")).data(this._data).enter().append("line").attr("class",c).classed(r+" chart-min-max-value-line",!0).attr("x1",a).attr("x2",a).attr("fill",o).attr("stroke",o).attr("stroke-width",1).attr("y1",u).attr("y2",u).each((function(e,n){t._d3Elems.push(s.select(this)),t.configureBandedItemInteration(s.select(this),e,e.x)})),l.transition().duration(h).attr("y1",(function(t){return void 0===t.min?t.min:n(t.min)})).attr("y2",(function(t){return void 0===t.max?t.max:n(t.max)})),this.applyStyles()}}e.MinMaxSeries=u,o.D3Chart.register(u)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(1),i=n(11),o=n(2),a=n(5),s=n(10),u=n(20),c=n(3);class l extends u.BaseSeries{constructor(t,e,n,r,i,o){super(t,e,r,i,o,n),this.setData(e)}static canRender(t){return t.data[0]&&t.data[0].hasOwnProperty("rects")}setData(t){this._data=t.data[0],this._description=t.data[0].description,this._values=new o.SimpleBuffer(this._data.rects),this._classes=this.getClassNames("chart-rect")}applyStyles(){if(super.applyStyles(),this._data.css){let t=this._data.css.style;if(t)for(let e=0;e<this._d3Elems.length;++e)for(let n in t)this._d3Elems[e].style(n,t[n])}}getName(){return this._data.name?this._data.name:""}isYContinuousSeries(){return!this._data.rects.length||!(isNaN(this._data.rects[0].y)||isNaN(this._data.rects[0].y1))}getCss(){return this._data.css}getDiscreteXValues(t){return a.getKeys(this._data.rects,(function(t){return[t.x,t.x1]}))}getDiscreteYValues(){return a.getKeys(this._data.rects,(function(t){return[t.y,t.y1]})).reverse()}getXMinMax(){let t=[Number.MAX_VALUE,Number.MIN_VALUE],e=this._values.length();for(let n=0;n<e;++n)t[0]=Math.min(t[0],this._values.get(n).x),t[1]=Math.max(t[1],this._values.get(n).x),t[0]=Math.min(t[0],this._values.get(n).x1),t[1]=Math.max(t[1],this._values.get(n).x1);let n=this.getXScalingInfo().baseScale.scalar;return t[0]=t[0]*n,t[1]=t[1]*n,t}getYMinMax(){let t=[Number.MAX_VALUE,Number.MIN_VALUE],e=this._values.length();for(let n=0;n<e;++n)t[0]=Math.min(t[0],this._values.get(n).y),t[1]=Math.max(t[1],this._values.get(n).y),t[0]=Math.min(t[0],this._values.get(n).y1),t[1]=Math.max(t[1],this._values.get(n).y1);return t}decimateData(t,e,n,r){return new Promise((function(t,e){t()}))}getTooltipMetrics(t,e){return[]}getLegendInfo(){return[]}render(){let t=this;t._d3Elems=[],this.initializeContextMenuItems();let e=t._d3XAxis.getScale(),n=t._d3YAxis.getScale(),o=e.bandwidth?e.bandwidth()/2:0,a=n.bandwidth?n.bandwidth()/2:0;t.xMap=function(t){return e(t)+o},t.yMap=function(t){let e=n(t);return void 0===e&&(e=0),e+a};let s,u=this.getSelectionClasses("chart-rect");t._data.css&&(s=t._data.css.style.color),s||(s=t._d3Chart.getRenderer().getColorManager().getColor(t.getName()));let l=t._d3svg.selectAll(u).data(this._data.rects);if(l.enter().append("rect").classed(this._classes,!0).attr("fill",t._layer.renderType===i.RenderType.Area?s:"none").attr("stroke",s).attr("x",(function(e){return t.xMap(e.x)})).attr("width",(function(e){return t.xMap(e.x1)-t.xMap(e.x)})).attr("y",(function(e){return t.yMap(e.y1)})).attr("height",(function(e){return t.yMap(e.y)-t.yMap(e.y1)})).each((function(e){t._d3Elems.push(c.select(this)),t.configureItemInteraction(c.select(this),e.value,e.value)})),l.attr("x",(function(e){return t.xMap(e.x)})).attr("width",(function(e){return t.xMap(e.x1)-t.xMap(e.x)})).attr("y",(function(e){return t.yMap(e.y1)})).attr("height",(function(e){return t.yMap(e.y)-t.yMap(e.y1)})),this._description){let e=t._d3svg.selectAll(t.getSelectionClasses("chart-rect")+"."+t._layer.data[0].name).filter("text").data(this._data.rects);e.exit().remove();let n=e=>{switch(t._description.alignment){case r.Alignment.Top:return`translate(${t.xMap(e.x)}, ${t.yMap(e.y1)})`;case r.Alignment.Bottom:return`translate(${t.xMap(e.x)}, ${t.yMap(e.y)})`;case r.Alignment.Left:return`translate(${t.xMap(e.x)}, ${t.yMap(e.y)}) rotate(-90)`;case r.Alignment.Right:default:return`translate(${t.xMap(e.x1)}, ${t.yMap(e.y1)}) rotate(90)`}};e.enter().append("text").classed(t._classes,!0).classed(t._layer.data[0].name,!0).text((function(e){return t._description.text})).attr("dy","-.5em").attr("fill",s).attr("transform",n),e.attr("transform",n)}t.applyStyles()}}e.RectSeries=l,s.D3Chart.register(l)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(1),i=n(11),o=n(32),a=n(2),s=n(10),u=n(20),c=n(3);class l extends u.BaseSeries{constructor(t,e,n,r){super(t,e,r,void 0,!0,n);let i=this;this.setData(e),i.getDataKey=function(t){return t.key},i.getDataName=function(t){return t&&t.name?t.name:i.getDataKey(t).toString()},i.getDataStart=function(t){return t.x},i.getDataDuration=function(t){return t.dx?t.dx:0}}static canRender(t){return 0!=(t.renderType&i.RenderType.Marker)}setData(t){this._data=t.data}getDecimationName(){return this._layer.decimator?a.getSelectionName(this._layer.decimator.getName()):""}isYContinuousSeries(){return!1}getCss(){}getDiscreteXValues(t){return[]}getDiscreteYValues(){return[]}getXMinMax(){let t=this,e=[];return this._data.length>0&&(e.push(t.getDataStart(this._data[0])),e.push(c.max(this._data,(function(e,n,r){return t.getDataStart(e)+t.getDataDuration(e)})))),e}getYMinMax(){return[]}decimateData(t,e,n,r){let i=this;i._worker&&(i._worker.terminate(),i._worker=null),i._layer.decimator?i._decimator=i._layer.decimator:i._decimator=new o.SimpleMarkerDecimator;let u=n.getScale(),c=r.getScale();return!i._layer.enableWebWorkers&&!i._d3Chart.getOptions().enableWebWorkers||i._decimator?new Promise((function(n,r){i._decimator.initialize(u,u.invert,c);let o=i._decimator.decimateValues(t,e,new a.SimpleBuffer(i._data));i.setOutputData(o),n()})):new Promise((function(n,r){i._worker=s.createDecimatorWorker(i._decimator,t,e,i._d3XAxis,i._d3YAxis,i._data,void 0,(function(t){i.setOutputData(t),i._worker=null,n()}),(function(r){i._worker=null,i._decimator.initialize(u,u.invert,c);let o=i._decimator.decimateValues(t,e,new a.SimpleBuffer(i._data));i.setOutputData(o),n()}))}))}getLegendInfo(){return[]}getTooltipMetrics(t,e){let n=[];if(this._selection){let e={};e[this.getDataName(this._selection)]=this.getDataDuration(this._selection),n.push({source:t,group:"",metrics:e})}let r={source:t,group:"Stack",metrics:{}};for(let t=0;t<this._data.length;++t){let n=this._data[t],i=this.getDataStart(n);if(!(e.xEnd>i))break;e.xEnd<=i+this.getDataDuration(n)&&(r.metrics[this.getDataName(n)]="")}return n.push(r),n}configureMarkerInteraction(t,e){let n=this;t.on("mouseenter",(function(){n._selection=e,e&&n._d3Chart.onHover({event:r.EventType.HoverStart,data:e,selection:a.getSelectionName(n.getDataName(e))})})).on("mouseleave",(function(){e&&n._d3Chart.onHover({event:r.EventType.HoverEnd,data:e,selection:a.getSelectionName(n.getDataName(e))}),n._selection=void 0})),n.configureItemInteraction(t,e,e.key.toString())}render(){let t=this,e=t._d3XAxis.getScale();this.initializeContextMenuItems();let n=this.getClassNames("chart-marker");if(this._layer.css)for(let t in this._layer.css.classes)n+=t+" ";t._d3svg.selectAll(this.getSelectionClasses("chart-marker")).remove();let r=this.getOutputData(),i=r.length();for(let o=0;o<i;o++){let i=r.get(o),a=e(t.getDataStart(i)),s=0,u=t._d3svg.append("svg:image").attr("xlink:href",t._layer.image).attr("class",n).classed(t.getDataKey(i).toString(),!0).classed(t.getDataName(i),!0).attr("x",a).attr("y",s);this.configureMarkerInteraction(u,i)}this.applyStyles()}}e.MarkerSeries=l,s.D3Chart.register(l)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(11),i=n(2),o=n(86),a=n(10),s=n(20),u=n(3);class c extends s.BaseSeries{constructor(t,e,n,r,i,o){super(t,e,r,i,!1,n),e.colors?this._colors=e.colors:this._colors={},this._levelKeys=[],this._levelKeyList=[],this._leafData={},this.setData(e)}static canRender(t){return 0!=(t.renderType&r.RenderType.Bar)}setData(t){this._data=t.data}isYContinuousSeries(){return!0}getCss(){}getMaxName(){let t="";return this._levelKeyList.forEach(e=>{e.forEach(e=>{t=e.length>t.length?e:t})}),t}getLevelKeys(){return this._levelKeyList}static formatDataPerLevelHelper(t,e,n,r,i,o){t.length<=o&&(t[o]={},e[o]=[]);let a=[];for(let t=0;t<r.length;++t)a[t]=r[t];if(i.key&&(a.push(i.key),t[o].hasOwnProperty(i.key)||(t[o][i.key]=!0,e[o].push(i.key))),Array.isArray(i.data))for(let r=0;r<i.data.length;++r)c.formatDataPerLevelHelper(t,e,n,a,i.data[r],o+1);else{let r=o+1;t.length<=r&&(t[r]={},e[r]=[]);let s=i.data;for(let n in s)"key"===n||"keys"===n||t[r].hasOwnProperty(n)||(t[r][n]=!0,e[r].push(n));s.keys=a,s.key=i.key,n[i.key]||(n[i.key]=[]),n[i.key].push(s)}}formatDataPerLevel(){this._levelKeys=[],this._levelKeyList=[],this._leafData={};for(let t=0;t<this._data.length;++t)c.formatDataPerLevelHelper(this._levelKeys,this._levelKeyList,this._leafData,[],this._data[t],0);this._stackData=[];let t=this._levelKeyList[this._levelKeyList.length-1],e=u.stack().keys(t);for(let t in this._leafData)this._stackData.push(e(this._leafData[t]))}getDiscreteXValues(t){let e={};if(this._hasLevels=!0,1===this._data.length){let t=this._data[0].data,e=Object.keys(t).length;this._hasLevels=1===e,this._hasLevels=this._hasLevels||3===e&&this._data[0].data.hasOwnProperty("key")&&this._data[0].data.hasOwnProperty("keys")}if(this._hasLevels||this._layer.renderType&r.RenderType.Stacked){this.formatDataPerLevel();for(let t=0;t<this._data.length;++t)e[this._data[t].key]=!0}else{this._levelKeyList[0]=[];for(let t=0;t<this._data.length;++t)for(let n in this._data[t].data)"key"!==n&&"keys"!==n&&(e[n]=!0,this._levelKeyList[0].push(n));this._levelKeys[0]=e}return Object.keys(e)}static getBarsPerDomainHelper(t,e){let n=0;if(Array.isArray(t.data))for(let r=0;r<t.data.length;++r)n+=c.getBarsPerDomainHelper(t.data[r],e);else{let r=t.data;if(e)n=1;else for(let t in r)"key"!==t&&"keys"!==t&&++n}return n}getBarsPerDomain(t){let e=0;if(1!==this._data.length||t)for(let n=0;n<this._data.length;++n)e=Math.max(e,c.getBarsPerDomainHelper(this._data[n],t));else e=1;return e}getDiscreteYValues(){return[]}getXMinMax(){return[]}static getYMinMaxHelper(t,e,n){if(Array.isArray(e.data))for(let r=0;r<e.data.length;++r)c.getYMinMaxHelper(t,e.data[r],n);else{let r=e.data;if(n){let e=0;for(let t in r)"key"!==t&&"keys"!==t&&(e+=r[t]);t[0]=Math.min(e,t[0]),t[1]=Math.max(e,t[1])}else for(let e in r)"key"!==e&&"keys"!==e&&(t[0]=Math.min(r[e],t[0]),t[1]=Math.max(r[e],t[1]))}}getYMinMax(){let t=0!=(this._layer.renderType&r.RenderType.Stacked),e=[0,0];for(let n=0;n<this._data.length;++n)c.getYMinMaxHelper(e,this._data[n],t);return e}decimateData(t,e,n,r){let i=this;return new Promise((function(t,e){i.setOutputData(i._data),t()}))}getTooltipMetricHelper(t,e,n,r){if(Array.isArray(r.data))for(let i=0;i<r.data.length;++i)this.getTooltipMetricHelper(t,e,n,r.data[i]);else{let i=this.getYScalingInfo().baseScale.scalar,o=this.getYScalingInfo().baseScale.units,a=r.data;if(a.keys[0]===n.selection){let n="";for(let t=1;t<a.keys.length;++t)n+=a.keys[t]+"-";n.length>0&&(n=n.substring(0,n.length-1));let r={source:e,group:n,metrics:{}};for(let t in a)"key"!==t&&"keys"!==t&&(r.metrics[t]=(a[t]*i).toFixed(2)+o);t.push(r)}}}getTooltipMetrics(t,e){let n=[],i=this.getYScalingInfo().baseScale.scalar,o=this.getYScalingInfo().baseScale.units;if(this._hasLevels||this._layer.renderType&r.RenderType.Stacked)for(let r=0;r<this._data.length;++r)this.getTooltipMetricHelper(n,t,e,this._data[r]);else{let r={source:t,group:"",metrics:{}};for(let t=0;t<this._data.length;++t){let n=this._data[t].data;for(let t in n)t===e.selection&&(r.metrics[t]=(n[t]*i).toFixed(2)+o)}n.push(r)}return n}static getLegendInfoHelper(t={},e){if(Array.isArray(e.data))for(let n=0;n<e.data.length;++n)c.getLegendInfoHelper(t,e.data[n]);else{let n=e.data;for(let e in n)"key"!==e&&"keys"!==e&&(t[e]=!0)}}getLegendInfo(){let t=[],e={};for(let t=0;t<this._data.length;++t)c.getLegendInfoHelper(e,this._data[t]);for(let n in e){let e=this._d3svg.selectAll("."+i.getSelectionName(n));t.push({key:n,color:e.style("fill")?e.style("fill"):e.attr("fill"),opacity:e.style("opacity")?e.style("opacity"):e.attr("opacity"),shape:"rect"})}return t}render(){let t=this;for(let e=0;e<t._d3Elems.length;++e)t._d3Elems[e].remove();this.initializeContextMenuItems(),t._d3Elems=[];let e=t._d3YAxis.getScale(),n=e.domain(),a=this._d3XAxis.getLevelCount(),s=[];for(let e=0;e<a;++e)s.push(t._d3XAxis.getScale(e));let u=t.getClassNames("chart-bar");if(t._layer.css)for(let e in t._layer.css.classes)u+=e+" ";let c=!1;t._layer.renderType&r.RenderType.Stacked&&(u+=" chart-stacked",c=!0);let l=t._d3Chart.getRenderer().getColorManager().getColor(t.getName());t._layer.css&&t._layer.css.style&&t._layer.css.style.hasOwnProperty("color")&&(l=t._layer.css.style.color);let h=t._d3XAxis.getAxis(),f=t._d3Chart.getAnimateDuration();if(t._data.length>0){let r,a=Math.min(s[0].bandwidth(),o.MAX_DISCRETE_WIDTH);n[0]>=0?r=e(n[0]):n[1]<=0?r=e(n[1]):n[0]<0&&n[1]>0&&(r=e(0));let d=function(e,n,r){h.options&&h.options.enableOrdinalBrushSelection?t.configureItemInteraction(e,n,r):t.configureBandedItemInteration(e,n,r),t._d3Elems.push(e)};if(c)for(let r=0;r<this._stackData.length;++r){let o=this._stackData[r];for(let r=0;r<o.length;++r){let a=o[r].key,c=i.getSelectionName(a);t._colors&&t._colors.hasOwnProperty(a)||(t._colors[a]=t._d3Chart.getRenderer().getColorManager().getColor(a));for(let l=0;l<o[r].length;++l){let h=o[r][l],p=e(h[0]);if(isNaN(h[1]))continue;let g=e(h[1]),_="";for(let t=0;t<h.data.keys.length;++t)_+=" "+i.getSelectionName(h.data.keys[t]);let m=0;for(let t=0;t<h.data.keys.length;++t)m+=s[t](h.data.keys[t]);let v=t._d3svg.append("rect").attr("x",m).attr("width",s[h.data.keys.length-1].bandwidth()-1).attr("class",_+" "+c).classed(u,!0).attr("fill",t._colors[a]).attr("y",e(n[0])).attr("height",0);v.transition("add").duration(f).attr("y",g).attr("height",p-g),d(v,h.data,_.trim())}}}else{let n=(t,n)=>{let i=e(n),o=0,a=0;n>0?(o=i,a=r-i):(o=r,a=i-r),t.transition("add").duration(f).attr("y",o).attr("height",a)};if(this._hasLevels){let e=this._levelKeyList[this._levelKeyList.length-1];for(let o=0;o<e.length;++o){let a=e[o],c=i.getSelectionName(a);t._colors&&t._colors.hasOwnProperty(a)||(t._colors[a]=t._d3Chart.getRenderer().getColorManager().getColor(a));for(let e=0;e<t._data.length;++e){let o=t._data[e],l=o.key,h=i.getSelectionName(l);if(!o.data.hasOwnProperty(a))continue;let f=0;for(let t=0;t<o.data.keys.length;++t)f+=s[t](o.data.keys[t]);f+=s[s.length-1](a);let p=t._d3svg.append("rect").attr("x",f).attr("width",s[s.length-1].bandwidth()).attr("class",h+" "+c).classed(u,!0).attr("fill",t._colors[a]).attr("y",r).attr("height",0);n(p,o.data[a]),d(p,o,o.key)}}}else{let e=t._data[0].data;for(let o in e)if("key"!==o&&"keys"!==o){let c=l;t._colors&&t._colors.hasOwnProperty(o)&&(c=t._colors[o]);let h=t._d3svg.append("rect").attr("x",s[0](o)).attr("width",a).attr("class",i.getSelectionName(o)).attr("fill",c).classed(u,!0).attr("y",r).attr("height",0),f={};f[o]=e[o],n(h,e[o]),d(h,f,o)}}}}t.applyStyles()}}e.VerticalBarSeries=c,a.D3Chart.register(c)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(1),i=n(2),o=n(3),a=n(7),s=n(87);class u extends s.D3Polar{getTooltipData(t){let e=this._element;if(e.data&&e.data.hasOwnProperty(t.selection)){let n=this._element.units?this._element.units:"",r={};return r[t.selection]=e.data[t.selection]+n,[{source:e,group:"",metrics:r}]}return[]}getRenderData(){if(!this._renderData){let t=this;this._renderData=Array.prototype.slice.call(this.createArcData()).sort((function(e,n){return t.getDataValue(e)>t.getDataValue(n)?-1:t.getDataValue(e)<t.getDataValue(n)?1:0}));let e=0;for(let t=0;t<this._renderData.length;++t)e+=this._renderData[t].rawData.value;if(e>0){let t=2*Math.PI,n=0,r=1/e;for(let e=0;e<this._renderData.length;++e){let i=this._renderData[e].rawData.value*r;this._renderData[e].startAngle=n*t,this._renderData[e].endAngle=(i+n)*t,n=i+n}}}return this._renderData}createArcData(){if(!this._arcData){let t=this._element;if(t.colors)for(let e in t.colors)this._renderer.getColorManager().setColor(e,t.colors[e]);this._arcData=[];for(let e in t.data)this._arcData.push({outerRadius:1,innerRadius:t.innerRadius?t.innerRadius:0,startAngle:0,endAngle:0,depth:1,rawData:{key:e,value:t.data[e]}})}return this._arcData}getLegendData(){return this.createArcData().map((function(t){return t.rawData}))}renderData(){let t=this,e=this._element,n=this.getRenderData(),r=t._renderer.getColorManager(),a=t.getAnimateDuration(),s=t._graphArea.selectAll(".arc").data(n);s.enter().append("path").attr("class",(function(n){let r=t.getSegmentClasses(n.rawData);return e.category&&(r=i.getSelectionName(e.category)+" "+r),e.title&&(r=i.getSelectionName(e.title)+" "+r),r})).attr("stroke","black").attr("stroke-opacity",.5).attr("fill",(function(e){return r.getColor(t.getDataName(e.rawData))})).transition("open").duration(a).attrTween("d",(function(e){let n=o.interpolate(0,e.startAngle),r=o.interpolate(0,e.endAngle);return function(i){return e.startAngle=n(i),e.endAngle=r(i),t.arc(e)}})).each((function(e){t.configureItemInteraction(o.select(this),e.rawData,e.rawData?e.rawData.key:e.rawData)})),s.attr("d",(function(e){return t.arc(e)}))}render(t){super.render(t);let e=this._svg.selectAll(".arc");this._options.disableTooltip||this.configureTooltip(e)}}e.D3Pie=u,a.D3Renderer.register(r.UIType.Pie,u)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(1),i=n(2),o=n(23),a=n(5),s=n(7),u=n(3),c=n(87);class l{constructor(){this._maxDepth=0,this.reset()}reset(){this._data={arcs:void 0,renderedArcs:void 0,background:void 0}}getKey(){return l.KEY}getName(){return""}getValues(){return this._data}addArc(t,e,n,r){this._maxDepth=Math.max(this._maxDepth,e);let i=r+t.value*n*l.VALUE_TO_ANGLE;this._data.arcs.push({outerRadius:void 0,innerRadius:void 0,startAngle:r,endAngle:i,depth:e,rawData:t}),t.children.sort((function(t,e){return t.value>e.value?-1:t.value<e.value?1:0}));for(let i=0;i<t.children.length;++i)r=this.addArc(t.children[i],e+1,n,r);return i}getArcs(t){if(!this._data.arcs){this._data.arcs=[],0!==t.value&&this.addArc(t,2,1/t.value,0);let e=1/this._maxDepth;for(let t=0;t<this._data.arcs.length;++t){let n=this._data.arcs[t];n.outerRadius=n.depth*e,n.innerRadius=(n.depth-1)*e}}return this._data.arcs}decimateArcs(t,e){this._data.arcs=this.getArcs(t),this._sortedArcs=Array.prototype.slice.call(this._data.arcs).sort((function(t,e){return t.rawData.value>e.rawData.value?-1:t.rawData.value<e.rawData.value?1:0})),this._data.renderedArcs=e?this._sortedArcs.splice(0,e):this._sortedArcs;let n={outerRadius:1/this._maxDepth,innerRadius:0,startAngle:0,endAngle:l.VALUE_TO_ANGLE,depth:0,rawData:t.parent};this._data.arcs.push(n),this._data.renderedArcs.push(n)}generateBackground(t){if(!this._data.background){this.getArcs(t);let e=[];for(let t=0;t<this._data.arcs.length;++t){let n=this._data.arcs[t];e.push({isStart:!0,angle:n.startAngle,radius:n.outerRadius}),e.push({isStart:!1,angle:n.endAngle,radius:n.outerRadius})}e.sort((function(t,e){return t.angle<e.angle?-1:t.angle>e.angle?1:0})),this._data.background=[],this._data.background.push({angle:0,radius:0});for(let t=0;t<e.length;++t){let n=e[t].angle,r=0,i=0;for(;t<e.length&&e[t].angle===n;++t)e[t].isStart?r=Math.max(r,e[t].radius):i=Math.max(i,e[t].radius);i&&(this._data.background.push({angle:this._data.background[this._data.background.length-1].angle,radius:i}),this._data.background.push({angle:n,radius:i})),r&&this._data.background.push({angle:n,radius:r})}}}setArcLimit(t){return this._arcLimit=t,this}decimateValues(t){return this.decimateArcs(t,this._arcLimit),this.generateBackground(t),this._data}}e.SunburstDecimator=l,l.KEY="SunburstDecimator",l.VALUE_TO_ANGLE=2*Math.PI;class h extends c.D3Polar{constructor(t,e,n){super(t,e,n),this._options.height=400;let r=this;this.renderBackground=u.radialArea().angle((function(t){return t.angle})).innerRadius((function(t){return 0})).outerRadius((function(t){return t.radius*r._radius}))}createLayout(){super.createLayout(),this._svg.select(".graphArea").append("path").classed("background",!0).attr("fill","black").attr("stroke","black")}getLegendData(){return[]}configureHoverLine(){let t=this,e=1.1*t._radius;return void t._svg.on("mouseover",(function(){t._hoverLine=t._svg.select("g").append("path").attr("class","polar-hover-line").attr("stroke","#222222").attr("stroke-width",1).attr("pointer-events","none")})).on("mousemove",(function(){let n=u.mouse(t._svg.node()),r=Math.atan2(n[0]-t._center.x,t._center.y-n[1]),i=[{length:0,angle:r},{length:1,angle:r}],o=u.radialLine().angle((function(t){return t.angle})).radius((function(t){return t.length*e}));t._hoverLine.attr("d",o(i))})).on("mouseout",(function(){t._hoverLine&&(t._hoverLine.remove(),t._hoverLine=void 0)}))}configureTooltip(){let t=this;return this._dataTooltip=new o.CustomDivTooltip(t._tooltipId,"tooltip-t"),void this._dataTooltip.setAnalyticsName(t._tooltipAnalyticsName).setTarget(t._svg).setEnterCallback(n).setMoveCallback(n).setPlaceTooltipLeftRight().alwaysRecalcWidth(!0).setDelay(t._options.tooltipDelay?t._options.tooltipDelay:0);function e(e){let n={},r=t._decimator.getValues().arcs;for(let i=0;i<r.length;++i){let o=r[i];o.startAngle<e&&o.endAngle>e&&(n[t.getDataName(o.rawData)]="")}return n}function n(){let n=t._hoverItem,r=u.mouse(t._svg.node()),i=Math.atan2(r[0]-t._center.x,t._center.y-r[1]);if(i<0&&(i+=h.TWO_PI),a.SVGRenderer.IS_RESIZING)return;let o=t._element,s=[];if(n){let e=o.units?o.units:"",r={};r[t.getDataName(n)]=n.value+e,s.push({source:o,group:"",metrics:r})}if(s.push({source:o,group:"Stack",metrics:e(i)}),n){let e=t.getDataName(n);if(o.onTooltip){let n={tooltip:t._dataTooltip};o.onTooltip({caller:o,selection:e,data:n})}}return o.title?t._dataTooltip.setData(o.title+" for "+t.getDataName(n),s):t._dataTooltip.setData("",s),!0}}renderData(){let t=this,e=this._element;if(!e.data&&0!==e.data.length)return;let n=2*Math.PI,r=t._decimator.getValues().arcs;t._decimator.reset();let o,a,s,c=e.data[0],l=t._decimator.decimateValues(e.data[0]),h=l.arcs,f=l.renderedArcs,d={},p=0,g={};if(r){a=r[0];for(let e=0;e<r.length;++e){let n=r[e];g[t.getDataKey(n.rawData)]=n,n.rawData===c&&(o=n)}for(let e=0;e<h.length;++e){let n=h[e];d[t.getDataKey(n.rawData)]=n}let e=t.getDataKey(a.rawData);for(let n=0;n<f.length;++n){let r=f[n];if(t.getDataKey(r.rawData)===e){s=r;break}}p=(o.startAngle+o.endAngle)/2}let _=t._element,m=t._renderer.getColorManager(),v=super.getAnimateDuration(),y=function(e){let n=g[t.getDataKey(e.rawData)],r=d[t.getDataKey(e.rawData)];if(n&&r){let e=u.interpolate(n.startAngle,r.startAngle),i=u.interpolate(n.endAngle,r.endAngle),o=u.interpolate(n.innerRadius,r.innerRadius),a=u.interpolate(n.outerRadius,r.outerRadius);return function(n){let s={startAngle:e(n),endAngle:i(n),innerRadius:o(n),outerRadius:a(n),depth:r.depth,rawData:r.rawData};return t.arc(s)}}},x=t._svg.select(".graphArea"),b=x.selectAll(".arc").data(f,(function(e){if(e)return t.getDataKey(e.rawData).toString()}));b.exit().transition("remove").duration(v).attrTween("d",(function(e){let r,i,o,a,s=y(e);return s||(r=e.startAngle>p?u.interpolate(e.startAngle,n):u.interpolate(e.startAngle,0),i=e.endAngle>p?u.interpolate(e.endAngle,n):u.interpolate(e.endAngle,0),o=u.interpolate(e.innerRadius,0),a=u.interpolate(e.outerRadius,0),function(n){let s={startAngle:r(n),endAngle:i(n),innerRadius:o(n),outerRadius:a(n),depth:e.depth,rawData:e.rawData};return t.arc(s)})})).remove(),b.transition("update").duration(v).attrTween("d",(function(t){return y(t)}));b.enter().append("path").attr("class",(function(e){let n=t.getSegmentClasses(e.rawData);return _.category&&(n=i.getSelectionName(_.category)+" "+n),_.title&&(n=i.getSelectionName(_.title)+" "+n),n})).attr("stroke","black").attr("stroke-opacity",.5).attr("fill",(function(e){return e.rawData?m.getColor(t.getDataName(e.rawData)):"white"})).on("click",(function(e){e.rawData&&(t._element.data=[e.rawData],t.renderData())})).transition("add").duration(v).attrTween("d",(function(e){let r,i,o,c,l=y(e);return l||(s?0===e.innerRadius?(r=u.interpolate(0,0),i=u.interpolate(n,n),o=u.interpolate(0,e.innerRadius),c=u.interpolate(0,e.outerRadius)):(e.startAngle>=s.endAngle?(r=u.interpolate(n,e.startAngle),i=u.interpolate(n,e.endAngle)):(r=u.interpolate(0,e.startAngle),i=u.interpolate(0,e.endAngle)),o=u.interpolate(a.innerRadius,e.innerRadius),c=u.interpolate(a.innerRadius,e.outerRadius)):(r=u.interpolate(0,e.startAngle),i=u.interpolate(0,e.endAngle),o=u.interpolate(0,e.innerRadius),c=u.interpolate(0,e.outerRadius)),function(n){let a={startAngle:r(n),endAngle:i(n),innerRadius:o(n),outerRadius:c(n),depth:e.depth,rawData:e.rawData};return t.arc(a)})})).each((function(e){t.configureItemInteraction(u.select(this),e.rawData,e.rawData?e.rawData.name:e.rawData)}));x.select(".background").style("opacity",1e-6).attr("d",t.renderBackground(t._decimator.getValues().background)).transition("backgroundShow").duration(v).style("opacity",.2)}render(t){let e=this._element;e.decimator&&(this._decimator=e.decimator),this._decimator||(this._decimator=new l),super.render(t),this.configureHoverLine()}}e.D3Sunburst=h,h.TWO_PI=2*Math.PI,s.D3Renderer.register(r.UIType.Sunburst,h)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(1),i=n(87),o=n(7),a=n(5),s=n(2),u=n(23),c=n(3);class l extends i.D3Polar{hover(t){this.focus(t)}focus(t){let e=this._svg.selectAll(".radar-area."+t.selection),n=this._svg.selectAll(".radar-circle."+t.selection);switch(t.event){case r.EventType.FocusStart:this._svg.selectAll(".radar-circle").transition().duration(200).attr("fill-opacity",.1),this._svg.selectAll(".radar-area").transition().duration(200).attr("fill-opacity",.1).attr("stroke-opacity",.1),e.transition().duration(200).attr("fill-opacity",.7).attr("stroke-opacity",.8),n.transition().duration(200).attr("fill-opacity",.7);break;case r.EventType.FocusEnd:this._svg.selectAll(".radar-circle").transition().duration(200).attr("fill-opacity",1),this._svg.selectAll(".radar-area").transition().duration(200).attr("fill-opacity",.35).attr("stroke-opacity",.8)}}getTooltipData(t){let e=this._element;for(let n=0;n<e.data.length;++n)if(e.data&&e.data[n].key.localeCompare(t.selection)){let t=e.data[n].units?e.data[n].units:"",r={};return e.data[n].data.forEach(e=>{e.units?r[e.key]=e.data+e.units:r[e.key]=e.data+t}),[{source:e,group:"",metrics:r}]}return[]}configureTooltip(t,e){if(void 0===t)return;let n=this;return this._dataTooltip=new u.CustomDivTooltip(n._tooltipId,"tooltip-t"),void this._dataTooltip.setAnalyticsName(n._tooltipAnalyticsName).setTarget(t).setEnterCallback(r).setMoveCallback(r).setPlaceTooltipLeftRight().alwaysRecalcWidth(!0).setDelay(n._options.tooltipDelay?n._options.tooltipDelay:0);function r(t){if(a.SVGRenderer.IS_RESIZING)return;let r=n._element;if(r.onTooltip){let t={tooltip:n._dataTooltip};n._dataTooltip.setData(r.title+" for "+e.key,[]),r.onTooltip({caller:r,selection:e.key,data:t})}else{let t=e.data,i={},o=e.units?e.units:"";t.forEach(t=>{t.units?i[t.key]=t.data+t.units:i[t.key]=t.data+o});let a=[{source:r,group:"",metrics:i}];r.title?n._dataTooltip.setData(r.title+" for "+e.key,a):n._dataTooltip.setData("",a)}return!0}}getLegendData(){return this._element.data}renderData(){let t=this,e=this._element.data,n=e[0].data.map((function(t){return t.key})),r=n.length,i=2*Math.PI/r,o=c.scaleLinear().range([0,this._radius]).domain([0,100]),a=this._graphArea.append("defs").append("filter").attr("id","glow"),u=(a.append("feGaussianBlur").attr("stdDeviation","2.5").attr("result","coloredBlur"),a.append("feMerge")),l=(u.append("feMergeNode").attr("in","coloredBlur"),u.append("feMergeNode").attr("in","SourceGraphic"),this._graphArea.append("g").attr("class","axis-wrapper"));l.selectAll(".levels").data(c.range(1,6).reverse()).enter().append("circle").attr("class","axis-circle").attr("r",(function(e,n){return t._radius/5*e})).style("fill","#CDCDCD").style("stroke","#CDCDCD").style("fill-opacity",.1).style("filter","url(#glow)");let h=l.selectAll(".axis").data(n).enter().append("g").attr("class","axis-line");h.append("line").attr("x1",0).attr("y1",0).attr("x2",(function(t,e){return o(100*1.1)*Math.cos(i*e-Math.PI/2)})).attr("y2",(function(t,e){return o(100*1.1)*Math.sin(i*e-Math.PI/2)})).attr("class","line").style("stroke","white").style("stroke-width","2px"),h.append("text").attr("class","axis-text").style("font-size","11px").attr("text-anchor","middle").attr("dy","0.35em").attr("x",(function(t,e){return o(125)*Math.cos(i*e-Math.PI/2)})).attr("y",(function(t,e){return o(125)*Math.sin(i*e-Math.PI/2)})).text((function(t){return t})).call((function(t,e){t.each((function(){let t,n=c.select(this),r=n.text().split(/\s+/).reverse(),i=[],o=0,a=n.attr("y"),s=n.attr("x"),u=parseFloat(n.attr("dy")),l=n.text(null).append("tspan").attr("x",s).attr("y",a).attr("dy",u+"em");for(;t=r.pop();)i.push(t),l.text(i.join(" ")),l.node().getComputedTextLength()>e&&(i.pop(),l.text(i.join(" ")),i=[t],l=n.append("tspan").attr("x",s).attr("y",a).attr("dy",1.4*++o+u+"em").text(t))}))}),60);let f=function(t){return t.range?o((t.data-t.range.min)*(t.range.max-t.range.min)*100):o(t.data)},d=c.radialLine().curve(c.curveLinearClosed).radius(f).angle((function(t,e){return e*i}));e.forEach(e=>{let n,r=t._renderer.getColorManager().getColor(e.key),o=this._graphArea.append("g").attr("fill",r).attr("class","radar-blob").classed(this.getDataKey(e).toString(),!0);if(!this._options.disableBackground){let t=o.append("path").attr("class","radar-area").classed(this.getDataKey(e).toString(),!0).attr("d",(function(){return d(e.data)})).attr("fill",r).attr("fill-opacity",.35);this.configureItemInteraction(t,e,e.key),this.configureTooltip(t,e)}n=o.append("path").attr("class","radar-area").classed(this.getDataKey(e).toString(),!0).attr("d",(function(){return d(e.data)})).attr("stroke-width","1px").attr("stroke",r).attr("fill","none").attr("filter","url(#glow)"),this.configureItemInteraction(n,e,e.key),this.configureTooltip(n,e);let a=[];e.data.forEach(t=>{let n=s.copy(t);n.parent=e.key,a.push(n)});let u=o.selectAll(".radar-circle").data(a).enter().append("circle").attr("class","radar-circle").attr("r",4).attr("cx",(function(t,e){return f(t)*Math.cos(i*e-Math.PI/2)})).attr("cy",(function(t,e){return f(t)*Math.sin(i*e-Math.PI/2)})).attr("stroke",r).attr("fill",r).attr("fill-opacity",.8).classed(this.getDataKey(e).toString(),!0);this.configureItemInteraction(u,e,e.key),this.configureTooltip(u,e)}),this._svg.attr("width",this._options.width).attr("height",this._options.height).attr("class","chart-radar")}}e.D3Radar=l,o.D3Renderer.register(r.UIType.Radar,l)},function(t,e,n){"use strict";function r(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}Object.defineProperty(e,"__esModule",{value:!0}),r(n(88)),r(n(1)),r(n(51)),r(n(22)),r(n(2)),r(n(83)),r(n(7)),r(n(5)),r(n(222)),r(n(223)),r(n(224)),r(n(225)),r(n(127))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(1),i=n(127),o=n(7),a=n(3),s=n(45);class u extends i.D3SimpleGraph{constructor(t,e,n){super(t,e,n),s.ConnectedGraphBase.prototype.initializeGraph.call(this,t)}render(t){let e=this._element;this._options.height||(this._options.height=400);let n=this._options.width,r=this._options.height;var i=a.forceSimulation().force("link",a.forceLink().id((function(t){return t.node}))).force("charge",a.forceManyBody()).force("center",a.forceCenter(n/2,r/2));i.nodes(e.nodes).on("tick",(function(){s.attr("x1",(function(t){return t.source.x})).attr("y1",(function(t){return t.source.y})).attr("x2",(function(t){return t.target.x})).attr("y2",(function(t){return t.target.y})),u.attr("cx",(function(t){return t.x})).attr("cy",(function(t){return t.y}))})),i.force("link").links(e.links);let o=this.initializeGraphArea(t),s=this.renderLinks(o),u=this.renderNodes(o,(function(t){a.event.active||i.alphaTarget(.3).restart(),t.fx=t.x,t.fy=t.y}),(function(t){t.fx=a.event.x,t.fy=a.event.y}),(function(t){a.event.active||i.alphaTarget(0),t.fx=null,t.fy=null}));this.configureView()}}e.D3ForceGraph=u,o.D3Renderer.register(r.UIType.ForceDirectedGraph,u)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(1),i=n(5),o=n(7),a=n(3),s=n(529),u=n(45);class c extends u.D3ConnectedGraphSVG{constructor(t,e,n){super(t,e,n),u.ConnectedGraphBase.prototype.initializeGraph.call(this,t)}renderLinks(t){let e=this,n=e._element;var r=e._sankey.link(),o=t.append("g").classed("links",!0).selectAll(".link").data(n.links).enter().append("path").attr("class",(function(t){return t.from+"-"+t.to})).attr("d",r).classed("link",!0).style("stroke-width",(function(t){return Math.max(1,t.dy)})).sort((function(t,e){return e.dy-t.dy})).on("mouseenter",e.linkHoverStart).on("mouseleave",e.hoverEnd).each((function(t){i.addClickHelper(a.select(this),e.getOptions(),n.onClick,n.onDoubleClick,n.contextMenuItems,e._dataTooltip,n,t)}));return e._dataTooltip.setTarget(o),o}renderNodes(t,e){let n=this,r=n._element,o=this._options.width;var s=t.append("g").classed("nodes",!0).selectAll(".nodeGroup").data(r.nodes).enter().append("g").classed("nodeGroup",!0).attr("transform",(function(t){return"translate("+t.x+","+t.y+")"})).each((function(t){i.addClickHelper(a.select(this),n.getOptions(),r.onClick,r.onDoubleClick,r.contextMenuItems,n._dataTooltip,r,t)})).call(a.drag().subject((function(t){return n.getOptions().disableSelection||i.onSelectHelper(n._element,t,t.key),t})).on("start",(function(){i.SVGRenderer.IS_RESIZING=!0,this.parentNode.appendChild(this)})).on("drag",e).on("end",(function(){i.SVGRenderer.IS_RESIZING=!1})));let u=n._renderer.getColorManager();return s.append("rect").attr("height",(function(t){return t.dy})).attr("width",n._sankey.nodeWidth()).attr("class",(function(t){return t.type?t.type+" "+t.key:t.key})).classed("node",!0).style("fill",(function(t){return t.type?u.getColor(t.type):u.getColor(t.key)})).style("stroke",(function(t){return a.rgb(t.color).darker(2)})).on("mouseenter",n.nodeHoverStart).on("mouseleave",n.hoverEnd),s.append("text").attr("x",-6).attr("y",(function(t){return t.dy/2})).attr("dy",".35em").attr("text-anchor","end").attr("transform",null).text((function(t){return t.key})).filter((function(t){return t.x<o/2})).attr("x",6+n._sankey.nodeWidth()).attr("text-anchor","start"),n._dataTooltip.setTarget(s),s}render(t){let e=this,n=e._element;this._options.height||(this._options.height=400);let r=this._options.width,i=this._options.height;void 0!==a.sankey?e._sankey=a.sankey().size([r,i]):e._sankey=s.sankey().size([r,i]);var o=e._sankey.link();this._sankey.nodes(n.nodes).links(n.links).layout(32);let u=e.initializeGraphArea(t),c=this.renderLinks(u);this.renderNodes(u,(function(t){a.select(this).attr("transform","translate("+(t.x=Math.max(0,Math.min(r-t.dx,a.event.x)))+","+(t.y=Math.max(0,Math.min(i-t.dy,a.event.y)))+")"),e._sankey.relayout(),c.attr("d",o)})),e.configureView()}}e.D3SankeyDiagram=c,o.D3Renderer.register(r.UIType.FlowDiagram,c)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(1),i=n(2),o=n(5),a=n(45),s=n(7);class u extends a.D3ConnectedGraphSVG{constructor(t,e,n){super(t,e,n),this._options.width=void 0,this._nodes={},this._graphRect=this._svgRect;let i=this;this.getLinkStartXY=function(t){let e=this._nodes[t.source.node.def.key],n=a.getCoordsAndCache(i._svg,e),o={x:void 0,y:void 0},s=0;switch(t.source.alignment){case r.Alignment.Bottom:s=t.source.endPoint*((n.right-n.x)/(e.ports.bottom.length+1)),o.x=n.x+s,o.y=n.bottom;break;case r.Alignment.Top:s=t.source.endPoint*((n.right-n.x)/(e.ports.top.length+1)),o.x=n.x+s,o.y=n.y;break;case r.Alignment.Left:s=t.source.endPoint*((n.bottom-n.y)/(e.ports.left.length+1)),o.x=n.x,o.y=n.y+s;break;case r.Alignment.Right:s=t.source.endPoint*((n.bottom-n.y)/(e.ports.right.length+1)),o.x=n.right,o.y=n.y+s}return o},this.getLinkEndXY=function(t){let e=this._nodes[t.target.node.def.key],n=a.getCoordsAndCache(i._svg,e),o={x:void 0,y:void 0},s=0;switch(t.target.alignment){case r.Alignment.Bottom:s=t.target.endPoint*((n.right-n.x)/(e.ports.bottom.length+1)),o.x=n.x+s,o.y=n.bottom;break;case r.Alignment.Top:s=t.target.endPoint*((n.right-n.x)/(e.ports.top.length+1)),o.x=n.x+s,o.y=n.y;break;case r.Alignment.Left:s=t.target.endPoint*((n.bottom-n.y)/(e.ports.left.length+1)),o.x=n.x,o.y=n.y+s;break;case r.Alignment.Right:s=t.target.endPoint*((n.bottom-n.y)/(e.ports.right.length+1)),o.x=n.right,o.y=n.y+s}return o}}static isNodeRendered(t){return t.d3selection}getRectPropertyMax(t,e){let n=0;if(t)for(let r=0;r<t.length;++r){let i=this._nodes[t[r].key];u.isNodeRendered(i)&&(n=Math.max(i.rect[e],n))}return n}getStylePropertyMax(t,e){let n=0;if(t)for(let r=0;r<t.length;++r){let i=this._nodes[t[r].key];if(u.isNodeRendered(i)){let t=parseInt(o.getStyle(i.d3selection)[e]);n=Math.max(t,n)}}return n}sumVertical(t,e){let n=0;if(t){let r,i=0,a=0,s=!1;for(let c=0;c<t.length;++c){let l=this._nodes[t[c].key];if(u.isNodeRendered(l)){s&&(r=parseInt(o.getStyle(l.d3selection)["margin-top"]),i=r||e,i>a&&(n+=i-a));let t=o.convertToSVGCoords(this._svg,l.d3selection);n+=Math.max(t.height,l.rect.height),r=parseInt(o.getStyle(l.d3selection)["margin-bottom"]),a=r||e,n+=a,s=!0}}s&&(n-=a)}return n}transformVerticalNodes(t,e,n,r){let i=!1;if(n){let a,s=0,c=0,l=!1;for(let h=0;h<n.length;++h){let f=this._nodes[n[h].key];if(u.isNodeRendered(f)){i=!0;let n=o.convertToSVGCoords(this._svg,f.d3selection),u=t-Math.max(n.width,f.rect.width)/2;if(l){let t=parseInt(o.getStyle(f.d3selection)["margin-top"]);s=t||r,s>c&&(e+=s-c)}f.d3selection.transition().duration(this.getAnimateDuration()).attr("transform","translate("+u+", "+e+")"),f.rect.x=u,f.rect.y=e,e+=f.rect.height,a=parseInt(o.getStyle(f.d3selection)["margin-bottom"]),c=a||r,e+=c,l=!0}}}return i}sumHorizontal(t,e){let n=0;if(t){let r,i=0,a=0,s=!1;for(let c=0;c<t.length;++c){let l=this._nodes[t[c].key];if(u.isNodeRendered(l)){s&&(r=parseInt(o.getStyle(l.d3selection)["margin-left"]),i=r||e,i>a&&(n+=i-a));let t=o.convertToSVGCoords(this._svg,l.d3selection);n+=Math.max(t.width,l.rect.width),r=parseInt(o.getStyle(l.d3selection)["margin-right"]),a=r||e,n+=a,s=!0}}s&&(n-=a)}return n}transformHorizontalNodes(t,e,n,r){let i=!1;if(n){let a,s=0,c=0,l=!1;for(let h=0;h<n.length;++h){let f=this._nodes[n[h].key];if(u.isNodeRendered(f)){i=!0;let n=o.convertToSVGCoords(this._svg,f.d3selection),u=e-Math.max(n.height,f.rect.height)/2;if(l){let e=parseInt(o.getStyle(f.d3selection)["margin-left"]);s=e||r,s>c&&(t+=s-c)}f.d3selection.transition().duration(this.getAnimateDuration()).attr("transform","translate("+t+", "+u+")"),f.rect.x=t,f.rect.y=u,t+=f.rect.width,a=parseInt(o.getStyle(f.d3selection)["margin-right"]),c=a||r,t+=c,l=!0}}}return i}calculateNodeWidth(t,e,n,r,i,a,s,u,c){let l=0;l=Math.max(l,e.width),l=Math.max(l,r.width),l=Math.max(l,n.width),l=Math.max(l,s.width);let h=0;return 0!==i.width?(h=i.width,0!==r.width?(h+=Math.max(u,Math.max(this.getStylePropertyMax(t.left,"margin-right"),parseInt(o.getStyle(this._nodes[t.center[0].key].d3selection)["margin-left"]))),h+=r.width,0!==a.width&&(h+=Math.max(u,Math.max(parseInt(o.getStyle(this._nodes[t.center[t.center.length-1].key].d3selection)["margin-right"],this.getStylePropertyMax(t.right,"margin-left")))),h+=a.width)):0!==a.width&&(h+=Math.max(u,Math.max(this.getStylePropertyMax(t.left,"margin-right"),this.getStylePropertyMax(t.right,"margin-left"))),h+=a.width)):0!==r.width?(0!==a.width&&(h+=Math.max(u,Math.max(parseInt(o.getStyle(this._nodes[t.center[t.center.length-1].key].d3selection)["margin-right"],this.getStylePropertyMax(t.right,"margin-left")))),h+=a.width),h+=r.width):h=a.width,l=Math.max(h,l),l+=Math.max(c,parseInt(o.getStyle(this._nodes[t.key].d3selection).paddingLeft)),l+=Math.max(c,parseInt(o.getStyle(this._nodes[t.key].d3selection).paddingRight)),l}calculateNodeHeight(t,e,n,r,i,a,s,u,c){let l=0,h=0,f=0,d=0;0!==i.height&&(l=i.height,0!==e.height&&(l+=Math.max(u,Math.max(this.getStylePropertyMax(t.top,"margin-bottom"),parseInt(o.getStyle(this._nodes[t.left[0].key].d3selection)["margin-top"]))),l+=e.height),0!==n.height&&(l+=Math.max(u,Math.max(parseInt(o.getStyle(this._nodes[t.left[t.left.length-1].key].d3selection)["margin-bottom"],this.getStylePropertyMax(t.bottom,"margin-top")))),l+=n.height)),0!==r.height&&(h=r.height,0!==e.height&&(h+=Math.max(u,Math.max(this.getStylePropertyMax(t.top,"margin-bottom"),this.getStylePropertyMax(t.center,"margin-top"))),h+=e.height),0!==n.height&&(h+=n.height,h+=Math.max(u,Math.max(this.getStylePropertyMax(t.center,"margin-bottom"),this.getStylePropertyMax(t.bottom,"margin-top"))))),0!==a.height&&(f=a.height,0!==e.height&&(f+=e.height,f+=Math.max(u,Math.max(this.getStylePropertyMax(t.top,"margin-bottom"),parseInt(o.getStyle(this._nodes[t.right[0].key].d3selection)["margin-top"])))),0!==n.height&&(f+=n.height,f+=Math.max(u,Math.max(parseInt(o.getStyle(this._nodes[t.right[t.right.length-1].key].d3selection)["margin-bottom"],this.getStylePropertyMax(t.bottom,"margin-top")))))),e.height&&n.height&&(d=e.height+n.height,d+=Math.max(u,Math.max(this.getStylePropertyMax(t.top,"margin-bottom"),this.getStylePropertyMax(t.bottom,"margin-top"))));let p=0;return p=Math.max(p,e.height),p=Math.max(p,n.height),p=Math.max(p,d),p=Math.max(p,l),p=Math.max(p,h),p=Math.max(p,f),s.height&&(p+=s.height),p+=Math.max(c,parseInt(o.getStyle(this._nodes[t.key].d3selection).paddingTop)),p+=Math.max(c,parseInt(o.getStyle(this._nodes[t.key].d3selection).paddingBottom)),p}transformNode(t,e,n,i,a){let s=this,u=s._nodes[t.key],c=new r.Rect(0,0,0,0),l=parseInt(o.getStyle(u.d3selection)["margin-top"]);i=l||i;let h=parseInt(o.getStyle(u.d3selection)["padding-top"]);a=h||a;let f=new r.Rect(0,0,s.sumHorizontal(t.top,i),s.getRectPropertyMax(t.top,"height")),d=new r.Rect(0,0,s.sumHorizontal(t.bottom,i),s.getRectPropertyMax(t.bottom,"height")),p=new r.Rect(0,0,s.getRectPropertyMax(t.left,"width"),s.sumVertical(t.left,i)),g=new r.Rect(0,0,s.getRectPropertyMax(t.right,"width"),s.sumVertical(t.right,i)),_=new r.Rect(0,0,s.sumHorizontal(t.center,i),s.getRectPropertyMax(t.center,"height")),m=new r.Rect(0,0,u.rect.width,u.rect.height);if(c.width=s.calculateNodeWidth(t,f,d,_,p,g,m,i,a),c.height=s.calculateNodeHeight(t,f,d,_,p,g,m,i,a),e){e.attr("height",c.height).attr("width",c.width);let t=o.convertToSVGCoords(s._svg,e);c.height=t.height,c.width=t.width,e.attr("height",0).attr("width",0).transition().duration(s.getAnimateDuration()).attr("x",0).attr("y",0).attr("height",c.height).attr("width",c.width)}if(u.rect=c,n){o.getStyle(n);let t=(c.width-m.width)/2,e=a;n.transition().duration(s.getAnimateDuration()).attr("transform","translate("+t+","+e+")")}let v=c.width/2,y=v-f.width/2,x=s._padding+m.height+f.height/2;s.transformHorizontalNodes(y,x,t.top,i);let b=p.width+(c.width-g.width-p.width)/2,w=f.height+m.height+(c.height-d.height-f.height-m.height)/2;if(y=s._padding+p.width/2,s.transformVerticalNodes(y,w-p.height/2,t.left,i),y=c.width-(g.width+s._padding)/2,s.transformVerticalNodes(y,w-g.height/2,t.right,i),y=v-d.width/2,x=c.height-d.height/2-s._padding,s.transformHorizontalNodes(y,x,t.bottom,i),t.center&&t.center.length>0){let e=b-_.width/2;p.width&&(e=Math.max(e,s._padding+p.width+Math.max(i,Math.max(this.getStylePropertyMax(t.left,"margin-right"),parseInt(o.getStyle(s._nodes[t.center[0].key].d3selection)["margin-left"]))))),g.width&&(e=Math.min(e,c.width-s._padding-g.width-_.width-Math.max(i,Math.max(this.getStylePropertyMax(t.right,"margin-left"),parseInt(o.getStyle(s._nodes[t.center[t.center.length-1].key].d3selection)["margin-left"])))));let n=w;f.height&&(n=Math.max(n,s._padding+f.height+Math.max(i,Math.max(this.getStylePropertyMax(t.top,"margin-bottom"),this.getStylePropertyMax(t.center,"margin-top")))+_.height/2)),d.height&&(n=Math.min(n,c.height-s._padding-d.height-_.height/2-Math.max(i,Math.max(this.getStylePropertyMax(t.center,"margin-bottom"),this.getStylePropertyMax(t.bottom,"margin-top"))))),s.transformHorizontalNodes(e,n,t.center,i)}}configureItemHover(t,e){let n=this;e.def.disableHover?t.on("mouseenter",(function(){t.classed("hover",!0)})).on("mouseleave",(function(){t.classed("hover",!1)})):t.on("mouseenter",n.nodeHoverStart).on("mouseleave",n.hoverEnd),e.def.hideTooltip||n._dataTooltip.setTarget(t);let r=this._element;o.addClickHelper(t,n.getOptions(),r.onClick,r.onDoubleClick,r.contextMenuItems,n._dataTooltip,r,e.def,e.def.key),t.node().__data__=e.def}renderNodes(t,e,n,a){let s=this;e.depth=a;let c={def:e,ports:{}};if(s._nodes[e.key]=c,e.parent=t,s._decimator&&!s._decimator.isVisible(e))return void delete c.d3selection;let l=function(){if(e.type&&e.type.length>0)for(let t=0;t<e.type.length;++t)if(s._colorMgr.hasColor(e.type[t]))return s._colorMgr.getColor(e.type[t]);return e.key&&s._colorMgr.hasColor(e.key)?s._colorMgr.getColor(e.key):"white"},h=i.getSelectionName(e.key)+" node ";if(e.type&&e.type.length>0)for(let t=0;t<e.type.length;++t)h+=" "+i.getSelectionName(e.type[t]);let f,d,p=n.append("g").classed(h,!0);c.d3selection=p,e.hideBorder||(f=p.append("rect").classed(h,!0).classed("border",!0).attr("fill",l).attr("stroke","black").attr("stroke-opacity",.2).attr("rx",6).attr("ry",6),s.configureItemHover(f,c));for(let t=0;t<u.CHILDREN.length;++t){let n=u.CHILDREN[t];if(e.hasOwnProperty(n))for(let t=0;t<e[n].length;++t)s.renderNodes(e,e[n][t],p,a+1)}let g,_,m,v,y=new r.Rect(0,0,0,0);if(!e.hideImageLabel&&(e.label||e.image)){if(d=p.append("g").classed(h,!0),e.image){g=d.append("image").attr("xlink:href",e.image).classed(h,!0).attr("x",s._renderOrigin.x).attr("y",s._renderOrigin.y);let t=parseInt(o.getStyle(g).height),n=parseInt(o.getStyle(g).width);g.attr("height",t||(e.imageHeight?e.imageHeight:40)),g.attr("width",n||(e.imageWidth?e.imageWidth:40)),s.configureItemHover(g,c),_=o.convertToSVGCoords(s._svg,g),y.width=Math.max(y.width,_.width),y.height+=_.height}e.label&&(m=d.append("text").classed(h,!0).attr("x",s._renderOrigin.x).attr("y",s._renderOrigin.y).attr("text-anchor","middle").attr("alignment-baseline","middle").text(e.label),s.configureItemHover(m,c),v=o.convertToSVGCoords(s._svg,m),y.width=Math.max(y.width,v.width),y.height+=v.height)}0!==s._renderOrigin.x||0!==s._renderOrigin.y?(f&&f.attr("x",s._renderOrigin.x).attr("y",s._renderOrigin.y),_&&g.transition().duration(s.getAnimateDuration()).attr("x",y.width/2-_.width/2).attr("y",0),v&&m.transition().duration(s.getAnimateDuration()).attr("x",y.width/2).attr("y",y.height-v.height/2)):(_&&g.attr("x",y.width/2-_.width/2).attr("y",0),v&&m.attr("x",y.width/2).attr("y",y.height-v.height/2)),c.rect=y,s.transformNode(e,f,d,s._margin,s._padding)}createLinks(t){let e=[],n=this;for(let i=0;i<t.length;++i){let a=n._nodes[t[i].from],s=n._nodes[t[i].to];if(n._decimator){for(;a&&!n._decimator.isVisible(a.def);)a=n._nodes[a.def.parent.key];for(;s&&!n._decimator.isVisible(s.def);)s=n._nodes[s.def.parent.key]}if(void 0===a||void 0===s)continue;let u=a.def.depth>s.def.depth?a:s,c=a.def.depth>s.def.depth?s:a;for(;c.def.depth!=u.def.depth;)u=n._nodes[u.def.parent.key];if(c===u)continue;let l={def:t[i],source:{node:a,endPoint:void 0,alignment:void 0},target:{node:s,endPoint:void 0,alignment:void 0}};e.push(l);let h=o.convertToSVGCoords(n._svg,a.d3selection),f=o.convertToSVGCoords(n._svg,s.d3selection);h.bottom<f.y?(a.ports.bottom||(a.ports.bottom=[]),s.ports.top||(s.ports.top=[]),a.ports.bottom.push(l),s.ports.top.push(l),l.source.alignment=r.Alignment.Bottom,l.target.alignment=r.Alignment.Top):h.y>f.bottom?(a.ports.top||(a.ports.top=[]),s.ports.bottom||(s.ports.bottom=[]),a.ports.top.push(l),s.ports.bottom.push(l),l.source.alignment=r.Alignment.Top,l.target.alignment=r.Alignment.Bottom):h.right<f.x?(a.ports.right||(a.ports.right=[]),s.ports.left||(s.ports.left=[]),a.ports.right.push(l),s.ports.left.push(l),l.source.alignment=r.Alignment.Right,l.target.alignment=r.Alignment.Left):(a.ports.left||(a.ports.left=[]),s.ports.right||(s.ports.right=[]),a.ports.left.push(l),s.ports.right.push(l),l.source.alignment=r.Alignment.Left,l.target.alignment=r.Alignment.Right)}return e}mergeNodePorts(t,e){let n={},r=0;for(let i=0;i<t.length;++i){let o=t[i],a=o.def;o.source.node===e?a.fromConnectionPoint?(void 0===n[a.fromConnectionPoint]&&(n[a.fromConnectionPoint]=++r),o.source.endPoint=n[a.fromConnectionPoint]):o.source.endPoint=++r:a.toConnectionPoint?(void 0===n[a.toConnectionPoint]&&(n[a.toConnectionPoint]=++r),o.target.endPoint=n[a.toConnectionPoint]):o.target.endPoint=++r}t.length=r}orderNodePorts(){for(let t in this._nodes){let e=this._nodes[t],n=function(t,n){let r=t.source.node===e?t.target.node:t.source.node,i=n.source.node===e?n.target.node:n.source.node;return r.d3selection.node().getBoundingClientRect().top-i.d3selection.node().getBoundingClientRect().top},r=function(t,n){let r=t.source.node===e?t.target.node:t.source.node,i=n.source.node===e?n.target.node:n.source.node;return r.d3selection.node().getBoundingClientRect().left-i.d3selection.node().getBoundingClientRect().left};e.ports.top&&(e.ports.top.sort(r),this.mergeNodePorts(e.ports.top,e)),e.ports.bottom&&(e.ports.bottom.sort(r),this.mergeNodePorts(e.ports.bottom,e)),e.ports.left&&(e.ports.left.sort(n),this.mergeNodePorts(e.ports.left,e)),e.ports.right&&(e.ports.right.sort(n),e.ports.right.sort(n),this.mergeNodePorts(e.ports.right,e))}}renderLinks(t,e){let n=this.createLinks(t);this.orderNodePorts(),this.renderLinkHelper(e,n)}sizeViewToFit(t){let e,n=this._nodes[t.key].rect;return this._options.fitToWindow?(e=this._svg.transition("resizeView").duration(this.getAnimateDuration()).attr("viewBox","0 0 "+n.width+" "+n.height).attr("preserveAspectRatio","xMidYMid meet"),this._options.width?e.attr("width",this._options.width).attr("height",void 0):this._options.height?e.attr("width",void 0).attr("height",this._options.height):e.attr("width","100%").attr("height",void 0)):e=this._svg.transition("resizeView").duration(this.getAnimateDuration()).attr("width",n.width).attr("height",n.height),e}renderHelper(t,e=!1){let n=this;n._nodes={};let r=n._svg.insert("g","g").classed("graph",!0),i=n.getAnimateDuration();e&&(n._options.animateDuration=0,r.attr("opacity",0)),n._decimator=n._element.decimator,n.renderNodes(void 0,t,r,0),n.initializeLinkLayer(r);let o=n._element.links;return r.transition("nodeWait").duration(n.getAnimateDuration()).on("end",(function(){n.renderLinks(o,r)})),e?n._options.animateDuration=i:n.sizeViewToFit(t),r}render(t){let e=this;e._element;e._margin=30,e._padding=10,e.loadOptions(t);let n=e._element.nodes,r=e._svg.select(".graph"),i=e.getAnimateDuration();if(0!==i){let t=e._nodes[n.key];e._renderOrigin={x:0,y:0};let a,s=e.renderHelper(n,!0),u=r.select("rect").node();if(u&&(a=e._nodes[u.__data__.key]),t){let a=e._nodes[n.key],u=o.convertToSVGCoords(e._svg,t.d3selection),c=r.transition("translateOldNode").duration(i).attr("transform","translate(-"+u.x+",-"+u.y+")"),l=e.sizeViewToFit(n);t.d3selection.selectAll("*").size()!==a.d3selection.selectAll("*").size()?(s.remove(),l.transition().duration(i/2).attr("width",0).attr("height",0).on("end",(function(){r.remove(),e.renderHelper(n)}))):c.on("end",(function(){r.remove(),s.attr("opacity",1)}))}else a&&a.d3selection?setTimeout((function(){let t=o.convertToSVGCoords(e._svg,a.d3selection),u=t.x,c=t.y;e._renderOrigin={x:(t.x+t.right)/2,y:(t.y+t.bottom)/2};let l=a.d3selection.selectAll("*").size()!==r.select(".node").selectAll("*").size();s.remove();r.transition("translateOldNode").duration(i).attr("width",0).attr("height",0).attr("transform","translate("+u+","+c+")").on("end",(function(){l&&r.remove(),e.renderHelper(n).transition().duration(e.getAnimateDuration()).on("end",(function(){l||r.remove()}))}));e.sizeViewToFit(n)}),0):(s.remove(),e._renderOrigin={x:0,y:0},e._svg.transition("hideView").duration(i).attr("width",0).attr("height",0).on("end",(function(){r.remove(),e.renderHelper(n)})))}else e._renderOrigin={x:0,y:0},r.remove(),e.renderHelper(n)}}e.D3HierarchyGraph=u,u.CHILDREN=["top","bottom","left","right","center"],s.D3Renderer.register(r.UIType.HierarchyGraph,u)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(2),i=n(1),o=n(88),a=n(7),s=n(5),u=n(3),c=n(33),l=n(226),h=n(45),f=n(44);class d{updatePosition(t){this.def.x+=t.dx,this.def.y+=t.dy,this._nodeContainer.attr("transform",`translate(${this.def.x}, ${this.def.y})`)}renderPort(t,e){return this._nodeContainer.append("circle").attr("class",this._portDiagram.getClasses(this.def)+" "+t.key).classed("port",!0).attr("cx",t.x).attr("cy",t.y).attr("r",g).attr("fill","white").attr("stroke-width",1).attr("stroke",this._portDiagram.getColor(this.def))}}class p{constructor(){this._selectTempItems={}}initializeNode(){this._nodeContainer=new c.Container}getNode(){return this._nodeContainer}updatePosition(t){this.def.x+=t.dx,this.def.y+=t.dy,this._nodeContainer.x=this.def.x,this._nodeContainer.y=this.def.y}renderPort(t,e){let n=e.manager.add(this.def.type[0],this.def.key,c.SCALE_MODES.LINEAR,1,(function(){let t=new c.Graphics;return t.beginFill(e.color),t.drawCircle(0,0,g),t.beginFill(16777215),t.drawCircle(0,0,g-1),t.endFill(),t}));return n.x=t.x-g,n.y=t.y-g,n.renderer=this,this._nodeContainer.addChild(n),n}select(t,e,n,r){let i=function(e){let n=e.width/2,i=n+_,o=r.add(t+i,t+i,c.SCALE_MODES.LINEAR,1,(function(){let t=new c.Graphics;return t.beginFill(16777215),t.drawCircle(0,0,i),t.endFill(),t}));return o.x=e.x+n-i,o.y=e.y+n-i,o.tint=m,o.__data__=e.__data__,o}(e);this._selectTempItems[`${t}Select${n}`]=i,e.parent.addChildAt(i,0)}unselect(t,e,n){let r=this._selectTempItems[`${t}Select${n}`];r.parent.removeChild(r),delete this._selectTempItems[`${t}Select`]}}let g=3,_=3,m=15921737,v={x:-25,y:-25,height:50,width:50};class y{constructor(t){this._selectTempItems={},this.def=t}configureNode(){this.def.height=50,this.def.width=50}getPortAreaRect(){return v}}class x{constructor(t){this.def=t}getXYOffset(){return{x:.5*-this.def.width,y:.5*-this.def.height}}getTitle(){return this.def.type.length>0?this.def.type[0]:"None"}getTitleTextRect(){throw"Error please implement this function"}configureNode(){let t=this.def,e=t.ports.top?t.ports.top.length:0,n=t.ports.bottom?t.ports.bottom.length:0,r=t.ports.left?t.ports.left.length:0,o=t.ports.right?t.ports.right.length:0,a=this.getTitleTextRect(),s=a.height+6,u=s+6+50,c=a.width+6,l=.5*-c,h=.5*-u;this._portRect=new i.Rect(l,s+h,Math.max(15*Math.max(e,n),c),Math.max(15*Math.max(r,o),u)),this.def.height=s+this._portRect.height,this.def.width=this._portRect.width}getPortAreaRect(){return this._portRect}}class b extends y{constructor(t,e){super(t),this._portDiagram=e,this.updatePosition=d.prototype.updatePosition.bind(this),this.renderPort=d.prototype.renderPort.bind(this)}renderNode(t){return this._nodeContainer=t.group.append("g"),this._nodeContainer.append("circle").attr("class",this._portDiagram.getClasses(this.def)).classed("node",!0).attr("r",25).attr("cx",0).attr("cy",0).attr("fill",this._portDiagram.getColor(this.def)),void 0!==this.def.x&&this.updatePosition({dx:0,dy:0}),this._nodeContainer}}class w extends y{constructor(t){super(t),this.initializeNode=p.prototype.initializeNode.bind(this),this.getNode=p.prototype.getNode.bind(this),this.updatePosition=p.prototype.updatePosition.bind(this),this.renderPort=p.prototype.renderPort.bind(this)}renderNode(t){this.initializeNode();let e=t.manager.add(this.def.type[0],this.def.key,c.SCALE_MODES.LINEAR,4,(function(){let e=new c.Graphics;return e.beginFill(16777215),e.drawCircle(-25,-25,25),e.beginFill(t.color),e.drawCircle(-25,-25,24),e.endFill(),e}));return e.x=-25,e.y=-25,this._nodeContainer.addChild(e),void 0!==this.def.x&&this.updatePosition({dx:0,dy:0}),e}select(t,e,n,r){console.log("need node select");let i=function(e){let n=e.width/2,i=n+_,o=r.add(t+i,t+i,c.SCALE_MODES.LINEAR,1,(function(){let t=new c.Graphics;return t.beginFill(16777215),t.drawCircle(0,0,i),t.endFill(),t}));return o.x=e.x+n-i,o.y=e.y+n-i,o.tint=m,o.__data__=e.__data__,o}(e);this._selectTempItems[`${t}Select${n}`]=i,e.parent.addChildAt(i,0)}unselect(t,e,n){let r=this._selectTempItems[`${t}Select${n}`];r.parent.removeChild(r),delete this._selectTempItems[`${t}Select${n}`]}}class M extends x{constructor(t,e,n){super(t),this._portDiagram=e,this._svg=n,this.updatePosition=d.prototype.updatePosition.bind(this),this.renderPort=d.prototype.renderPort.bind(this)}getTitleTextRect(){return s.getTextRect(this._svg,this.getTitle())}renderNode(t){this._nodeContainer=t.group.append("g");let e=this._nodeContainer.append("rect"),n=this._nodeContainer.append("rect"),r=this._nodeContainer.append("text"),i=this.getXYOffset(),o=i.x,a=i.y,s=this.getTitle();return r.text(s).attr("fill","white").attr("stroke","white").attr("alignment-baseline","hanging").attr("x",o+3).attr("y",a+3),e.attr("class",this._portDiagram.getClasses(this.def)).classed("node",!0).classed("border",!0).attr("fill","#FFFFFF").attr("stroke","#000000").attr("stroke-width",1).attr("x",o).attr("y",a).attr("width",this.def.width).attr("height",this.def.height).attr("rx",3).attr("ry",3),n.attr("class",this._portDiagram.getClasses(this.def)).classed("node",!0).classed("title-box",!0).attr("fill",this._portDiagram.getColor(this.def)).attr("x",o).attr("y",a).attr("width",this.def.width).attr("height",20).attr("rx",3).attr("ry",3),void 0!==this.def.x&&this.updatePosition({dx:0,dy:0}),this._nodeContainer}}class k extends x{constructor(t,e){super(t),this._selectTempItems={},this._pixiHelper=e,this.initializeNode=p.prototype.initializeNode.bind(this),this.getNode=p.prototype.getNode.bind(this),this.updatePosition=p.prototype.updatePosition.bind(this),this.renderPort=p.prototype.renderPort.bind(this)}getTitleTextRect(){let t=this.getTitle();return this._pixiHelper.renderText(t,u.select(this._pixiHelper.getRenderer().view.parentNode),16777215)}renderNode(t){this.initializeNode();let e=`${this.def.type[0]}H${this.def.height}W${this.def.width}`;e+=this.def.ports.top?`T${this.def.ports.top.length}`:"",e+=this.def.ports.left?`L${this.def.ports.left.length}`:"",e+=this.def.ports.right?`R${this.def.ports.right.length}`:"",e+=this.def.ports.bottom?`B${this.def.ports.bottom.length}`:"";let n=t.manager.add(e,this.def.key,c.SCALE_MODES.LINEAR,1,()=>{let e=this.getTitle();this._titleText=this._pixiHelper.renderText(e,u.select(this._pixiHelper.getRenderer().view.parentNode),16777215),this._titleText.x=3,this._titleText.y=3;let n=new c.Graphics;return n.beginFill(16777215,1),n.lineStyle(1,0,.7),n.drawRoundedRect(0,0,this._portRect.width,this.def.height,3),n.beginFill(t.color,1),n.drawRoundedRect(0,0,this._portRect.width,this._titleText.height+6,3),n.addChild(this._titleText),n}),r=this.getXYOffset();return n.x=r.x,n.y=r.y,this._nodeContainer.addChild(n),void 0!==this.def.x&&this.updatePosition({dx:0,dy:0}),n}select(t,e,n,r){let i=new c.Graphics;i.lineStyle(2*_,m),i.drawRoundedRect(0,0,this._portRect.width,this.def.height,3);let o=this.getXYOffset();i.x=o.x,i.y=o.y,this._nodeContainer.addChildAt(i,0),this._selectTempItems[`${t}Select${n}`]=i,e.parent.addChildAt(i,0)}unselect(t,e,n){let r=this._selectTempItems[`${t}Select${n}`];r.parent.removeChild(r),delete this._selectTempItems[`${t}Select${n}`]}}class T extends a.UIElementRenderer{constructor(t,e,n){super(),this._nodePortInfo={},this._options={},this.invalidate=this.render,this._element=t,this._rendererManager=e,this._parent=n,this._nodes={},this._requiresLayout=!1,this._renderedNodes=[];let r=this;this.getLinkStartXY=function(t){let e=r._nodes[t.def.from],n=t.def,i=r._nodePortInfo[e.key][n.fromPort];return{x:e.x+i.x,y:e.y+i.y}},this.getLinkEndXY=function(t){let e=r._nodes[t.def.to],n=t.def,i=r._nodePortInfo[e.key][n.toPort];return{x:e.x+i.x,y:e.y+i.y}}}hover(t){this.focus(t)}focus(t){this._renderer.focus(t)}select(t){this._renderer.select(t)}cursorChange(t){}brush(t){this._renderer.brush(t)}addNodePorts(t,e,n){let r=this;if(t){let o=e.def.key;r._nodePortInfo[o]||(r._nodePortInfo[o]={});let a=e.getPortAreaRect(),s=a.height/t.length,u=.5*s,c=a.width/t.length,l=.5*c,h=r._nodePortInfo[o];switch(n){case i.Alignment.Top:t.forEach((function(t,e){let r=a.x+l+c*e;h[t.key]={key:t.key,index:e,alignment:n,x:r,y:0}}));break;case i.Alignment.Bottom:t.forEach((function(t,r){let i=a.x+l+c*r;h[t.key]={key:t.key,index:r,alignment:n,x:i,y:e.def.height}}));break;case i.Alignment.Left:t.forEach((function(t,e){let r=u+s*e+a.y;h[t.key]={key:t.key,index:e,alignment:n,x:a.x,y:r}}));break;case i.Alignment.Right:t.forEach((function(t,r){let i=u+s*r+a.y;h[t.key]={key:t.key,index:r,alignment:n,x:a.x+e.def.width,y:i}}))}}}addPorts(t){this.addNodePorts(t.def.ports.left,t,i.Alignment.Left),this.addNodePorts(t.def.ports.right,t,i.Alignment.Right),this.addNodePorts(t.def.ports.top,t,i.Alignment.Top),this.addNodePorts(t.def.ports.bottom,t,i.Alignment.Bottom)}getColor(t){let e,n=this._rendererManager.getColorManager();return e=n.hasColor(t.key)?n.getColor(t.key):t.type?n.getColor(t.type[0]):n.getColor(t.key),e}getClasses(t){let e=t.key;return t.type.forEach((function(t){e+=" "+t})),e}addNode(t){t.configureNode(),this._nodes[t.def.key]=t.def}createRenderedLinks(){let t=this._element.links,e=[],n=this;return t.forEach((function(t){let r=n._nodes[t.from],i=n._nodes[t.to];if(!r||!i)return;let o=n._nodePortInfo[r.key][t.fromPort],a=n._nodePortInfo[i.key][t.toPort],s={def:t,source:{node:r,alignment:o.alignment},target:{node:i,alignment:a.alignment}};e.push(s)})),e}layout(t,e){let n=this._element;if(n.nodes&&n.nodes.length>0&&void 0===n.nodes[0].x){var r=new l.graphlib.Graph;r.setGraph({rankdir:"LR"}),r.setDefaultEdgeLabel((function(){return{}})),t.forEach(t=>{t.def.label=t.def.key,r.setNode(t.def.key,t.def)}),e.forEach(t=>{r.setEdge(t.def.from,t.def.to)}),l.layout(r),t.forEach(t=>{t.updatePosition({dx:0,dy:0})})}}render(t){r.merge(this._options,t),this._renderer||(this._options.forceSvgRenderer?this._renderer=new S(this._element,this._rendererManager,this._parent,this):this._renderer=new C(this._element,this._rendererManager,this._parent,this),this._renderer.setColorManager(this._colorMgr)),this._renderer.render(t)}}e.D3PortDiagram=T;class S extends h.D3ConnectedGraphSVG{constructor(t,e,n,r){super(t,e,n),h.DiagramBase.prototype.bind.call(this,this._renderer,this._element),this._portDiagram=r,this.getLinkStartXY=r.getLinkStartXY,this.getLinkEndXY=r.getLinkEndXY}render(t){let e=this.initializeGraphArea(t);this.initializeLinkLayer(e);let n=this.renderNodes(e),r=this._portDiagram.createRenderedLinks();this._portDiagram.layout(n,r),this.renderLinkHelper(e,r),this.configureView()}renderNodes(t){let e=this,n=e._element;e._portDiagram._nodePortInfo={};let r=[],i=t.append("g").attr("class","nodes");return n.nodes.forEach(a=>{if(n.decimator&&!n.decimator(a))return;let c;c=n.nodeRenderType===o.NodeType.NodeRectangle||a.renderType===o.NodeType.NodeRectangle?new M(a,e._portDiagram,e._svg):new b(a,e._portDiagram),e._portDiagram.addNode(c),e._portDiagram.addPorts(c),r.push(c);let l=c.renderNode({group:i}).on("mouseenter",e.nodeHoverStart).on("mouseleave",e.hoverEnd).call(u.drag().on("drag",(function(n){e._dataTooltip.hideTooltip(),c.updatePosition(u.event);let r=[];t.selectAll(".link."+n.key).each((function(t){r.push(t)})),e.renderLinkHelper(t,r,!0)})));if(l.node().__data__=c.def,s.addClickHelper(l,e.getOptions(),n.onClick,n.onDoubleClick,n.contextMenuItems,e._dataTooltip,n,c.def,c.def.key),e._dataTooltip.setTarget(l),!e._element.disablePortRendering){let t=this._portDiagram._nodePortInfo[c.def.key];for(let r in t){let i=t[r],o=c.renderPort(i);o.node().__data__=i,s.addClickHelper(o,e.getOptions(),n.onClick,n.onDoubleClick,n.contextMenuItems,this._dataTooltip,n,i),this._dataTooltip.setTarget(o)}}}),r}}e.D3PortDiagramSVG=S,a.D3Renderer.register(i.UIType.PortDiagram,T);class C extends h.D3ConnectedGraphPixi{constructor(t,e,n,r){super(t,e,n),this._portDiagram=r,this.getLinkStartXY=r.getLinkStartXY,this.getLinkEndXY=r.getLinkEndXY}renderNodes(t){let e=this,n=e._element;e._nodeGraphics=new f.GraphicsManager(e._pixi),e._element.disablePortRendering||(e._portGraphics=new f.GraphicsManager(e._pixi));let r=[];return n.nodes.forEach((function(i){let a;if(a=n.nodeRenderType===o.NodeType.NodeRectangle||i.renderType===o.NodeType.NodeRectangle?new k(i,e._pixiHelper):new w(i),e._portDiagram.addNode(a),e._portDiagram.addPorts(a),r.push(a),n.decimator&&!n.decimator(i))return;let s=parseInt(e._portDiagram.getColor(i).substring(1),16),u=a.renderNode({color:s,manager:e._nodeGraphics});if(u.__data__=i,u.renderer=a,e._pixiHelper.addSelection(i.key,u),e._pixiHelper.addInteractionHelper(u,e.getOptions(),n.onClick,n.onDoubleClick,n.contextMenuItems,e.nodeHoverStart,e.hoverEnd,e._dataTooltip,n,i,i.key),!e._element.disablePortRendering){let t=e._portDiagram._nodePortInfo[i.key];for(let r in t){let o=t[r],u=a.renderPort(o,{color:s,manager:e._portGraphics});e._pixiHelper.addSelection(i.key,u),e._pixiHelper.addSelection(i.key+o.key,u),e._pixiHelper.addInteractionHelper(u,e.getOptions(),n.onClick,n.onDoubleClick,n.contextMenuItems,e.nodeHoverStart,e.hoverEnd,e._dataTooltip,n,{def:o},i.key)}}let c,l=a.getNode();function h(e){this.data=e.data,this.dragging=!0,t.itemDragging=!0,c=this.data.getLocalPosition(l.parent),e.stopPropagation()}function f(n){if(this.dragging){e._dataTooltip.hideTooltip();let r=this.data.getLocalPosition(l.parent);r.dx=r.x-c.x,r.dy=r.y-c.y,a.updatePosition(r),e.renderLinkHelper(t,e._renderedLinks),e._pixiHelper.render(),n.stopPropagation(),c=r}}function d(){this.dragging=!1,t.itemDragging=!1,this.data=null}u.on("mousedown",h).on("touchstart",h).on("mouseup",d).on("mouseupoutside",d).on("touchend",d).on("touchendoutside",d).on("mousemove",f).on("touchmove",f),t.addChild(l)})),r}_select(t){if(t){let e=this._pixiHelper.getSelection(t);if(e){let n=this;e.forEach((function(e,r){e.renderer.select(t,e,r,n._nodeGraphics)}))}this._pixiHelper.render()}}_unselect(t){let e=this._pixiHelper.getSelection(t);e&&(e.forEach((function(e,n){e.renderer.unselect(t,e,n)})),this._pixiHelper.render())}render(t){r.merge(this._options,t);let e=this;e._element;if(!(void 0===this._pixiHelper)&&(t.height||t.width))return this._pixi.resize(e._options.width,e._options.height),void this._pixiHelper.render();e._portDiagram._nodePortInfo={};let n=e.initializeGraphArea(t),i=e.renderNodes(n);this._renderedLinks=e._portDiagram.createRenderedLinks(),e._portDiagram.layout(i,this._renderedLinks),e.renderLinkHelper(n,this._renderedLinks),e.configureView(),e._pixiHelper.render(n)}}e.D3PortDiagramPixi=C,a.D3Renderer.register(i.UIType.PortDiagram,T)},function(t,e,n){t.exports={graphlib:n(13),layout:n(364),debug:n(522),util:{time:n(9).time,notime:n(9).notime},version:n(523)}},function(t,e,n){var r=n(228);t.exports={Graph:r.Graph,json:n(354),alg:n(355),version:r.version}},function(t,e,n){t.exports={Graph:n(89),version:n(353)}},function(t,e,n){var r=n(230);t.exports=function(t){return r(t,4)}},function(t,e,n){var r=n(90),i=n(94),o=n(130),a=n(259),s=n(265),u=n(268),c=n(269),l=n(270),h=n(271),f=n(140),d=n(272),p=n(37),g=n(276),_=n(277),m=n(282),v=n(6),y=n(46),x=n(283),b=n(25),w=n(285),M=n(26),k={};k["[object Arguments]"]=k["[object Array]"]=k["[object ArrayBuffer]"]=k["[object DataView]"]=k["[object Boolean]"]=k["[object Date]"]=k["[object Float32Array]"]=k["[object Float64Array]"]=k["[object Int8Array]"]=k["[object Int16Array]"]=k["[object Int32Array]"]=k["[object Map]"]=k["[object Number]"]=k["[object Object]"]=k["[object RegExp]"]=k["[object Set]"]=k["[object String]"]=k["[object Symbol]"]=k["[object Uint8Array]"]=k["[object Uint8ClampedArray]"]=k["[object Uint16Array]"]=k["[object Uint32Array]"]=!0,k["[object Error]"]=k["[object Function]"]=k["[object WeakMap]"]=!1,t.exports=function t(e,n,T,S,C,A){var E,D=1&n,R=2&n,N=4&n;if(T&&(E=C?T(e,S,C,A):T(e)),void 0!==E)return E;if(!b(e))return e;var I=v(e);if(I){if(E=g(e),!D)return c(e,E)}else{var V=p(e),P="[object Function]"==V||"[object GeneratorFunction]"==V;if(y(e))return u(e,D);if("[object Object]"==V||"[object Arguments]"==V||P&&!C){if(E=R||P?{}:m(e),!D)return R?h(e,s(E,e)):l(e,a(E,e))}else{if(!k[V])return C?e:{};E=_(e,V,D)}}A||(A=new r);var L=A.get(e);if(L)return L;A.set(e,E),w(e)?e.forEach((function(r){E.add(t(r,n,T,r,e,A))})):x(e)&&e.forEach((function(r,i){E.set(i,t(r,n,T,i,e,A))}));var O=N?R?d:f:R?keysIn:M,j=I?void 0:O(e);return i(j||e,(function(r,i){j&&(r=e[i=r]),o(E,i,t(r,n,T,i,e,A))})),E}},function(t,e){t.exports=function(){this.__data__=[],this.size=0}},function(t,e,n){var r=n(53),i=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=r(e,t);return!(n<0)&&(n==e.length-1?e.pop():i.call(e,n,1),--this.size,!0)}},function(t,e,n){var r=n(53);t.exports=function(t){var e=this.__data__,n=r(e,t);return n<0?void 0:e[n][1]}},function(t,e,n){var r=n(53);t.exports=function(t){return r(this.__data__,t)>-1}},function(t,e,n){var r=n(53);t.exports=function(t,e){var n=this.__data__,i=r(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}},function(t,e,n){var r=n(52);t.exports=function(){this.__data__=new r,this.size=0}},function(t,e){t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},function(t,e){t.exports=function(t){return this.__data__.get(t)}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e,n){var r=n(52),i=n(92),o=n(93);t.exports=function(t,e){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!i||a.length<199)return a.push([t,e]),this.size=++n.size,this;n=this.__data__=new o(a)}return n.set(t,e),this.size=n.size,this}},function(t,e,n){var r=n(54),i=n(244),o=n(25),a=n(129),s=/^\[object .+?Constructor\]$/,u=Function.prototype,c=Object.prototype,l=u.toString,h=c.hasOwnProperty,f=RegExp("^"+l.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!o(t)||i(t))&&(r(t)?f:s).test(a(t))}},function(t,e,n){var r=n(35),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=r?r.toStringTag:void 0;t.exports=function(t){var e=o.call(t,s),n=t[s];try{t[s]=void 0;var r=!0}catch(t){}var i=a.call(t);return r&&(e?t[s]=n:delete t[s]),i}},function(t,e){var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},function(t,e,n){var r,i=n(245),o=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";t.exports=function(t){return!!o&&o in t}},function(t,e,n){var r=n(16)["__core-js_shared__"];t.exports=r},function(t,e){t.exports=function(t,e){return null==t?void 0:t[e]}},function(t,e,n){var r=n(248),i=n(52),o=n(92);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},function(t,e,n){var r=n(249),i=n(250),o=n(251),a=n(252),s=n(253);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,t.exports=u},function(t,e,n){var r=n(55);t.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(t,e){t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},function(t,e,n){var r=n(55),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(r){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(e,t)?e[t]:void 0}},function(t,e,n){var r=n(55),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return r?void 0!==e[t]:i.call(e,t)}},function(t,e,n){var r=n(55);t.exports=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=r&&void 0===e?"__lodash_hash_undefined__":e,this}},function(t,e,n){var r=n(56);t.exports=function(t){var e=r(this,t).delete(t);return this.size-=e?1:0,e}},function(t,e){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},function(t,e,n){var r=n(56);t.exports=function(t){return r(this,t).get(t)}},function(t,e,n){var r=n(56);t.exports=function(t){return r(this,t).has(t)}},function(t,e,n){var r=n(56);t.exports=function(t,e){var n=r(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this}},function(t,e,n){var r=n(57),i=n(26);t.exports=function(t,e){return t&&r(e,i(e),t)}},function(t,e){t.exports=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}},function(t,e,n){var r=n(34),i=n(17);t.exports=function(t){return i(t)&&"[object Arguments]"==r(t)}},function(t,e){t.exports=function(){return!1}},function(t,e,n){var r=n(34),i=n(95),o=n(17),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,t.exports=function(t){return o(t)&&i(t.length)&&!!a[r(t)]}},function(t,e,n){var r=n(135)(Object.keys,Object);t.exports=r},function(t,e,n){var r=n(57),i=n(136);t.exports=function(t,e){return t&&r(e,i(e),t)}},function(t,e,n){var r=n(25),i=n(60),o=n(267),a=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return o(t);var e=i(t),n=[];for(var s in t)("constructor"!=s||!e&&a.call(t,s))&&n.push(s);return n}},function(t,e){t.exports=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}},function(t,e,n){(function(t){var r=n(16),i=e&&!e.nodeType&&e,o=i&&"object"==typeof t&&t&&!t.nodeType&&t,a=o&&o.exports===i?r.Buffer:void 0,s=a?a.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var n=t.length,r=s?s(n):new t.constructor(n);return t.copy(r),r}}).call(this,n(36)(t))},function(t,e){t.exports=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}},function(t,e,n){var r=n(57),i=n(99);t.exports=function(t,e){return r(t,i(t),e)}},function(t,e,n){var r=n(57),i=n(139);t.exports=function(t,e){return r(t,i(t),e)}},function(t,e,n){var r=n(141),i=n(139),o=n(136);t.exports=function(t){return r(t,o,i)}},function(t,e,n){var r=n(24)(n(16),"DataView");t.exports=r},function(t,e,n){var r=n(24)(n(16),"Promise");t.exports=r},function(t,e,n){var r=n(24)(n(16),"WeakMap");t.exports=r},function(t,e){var n=Object.prototype.hasOwnProperty;t.exports=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&n.call(t,"index")&&(r.index=t.index,r.input=t.input),r}},function(t,e,n){var r=n(102),i=n(278),o=n(279),a=n(280),s=n(281);t.exports=function(t,e,n){var u=t.constructor;switch(e){case"[object ArrayBuffer]":return r(t);case"[object Boolean]":case"[object Date]":return new u(+t);case"[object DataView]":return i(t,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return s(t,n);case"[object Map]":return new u;case"[object Number]":case"[object String]":return new u(t);case"[object RegExp]":return o(t);case"[object Set]":return new u;case"[object Symbol]":return a(t)}}},function(t,e,n){var r=n(102);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}},function(t,e){var n=/\w*$/;t.exports=function(t){var e=new t.constructor(t.source,n.exec(t));return e.lastIndex=t.lastIndex,e}},function(t,e,n){var r=n(35),i=r?r.prototype:void 0,o=i?i.valueOf:void 0;t.exports=function(t){return o?Object(o.call(t)):{}}},function(t,e,n){var r=n(102);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}},function(t,e,n){var r=n(144),i=n(101),o=n(60);t.exports=function(t){return"function"!=typeof t.constructor||o(t)?{}:r(i(t))}},function(t,e,n){var r=n(284),i=n(96),o=n(97),a=o&&o.isMap,s=a?i(a):r;t.exports=s},function(t,e,n){var r=n(37),i=n(17);t.exports=function(t){return i(t)&&"[object Map]"==r(t)}},function(t,e,n){var r=n(286),i=n(96),o=n(97),a=o&&o.isSet,s=a?i(a):r;t.exports=s},function(t,e,n){var r=n(37),i=n(17);t.exports=function(t){return i(t)&&"[object Set]"==r(t)}},function(t,e,n){t.exports=n(288)},function(t,e,n){var r=n(94),i=n(61),o=n(292),a=n(6);t.exports=function(t,e){return(a(t)?r:i)(t,o(e))}},function(t,e,n){var r=n(290)();t.exports=r},function(t,e){t.exports=function(t){return function(e,n,r){for(var i=-1,o=Object(e),a=r(e),s=a.length;s--;){var u=a[t?s:++i];if(!1===n(o[u],u,o))break}return e}}},function(t,e,n){var r=n(27);t.exports=function(t,e){return function(n,i){if(null==n)return n;if(!r(n))return t(n,i);for(var o=n.length,a=e?o:-1,s=Object(n);(e?a--:++a<o)&&!1!==i(s[a],a,s););return n}}},function(t,e,n){var r=n(62);t.exports=function(t){return"function"==typeof t?t:r}},function(t,e,n){var r=n(137),i=n(294),o=n(63),a=n(6);t.exports=function(t,e){return(a(t)?r:i)(t,o(e,3))}},function(t,e,n){var r=n(61);t.exports=function(t,e){var n=[];return r(t,(function(t,r,i){e(t,r,i)&&n.push(t)})),n}},function(t,e,n){var r=n(296),i=n(304),o=n(152);t.exports=function(t){var e=i(t);return 1==e.length&&e[0][2]?o(e[0][0],e[0][1]):function(n){return n===t||r(n,t,e)}}},function(t,e,n){var r=n(90),i=n(147);t.exports=function(t,e,n,o){var a=n.length,s=a,u=!o;if(null==t)return!s;for(t=Object(t);a--;){var c=n[a];if(u&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++a<s;){var l=(c=n[a])[0],h=t[l],f=c[1];if(u&&c[2]){if(void 0===h&&!(l in t))return!1}else{var d=new r;if(o)var p=o(h,f,l,t,e,d);if(!(void 0===p?i(f,h,3,o,d):p))return!1}}return!0}},function(t,e,n){var r=n(90),i=n(148),o=n(301),a=n(303),s=n(37),u=n(6),c=n(46),l=n(59),h="[object Object]",f=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,d,p,g){var _=u(t),m=u(e),v=_?"[object Array]":s(t),y=m?"[object Array]":s(e),x=(v="[object Arguments]"==v?h:v)==h,b=(y="[object Arguments]"==y?h:y)==h,w=v==y;if(w&&c(t)){if(!c(e))return!1;_=!0,x=!1}if(w&&!x)return g||(g=new r),_||l(t)?i(t,e,n,d,p,g):o(t,e,v,n,d,p,g);if(!(1&n)){var M=x&&f.call(t,"__wrapped__"),k=b&&f.call(e,"__wrapped__");if(M||k){var T=M?t.value():t,S=k?e.value():e;return g||(g=new r),p(T,S,n,d,g)}}return!!w&&(g||(g=new r),a(t,e,n,d,p,g))}},function(t,e){t.exports=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}},function(t,e,n){var r=n(35),i=n(143),o=n(91),a=n(148),s=n(302),u=n(103),c=r?r.prototype:void 0,l=c?c.valueOf:void 0;t.exports=function(t,e,n,r,c,h,f){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!h(new i(t),new i(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var d=s;case"[object Set]":var p=1&r;if(d||(d=u),t.size!=e.size&&!p)return!1;var g=f.get(t);if(g)return g==e;r|=2,f.set(t,e);var _=a(d(t),d(e),r,c,h,f);return f.delete(t),_;case"[object Symbol]":if(l)return l.call(t)==l.call(e)}return!1}},function(t,e){t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}},function(t,e,n){var r=n(140),i=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,o,a,s){var u=1&n,c=r(t),l=c.length;if(l!=r(e).length&&!u)return!1;for(var h=l;h--;){var f=c[h];if(!(u?f in e:i.call(e,f)))return!1}var d=s.get(t);if(d&&s.get(e))return d==e;var p=!0;s.set(t,e),s.set(e,t);for(var g=u;++h<l;){var _=t[f=c[h]],m=e[f];if(o)var v=u?o(m,_,f,e,t,s):o(_,m,f,t,e,s);if(!(void 0===v?_===m||a(_,m,n,o,s):v)){p=!1;break}g||(g="constructor"==f)}if(p&&!g){var y=t.constructor,x=e.constructor;y!=x&&"constructor"in t&&"constructor"in e&&!("function"==typeof y&&y instanceof y&&"function"==typeof x&&x instanceof x)&&(p=!1)}return s.delete(t),s.delete(e),p}},function(t,e,n){var r=n(151),i=n(26);t.exports=function(t){for(var e=i(t),n=e.length;n--;){var o=e[n],a=t[o];e[n]=[o,a,r(a)]}return e}},function(t,e,n){var r=n(147),i=n(306),o=n(312),a=n(104),s=n(151),u=n(152),c=n(64);t.exports=function(t,e){return a(t)&&s(e)?u(c(t),e):function(n){var a=i(n,t);return void 0===a&&a===e?o(n,t):r(e,a,3)}}},function(t,e,n){var r=n(153);t.exports=function(t,e,n){var i=null==t?void 0:r(t,e);return void 0===i?n:i}},function(t,e,n){var r=n(308),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,a=r((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(i,(function(t,n,r,i){e.push(r?i.replace(o,"$1"):n||t)})),e}));t.exports=a},function(t,e,n){var r=n(309);t.exports=function(t){var e=r(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}},function(t,e,n){var r=n(93);function i(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");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)||o,a};return n.cache=new(i.Cache||r),n}i.Cache=r,t.exports=i},function(t,e,n){var r=n(311);t.exports=function(t){return null==t?"":r(t)}},function(t,e,n){var r=n(35),i=n(106),o=n(6),a=n(105),s=r?r.prototype:void 0,u=s?s.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(o(e))return i(e,t)+"";if(a(e))return u?u.call(e):"";var n=e+"";return"0"==n&&1/e==-1/0?"-0":n}},function(t,e,n){var r=n(313),i=n(155);t.exports=function(t,e){return null!=t&&i(t,e,r)}},function(t,e){t.exports=function(t,e){return null!=t&&e in Object(t)}},function(t,e,n){var r=n(156),i=n(315),o=n(104),a=n(64);t.exports=function(t){return o(t)?r(a(t)):i(t)}},function(t,e,n){var r=n(153);t.exports=function(t){return function(e){return r(e,t)}}},function(t,e,n){var r=n(317),i=n(155);t.exports=function(t,e){return null!=t&&i(t,e,r)}},function(t,e){var n=Object.prototype.hasOwnProperty;t.exports=function(t,e){return null!=t&&n.call(t,e)}},function(t,e,n){var r=n(98),i=n(37),o=n(58),a=n(6),s=n(27),u=n(46),c=n(60),l=n(59),h=Object.prototype.hasOwnProperty;t.exports=function(t){if(null==t)return!0;if(s(t)&&(a(t)||"string"==typeof t||"function"==typeof t.splice||u(t)||l(t)||o(t)))return!t.length;var e=i(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(c(t))return!r(t).length;for(var n in t)if(h.call(t,n))return!1;return!0}},function(t,e){t.exports=function(t){return void 0===t}},function(t,e,n){var r=n(106),i=n(63),o=n(321),a=n(6);t.exports=function(t,e){return(a(t)?r:o)(t,i(e,3))}},function(t,e,n){var r=n(61),i=n(27);t.exports=function(t,e){var n=-1,o=i(t)?Array(t.length):[];return r(t,(function(t,r,i){o[++n]=e(t,r,i)})),o}},function(t,e,n){var r=n(323),i=n(61),o=n(63),a=n(324),s=n(6);t.exports=function(t,e,n){var u=s(t)?r:a,c=arguments.length<3;return u(t,o(e,4),n,c,i)}},function(t,e){t.exports=function(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}},function(t,e){t.exports=function(t,e,n,r,i){return i(t,(function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)})),n}},function(t,e,n){var r=n(98),i=n(37),o=n(27),a=n(326),s=n(327);t.exports=function(t){if(null==t)return 0;if(o(t))return a(t)?s(t):t.length;var e=i(t);return"[object Map]"==e||"[object Set]"==e?t.size:r(t).length}},function(t,e,n){var r=n(34),i=n(6),o=n(17);t.exports=function(t){return"string"==typeof t||!i(t)&&o(t)&&"[object String]"==r(t)}},function(t,e,n){var r=n(328),i=n(329),o=n(330);t.exports=function(t){return i(t)?o(t):r(t)}},function(t,e,n){var r=n(156)("length");t.exports=r},function(t,e){var n=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");t.exports=function(t){return n.test(t)}},function(t,e){var n="[\\ud800-\\udfff]",r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",i="\\ud83c[\\udffb-\\udfff]",o="[^\\ud800-\\udfff]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",u="(?:"+r+"|"+i+")"+"?",c="[\\ufe0e\\ufe0f]?"+u+("(?:\\u200d(?:"+[o,a,s].join("|")+")[\\ufe0e\\ufe0f]?"+u+")*"),l="(?:"+[o+r+"?",r,a,s,n].join("|")+")",h=RegExp(i+"(?="+i+")|"+l+c,"g");t.exports=function(t){for(var e=h.lastIndex=0;h.test(t);)++e;return e}},function(t,e,n){var r=n(94),i=n(144),o=n(146),a=n(63),s=n(101),u=n(6),c=n(46),l=n(54),h=n(25),f=n(59);t.exports=function(t,e,n){var d=u(t),p=d||c(t)||f(t);if(e=a(e,4),null==n){var g=t&&t.constructor;n=p?d?new g:[]:h(t)&&l(g)?i(s(t)):{}}return(p?r:o)(t,(function(t,r,i){return e(n,t,r,i)})),n}},function(t,e,n){var r=n(333),i=n(335),o=n(341),a=n(350),s=i((function(t){return o(r(t,1,a,!0))}));t.exports=s},function(t,e,n){var r=n(100),i=n(334);t.exports=function t(e,n,o,a,s){var u=-1,c=e.length;for(o||(o=i),s||(s=[]);++u<c;){var l=e[u];n>0&&o(l)?n>1?t(l,n-1,o,a,s):r(s,l):a||(s[s.length]=l)}return s}},function(t,e,n){var r=n(35),i=n(58),o=n(6),a=r?r.isConcatSpreadable:void 0;t.exports=function(t){return o(t)||i(t)||!!(a&&t&&t[a])}},function(t,e,n){var r=n(62),i=n(336),o=n(338);t.exports=function(t,e){return o(i(t,e,r),t+"")}},function(t,e,n){var r=n(337),i=Math.max;t.exports=function(t,e,n){return e=i(void 0===e?t.length-1:e,0),function(){for(var o=arguments,a=-1,s=i(o.length-e,0),u=Array(s);++a<s;)u[a]=o[e+a];a=-1;for(var c=Array(e+1);++a<e;)c[a]=o[a];return c[e]=n(u),r(t,this,c)}}},function(t,e){t.exports=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}},function(t,e,n){var r=n(339),i=n(340)(r);t.exports=i},function(t,e,n){var r=n(145),i=n(132),o=n(62),a=i?function(t,e){return i(t,"toString",{configurable:!0,enumerable:!1,value:r(e),writable:!0})}:o;t.exports=a},function(t,e){var n=Date.now;t.exports=function(t){var e=0,r=0;return function(){var i=n(),o=16-(i-r);if(r=i,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}},function(t,e,n){var r=n(149),i=n(342),o=n(347),a=n(150),s=n(348),u=n(103);t.exports=function(t,e,n){var c=-1,l=i,h=t.length,f=!0,d=[],p=d;if(n)f=!1,l=o;else if(h>=200){var g=e?null:s(t);if(g)return u(g);f=!1,l=a,p=new r}else p=e?[]:d;t:for(;++c<h;){var _=t[c],m=e?e(_):_;if(_=n||0!==_?_:0,f&&m==m){for(var v=p.length;v--;)if(p[v]===m)continue t;e&&p.push(m),d.push(_)}else l(p,m,n)||(p!==d&&p.push(m),d.push(_))}return d}},function(t,e,n){var r=n(343);t.exports=function(t,e){return!!(null==t?0:t.length)&&r(t,e,0)>-1}},function(t,e,n){var r=n(344),i=n(345),o=n(346);t.exports=function(t,e,n){return e==e?o(t,e,n):r(t,i,n)}},function(t,e){t.exports=function(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}},function(t,e){t.exports=function(t){return t!=t}},function(t,e){t.exports=function(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}},function(t,e){t.exports=function(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}},function(t,e,n){var r=n(142),i=n(349),o=n(103),a=r&&1/o(new r([,-0]))[1]==1/0?function(t){return new r(t)}:i;t.exports=a},function(t,e){t.exports=function(){}},function(t,e,n){var r=n(27),i=n(17);t.exports=function(t){return i(t)&&r(t)}},function(t,e,n){var r=n(352),i=n(26);t.exports=function(t){return null==t?[]:r(t,i(t))}},function(t,e,n){var r=n(106);t.exports=function(t,e){return r(e,(function(e){return t[e]}))}},function(t,e){t.exports="2.1.8"},function(t,e,n){var r=n(12),i=n(89);function o(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}))}function a(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.exports={write:function(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:o(t),edges:a(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}}},function(t,e,n){t.exports={components:n(356),dijkstra:n(157),dijkstraAll:n(357),findCycles:n(358),floydWarshall:n(359),isAcyclic:n(360),postorder:n(361),preorder:n(362),prim:n(363),tarjan:n(159),topsort:n(160)}},function(t,e,n){var r=n(12);t.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}},function(t,e,n){var r=n(157),i=n(12);t.exports=function(t,e,n){return i.transform(t.nodes(),(function(i,o){i[o]=r(t,o,e,n)}),{})}},function(t,e,n){var r=n(12),i=n(159);t.exports=function(t){return r.filter(i(t),(function(e){return e.length>1||1===e.length&&t.hasEdge(e[0],e[0])}))}},function(t,e,n){var r=n(12);t.exports=function(t,e,n){return function(t,e,n){var r={},i=t.nodes();return i.forEach((function(t){r[t]={},r[t][t]={distance:0},i.forEach((function(e){t!==e&&(r[t][e]={distance:Number.POSITIVE_INFINITY})})),n(t).forEach((function(n){var i=n.v===t?n.w:n.v,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],s=r.distance+i.distance;s<a.distance&&(a.distance=s,a.predecessor=i.predecessor)}))}))})),r}(t,e||i,n||function(e){return t.outEdges(e)})};var i=r.constant(1)},function(t,e,n){var r=n(160);t.exports=function(t){try{r(t)}catch(t){if(t instanceof r.CycleException)return!1;throw t}return!0}},function(t,e,n){var r=n(161);t.exports=function(t,e){return r(t,e,"post")}},function(t,e,n){var r=n(161);t.exports=function(t,e){return r(t,e,"pre")}},function(t,e,n){var r=n(12),i=n(89),o=n(158);t.exports=function(t,e){var n,a=new i,s={},u=new o;function c(t){var r=t.v===n?t.w:t.v,i=u.priority(r);if(void 0!==i){var o=e(t);o<i&&(s[r]=n,u.decrease(r,o))}}if(0===t.nodeCount())return a;r.each(t.nodes(),(function(t){u.add(t,Number.POSITIVE_INFINITY),a.setNode(t)})),u.decrease(t.nodes()[0],0);var l=!1;for(;u.size()>0;){if(n=u.removeMin(),r.has(s,n))a.setEdge(n,s[n]);else{if(l)throw new Error("Input graph is not connected: "+t);l=!0}t.nodeEdges(n).forEach(c)}return a}},function(t,e,n){"use strict";var r=n(4),i=n(501),o=n(504),a=n(505),s=n(9).normalizeRanks,u=n(507),c=n(9).removeEmptyRanks,l=n(508),h=n(509),f=n(510),d=n(511),p=n(520),g=n(9),_=n(13).Graph;t.exports=function(t,e){var n=e&&e.debugTiming?g.time:g.notime;n("layout",(function(){var e=n(" buildLayoutGraph",(function(){return function(t){var e=new _({multigraph:!0,compound:!0}),n=S(t.graph());return e.setGraph(r.merge({},v,T(n,m),r.pick(n,y))),r.forEach(t.nodes(),(function(n){var i=S(t.node(n));e.setNode(n,r.defaults(T(i,x),b)),e.setParent(n,t.parent(n))})),r.forEach(t.edges(),(function(n){var i=S(t.edge(n));e.setEdge(n,r.merge({},M,T(i,w),r.pick(i,k)))})),e}(t)}));n(" runLayout",(function(){!function(t,e){e(" makeSpaceForEdgeLabels",(function(){!function(t){var e=t.graph();e.ranksep/=2,r.forEach(t.edges(),(function(n){var r=t.edge(n);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===e.rankdir||"BT"===e.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)}))}(t)})),e(" removeSelfEdges",(function(){!function(t){r.forEach(t.edges(),(function(e){if(e.v===e.w){var n=t.node(e.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:e,label:t.edge(e)}),t.removeEdge(e)}}))}(t)})),e(" acyclic",(function(){i.run(t)})),e(" nestingGraph.run",(function(){l.run(t)})),e(" rank",(function(){a(g.asNonCompoundGraph(t))})),e(" injectEdgeLabelProxies",(function(){!function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);if(n.width&&n.height){var r=t.node(e.v),i={rank:(t.node(e.w).rank-r.rank)/2+r.rank,e:e};g.addDummyNode(t,"edge-proxy",i,"_ep")}}))}(t)})),e(" removeEmptyRanks",(function(){c(t)})),e(" nestingGraph.cleanup",(function(){l.cleanup(t)})),e(" normalizeRanks",(function(){s(t)})),e(" assignRankMinMax",(function(){!function(t){var e=0;r.forEach(t.nodes(),(function(n){var i=t.node(n);i.borderTop&&(i.minRank=t.node(i.borderTop).rank,i.maxRank=t.node(i.borderBottom).rank,e=r.max(e,i.maxRank))})),t.graph().maxRank=e}(t)})),e(" removeEdgeLabelProxies",(function(){!function(t){r.forEach(t.nodes(),(function(e){var n=t.node(e);"edge-proxy"===n.dummy&&(t.edge(n.e).labelRank=n.rank,t.removeNode(e))}))}(t)})),e(" normalize.run",(function(){o.run(t)})),e(" parentDummyChains",(function(){u(t)})),e(" addBorderSegments",(function(){h(t)})),e(" order",(function(){d(t)})),e(" insertSelfEdges",(function(){!function(t){var e=g.buildLayerMatrix(t);r.forEach(e,(function(e){var n=0;r.forEach(e,(function(e,i){var o=t.node(e);o.order=i+n,r.forEach(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(){f.adjust(t)})),e(" position",(function(){p(t)})),e(" positionSelfEdges",(function(){!function(t){r.forEach(t.nodes(),(function(e){var n=t.node(e);if("selfedge"===n.dummy){var r=t.node(n.e.v),i=r.x+r.width/2,o=r.y,a=n.x-i,s=r.height/2;t.setEdge(n.e,n.label),t.removeNode(e),n.label.points=[{x:i+2*a/3,y:o-s},{x:i+5*a/6,y:o-s},{x:i+a,y:o},{x:i+5*a/6,y:o+s},{x:i+2*a/3,y:o+s}],n.label.x=n.x,n.label.y=n.y}}))}(t)})),e(" removeBorderNodes",(function(){!function(t){r.forEach(t.nodes(),(function(e){if(t.children(e).length){var n=t.node(e),i=t.node(n.borderTop),o=t.node(n.borderBottom),a=t.node(r.last(n.borderLeft)),s=t.node(r.last(n.borderRight));n.width=Math.abs(s.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.forEach(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.forEach(t.edges(),(function(e){var n=t.edge(e);if(r.has(n,"x"))switch("l"!==n.labelpos&&"r"!==n.labelpos||(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}}))}(t)})),e(" undoCoordinateSystem",(function(){f.undo(t)})),e(" translateGraph",(function(){!function(t){var e=Number.POSITIVE_INFINITY,n=0,i=Number.POSITIVE_INFINITY,o=0,a=t.graph(),s=a.marginx||0,u=a.marginy||0;function c(t){var r=t.x,a=t.y,s=t.width,u=t.height;e=Math.min(e,r-s/2),n=Math.max(n,r+s/2),i=Math.min(i,a-u/2),o=Math.max(o,a+u/2)}r.forEach(t.nodes(),(function(e){c(t.node(e))})),r.forEach(t.edges(),(function(e){var n=t.edge(e);r.has(n,"x")&&c(n)})),e-=s,i-=u,r.forEach(t.nodes(),(function(n){var r=t.node(n);r.x-=e,r.y-=i})),r.forEach(t.edges(),(function(n){var o=t.edge(n);r.forEach(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+s,a.height=o-i+u}(t)})),e(" assignNodeIntersects",(function(){!function(t){r.forEach(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)),i.points.push(g.intersectRect(a,r))}))}(t)})),e(" reversePoints",(function(){!function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);n.reversed&&n.points.reverse()}))}(t)})),e(" acyclic.undo",(function(){i.undo(t)}))}(e,n)})),n(" updateInputGraph",(function(){!function(t,e){r.forEach(t.nodes(),(function(n){var r=t.node(n),i=e.node(n);r&&(r.x=i.x,r.y=i.y,e.children(n).length&&(r.width=i.width,r.height=i.height))})),r.forEach(t.edges(),(function(n){var i=t.edge(n),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 m=["nodesep","edgesep","ranksep","marginx","marginy"],v={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},y=["acyclicer","ranker","rankdir","align"],x=["width","height"],b={width:0,height:0},w=["minlen","weight","width","height","labeloffset"],M={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},k=["labelpos"];function T(t,e){return r.mapValues(r.pick(t,e),Number)}function S(t){var e={};return r.forEach(t,(function(t,n){e[n.toLowerCase()]=t})),e}},function(t,e,n){var r=n(366);t.exports=function(t){return r(t,5)}},function(t,e,n){var r=n(65),i=n(164),o=n(70),a=n(395),s=n(402),u=n(168),c=n(169),l=n(405),h=n(406),f=n(173),d=n(407),p=n(76),g=n(412),_=n(413),m=n(177),v=n(8),y=n(73),x=n(418),b=n(15),w=n(420),M=n(29),k={};k["[object Arguments]"]=k["[object Array]"]=k["[object ArrayBuffer]"]=k["[object DataView]"]=k["[object Boolean]"]=k["[object Date]"]=k["[object Float32Array]"]=k["[object Float64Array]"]=k["[object Int8Array]"]=k["[object Int16Array]"]=k["[object Int32Array]"]=k["[object Map]"]=k["[object Number]"]=k["[object Object]"]=k["[object RegExp]"]=k["[object Set]"]=k["[object String]"]=k["[object Symbol]"]=k["[object Uint8Array]"]=k["[object Uint8ClampedArray]"]=k["[object Uint16Array]"]=k["[object Uint32Array]"]=!0,k["[object Error]"]=k["[object Function]"]=k["[object WeakMap]"]=!1,t.exports=function t(e,n,T,S,C,A){var E,D=1&n,R=2&n,N=4&n;if(T&&(E=C?T(e,S,C,A):T(e)),void 0!==E)return E;if(!b(e))return e;var I=v(e);if(I){if(E=g(e),!D)return c(e,E)}else{var V=p(e),P="[object Function]"==V||"[object GeneratorFunction]"==V;if(y(e))return u(e,D);if("[object Object]"==V||"[object Arguments]"==V||P&&!C){if(E=R||P?{}:m(e),!D)return R?h(e,s(E,e)):l(e,a(E,e))}else{if(!k[V])return C?e:{};E=_(e,V,D)}}A||(A=new r);var L=A.get(e);if(L)return L;A.set(e,E),w(e)?e.forEach((function(r){E.add(t(r,n,T,r,e,A))})):x(e)&&e.forEach((function(r,i){E.set(i,t(r,n,T,i,e,A))}));var O=N?R?d:f:R?keysIn:M,j=I?void 0:O(e);return i(j||e,(function(r,i){j&&(r=e[i=r]),o(E,i,t(r,n,T,i,e,A))})),E}},function(t,e){t.exports=function(){this.__data__=[],this.size=0}},function(t,e,n){var r=n(67),i=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=r(e,t);return!(n<0)&&(n==e.length-1?e.pop():i.call(e,n,1),--this.size,!0)}},function(t,e,n){var r=n(67);t.exports=function(t){var e=this.__data__,n=r(e,t);return n<0?void 0:e[n][1]}},function(t,e,n){var r=n(67);t.exports=function(t){return r(this.__data__,t)>-1}},function(t,e,n){var r=n(67);t.exports=function(t,e){var n=this.__data__,i=r(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}},function(t,e,n){var r=n(66);t.exports=function(){this.__data__=new r,this.size=0}},function(t,e){t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},function(t,e){t.exports=function(t){return this.__data__.get(t)}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e,n){var r=n(66),i=n(107),o=n(109);t.exports=function(t,e){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!i||a.length<199)return a.push([t,e]),this.size=++n.size,this;n=this.__data__=new o(a)}return n.set(t,e),this.size=n.size,this}},function(t,e,n){var r=n(108),i=n(380),o=n(15),a=n(163),s=/^\[object .+?Constructor\]$/,u=Function.prototype,c=Object.prototype,l=u.toString,h=c.hasOwnProperty,f=RegExp("^"+l.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!o(t)||i(t))&&(r(t)?f:s).test(a(t))}},function(t,e,n){var r=n(40),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=r?r.toStringTag:void 0;t.exports=function(t){var e=o.call(t,s),n=t[s];try{t[s]=void 0;var r=!0}catch(t){}var i=a.call(t);return r&&(e?t[s]=n:delete t[s]),i}},function(t,e){var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},function(t,e,n){var r,i=n(381),o=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";t.exports=function(t){return!!o&&o in t}},function(t,e,n){var r=n(14)["__core-js_shared__"];t.exports=r},function(t,e){t.exports=function(t,e){return null==t?void 0:t[e]}},function(t,e,n){var r=n(384),i=n(66),o=n(107);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},function(t,e,n){var r=n(385),i=n(386),o=n(387),a=n(388),s=n(389);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,t.exports=u},function(t,e,n){var r=n(68);t.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(t,e){t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},function(t,e,n){var r=n(68),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(r){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(e,t)?e[t]:void 0}},function(t,e,n){var r=n(68),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return r?void 0!==e[t]:i.call(e,t)}},function(t,e,n){var r=n(68);t.exports=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=r&&void 0===e?"__lodash_hash_undefined__":e,this}},function(t,e,n){var r=n(69);t.exports=function(t){var e=r(this,t).delete(t);return this.size-=e?1:0,e}},function(t,e){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},function(t,e,n){var r=n(69);t.exports=function(t){return r(this,t).get(t)}},function(t,e,n){var r=n(69);t.exports=function(t){return r(this,t).has(t)}},function(t,e,n){var r=n(69);t.exports=function(t,e){var n=r(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this}},function(t,e,n){var r=n(47),i=n(29);t.exports=function(t,e){return t&&r(e,i(e),t)}},function(t,e){t.exports=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}},function(t,e,n){var r=n(39),i=n(18);t.exports=function(t){return i(t)&&"[object Arguments]"==r(t)}},function(t,e){t.exports=function(){return!1}},function(t,e,n){var r=n(39),i=n(111),o=n(18),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,t.exports=function(t){return o(t)&&i(t.length)&&!!a[r(t)]}},function(t,e,n){var r=n(113),i=n(401),o=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return i(t);var e=[];for(var n in Object(t))o.call(t,n)&&"constructor"!=n&&e.push(n);return e}},function(t,e,n){var r=n(167)(Object.keys,Object);t.exports=r},function(t,e,n){var r=n(47),i=n(41);t.exports=function(t,e){return t&&r(e,i(e),t)}},function(t,e,n){var r=n(15),i=n(113),o=n(404),a=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return o(t);var e=i(t),n=[];for(var s in t)("constructor"!=s||!e&&a.call(t,s))&&n.push(s);return n}},function(t,e){t.exports=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}},function(t,e,n){var r=n(47),i=n(114);t.exports=function(t,e){return r(t,i(t),e)}},function(t,e,n){var r=n(47),i=n(172);t.exports=function(t,e){return r(t,i(t),e)}},function(t,e,n){var r=n(174),i=n(172),o=n(41);t.exports=function(t){return r(t,o,i)}},function(t,e,n){var r=n(28)(n(14),"DataView");t.exports=r},function(t,e,n){var r=n(28)(n(14),"Promise");t.exports=r},function(t,e,n){var r=n(28)(n(14),"Set");t.exports=r},function(t,e,n){var r=n(28)(n(14),"WeakMap");t.exports=r},function(t,e){var n=Object.prototype.hasOwnProperty;t.exports=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&n.call(t,"index")&&(r.index=t.index,r.input=t.input),r}},function(t,e,n){var r=n(117),i=n(414),o=n(415),a=n(416),s=n(176);t.exports=function(t,e,n){var u=t.constructor;switch(e){case"[object ArrayBuffer]":return r(t);case"[object Boolean]":case"[object Date]":return new u(+t);case"[object DataView]":return i(t,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return s(t,n);case"[object Map]":return new u;case"[object Number]":case"[object String]":return new u(t);case"[object RegExp]":return o(t);case"[object Set]":return new u;case"[object Symbol]":return a(t)}}},function(t,e,n){var r=n(117);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}},function(t,e){var n=/\w*$/;t.exports=function(t){var e=new t.constructor(t.source,n.exec(t));return e.lastIndex=t.lastIndex,e}},function(t,e,n){var r=n(40),i=r?r.prototype:void 0,o=i?i.valueOf:void 0;t.exports=function(t){return o?Object(o.call(t)):{}}},function(t,e,n){var r=n(15),i=Object.create,o=function(){function t(){}return function(e){if(!r(e))return{};if(i)return i(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();t.exports=o},function(t,e,n){var r=n(419),i=n(75),o=n(112),a=o&&o.isMap,s=a?i(a):r;t.exports=s},function(t,e,n){var r=n(76),i=n(18);t.exports=function(t){return i(t)&&"[object Map]"==r(t)}},function(t,e,n){var r=n(421),i=n(75),o=n(112),a=o&&o.isSet,s=a?i(a):r;t.exports=s},function(t,e,n){var r=n(76),i=n(18);t.exports=function(t){return i(t)&&"[object Set]"==r(t)}},function(t,e,n){var r=n(118),i=n(38),o=n(77),a=n(41),s=Object.prototype,u=s.hasOwnProperty,c=r((function(t,e){t=Object(t);var n=-1,r=e.length,c=r>2?e[2]:void 0;for(c&&o(e[0],e[1],c)&&(r=1);++n<r;)for(var l=e[n],h=a(l),f=-1,d=h.length;++f<d;){var p=h[f],g=t[p];(void 0===g||i(g,s[p])&&!u.call(t,p))&&(t[p]=l[p])}return t}));t.exports=c},function(t,e){t.exports=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}},function(t,e,n){var r=n(178),i=n(165),o=n(31),a=i?function(t,e){return i(t,"toString",{configurable:!0,enumerable:!1,value:r(e),writable:!0})}:o;t.exports=a},function(t,e){var n=Date.now;t.exports=function(t){var e=0,r=0;return function(){var i=n(),o=16-(i-r);if(r=i,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}},function(t,e,n){t.exports=n(181)},function(t,e){t.exports=function(t){return function(e,n,r){for(var i=-1,o=Object(e),a=r(e),s=a.length;s--;){var u=a[t?s:++i];if(!1===n(o[u],u,o))break}return e}}},function(t,e,n){var r=n(30);t.exports=function(t,e){return function(n,i){if(null==n)return n;if(!r(n))return t(n,i);for(var o=n.length,a=e?o:-1,s=Object(n);(e?a--:++a<o)&&!1!==i(s[a],a,s););return n}}},function(t,e,n){var r=n(170),i=n(430),o=n(21),a=n(8);t.exports=function(t,e){return(a(t)?r:i)(t,o(e,3))}},function(t,e,n){var r=n(78);t.exports=function(t,e){var n=[];return r(t,(function(t,r,i){e(t,r,i)&&n.push(t)})),n}},function(t,e,n){var r=n(432),i=n(443),o=n(187);t.exports=function(t){var e=i(t);return 1==e.length&&e[0][2]?o(e[0][0],e[0][1]):function(n){return n===t||r(n,t,e)}}},function(t,e,n){var r=n(65),i=n(184);t.exports=function(t,e,n,o){var a=n.length,s=a,u=!o;if(null==t)return!s;for(t=Object(t);a--;){var c=n[a];if(u&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++a<s;){var l=(c=n[a])[0],h=t[l],f=c[1];if(u&&c[2]){if(void 0===h&&!(l in t))return!1}else{var d=new r;if(o)var p=o(h,f,l,t,e,d);if(!(void 0===p?i(f,h,3,o,d):p))return!1}}return!0}},function(t,e,n){var r=n(65),i=n(185),o=n(439),a=n(442),s=n(76),u=n(8),c=n(73),l=n(110),h="[object Object]",f=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,d,p,g){var _=u(t),m=u(e),v=_?"[object Array]":s(t),y=m?"[object Array]":s(e),x=(v="[object Arguments]"==v?h:v)==h,b=(y="[object Arguments]"==y?h:y)==h,w=v==y;if(w&&c(t)){if(!c(e))return!1;_=!0,x=!1}if(w&&!x)return g||(g=new r),_||l(t)?i(t,e,n,d,p,g):o(t,e,v,n,d,p,g);if(!(1&n)){var M=x&&f.call(t,"__wrapped__"),k=b&&f.call(e,"__wrapped__");if(M||k){var T=M?t.value():t,S=k?e.value():e;return g||(g=new r),p(T,S,n,d,g)}}return!!w&&(g||(g=new r),a(t,e,n,d,p,g))}},function(t,e,n){var r=n(109),i=n(435),o=n(436);function a(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new r;++e<n;)this.add(t[e])}a.prototype.add=a.prototype.push=i,a.prototype.has=o,t.exports=a},function(t,e){t.exports=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}},function(t,e){t.exports=function(t,e){return t.has(e)}},function(t,e,n){var r=n(40),i=n(175),o=n(38),a=n(185),s=n(440),u=n(441),c=r?r.prototype:void 0,l=c?c.valueOf:void 0;t.exports=function(t,e,n,r,c,h,f){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!h(new i(t),new i(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var d=s;case"[object Set]":var p=1&r;if(d||(d=u),t.size!=e.size&&!p)return!1;var g=f.get(t);if(g)return g==e;r|=2,f.set(t,e);var _=a(d(t),d(e),r,c,h,f);return f.delete(t),_;case"[object Symbol]":if(l)return l.call(t)==l.call(e)}return!1}},function(t,e){t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}},function(t,e){t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}},function(t,e,n){var r=n(173),i=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,o,a,s){var u=1&n,c=r(t),l=c.length;if(l!=r(e).length&&!u)return!1;for(var h=l;h--;){var f=c[h];if(!(u?f in e:i.call(e,f)))return!1}var d=s.get(t);if(d&&s.get(e))return d==e;var p=!0;s.set(t,e),s.set(e,t);for(var g=u;++h<l;){var _=t[f=c[h]],m=e[f];if(o)var v=u?o(m,_,f,e,t,s):o(_,m,f,t,e,s);if(!(void 0===v?_===m||a(_,m,n,o,s):v)){p=!1;break}g||(g="constructor"==f)}if(p&&!g){var y=t.constructor,x=e.constructor;y!=x&&"constructor"in t&&"constructor"in e&&!("function"==typeof y&&y instanceof y&&"function"==typeof x&&x instanceof x)&&(p=!1)}return s.delete(t),s.delete(e),p}},function(t,e,n){var r=n(186),i=n(29);t.exports=function(t){for(var e=i(t),n=e.length;n--;){var o=e[n],a=t[o];e[n]=[o,a,r(a)]}return e}},function(t,e,n){var r=n(184),i=n(445),o=n(189),a=n(121),s=n(186),u=n(187),c=n(48);t.exports=function(t,e){return a(t)&&s(e)?u(c(t),e):function(n){var a=i(n,t);return void 0===a&&a===e?o(n,t):r(e,a,3)}}},function(t,e,n){var r=n(120);t.exports=function(t,e,n){var i=null==t?void 0:r(t,e);return void 0===i?n:i}},function(t,e,n){var r=n(447),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,a=r((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(i,(function(t,n,r,i){e.push(r?i.replace(o,"$1"):n||t)})),e}));t.exports=a},function(t,e,n){var r=n(448);t.exports=function(t){var e=r(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}},function(t,e,n){var r=n(109);function i(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");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)||o,a};return n.cache=new(i.Cache||r),n}i.Cache=r,t.exports=i},function(t,e,n){var r=n(40),i=n(80),o=n(8),a=n(42),s=r?r.prototype:void 0,u=s?s.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(o(e))return i(e,t)+"";if(a(e))return u?u.call(e):"";var n=e+"";return"0"==n&&1/e==-1/0?"-0":n}},function(t,e){t.exports=function(t,e){return null!=t&&e in Object(t)}},function(t,e,n){var r=n(452),i=n(453),o=n(121),a=n(48);t.exports=function(t){return o(t)?r(a(t)):i(t)}},function(t,e){t.exports=function(t){return function(e){return null==e?void 0:e[t]}}},function(t,e,n){var r=n(120);t.exports=function(t){return function(e){return r(e,t)}}},function(t,e,n){var r=n(455)(n(456));t.exports=r},function(t,e,n){var r=n(21),i=n(30),o=n(29);t.exports=function(t){return function(e,n,a){var s=Object(e);if(!i(e)){var u=r(n,3);e=o(e),n=function(t){return u(s[t],t,s)}}var c=t(e,n,a);return c>-1?s[u?e[c]:c]:void 0}}},function(t,e,n){var r=n(457),i=n(21),o=n(458),a=Math.max;t.exports=function(t,e,n){var s=null==t?0:t.length;if(!s)return-1;var u=null==n?0:o(n);return u<0&&(u=a(s+u,0)),r(t,i(e,3),u)}},function(t,e){t.exports=function(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}},function(t,e,n){var r=n(191);t.exports=function(t){var e=r(t),n=e%1;return e==e?n?e-n:e:0}},function(t,e,n){var r=n(15),i=n(42),o=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,c=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(i(t))return NaN;if(r(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=r(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(o,"");var n=s.test(t);return n||u.test(t)?c(t.slice(2),n?2:8):a.test(t)?NaN:+t}},function(t,e,n){var r=n(40),i=n(72),o=n(8),a=r?r.isConcatSpreadable:void 0;t.exports=function(t){return o(t)||i(t)||!!(a&&t&&t[a])}},function(t,e,n){var r=n(119),i=n(183),o=n(41);t.exports=function(t,e){return null==t?t:r(t,i(e),o)}},function(t,e,n){var r=n(463),i=n(190);t.exports=function(t,e){return null!=t&&i(t,e,r)}},function(t,e){var n=Object.prototype.hasOwnProperty;t.exports=function(t,e){return null!=t&&n.call(t,e)}},function(t,e){t.exports=function(t){return void 0===t}},function(t,e){t.exports=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}},function(t,e,n){var r=n(80),i=n(21),o=n(194),a=n(8);t.exports=function(t,e){return(a(t)?r:o)(t,i(e,3))}},function(t,e,n){var r=n(71),i=n(182),o=n(21);t.exports=function(t,e){var n={};return e=o(e,3),i(t,(function(t,i,o){r(n,i,e(t,i,o))})),n}},function(t,e,n){var r=n(122),i=n(469),o=n(31);t.exports=function(t){return t&&t.length?r(t,o,i):void 0}},function(t,e){t.exports=function(t,e){return t>e}},function(t,e,n){var r=n(471),i=n(476)((function(t,e,n){r(t,e,n)}));t.exports=i},function(t,e,n){var r=n(65),i=n(195),o=n(119),a=n(472),s=n(15),u=n(41),c=n(196);t.exports=function t(e,n,l,h,f){e!==n&&o(n,(function(o,u){if(f||(f=new r),s(o))a(e,n,u,l,t,h,f);else{var d=h?h(c(e,u),o,u+"",e,n,f):void 0;void 0===d&&(d=o),i(e,u,d)}}),u)}},function(t,e,n){var r=n(195),i=n(168),o=n(176),a=n(169),s=n(177),u=n(72),c=n(8),l=n(473),h=n(73),f=n(108),d=n(15),p=n(474),g=n(110),_=n(196),m=n(475);t.exports=function(t,e,n,v,y,x,b){var w=_(t,n),M=_(e,n),k=b.get(M);if(k)r(t,n,k);else{var T=x?x(w,M,n+"",t,e,b):void 0,S=void 0===T;if(S){var C=c(M),A=!C&&h(M),E=!C&&!A&&g(M);T=M,C||A||E?c(w)?T=w:l(w)?T=a(w):A?(S=!1,T=i(M,!0)):E?(S=!1,T=o(M,!0)):T=[]:p(M)||u(M)?(T=w,u(w)?T=m(w):d(w)&&!f(w)||(T=s(M))):S=!1}S&&(b.set(M,T),y(T,M,v,x,b),b.delete(M)),r(t,n,T)}}},function(t,e,n){var r=n(30),i=n(18);t.exports=function(t){return i(t)&&r(t)}},function(t,e,n){var r=n(39),i=n(116),o=n(18),a=Function.prototype,s=Object.prototype,u=a.toString,c=s.hasOwnProperty,l=u.call(Object);t.exports=function(t){if(!o(t)||"[object Object]"!=r(t))return!1;var e=i(t);if(null===e)return!0;var n=c.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&u.call(n)==l}},function(t,e,n){var r=n(47),i=n(41);t.exports=function(t){return r(t,i(t))}},function(t,e,n){var r=n(118),i=n(77);t.exports=function(t){return r((function(e,n){var r=-1,o=n.length,a=o>1?n[o-1]:void 0,s=o>2?n[2]:void 0;for(a=t.length>3&&"function"==typeof a?(o--,a):void 0,s&&i(n[0],n[1],s)&&(a=o<3?void 0:a,o=1),e=Object(e);++r<o;){var u=n[r];u&&t(e,u,r,a)}return e}))}},function(t,e,n){var r=n(122),i=n(197),o=n(31);t.exports=function(t){return t&&t.length?r(t,o,i):void 0}},function(t,e,n){var r=n(122),i=n(21),o=n(197);t.exports=function(t,e){return t&&t.length?r(t,i(e,2),o):void 0}},function(t,e,n){var r=n(14);t.exports=function(){return r.Date.now()}},function(t,e,n){var r=n(481),i=n(484)((function(t,e){return null==t?{}:r(t,e)}));t.exports=i},function(t,e,n){var r=n(482),i=n(189);t.exports=function(t,e){return r(t,e,(function(e,n){return i(t,n)}))}},function(t,e,n){var r=n(120),i=n(483),o=n(79);t.exports=function(t,e,n){for(var a=-1,s=e.length,u={};++a<s;){var c=e[a],l=r(t,c);n(l,c)&&i(u,o(c,t),l)}return u}},function(t,e,n){var r=n(70),i=n(79),o=n(74),a=n(15),s=n(48);t.exports=function(t,e,n,u){if(!a(t))return t;for(var c=-1,l=(e=i(e,t)).length,h=l-1,f=t;null!=f&&++c<l;){var d=s(e[c]),p=n;if(c!=h){var g=f[d];void 0===(p=u?u(g,d,f):void 0)&&(p=a(g)?g:o(e[c+1])?[]:{})}r(f,d,p),f=f[d]}return t}},function(t,e,n){var r=n(192),i=n(179),o=n(180);t.exports=function(t){return o(i(t,void 0,r),t+"")}},function(t,e,n){var r=n(486)();t.exports=r},function(t,e,n){var r=n(487),i=n(77),o=n(191);t.exports=function(t){return function(e,n,a){return a&&"number"!=typeof a&&i(e,n,a)&&(n=a=void 0),e=o(e),void 0===n?(n=e,e=0):n=o(n),a=void 0===a?e<n?1:-1:o(a),r(e,n,a,t)}}},function(t,e){var n=Math.ceil,r=Math.max;t.exports=function(t,e,i,o){for(var a=-1,s=r(n((e-t)/(i||1)),0),u=Array(s);s--;)u[o?s:++a]=t,t+=i;return u}},function(t,e,n){var r=n(489),i=n(78),o=n(21),a=n(490),s=n(8);t.exports=function(t,e,n){var u=s(t)?r:a,c=arguments.length<3;return u(t,o(e,4),n,c,i)}},function(t,e){t.exports=function(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}},function(t,e){t.exports=function(t,e,n,r,i){return i(t,(function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)})),n}},function(t,e,n){var r=n(193),i=n(492),o=n(118),a=n(77),s=o((function(t,e){if(null==t)return[];var n=e.length;return n>1&&a(t,e[0],e[1])?e=[]:n>2&&a(e[0],e[1],e[2])&&(e=[e[0]]),i(t,r(e,1),[])}));t.exports=s},function(t,e,n){var r=n(80),i=n(21),o=n(194),a=n(493),s=n(75),u=n(494),c=n(31);t.exports=function(t,e,n){var l=-1;e=r(e.length?e:[c],s(i));var h=o(t,(function(t,n,i){return{criteria:r(e,(function(e){return e(t)})),index:++l,value:t}}));return a(h,(function(t,e){return u(t,e,n)}))}},function(t,e){t.exports=function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}},function(t,e,n){var r=n(495);t.exports=function(t,e,n){for(var i=-1,o=t.criteria,a=e.criteria,s=o.length,u=n.length;++i<s;){var c=r(o[i],a[i]);if(c)return i>=u?c:c*("desc"==n[i]?-1:1)}return t.index-e.index}},function(t,e,n){var r=n(42);t.exports=function(t,e){if(t!==e){var n=void 0!==t,i=null===t,o=t==t,a=r(t),s=void 0!==e,u=null===e,c=e==e,l=r(e);if(!u&&!l&&!a&&t>e||a&&s&&c&&!u&&!l||i&&s&&c||!n&&c||!o)return 1;if(!i&&!a&&!l&&t<e||l&&n&&o&&!i&&!a||u&&n&&o||!s&&o||!c)return-1}return 0}},function(t,e,n){var r=n(188),i=0;t.exports=function(t){var e=++i;return r(t)+e}},function(t,e,n){var r=n(498),i=n(29);t.exports=function(t){return null==t?[]:r(t,i(t))}},function(t,e,n){var r=n(80);t.exports=function(t,e){return r(e,(function(e){return t[e]}))}},function(t,e,n){var r=n(70),i=n(500);t.exports=function(t,e){return i(t||[],e||[],r)}},function(t,e){t.exports=function(t,e,n){for(var r=-1,i=t.length,o=e.length,a={};++r<i;){var s=r<o?e[r]:void 0;n(a,t[r],s)}return a}},function(t,e,n){"use strict";var r=n(4),i=n(502);t.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.forEach(t.nodes(),(function o(a){if(r.has(i,a))return;i[a]=!0,n[a]=!0,r.forEach(t.outEdges(a),(function(t){r.has(n,t.w)?e.push(t):o(t.w)})),delete n[a]})),e}(t);r.forEach(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.forEach(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)}}))}}},function(t,e,n){var r=n(4),i=n(13).Graph,o=n(503);t.exports=function(t,e){if(t.nodeCount()<=1)return[];var n=function(t,e){var n=new i,a=0,s=0;r.forEach(t.nodes(),(function(t){n.setNode(t,{v:t,in:0,out:0})})),r.forEach(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),s=Math.max(s,n.node(t.v).out+=i),a=Math.max(a,n.node(t.w).in+=i)}));var c=r.range(s+a+3).map((function(){return new o})),l=a+1;return r.forEach(n.nodes(),(function(t){u(c,l,n.node(t))})),{graph:n,buckets:c,zeroIdx:l}}(t,e||a),c=function(t,e,n){var r,i=[],o=e[e.length-1],a=e[0];for(;t.nodeCount();){for(;r=a.dequeue();)s(t,e,n,r);for(;r=o.dequeue();)s(t,e,n,r);if(t.nodeCount())for(var u=e.length-2;u>0;--u)if(r=e[u].dequeue()){i=i.concat(s(t,e,n,r,!0));break}}return i}(n.graph,n.buckets,n.zeroIdx);return r.flatten(r.map(c,(function(e){return t.outEdges(e.v,e.w)})),!0)};var a=r.constant(1);function s(t,e,n,i,o){var a=o?[]:void 0;return r.forEach(t.inEdges(i.v),(function(r){var i=t.edge(r),s=t.node(r.v);o&&a.push({v:r.v,w:r.w}),s.out-=i,u(e,n,s)})),r.forEach(t.outEdges(i.v),(function(r){var i=t.edge(r),o=r.w,a=t.node(o);a.in-=i,u(e,n,a)})),t.removeNode(i.v),a}function u(t,e,n){n.out?n.in?t[n.out-n.in+e].enqueue(n):t[t.length-1].enqueue(n):t[0].enqueue(n)}},function(t,e){function n(){var t={};t._next=t._prev=t,this._sentinel=t}function r(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function i(t,e){if("_next"!==t&&"_prev"!==t)return e}t.exports=n,n.prototype.dequeue=function(){var t=this._sentinel,e=t._prev;if(e!==t)return r(e),e},n.prototype.enqueue=function(t){var e=this._sentinel;t._prev&&t._next&&r(t),t._next=e._next,e._next._prev=t,e._next=t,t._prev=e},n.prototype.toString=function(){for(var t=[],e=this._sentinel,n=e._prev;n!==e;)t.push(JSON.stringify(n,i)),n=n._prev;return"["+t.join(", ")+"]"}},function(t,e,n){"use strict";var r=n(4),i=n(9);t.exports={run:function(t){t.graph().dummyChains=[],r.forEach(t.edges(),(function(e){!function(t,e){var n,r,o,a=e.v,s=t.node(a).rank,u=e.w,c=t.node(u).rank,l=e.name,h=t.edge(e),f=h.labelRank;if(c===s+1)return;for(t.removeEdge(e),o=0,++s;s<c;++o,++s)h.points=[],r={width:0,height:0,edgeLabel:h,edgeObj:e,rank:s},n=i.addDummyNode(t,"edge",r,"_d"),s===f&&(r.width=h.width,r.height=h.height,r.dummy="edge-label",r.labelpos=h.labelpos),t.setEdge(a,n,{weight:h.weight},l),0===o&&t.graph().dummyChains.push(n),a=n;t.setEdge(a,u,{weight:h.weight},l)}(t,e)}))},undo:function(t){r.forEach(t.graph().dummyChains,(function(e){var n,r=t.node(e),i=r.edgeLabel;for(t.setEdge(r.edgeObj,i);r.dummy;)n=t.successors(e)[0],t.removeNode(e),i.points.push({x:r.x,y:r.y}),"edge-label"===r.dummy&&(i.x=r.x,i.y=r.y,i.width=r.width,i.height=r.height),e=n,r=t.node(e)}))}}},function(t,e,n){"use strict";var r=n(81).longestPath,i=n(198),o=n(506);t.exports=function(t){switch(t.graph().ranker){case"network-simplex":s(t);break;case"tight-tree":!function(t){r(t),i(t)}(t);break;case"longest-path":a(t);break;default:s(t)}};var a=r;function s(t){o(t)}},function(t,e,n){"use strict";var r=n(4),i=n(198),o=n(81).slack,a=n(81).longestPath,s=n(13).alg.preorder,u=n(13).alg.postorder,c=n(9).simplify;function l(t){t=c(t),a(t);var e,n=i(t);for(d(n),h(n,t);e=g(n);)m(n,t,e,_(n,t,e))}function h(t,e){var n=u(t,t.nodes());n=n.slice(0,n.length-1),r.forEach(n,(function(n){!function(t,e,n){var r=t.node(n).parent;t.edge(n,r).cutvalue=f(t,e,n)}(t,e,n)}))}function f(t,e,n){var i=t.node(n).parent,o=!0,a=e.edge(n,i),s=0;return a||(o=!1,a=e.edge(i,n)),s=a.weight,r.forEach(e.nodeEdges(n),(function(r){var a,u,c=r.v===n,l=c?r.w:r.v;if(l!==i){var h=c===o,f=e.edge(r).weight;if(s+=h?f:-f,a=n,u=l,t.hasEdge(a,u)){var d=t.edge(n,l).cutvalue;s+=h?-d:d}}})),s}function d(t,e){arguments.length<2&&(e=t.nodes()[0]),p(t,{},1,e)}function p(t,e,n,i,o){var a=n,s=t.node(i);return e[i]=!0,r.forEach(t.neighbors(i),(function(o){r.has(e,o)||(n=p(t,e,n,o,i))})),s.low=a,s.lim=n++,o?s.parent=o:delete s.parent,n}function g(t){return r.find(t.edges(),(function(e){return t.edge(e).cutvalue<0}))}function _(t,e,n){var i=n.v,a=n.w;e.hasEdge(i,a)||(i=n.w,a=n.v);var s=t.node(i),u=t.node(a),c=s,l=!1;s.lim>u.lim&&(c=u,l=!0);var h=r.filter(e.edges(),(function(e){return l===v(t,t.node(e.v),c)&&l!==v(t,t.node(e.w),c)}));return r.minBy(h,(function(t){return o(e,t)}))}function m(t,e,n,i){var o=n.v,a=n.w;t.removeEdge(o,a),t.setEdge(i.v,i.w,{}),d(t),h(t,e),function(t,e){var n=r.find(t.nodes(),(function(t){return!e.node(t).parent})),i=s(t,n);i=i.slice(1),r.forEach(i,(function(n){var r=t.node(n).parent,i=e.edge(n,r),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 v(t,e,n){return n.low<=e.lim&&e.lim<=n.lim}t.exports=l,l.initLowLimValues=d,l.initCutValues=h,l.calcCutValue=f,l.leaveEdge=g,l.enterEdge=_,l.exchangeEdges=m},function(t,e,n){var r=n(4);t.exports=function(t){var e=function(t){var e={},n=0;return r.forEach(t.children(),(function i(o){var a=n;r.forEach(t.children(o),i),e[o]={low:a,lim:n++}})),e}(t);r.forEach(t.graph().dummyChains,(function(n){for(var r=t.node(n),i=r.edgeObj,o=function(t,e,n,r){var i,o,a=[],s=[],u=Math.min(e[n].low,e[r].low),c=Math.max(e[n].lim,e[r].lim);i=n;do{i=t.parent(i),a.push(i)}while(i&&(e[i].low>u||c>e[i].lim));o=i,i=r;for(;(i=t.parent(i))!==o;)s.push(i);return{path:a.concat(s.reverse()),lca:o}}(t,e,i.v,i.w),a=o.path,s=o.lca,u=0,c=a[u],l=!0;n!==i.w;){if(r=t.node(n),l){for(;(c=a[u])!==s&&t.node(c).maxRank<r.rank;)u++;c===s&&(l=!1)}if(!l){for(;u<a.length-1&&t.node(c=a[u+1]).minRank<=r.rank;)u++;c=a[u]}t.setParent(n,c),n=t.successors(n)[0]}}))}},function(t,e,n){var r=n(4),i=n(9);t.exports={run:function(t){var e=i.addDummyNode(t,"root",{},"_root"),n=function(t){var e={};return r.forEach(t.children(),(function(n){!function n(i,o){var a=t.children(i);a&&a.length&&r.forEach(a,(function(t){n(t,o+1)}));e[i]=o}(n,1)})),e}(t),o=r.max(r.values(n))-1,a=2*o+1;t.graph().nestingRoot=e,r.forEach(t.edges(),(function(e){t.edge(e).minlen*=a}));var s=function(t){return r.reduce(t.edges(),(function(e,n){return e+t.edge(n).weight}),0)}(t)+1;r.forEach(t.children(),(function(u){!function t(e,n,o,a,s,u,c){var l=e.children(c);if(!l.length)return void(c!==n&&e.setEdge(n,c,{weight:0,minlen:o}));var h=i.addBorderNode(e,"_bt"),f=i.addBorderNode(e,"_bb"),d=e.node(c);e.setParent(h,c),d.borderTop=h,e.setParent(f,c),d.borderBottom=f,r.forEach(l,(function(r){t(e,n,o,a,s,u,r);var i=e.node(r),l=i.borderTop?i.borderTop:r,d=i.borderBottom?i.borderBottom:r,p=i.borderTop?a:2*a,g=l!==d?1:s-u[c]+1;e.setEdge(h,l,{weight:p,minlen:g,nestingEdge:!0}),e.setEdge(d,f,{weight:p,minlen:g,nestingEdge:!0})})),e.parent(c)||e.setEdge(n,h,{weight:0,minlen:s+u[c]})}(t,e,a,s,o,n,u)})),t.graph().nodeRankFactor=a},cleanup:function(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,r.forEach(t.edges(),(function(e){t.edge(e).nestingEdge&&t.removeEdge(e)}))}}},function(t,e,n){var r=n(4),i=n(9);function o(t,e,n,r,o,a){var s={width:0,height:0,rank:a,borderType:e},u=o[e][a-1],c=i.addDummyNode(t,"border",s,n);o[e][a]=c,t.setParent(c,r),u&&t.setEdge(u,c,{weight:1})}t.exports=function(t){r.forEach(t.children(),(function e(n){var i=t.children(n),a=t.node(n);if(i.length&&r.forEach(i,e),r.has(a,"minRank")){a.borderLeft=[],a.borderRight=[];for(var s=a.minRank,u=a.maxRank+1;s<u;++s)o(t,"borderLeft","_bl",n,a,s),o(t,"borderRight","_br",n,a,s)}}))}},function(t,e,n){"use strict";var r=n(4);function i(t){r.forEach(t.nodes(),(function(e){o(t.node(e))})),r.forEach(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 s(t){var e=t.x;t.x=t.y,t.y=e}t.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.forEach(t.nodes(),(function(e){a(t.node(e))})),r.forEach(t.edges(),(function(e){var n=t.edge(e);r.forEach(n.points,a),r.has(n,"y")&&a(n)}))}(t);"lr"!==e&&"rl"!==e||(!function(t){r.forEach(t.nodes(),(function(e){s(t.node(e))})),r.forEach(t.edges(),(function(e){var n=t.edge(e);r.forEach(n.points,s),r.has(n,"x")&&s(n)}))}(t),i(t))}}},function(t,e,n){"use strict";var r=n(4),i=n(512),o=n(513),a=n(514),s=n(518),u=n(519),c=n(13).Graph,l=n(9);function h(t,e,n){return r.map(e,(function(e){return s(t,e,n)}))}function f(t,e){var n=new c;r.forEach(t,(function(t){var i=t.graph().root,o=a(t,i,n,e);r.forEach(o.vs,(function(e,n){t.node(e).order=n})),u(t,n,o.vs)}))}function d(t,e){r.forEach(e,(function(e){r.forEach(e,(function(e,n){t.node(e).order=n}))}))}t.exports=function(t){var e=l.maxRank(t),n=h(t,r.range(1,e+1),"inEdges"),a=h(t,r.range(e-1,-1,-1),"outEdges"),s=i(t);d(t,s);for(var u,c=Number.POSITIVE_INFINITY,p=0,g=0;g<4;++p,++g){f(p%2?n:a,p%4>=2),s=l.buildLayerMatrix(t);var _=o(t,s);_<c&&(g=0,u=r.cloneDeep(s),c=_)}d(t,u)}},function(t,e,n){"use strict";var r=n(4);t.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.forEach(a,(function n(i){if(r.has(e,i))return;e[i]=!0;var a=t.node(i);o[a.rank].push(i),r.forEach(t.successors(i),n)})),o}},function(t,e,n){"use strict";var r=n(4);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.sortBy(r.map(t.outEdges(e),(function(e){return{pos:i[e.w],weight:t.edge(e).weight}})),"pos")})),!0),a=1;a<n.length;)a<<=1;var s=2*a-1;a-=1;var u=r.map(new Array(s),(function(){return 0})),c=0;return r.forEach(o.forEach((function(t){var e=t.pos+a;u[e]+=t.weight;for(var n=0;e>0;)e%2&&(n+=u[e+1]),u[e=e-1>>1]+=t.weight;c+=t.weight*n}))),c}t.exports=function(t,e){for(var n=0,r=1;r<e.length;++r)n+=i(t,e[r-1],e[r]);return n}},function(t,e,n){var r=n(4),i=n(515),o=n(516),a=n(517);t.exports=function t(e,n,s,u){var c=e.children(n),l=e.node(n),h=l?l.borderLeft:void 0,f=l?l.borderRight:void 0,d={};h&&(c=r.filter(c,(function(t){return t!==h&&t!==f})));var p=i(e,c);r.forEach(p,(function(n){if(e.children(n.v).length){var i=t(e,n.v,s,u);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,s);!function(t,e){r.forEach(t,(function(t){t.vs=r.flatten(t.vs.map((function(t){return e[t]?e[t].vs:t})),!0)}))}(g,d);var _=a(g,u);if(h&&(_.vs=r.flatten([h,_.vs,f],!0),e.predecessors(h).length)){var m=e.node(e.predecessors(h)[0]),v=e.node(e.predecessors(f)[0]);r.has(_,"barycenter")||(_.barycenter=0,_.weight=0),_.barycenter=(_.barycenter*_.weight+m.order+v.order)/(_.weight+2),_.weight+=2}return _}},function(t,e,n){var r=n(4);t.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}}))}},function(t,e,n){"use strict";var r=n(4);t.exports=function(t,e){var n={};return r.forEach(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.forEach(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){e.merged||(r.isUndefined(e.barycenter)||r.isUndefined(t.barycenter)||e.barycenter>=t.barycenter)&&function(t,e){var n=0,r=0;t.weight&&(n+=t.barycenter*t.weight,r+=t.weight);e.weight&&(n+=e.barycenter*e.weight,r+=e.weight);t.vs=e.vs.concat(t.vs),t.barycenter=n/r,t.weight=r,t.i=Math.min(e.i,t.i),e.merged=!0}(t,e)}}function i(e){return function(n){n.in.push(e),0==--n.indegree&&t.push(n)}}for(;t.length;){var o=t.pop();e.push(o),r.forEach(o.in.reverse(),n(o)),r.forEach(o.out,i(o))}return r.map(r.filter(e,(function(t){return!t.merged})),(function(t){return r.pick(t,["vs","i","barycenter","weight"])}))}(r.filter(n,(function(t){return!t.indegree})))}},function(t,e,n){var r=n(4),i=n(9);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}t.exports=function(t,e){var n=i.partition(t,(function(t){return r.has(t,"barycenter")})),a=n.lhs,s=r.sortBy(n.rhs,(function(t){return-t.i})),u=[],c=0,l=0,h=0;a.sort((f=!!e,function(t,e){return t.barycenter<e.barycenter?-1:t.barycenter>e.barycenter?1:f?e.i-t.i:t.i-e.i})),h=o(u,s,h),r.forEach(a,(function(t){h+=t.vs.length,u.push(t.vs),c+=t.barycenter*t.weight,l+=t.weight,h=o(u,s,h)}));var f;var d={vs:r.flatten(u,!0)};l&&(d.barycenter=c/l,d.weight=l);return d}},function(t,e,n){var r=n(4),i=n(13).Graph;t.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.forEach(t.nodes(),(function(i){var s=t.node(i),u=t.parent(i);(s.rank===e||s.minRank<=e&&e<=s.maxRank)&&(a.setNode(i),a.setParent(i,u||o),r.forEach(t[n](i),(function(e){var n=e.v===i?e.w:e.v,o=a.edge(n,i),s=r.isUndefined(o)?0:o.weight;a.setEdge(n,i,{weight:t.edge(e).weight+s})})),r.has(s,"minRank")&&a.setNode(i,{borderLeft:s.borderLeft[e],borderRight:s.borderRight[e]}))})),a}},function(t,e,n){var r=n(4);t.exports=function(t,e,n){var i,o={};r.forEach(n,(function(n){for(var r,a,s=t.parent(n);s;){if((r=t.parent(s))?(a=o[r],o[r]=s):(a=i,i=s),a&&a!==s)return void e.setEdge(a,s);s=r}}))}},function(t,e,n){"use strict";var r=n(4),i=n(9),o=n(521).positionX;t.exports=function(t){(function(t){var e=i.buildLayerMatrix(t),n=t.graph().ranksep,o=0;r.forEach(e,(function(e){var i=r.max(r.map(e,(function(e){return t.node(e).height})));r.forEach(e,(function(e){t.node(e).y=o+i/2})),o+=i+n}))})(t=i.asNonCompoundGraph(t)),r.forEach(o(t),(function(e,n){t.node(n).x=e}))}},function(t,e,n){"use strict";var r=n(4),i=n(13).Graph,o=n(9);function a(t,e){var n={};return r.reduce(e,(function(e,i){var o=0,a=0,s=e.length,c=r.last(i);return r.forEach(i,(function(e,l){var h=function(t,e){if(t.node(e).dummy)return r.find(t.predecessors(e),(function(e){return t.node(e).dummy}))}(t,e),f=h?t.node(h).order:s;(h||e===c)&&(r.forEach(i.slice(a,l+1),(function(e){r.forEach(t.predecessors(e),(function(r){var i=t.node(r),a=i.order;!(a<o||f<a)||i.dummy&&t.node(e).dummy||u(n,r,e)}))})),a=l+1,o=f)})),i})),n}function s(t,e){var n={};function i(e,i,o,a,s){var c;r.forEach(r.range(i,o),(function(i){c=e[i],t.node(c).dummy&&r.forEach(t.predecessors(c),(function(e){var r=t.node(e);r.dummy&&(r.order<a||r.order>s)&&u(n,e,c)}))}))}return r.reduce(e,(function(e,n){var o,a=-1,s=0;return r.forEach(n,(function(r,u){if("border"===t.node(r).dummy){var c=t.predecessors(r);c.length&&(o=t.node(c[0]).order,i(n,s,u,a,o),s=u,a=o)}i(n,s,n.length,o,e.length)})),n})),n}function u(t,e,n){if(e>n){var r=e;e=n,n=r}var i=t[e];i||(t[e]=i={}),i[n]=!0}function c(t,e,n){if(e>n){var i=e;e=n,n=i}return r.has(t[e],n)}function l(t,e,n,i){var o={},a={},s={};return r.forEach(e,(function(t){r.forEach(t,(function(t,e){o[t]=t,a[t]=t,s[t]=e}))})),r.forEach(e,(function(t){var e=-1;r.forEach(t,(function(t){var u=i(t);if(u.length)for(var l=((u=r.sortBy(u,(function(t){return s[t]}))).length-1)/2,h=Math.floor(l),f=Math.ceil(l);h<=f;++h){var d=u[h];a[t]===t&&e<s[d]&&!c(n,t,d)&&(a[d]=t,a[t]=o[t]=o[d],e=s[d])}}))})),{root:o,align:a}}function h(t,e,n,o,a){var s={},u=function(t,e,n,o){var a=new i,s=t.graph(),u=function(t,e,n){return function(i,o,a){var s,u=i.node(o),c=i.node(a),l=0;if(l+=u.width/2,r.has(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":s=-u.width/2;break;case"r":s=u.width/2}if(s&&(l+=n?s:-s),s=0,l+=(u.dummy?e:t)/2,l+=(c.dummy?e:t)/2,l+=c.width/2,r.has(c,"labelpos"))switch(c.labelpos.toLowerCase()){case"l":s=c.width/2;break;case"r":s=-c.width/2}return s&&(l+=n?s:-s),s=0,l}}(s.nodesep,s.edgesep,o);return r.forEach(e,(function(e){var i;r.forEach(e,(function(e){var r=n[e];if(a.setNode(r),i){var o=n[i],s=a.edge(o,r);a.setEdge(o,r,Math.max(u(t,e,i),s||0))}i=e}))})),a}(t,e,n,a),c=a?"borderLeft":"borderRight";function l(t,e){for(var n=u.nodes(),r=n.pop(),i={};r;)i[r]?t(r):(i[r]=!0,n.push(r),n=n.concat(e(r))),r=n.pop()}return l((function(t){s[t]=u.inEdges(t).reduce((function(t,e){return Math.max(t,s[e.v]+u.edge(e))}),0)}),u.predecessors.bind(u)),l((function(e){var n=u.outEdges(e).reduce((function(t,e){return Math.min(t,s[e.w]-u.edge(e))}),Number.POSITIVE_INFINITY),r=t.node(e);n!==Number.POSITIVE_INFINITY&&r.borderType!==c&&(s[e]=Math.max(s[e],n))}),u.successors.bind(u)),r.forEach(o,(function(t){s[t]=s[n[t]]})),s}function f(t,e){return r.minBy(r.values(e),(function(e){var n=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;return r.forIn(e,(function(e,r){var o=function(t,e){return t.node(e).width}(t,r)/2;n=Math.max(e+o,n),i=Math.min(e-o,i)})),n-i}))}function d(t,e){var n=r.values(e),i=r.min(n),o=r.max(n);r.forEach(["u","d"],(function(n){r.forEach(["l","r"],(function(a){var s,u=n+a,c=t[u];if(c!==e){var l=r.values(c);(s="l"===a?i-r.min(l):o-r.max(l))&&(t[u]=r.mapValues(c,(function(t){return t+s})))}}))}))}function p(t,e){return r.mapValues(t.ul,(function(n,i){if(e)return t[e.toLowerCase()][i];var o=r.sortBy(r.map(t,i));return(o[1]+o[2])/2}))}t.exports={positionX:function(t){var e,n=o.buildLayerMatrix(t),i=r.merge(a(t,n),s(t,n)),u={};r.forEach(["u","d"],(function(o){e="u"===o?n:r.values(n).reverse(),r.forEach(["l","r"],(function(n){"r"===n&&(e=r.map(e,(function(t){return r.values(t).reverse()})));var a=("u"===o?t.predecessors:t.successors).bind(t),s=l(t,e,i,a),c=h(t,e,s.root,s.align,"r"===n);"r"===n&&(c=r.mapValues(c,(function(t){return-t}))),u[o+n]=c}))}));var c=f(t,u);return d(u,c),p(u,t.graph().align)},findType1Conflicts:a,findType2Conflicts:s,addConflict:u,hasConflict:c,verticalAlignment:l,horizontalCompaction:h,alignCoordinates:d,findSmallestWidthAlignment:f,balance:p}},function(t,e,n){var r=n(4),i=n(9),o=n(13).Graph;t.exports={debugOrdering:function(t){var e=i.buildLayerMatrix(t),n=new o({compound:!0,multigraph:!0}).setGraph({});return r.forEach(t.nodes(),(function(e){n.setNode(e,{label:e}),n.setParent(e,"layer"+t.node(e).rank)})),r.forEach(t.edges(),(function(t){n.setEdge(t.v,t.w,{},t.name)})),r.forEach(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}}},function(t,e){t.exports="0.8.5"},function(t,e,n){"use strict";function r(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}Object.defineProperty(e,"__esModule",{value:!0}),r(n(1)),r(n(525)),r(n(51)),r(n(22)),r(n(2)),r(n(83)),r(n(526))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.Column=class{constructor(t,e){this.headerName=t,this.field=e||t}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(1),i=n(2),o=n(22),a=n(19),s=n(527);function u(t,e){let n={},r={};for(let i=0;i<e.length;++i){let o=e[i];n[o.field]||(n[o.field]=0),r[o.field]||(r[o.field]=0);for(let e=0;e<t.length;++e)t[e][o.field]&&(t[e][o.field].value&&(t[e][o.field]=t[e][o.field].value),n[o.field]=Math.max(n[o.field],t[e][o.field]),r[o.field]+=t[e][o.field])}for(let i=0;i<e.length;++i){let o=e[i];for(let e=0;e<t.length;++e)t[e][o.field]={value:t[e][o.field],columnMax:n[o.field],total:r[o.field]}}}function c(t){let e=t.value;e.value=e.value?e.value:0;let n=document.createElement("div"),r=e.columnMax?e.value/e.columnMax*100:0,i=e.total?e.value/e.total*100:0;return n.className="div-percent-bar",n.style.height="25px",n.style.backgroundColor="#B3E5FC",n.style.width=r+"%",t.colDef.showAsPercentage?(n.innerHTML=i.toFixed(2)+"%",n.title=i.toFixed(2)+"% (Value: "+e.value+")"):(n.innerHTML=e.value.toFixed(2),n.title="Value: "+e.value+" ("+i.toFixed(2)+"%)"),n}function l(t,e,n,r,i){return t.value-e.value}e.percentCellRenderer=function(t){var e=t.value;null==e&&(e=0);var n=document.createElement("div");return n.className="div-percent-bar",n.style.width=e+"%",n.style.height="25px",n.style.backgroundColor="#B3E5FC",n.innerHTML=e.toFixed(2)+"%",n},e.computeMaxAndPercentage=u,e.valueCellRenderer=c,e.valueComparator=l,e.menuItemShowAsPercentage={title:"Display Percentage",action:function(t,n,r){let i=n.colDef.contextMenuItems.indexOf(e.menuItemShowAsPercentage);n.colDef.contextMenuItems[i]=e.menuItemShowAsTotal,n.colDef.showAsPercentage=!0,n.api.refreshCells({columns:[n.colDef],force:!0})}},e.menuItemShowAsTotal={title:"Display Raw Values",action:function(t,n,r){n.colDef.contextMenuItems.indexOf(e.menuItemShowAsTotal);n.colDef.contextMenuItems=[e.menuItemShowAsPercentage],n.colDef.showAsPercentage=!1,n.api.refreshCells({columns:[n.colDef],force:!0})}};class h{constructor(t,e,n,o={}){this._element=t,this._renderer=e,this._options=o,this._disableCallbacks=!1,n&&(this._div=document.querySelector(n));let a=this,s=function(t,e,n){if(a._disableCallbacks)return;let r=a._element,i=r.gridOptions;if(n){let o=i.columnApi.getAllColumns();if(o&&o.length>0){let i=o[0].colDef.field;n({caller:r,selection:t.node.data[i],event:e,data:{row:t}})}}};this.onRowFocusDefaultCallback=function(t){s(t,r.EventType.HoverStart,a._element.onHover)},this.onRowUnfocusDefaultCallback=function(t){s(t,r.EventType.HoverEnd,a._element.onHover)},this.onRowSelectedDefaultCallback=function(t){let e=t.node.isSelected()?r.EventType.SelectAdd:r.EventType.SelectRemove;s(t,e,a._element.onClick)},this.api={select:a.select,hover:a.select},this.keyboardSelectionFocus=function(t){var e=t.previousCellDef,n=t.nextCellDef;let o=a._element.gridOptions.columnApi.getAllColumns();if(o&&o.length>0){let s=a._element.gridOptions.selectionKey?a._element.gridOptions.selectionKey:o[0].colDef.field,u=function(o){return e=t.previousCellDef,a._element.gridOptions.api.forEachNode(e=>{o===e.rowIndex?e.setSelected(!0):t.event.shiftKey||a._renderer.focus(a._element,{event:r.EventType.HoverEnd,selection:i.getSelectionName(e.data[s])})}),n};switch(t.key){case 40:return u(e.rowIndex+1);case 38:return u(e.rowIndex-1);case 37:case 39:return n;default:throw"this will never happen, navigation is always on of the 4 keys above"}}}}setDiv(t){this._div=t}select(t){let e=this,n=t.selection,o=this._element.gridOptions,a=o.columnApi.getAllColumns();if(e._disableCallbacks=!0,a&&a.length>0){let s=o.selectionKey?o.selectionKey:a[0].colDef.field,u=t.selectionKey?t.selectionKey:s;t.event===r.EventType.SelectAdd||t.event===r.EventType.HoverStart?(this._prevSelection=t.selection,o.api.forEachNode((function(t){i.getSelectionName(t.data[u])===i.getSelectionName(n)&&(t.setSelected(!0),e._element.gridOptions.autoScrollToSelection&&o.api.ensureNodeVisible(t,"middle"))}))):t.event===r.EventType.SelectClear||t.event===r.EventType.HoverClear?o.api.deselectAll():(t.selection||(n=e._prevSelection),o.api.forEachNode((function(r){i.getSelectionName(r.data[u])===i.getSelectionName(n)&&(r.setSelected(!1),t.selection===e._prevSelection&&(e._prevSelection=void 0))})))}e._disableCallbacks=!1}setContextMenuItems(t,e){if(t){e||(e=[]);for(let n=0;n<t.length;++n){let r=t[n];r.onCellContextMenu=function(t){a.showContextMenu(t.event,t,t.colDef.contextMenuItems?e.concat(t.colDef.contextMenuItems):e)},r.children&&this.setContextMenuItems(r.children,e)}}}invalidate(t={}){let n=this,i=this._element.gridOptions;i.suppressAsyncEvents=!0,i.animateRows=void 0===i.animateRows||i.animateRows,i.rowSelection=void 0!==i.rowSelection?i.rowSelection:"multiple",i.rowDeselection=void 0===i.rowDeselection||i.rowDeselection,i.suppressScrollOnNewData=void 0===i.suppressScrollOnNewData||i.suppressScrollOnNewData,i.suppressPropertyNamesCheck=void 0===i.suppressPropertyNamesCheck||i.suppressPropertyNamesCheck,i.defaultColDef=void 0!==i.defaultColDef?i.defaultColDef:{},i.defaultColDef.sortable=void 0===i.defaultColDef.sortable||i.defaultColDef.sortable,i.defaultColDef.resizable=void 0===i.defaultColDef.resizable||i.defaultColDef.resizable,i.defaultColDef.filter=void 0===i.defaultColDef.filter||i.defaultColDef.filter,i.autoScrollToSelection=void 0===i.autoScrollToSelection||i.autoScrollToSelection;let o=function(t,e,r){return t?function(e){n._disableCallbacks||t({caller:n._element,event:r,data:{row:e.node.data}})}:e};i.onCellMouseOver=o(i.onCellMouseOver,this.onRowFocusDefaultCallback,r.EventType.HoverStart),i.cellMouseOut=o(i.onCellMouseOver,this.onRowUnfocusDefaultCallback,r.EventType.HoverEnd),i.onRowClicked=o(i.onRowClicked,void 0,void 0),i.onRowDoubleClicked=o(i.onRowDoubleClicked,void 0,void 0),i.onClick&&(i.onRowClicked=o(i.onClick,void 0,void 0)),i.onDoubleClick&&(i.onRowDoubleClicked=o(i.onDoubleClick,void 0,void 0)),i.onRowSelected?(i.userOnRowSelected||(i.userOnRowSelected=i.onRowSelected),i.onRowSelected=function(t){n._disableCallbacks||i.userOnRowSelected({caller:n._element,data:{row:t.node.data,isSelected:t.node.selected},event:t.node.selected?r.EventType.SelectAdd:r.EventType.SelectRemove})}):i.onRowSelected=this.onRowSelectedDefaultCallback;let a=!1;if(i.rowData&&!i.getNodeChildDetails)for(let t=0;t<i.rowData.length;++t){let e=i.rowData[t];if(e.children&&e.children.length>0){a=!0;break}}if(i.columnDefs){let t=[];for(let r=0;r<i.columnDefs.length;++r){let o=i.columnDefs[r];if(o.canShowPercentage||o.showAsPercentage||o.showAsBar){t.push(o),o.cellRenderer=c,o.comparator=l,o.contextMenuItems||(o.contextMenuItems=[]);let n=0;o.showAsPercentage?(n=o.contextMenuItems.indexOf(e.menuItemShowAsPercentage),-1!==n?o.contextMenuItems[r]=e.menuItemShowAsTotal:(n=o.contextMenuItems.indexOf(e.menuItemShowAsTotal),-1===n&&o.contextMenuItems.push(e.menuItemShowAsTotal))):o.canShowPercentage&&(n=o.contextMenuItems.indexOf(e.menuItemShowAsTotal),-1!==n?o.contextMenuItems[r]=e.menuItemShowAsPercentage:(n=o.contextMenuItems.indexOf(e.menuItemShowAsPercentage),-1===n&&o.contextMenuItems.push(e.menuItemShowAsPercentage)))}if(o.onCellClicked){let t=o.onCellClicked;o.onCellClicked=function(e){t({caller:n._element,data:{cell:e}})}}if(o.onCellDoubleClicked){let t=o.onCellDoubleClicked;o.onCellDoubleClicked=function(e){t({caller:n._element,data:{cell:e}})}}}if(a&&i.columnDefs.length>0){let t=i.columnDefs[0];t.cellRenderer="agGroupCellRenderer",t.cellRendererParams={innerRenderer:e=>e.data[t.field],suppressCount:!0},i.getNodeChildDetails=e=>e.children?{group:!0,expanded:e.expanded,children:e.children,key:e[t.field]}:null}t.length>0&&u(i.rowData,t)}i.enableSingleKeyboardSelection&&(i.navigateToNextCell=this.keyboardSelectionFocus);let h=null==i.contextMenuItems;if(i.columnDefs)for(let t=0;h&&t<i.columnDefs.length;++t){i.columnDefs[t].contextMenuItems&&(h=!1)}for(h||this.setContextMenuItems(i.columnDefs,i.contextMenuItems);this._div.firstChild;)this._div.removeChild(this._div.firstChild);this._element.api||(this._element.api={select:void 0,hover:void 0}),this._element.api.select=function(t){n.select(t)},this._element.api.hover=this._element.api.select,new s.Grid(this._div,this._element.gridOptions)}}e.AgGridRenderer=class{constructor(t,e={},n=new o.ColorManager){this.invalidate=this.render,this._parent=t,this._rendererMap=new WeakMap,this._options=e,this._colorMgr=n}getColorManager(){return this._colorMgr}setOnRenderCallback(t){this.onRender=t}setOptions(t){for(let e in t)this._options[e]=t[e]}hover(t,e){this.focus(t,e)}focus(t,e){console.debug("currently no focus events can be created for the grid")}select(t,e){if(this._rendererMap.has(t))return this._rendererMap.get(t).api.select(e)}setDiv(t,e){this._rendererMap.has(t)||t.type===r.UIType.Grid&&this._rendererMap.set(t,new h(t,this)),this._rendererMap.has(t)&&this._rendererMap.get(t).setDiv(e)}render(t,e={}){t.renderer=this,this._rendererMap.has(t)||t.type===r.UIType.Grid&&this._rendererMap.set(t,new h(t,this,this._parent)),this._rendererMap.has(t)&&(this._rendererMap.get(t).invalidate(e),this.onRender&&this.onRender(t,e))}destroy(t){this._rendererMap.delete(t)}getOptions(){return this._options}}},function(t,e){t.exports=n},function(t,e,n){"use strict";function r(){}n.r(e);var i=function(t){return null==t?r:function(){return this.querySelector(t)}};function o(){return[]}var a=function(t){return new Array(t.length)};function s(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}s.prototype={constructor:s,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function u(t,e,n,r,i,o){for(var a,u=0,c=e.length,l=o.length;u<l;++u)(a=e[u])?(a.__data__=o[u],r[u]=a):n[u]=new s(t,o[u]);for(;u<c;++u)(a=e[u])&&(i[u]=a)}function c(t,e,n,r,i,o,a){var u,c,l,h={},f=e.length,d=o.length,p=new Array(f);for(u=0;u<f;++u)(c=e[u])&&(p[u]=l="$"+a.call(c,c.__data__,u,e),l in h?i[u]=c:h[l]=c);for(u=0;u<d;++u)(c=h[l="$"+a.call(t,o[u],u,o)])?(r[u]=c,c.__data__=o[u],h[l]=null):n[u]=new s(t,o[u]);for(u=0;u<f;++u)(c=e[u])&&h[p[u]]===c&&(i[u]=c)}function l(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}var h="http://www.w3.org/1999/xhtml",f={svg:"http://www.w3.org/2000/svg",xhtml:h,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},d=function(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),f.hasOwnProperty(e)?{space:f[e],local:t}:t};function p(t){return function(){this.removeAttribute(t)}}function g(t){return function(){this.removeAttributeNS(t.space,t.local)}}function _(t,e){return function(){this.setAttribute(t,e)}}function m(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function v(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function y(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}var x=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function b(t){return function(){this.style.removeProperty(t)}}function w(t,e,n){return function(){this.style.setProperty(t,e,n)}}function M(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function k(t,e){return t.style.getPropertyValue(e)||x(t).getComputedStyle(t,null).getPropertyValue(e)}function T(t){return function(){delete this[t]}}function S(t,e){return function(){this[t]=e}}function C(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function A(t){return t.trim().split(/^|\s+/)}function E(t){return t.classList||new D(t)}function D(t){this._node=t,this._names=A(t.getAttribute("class")||"")}function R(t,e){for(var n=E(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function N(t,e){for(var n=E(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function I(t){return function(){R(this,t)}}function V(t){return function(){N(this,t)}}function P(t,e){return function(){(e.apply(this,arguments)?R:N)(this,t)}}D.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function L(){this.textContent=""}function O(t){return function(){this.textContent=t}}function j(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function B(){this.innerHTML=""}function H(t){return function(){this.innerHTML=t}}function z(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function F(){this.nextSibling&&this.parentNode.appendChild(this)}function Y(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function G(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===h&&e.documentElement.namespaceURI===h?e.createElement(t):e.createElementNS(n,t)}}function U(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}var X=function(t){var e=d(t);return(e.local?U:G)(e)};function W(){return null}function q(){var t=this.parentNode;t&&t.removeChild(this)}function K(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function $(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}var Z={},Q=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(Z={mouseenter:"mouseover",mouseleave:"mouseout"}));function J(t,e,n){return t=tt(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function tt(t,e,n){return function(r){var i=Q;Q=r;try{t.call(this,this.__data__,e,n)}finally{Q=i}}}function et(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function nt(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,o=e.length;r<o;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.capture);++i?e.length=i:delete this.__on}}}function rt(t,e,n){var r=Z.hasOwnProperty(t.type)?J:tt;return function(i,o,a){var s,u=this.__on,c=r(e,o,a);if(u)for(var l=0,h=u.length;l<h;++l)if((s=u[l]).type===t.type&&s.name===t.name)return this.removeEventListener(s.type,s.listener,s.capture),this.addEventListener(s.type,s.listener=c,s.capture=n),void(s.value=e);this.addEventListener(t.type,c,n),s={type:t.type,name:t.name,value:e,listener:c,capture:n},u?u.push(s):this.__on=[s]}}function it(t,e,n){var r=x(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function ot(t,e){return function(){return it(this,t,e)}}function at(t,e){return function(){return it(this,t,e.apply(this,arguments))}}var st=[null];function ut(t,e){this._groups=t,this._parents=e}function ct(){return new ut([[document.documentElement]],st)}ut.prototype=ct.prototype={constructor:ut,select:function(t){"function"!=typeof t&&(t=i(t));for(var e=this._groups,n=e.length,r=new Array(n),o=0;o<n;++o)for(var a,s,u=e[o],c=u.length,l=r[o]=new Array(c),h=0;h<c;++h)(a=u[h])&&(s=t.call(a,a.__data__,h,u))&&("__data__"in a&&(s.__data__=a.__data__),l[h]=s);return new ut(r,this._parents)},selectAll:function(t){var e;"function"!=typeof t&&(t=null==(e=t)?o:function(){return this.querySelectorAll(e)});for(var n=this._groups,r=n.length,i=[],a=[],s=0;s<r;++s)for(var u,c=n[s],l=c.length,h=0;h<l;++h)(u=c[h])&&(i.push(t.call(u,u.__data__,h,c)),a.push(u));return new ut(i,a)},filter:function(t){var e;"function"!=typeof t&&(e=t,t=function(){return this.matches(e)});for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o)for(var a,s=n[o],u=s.length,c=i[o]=[],l=0;l<u;++l)(a=s[l])&&t.call(a,a.__data__,l,s)&&c.push(a);return new ut(i,this._parents)},data:function(t,e){if(!t)return _=new Array(this.size()),f=-1,this.each((function(t){_[++f]=t})),_;var n,r=e?c:u,i=this._parents,o=this._groups;"function"!=typeof t&&(n=t,t=function(){return n});for(var a=o.length,s=new Array(a),l=new Array(a),h=new Array(a),f=0;f<a;++f){var d=i[f],p=o[f],g=p.length,_=t.call(d,d&&d.__data__,f,i),m=_.length,v=l[f]=new Array(m),y=s[f]=new Array(m);r(d,p,v,y,h[f]=new Array(g),_,e);for(var x,b,w=0,M=0;w<m;++w)if(x=v[w]){for(w>=M&&(M=w+1);!(b=y[M])&&++M<m;);x._next=b||null}}return(s=new ut(s,i))._enter=l,s._exit=h,s},enter:function(){return new ut(this._enter||this._groups.map(a),this._parents)},exit:function(){return new ut(this._exit||this._groups.map(a),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,o=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=e&&(i=e(i)),null==n?o.remove():n(o),r&&i?r.merge(i).order():i},merge:function(t){for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var u,c=e[s],l=n[s],h=c.length,f=a[s]=new Array(h),d=0;d<h;++d)(u=c[d]||l[d])&&(f[d]=u);for(;s<r;++s)a[s]=e[s];return new ut(a,this._parents)},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],o=i.length-1,a=i[o];--o>=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=l);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a,s=n[o],u=s.length,c=i[o]=new Array(u),h=0;h<u;++h)(a=s[h])&&(c[h]=a);c.sort(e)}return new ut(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),e=-1;return this.each((function(){t[++e]=this})),t},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null},size:function(){var t=0;return this.each((function(){++t})),t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,o=e[n],a=0,s=o.length;a<s;++a)(i=o[a])&&t.call(i,i.__data__,a,o);return this},attr:function(t,e){var n=d(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?g:p:"function"==typeof e?n.local?y:v:n.local?m:_)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?b:"function"==typeof e?M:w)(t,e,null==n?"":n)):k(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?T:"function"==typeof e?C:S)(t,e)):this.node()[t]},classed:function(t,e){var n=A(t+"");if(arguments.length<2){for(var r=E(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?P:e?I:V)(n,e))},text:function(t){return arguments.length?this.each(null==t?L:("function"==typeof t?j:O)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?B:("function"==typeof t?z:H)(t)):this.node().innerHTML},raise:function(){return this.each(F)},lower:function(){return this.each(Y)},append:function(t){var e="function"==typeof t?t:X(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:X(t),r=null==e?W:"function"==typeof e?e:i(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(q)},clone:function(t){return this.select(t?$:K)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,o=et(t+""),a=o.length;if(!(arguments.length<2)){for(s=e?rt:nt,null==n&&(n=!1),r=0;r<a;++r)this.each(s(o[r],e,n));return this}var s=this.node().__on;if(s)for(var u,c=0,l=s.length;c<l;++c)for(r=0,u=s[c];r<a;++r)if((i=o[r]).type===u.type&&i.name===u.name)return u.value},dispatch:function(t,e){return this.each(("function"==typeof e?at:ot)(t,e))}};var lt=function(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]},ht=function(t){return(t=lt(Math.abs(t)))?t[1]:NaN},ft=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function dt(t){if(!(e=ft.exec(t)))throw new Error("invalid format: "+t);var e;return new pt({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function pt(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}dt.prototype=pt.prototype,pt.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var gt,_t,mt,vt,yt=function(t,e){var n=lt(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")},xt={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return yt(100*t,e)},r:yt,s:function(t,e){var n=lt(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(gt=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+lt(t,Math.max(0,e+o-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}},bt=function(t){return t},wt=Array.prototype.map,Mt=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"],kt=function(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?bt:(e=wt.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,o=[],a=0,s=e[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),o.push(t.substring(i-=s,i+s)),!((u+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",a=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?bt:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(wt.call(t.numerals,String)),u=void 0===t.percent?"%":t.percent+"",c=void 0===t.minus?"-":t.minus+"",l=void 0===t.nan?"NaN":t.nan+"";function h(t){var e=(t=dt(t)).fill,n=t.align,h=t.sign,f=t.symbol,d=t.zero,p=t.width,g=t.comma,_=t.precision,m=t.trim,v=t.type;"n"===v?(g=!0,v="g"):xt[v]||(void 0===_&&(_=12),m=!0,v="g"),(d||"0"===e&&"="===n)&&(d=!0,e="0",n="=");var y="$"===f?i:"#"===f&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",x="$"===f?o:/[%p]/.test(v)?u:"",b=xt[v],w=/[defgprs%]/.test(v);function M(t){var i,o,u,f=y,M=x;if("c"===v)M=b(t)+M,t="";else{var k=(t=+t)<0;if(t=isNaN(t)?l:b(Math.abs(t),_),m&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(!+t[r])break t;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),k&&0==+t&&(k=!1),f=(k?"("===h?h:c:"-"===h||"("===h?"":h)+f,M=("s"===v?Mt[8+gt/3]:"")+M+(k&&"("===h?")":""),w)for(i=-1,o=t.length;++i<o;)if(48>(u=t.charCodeAt(i))||u>57){M=(46===u?a+t.slice(i+1):t.slice(i))+M,t=t.slice(0,i);break}}g&&!d&&(t=r(t,1/0));var T=f.length+t.length+M.length,S=T<p?new Array(p-T+1).join(e):"";switch(g&&d&&(t=r(S+t,S.length?p-M.length:1/0),S=""),n){case"<":t=f+t+M+S;break;case"=":t=f+S+t+M;break;case"^":t=S.slice(0,T=S.length>>1)+f+t+M+S.slice(T);break;default:t=S+f+t+M}return s(t)}return _=void 0===_?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_)),M.toString=function(){return t+""},M}return{format:h,formatPrefix:function(t,e){var n=h(((t=dt(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(ht(e)/3))),i=Math.pow(10,-r),o=Mt[8+r/3];return function(t){return n(i*t)+o}}}};_t=kt({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),mt=_t.format,vt=_t.formatPrefix;var Tt={value:function(){}};function St(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new Ct(r)}function Ct(t){this._=t}function At(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function Et(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function Dt(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Tt,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}Ct.prototype=St.prototype={constructor:Ct,on:function(t,e){var n,r=this._,i=At(t+"",r),o=-1,a=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o<a;)if(n=(t=i[o]).type)r[n]=Dt(r[n],t.name,e);else if(null==e)for(n in r)r[n]=Dt(r[n],t.name,null);return this}for(;++o<a;)if((n=(t=i[o]).type)&&(n=Et(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Ct(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,n=(r=this._[t]).length;o<n;++o)r[o].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};var Rt=St,Nt=n(0);function It(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}n(50);var Vt=Array.prototype,Pt=Vt.map,Lt=Vt.slice;var Ot=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t};function jt(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Bt(){}var Ht="\\s*([+-]?\\d+)\\s*",zt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ft="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Yt=/^#([0-9a-f]{3,8})$/,Gt=new RegExp("^rgb\\("+[Ht,Ht,Ht]+"\\)$"),Ut=new RegExp("^rgb\\("+[Ft,Ft,Ft]+"\\)$"),Xt=new RegExp("^rgba\\("+[Ht,Ht,Ht,zt]+"\\)$"),Wt=new RegExp("^rgba\\("+[Ft,Ft,Ft,zt]+"\\)$"),qt=new RegExp("^hsl\\("+[zt,Ft,Ft]+"\\)$"),Kt=new RegExp("^hsla\\("+[zt,Ft,Ft,zt]+"\\)$"),$t={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Zt(){return this.rgb().formatHex()}function Qt(){return this.rgb().formatRgb()}function Jt(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Yt.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?te(e):3===n?new ie(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?new ie(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?new ie(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Gt.exec(t))?new ie(e[1],e[2],e[3],1):(e=Ut.exec(t))?new ie(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Xt.exec(t))?ee(e[1],e[2],e[3],e[4]):(e=Wt.exec(t))?ee(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=qt.exec(t))?ue(e[1],e[2]/100,e[3]/100,1):(e=Kt.exec(t))?ue(e[1],e[2]/100,e[3]/100,e[4]):$t.hasOwnProperty(t)?te($t[t]):"transparent"===t?new ie(NaN,NaN,NaN,0):null}function te(t){return new ie(t>>16&255,t>>8&255,255&t,1)}function ee(t,e,n,r){return r<=0&&(t=e=n=NaN),new ie(t,e,n,r)}function ne(t){return t instanceof Bt||(t=Jt(t)),t?new ie((t=t.rgb()).r,t.g,t.b,t.opacity):new ie}function re(t,e,n,r){return 1===arguments.length?ne(t):new ie(t,e,n,null==r?1:r)}function ie(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function oe(){return"#"+se(this.r)+se(this.g)+se(this.b)}function ae(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function se(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function ue(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new le(t,e,n,r)}function ce(t){if(t instanceof le)return new le(t.h,t.s,t.l,t.opacity);if(t instanceof Bt||(t=Jt(t)),!t)return new le;if(t instanceof le)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(a=e===o?(n-r)/s+6*(n<r):n===o?(r-e)/s+2:(e-n)/s+4,s/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new le(a,s,u,t.opacity)}function le(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function he(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function fe(t,e,n,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*n+(1+3*t+3*o-3*a)*r+a*i)/6}Ot(Bt,Jt,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Zt,formatHex:Zt,formatHsl:function(){return ce(this).formatHsl()},formatRgb:Qt,toString:Qt}),Ot(ie,re,jt(Bt,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new ie(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new ie(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:oe,formatHex:oe,formatRgb:ae,toString:ae})),Ot(le,(function(t,e,n,r){return 1===arguments.length?ce(t):new le(t,e,n,null==r?1:r)}),jt(Bt,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new le(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new le(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new ie(he(t>=240?t-240:t+120,i,r),he(t,i,r),he(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var de=function(t){return function(){return t}};function pe(t,e){return function(n){return t+n*e}}function ge(t){return 1==(t=+t)?_e:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):de(isNaN(e)?n:e)}}function _e(t,e){var n=e-t;return n?pe(t,n):de(isNaN(t)?e:t)}var me=function t(e){var n=ge(e);function r(t,e){var r=n((t=re(t)).r,(e=re(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),a=_e(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=o(e),t.opacity=a(e),t+""}}return r.gamma=t,r}(1);function ve(t){return function(e){var n,r,i=e.length,o=new Array(i),a=new Array(i),s=new Array(i);for(n=0;n<i;++n)r=re(e[n]),o[n]=r.r||0,a[n]=r.g||0,s[n]=r.b||0;return o=t(o),a=t(a),s=t(s),r.opacity=1,function(t){return r.r=o(t),r.g=a(t),r.b=s(t),r+""}}}ve((function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],o=t[r+1],a=r>0?t[r-1]:2*i-o,s=r<e-1?t[r+2]:2*o-i;return fe((n-r/e)*e,a,i,o,s)}})),ve((function(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],o=t[r%e],a=t[(r+1)%e],s=t[(r+2)%e];return fe((n-r/e)*e,i,o,a,s)}}));var ye=function(t,e){e||(e=[]);var n,r=t?Math.min(e.length,t.length):0,i=e.slice();return function(o){for(n=0;n<r;++n)i[n]=t[n]*(1-o)+e[n]*o;return i}};function xe(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function be(t,e){var n,r=e?e.length:0,i=t?Math.min(r,t.length):0,o=new Array(i),a=new Array(r);for(n=0;n<i;++n)o[n]=Ae(t[n],e[n]);for(;n<r;++n)a[n]=e[n];return function(t){for(n=0;n<i;++n)a[n]=o[n](t);return a}}var we=function(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}},Me=n(49),ke=function(t,e){var n,r={},i={};for(n in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)n in t?r[n]=Ae(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}},Te=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Se=new RegExp(Te.source,"g");var Ce=function(t,e){var n,r,i,o=Te.lastIndex=Se.lastIndex=0,a=-1,s=[],u=[];for(t+="",e+="";(n=Te.exec(t))&&(r=Se.exec(e));)(i=r.index)>o&&(i=e.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,u.push({i:a,x:Object(Me.a)(n,r)})),o=Se.lastIndex;return o<e.length&&(i=e.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?u[0]?function(t){return function(e){return t(e)+""}}(u[0].x):function(t){return function(){return t}}(e):(e=u.length,function(t){for(var n,r=0;r<e;++r)s[(n=u[r]).i]=n.x(t);return s.join("")})},Ae=function(t,e){var n,r=typeof e;return null==e||"boolean"===r?de(e):("number"===r?Me.a:"string"===r?(n=Jt(e))?(e=n,me):Ce:e instanceof Jt?me:e instanceof Date?we:xe(e)?ye:Array.isArray(e)?be:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?ke:Me.a)(t,e)},Ee=function(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}},De=function(t){return+t},Re=[0,1];function Ne(t){return t}function Ie(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:(n=isNaN(e)?NaN:.5,function(){return n});var n}function Ve(t){var e,n=t[0],r=t[t.length-1];return n>r&&(e=n,n=r,r=e),function(t){return Math.max(n,Math.min(r,t))}}function Pe(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=Ie(i,r),o=n(a,o)):(r=Ie(r,i),o=n(o,a)),function(t){return o(r(t))}}function Le(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),o=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<r;)i[a]=Ie(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(e){var n=Object(Nt.b)(t,e,1,r)-1;return o[n](i[n](e))}}function Oe(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function je(){var t,e,n,r,i,o,a=Re,s=Re,u=Ae,c=Ne;function l(){return r=Math.min(a.length,s.length)>2?Le:Pe,i=o=null,h}function h(e){return isNaN(e=+e)?n:(i||(i=r(a.map(t),s,u)))(t(c(e)))}return h.invert=function(n){return c(e((o||(o=r(s,a.map(t),Me.a)))(n)))},h.domain=function(t){return arguments.length?(a=Pt.call(t,De),c===Ne||(c=Ve(a)),l()):a.slice()},h.range=function(t){return arguments.length?(s=Lt.call(t),l()):s.slice()},h.rangeRound=function(t){return s=Lt.call(t),u=Ee,l()},h.clamp=function(t){return arguments.length?(c=t?Ve(a):Ne,h):c!==Ne},h.interpolate=function(t){return arguments.length?(u=t,l()):u},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,r){return t=n,e=r,l()}}function Be(t,e){return je()(t,e)}var He=function(t,e,n,r){var i,o=Object(Nt.j)(t,e,n);switch((r=dt(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(ht(e)/3)))-ht(Math.abs(t)))}(o,a))||(r.precision=i),vt(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,ht(e)-ht(t))+1}(o,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(t){return Math.max(0,-ht(Math.abs(t)))}(o))||(r.precision=i-2*("%"===r.type))}return mt(r)};function ze(t){var e=t.domain;return t.ticks=function(t){var n=e();return Object(Nt.k)(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return He(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i=e(),o=0,a=i.length-1,s=i[o],u=i[a];return u<s&&(r=s,s=u,u=r,r=o,o=a,a=r),(r=Object(Nt.i)(s,u,n))>0?(s=Math.floor(s/r)*r,u=Math.ceil(u/r)*r,r=Object(Nt.i)(s,u,n)):r<0&&(s=Math.ceil(s*r)/r,u=Math.floor(u*r)/r,r=Object(Nt.i)(s,u,n)),r>0?(i[o]=Math.floor(s/r)*r,i[a]=Math.ceil(u/r)*r,e(i)):r<0&&(i[o]=Math.ceil(s*r)/r,i[a]=Math.floor(u*r)/r,e(i)),t},t}function Fe(){var t=Be(Ne,Ne);return t.copy=function(){return Oe(t,Fe())},It.apply(t,arguments),ze(t)}var Ye=new Date,Ge=new Date;function Ue(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=function(e){return t(e=new Date(+e)),e},i.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},i.round=function(t){var e=i(t),n=i.ceil(t);return t-e<n-t?e:n},i.offset=function(t,n){return e(t=new Date(+t),null==n?1:Math.floor(n)),t},i.range=function(n,r,o){var a,s=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return s;do{s.push(a=new Date(+n)),e(n,o),t(n)}while(a<n&&n<r);return s},i.filter=function(n){return Ue((function(e){if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););}))},n&&(i.count=function(e,r){return Ye.setTime(+e),Ge.setTime(+r),t(Ye),t(Ge),Math.floor(n(Ye,Ge))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(e){return r(e)%t==0}:function(e){return i.count(0,e)%t==0}):i:null}),i}var Xe=Ue((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));Xe.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Ue((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,n){e.setFullYear(e.getFullYear()+n*t)})):null};var We=Xe,qe=(Xe.range,Ue((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()})));qe.range;function Ke(t){return Ue((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/6048e5}))}var $e=Ke(0),Ze=Ke(1),Qe=Ke(2),Je=Ke(3),tn=Ke(4),en=Ke(5),nn=Ke(6),rn=($e.range,Ze.range,Qe.range,Je.range,tn.range,en.range,nn.range,Ue((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5}),(function(t){return t.getDate()-1}))),on=rn,an=(rn.range,Ue((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-6e4*t.getMinutes())}),(function(t,e){t.setTime(+t+36e5*e)}),(function(t,e){return(e-t)/36e5}),(function(t){return t.getHours()}))),sn=(an.range,Ue((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())}),(function(t,e){t.setTime(+t+6e4*e)}),(function(t,e){return(e-t)/6e4}),(function(t){return t.getMinutes()}))),un=(sn.range,Ue((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,e){t.setTime(+t+1e3*e)}),(function(t,e){return(e-t)/1e3}),(function(t){return t.getUTCSeconds()}))),cn=(un.range,Ue((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t})));cn.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?Ue((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):cn:null};cn.range;function ln(t){return Ue((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/6048e5}))}var hn=ln(0),fn=ln(1),dn=ln(2),pn=ln(3),gn=ln(4),_n=ln(5),mn=ln(6),vn=(hn.range,fn.range,dn.range,pn.range,gn.range,_n.range,mn.range,Ue((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/864e5}),(function(t){return t.getUTCDate()-1}))),yn=vn,xn=(vn.range,Ue((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()})));xn.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Ue((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null};var bn=xn;xn.range;function wn(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Mn(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function kn(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}var Tn,Sn={"-":"",_:" ",0:"0"},Cn=/^\s*\d+/,An=/^%/,En=/[\\^$*+?|[\]().{}]/g;function Dn(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(e)+i:i)}function Rn(t){return t.replace(En,"\\$&")}function Nn(t){return new RegExp("^(?:"+t.map(Rn).join("|")+")","i")}function In(t){for(var e={},n=-1,r=t.length;++n<r;)e[t[n].toLowerCase()]=n;return e}function Vn(t,e,n){var r=Cn.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Pn(t,e,n){var r=Cn.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Ln(t,e,n){var r=Cn.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function On(t,e,n){var r=Cn.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function jn(t,e,n){var r=Cn.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Bn(t,e,n){var r=Cn.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Hn(t,e,n){var r=Cn.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function zn(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Fn(t,e,n){var r=Cn.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function Yn(t,e,n){var r=Cn.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Gn(t,e,n){var r=Cn.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Un(t,e,n){var r=Cn.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Xn(t,e,n){var r=Cn.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Wn(t,e,n){var r=Cn.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function qn(t,e,n){var r=Cn.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Kn(t,e,n){var r=Cn.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function $n(t,e,n){var r=Cn.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Zn(t,e,n){var r=An.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Qn(t,e,n){var r=Cn.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Jn(t,e,n){var r=Cn.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function tr(t,e){return Dn(t.getDate(),e,2)}function er(t,e){return Dn(t.getHours(),e,2)}function nr(t,e){return Dn(t.getHours()%12||12,e,2)}function rr(t,e){return Dn(1+on.count(We(t),t),e,3)}function ir(t,e){return Dn(t.getMilliseconds(),e,3)}function or(t,e){return ir(t,e)+"000"}function ar(t,e){return Dn(t.getMonth()+1,e,2)}function sr(t,e){return Dn(t.getMinutes(),e,2)}function ur(t,e){return Dn(t.getSeconds(),e,2)}function cr(t){var e=t.getDay();return 0===e?7:e}function lr(t,e){return Dn($e.count(We(t)-1,t),e,2)}function hr(t,e){var n=t.getDay();return t=n>=4||0===n?tn(t):tn.ceil(t),Dn(tn.count(We(t),t)+(4===We(t).getDay()),e,2)}function fr(t){return t.getDay()}function dr(t,e){return Dn(Ze.count(We(t)-1,t),e,2)}function pr(t,e){return Dn(t.getFullYear()%100,e,2)}function gr(t,e){return Dn(t.getFullYear()%1e4,e,4)}function _r(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Dn(e/60|0,"0",2)+Dn(e%60,"0",2)}function mr(t,e){return Dn(t.getUTCDate(),e,2)}function vr(t,e){return Dn(t.getUTCHours(),e,2)}function yr(t,e){return Dn(t.getUTCHours()%12||12,e,2)}function xr(t,e){return Dn(1+yn.count(bn(t),t),e,3)}function br(t,e){return Dn(t.getUTCMilliseconds(),e,3)}function wr(t,e){return br(t,e)+"000"}function Mr(t,e){return Dn(t.getUTCMonth()+1,e,2)}function kr(t,e){return Dn(t.getUTCMinutes(),e,2)}function Tr(t,e){return Dn(t.getUTCSeconds(),e,2)}function Sr(t){var e=t.getUTCDay();return 0===e?7:e}function Cr(t,e){return Dn(hn.count(bn(t)-1,t),e,2)}function Ar(t,e){var n=t.getUTCDay();return t=n>=4||0===n?gn(t):gn.ceil(t),Dn(gn.count(bn(t),t)+(4===bn(t).getUTCDay()),e,2)}function Er(t){return t.getUTCDay()}function Dr(t,e){return Dn(fn.count(bn(t)-1,t),e,2)}function Rr(t,e){return Dn(t.getUTCFullYear()%100,e,2)}function Nr(t,e){return Dn(t.getUTCFullYear()%1e4,e,4)}function Ir(){return"+0000"}function Vr(){return"%"}function Pr(t){return+t}function Lr(t){return Math.floor(+t/1e3)}!function(t){Tn=function(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,o=t.days,a=t.shortDays,s=t.months,u=t.shortMonths,c=Nn(i),l=In(i),h=Nn(o),f=In(o),d=Nn(a),p=In(a),g=Nn(s),_=In(s),m=Nn(u),v=In(u),y={a:function(t){return a[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return u[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:tr,e:tr,f:or,H:er,I:nr,j:rr,L:ir,m:ar,M:sr,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Pr,s:Lr,S:ur,u:cr,U:lr,V:hr,w:fr,W:dr,x:null,X:null,y:pr,Y:gr,Z:_r,"%":Vr},x={a:function(t){return a[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return u[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:mr,e:mr,f:wr,H:vr,I:yr,j:xr,L:br,m:Mr,M:kr,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Pr,s:Lr,S:Tr,u:Sr,U:Cr,V:Ar,w:Er,W:Dr,x:null,X:null,y:Rr,Y:Nr,Z:Ir,"%":Vr},b={a:function(t,e,n){var r=d.exec(e.slice(n));return r?(t.w=p[r[0].toLowerCase()],n+r[0].length):-1},A:function(t,e,n){var r=h.exec(e.slice(n));return r?(t.w=f[r[0].toLowerCase()],n+r[0].length):-1},b:function(t,e,n){var r=m.exec(e.slice(n));return r?(t.m=v[r[0].toLowerCase()],n+r[0].length):-1},B:function(t,e,n){var r=g.exec(e.slice(n));return r?(t.m=_[r[0].toLowerCase()],n+r[0].length):-1},c:function(t,n,r){return k(t,e,n,r)},d:Gn,e:Gn,f:$n,H:Xn,I:Xn,j:Un,L:Kn,m:Yn,M:Wn,p:function(t,e,n){var r=c.exec(e.slice(n));return r?(t.p=l[r[0].toLowerCase()],n+r[0].length):-1},q:Fn,Q:Qn,s:Jn,S:qn,u:Pn,U:Ln,V:On,w:Vn,W:jn,x:function(t,e,r){return k(t,n,e,r)},X:function(t,e,n){return k(t,r,e,n)},y:Hn,Y:Bn,Z:zn,"%":Zn};function w(t,e){return function(n){var r,i,o,a=[],s=-1,u=0,c=t.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===t.charCodeAt(s)&&(a.push(t.slice(u,s)),null!=(i=Sn[r=t.charAt(++s)])?r=t.charAt(++s):i="e"===r?" ":"0",(o=e[r])&&(r=o(n,i)),a.push(r),u=s+1);return a.push(t.slice(u,s)),a.join("")}}function M(t,e){return function(n){var r,i,o=kn(1900,void 0,1);if(k(o,t,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("s"in o)return new Date(1e3*o.s+("L"in o?o.L:0));if(!e||"Z"in o||(o.Z=0),"p"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m="q"in o?o.q:0),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=Mn(kn(o.y,0,1))).getUTCDay(),r=i>4||0===i?fn.ceil(r):fn(r),r=yn.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=wn(kn(o.y,0,1))).getDay(),r=i>4||0===i?Ze.ceil(r):Ze(r),r=on.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?Mn(kn(o.y,0,1)).getUTCDay():wn(kn(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,Mn(o)):wn(o)}}function k(t,e,n,r){for(var i,o,a=0,s=e.length,u=n.length;a<s;){if(r>=u)return-1;if(37===(i=e.charCodeAt(a++))){if(i=e.charAt(a++),!(o=b[i in Sn?e.charAt(a++):i])||(r=o(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return(y.x=w(n,y),y.X=w(r,y),y.c=w(e,y),x.x=w(n,x),x.X=w(r,x),x.c=w(e,x),{format:function(t){var e=w(t+="",y);return e.toString=function(){return t},e},parse:function(t){var e=M(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=w(t+="",x);return e.toString=function(){return t},e},utcParse:function(t){var e=M(t+="",!0);return e.toString=function(){return t},e}})}(t),Tn.format,Tn.parse,Tn.utcFormat,Tn.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var Or=Ue((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCMonth(t.getUTCMonth()+e)}),(function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()})),jr=(Or.range,Ue((function(t){t.setUTCMinutes(0,0,0)}),(function(t,e){t.setTime(+t+36e5*e)}),(function(t,e){return(e-t)/36e5}),(function(t){return t.getUTCHours()}))),Br=(jr.range,Ue((function(t){t.setUTCSeconds(0,0)}),(function(t,e){t.setTime(+t+6e4*e)}),(function(t,e){return(e-t)/6e4}),(function(t){return t.getUTCMinutes()})));Br.range;n.d(e,"legendColor",(function(){return Ur})),n.d(e,"legendSize",(function(){return Xr})),n.d(e,"legendSymbol",(function(){return Wr})),n.d(e,"legendHelpers",(function(){return qr}));var Hr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zr=function(t){return t},Fr=function(t){for(var e=[],n=0,r=t.length;n<r;n++)e[n]=t[r-n-1];return e},Yr=function(t,e){t.each((function(){for(var t,n,r="string"==typeof(n=this)?new ut([[document.querySelector(n)]],[document.documentElement]):new ut([[n]],st),i=r.text().split(/\s+/).reverse(),o=[],a=(r.attr("y"),parseFloat(r.attr("dy"))||0),s=r.text(null).append("tspan").attr("x",0).attr("dy",a+"em");t=i.pop();)o.push(t),s.text(o.join(" ")),s.node().getComputedTextLength()>e&&o.length>1&&(o.pop(),s.text(o.join(" ")),o=[t],s=r.append("tspan").attr("x",0).attr("dy",1.2+a+"em").text(t))}))},Gr={d3_drawShapes:function(t,e,n,r,i,o){"rect"===t?e.attr("height",n).attr("width",r):"circle"===t?e.attr("r",i):"line"===t?e.attr("x1",0).attr("x2",r).attr("y1",0).attr("y2",0):"path"===t&&e.attr("d",o)},d3_addText:function(t,e,n,r,i){e.append("text").attr("class",r+"label");var o=t.selectAll("g."+r+"cell text."+r+"label").data(n).text(zr);return i&&t.selectAll("g."+r+"cell text."+r+"label").call(Yr,i),o},d3_calcType:function(t,e,n,r,i,o){var a=t.invertExtent?function(t,e,n){var r=t.range().map((function(r){var i=t.invertExtent(r);return e(i[0])+" "+n+" "+e(i[1])}));return{data:t.range(),labels:r,feature:zr}}(t,i,o):t.ticks?function(t,e,n){var r=[];if(e.length>1)r=e;else for(var i=t.domain(),o=(i[i.length-1]-i[0])/(e-1),a=0;a<e;a++)r.push(i[0]+a*o);var s=r.map(n);return{data:r,labels:s,feature:function(e){return t(e)}}}(t,n,i):function(t){return{data:t.domain(),labels:t.domain(),feature:function(e){return t(e)}}}(t),s=t.range&&t.range()||t.domain();return a.labels=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments[1],n=arguments[2],r=arguments[3],i=arguments[4];if("object"===(void 0===e?"undefined":Hr(e))){if(0===e.length)return t;for(var o=e.length;o<t.length;o++)e.push(t[o]);return e}if("function"==typeof e){for(var a=[],s=t.length,u=0;u<s;u++)a.push(e({i:u,genLength:s,generatedLabels:t,domain:n,range:r,labelDelimiter:i}));return a}return t}(a.labels,r,t.domain(),s,o),e&&(a.labels=Fr(a.labels),a.data=Fr(a.data)),a},d3_filterCells:function(t,e){var n=t.data.map((function(e,n){return{data:e,label:t.labels[n]}})).filter(e),r=n.map((function(t){return t.data})),i=n.map((function(t){return t.label}));return t.data=t.data.filter((function(t){return-1!==r.indexOf(t)})),t.labels=t.labels.filter((function(t){return-1!==i.indexOf(t)})),t},d3_placement:function(t,e,n,r,i,o,a){e.attr("transform",n),r.attr("transform",i),"horizontal"===t&&"below"===a&&r.style("text-anchor",o)},d3_addEvents:function(t,e){t.on("mouseover.legend",(function(t){!function(t,e,n){t.call("cellover",n,e)}(e,t,this)})).on("mouseout.legend",(function(t){!function(t,e,n){t.call("cellout",n,e)}(e,t,this)})).on("click.legend",(function(t){!function(t,e,n){t.call("cellclick",n,e)}(e,t,this)})).on("contextmenu.legend",(function(t){!function(t,e,n){t.call("cellcontextmenu",n,e)}(e,t,this)}))},d3_title:function(t,e,n,r){if(""!==e){t.selectAll("text."+n+"legendTitle").data([e]).enter().append("text").attr("class",n+"legendTitle"),t.selectAll("text."+n+"legendTitle").text(e),r&&t.selectAll("text."+n+"legendTitle").call(Yr,r);var i=t.select("."+n+"legendCells"),o=t.select("."+n+"legendTitle").nodes().map((function(t){return t.getBBox().height}))[0],a=-i.nodes().map((function(t){return t.getBBox().x}))[0];i.attr("transform","translate("+a+","+o+")")}},d3_defaultLocale:{format:mt,formatPrefix:vt},d3_defaultFormatSpecifier:".01f",d3_defaultDelimiter:"to"};function Ur(){var t=Fe(),e="rect",n=15,r=15,i=10,o=2,a=[5],s=void 0,u=[],c="",l=!1,h="",f=Gr.d3_defaultLocale,d=Gr.d3_defaultFormatSpecifier,p=10,g="middle",_="below",m=Gr.d3_defaultDelimiter,v=void 0,y="vertical",x=!1,b=void 0,w=void 0,M=Rt("cellover","cellout","cellclick","cellcontextmenu");function k(k){var T=Gr.d3_calcType(t,x,a,u,f.format(d),m);k.selectAll("g").data([t]).enter().append("g").attr("class",c+"legendCells"),s&&Gr.d3_filterCells(T,s);var S=k.select("."+c+"legendCells").selectAll("."+c+"cell").data(T.data),C=S.enter().append("g").attr("class",c+"cell");C.append(e).attr("class",c+"swatch");var A=k.selectAll("g."+c+"cell "+e+"."+c+"swatch").data(T.data);Gr.d3_addEvents(C,M),S.exit().transition().style("opacity",0).remove(),A.exit().transition().style("opacity",0).remove(),A=A.merge(A),Gr.d3_drawShapes(e,A,r,n,i,b);var E=Gr.d3_addText(k,C,T.labels,c,v);S=C.merge(S);var D=E.nodes().map((function(t){return t.getBBox()})),R=A.nodes().map((function(t){return t.getBBox()}));l?A.attr("class",(function(t){return c+"swatch "+T.feature(t)})):"line"==e?A.style("stroke",T.feature):A.style("fill",T.feature);var N=void 0,I=void 0,V="start"==g?0:"middle"==g?.5:1;if("vertical"===y){var P=D.map((function(t,e){return Math.max(t.height,R[e].height)}));N=function(t,e){return"translate(0, "+(Object(Nt.h)(P.slice(0,e))+e*o)+")"},I=function(t,e){return"translate( "+(R[e].width+R[e].x+p)+", "+(R[e].y+R[e].height/2+5)+")"}}else"horizontal"===y&&(N=function(t,e){return"translate("+e*(R[e].width+o)+",0)"},"below"===_?I=function(t,e){return"translate("+(R[e].width*V+R[e].x)+",\n "+(R[e].height+R[e].y+p+8)+")"}:"right"===_&&(I=function(t,e){return"translate("+(R[e].width+R[e].x+4)+",\n "+(R[e].height+R[e].y)+")"}));Gr.d3_placement(y,S,N,E,I,g,_),Gr.d3_title(k,h,c,w),S.transition().style("opacity",1)}return k.scale=function(e){return arguments.length?(t=e,k):t},k.cells=function(t){return arguments.length?((t.length>1||t>=2)&&(a=t),k):a},k.cellFilter=function(t){return arguments.length?(s=t,k):s},k.shape=function(t,n){return arguments.length?(("rect"==t||"circle"==t||"line"==t||"path"==t&&"string"==typeof n)&&(e=t,b=n),k):e},k.shapeWidth=function(t){return arguments.length?(n=+t,k):n},k.shapeHeight=function(t){return arguments.length?(r=+t,k):r},k.shapeRadius=function(t){return arguments.length?(i=+t,k):i},k.shapePadding=function(t){return arguments.length?(o=+t,k):o},k.labels=function(t){return arguments.length?(u=t,k):u},k.labelAlign=function(t){return arguments.length?("start"!=t&&"end"!=t&&"middle"!=t||(g=t),k):g},k.labelPosition=function(t){return arguments.length?("below"!=t&&"right"!=t||(_=t),k):_},k.locale=function(t){return arguments.length?(f=kt(t),k):f},k.labelFormat=function(t){return arguments.length?(d=dt(t),k):k.locale().format(d)},k.labelOffset=function(t){return arguments.length?(p=+t,k):p},k.labelDelimiter=function(t){return arguments.length?(m=t,k):m},k.labelWrap=function(t){return arguments.length?(v=t,k):v},k.useClass=function(t){return arguments.length?(!0!==t&&!1!==t||(l=t),k):l},k.orient=function(t){return arguments.length?("horizontal"!=(t=t.toLowerCase())&&"vertical"!=t||(y=t),k):y},k.ascending=function(t){return arguments.length?(x=!!t,k):x},k.classPrefix=function(t){return arguments.length?(c=t,k):c},k.title=function(t){return arguments.length?(h=t,k):h},k.titleWidth=function(t){return arguments.length?(w=t,k):w},k.textWrap=function(t){return arguments.length?(textWrap=t,k):textWrap},k.on=function(){var t=M.on.apply(M,arguments);return t===M?k:t},k}function Xr(){var t=Fe(),e="rect",n=15,r=2,i=[5],o=void 0,a=[],s="",u="",c=Gr.d3_defaultLocale,l=Gr.d3_defaultFormatSpecifier,h=10,f="middle",d=Gr.d3_defaultDelimiter,p=void 0,g="vertical",_=!1,m=void 0,v=void 0,y=Rt("cellover","cellout","cellclick","cellcontextmenu");function x(x){var b=Gr.d3_calcType(t,_,i,a,c.format(l),d),w=x.selectAll("g").data([t]);o&&Gr.d3_filterCells(b,o),w.enter().append("g").attr("class",s+"legendCells");var M=x.select("."+s+"legendCells").selectAll("."+s+"cell").data(b.data),k=M.enter().append("g").attr("class",s+"cell");k.append(e).attr("class",s+"swatch");var T=x.selectAll("g."+s+"cell "+e+"."+s+"swatch");Gr.d3_addEvents(k,y),M.exit().transition().style("opacity",0).remove(),T.exit().transition().style("opacity",0).remove(),T=T.merge(T),"line"===e?(Gr.d3_drawShapes(e,T,0,n),T.attr("stroke-width",b.feature)):Gr.d3_drawShapes(e,T,b.feature,b.feature,b.feature,m);var S=Gr.d3_addText(x,k,b.labels,s,p);M=k.merge(M);var C=S.nodes().map((function(t){return t.getBBox()})),A=T.nodes().map((function(n,r){var i=n.getBBox(),o=t(b.data[r]);return"line"===e&&"horizontal"===g?i.height=i.height+o:"line"===e&&"vertical"===g&&(i.width=i.width),i})),E=Object(Nt.d)(A,(function(t){return t.height+t.y})),D=Object(Nt.d)(A,(function(t){return t.width+t.x})),R=void 0,N=void 0,I="start"==f?0:"middle"==f?.5:1;if("vertical"===g){var V=C.map((function(t,e){return Math.max(t.height,A[e].height)})),P="circle"==e||"line"==e?A[0].height/2:0;R=function(t,e){var n=Object(Nt.h)(V.slice(0,e));return"translate(0, "+(P+n+e*r)+")"},N=function(t,e){return"translate( "+(D+h)+",\n "+(A[e].y+A[e].height/2+5)+")"}}else if("horizontal"===g){R=function(t,n){return"translate("+(Object(Nt.h)(A.slice(0,n),(function(t){return t.width}))+n*r)+", "+("circle"==e||"line"==e?E/2:0)+")"};var L="line"==e?E/2:E;N=function(t,e){return"translate( "+(A[e].width*I+A[e].x)+",\n "+(L+h)+")"}}Gr.d3_placement(g,M,R,S,N,f),Gr.d3_title(x,u,s,v),M.transition().style("opacity",1)}return x.scale=function(e){return arguments.length?(t=e,x):t},x.cells=function(t){return arguments.length?((t.length>1||t>=2)&&(i=t),x):i},x.cellFilter=function(t){return arguments.length?(o=t,x):o},x.shape=function(t,n){return arguments.length?("rect"!=t&&"circle"!=t&&"line"!=t||(e=t,m=n),x):e},x.shapeWidth=function(t){return arguments.length?(n=+t,x):n},x.shapePadding=function(t){return arguments.length?(r=+t,x):r},x.labels=function(t){return arguments.length?(a=t,x):a},x.labelAlign=function(t){return arguments.length?("start"!=t&&"end"!=t&&"middle"!=t||(f=t),x):f},x.locale=function(t){return arguments.length?(c=kt(t),x):c},x.labelFormat=function(t){return arguments.length?(l=dt(t),x):x.locale().format(l)},x.labelOffset=function(t){return arguments.length?(h=+t,x):h},x.labelDelimiter=function(t){return arguments.length?(d=t,x):d},x.labelWrap=function(t){return arguments.length?(p=t,x):p},x.orient=function(t){return arguments.length?("horizontal"!=(t=t.toLowerCase())&&"vertical"!=t||(g=t),x):g},x.ascending=function(t){return arguments.length?(_=!!t,x):_},x.classPrefix=function(t){return arguments.length?(s=t,x):s},x.title=function(t){return arguments.length?(u=t,x):u},x.titleWidth=function(t){return arguments.length?(v=t,x):v},x.on=function(){var t=y.on.apply(y,arguments);return t===y?x:t},x}function Wr(){var t=Fe(),e=5,n=[5],r=void 0,i=[],o="",a="",s=Gr.d3_defaultLocale,u=Gr.d3_defaultFormatSpecifier,c="middle",l=10,h=Gr.d3_defaultDelimiter,f=void 0,d="vertical",p=!1,g=void 0,_=Rt("cellover","cellout","cellclick","cellcontextmenu");function m(m){var v=Gr.d3_calcType(t,p,n,i,s.format(u),h),y=m.selectAll("g").data([t]);r&&Gr.d3_filterCells(v,r),y.enter().append("g").attr("class",o+"legendCells");var x=m.select("."+o+"legendCells").selectAll("."+o+"cell").data(v.data),b=x.enter().append("g").attr("class",o+"cell");b.append("path").attr("class",o+"swatch");var w=m.selectAll("g."+o+"cell path."+o+"swatch");Gr.d3_addEvents(b,_),x.exit().transition().style("opacity",0).remove(),w.exit().transition().style("opacity",0).remove(),w=w.merge(w),Gr.d3_drawShapes("path",w,15,15,10,v.feature);var M=Gr.d3_addText(m,b,v.labels,o,f);x=b.merge(x);var k=M.nodes().map((function(t){return t.getBBox()})),T=w.nodes().map((function(t){return t.getBBox()})),S=Object(Nt.d)(T,(function(t){return t.height})),C=Object(Nt.d)(T,(function(t){return t.width})),A=void 0,E=void 0,D="start"==c?0:"middle"==c?.5:1;if("vertical"===d){var R=k.map((function(t,e){return Math.max(S,t.height)}));A=function(t,n){return"translate(0, "+(Object(Nt.h)(R.slice(0,n))+n*e)+" )"},E=function(t,e){return"translate( "+(C+l)+",\n "+(T[e].y+T[e].height/2+5)+")"}}else"horizontal"===d&&(A=function(t,n){return"translate( "+n*(C+e)+",0)"},E=function(t,e){return"translate( "+(T[e].width*D+T[e].x)+",\n "+(S+l)+")"});Gr.d3_placement(d,x,A,M,E,c),Gr.d3_title(m,a,o,g),x.transition().style("opacity",1)}return m.scale=function(e){return arguments.length?(t=e,m):t},m.cells=function(t){return arguments.length?((t.length>1||t>=2)&&(n=t),m):n},m.cellFilter=function(t){return arguments.length?(r=t,m):r},m.shapePadding=function(t){return arguments.length?(e=+t,m):e},m.labels=function(t){return arguments.length?(i=t,m):i},m.labelAlign=function(t){return arguments.length?("start"!=t&&"end"!=t&&"middle"!=t||(c=t),m):c},m.locale=function(t){return arguments.length?(s=kt(t),m):s},m.labelFormat=function(t){return arguments.length?(u=dt(t),m):m.locale().format(u)},m.labelOffset=function(t){return arguments.length?(l=+t,m):l},m.labelDelimiter=function(t){return arguments.length?(h=t,m):h},m.labelWrap=function(t){return arguments.length?(f=t,m):f},m.orient=function(t){return arguments.length?("horizontal"!=(t=t.toLowerCase())&&"vertical"!=t||(d=t),m):d},m.ascending=function(t){return arguments.length?(p=!!t,m):p},m.classPrefix=function(t){return arguments.length?(o=t,m):o},m.title=function(t){return arguments.length?(a=t,m):a},m.titleWidth=function(t){return arguments.length?(g=t,m):g},m.on=function(){var t=_.on.apply(_,arguments);return t===_?m:t},m}var qr={thresholdLabels:function(t){var e=t.i,n=t.genLength,r=t.generatedLabels,i=t.labelDelimiter;return 0===e?"Less than "+r[e].split(" "+i+" ")[1]:e===n-1?r[e].split(" "+i+" ")[0]+" or more":r[e]}},Kr={legendColor:Ur,legendSize:Xr,legendSymbol:Wr,legendHelpers:qr};e.default=Kr},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n(50),o=n(49),a=function(){var t={},e=24,n=8,a=[1,1],s=[],u=[];function c(){function t(t,e){return t.source.y-e.source.y}function e(t,e){return t.target.y-e.target.y}s.forEach((function(n){n.sourceLinks.sort(e),n.targetLinks.sort(t)})),s.forEach((function(t){var e=0,n=0;t.sourceLinks.forEach((function(t){t.sy=e,e+=t.dy})),t.targetLinks.forEach((function(t){t.ty=n,n+=t.dy}))}))}function l(t){return t.y+t.dy/2}function h(t){return t.value}return t.nodeWidth=function(n){return arguments.length?(e=+n,t):e},t.nodePadding=function(e){return arguments.length?(n=+e,t):n},t.nodes=function(e){return arguments.length?(s=e,t):s},t.links=function(e){return arguments.length?(u=e,t):u},t.size=function(e){return arguments.length?(a=e,t):a},t.layout=function(o){return s.forEach((function(t){t.sourceLinks=[],t.targetLinks=[]})),u.forEach((function(t){var e=t.source,n=t.target;"number"==typeof e&&(e=t.source=s[t.source]),"number"==typeof n&&(n=t.target=s[t.target]),e.sourceLinks.push(t),n.targetLinks.push(t)})),s.forEach((function(t){t.value=Math.max(Object(r.h)(t.sourceLinks,h),Object(r.h)(t.targetLinks,h))})),function(){var t,n=s,r=0;for(;n.length;)t=[],n.forEach((function(n){n.x=r,n.dx=e,n.sourceLinks.forEach((function(e){t.indexOf(e.target)<0&&t.push(e.target)}))})),n=t,++r;(function(t){s.forEach((function(e){e.sourceLinks.length||(e.x=t-1)}))})(r),i=(a[0]-e)/(r-1),s.forEach((function(t){t.x*=i}));var i}(),function(t){var e=Object(i.b)().key((function(t){return t.x})).sortKeys(r.a).entries(s).map((function(t){return t.values}));o=Object(r.e)(e,(function(t){return(a[1]-(t.length-1)*n)/Object(r.h)(t,h)})),e.forEach((function(t){t.forEach((function(t,e){t.y=e,t.dy=t.value*o}))})),u.forEach((function(t){t.dy=t.value*o})),p();var o;for(var c=1;t>0;--t)d(c*=.99),p(),f(c),p();function f(t){function n(t){return l(t.source)*t.value}e.forEach((function(e){e.forEach((function(e){if(e.targetLinks.length){var i=Object(r.h)(e.targetLinks,n)/Object(r.h)(e.targetLinks,h);e.y+=(i-l(e))*t}}))}))}function d(t){function n(t){return l(t.target)*t.value}e.slice().reverse().forEach((function(e){e.forEach((function(e){if(e.sourceLinks.length){var i=Object(r.h)(e.sourceLinks,n)/Object(r.h)(e.sourceLinks,h);e.y+=(i-l(e))*t}}))}))}function p(){e.forEach((function(t){var e,r,i,o=0,s=t.length;for(t.sort(g),i=0;i<s;++i)(r=o-(e=t[i]).y)>0&&(e.y+=r),o=e.y+e.dy+n;if((r=o-n-a[1])>0)for(o=e.y-=r,i=s-2;i>=0;--i)(r=(e=t[i]).y+e.dy+n-o)>0&&(e.y-=r),o=e.y}))}function g(t,e){return t.y-e.y}}(o),c(),t},t.relayout=function(){return c(),t},t.link=function(){var t=.5;function e(e){var n=e.source.x+e.source.dx,r=e.target.x,i=Object(o.a)(n,r),a=i(t),s=i(1-t),u=e.source.y+e.sy+e.dy/2,c=e.target.y+e.ty+e.dy/2;return"M"+n+","+u+"C"+a+","+u+" "+s+","+c+" "+r+","+c}return e.curvature=function(n){return arguments.length?(t=+n,e):t},e},t};n.d(e,"sankey",(function(){return a}))}])}));