PageSourceSearch

https://www.pnm.com/o/frontend-taglib-clay/__liferay__/exports/@clayui$charts.js

js pnm.com collected 2026-09-24 09:40:18 UTC 510,756 bytes, 2 lines download raw bytes

1/*! For license information please see @clayui$charts.js.LICENSE.txt */
2import*as t from"../../../frontend-js-react-web/__liferay__/exports/react.js";var e={153:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(876),i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(n(421)),a=["forwardRef","elementProps"],o=["data","onafterinit"];function _extends(){return _extends=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},_extends.apply(this,arguments)}function ownKeys(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function _defineProperty(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _objectWithoutProperties(t,e){if(null==t)return{};var n,r,i=function _objectWithoutPropertiesLoose(t,e){if(null==t)return{};var n,r,i={},a=Object.keys(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}var c="undefined"==typeof window?i.default.useEffect:i.default.useLayoutEffect,s=function BillboardWrapper(t){var e=t.forwardRef,n=t.elementProps,s=void 0===n?{}:n,u=_objectWithoutProperties(t,a),l=i.default.useRef(null),d=i.default.useCallback((function(t){var n=t.data,i=t.onafterinit,a=_objectWithoutProperties(t,o);l.current&&(e.current||(e.current=r.bb.generate(function _objectSpread(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(n),!0).forEach((function(e){_defineProperty(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({bindto:l.current,data:n,onafterinit:function onafterinit(){i&&setTimeout((function(){return i()}),0)}},a))),e.current.load(n))}),[]);return c((function(){return requestAnimationFrame((function(){return d(u)})),function(){if(e.current)try{e.current.destroy()}catch(t){console.error("Internal billboard.js error",t)}e.current=null}}),[]),c((function(){d(u)}),[u]),i.default.createElement("div",_extends({},s,{ref:l}))},u=i.default.forwardRef((function(t,e){return i.default.createElement(s,_extends({forwardRef:e},t))}));e.default=u},655:(t,e,n)=>{function _typeof(t){return _typeof="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},_typeof(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=function _interopRequireWildcard(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==_typeof(t)&&"function"!=typeof t)return{default:t};var n=_getRequireWildcardCache(e);if(n&&n.has(t))return n.get(t);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&Object.prototype.hasOwnProperty.call(t,a)){var o=i?Object.getOwnPropertyDescriptor(t,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=t[a]}r.default=t,n&&n.set(t,r);return r}(n(721)),i=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(n(421)),a=["data","elementProps","forwardRef"];function _getRequireWildcardCache(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(_getRequireWildcardCache=function _getRequireWildcardCache(t){return t?n:e})(t)}function _extends(){return _extends=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},_extends.apply(this,arguments)}function _objectWithoutProperties(t,e){if(null==t)return{};var n,r,i=function _objectWithoutPropertiesLoose(t,e){if(null==t)return{};var n,r,i={},a=Object.keys(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function ownKeys(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};
2e%2?ownKeys(Object(n),!0).forEach((function(e){_defineProperty(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function _defineProperty(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _defineProperties(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var o={range:{max:"#0065e4",min:"#b1d4ff"},selected:"#4b9bff",value:"pop_est"},c=function(){function GeomapBase(t){!function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,GeomapBase),this._data=t.data,this._element=t.element,this._color=_objectSpread(_objectSpread({},o),t.color),this._pollingInterval=t.pollingInterval,this._height="100%",this._width="100%"}return function _createClass(t,e,n){return e&&_defineProperties(t.prototype,e),n&&_defineProperties(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}(GeomapBase,[{key:"attached",value:function attached(){var t=this,e="string"==typeof this._width?this._width:"".concat(this._width,"px"),n="string"==typeof this._height?this._height:"".concat(this._height,"px");this.svg=r.select(this._element).append("svg").attr("width",e).attr("height",n),this._handleClickHandler=this._handleClick.bind(this),this.rect=this.svg.append("rect").attr("fill","rgba(1, 1, 1, 0)").attr("width",e).attr("height",n).on("click",this._handleClickHandler);var i=this.svg.node().getBoundingClientRect();this.svgGroup=this.svg.append("g"),this.mapLayer=this.svgGroup.append("g"),this.projection=r.geoMercator().scale(100).translate([i.width/2,i.height/2]),this.path=r.geoPath().projection(this.projection),this._selected=null,this._onDataLoad(this._data),this._internalPollingInterval&&clearInterval(this._internalPollingInterval),this.pollingInterval&&(this._internalPollingInterval=setInterval((function(){t._onDataLoad(t._data)}),this._pollingInterval))}},{key:"disposed",value:function disposed(){this._internalPollingInterval&&(clearInterval(this._internalPollingInterval),this._internalPollingInterval=null),this.svg&&this.svg.remove()}},{key:"_fillFn",value:function _fillFn(t){var e=t&&t.properties?t.properties[this._color.value]:0;return this.colorScale(e||0)}},{key:"getSize",value:function getSize(){return{height:this._height,width:this._width}}},{key:"_handleClick",value:function _handleClick(t){var e=this;t&&this._selected!==t?this._selected=t:this._selected=null,this.mapLayer.selectAll("path").style("fill",(function(t){return e._selected&&t===e._selected?e._color.selected:e._fillFn.bind(e)(t)}))}},{key:"_handleMouseOver",value:function _handleMouseOver(t,e,n){var i=n[e];r.select(i).style("fill",this._color.selected)}},{key:"_handleMouseOut",value:function _handleMouseOut(t,e,n){var i=this,a=n[e];r.select(a).style("fill",(function(t){return i._fillFn.bind(i)(t)||0}))}},{key:"_onDataLoad",value:function _onDataLoad(t){var e=this,n=t.features,i=n.map((function(t){return t.properties[e._color.value]}));this._domainMin=Math.min.apply(null,i),this._domainMax=Math.max.apply(null,i),this.colorScale=r.scaleLinear().domain([this._domainMin,this._domainMax]).range([this._color.range.min,this._color.range.max]),this.mapLayer.selectAll("path").data(n).enter().append("path").attr("d",this.path).attr("vector-effect","non-scaling-stroke").attr("fill",(function(t){return e._fillFn.bind(e)(t)||0})).on("click",this._handleClickHandler).on("mouseout",this._handleMouseOut.bind(this)).on("mouseover",this._handleMouseOver.bind(this))}}]),GeomapBase}(),s=function Geomap(t){var e=t.data,n=t.elementProps,r=void 0===n?{}:n,o=t.forwardRef,s=_objectWithoutProperties(t,a),u=i.default.useRef(null);i.default.useEffect((function(){return o&&(o.current=new c(_objectSpread(_objectSpread({},s),{},{data:e,element:u.current})),o.current.attached()),function(){o.current.disposed()}}),[]);var l=o.current?o.current.getSize():{},d=l.height,h=void 0===d?"100%":d,p=l.width,g=void 0===p?"100%":p;return i.default.createElement("div",_extends({style:{height:h,width:g}},r,{ref:u}))},u=i.default.forwardRef((function(t,e){return i.default.createElement(s,_extends({forwardRef:e},t))}));e.default=u},352:(t,e,n)=>
2{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=_interopRequireDefault(n(421)),i=_interopRequireDefault(n(153)),a=["data","predictionDate"];function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function _extends(){return _extends=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},_extends.apply(this,arguments)}function ownKeys(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(n),!0).forEach((function(e){_defineProperty(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function _defineProperty(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _objectWithoutProperties(t,e){if(null==t)return{};var n,r,i=function _objectWithoutPropertiesLoose(t,e){if(null==t)return{};var n,r,i={},a=Object.keys(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}var o=r.default.forwardRef((function(t,e){var n=t.data,o=t.predictionDate,c=_objectWithoutProperties(t,a),s=n.columns;s&&(s=s.map((function(t){return"x"!==t[0]&&(t=t.map((function(t){return"number"==typeof t?{high:t,low:t,mid:t}:t}))),t})));var u=[];return o&&u.push({axis:"x",start:o}),r.default.createElement(i.default,_extends({data:_objectSpread(_objectSpread({},n),{},{columns:s}),ref:e,regions:u},c))}));o.displayName="ClayPredictiveChart";var c=o;e.default=c},499:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_TILES=e.DEFAULT_POINT_PATTERNS=e.DEFAULT_LINE_CLASSES=e.DEFAULT_GRID_OBJECT=e.DEFAULT_COLORS=void 0;e.DEFAULT_COLORS=["#4B9BFF","#FFB46E","#FF5F5F","#50D2A0","#FF73C3","#9CE269","#AF78FF","#FFD76E","#5FC8FF"];e.DEFAULT_GRID_OBJECT={x:{show:!0},y:{show:!0}};e.DEFAULT_LINE_CLASSES=["bb-line-dashed-2-2","bb-line-dashed-2-3","bb-line-dashed-2-4","bb-line-dashed-3-2","bb-line-dashed-3-3","bb-line-dashed-3-4","bb-line-dashed-4-2","bb-line-dashed-4-3","bb-line-dashed-4-4"];e.DEFAULT_TILES=["circles","diagonal-left-large","diagonal-left-small","diagonal-right-large","diagonal-right-small","horizontal-large","horizontal-small","vertical-large","vertical-small"];e.DEFAULT_POINT_PATTERNS=["circle","rectangle",'<polygon points="2.5 0 0 5 5 5"></polygon>','<polygon points="2.5 0 0 2.5 2.5 5 5 2.5"></polygon>','<polygon points="0 0 2.5 5 5 0"></polygon>','<path d="M5,5 a1,1 0 1,1 5,0">','<path d="M0,0 a1,1 0 0,0 5,0">','<rect width="5" height="2.5"></rect>','<rect width="2.5" height="5"></rect>']},876:(t,e,n)=>{!function webpackUniversalModuleDefinition(e,r){t.exports=r(n(144),n(942),n(605),n(555),n(11),n(12),n(415),n(749),n(742),n(551),n(218),n(996),n(79))}(window,(function(t,e,n,r,i,a,o,c,s,u,l,d,h){return function(t){var e={};function __nested_webpack_require_2122__(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,__nested_webpack_require_2122__),r.l=!0,r.exports}return __nested_webpack_require_2122__.m=t,__nested_webpack_require_2122__.c=e,__nested_webpack_require_2122__.d=function(t,e,n){__nested_webpack_require_2122__.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},__nested_webpack_require_2122__.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},__nested_webpack_require_2122__.t=function(t,e){if(1&e&&(t=__nested_webpack_require_2122__(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(__nested_webpack_require_2122__.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)__nested_webpack_require_2122__.d(n,r,function(e){return t[e]}.bind(null,r));return n},__nested_webpack_require_2122__.n=function(t){var e=t&&t.__esModule?function getDefault(){return t.default}:function getModuleExports(){return t};return __nested_webpack_require_2122__.d(e,"a",e),e},__nested_webpack_require_2122__.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},__nested_webpack_require_2122__.p="",__nested_webpack_require_2122__(__nested_webpack_require_2122__.s=27)}([function(t,e){t.exports=function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,n){var r=n(2),i=n(3),a=n(4);t.exports=function _slicedToArray(t,e){return r(t)||i(t,e)||a()}},function(t,e){t.exports=function _arrayWithHoles(t){if(Array.isArray(t))return t}},function(t,e){t.exports=function _iterableToArrayLimit(t,e){var n=[],r=!0,i=!1,a=void 0;try{for(var o,c=t[Symbol.iterator]();!(r=(o=c.next()).done)&&(n.push(o.value),!e||n.length!==e);r=!0);}catch(t){i=!0,a=t}finally{try{r||null==c.return||c.return()}finally{if(i)throw a}}return n}},function(t,e){t.exports=function _nonIterableRest(){throw new TypeError("Invalid attempt to de
2structure non-iterable instance")}},function(t,e){function _defineProperties(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}t.exports=function _createClass(t,e,n){return e&&_defineProperties(t.prototype,e),n&&_defineProperties(t,n),t}},function(e,n){e.exports=t},function(t,n){t.exports=e},function(t,e){t.exports=n},function(t,e){t.exports=r},function(t,e,n){var r=n(11),i=n(12),a=n(13);t.exports=function _toConsumableArray(t){return r(t)||i(t)||a()}},function(t,e){t.exports=function _arrayWithoutHoles(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}},function(t,e){t.exports=function _iterableToArray(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}},function(t,e){t.exports=function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},function(t,e){function _typeof2(t){return _typeof2="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof2(t){return typeof t}:function _typeof2(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof2(t)}function _typeof(e){return"function"==typeof Symbol&&"symbol"===_typeof2(Symbol.iterator)?t.exports=_typeof=function _typeof(t){return _typeof2(t)}:t.exports=_typeof=function _typeof(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":_typeof2(t)},_typeof(e)}t.exports=_typeof},function(t,e){t.exports=i},function(t,e){t.exports=a},function(t,e,n){(function(t){n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return a}));var r,i=(r=function(t){return void 0!==t&&t})(self)||r(window)||r(t)||r(globalThis)||Function("return this")(),a=(i&&i.document,i.navigator&&i.navigator.userAgent&&i.navigator.userAgent.indexOf("Mobi")>-1||!1)}).call(this,n(18))},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){t.exports=o},function(t,e){t.exports=c},function(t,e){t.exports=s},function(t,e){t.exports=u},function(t,e){t.exports=l},function(t,e){t.exports=d},function(t,e){t.exports=h},function(t,e,n){},function(t,e,n){n.r(e);var r=n(0),i=n.n(r),a=n(1),o=n.n(a),c=n(5),s=n.n(c),u=n(6),l=n(7),d=n(8),h=n(9),p={arc:"bb-arc",arcs:"bb-arcs",area:"bb-area",areas:"bb-areas",axis:"bb-axis",axisX:"bb-axis-x",axisXLabel:"bb-axis-x-label",axisY:"bb-axis-y",axisY2:"bb-axis-y2",axisY2Label:"bb-axis-y2-label",axisYLabel:"bb-axis-y-label",bar:"bb-bar",bars:"bb-bars",brush:"bb-brush",button:"bb-button",buttonZoomReset:"bb-zoom-reset",chart:"bb-chart",chartArc:"bb-chart-arc",chartArcs:"bb-chart-arcs",chartArcsBackground:"bb-chart-arcs-background",chartArcsGaugeMax:"bb-chart-arcs-gauge-max",chartArcsGaugeMin:"bb-chart-arcs-gauge-min",chartArcsGaugeUnit:"bb-chart-arcs-gauge-unit",chartArcsTitle:"bb-chart-arcs-title",chartArcsGaugeTitle:"bb-chart-arcs-gauge-title",chartBar:"bb-chart-bar",chartBars:"bb-chart-bars",chartLine:"bb-chart-line",chartLines:"bb-chart-lines",chartRadar:"bb-chart-radar",chartRadars:"bb-chart-radars",chartText:"bb-chart-text",chartTexts:"bb-chart-texts",circle:"bb-circle",circles:"bb-circles",colorPattern:"bb-color-pattern",colorScale:"bb-colorscale",defocused:"bb-defocused",dragarea:"bb-dragarea",empty:"bb-empty",eventRect:"bb-event-rect",eventRects:"bb-event-rects",eventRectsMultiple:"bb-event-rects-multiple",eventRectsSingle:"bb-event-rects-single",focused:"bb-focused",gaugeValue:"bb-gauge-value",grid:"bb-grid",gridLines:"bb-grid-lines",legendBackground:"bb-legend-background",legendItem:"bb-legend-item",legendItemEvent:"bb-legend-item-event",legendItemFocused:"bb-legend-item-focused",legendItemHidden:"bb-legend-item-hidden",legendItemPoint:"bb-legend-item-point",legendItemTile:"bb-legend-item-tile",level:"bb-level",levels:"bb-levels",line:"bb-line",lines:"bb-lines",region:"bb-region",regions:"bb-regions",selectedCircle:"bb-selected-circle",selectedCircles:"bb-selected-circles",shape:"bb-shape",shapes:"bb-shapes",stanfordElements:"bb-stanford-elements",stanfordLine:"bb-stanford-line",stanfordLine
2s:"bb-stanford-lines",stanfordRegion:"bb-stanford-region",stanfordRegions:"bb-stanford-regions",target:"bb-target",text:"bb-text",texts:"bb-texts",title:"bb-title",tooltip:"bb-tooltip",tooltipContainer:"bb-tooltip-container",tooltipName:"bb-tooltip-name",xgrid:"bb-xgrid",xgridFocus:"bb-xgrid-focus",xgridLine:"bb-xgrid-line",xgridLines:"bb-xgrid-lines",xgrids:"bb-xgrids",ygrid:"bb-ygrid",ygridLine:"bb-ygrid-line",ygridLines:"bb-ygrid-lines",ygrids:"bb-ygrids",zoomBrush:"bb-zoom-brush",zoomRect:"bb-zoom-rect",EXPANDED:"_expanded_",SELECTED:"_selected_",INCLUDED:"_included_"},g=n(10),v=n.n(g),m=n(14),_=n.n(m),b=n(15),isValue=function(t){return t||0===t},isFunction=function(t){return"function"==typeof t},isString=function(t){return"string"==typeof t},isNumber=function(t){return"number"==typeof t},isUndefined=function(t){return void 0===t},isDefined=function(t){return void 0!==t},isBoolean=function(t){return"boolean"==typeof t},ceil10=function(t){return 10*Math.ceil(t/10)},asHalfPixel=function(t){return Math.ceil(t)+.5},diffDomain=function(t){return t[1]-t[0]},isObjectType=function(t){return"object"===_()(t)},isEmpty=function(t){return isUndefined(t)||null===t||isString(t)&&0===t.length||isObjectType(t)&&!(t instanceof Date)&&0===Object.keys(t).length||isNumber(t)&&isNaN(t)},notEmpty=function(t){return!isEmpty(t)},isArray=function(t){return t&&t.constructor===Array},isObject=function(t){return t&&!t.nodeType&&isObjectType(t)&&!isArray(t)},getOption=function(t,e,n){return isDefined(t[e])?t[e]:n},callFn=function(t){for(var e=isFunction(t),n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return e&&t.call.apply(t,r),e},sanitise=function(t){return isString(t)?t.replace(/</g,"&lt;").replace(/>/g,"&gt;"):t},setTextValue=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[-1,1];if(t&&isString(e))if(-1===e.indexOf("\n"))t.text(e);else{var r=[t.text(),e].map((function(t){return t.replace(/[\s\n]/g,"")}));if(r[0]!==r[1]){var i=e.split("\n");t.html(""),i.forEach((function(e,r){t.append("tspan").attr("x",0).attr("dy","".concat(0===r?n[0]:n[1],"em")).text(e)}))}}},getRectSegList=function(t){var e=t.getBBox(),n=e.x,r=e.y,i=e.width,a=e.height;return[{x:n,y:r+a},{x:n,y:r},{x:n+i,y:r},{x:n+i,y:r+a}]},getBrushSelection=function(t){var e=null,n=l.event,r=t.context||t.main;return n&&"BrushEvent"===n.constructor.name?e=n.selection:r&&(e=r.select(".".concat(p.brush)).node())&&(e=Object(b.brushSelection)(e)),e},getRandom=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return Math.random()+(t?"":0)},brushEmpty=function(t){var e=getBrushSelection(t);return!e||e[0]===e[1]},extend=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;for(var n in e)t[n]=e[n];return t},capitalize=function(t){return t.charAt(0).toUpperCase()+t.slice(1)},toArray=function(t){return[].slice.call(t)},mergeArray=function(t){return t&&t.length?t.reduce((function(t,e){return t.concat(e)})):[]},w=function(t){function mergeObj(){return t.apply(this,arguments)}return mergeObj.toString=function(){return t.toString()},mergeObj}((function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];if(!n.length||1===n.length&&!n[0])return t;var i=n.shift();
2return isObject(t)&&isObject(i)&&Object.keys(i).forEach((function(e){var n=i[e];isObject(n)?(!t[e]&&(t[e]={}),t[e]=w(t[e],n)):t[e]=isArray(n)?n.concat():n})),w.apply(void 0,[t].concat(n))})),sortValue=function(t){var e,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return t[0]instanceof Date?e=n?function(t,e){return t-e}:function(t,e){return e-t}:n&&t.every(Number)?e=function(t,e){return t-e}:!n&&(e=function(t,e){return(t>e?-1:t<e&&1)||t===e&&0}),t.concat().sort(e)},getMinMax=function(t,e){var n=e.filter((function(t){return notEmpty(t)}));return n.length?isNumber(n[0])?n=Math[t].apply(Math,v()(n)):n[0]instanceof Date&&(n=sortValue(n,"min"===t)[0]):n=void 0,n},getRange=function(t,e){for(var n=[],r=t;r<e;r++)n.push(r);return n},T={mouse:function(){try{return new MouseEvent("t"),function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{bubbles:!1,cancelable:!1,screenX:0,screenY:0,clientX:0,clientY:0};t.dispatchEvent(new MouseEvent(e,n))}}catch(t){return function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{bubbles:!1,cancelable:!1,screenX:0,screenY:0,clientX:0,clientY:0},r=document.createEvent("MouseEvent");r.initMouseEvent(e,n.bubbles,n.cancelable,window,0,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),t.dispatchEvent(r)}}}(),touch:function touch(t,e,n){var r=new Touch(Object.assign({identifier:Date.now(),target:t,radiusX:2.5,radiusY:2.5,rotationAngle:10,force:.5},n));t.dispatchEvent(new TouchEvent(e,{cancelable:!0,bubbles:!0,shiftKey:!0,touches:[r],targetTouches:[],changedTouches:[r]}))}},tplProcess=function(t,e){var n=t;for(var r in e)n=n.replace(new RegExp("{=".concat(r,"}"),"g"),e[r]);return n},A=n(16),S=function(){function AxisRendererHelper(t,e){i()(this,AxisRendererHelper);var n=Object(A.scaleLinear)();this.config=t,this.scale=n,(t.noTransition||!e.config.transition_duration)&&(t.withoutTransition=!0),t.range=n.rangeExtent?n.rangeExtent():this.scaleExtent((e.orgXScale||n).range())}return s()(AxisRendererHelper,[{key:"axisX",value:function axisX(t,e){var n=this;t.attr("transform",(function(t){return"translate(".concat(Math.ceil(e(t)+n.config.tickOffset),",0)")}))}},{key:"axisY",value:function axisY(t,e){t.attr("transform",(function(t){return"translate(0,".concat(Math.ceil(e(t)),")")}))}},{key:"scaleExtent",value:function scaleExtent(t){var e=t[0],n=t[t.length-1];return e<n?[e,n]:[n,e]}},{key:"generateTicks",value:function generateTicks(t){var e=[];if(t.ticks)return t.ticks.apply(t,v()(this.config.tickArguments||[])).map((function(t){return isString(t)&&isNumber(t)&&!isNaN(t)&&Math.round(10*t)/10||t}));for(var n=t.domain(),r=Math.ceil(n[0]);r<n[1];r++)e.push(r);return e.length>0&&e[0]>0&&e.unshift(e[0]-(e[1]-e[0])),e}},{key:"copyScale",value:function copyScale(){var t=this.scale.copy();return t.domain().length||t.domain(this.scale.domain()),t}},{key:"textFormatted",value:function textFormatted(t){var e=this.config.tickFormat,n=/\d+\.\d+0{5,}\d$/.test(t)?+(t+"").replace(/0+\d$/,""):t,r=e?e(n):n;return isDefined(r)?r:""}},{key:"transitionise",value:function transitionise(t){var e=this.config;return e.withoutTransition?t.interrupt():t.transition(e.transition)}}],[{key:"getSizeFor1Char",value:function getSizeFor1Char(t){var e={w:5.5,h:11.5};return t.empty()||t.select("text").text("0").call((function(t){try{var n=t.node().getBBox(),r=n.width,i=n.height;r&&i&&(e.w=r,e.h=i),t.text("")}catch(t){}})),this.getSizeFor1Char=function(){return e},e}}]),AxisRendererHelper}(),k=function(){function AxisRenderer(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i()(this,AxisRenderer);var e={innerTickSize:6,outerTickSize:t.outerTick?6:0,orient:"bottom",range:[],tickArguments:null,tickCentered:null,tickCulling:!0,tickFormat:null,tickLength:9,tickOffset:0,tickPadding:3,tickValues:null,transition:null,noTransition:t.noTransition};e.tickLength=Math.max(e.innerTickSize,0)+e.tickPadding,this.helper=new S(e,t),this.config=e,this.params=t}return s()(AxisRenderer,[{key:"create",value:function create(t){var e=this,n=this.config,r=this.params,i=this.helper,a=i.scale,o=n.orient,c=this.splitTickText.bind(this),s=/^(left|right)$/.test(o),u=/^(top|bottom)$/.test(o),d=i[u?"axisX":"axisY"],h=d===i.axisX?"y":"x",p=/^(top|left)$/.test(o)?-1:1,g=r.tickTextRotate;this.config.range=a.rangeExtent?a.rangeExtent():i.scaleExtent((r.orgXScale||a).range());var v=n,m=v.innerTickSize,_=v.tickLength,b=v.range,w=r.name,T=w&&/^(x|y|y2)$/.test(w)?r.config["axis_".concat(w,"_tick_text_position")]:{x:0,y:0},A="subX"===w?"subchart_axis_x":"axis_".concat(w),k=r.config["".concat(A,"_show")],C=!!k&&r.config["".concat(A,"_tick_show")],M=!!k&&r.config["".concat(A,"_tick_text_show")],R=null;t.each((function(){var t=Object(l.select)(this),v=this.__chart__||a,w=i.copyScale();
2R=t,this.__chart__=w,n.tickOffset=r.isCategory?Math.ceil((w(1)-w(0))/2):0;var A=t.selectAll(".domain").data([0]);if(A.enter().append("path").attr("class","domain").merge(i.transitionise(A)).attr("d",(function(){var t=n.outerTickSize*p;return u?"M".concat(b[0],",").concat(t,"V0H").concat(b[1],"V").concat(t):"M".concat(t,",").concat(b[0],"H0V").concat(b[1],"H").concat(t)})),C||M){var k=n.tickValues||i.generateTicks(w),L=t.selectAll(".tick").data(k,w),E=L.enter().insert("g",".domain").attr("class","tick").style("opacity","1"),O=L.exit().remove();L=E.merge(L),C&&E.append("line"),M&&E.append("text");var P=S.getSizeFor1Char(L),F=[],D=L.select("text").selectAll("tspan").data((function(t,e){var n=r.tickMultiline?c(t,w,k,s,P.w):isArray(i.textFormatted(t))?i.textFormatted(t).concat():[i.textFormatted(t)];return F[e]=n.length,n.map((function(t){return{index:e,splitted:t}}))}));D.exit().remove(),(D=D.enter().append("tspan").merge(D).text((function(t){return t.splitted}))).attr("x",u?0:_*p).attr("dx",function(){var t=0;return"bottom"===o&&g&&(t=8*Math.sin(Math.PI*(g/180))),t+(T.x||0)}()).attr("dy",(function(t,e){var n=0;return"top"!==o&&(n=P.h,0===e&&(n=s?-((F[t.index]-1)*(P.h/2)-3):0===T.y?".71em":0)),isNumber(n)&&T.y?n+T.y:n||".71em"}));var I=L.select("line"),z=L.select("text");if(E.select("line").attr("".concat(h,"2"),m*p),E.select("text").attr("".concat(h),_*p),e.setTickLineTextPosition(I,z),r.tickTitle&&z.append&&z.append("title").each((function(t){Object(l.select)(this).text(r.tickTitle[t])})),w.bandwidth){var N=w,B=N.bandwidth()/2;w=v=function(t){return N(t)+B}}else v.bandwidth?v=w:d.call(i,O,w);d.call(i,E,v),d.call(i,i.transitionise(L).style("opacity","1"),w)}})),this.g=R}},{key:"getTickXY",value:function getTickXY(){var t=this.config,e={x:0,y:0};return this.params.isCategory&&(e.x=t.tickCentered?0:t.tickOffset,e.y=t.tickCentered?t.tickOffset:0),e}},{key:"getTickSize",value:function getTickSize(t){var e=this.helper.scale,n=this.config,r=n.innerTickSize,i=n.range,a=e(t)+(n.tickCentered?0:n.tickOffset);return i[0]<a&&a<i[1]?r:0}},{key:"setTickLineTextPosition",value:function setTickLineTextPosition(t,e){var n=this.getTickXY(),r=this.config,i=r.innerTickSize,a=r.orient,o=r.tickLength,c=r.tickOffset,s=this.params.tickTextRotate;"bottom"===a?(t.attr("x1",n.x).attr("x2",n.x).attr("y2",this.getTickSize.bind(this)),e.attr("x",0).attr("y",function yForText(t){return t?11.5-t/15*2.5*(t>0?1:-1):o}(s)).style("text-anchor",function textAnchorForText(t){return t?t>0?"start":"end":"middle"}(s)).attr("transform",function textTransform(t){return t?"rotate(".concat(t,")"):null}(s))):"top"===a?(t.attr("x2",0).attr("y2",-i),e.attr("x",0).attr("y",2*-o).style("text-anchor","middle")):"left"===a?(t.attr("x2",-i).attr("y1",n.y).attr("y2",n.y),e.attr("x",-o).attr("y",c).style("text-anchor","end")):"right"===a&&(t.attr("x2",i).attr("y2",0),e.attr("x",o).attr("y",0).style("text-anchor","start"))}},{key:"splitTickText",value:function splitTickText(t,e,n,r,i){var a=this.params,o=this.helper.textFormatted(t),c=isString(o)&&o.indexOf("\n")>-1?o.split("\n"):[];if(c.length)return c;if(isArray(o))return o;var s=a.tickWidth;return(!s||s<=0)&&(s=r?95:a.isCategory?Math.ceil(e(n[1])-e(n[0]))-12:110),function split(t,e){for(var n,r,a,o=1;o<e.length;o++)if(" "===e.charAt(o)&&(r=o),n=e.substr(0,o+1),a=i*n.length,s<a)return split(t.concat(e.substr(0,r||o)),e.slice(r?r+1:o));return t.concat(e)}(c,o+"")}},{key:"scale",value:function scale(t){return arguments.length?(this.helper.scale=t,this):this.helper.scale}},{key:"orient",value:function orient(t){return arguments.length?(this.config.orient=t in{top:1,right:1,bottom:1,left:1}?t+"":"bottom",this):this.config.orient}},{key:"tickFormat",value:function tickFormat(t){return arguments.length?(this.config.tickFormat=t,this):this.config.tickFormat}},{key:"tickCentered",value:function tickCentered(t){var e=this.config;return arguments.length?(e.tickCentered=t,this):e.tickCentered}},{key:"tickOffset",value:function tickOffset(){return this.config.tickOffset}},{key:"tickInterval",value:function tickInterval(t){var e;this.params.isCategory?e=2*this.config.tickOffset:e=(this.g.select("path.domain").node().getTotalLength()-2*this.config.outerTickSize)/(t||this.g.selectAll("line").size());return e===1/0?0:e}},{key:"ticks",value:function ticks(){for(var t=this.config,e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return n.length?(t.tickArguments=toArray(n),this):t.tickArguments}},{key:"tickCulling",value:function tickCulling(t){var e=this.config;return arguments.length?(e.tickCulling=t,this):e.tickCulling}},{key:"tickValues",value:function tickValues(t){var e=this,n=this.config;if(isFunction(t))n.tickValues=function(){return t(e.helper.scale.domain())};else{if(!arguments.length)return n.tickValues;n.tickValues=t}return this}},{key:"setTransition",value:function setTransition(t){return this.config.transition=t,this}}]),AxisRenderer}(),isHorizontal=function(t,e){var n=t.config.axis_rotated;return e?n:!n},getAxisClassName=function(t){return"".concat(p.axis," ").concat(p["axis".concat(capitalize(t))])},C=function(){function Axis(t){i()(this,Axis),this.owner=t,this.setOrient()}
2return s()(Axis,[{key:"init",value:function init(){var t=this,e=this.owner,n=e.config,r=n.axis_rotated,i=e.main,a=["x","y"];n.axis_y2_show&&a.push("y2"),e.axesList={},a.forEach((function(a){var o=getAxisClassName(a),c=p["axis".concat(capitalize(a),"Label")];e.axes[a]=i.append("g").attr("class",o).attr("clip-path",(function(){var t=null;return"x"===a?t=e.clipPathForXAxis:"y"===a&&n.axis_y_inner&&(t=e.clipPathForYAxis),t})).attr("transform",e.getTranslate(a)).style("visibility",n["axis_".concat(a,"_show")]?"visible":"hidden"),e.axes[a].append("text").attr("class",c).attr("transform",["rotate(-90)",null]["x"===a?+!r:+r]).style("text-anchor",t.textAnchorForXAxisLabel.bind(t)),t.generateAxes(a)}))}},{key:"setOrient",value:function setOrient(){var t=this.owner,e=t.config,n=e.axis_rotated,r=e.axis_y_inner,i=e.axis_y2_inner;t.xOrient=n?"left":"bottom",t.yOrient=n?r?"top":"bottom":r?"right":"left",t.y2Orient=n?i?"bottom":"top":i?"left":"right",t.subXOrient=n?"left":"bottom"}},{key:"generateAxes",value:function generateAxes(t){var e,n=this.owner,r=n.config,i=[],a=r["axis_".concat(t,"_axes")],o=r.axis_rotated;"x"===t?e=o?h.axisLeft:h.axisBottom:"y"===t?e=o?h.axisBottom:h.axisLeft:"y2"===t&&(e=o?h.axisTop:h.axisRight),a.length&&a.forEach((function(r){var a=r.tick;i.push(e(n[t]).ticks(a.count).tickFormat(a.format||function(t){return t}).tickValues(a.values).tickSizeOuter(!1===a.outer?0:6))})),n.axesList[t]=i}},{key:"updateAxes",value:function updateAxes(){var t=this.owner,e=t.config;Object.keys(t.axesList).forEach((function(n){var r=t[n].range();t.axesList[n].forEach((function(i,a){var o=i.scale().range();r.every((function(t,e){return t===o[e]}))||i.scale().range(r);var c="".concat(getAxisClassName(n),"-").concat(a+1),s=t.main.select(".".concat(c.replace(/\s/,".")));s.empty()?s=t.main.append("g").attr("class",c).style("visibility",e["axis_".concat(n,"_show")]?"visible":"hidden").call(i):t.xAxis.helper.transitionise(s).call(i.scale(t[n])),s.attr("transform",t.getTranslate(n,a+1))}))}))}},{key:"getXAxis",value:function getXAxis(t,e,n,r,i){var a=this.owner,o=a.config,c=a.isCategorized(),s=a["".concat(t,"Orient")],u=a.xAxisTickFormat,l=a.xAxisTickValues,d={isCategory:c,outerTick:n,noTransition:r,config:o,name:t,tickMultiline:o.axis_x_tick_multiline,tickWidth:o.axis_x_tick_width,tickTextRotate:i?0:o.axis_x_tick_rotate,tickTitle:c&&o.axis_x_tick_tooltip&&a.api.categories(),orgXScale:a.x},h=new k(d).scale(a.zoomScale||e).orient(s),p=l;return a.isTimeSeries()&&l&&!isFunction(l)&&(p=l.map((function(t){return a.parseDate(t)}))),h.tickFormat(u).tickValues(p),c&&(h.tickCentered(o.axis_x_tick_centered),isEmpty(o.axis_x_tick_culling)&&(o.axis_x_tick_culling=!1)),o.axis_x_tick_count&&h.ticks(o.axis_x_tick_count),h}},{key:"getYAxis",value:function getYAxis(t,e,n,r,i){var a=this.owner,o=a.config,c=a["".concat(t,"Orient")],s=o["axis_".concat(t,"_tick_format")],u=a["".concat(t,"AxisTickValues")],l={outerTick:n,noTransition:r,config:o,name:t,tickTextRotate:i?0:o.axis_y_tick_rotate},d=new k(l).scale(e).orient(c).tickFormat(s||a.isStackNormalized()&&function(t){return"".concat(t,"%")});return a.isTimeSeriesY()?d.ticks(o.axis_y_tick_time_value):d.tickValues(u),d}},{key:"updateXAxisTickValues",value:function updateXAxisTickValues(t,e){var n,r=this.owner,i=r.config,a=i.axis_x_tick_fit,o=i.axis_x_tick_count;return(a||o&&a)&&(n=this.generateTickValues(r.mapTargetsToUniqueXs(t),o,r.isTimeSeries())),e?e.tickValues(n):r.xAxis&&(r.xAxis.tickValues(n),r.subXAxis.tickValues(n)),n}},{key:"getId",value:function getId(t){var e=this.owner.config;return t in e.data_axes?e.data_axes[t]:"y"}},{key:"getXAxisTickFormat",value:function getXAxisTickFormat(){var t,e=this.owner,n=e.config.axis_x_tick_format,r=e.isTimeSeries(),i=e.isCategorized();return n?isFunction(n)?t=n:r&&(t=function(t){return t?e.axisTimeFormat(n)(t):""}):t=r?e.defaultAxisTimeFormat:i?e.categoryName:function(t){return t<0?t.toFixed(0):t},isFunction(t)?function(n){return t.apply(e,i?[n,e.categoryName(n)]:[n])}:t}},{key:"getTickValues",value:function getTickValues(t){var e=this.owner,n=e.config["axis_".concat(t,"_tick_values")],r
2=e["".concat(t,"Axis")];return n||(r?r.tickValues():void 0)}},{key:"getXAxisTickValues",value:function getXAxisTickValues(){return this.getTickValues("x")}},{key:"getYAxisTickValues",value:function getYAxisTickValues(){return this.getTickValues("y")}},{key:"getY2AxisTickValues",value:function getY2AxisTickValues(){return this.getTickValues("y2")}},{key:"getLabelOptionByAxisId",value:function getLabelOptionByAxisId(t){return this.owner.config["axis_".concat(t,"_label")]}},{key:"getLabelText",value:function getLabelText(t){var e=this.getLabelOptionByAxisId(t);return isString(e)?e:e?e.text:null}},{key:"setLabelText",value:function setLabelText(t,e){var n=this.owner.config,r=this.getLabelOptionByAxisId(t);isString(r)?n["axis_".concat(t,"_label")]=e:r&&(r.text=e)}},{key:"getLabelPosition",value:function getLabelPosition(t,e){var n=this.owner.config.axis_rotated,r=this.getLabelOptionByAxisId(t),i=isObjectType(r)&&r.position?r.position:e[+!n],has=function(t){return!!~i.indexOf(t)};return{isInner:has("inner"),isOuter:has("outer"),isLeft:has("left"),isCenter:has("center"),isRight:has("right"),isTop:has("top"),isMiddle:has("middle"),isBottom:has("bottom")}}},{key:"getXAxisLabelPosition",value:function getXAxisLabelPosition(){return this.getLabelPosition("x",["inner-top","inner-right"])}},{key:"getYAxisLabelPosition",value:function getYAxisLabelPosition(){return this.getLabelPosition("y",["inner-right","inner-top"])}},{key:"getY2AxisLabelPosition",value:function getY2AxisLabelPosition(){return this.getLabelPosition("y2",["inner-right","inner-top"])}},{key:"getLabelPositionById",value:function getLabelPositionById(t){return this["get".concat(t.toUpperCase(),"AxisLabelPosition")]()}},{key:"textForXAxisLabel",value:function textForXAxisLabel(){return this.getLabelText("x")}},{key:"textForYAxisLabel",value:function textForYAxisLabel(){return this.getLabelText("y")}},{key:"textForY2AxisLabel",value:function textForY2AxisLabel(){return this.getLabelText("y2")}},{key:"xForAxisLabel",value:function xForAxisLabel(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.owner,r=t.isMiddle?-n.height/2:0;return isHorizontal(n,e)?r=t.isLeft?0:t.isCenter?n.width/2:n.width:t.isBottom&&(r=-n.height),r}},{key:"dxForAxisLabel",value:function dxForAxisLabel(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.owner,r=t.isBottom?"0.5em":"0";return isHorizontal(n,e)?r=t.isLeft?"0.5em":t.isRight?"-0.5em":"0":t.isTop&&(r="-0.5em"),r}},{key:"textAnchorForAxisLabel",value:function textAnchorForAxisLabel(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.owner,r=t.isMiddle?"middle":"end";return isHorizontal(n,e)?r=t.isLeft?"start":t.isCenter?"middle":"end":t.isBottom&&(r="start"),r}},{key:"xForXAxisLabel",value:function xForXAxisLabel(){return this.xForAxisLabel(this.getXAxisLabelPosition(),!1)}},{key:"xForYAxisLabel",value:function xForYAxisLabel(){return this.xForAxisLabel(this.getYAxisLabelPosition())}},{key:"xForY2AxisLabel",value:function xForY2AxisLabel(){return this.xForAxisLabel(this.getY2AxisLabelPosition())}},{key:"dxForXAxisLabel",value:function dxForXAxisLabel(){return this.dxForAxisLabel(this.getXAxisLabelPosition(),!1)}},{key:"dxForYAxisLabel",value:function dxForYAxisLabel(){return this.dxForAxisLabel(this.getYAxisLabelPosition())}},{key:"dxForY2AxisLabel",value:function dxForY2AxisLabel(){return this.dxForAxisLabel(this.getY2AxisLabelPosition())}},{key:"dyForXAxisLabel",value:function dyForXAxisLabel(){var t=this.owner.config,e=this.getXAxisLabelPosition().isInner,n=t.axis_x_height;return t.axis_rotated?e?"1.2em":-25-this.getMaxTickWidth("x"):e?"-0.5em":n?n-10:"3em"}},{key:"dyForYAxisLabel",value:function dyForYAxisLabel(){var t=this.owner,e=this.getYAxisLabelPosition().isInner;return t.config.axis_rotated?e?"-0.5em":"3em":e?"1.2em":-10-(t.config.axis_y_inner?0:this.getMaxTickWidth("y")+10)}},{key:"dyForY2AxisLabel",value:function dyForY2AxisLabel(){var t=this.owner,e=this.getY2AxisLabelPosition().isInner;return t.config.axis_rotated?e?"1.2em":"-2.2em":e?"-0.5em":15+(t.config.axis_y2_inner?0:this.getMaxTickWidth("y2")+15)}},{key:"textAnchorForXAxisLabel",value:function textAnchorForXAxisLabel(){return this.textAnchorForAxisLabel(this.getXAxisLabelPosition(),!1)}},{key:"textAnchorForYAxisLabel",value:function textAnchorForYAxisLabel(){return this.textAnchorForAxisLabel(this.getYAxisLabelPosition())}},{key:"textAnchorForY2AxisLabel",value:function textAnchorForY2AxisLabel(){return this.textAnchorForAxisLabel(this.getY2AxisLabelPosition())}},{key:"getMaxTickWidth",value:function getMaxTickWidth(t,e){var n=this.owner,r=n.config,i=n.currentMaxTickWidths[t],a=0;if(e||!r["axis_".concat(t,"_show")])return i.size;if(n.svg){var o=/^y2?$/.test(t),c=n.filterTargetsToShow(n.data.targets),s=o?"getY":"getX",u=n[t].copy().domain(n["".concat(s,"Domain")](c,t)),l=u.domain();if(isArray(i.domain)&&i.domain.every((function(t,e){return t===l[e]})))return i.size;i.domain=l;var d=this["".concat(s,"Axis")](t,u,!1,!1,!0),h=r["axis_".concat(t,"_tick_count")];h&&d.tickValues(this.generateTickValues(l,h,o?n.isTimeSeriesY():n.isTimeSeries())),o||this.updateXAxisTickValues(c,d);var p=n.selectChart.append("svg").style("visibility","hidden").style("position","fixed").style("top","0px").style("left","0px");d.create(p),p.selectAll("text").each((function(){a=Math.max(a,this.getBoundingClientRect().width)})),p.remove()}return a>0&&(i.size=a),i.size}},{key:"updateLabels",value:function updateLabels(t){var e=this,n=this.owner,r={X:n.main.select(".".concat(p.axisX," .").concat(p.axisXLabel)),Y:n.main.select(".".concat(p.axisY," .").concat(p.axisYLabel)),Y2:n.main.select(".".concat(p.axisY2," .").concat(p.axisY2Label))};Object.keys(r).filter((function(t){return!r[t].empty()}
2)).forEach((function(n){var i=r[n],a="".concat(n,"AxisLabel");(t?i.transition():i).attr("x",e["xFor".concat(a)].bind(e)).attr("dx",e["dxFor".concat(a)].bind(e)).attr("dy",e["dyFor".concat(a)].bind(e)).text(e["textFor".concat(a)].bind(e))}))}},{key:"getPadding",value:function getPadding(t,e,n,r){var i=isNumber(t)?t:t[e];return isValue(i)?"ratio"===t.unit?t[e]*r:this.convertPixelsToAxisPadding(i,r):n}},{key:"convertPixelsToAxisPadding",value:function convertPixelsToAxisPadding(t,e){var n=this.owner;return e*(t/(n.config.axis_rotated?n.width:n.height))}},{key:"generateTickValues",value:function generateTickValues(t,e,n){var r,i,a,o,c,s,u=t;if(e){var l=isFunction(e)?e():e;if(1===l)u=[t[0]];else if(2===l)u=[t[0],t[t.length-1]];else if(l>2){for(a=l-2,r=t[0],o=((i=t[t.length-1])-r)/(a+1),u=[r],c=0;c<a;c++)s=+r+o*(c+1),u.push(n?new Date(s):s);u.push(i)}}return n||(u=u.sort((function(t,e){return t-e}))),u}},{key:"generateTransitions",value:function generateTransitions(t){var e=this.owner.axes,n=["x","y","y2","subx"].map((function(n){var r=e[n];return r&&t&&(r=r.transition().duration(t)),r})),r=o()(n,4);return{axisX:r[0],axisY:r[1],axisY2:r[2],axisSubX:r[3]}}},{key:"redraw",value:function redraw(t,e,n){var r=this.owner,i=e?"0":"1";["x","y","y2","subX"].forEach((function(e){var a=r["".concat(e,"Axis")];a&&(!n&&(a.config.withoutTransition=!r.config.transition_duration),r.axes[e.toLowerCase()].style("opacity",i),a.create(t["axis".concat(capitalize(e))]))})),this.updateAxes()}}]),Axis}(),M=n(17),R=function(){function ChartInternal(t){i()(this,ChartInternal);var e=this;e.api=t,e.config=e.getOptions(),e.data={},e.cache={},e.axes={}}return s()(ChartInternal,[{key:"beforeInit",value:function beforeInit(){var t=this;t.config.stats&&function(){if(navigator&&localStorage){var t="https://www.google-analytics.com/collect?v=1&tid=UA-141911582-1&cid=555&t=pageview&dp=%2F".concat(location?location.hostname:""),e=+new Date,n=+localStorage.getItem("$bb.stats"),r=12096e5;if(!n||n+r<e)if(localStorage.setItem("$bb.stats",e+r),navigator.sendBeacon)navigator.sendBeacon(t);else{var i=new Image;i.src=t,i.style.display="none",document.body.appendChild(i),document.body.removeChild(i)}}}(),t.callPluginHook("$beforeInit"),callFn(t.config.onbeforeinit,t)}},{key:"afterInit",value:function afterInit(){var t=this;t.callPluginHook("$afterInit"),callFn(t.config.onafterinit,t)}},{key:"init",value:function init(){var t=this;t.initParams();var e=t.convertData(t.config,t.initWithData);e&&t.initWithData(e)}},{key:"initParams",value:function initParams(){var t=this,e=this,n=e.config,r=n.axis_rotated;e.datetimeId="bb-".concat(+new Date),e.initClip(),e.dragStart=null,e.dragging=!1,e.flowing=!1,e.cancelClick=!1,e.mouseover=!1,e.transiting=!1,e.color=e.generateColor(),e.levelColor=e.generateLevelColor(),e.point=e.generatePoint(),e.extraLineClasses=e.generateExtraLineClass(),e.dataTimeFormat=n.data_xLocaltime?u.timeParse:u.utcParse,e.axisTimeFormat=n.axis_x_localtime?u.timeFormat:u.utcFormat;var i=e.config.zoom_enabled&&"drag"===e.config.zoom_enabled.type;e.defaultAxisTimeFormat=function(n){var r=i?t.zoomScale:t.zoomScale&&e.x.orgDomain().toString()!==t.zoomScale.domain().toString(),a=(n.getMilliseconds()?".%L":n.getSeconds()&&".:%S")||n.getMinutes()&&"%I:%M"||n.getHours()&&"%I %p"||1!==n.getDate()&&"%b %d"||r&&1===n.getDate()&&"%b'%y"||n.getMonth()&&"%-m/%-d"||"%Y";return e.axisTimeFormat(a)(n)},e.hiddenTargetIds=[],e.hiddenLegendIds=[],e.focusedTargetIds=[],e.defocusedTargetIds=[],e.isLegendRight="right"===n.legend_position,e.isLegendInset="inset"===n.legend_position,e.isLegendTop="top-left"===n.legend_inset_anchor||"top-right"===n.legend_inset_anchor,e.isLegendLeft="top-left"===n.legend_inset_anchor||"bottom-left"===n.legend_inset_anchor,e.legendStep=0,e.legendItemWidth=0,e.legendItemHeight=0,e.currentMaxTickWidths={x:{size:0,domain:""},y:{size:0,domain:""},y2:{size:0,domain:""}},e.rotated_padding_left=30,e.rotated_padding_right=r&&!n.axis_x_show?0:30,e.rotated_padding_top=5,e.withoutFadeIn={},e.inputType=e.convertInputType(),e.axes.subx=Object(l.selectAll)([])}},{key:"initWithData",value:function initWithData(t){var e=this,n=e.config;e.axis=new C(e),n.zoom_enabled&&e.initZoom();var r={element:n.bindto,classname:"bb"};if(isObject(n.bindto)&&(r.element=n.bindto.element||"#chart",r.classname=n.bindto.classname||r.classname),e.selectChart=isFunction(r.element.node)?n.bindto.element:Object(l.select)(r.element||[]),e.selectChart.empty()&&(e.selectChart=Object(l.select)(document.body.appendChild(document.createElement("div")))),e.selectChart.html("").classed(r.classname,!0),e.data.xs={},e.data.targets=e.convertDataToTargets(t),n.data_filter&&(e.data.targets=e.data.targets.filter(n.data_filter)),n.data_hide&&e.addHiddenTargetIds(!0===n.data_hide?e.mapToIds(e.data.targets):n.data_hide),n.legend_hide&&e.addHiddenLegendIds(!0===n.legend_hide?e.mapToIds(e.data.targets):n.legend_hide),e.hasType("gauge")&&(n.legend_show=!1),e.updateSizes(),e.updateScales(!0),e.x&&(e.x.domain(sortValue(e.getXDomain(e.data.targets))),e.subX.domain(e.x.domain()),e.orgXDomain=e.x.domain()),e.y&&(e.y.domain(e.getYDomain(e.data.targets,"y")),e.subY.domain(e.y.domain())),e.y2&&(e.y2.domain(e.getYDomain(e.data.targets,"y2")),e.subY2&&e.subY2.domain(e.y2.domain())),e.svg=e.selectChart.append("svg").style("overflow","hidden").style("display","block"),n.interaction_enabled&&e.inputType){var i="touch"===e.inputType;e.svg.on(i?"touchstart":"mouseenter",(function(){return callFn(n.onover,e)}
2)).on(i?"touchend":"mouseleave",(function(){return callFn(n.onout,e)}))}n.svg_classname&&e.svg.attr("class",n.svg_classname),e.defs=e.svg.append("defs"),e.clipChart=e.appendClip(e.defs,e.clipId),e.clipXAxis=e.appendClip(e.defs,e.clipIdForXAxis),e.clipYAxis=e.appendClip(e.defs,e.clipIdForYAxis),e.clipGrid=e.appendClip(e.defs,e.clipIdForGrid),isFunction(n.color_tiles)&&e.patterns&&e.patterns.forEach((function(t){return e.defs.append((function(){return t.node}))})),e.updateSvgSize();var a=e.svg.append("g").attr("transform",e.getTranslate("main"));if(e.main=a,n.subchart_show&&e.initSubchart(),e.initTooltip&&e.initTooltip(),e.initLegend&&e.initLegend(),e.initTitle&&e.initTitle(),n.data_empty_label_text&&a.append("text").attr("class","".concat(p.text," ").concat(p.empty)).attr("text-anchor","middle").attr("dominant-baseline","middle"),e.initRegion(),n.clipPath||e.axis.init(),a.append("g").attr("class",p.chart).attr("clip-path",e.clipPath),e.callPluginHook("$init"),e.initEventRect(),e.initChartElements(),e.initGrid(),a.insert("rect",n.zoom_privileged?null:"g.".concat(p.regions)).attr("class",p.zoomRect).attr("width",e.width).attr("height",e.height).style("opacity","0").on("dblclick.zoom",null),n.clipPath&&e.axis.init(),e.updateTargets(e.data.targets),e.updateDimension(),n.oninit.call(e),e.redraw({withTransition:!1,withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withTransitionForAxis:!1,initializing:!0}),n.data_onmin||n.data_onmax){var o=e.getMinMaxData();callFn(n.data_onmin,e,o.min),callFn(n.data_onmax,e,o.max)}e.bindResize(),e.api.element=e.selectChart.node()}},{key:"initChartElements",value:function initChartElements(){var t=this;["Bar","Line","Bubble","Arc","Gauge","Pie","Radar"].forEach((function(e){t["init".concat(e)]()})),notEmpty(t.config.data_labels)&&t.initText()}},{key:"getChartElements",value:function getChartElements(){var t=this;return{chart:t.selectChart,svg:t.svg,defs:t.defs,main:t.main,tooltip:t.tooltip,legend:t.legend,title:t.title,grid:t.grid,arc:t.arcs,bar:{bars:t.mainBar},line:{lines:t.mainLine,areas:t.mainArea,circles:t.mainCircle},text:{texts:t.mainText}}}},{key:"smoothLines",value:function smoothLines(t,e){"grid"===e&&t.each((function(){var t=Object(l.select)(this),e=["x1","x2","y1","y2"].map((function(e){return Math.ceil(t.attr(e))})),n=o()(e,4),r=n[0],i=n[1],a=n[2],c=n[3];t.attr({x1:r,x2:i,y1:a,y2:c})}))}},{key:"updateSizes",value:function updateSizes(t){var e=this,n=e.config,r=n.axis_rotated,i=e.hasArcType(),a={width:e.legend?e.getLegendWidth():0,height:e.legend?e.getLegendHeight():0},o=e.isLegendRight||e.isLegendInset?0:a.height,c=r||i?0:e.getHorizontalAxisHeight("x"),s=n.subchart_axis_x_show&&n.subchart_axis_x_tick_text_show?c:30,u=n.subchart_show&&!i?n.subchart_size_height+s:0;t||e.setContainerSize(),e.margin=r?{top:e.getHorizontalAxisHeight("y2")+e.getCurrentPaddingTop(),right:i?0:e.getCurrentPaddingRight(),bottom:e.getHorizontalAxisHeight("y")+o+e.getCurrentPaddingBottom(),left:u+(i?0:e.getCurrentPaddingLeft())}:{top:4+e.getCurrentPaddingTop(),right:i?0:e.getCurrentPaddingRight(),bottom:c+u+o+e.getCurrentPaddingBottom(),left:i?0:e.getCurrentPaddingLeft()},e.margin2=r?{top:e.margin.top,right:NaN,bottom:20+o,left:e.rotated_padding_left}:{top:e.currentHeight-u-o,right:NaN,bottom:s+o,left:e.margin.left},e.margin3={top:0,right:NaN,bottom:0,left:0},e.updateSizeForLegend&&e.updateSizeForLegend(a),e.width=e.currentWidth-e.margin.left-e.margin.right,e.height=e.currentHeight-e.margin.top-e.margin.bottom,e.width<0&&(e.width=0),e.height<0&&(e.height=0),e.width2=r?e.margin.left-e.rotated_padding_left-e.rotated_padding_right:e.width,e.height2=r?e.height:e.currentHeight-e.margin2.top-e.margin2.bottom,e.width2<0&&(e.width2=0),e.height2<0&&(e.height2=0),e.arcWidth=e.width-(e.isLegendRight?a.width+10:0),e.arcHeight=e.height-(e.isLegendRight?0:10),e.hasType("gauge")&&!n.gauge_fullCircle&&(e.arcHeight+=e.height-e.getGaugeLabelHeight()),e.updateRadius&&e.updateRadius(),e.isLegendRight&&i&&(e.margin3.left=e.arcWidth/2+1.1*e.radiusExpanded)}},{key:"updateTargets",value:function updateTargets(t){var e=this;e.updateTargetsForText(t),e.updateTargetsForBar(t),e.updateTargetsForLine(t),e.hasArcType(t)&&(e.hasType("radar")?e.updateTargetsForRadar(t):e.updateTargetsForArc(t)),e.updateTargetsForSubchart&&e.updateTargetsForSubchart(t),e.showTargets()}},{key:"showTargets",value:function showTargets(){var t=this;t.svg.selectAll(".".concat(p.target)).filter((function(e){return t.isTargetToShow(e.id)}
2)).transition().duration(t.config.transition_duration).style("opacity","1")}},{key:"getWithOption",value:function getWithOption(t){var e={Y:!0,Subchart:!0,Transition:!0,EventRect:!0,Dimension:!0,TrimXDomain:!0,Transform:!1,UpdateXDomain:!1,UpdateOrgXDomain:!1,Legend:!1,UpdateXAxis:"UpdateXDomain",TransitionForExit:"Transition",TransitionForAxis:"Transition"};return Object.keys(e).forEach((function(n){var r=e[n];isString(r)&&(r=e[r]),e[n]=getOption(t,"with".concat(n),r)})),e}},{key:"redraw",value:function redraw(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0,n=this,r=n.main,i=n.config,a=n.filterTargetsToShow(n.data.targets),o=t.initializing,c=t.flow,s=n.getWithOption(t),u=s.Transition?i.transition_duration:0,l=s.TransitionForExit?u:0,d=s.TransitionForAxis?u:0,h=e||n.axis.generateTransitions(d);o&&i.tooltip_init_show||"touch"!==n.inputType||n.hideTooltip(),n.updateSizes(o),s.Legend&&i.legend_show?n.updateLegend(n.mapToIds(n.data.targets),t,h):s.Dimension&&n.updateDimension(!0),n.redrawAxis(a,s,h,c,o),n.updateCircleY(),n.updateXgridFocus(),i.data_empty_label_text&&r.select("text.".concat(p.text,".").concat(p.empty)).attr("x",n.width/2).attr("y",n.height/2).text(i.data_empty_label_text).style("display",a.length?"none":null),n.updateGrid(u),n.updateRegion(u),n.updateBar(l),n.updateLine(l),n.updateArea(l),n.updateCircle(),n.hasDataLabel()&&n.updateText(l),n.redrawTitle&&n.redrawTitle(),n.arcs&&n.redrawArc(u,l,s.Transform),n.radars&&n.redrawRadar(u,l),n.mainText&&r.selectAll(".".concat(p.selectedCircles)).filter(n.isBarType.bind(n)).selectAll("circle").remove(),i.interaction_enabled&&!c&&s.EventRect&&(n.redrawEventRect(),n.bindZoomEvent()),n.generateRedrawList(a,c,u,s.Subchart),n.callPluginHook("$redraw",t,u)}},{key:"redrawAxis",value:function redrawAxis(t,e,n,r,i){var a,o,c,s=this,u=s.config,d=s.hasArcType(),h=!!s.zoomScale;if(!h&&s.isCategorized()&&0===t.length&&s.x.domain([0,s.axes.x.selectAll(".tick").size()]),s.x&&t.length?(!h&&s.updateXDomain(t,e.UpdateXDomain,e.UpdateOrgXDomain,e.TrimXDomain),!u.axis_x_tick_values&&(a=s.axis.updateXAxisTickValues(t))):s.xAxis&&(s.xAxis.tickValues([]),s.subXAxis.tickValues([])),u.zoom_rescale&&!r&&(c=s.x.orgDomain()),["y","y2"].forEach((function(e){var n=s[e];if(n){var r=u["axis_".concat(e,"_tick_values")],i=u["axis_".concat(e,"_tick_count")];if(n.domain(s.getYDomain(t,e,c)),!r&&i){var a=n.domain();s["".concat(e,"Axis")].tickValues(s.axis.generateTickValues(a,a.every((function(t){return 0===t}))?1:i,s.isTimeSeriesY()))}}})),s.axis.redraw(n,d,i),s.axis.updateLabels(e.Transition),(e.UpdateXDomain||e.UpdateXAxis)&&t.length)if(u.axis_x_tick_culling&&a){for(var g=1;g<a.length;g++)if(a.length/g<u.axis_x_tick_culling_max){o=g;break}s.svg.selectAll(".".concat(p.axisX," .tick text")).each((function(t){var e=a.indexOf(t);e>=0&&Object(l.select)(this).style("display",e%o?"none":"block")}))}else s.svg.selectAll(".".concat(p.axisX," .tick text")).style("display","block");e.Y&&(s.subY&&s.subY.domain(s.getYDomain(t,"y")),s.subY2&&s.subY2.domain(s.getYDomain(t,"y2")))}},{key:"generateRedrawList",value:function generateRedrawList(t,e,n,r){var i=this,a=i.config,o=i.getDrawShape();a.subchart_show&&i.redrawSubchart(r,n,o);var c=e&&i.generateFlow({targets:t,flow:e,duration:e.duration,shape:o,xv:i.xv.bind(i)}),s=(n||c)&&i.isTabVisible(),u=i.getRedrawList(o,e,c,s),l=e||a.onrendered?function(){c&&c(),callFn(a.onrendered,i)}:null;if(l)if(s){var h=i.generateWait();Object(d.transition)().duration(n).each((function(){u.reduce((function(t,e){return t.concat(e)}),[]).forEach((function(t){return h.add(t)}))})).call(h,l)}else l();i.mapToIds(i.data.targets).forEach((function(t){i.withoutFadeIn[t]=!0}))}},{key:"getDrawShape",value:function getDrawShape(){var t=this,e=t.config.axis_rotated,n=t.hasType("radar"),r={type:{},indices:{}};if(t.hasTypeOf("Line")||t.hasType("bubble")||t.hasType("scatter")){var i=t.getShapeIndices(t.isLineType);if(r.indices.line=i,r.type.line=t.generateDrawLine?t.generateDrawLine(i,!1):void 0,t.hasTypeOf("Area")){var a=t.getShapeIndices(t.isAreaType);r.indices.area=a,r.type.area=t.generateDrawArea?t.generateDrawArea(a,!1):void 0}}if(t.hasType("bar")){var o=t.getShapeIndices(t.isBarType);r.indices.bar=o,r.type.bar=t.generateDrawBar?t.generateDrawBar(o):void 0}return r.pos={xForText:t.generateXYForText(r.indices,!0),yForText:t.generateXYForText(r.indices,!1),cx:(n?t.radarCircleX:e?t.circleY:t.circleX).bind(t),cy:(n?t.radarCircleY:e?t.circleX:t.circleY).bind(t)},r}},{key:"getRedrawList",value:function getRedrawList(t,e,n,r){var i=this,a=i.config,o=i.hasArcType(),c=t.pos,s=c.cx,u=c.cy,l=c.xForText,d=c.yForText,h=[];if(!o){var p=t.type,g=p.area,v=p.bar,m=p.line;(a.grid_x_lines.length||a.grid_y_lines.length)&&h.push(i.redrawGri
2d(r)),a.regions.length&&h.push(i.redrawRegion(r)),i.hasTypeOf("Line")&&(h.push(i.redrawLine(m,r)),i.hasTypeOf("Area")&&h.push(i.redrawArea(g,r))),i.hasType("bar")&&h.push(i.redrawBar(v,r)),notEmpty(a.data_labels)&&h.push(i.redrawText(l,d,e,r))}return(!o||i.hasType("radar"))&&h.push(i.redrawCircle(s,u,r,n)),h}},{key:"updateAndRedraw",value:function updateAndRedraw(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=this,r=n.config;e.withTransition=getOption(e,"withTransition",!0),e.withTransform=getOption(e,"withTransform",!1),e.withLegend=getOption(e,"withLegend",!1),e.withUpdateXDomain=!0,e.withUpdateOrgXDomain=!0,e.withTransitionForExit=!1,e.withTransitionForTransform=getOption(e,"withTransitionForTransform",e.withTransition),e.withLegend&&r.legend_show||(t=n.axis.generateTransitions(e.withTransitionForAxis?r.transition_duration:0),n.updateScales(),n.updateSvgSize(),n.transformAll(e.withTransitionForTransform,t)),n.redraw(e,t)}},{key:"redrawWithoutRescale",value:function redrawWithoutRescale(){this.redraw({withY:!1,withSubchart:!1,withEventRect:!1,withTransitionForAxis:!1})}},{key:"isTimeSeries",value:function isTimeSeries(){return"timeseries"===this.config.axis_x_type}},{key:"isCategorized",value:function isCategorized(){return this.config.axis_x_type.indexOf("category")>=0||this.hasType("radar")}},{key:"isCustomX",value:function isCustomX(){var t=this.config;return!this.isTimeSeries()&&(t.data_x||notEmpty(t.data_xs))}},{key:"isTimeSeriesY",value:function isTimeSeriesY(){return"timeseries"===this.config.axis_y_type}},{key:"getTranslate",value:function getTranslate(t){var e,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=this,a=i.config.axis_rotated,o=0;if(r&&/^(x|y2?)$/.test(t)&&(o=i.getAxisSize(t)*r),"main"===t)e=asHalfPixel(i.margin.left),n=asHalfPixel(i.margin.top);else if("context"===t)e=asHalfPixel(i.margin2.left),n=asHalfPixel(i.margin2.top);else if("legend"===t)e=i.margin3.left,n=i.margin3.top;else if("x"===t)e=a?-o:0,n=a?0:i.height+o;else if("y"===t)e=a?0:-o,n=a?i.height+o:0;else if("y2"===t)e=a?0:i.width+o,n=a?1-o:0;else if("subx"===t)e=0,n=a?0:i.height2;else if("arc"===t)e=i.arcWidth/2,n=i.arcHeight/2;else if("radar"===t){var c=(i.arcWidth-i.arcHeight)/2;e=Math.max(c,0)+4,n=c<0?Math.abs(c):asHalfPixel(i.margin.top)}return"translate(".concat(e,", ").concat(n,")")}},{key:"initialOpacity",value:function initialOpacity(t){return null!==this.getBaseValue(t)&&this.withoutFadeIn[t.id]?"1":"0"}},{key:"initialOpacityForCircle",value:function initialOpacityForCircle(t){return null!==this.getBaseValue(t)&&this.withoutFadeIn[t.id]?this.opacityForCircle(t):"0"}},{key:"opacityForCircle",value:function opacityForCircle(t){var e=this.config.point_show?"1":"0";return isValue(this.getBaseValue(t))?this.isBubbleType(t)||this.isScatterType(t)?"0.5":e:"0"}},{key:"opacityForText",value:function opacityForText(){return this.hasDataLabel()?"1":"0"}},{key:"xx",value:function xx(t){var e=this.config.zoom_enabled&&this.zoomScale?this.zoomScale:this.x;return t?e(t.x):null}},{key:"xv",value:function xv(t){var e=this,n=e.getBaseValue(t);return e.isTimeSeries()?n=e.parseDate(n):e.isCategorized()&&isString(n)&&(n=e.config.axis_x_categories.indexOf(n)),Math.ceil(e.x(n))}},{key:"yv",value:function yv(t){var e=this,n=t.axis&&"y2"===t.axis?e.y2:e.y;return Math.ceil(n(e.getBaseValue(t)))}},{key:"subxx",value:function subxx(t){return t?this.subX(t.x):null}},{key:"transformMain",value:function transformMain(t,e){var n,r,i,a=this;e&&e.axisX?n=e.axisX:(n=a.main.select(".".concat(p.axisX)),t&&(n=n.transition())),e&&e.axisY?r=e.axisY:(r=a.main.select(".".concat(p.axisY)),t&&(r=r.transition())),e&&e.axisY2?i=e.axisY2:(i=a.main.select(".".concat(p.axisY2)),t&&(i=i.transition())),(t?a.main.transition():a.main).attr("transform",a.getTranslate("main")),n.attr("transform",a.getTranslate("x")),r.attr("transform",a.getTranslate("y")),i.attr("transform",a.getTranslate("y2")),a.main.select(".".concat(p.chartArcs)).attr("transform",a.getTranslate("arc"))}},{key:"transformAll",value:function transformAll(t,e){var n=this;n.transformMain(t,e),n.config.subchart_show&&n.transformContext(t,e),n.legend&&n.transformLegend(t)}},{key:"updateSvgSize",value:function updateSvgSize(){var t=this,e=t.svg.select(".".concat(p.brush," .overlay")),n={width:0,height:0};e.size()&&(n.width=+e.attr("width"),n.height=+e.attr("height")),t.svg.attr("width",t.currentWidth).attr("height",t.currentHeight),t.svg.selectAll(["#".concat(t.clipId),"#".concat(t.clipIdForGrid)]).select("rect").attr("width",t.width).attr("height",t.height),t.svg.select("#".concat(t.clipIdForXAxis)).select("rect").attr("x",t.getXAxisClipX.bind(t)).attr("y",t.getXAxisClipY.bind(t)).attr("width",t.getXAxisClipWidth.bind(t)).attr("height",t.getXAxisClipHeight.bind(t)),t.svg.select("#".concat(t.clipIdForYAxis)).select("rect").attr("x",t.getYAxisClipX.bind(t)).attr("y",t.getYAxisClipY.bind(t)).attr("width",t.getYAxisClipWidth.bind(t)).attr("height",t.getYAxisClipHeight.bind(t)),t.svg.select("#".concat(t.clipIdForSubchart)).select("rect").attr("width",t.width).attr("height",n.height),t.svg.select(".".concat(p.zoomRect)).attr("width",t.width).attr("height",t.height)}},{key:"updateDimension",value:function updateDimension(t){var e=this;t||(e.xAxis&&e.config.axis_rotated?(e.xAxis.create(e.axes.x),e.subXAxis.create(e.axes.subx)):(e.yAxis&&e.yAxis.create(e.axes.y),e.y2Axis&&e.y2Axis.create(e.axes.y2))),e.updateScales(t),e.updateSvgSize(),e.transformAll(!1)}},{key:"bindResize",value:function bindResize(){var t=this,e=t.config;t.resizeFunction=t.generateResize(),t.resizeFunction.add(e.onresize.bind(t)),e.resize_auto&&t.resizeFunction.add((function(){t.resizeTimeout&&(window.clearTimeout(t.resizeTimeout),t.resizeTimeout=null),t.resizeTimeout=window.setTimeout((function(){t.api.flush(!1,!0)}),200)})),t.resizeFunction.add(e.onresized.bind(t)),window.addEventListener("resize",t.resizeFunction)}},{key:"generateResize",value:function generateResize(){function callResizeFunctions(){t.forEach((function(t){return t()}))}var t=[];return callResizeFunctions.add=function(e){return t.push(e)},callResizeFunctions.remove=function(e){return t.splice(t.indexOf(e),1)},callResizeFunctions}},{key:"endall",value:function endall(t,e){var n=0;t.each((function(){return++n})).on("end",(function(){for(var t=arguments.length,r=Array(t),i=0;i<t;i++)r[i]=arguments[i];
2--n||e.apply.apply(e,[this].concat(r))}))}},{key:"generateWait",value:function generateWait(){var t=[],f=function(e,n){var r;!function loop(){var e=0;t.forEach((function(t){if(t.empty())e++;else try{t.transition()}catch(t){e++}})),r&&clearTimeout(r),e===t.length?n&&n():r=setTimeout(loop,50)}()};return f.add=function(e){isArray(e)?t=t.concat(e):t.push(e)},f}},{key:"parseDate",value:function parseDate(t){var e;return t instanceof Date?e=t:isString(t)?e=this.dataTimeFormat(this.config.data_xFormat)(t):isNumber(t)&&!isNaN(t)&&(e=new Date(+t)),(!e||isNaN(+e))&&console&&console.error&&console.error("Failed to parse x '".concat(t,"' to Date object")),e}},{key:"isTabVisible",value:function isTabVisible(){return!document.hidden}},{key:"convertInputType",value:function convertInputType(){var t=this.config,e=t.interaction_inputType_mouse&&!M.a&&"onmouseover"in window,n=!1;return t.interaction_inputType_touch&&(n="ontouchmove"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),(e?"mouse":n&&"touch")||null}},{key:"callPluginHook",value:function callPluginHook(t){for(var e=this,n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];this.config.plugins.forEach((function(n){"$beforeInit"===t&&(n.$$=e,e.api.plugins.push(n)),n[t].apply(n,r)}))}}]),ChartInternal}(),L=function Chart(t){i()(this,Chart);var e=new R(this);this.plugins=[],this.internal=e,e.loadConfig(t),e.beforeInit(t),e.init(),this.$=e.getChartElements(),e.afterInit(t),function bindThis(t,e,n){Object.keys(t).forEach((function(r){e[r]=t[r].bind(n),Object.keys(t[r]).length&&bindThis(t[r],e[r],n)}))}(Chart.prototype,this,this)},E=function Options(){return i()(this,Options),{bindto:"#chart",clipPath:!0,svg_classname:void 0,size_width:void 0,size_height:void 0,stats:!0,padding_left:void 0,padding_right:void 0,padding_top:void 0,padding_bottom:void 0,resize_auto:!0,zoom_enabled:void 0,zoom_extent:void 0,zoom_privileged:!1,zoom_rescale:!1,zoom_onzoom:void 0,zoom_onzoomstart:void 0,zoom_onzoomend:void 0,zoom_resetButton:!0,zoom_x_min:void 0,zoom_x_max:void 0,interaction_enabled:!0,interaction_brighten:!0,interaction_inputType_mouse:!0,interaction_inputType_touch:{},onover:function onover(){},onout:function onout(){},onresize:function onresize(){},onresized:function onresized(){},onbeforeinit:void 0,oninit:function oninit(){},onafterinit:void 0,onrendered:void 0,transition_duration:350,data_x:void 0,data_xs:{},data_xFormat:"%Y-%m-%d",data_xLocaltime:!0,data_xSort:!0,data_idConverter:function data_idConverter(t){return t},data_names:{},data_classes:{},data_groups:[],data_axes:{},data_type:void 0,data_types:{},data_labels:{},data_labels_colors:void 0,data_labels_position:{},data_order:"desc",data_regions:{},data_color:void 0,data_colors:{},data_hide:!1,data_filter:void 0,data_stack_normalize:!1,data_selection_enabled:!1,data_selection_grouped:!1,data_selection_isselectable:function data_selection_isselectable(){return!0},data_selection_multiple:!0,data_selection_draggable:!1,data_onclick:function data_onclick(){},data_onover:function data_onover(){},data_onout:function data_onout(){},data_onselected:function data_onselected(){},data_onunselected:function data_onunselected(){},data_onmin:void 0,data_onmax:void 0,data_url:void 0,data_headers:void 0,data_json:void 0,data_rows:void 0,data_columns:void 0,data_mimeType:void 0,data_keys:void 0,data_empty_label_text:"",subchart_show:!1,subchart_size_height:60,subchart_axis_x_show:!0,subchart_axis_x_tick_show:!0,subchart_axis_x_tick_text_show:!0,subchart_onbrush:function subchart_onbrush(){},color_pattern:[],color_tiles:void 0,color_threshold:{},color_onover:void 0,legend_show:!0,legend_hide:!1,legend_contents_bindto:void 0,legend_contents_template:void 0,legend_position:"bottom",legend_inset_anchor:"top-left",legend_inset_x:10,legend_inset_y:0,legend_inset_step:void 0,legend_item_onclick:void 0,legend_item_onover:void 0,legend_item_onout:void 0,legend_equally:!1,legend_padding:0,legend_item_tile_width:10,legend_item_tile_height:10,legend_usePoint:!1,axis_rotated:!1,axis_x_clipPath:!0,axis_x_show:!0,axis_x_type:"indexed",axis_x_localtime:!0,axis_x_categories:[],axis_x_tick_centered:!1,axis_x_tick_format:void 0,axis_x_tick_culling:{},axis_x_tick_culling_max:10,axis_x_tick_count:void 0,axis_x_tick_show:!0,axis_x_tick_text_show:!0,axis_x_tick_text_position:{x:0,y:0},axis_x_tick_fit:!0,axis_x_tick_values:null,axis_x_tick_rotate:0,axis_x_tick_outer:!0,axis_x_tick_multiline:!0,axis_x_tick_width:null,axis_x_tick_tooltip:!1,axis_x_max:void 0,axis_x_min:void 0,axis_x_padding:{},axis_x_height:void 0,axis_x_extent:void 0,axis_x_label:{},axis_x_axes:[],axis_y_clipPath:!0,axis_y_show:!0,axis_y_type:void 0,axis_y_max:void 0,axis_y_min:void 0,axis_y_inverted:!1,axis_y_center:void 0,axis_y_inner:!1,axis_y_label:{},axis_y_tick_format:void 0,axis_y_tick_outer:!0,axis_y_tick_values:null,axis_y_tick_rotate:0,axis_y_tick_count:void 0,axis_y_tick_show:!0,axis_y_tick_text_show:!0,axis_y_tick_text_position:{x:0,y:0},axis_y_tick_time_value:void 0,axis_y_padding:{},axis_y_default:void 0,axis_y_axes:[],axis_y2_show:!1,axis_y2_max:void 0,axis_y2_min:void 0,axis_y2_inverted:!1,axis_y2_center:void 0,axis_y2_inner:!1,axis_y2_label:{},axis_y2_tick_format:void 0,axis_y2_tick_outer:!0,axis_y2_tick_values:null,axis_y2_tick_count:void 0,axis_y2_tick_show:!0,axis_y2_tick_text_show:!0,axis_y2_tick_text_position:{x:0,y:0},axis_y2_padding:{},axis_y2_default:void 0,axis_y2_axes:[],grid_x_show:!1,grid_x_type:"tick",grid_x_lines:[],grid_y_show:!1,grid_y_lines:[],grid_y_ticks:10,grid_focus_show:!0,grid_front:!1,grid_lines_front:!0,point_show:!0,point_r:2.5,point_sensitivity:10,point_focus_expand_enabled:!0,point_focus_expand_r:void 0,point_pattern:[],point_select_r:void 0,point_type:"circle",line_connectNull:!1,line_step_type:"step",line_classes:void 0,line_point:!0,bar_padding:0,bar_radius:void 0,bar_radius_ratio:void 0,bar_sensitivity:2,bar_width:void 0,bar_width_ratio:.6,bar_width_max:void 0,bar_zerobased:!0,bubble_maxR:35,area_zerobased:!0,area_above:!1,area_linearGradient:!1,pie_label_show:!0,pie_label_format:void 0,pie_label_threshold:.05,pie_label_ratio:void 0,pie_expand:{},pie_expand_duration:50,pie_innerRadius:0,pie_padAngle:0,pie_padding:0,plugins:[],gauge_fullCircle:!1,gauge_label_show:!0,gauge_label_format:void 0,gauge_min:0,gauge_max:100,gauge_startingAngle:-1*Math.PI/2,gauge_label_extents:void 0,gauge_title:"",gauge_units:void 0,gauge_width:void 0,gauge_expand:{},gauge_expand_duration:50,donut_label_show:!0,donut_label_format:void 0,donut_label_threshold:.05,donut_label_ratio:void 0,donut_width:void 0,donut_title:"",donut_expand:{},donut_expand_duration:50,donut_padAngle:0,spline_interpolation_type:"cardinal",radar_axis_max:void 0,radar_axis_line_show:!0,radar_axis_text_show:!0,radar_level_depth:3,radar_level_show:!0,radar_level_text_format:function radar_level_text_format(t){return t%1==0?t:t.toFixed(2)},radar_level_text_show:!0,radar_size_ratio:.87,radar_direction_clockwise:!1,regions:[],tooltip_show:!0,tooltip_doNotHide:!1,tooltip_grouped:!0,tooltip_format_title:void 0,tooltip_format_name:void 0,tooltip_format_value:void 0,tooltip_position:void 0,tooltip_contents:{},tooltip_init_show:!1,tooltip_init_x:0,tooltip_init_position:{top:"0px",left:"50px"},tooltip_linked:!1,tooltip_linked_name:"",tooltip_onshow:function tooltip_onshow(){},tooltip_onhide:function tooltip_onhide(){},tooltip_onshown:function tooltip_onshown(){},tooltip_onhidden:function tooltip_onhidden(){},tooltip_order:null,title_text:void 0,title_padding:{top:0,right:0,bottom:0,left:0},title_position:"center"}};extend(R.prototype,{getOptions:function getOptions(){return new E},loadConfig:function loadConfig(t){var e,n,r,i=this.config,find=function(){var t=n.shift();return t&&e&&isObjectType(e)&&t in e?(e=e[t],find()):t?void 0:e};
2Object.keys(i).forEach((function(a){e=t,n=a.split("_"),r=find(),isDefined(r)&&(i[a]=r)}))}}),extend(R.prototype,{getScale:function getScale(t,e,n){return(n?Object(A.scaleTime)():Object(A.scaleLinear)()).range([t,e])},getX:function getX(t,e,n,r){var i=this,a=i.zoomScale||i.getScale(t,e,i.isTimeSeries());return i.getCustomizedScale(n?a.domain(n):a,r)},getY:function getY(t,e,n){var r=this.getScale(t,e,this.isTimeSeriesY());return n&&r.domain(n),r},getCustomizedScale:function getCustomizedScale(t,e){var n=this,r=e||function(){return n.xAxis.tickOffset()},scale=function(e,n){var i=t(e)+r();return n?i:Math.ceil(i)};for(var i in t)scale[i]=t[i];return scale.orgDomain=function(){return t.domain()},scale.orgScale=function(){return t},n.isCategorized()&&(scale.domain=function(e){var n=e;return arguments.length?(t.domain(n),scale):[(n=this.orgDomain())[0],n[1]+1]}),scale},getYScale:function getYScale(t){return"y2"===this.axis.getId(t)?this.y2:this.y},getSubYScale:function getSubYScale(t){return"y2"===this.axis.getId(t)?this.subY2:this.subY},updateScales:function updateScales(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this,r=n.config,i=r.axis_rotated;n.xMin=i?1:0,n.xMax=i?n.height:n.width,n.yMin=i?0:n.height,n.yMax=i?n.width:1,n.subXMin=n.xMin,n.subXMax=n.xMax,n.subYMin=i?0:n.height2,n.subYMax=i?n.width2:1;var a=e&&n.x&&n.x.orgDomain(),o=e&&n.orgXDomain;n.x=n.getX(n.xMin,n.xMax,a,(function(){return n.xAxis.tickOffset()})),n.subX=n.getX(n.xMin,n.xMax,o,(function(t){return t%1?0:n.subXAxis.tickOffset()})),n.xAxisTickFormat=n.axis.getXAxisTickFormat(),n.xAxisTickValues=n.axis.getXAxisTickValues(),n.xAxis=n.axis.getXAxis("x",n.x,r.axis_x_tick_outer,t),n.subXAxis=n.axis.getXAxis("subX",n.subX,r.axis_x_tick_outer,t),n.y=n.getY(n.yMin,n.yMax,n.y?n.y.domain():r.axis_y_default),n.subY=n.getY(n.subYMin,n.subYMax,n.subY?n.subY.domain():r.axis_y_default),n.yAxisTickValues=n.axis.getYAxisTickValues(),n.yAxis=n.axis.getYAxis("y",n.y,r.axis_y_tick_outer,t),r.axis_y2_show&&(n.y2=n.getY(n.yMin,n.yMax,n.y2?n.y2.domain():r.axis_y2_default),n.subY2=n.getY(n.subYMin,n.subYMax,n.subY2?n.subY2.domain():r.axis_y2_default),n.y2AxisTickValues=n.axis.getY2AxisTickValues(),n.y2Axis=n.axis.getYAxis("y2",n.y2,r.axis_y2_tick_outer,t)),n.updateArc&&n.updateArc()}}),extend(R.prototype,{getYDomainMinMax:function getYDomainMinMax(t,e){var n=this,r=n.config,i="min"===e,a=r.data_groups,o=n.mapToIds(t),c=n.getValuesAsIdKeyed(t);return a.length>0&&function(){for(var e,r=n["has".concat(i?"Negative":"Positive","ValueInTargets")](t),_loop=function(t,a){if(0===(a=a.filter((function(t){return o.indexOf(t)>=0}))).length)return e=a,"continue";var s=a[0],u=n.axis.getId(s);r&&c[s]&&(c[s]=c[s].map((function(t){return(i?t<0:t>0)?t:0})));for(var l,_loop2=function(t,e){if(!c[e])return"continue";var a=n.axis.getId(e);c[e].forEach((function(t,e){var n=+t;a!==u||r&&(i?n>0:n<0)||(c[s][e]+=n)}))},d=1;l=a[d];d++)_loop2(0,l);e=a},s=0;e=a[s];s++)_loop(0,e)}(),getMinMax(e,Object.keys(c).map((function(t){return getMinMax(e,c[t])})))},getYDomainMin:function getYDomainMin(t){return this.getYDomainMinMax(t,"min")},getYDomainMax:function getYDomainMax(t){return this.getYDomainMinMax(t,"max")},getYDomain:function getYDomain(t,e,n){var r=this,i=r.config;if(r.isStackNormalized())return[0,100];var a=t.filter((function(t){return r.axis.getId(t.id)===e})),o=n?r.filterByXDomain(a,n):a,c=i["axis_".concat(e,"_min")],s=i["axis_".concat(e,"_max")],u=r.getYDomainMin(o),l=r.getYDomainMax(o),d=i["axis_".concat(e,"_center")],h=r.hasType("bar",o)&&i.bar_zerobased||r.hasType("area",o)&&i.area_zerobased,p=i["axis_".concat(e,"_inverted")],g=r.hasDataLabel()&&i.axis_rotated,v=r.hasDataLabel()&&!i.axis_rotated;if(u=isValue(c)?c:isValue(s)?u<s?u:s-10:u,l=isValue(s)?s:isValue(c)?c<l?l:c+10:l,0===o.length)return r[e].domain();isNaN(u)&&(u=0),isNaN(l)&&(l=u),u===l&&(u<0?l=0:u=0);var m=u>=0&&l>=0,_=u<=0&&l<=0;(isValue(c)&&m||isValue(s)&&_)&&(h=!1),h&&(m&&(u=0),_&&(l=0));var b=Math.abs(l-u),w={top:.1*b,bottom:.1*b};if(isDefined(d)){var T=Math.max(Math.abs(u),Math.abs(l));l=d+T,u=d-T}if(g){var A=diffDomain(r.y.range()),S=r.getDataLabelLength(u,l,"width").map((function(t){return t/A}));["bottom","top"].forEach((function(t,e){w[t]+=b*(S[e]/(1-S[0]-S[1]))}))}else if(v){var k=r.getDataLabelLength(u,l,"height");["bottom","top"].forEach((function(t,e){w[t]+=r.axis.convertPixelsToAxisPadding(k[e],b)}))}if(/^y2?$/.test(e)){var C=i["axis_".concat(e,"_padding")];notEmpty(C)&&["bottom","top"].forEach((function(t){w[t]=r.axis.getPadding(C,t,w[t],b)}
2))}h&&(m&&(w.bottom=u),_&&(w.top=-l));var M=[u-w.bottom,l+w.top];return p?M.reverse():M},getXDomainMinMax:function getXDomainMinMax(t,e){var n=this,r=n.config["axis_x_".concat(e)];return isDefined(r)?n.isTimeSeries()?n.parseDate(r):r:getMinMax(e,t.map((function(t){return getMinMax(e,t.values.map((function(t){return t.x})))})))},getXDomainMin:function getXDomainMin(t){return this.getXDomainMinMax(t,"min")},getXDomainMax:function getXDomainMax(t){return this.getXDomainMinMax(t,"max")},getXDomainPadding:function getXDomainPadding(t){var e,n,r=this,i=r.config,a=t[1]-t[0],o=i.axis_x_padding;r.isCategorized()?n=0:r.hasType("bar")?n=(e=r.getMaxDataCount())>1?a/(e-1)/2:.5:n=.01*a;var c=n,s=n;return isObject(o)&&notEmpty(o)?(c=isValue(o.left)?o.left:n,s=isValue(o.right)?o.right:n):isNumber(i.axis_x_padding)&&(c=o,s=o),{left:c,right:s}},getXDomain:function getXDomain(t){var e=this,n=[e.getXDomainMin(t),e.getXDomainMax(t)],r=n[0],i=n[1],a=e.getXDomainPadding(n),o=0,c=0;return r-i!=0||e.isCategorized()||(e.isTimeSeries()?(r=new Date(.5*r.getTime()),i=new Date(1.5*i.getTime())):(r=0===r?1:.5*r,i=0===i?-1:1.5*i)),(r||0===r)&&(o=e.isTimeSeries()?new Date(r.getTime()-a.left):r-a.left),(i||0===i)&&(c=e.isTimeSeries()?new Date(i.getTime()+a.right):i+a.right),[o,c]},updateXDomain:function updateXDomain(t,e,n,r,i){var a=this,o=a.config.zoom_enabled;if(n&&(a.x.domain(i||sortValue(a.getXDomain(t))),a.orgXDomain=a.x.domain(),o&&a.zoom.updateScaleExtent(),a.subX.domain(a.x.domain()),a.brush&&a.brush.scale(a.subX)),e){var c=i||!a.brush||brushEmpty(a)?a.orgXDomain:getBrushSelection(a).map(a.subX.invert);a.x.domain(c),o&&a.zoom.updateScaleExtent()}return r&&a.x.domain(a.trimXDomain(a.x.orgDomain())),a.x.domain()},trimXDomain:function trimXDomain(t){var e=this.getZoomDomain(),n=o()(e,2),r=n[0],i=n[1];return t[0]<=r&&(t[1]=+t[1]+(r-t[0]),t[0]=r),i<=t[1]&&(t[0]=+t[0]-(t[1]-i),t[1]=i),t}}),extend(R.prototype,{isX:function isX(t){var e,n,r,i=this.config,a=i.data_x&&t===i.data_x,o=notEmpty(i.data_xs)&&(e=i.data_xs,n=t,r=!1,Object.keys(e).forEach((function(t){return e[t]===n&&(r=!0)})),r);return a||o},isNotX:function isNotX(t){return!this.isX(t)},isStackNormalized:function isStackNormalized(){var t=this.config;return t.data_stack_normalize&&t.data_groups.length},isGrouped:function isGrouped(t){return this.config.data_groups.map((function(e){return e.indexOf(t)>=0}))[0]},getXKey:function getXKey(t){var e=this.config;return e.data_x?e.data_x:notEmpty(e.data_xs)?e.data_xs[t]:null},getXValuesOfXKey:function getXValuesOfXKey(t,e){var n,r=this;return(e&&notEmpty(e)?r.mapToIds(e):[]).forEach((function(e){r.getXKey(e)===t&&(n=r.data.xs[e])})),n},getIndexByX:function getIndexByX(t,e){return e?e.indexOf(isString(t)?t:+t):(this.filterByX(this.data.targets,t)[0]||{index:null}).index},getXValue:function getXValue(t,e){var n=this;return t in n.data.xs&&n.data.xs[t]&&isValue(n.data.xs[t][e])?n.data.xs[t][e]:e},getOtherTargetXs:function getOtherTargetXs(){var t=Object.keys(this.data.xs);return t.length?this.data.xs[t[0]]:null},getOtherTargetX:function getOtherTargetX(t){var e=this.getOtherTargetXs();return e&&t<e.length?e[t]:null},addXs:function addXs(t){var e=this;Object.keys(t).forEach((function(n){e.config.data_xs[n]=t[n]}))},hasMultipleX:function hasMultipleX(t){return Object.keys(t).map((function(e){return t[e]})).length>1},isMultipleX:function isMultipleX(){return notEmpty(this.config.data_xs)||!this.config.data_xSort||this.hasType("bubble")||this.hasType("scatter")},addName:function addName(t){var e;return t&&(e=this.config.data_names[t.id],t.name=void 0===e?t.id:e),t},getAllValuesOnIndex:function getAllValuesOnIndex(t){var e=this;return e.filterTargetsToShow(e.data.targets).map((function(n){return e.addName(e.getValueOnIndex(n.values,t))}))},getValueOnIndex:function getValueOnIndex(t,e){var n=t.filter((function(t){return t.index===e}));return n.length?n[0]:null},updateTargetX:function updateTargetX(t,e){var n=this;t.forEach((function(t){t.values.forEach((function(r,i){r.x=n.generateTargetX(e[i],t.id,i)})),n.data.xs[t.id]=e}))},updateTargetXs:function updateTargetXs(t,e){var n=this;t.forEach((function(t){e[t.id]&&n.updateTargetX([t],e[t.id])}))},generateTargetX:function generateTargetX(t,e,n){var r=this,i=r.isCategorized()?n:t||n;return r.isTimeSeries()?i=t?r.parseDate(t):r.parseDate(r.getXValue(e,n)):r.isCustomX()&&!r.isCategorized()&&(i=isValue(t)?+t:r.getXValue(e,n)),i},cloneTarget:function cloneTarget(t){return{id:t.id,id_org:t.id_org,values:t.values.map((function(t){return{x:t.x,value:t.value,id:t.id}}))}},updateXs:function updateXs(){var t=this,e=t.data.targets;
2e.length&&(t.xs=[],e[0].values.forEach((function(e){t.xs[e.index]=e.x})))},getPrevX:function getPrevX(t){var e=this.xs[t-1];return isDefined(e)?e:null},getNextX:function getNextX(t){var e=this.xs[t+1];return isDefined(e)?e:null},getBaseValue:function getBaseValue(t){var e=t.value;return e&&this.isAreaRangeType(t)&&(e=this.getAreaRangeData(t,"mid")),e},getMinMaxValue:function getMinMaxValue(t){var e,n,r=this.getBaseValue.bind(this);return(t||this.data.targets.map((function(t){return t.values}))).forEach((function(t,i){var a=t.map(r).filter(isNumber);e=Math.min.apply(Math,[i?e:1/0].concat(v()(a))),n=Math.max.apply(Math,[i?n:-1/0].concat(v()(a)))})),{min:e,max:n}},getMinMaxData:function getMinMaxData(){var t=this,e="$minMaxData",n=t.getCache(e);if(!n){var r=t.data.targets.map((function(t){return t.values})),i=t.getMinMaxValue(r),a=[],o=[];r.forEach((function(e){var n=t.getFilteredDataByValue(e,i.min),r=t.getFilteredDataByValue(e,i.max);n.length&&(a=a.concat(n)),r.length&&(o=o.concat(r))})),t.addCache(e,n={min:a,max:o})}return n},getTotalPerIndex:function getTotalPerIndex(){var t=this,e=t.getCache("$totalPerIndex");return t.isStackNormalized()&&!e&&(e=[],t.data.targets.forEach((function(t){t.values.forEach((function(t,n){e[n]||(e[n]=0),e[n]+=isNumber(t.value)?t.value:0}))}))),e},getTotalDataSum:function getTotalDataSum(){var t=this,e="$totalDataSum",n=t.getCache(e);if(!n){var r=mergeArray(t.data.targets.map((function(t){return t.values}))).map((function(t){return t.value})).reduce((function(t,e){return t+e}));t.addCache(e,n=r)}return n},getFilteredDataByValue:function getFilteredDataByValue(t,e){var n=this;return t.filter((function(t){return n.getBaseValue(t)===e}))},getMaxDataCount:function getMaxDataCount(){return Math.max.apply(Math,v()(this.data.targets.map((function(t){return t.values.length}))))},getMaxDataCountTarget:function getMaxDataCountTarget(t){var e,n=t.length,r=0;return n>1?t.forEach((function(t){t.values.length>r&&(e=t,r=t.values.length)})):e=n?t[0]:null,e},mapToIds:function mapToIds(t){return t.map((function(t){return t.id}))},mapToTargetIds:function mapToTargetIds(t){return t?isArray(t)?t.concat():[t]:this.mapToIds(this.data.targets)},hasTarget:function hasTarget(t,e){for(var n,r=this.mapToIds(t),i=0;n=r[i];i++)if(n===e)return!0;return!1},isTargetToShow:function isTargetToShow(t){return this.hiddenTargetIds.indexOf(t)<0},isLegendToShow:function isLegendToShow(t){return this.hiddenLegendIds.indexOf(t)<0},filterTargetsToShow:function filterTargetsToShow(t){var e=this;return(t||e.data.targets).filter((function(t){return e.isTargetToShow(t.id)}))},mapTargetsToUniqueXs:function mapTargetsToUniqueXs(t){var e=[];return t&&t.length&&(e=mergeArray(t.map((function(t){return t.values.map((function(t){return+t.x}))}))).filter((function(t,e,n){return n.indexOf(t)===e})),e=this.isTimeSeries()?e.map((function(t){return new Date(+t)})):e.map((function(t){return+t}))),sortValue(e)},addHiddenTargetIds:function addHiddenTargetIds(t){this.hiddenTargetIds=this.hiddenTargetIds.concat(t)},removeHiddenTargetIds:function removeHiddenTargetIds(t){this.hiddenTargetIds=this.hiddenTargetIds.filter((function(e){return t.indexOf(e)<0}))},addHiddenLegendIds:function addHiddenLegendIds(t){this.hiddenLegendIds=this.hiddenLegendIds.concat(t)},removeHiddenLegendIds:function removeHiddenLegendIds(t){this.hiddenLegendIds=this.hiddenLegendIds.filter((function(e){return t.indexOf(e)<0}))},getValuesAsIdKeyed:function getValuesAsIdKeyed(t){var e=this,n={},r=e.isMultipleX(),i=r?e.mapTargetsToUniqueXs(t).map((function(t){return isString(t)?t:+t})):null;return t.forEach((function(t){var a=[];t.values.forEach((function(t){var n=t.value;isArray(n)?a.push.apply(a,v()(n)):isObject(n)&&"high"in n?a.push.apply(a,v()(Object.values(n))):r?a[e.getIndexByX(t.x,i)]=n:a.push(n)})),n[t.id]=a})),n},checkValueInTargets:function checkValueInTargets(t,e){for(var n,r=Object.keys(t),i=0;i<r.length;i++){n=t[r[i]].values;for(var a=0;a<n.length;a++)if(e(n[a].value))return!0}return!1},hasMultiTargets:function hasMultiTargets(){return this.filterTargetsToShow().length>1},hasNegativeValueInTargets:function hasNegativeValueInTargets(t){return this.checkValueInTargets(t,(function(t){return t<0}))},hasPositiveValueInTargets:function hasPositiveValueInTargets(t){return this.checkValueInTargets(t,(function(t){return t>0}))},_checkOrder:function _checkOrder(t){var e=this.config.data_order;return isString(e)&&e.toLowerCase()===t},isOrderDesc:function isOrderDesc(){return this._checkOrder("desc")},isOrderAsc:function isOrderAsc(){return this._checkOrder("asc")},orderTargets:function orderTargets(t){var e=this,n=e.config,r=v()(t),i=e.isOrderAsc(),a=e.isOrderDesc();return i||a?r.sort((function(t,e){var reducer=function(t,e){return t+Math.abs(e.value)},n=t.values.reduce(reducer,0),r=e.values.reduce(reducer,0);return i?r-n:n-r})):isFunction(n.data_order)&&r.sort(n.data_order),r},filterByX:function filterByX(t,e){return mergeArray(t.map((function(t){return t.values}))).filter((function(t){return t.x-e==0}))},filterRemoveNull:function filterRemoveNull(t){var e=this;return t.filter((function(t){return isValue(e.getBaseValue(t))}))},filterByXDomain:function filterByXDomain(t,e){return t.map((function(t){return{id:t.id,id_org:t.id_org,values:t.values.filter((function(t){return e[0]<=t.x&&t.x<=e[1]}))}}))},hasDataLabel:function hasDataLabel(){var t=this.config.data_labels;return isBoolean(t)&&t||isObjectType(t)&&notEmpty(t)},getDataLabelLength:function getDataLabelLength(t,e,n){var r=this,i=[0,0];return r.selectChart.select("svg").selectAll(".dummy").data([t,e]).enter().append("text").text((function(t){return r.dataLabelFormat(t.id)(t)})).each((function(t,e){i[e]=1.3*this.getBoundingClientRect()[n]})).remove(),i},isNoneArc:function isNoneArc(t){return this.hasTarget(this.data.targets,t.id)},isArc:function isArc(t){return"data"in t&&this.hasTarget(this.data.targets,t.data.id)},findSameXOfValues:function findSameXOfValues(t,e){var n,r=t[e].x,i=[];for(n=e-1;n>=0&&r===t[n].x;n--)i.push(t[n]);for(n=e;n<t.length&&r===t[n].x;n++)i.push(t[n]);return i},findClosestFromTargets:function findClosestFromTargets(t,e){var n=this,r=t.map((function(t){return n.findClosest(t.values,e)}));return n.findClosest(r,e)},findClosest:function findClosest(t,e){var n,r=this,i=r.config.point_sensitivity;return t.filter((function(t){return t&&r.isBarType(t.id)}
2)).forEach((function(t){var e=r.main.select(".".concat(p.bars).concat(r.getTargetSelectorSuffix(t.id)," .").concat(p.bar,"-").concat(t.index)).node();!n&&r.isWithinBar(e)&&(n=t)})),t.filter((function(t){return t&&!r.isBarType(t.id)})).forEach((function(t){var a=r.dist(t,e);a<i&&(i=a,n=t)})),n},dist:function dist(t,e){var n=this,r=n.config.axis_rotated,i=r?1:0,a=r?0:1,o=n.circleY(t,t.index),c=(n.zoomScale||n.x)(t.x);return Math.sqrt(Math.pow(c-e[i],2)+Math.pow(o-e[a],2))},convertValuesToStep:function convertValuesToStep(t){var e=this.config,n=e.axis_rotated,r=e.line_step_type,i=this.isCategorized(),a=isArray(t)?t.concat():[t];if(!n&&!i)return t;var o=a[0].id,c=a[0].x-1,s=a[0].value;return i&&a.unshift({x:c,value:s,id:o}),"step-after"===r&&a.unshift({x:c-1,value:s,id:o}),s=a[(c=a.length)-1].value,i&&a.push({x:c,value:s,id:o}),"step-before"===r&&a.push({x:c+1,value:s,id:o}),a},convertValuesToRange:function convertValuesToRange(t){var e=isArray(t)?t.concat():[t],n=[];return e.forEach((function(t){var e=t.x,r=t.id;n.push({x:e,id:r,value:t.value[0]}),n.push({x:e,id:r,value:t.value[2]})})),n},updateDataAttributes:function updateDataAttributes(t,e){var n=this.config["data_".concat(t)];return isUndefined(e)||(Object.keys(e).forEach((function(t){n[t]=e[t]})),this.redraw({withLegend:!0})),n},getAreaRangeData:function getAreaRangeData(t,e){var n=t.value;if(isArray(n)){var r=["high","mid","low"].indexOf(e);return-1===r?null:n[r]}return n[e]},getRatio:function getRatio(t,e,n){var r=this,i=r.config,a=r.api,o=0;if(e&&a.data.shown.call(a).length){var c=a.data.values.bind(a);if(o=e.ratio||e.value,"arc"===t)if(r.pie.padAngle()()){var s=r.getTotalDataSum();r.hiddenTargetIds.length&&(s-=c(r.hiddenTargetIds).reduce((function(t,e){return t+e}))),o=e.value/s}else o=(e.endAngle-e.startAngle)/(Math.PI*(r.hasType("gauge")&&!i.gauge_fullCircle?1:2));else if("index"===t){var u=this.getTotalPerIndex();if(r.hiddenTargetIds.length){var l=c(r.hiddenTargetIds,!1);l.length&&(l=l.reduce((function(t,e){return t.map((function(t,n){return(isNumber(t)?t:0)+e[n]}))})),u=u.map((function(t,e){return t-l[e]})))}e.ratio=isNumber(e.value)&&u&&u[e.index]>0?e.value/u[e.index]:0,o=e.ratio}else"radar"===t&&(o=parseFloat(Math.max(e.value,0))/r.maxValue*i.radar_size_ratio)}return n&&o?100*o:o}});var O=n(19);extend(R.prototype,{convertData:function convertData(t,e){var n,r=this;if(t.bindto?(n={},["url","mimeType","headers","keys","json","keys","rows","columns"].forEach((function(e){var r="data_".concat(e);r in t&&(n[e]=t[r])}))):n=t,n.url&&e)r.convertUrlToData(n.url,n.mimeType,n.headers,n.keys,e);else if(n.json)n=r.convertJsonToData(n.json,n.keys);else if(n.rows)n=r.convertRowsToData(n.rows);else if(n.columns)n=r.convertColumnsToData(n.columns);else if(t.bindto)throw Error("url or json or rows or columns is required.");return n},convertUrlToData:function convertUrlToData(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"csv",r=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,a=arguments.length>4?arguments[4]:void 0,o=new XMLHttpRequest;r&&Object.keys(r).forEach((function(t){o.setRequestHeader(t,r[t])})),o.open("GET",t),o.onreadystatechange=function(){if(4===o.readyState){if(200!==o.status)throw new Error("".concat(t,": Something went wrong loading!"));var r=o.responseText;r&&a.call(e,e["convert".concat(capitalize(n),"ToData")]("json"===n?JSON.parse(r):r,i))}},o.send()},_convertCsvTsvToData:function _convertCsvTsvToData(t,e){var n,r=t.rows(e);return 1===r.length?(n=[{}],r[0].forEach((function(t){n[0][t]=null}))):n=t.parse(e),n},convertCsvToData:function convertCsvToData(t){return this._convertCsvTsvToData({rows:O.csvParseRows,parse:O.csvParse},t)},convertTsvToData:function convertTsvToData(t){return this._convertCsvTsvToData({rows:O.tsvParseRows,parse:O.tsvParse},t)},convertJsonToData:function convertJsonToData(t,e){var n,r,i=this,a=this.config,o=[];if(isArray(t)){var c=e||a.data_keys;c.x?(n=c.value.concat(c.x),a.data_x=c.x):n=c.value,o.push(n),t.forEach((function(t){var e=n.map((function(e){var n=i.findValueInJson(t,e);return isUndefined(n)&&(n=null),n}));o.push(e)})),r=this.convertRowsToData(o)}else Object.keys(t).forEach((function(e){var n=t[e].concat();n.unshift(e),o.push(n)})),r=this.convertColumnsToData(o);return r},findValueInJson:function findValueInJson(t,e){if(void 0!==t[e])return t[e];var n=e.replace(/\[(\w+)\]/g,".$1").replace(/^\./,"").split("."),r=t;return n.some((function(t){return!(r=r&&t in r?r[t]:void 0)})),r},convertRowsToData:function convertRowsToData(t){for(var e=t[0],n=[],r=1,i=t.length;r<i;r++){for(var a={},o=0,c=t[r].length;o<c;o++){if(isUndefined(t[r][o]))throw new Error("Source data is missing a component at (".concat(r,", ").concat(o,")!"));a[e[o]]=t[r][o]}n.push(a)}return n},convertColumnsToData:function convertColumnsToData(t){for(var e=[],n=0,r=t.length;n<r;n++)for(var i=t[n][0],a=1,o=t[n].length;a<o;a++){if(isUndefined(e[a-1])&&(e[a-1]={}),isUndefined(t[n][a]))throw new Error("Source data is missing a component at (".concat(n,", ").concat(a,")!"));e[a-1][i]=t[n][a]}return e},convertDataToTargets:function convertDataToTargets(t,e){var n,r=this,i=this,a=i.config,o=Object.keys(t[0]||{}),c=o.length?o.filter(i.isNotX,i):[],s=o.length?o.filter(i.isX,i):[];
2c.forEach((function(o){var c=r.getXKey(o);r.isCustomX()||r.isTimeSeries()?s.indexOf(c)>=0?n=(e&&i.data.xs[o]||[]).concat(t.map((function(t){return t[c]})).filter(isValue).map((function(t,e){return i.generateTargetX(t,o,e)}))):a.data_x?n=r.getOtherTargetXs():notEmpty(a.data_xs)&&(n=i.getXValuesOfXKey(c,i.data.targets)):n=t.map((function(t,e){return e})),n&&(r.data.xs[o]=n)})),c.forEach((function(t){if(!n)throw new Error('x is not defined for id = "'.concat(t,'".'))}));var u=c.map((function(e,n){var r=a.data_idConverter(e),o=i.getXKey(e),c=i.isCustomX()&&i.isCategorized(),s=c&&t.map((function(t){return t.x})).every((function(t){return a.axis_x_categories.indexOf(t)>-1}));return{id:r,id_org:e,values:t.map((function(t,u){var l,d=t[o],h=t[e];return h=null===h||isNaN(h)?isArray(h)||isObject(h)&&h.high?h:null:+t[e],c&&0===n&&!isUndefined(d)?(!s&&0===n&&0===u&&(a.axis_x_categories=[]),-1===(l=a.axis_x_categories.indexOf(d))&&(l=a.axis_x_categories.length,a.axis_x_categories.push(d))):l=i.generateTargetX(d,e,u),(isUndefined(t[e])||i.data.xs[e].length<=u)&&(l=void 0),{x:l,value:h,id:r}})).filter((function(t){return isDefined(t.x)}))}}));return u.forEach((function(t){a.data_xSort&&(t.values=t.values.sort((function(t,e){return(t.x||0===t.x?t.x:1/0)-(e.x||0===e.x?e.x:1/0)}))),t.values.forEach((function(t,e){return t.index=e})),i.data.xs[t.id].sort((function(t,e){return t-e}))})),i.hasNegativeValue=i.hasNegativeValueInTargets(u),i.hasPositiveValue=i.hasPositiveValueInTargets(u),a.data_type&&i.setTargetType(i.mapToIds(u).filter((function(t){return!(t in a.data_types)})),a.data_type),u.forEach((function(t){return i.addCache(t.id_org,t,!0)})),u}}),extend(R.prototype,{load:function load(t,e){var n=this,r=t;r&&(e.filter&&(r=r.filter(e.filter)),(e.type||e.types)&&r.forEach((function(t){var r=e.types&&e.types[t.id]||e.type;n.setTargetType(t.id,r)})),n.data.targets.forEach((function(t){for(var e=0;e<r.length;e++)if(t.id===r[e].id){t.values=r[e].values,r.splice(e,1);break}})),n.data.targets=n.data.targets.concat(r)),n.updateTargets(n.data.targets),n.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),e.done&&e.done()},loadFromArgs:function loadFromArgs(t){var e=this;if(e.config){e.resetCache();var n=t.data||e.convertData(t,(function(n){return e.load(e.convertDataToTargets(n),t)}));e.load(n?e.convertDataToTargets(n):null,t)}},unload:function unload(t,e){var n=this,r=e,i=t;return n.resetCache(),r||(r=function(){}),(i=i.filter((function(t){return n.hasTarget(n.data.targets,t)})))&&0!==i.length?(n.svg.selectAll(i.map((function(t){return n.selectorTarget(t)}))).transition().style("opacity","0").remove().call(n.endall,r),void i.forEach((function(t){n.withoutFadeIn[t]=!1,n.legend&&n.legend.selectAll(".".concat(p.legendItem).concat(n.getTargetSelectorSuffix(t))).remove(),n.data.targets=n.data.targets.filter((function(e){return e.id!==t}))}))):void r()}}),extend(R.prototype,{categoryName:function categoryName(t){var e=this.config;return t<e.axis_x_categories.length?e.axis_x_categories[t]:t}});var P=n(20);extend(R.prototype,{initEventRect:function initEventRect(){this.main.select(".".concat(p.chart)).append("g").attr("class",p.eventRects).style("fill-opacity","0")},redrawEventRect:function redrawEventRect(){var t,e=this,n=e.config,r=e.isMultipleX(),i=n.zoom_enabled,a=e.main.select(".".concat(p.eventRects)).style("cursor",i&&"drag"!==i.type?n.axis_rotated?"ns-resize":"ew-resize":null).classed(p.eventRectsMultiple,r).classed(p.eventRectsSingle,!r);if(a.selectAll(".".concat(p.eventRect)).remove(),e.eventRect=a.selectAll(".".concat(p.eventRect)),r)t=e.eventRect.data([0]),t=e.generateEventRectsForMultipleXs(t.enter()).merge(t);else{var o=e.getMaxDataCountTarget(e.data.targets);a.datum(o?o.values:[]),e.eventRect=a.selectAll(".".concat(p.eventRect)),(t=e.eventRect.data((function(t){return t}))).exit().remove(),t=e.generateEventRectsForSingleX(t.enter()).merge(t)}e.updateEventRect(t),"touch"!==e.inputType||e.svg.on("touchstart.eventRect")||e.hasArcType()||e.bindTouchOnEventRect(r)},bindTouchOnEventRect:function bindTouchOnEventRect(t){var e,n=this,r=n.config,getEventRect=function(){var t=l.event.changedTouches[0];return Object(l.select)(document.elementFromPoint(t.clientX,t.clientY))},selectRect=function(e){if(t)n.selectRectForMultipleXs(e);else{var r=getEventRect(),i=function(t){var e=t&&t.attr("class")&&1*t.attr("class").replace(new RegExp("(".concat(p.eventRect,"-?|s)"),"g"),"");return(isNaN(e)||null===e)&&(e=-1),e}(r);
2n.callOverOutForTouch(i),-1===i?n.unselectRect():n.selectRectForSingle(e,r,i)}},i=r.interaction_inputType_touch.preventDefault,a=isBoolean(i)&&i||!1,o=!isNaN(i)&&i||null;n.svg.on("touchstart.eventRect touchmove.eventRect",(function(){var t=getEventRect();if(!t.empty()&&t.classed(p.eventRect)){if(n.dragging||n.flowing||n.hasArcType())return;(function(t){var n=t.type,i=t.changedTouches[0]["client".concat(r.axis_rotated?"Y":"X")];"touchstart"===n?a?t.preventDefault():null!==o&&(e=i):"touchmove"===n&&(a||!0===e||null!==o&&Math.abs(e-i)>=o)&&(e=!0,t.preventDefault())})(l.event),selectRect(this)}else n.unselectRect(),n.callOverOutForTouch()})).on("touchend.eventRect",(function(){var t=getEventRect();!t.empty()&&t.classed(p.eventRect)&&(n.hasArcType()||!n.toggleShape||n.cancelClick)&&n.cancelClick&&(n.cancelClick=!1)}))},updateEventRect:function updateEventRect(t){var e,n,r,i,a=this,o=a.config,c=a.zoomScale||a.x,s=t||a.eventRect.data(),u=o.axis_rotated;if(a.isMultipleX())e=0,n=0,r=a.width,i=a.height;else{var l,d;if(a.isCategorized())l=a.getEventRectWidth(),d=function(t){return c(t.x)-l/2};else{a.updateXs();var getPrevNextX=function(t){var e=t.index;return{prev:a.getPrevX(e),next:a.getNextX(e)}};l=function(t){var e=getPrevNextX(t);return null===e.prev&&null===e.next?u?a.height:a.width:(null===e.prev&&(e.prev=c.domain()[0]),null===e.next&&(e.next=c.domain()[1]),Math.max(0,(c(e.next)-c(e.prev))/2))},d=function(t){var e=getPrevNextX(t),n=a.data.xs[t.id][t.index];return null===e.prev&&null===e.next?0:(null===e.prev&&(e.prev=c.domain()[0]),(c(n)+c(e.prev))/2)}}e=u?0:d,n=u?d:0,r=u?a.width:l,i=u?l:a.height}s.attr("class",a.classEvent.bind(a)).attr("x",e).attr("y",n).attr("width",r).attr("height",i)},selectRectForSingle:function selectRectForSingle(t,e,n){var r=this,i=r.config,a=i.data_selection_enabled,o=i.data_selection_grouped,c=i.tooltip_grouped,s=r.getAllValuesOnIndex(n);c&&(r.showTooltip(s,t),r.showXGridFocus(s),!a||o)||r.main.selectAll(".".concat(p.shape,"-").concat(n)).each((function(){Object(l.select)(this).classed(p.EXPANDED,!0),a&&e.style("cursor",o?"pointer":null),c||(r.hideXGridFocus(),r.hideTooltip(),!o&&r.expandCirclesBars(n))})).filter((function(t){return r.isWithinShape(this,t)})).call((function(s){var u=s.data();a&&(o||i.data_selection_isselectable(u))&&e.style("cursor","pointer"),c||(r.showTooltip(u,t),r.showXGridFocus(u),r.unexpandCircles(),s.each((function(t){return r.expandCirclesBars(n,t.id)})))}))},expandCirclesBars:function expandCirclesBars(t,e,n){var r=this;r.config.point_focus_expand_enabled&&r.expandCircles(t,e,n),r.expandBars(t,e,n)},selectRectForMultipleXs:function selectRectForMultipleXs(t){var e=this,n=e.config,r=e.filterTargetsToShow(e.data.targets);if(!e.dragging&&!e.hasArcType(r)){var i=Object(l.mouse)(t),a=e.findClosestFromTargets(r,i);if(e.mouseover&&(!a||a.id!==e.mouseover.id)&&(n.data_onout.call(e.api,e.mouseover),e.mouseover=void 0),!a)return void e.unselectRect();var o=(e.isBubbleType(a)||e.isScatterType(a)||!n.tooltip_grouped?[a]:e.filterByX(r,a.x)).map((function(t){return e.addName(t)}));e.showTooltip(o,t),e.expandCirclesBars(a.index,a.id,!0),e.showXGridFocus(o),(e.isBarType(a.id)||e.dist(a,i)<n.point_sensitivity)&&(e.svg.select(".".concat(p.eventRect)).style("cursor","pointer"),
2!e.mouseover&&(n.data_onover.call(e.api,a),e.mouseover=a))}},unselectRect:function unselectRect(){var t=this;t.svg.select(".".concat(p.eventRect)).style("cursor",null),t.hideXGridFocus(),t.hideTooltip(),t._handleLinkedCharts(!1),t.unexpandCircles(),t.unexpandBars()},setOverOut:function setOverOut(t,e){var n=this,r=n.config,i=isObject(e);if(i||-1!==e){var a=r[t?"data_onover":"data_onout"].bind(n.api);r.color_onover&&n.setOverColor(t,e,i),i?a(e):(t&&n.expandCirclesBars(e,null,!0),!n.isMultipleX()&&n.main.selectAll(".".concat(p.shape,"-").concat(e)).each(a))}},callOverOutForTouch:function callOverOutForTouch(t){var e=this,n=e.callOverOutForTouch,r=n.last;(isObject(t)&&r?t.id!==r.id:t!==r)&&((r||isNumber(r))&&e.setOverOut(!1,r),(t||isNumber(t))&&e.setOverOut(!0,t),n.last=t)},getDraggableSelection:function getDraggableSelection(){var t=this,e=t.config;return e.interaction_enabled&&e.data_selection_draggable&&t.drag?Object(P.drag)().on("drag",(function(){t.drag(Object(l.mouse)(this))})).on("start",(function(){t.dragstart(Object(l.mouse)(this))})).on("end",(function(){t.dragend()})):function(){}},generateEventRectsForSingleX:function generateEventRectsForSingleX(t){var e=this,n=e.config,r=t.append("rect").attr("class",e.classEvent.bind(e)).style("cursor",n.data_selection_enabled&&n.data_selection_grouped?"pointer":null).on("click",(function(t){e.clickHandlerForSingleX.bind(this)(t,e)}
2)).call(e.getDraggableSelection());return"mouse"===e.inputType&&r.on("mouseover",(function(t){e.dragging||e.flowing||e.hasArcType()||e.setOverOut(!0,t.index)})).on("mousemove",(function(t){if(!(e.dragging||e.flowing||e.hasArcType())){var n=t.index,r=e.svg.select(".".concat(p.eventRect,"-").concat(n));e.isStepType(t)&&"step-after"===e.config.line_step_type&&Object(l.mouse)(this)[0]<e.x(e.getXValue(t.id,n))&&(n-=1),-1===n?e.unselectRect():e.selectRectForSingle(this,r,n)}})).on("mouseout",(function(t){!e.config||e.hasArcType()||(e.unselectRect(),e.setOverOut(!1,t.index))})),r},clickHandlerForSingleX:function clickHandlerForSingleX(t,e){var n=e,r=n.config;if(n.hasArcType()||!n.toggleShape||n.cancelClick)n.cancelClick&&(n.cancelClick=!1);else{var i=t.index;n.main.selectAll(".".concat(p.shape,"-").concat(i)).each((function(t){(r.data_selection_grouped||n.isWithinShape(this,t))&&(n.toggleShape(this,t,i),r.data_onclick.call(n.api,t,this))}))}},generateEventRectsForMultipleXs:function generateEventRectsForMultipleXs(t){var e=this,n=t.append("rect").attr("x",0).attr("y",0).attr("width",e.width).attr("height",e.height).attr("class",p.eventRect).on("click",(function(){e.clickHandlerForMultipleXS.bind(this)(e)})).call(e.getDraggableSelection());return"mouse"===e.inputType&&n.on("mouseover mousemove",(function(){e.selectRectForMultipleXs(this)})).on("mouseout",(function(){!e.config||e.hasArcType()||e.unselectRect()})),n},clickHandlerForMultipleXS:function clickHandlerForMultipleXS(t){var e=t,n=e.config,r=e.filterTargetsToShow(e.data.targets);if(!e.hasArcType(r)){var i=Object(l.mouse)(this),a=e.findClosestFromTargets(r,i);!a||(e.isBarType(a.id)||e.dist(a,i)<n.point_sensitivity)&&e.main.selectAll(".".concat(p.shapes).concat(e.getTargetSelectorSuffix(a.id))).selectAll(".".concat(p.shape,"-").concat(a.index)).each((function(){(n.data_selection_grouped||e.isWithinShape(this,a))&&(e.toggleShape(this,a,a.index),n.data_onclick.call(e.api,a,this))}))}},dispatchEvent:function dispatchEvent(t,e,n){var r=this.isMultipleX(),i=".".concat(r?p.eventRect:"".concat(p.eventRect,"-").concat(e)),a=this.main.select(i).node(),o=a.getBoundingClientRect(),c=o.width,s=o.left,u=o.top,l=s+(n?n[0]:0)+(r?0:c/2),d=u+(n?n[1]:0);T[/^(mouse|click)/.test(t)?"mouse":"touch"](a,t,{screenX:l,screenY:d,clientX:l,clientY:d})}}),extend(R.prototype,{setContainerSize:function setContainerSize(){var t=this;t.currentWidth=t.getCurrentWidth(),t.currentHeight=t.getCurrentHeight()},getCurrentWidth:function getCurrentWidth(){return this.config.size_width||this.getParentWidth()},getCurrentHeight:function getCurrentHeight(){var t=this,e=t.config,n=e.size_height||t.getParentHeight();return n>0?n:320/(t.hasType("gauge")&&!e.gauge_fullCircle?2:1)},getAxisSize:function getAxisSize(t){var e=this,n=e.config.axis_rotated;return n&&"x"===t||!n&&/y2?/.test(t)?e.getAxisWidthByAxisId(t,!0):e.getHorizontalAxisHeight(t)},getCurrentPaddingTop:function getCurrentPaddingTop(){var t=this,e=t.config,n=e.axis_y2_axes.length,r=isValue(e.padding_top)?e.padding_top:0;return t.title&&t.title.node()&&(r+=t.getTitlePadding()),n&&e.axis_rotated&&(r+=t.getHorizontalAxisHeight("y2")*n),r},getCurrentPaddingBottom:function getCurrentPaddingBottom(){var t=this.config,e=t.axis_rotated?"y":"x",n=t["axis_".concat(e,"_axes")].length;return(isValue(t.padding_bottom)?t.padding_bottom:0)+(n?this.getHorizontalAxisHeight(e)*n:0)},getCurrentPaddingLeft:function getCurrentPaddingLeft(t){var e=this,n=e.config,r=n.axis_rotated,i=r?"x":"y",a=n["axis_".concat(i,"_axes")].length,o=e.getAxisWidthByAxisId(i,t);return(isValue(n.padding_left)?n.padding_left:r?n.axis_x_show?Math.max(ceil10(o),40):1:!n.axis_y_show||n.axis_y_inner?e.axis.getYAxisLabelPosition().isOuter?30:1:ceil10(o))+o*a},getCurrentPaddingRight:function getCurrentPaddingRight(){var t=this,e=t.config,n=t.isLegendRight?t.getLegendWidth()+20:0,r=e.axis_y2_axes.length,i=t.getAxisWidthByAxisId("y2");return(isValue(e.padding_right)?e.padding_right+1:e.axis_rotated?10+n:!e.axis_y2_show||e.axis_y2_inner?2+n+(t.axis.getY2AxisLabelPosition().isOuter?20:0):ceil10(i)+n)+i*r},getParentRectValue:function getParentRectValue(t){for(var e,n="offset".concat(capitalize(t)),r=this.selectChart.node();!e&&r&&"BODY"!==r.tagName;){try{e=r.getBoundingClientRect()[t]}catch(t){n in r&&(e=r[n])}r=r.parentNode}if("width"===t){var i=document.body.offsetWidth;e>i&&(e=i)}return e},getParentWidth:function getParentWidth(){return this.getParentRectValue("width")},getParentHeight:function getParentHeight(){var t=this.selectChart.style("height");return t.indexOf("px")>0?parseInt(t,10):0},getSvgLeft:function getSvgLeft(t){var e=this,n=e.config,r=n.axis_rotated||!n.axis_rotated&&!n.axis_y_inner,i=n.axis_rotated?p.axisX:p.axisY,a=e.main.select(".".concat(i)).node(),o=a&&r?a.getBoundingClientRect():{right:0},c=e.selectChart.node().getBoundingClientRect(),s=e.hasArcType(),u=o.right-c.left-(s?0:e.getCurrentPaddingLeft(t));return u>0?u:0},getAxisWidthByAxisId:function getAxisWidthByAxisId(t,e){var n=this.axis.getLabelPositionById(t);return this.axis.getMaxTickWidth(t,e)+(n.isInner?20:40)},getHorizontalAxisHeight:function getHorizontalAxisHeight(t){var e=this,n=e.config,r=n.axis_rotated,i=30;return"x"!==t||n.axis_x_show?"x"===t&&n.axis_x_height?n.axis_x_height:"y"!==t||n.axis_y_show?"y2"!==t||n.axis_y2_show?(("x"===t&&!r&&n.axis_x_tick_rotate||"y"===t&&r&&n.axis_y_tick_rotate)&&(i=30+e.axis.getMaxTickWidth(t)*Math.cos(Math.PI*(90-n["axis_".concat(t,"_tick_rotate")])/180)),i+(e.axis.getLabelPositionById(t).isInner?0:10)+("y2"!==t||r?0:-10)):e.rotated_padding_top:!n.legend_show||e.isLegendRight||e.isLegendInset?1:10:8},getEventRectWidth:function getEventRectWidth(){return Math.max(0,this.xAxis.tickInterval())}});var F=n(21);extend(R.prototype,{getShapeIndices:function getShapeIndices(t){var e=this,n=e.config,r={},i=0;
2return e.filterTargetsToShow(e.data.targets.filter(t,e)).forEach((function(t){for(var e,a=0;e=n.data_groups[a];a++)if(!(e.indexOf(t.id)<0))for(var o,c=0;o=e[c];c++)if(o in r){r[t.id]=r[o];break}isUndefined(r[t.id])&&(r[t.id]=i++)})),r.__max__=i-1,r},getShapeX:function getShapeX(t,e,n,r){var i=this,a=r?i.subX:i.zoomScale||i.x,o=i.config.bar_padding,sum=function(t,e){return t+e},c=isObjectType(t)&&t.total.length?t.total.reduce(sum)/2:0;return function(r){var i=r.id in n?n[r.id]:0,s=0;if(notEmpty(r.x)){var u=a(r.x);s=c?u-(t[r.id]||t.width)+t.total.slice(0,i+1).reduce(sum)-c:u-(isNumber(t)?t:t.width)*(e/2-i)}return t&&s&&e>1&&o&&(i&&(s+=o*i),e>2?s-=(e-1)*o/2:2===e&&(s-=o/2)),s}},getShapeY:function getShapeY(t){var e=this,n=e.isStackNormalized();return function(r){return(t?e.getSubYScale(r.id):e.getYScale(r.id))(n?e.getRatio("index",r,!0):r.value)}},getShapeOffset:function getShapeOffset(t,e,n){var r=this,i=r.orderTargets(r.filterTargetsToShow(r.data.targets.filter(t,r))),a=i.map((function(t){return t.id}));return function(t,o){var c=n?r.getSubYScale(t.id):r.getYScale(t.id),s=c(0),u=s,l=o;return i.forEach((function(n){var i=r.isStepType(t)?r.convertValuesToStep(n.values):n.values,o=i.map((function(t){return r.isStackNormalized()?r.getRatio("index",t,!0):t.value}));n.id===t.id||e[n.id]!==e[t.id]||a.indexOf(n.id)<a.indexOf(t.id)&&((isUndefined(i[l])||+i[l].x!=+t.x)&&(l=-1,i.forEach((function(e,n){(e.x.constructor===Date?+e.x:e.x)===(t.x.constructor===Date?+t.x:t.x)&&(l=n)}))),l in i&&i[l].value*t.value>=0&&(u+=c(o[l])-s))})),u}},isWithinShape:function isWithinShape(t,e){var n,r=this,i=Object(l.select)(t);return r.isTargetToShow(e.id)?r.hasValidPointType(t.nodeName)?n=r.isStepType(e)?r.isWithinStep(t,r.getYScale(e.id)(e.value)):r.isWithinCircle(t,r.isBubbleType(e)?1.5*r.pointSelectR(e):0):"path"===t.nodeName&&(n=!i.classed(p.bar)||r.isWithinBar(t)):n=!1,n},getInterpolate:function getInterpolate(t){var e=this.getInterpolateType(t);return{basis:F.curveBasis,"basis-closed":F.curveBasisClosed,"basis-open":F.curveBasisOpen,bundle:F.curveBundle,cardinal:F.curveCardinal,"cardinal-closed":F.curveCardinalClosed,"cardinal-open":F.curveCardinalOpen,"catmull-rom":F.curveCatmullRom,"catmull-rom-closed":F.curveCatmullRomClosed,"catmull-rom-open":F.curveCatmullRomOpen,"monotone-x":F.curveMonotoneX,"monotone-y":F.curveMonotoneY,natural:F.curveNatural,"linear-closed":F.curveLinearClosed,linear:F.curveLinear,step:F.curveStep,"step-after":F.curveStepAfter,"step-before":F.curveStepBefore}[e]},getInterpolateType:function getInterpolateType(t){var e=this,n=e.config.spline_interpolation_type,r=e.isInterpolationType(n)?n:"cardinal";return e.isSplineType(t)?r:e.isStepType(t)?e.config.line_step_type:"linear"}});var D=n(22);extend(R.prototype,{initPie:function initPie(){var t=this,e=t.config,n=e.pie_padding,r=t.hasType("pie")&&n?.01*n:e["".concat(e.data_type,"_padAngle")]?e["".concat(e.data_type,"_padAngle")]:0;t.pie=Object(F.pie)().padAngle(r).sortValues(t.isOrderAsc()||t.isOrderDesc()?function(e,n){return t.isOrderAsc()?e-n:n-e}:null).value((function(t){return t.values.reduce((function(t,e){return t+e.value}),0)}))},updateRadius:function updateRadius(){var t=this,e=t.config,n=e.pie_innerRadius,r=e.pie_padding,i=e.gauge_width||e.donut_width;t.radiusExpanded=Math.min(t.arcWidth,t.arcHeight)/2,t.radius=.95*t.radiusExpanded,t.innerRadiusRatio=i?(t.radius-i)/t.radius:.6;var a=n||(r?r*(t.innerRadiusRatio+.1):0);t.innerRadius=t.hasType("donut")||t.hasType("gauge")?t.radius*t.innerRadiusRatio:a},getInnerRadius:function getInnerRadius(t){var e=this.innerRadius;return!isNumber(e)&&t&&(e=e[t.data.id]||0),e},updateArc:function updateArc(){var t=this;t.svgArc=t.getSvgArc(),t.svgArcExpanded=t.getSvgArcExpanded(),t.svgArcExpandedSub=t.getSvgArcExpanded(.98)},updateAngle:function updateAngle(t){var e=this,n=e.config,r=e.pie,i=t,a=!1;if(!n)return null;if(i.data&&e.isGaugeType(i.data)){var o=e.getTotalDataSum();o>n.gauge_max&&(n.gauge_max=o);var c=Math.PI*(n.gauge_fullCircle?2:1),s=n.gauge_startingAngle,u=c*(o/(n.gauge_max-n.gauge_min));r=e.pie.startAngle(s).endAngle(u+s)}
2return r(e.filterTargetsToShow()).forEach((function(t){a||t.data.id!==i.data.id||(a=!0,i=t)})),isNaN(i.startAngle)&&(i.startAngle=0),isNaN(i.endAngle)&&(i.endAngle=i.startAngle),a?i:null},getSvgArc:function getSvgArc(){var t=this,e=t.getInnerRadius(),n=Object(F.arc)().outerRadius(t.radius).innerRadius(isNumber(e)?e:0),newArc=function(r,i){var a="M 0 0";if(r.value||r.data){isNumber(e)||(n=n.innerRadius(t.getInnerRadius(r)));var o=!i&&t.updateAngle(r);i?a=n(r):o&&(a=n(o))}return a};return newArc.centroid=n.centroid,newArc},getSvgArcExpanded:function getSvgArcExpanded(t){var e=this,n=Object(F.arc)().outerRadius(e.radiusExpanded*(t||1));return function(t){var r=e.updateAngle(t);return r?n.innerRadius(e.getInnerRadius(t))(r):"M 0 0"}},getArc:function getArc(t,e,n){return n||this.isArcType(t.data)?this.svgArc(t,e):"M 0 0"},transformForArcLabel:function transformForArcLabel(t){var e=this,n=e.config,r=e.updateAngle(t),i="";if(r&&(!e.hasType("gauge")||e.hasMultiTargets())){var a=this.svgArc.centroid(r),o=isNaN(a[0])?0:a[0],c=isNaN(a[1])?0:a[1],s=Math.sqrt(o*o+c*c),u=e.hasType("donut")&&n.donut_label_ratio||e.hasType("pie")&&n.pie_label_ratio;u=u?isFunction(u)?u(t,e.radius,s):u:e.radius&&(s?(36/e.radius>.375?1.175-36/e.radius:.8)*e.radius/s:0),i="translate(".concat(o*u,",").concat(c*u,")")}return i},convertToArcData:function convertToArcData(t){return this.addName({id:t.data.id,value:t.value,ratio:this.getRatio("arc",t),index:t.index})},textForArcLabel:function textForArcLabel(t){var e=this;e.shouldShowArcLabel()&&t.each((function(t){var n=Object(l.select)(this),r=e.updateAngle(t),i=r?r.value:null,a=e.getRatio("arc",r),o=t.data.id;if(e.hasType("gauge")||e.meetsArcLabelThreshold(a)){var c=(e.getArcLabelFormat()||e.defaultArcValueFormat)(i,a,o).toString();setTextValue(n,c)}}))},textForGaugeMinMax:function textForGaugeMinMax(t,e){var n=this.getGaugeLabelExtents();return n?n(t,e):t},expandArc:function expandArc(t){var e=this;if(e.transiting)var n=setInterval((function(){e.transiting||(clearInterval(n),e.legend.selectAll(".".concat(p.legendItemFocused)).size()>0&&e.expandArc(t))}),10);else{var r=e.mapToTargetIds(t);e.svg.selectAll(e.selectorTargets(r,".".concat(p.chartArc))).each((function(t){if(e.shouldExpand(t.data.id)&&0!==t.value){var n=e.expandDuration(t.data.id);Object(l.select)(this).selectAll("path").transition().duration(n).attr("d",e.svgArcExpanded).transition().duration(2*n).attr("d",e.svgArcExpandedSub)}}))}},unexpandArc:function unexpandArc(t){var e=this;if(!e.transiting){var n=e.mapToTargetIds(t);e.svg.selectAll(e.selectorTargets(n,".".concat(p.chartArc))).selectAll("path").transition().duration((function(t){return e.expandDuration(t.data.id)}
2)).attr("d",e.svgArc),e.svg.selectAll("".concat(p.arc)).style("opacity","1")}},expandDuration:function expandDuration(t){var e,n=this,r=n.config;return n.isDonutType(t)?e="donut":n.isGaugeType(t)?e="gauge":n.isPieType(t)&&(e="pie"),e?r["".concat(e,"_expand_duration")]:50},shouldExpand:function shouldExpand(t){var e=this,n=e.config;return e.isDonutType(t)&&n.donut_expand||e.isGaugeType(t)&&n.gauge_expand||e.isPieType(t)&&n.pie_expand},shouldShowArcLabel:function shouldShowArcLabel(){var t=this,e=t.config;return["pie","donut","gauge"].some((function(n){return t.hasType(n)&&e["".concat(n,"_label_show")]}))},meetsArcLabelThreshold:function meetsArcLabelThreshold(t){var e=this.config;return t>=(this.hasType("donut")?e.donut_label_threshold:e.pie_label_threshold)},getArcLabelFormat:function getArcLabelFormat(){var t=this,e=t.config,n=e.pie_label_format;return t.hasType("gauge")?n=e.gauge_label_format:t.hasType("donut")&&(n=e.donut_label_format),n},getGaugeLabelExtents:function getGaugeLabelExtents(){return this.config.gauge_label_extents},getArcTitle:function getArcTitle(){var t=this,e=t.hasType("donut")?"donut":t.hasType("gauge")&&"gauge";return e?t.config["".concat(e,"_title")]:""},updateTargetsForArc:function updateTargetsForArc(t){var e=this,n=e.main,r=e.hasType("gauge"),i=e.classChartArc.bind(e),a=e.classArcs.bind(e),o=e.classFocus.bind(e),c=n.select(".".concat(p.chartArcs)).selectAll(".".concat(p.chartArc)).data(e.pie(t)).attr("class",(function(t){return i(t)+o(t.data)})),s=c.enter().append("g").attr("class",i);s.append("g").attr("class",a).merge(c),s.append("text").attr("dy",r&&!e.hasMultiTargets()?"-.1em":".35em").style("opacity","0").style("text-anchor","middle").style("pointer-events","none")},initArc:function initArc(){var t=this;t.arcs=t.main.select(".".concat(p.chart)).append("g").attr("class",p.chartArcs).attr("transform",t.getTranslate("arc")),t.setArcTitle()},setArcTitle:function setArcTitle(){var t=this,e=t.getArcTitle(),n=t.hasType("gauge");if(e){var r=t.arcs.append("text").attr("class",p[n?"chartArcsGaugeTitle":"chartArcsTitle"]).style("text-anchor","middle");n&&r.attr("dy","-0.3em").style("font-size","27px"),setTextValue(r,e,n?void 0:[-1.3,1.3])}},redrawArc:function redrawArc(t,e,n){var r=this,i=r.config,a=r.main,o=i.interaction_enabled,c=a.selectAll(".".concat(p.ar
2cs)).selectAll(".".concat(p.arc)).data(r.arcData.bind(r));c.exit().transition().duration(e).style("opacity","0").remove(),(c=c.enter().append("path").attr("class",r.classArc.bind(r)).style("fill",(function(t){return r.color(t.data)})).style("cursor",(function(t){return o&&(i.data_selection_isselectable(t)?"pointer":null)})).style("opacity","0").each((function(t){r.isGaugeType(t.data)&&(t.startAngle=i.gauge_startingAngle,t.endAngle=i.gauge_startingAngle),this._current=t})).merge(c)).attr("transform",(function(t){return!r.isGaugeType(t.data)&&n?"scale(0)":""})).style("opacity",(function(t){return t===this._current?"0":"1"})).each((function(){r.transiting=!0})).transition().duration(t).attrTween("d",(function(t){var e=r.updateAngle(t);if(!e)return function(){return"M 0 0"};isNaN(this._current.startAngle)&&(this._current.startAngle=0),isNaN(this._current.endAngle)&&(this._current.endAngle=this._current.startAngle);var n=Object(D.interpolate)(this._current,e);return this._current=n(0),function(e){var i=n(e);return i.data=t.data,r.getArc(i,!0)}})).attr("transform",n?"scale(1)":"").style("fill",(function(t){return r.levelColor?r.levelColor(t.data.values[0].value):r.color(t.data.id)})).style("opacity","1").call(r.endall,(function(){r.transiting=!1})),o&&r.bindArcEvent(c),r.redrawArcText(t)},bindArcEvent:function bindArcEvent(t){function selectArc(t,n,r){e.expandArc(r),e.api.focus(r),e.toggleFocusLegend(r,!0),e.showTooltip([n],t)}function unselectArc(t){var n=t&&t.id||void 0;e.unexpandArc(n),e.api.revert(),e.revertLegend(),e.hideTooltip()}var e=this,n="touch"===e.inputType,r="mouse"===e.inputType;if(t.on("click",(function(t,n){var r,i=e.updateAngle(t);i&&(r=e.convertToArcData(i),e.toggleShape&&e.toggleShape(this,r,n),e.config.data_onclick.call(e.api,r,this))})),r&&t.on("mouseover",(function(t){if(!e.transiting){var n=e.updateAngle(t),r=n?e.convertToArcData(n):null;selectArc(this,r,r&&r.id||void 0),e.setOverOut(!0,r)}})).on("mouseout",(function(t){if(!e.transiting){var n=e.updateAngle(t),r=n?e.convertToArcData(n):null;unselectArc(),e.setOverOut(!1,r)}})).on("mousemove",(function(t){var n=e.updateAngle(t),r=n?e.convertToArcData(n):null;e.showTooltip([r],this)})),n&&e.hasArcType()&&!e.radars){var handler=function(){if(!e.transiting){var t=(a=l.event.changedTouches[0],Object(l.select)(document.elementFromPoint(a.clientX,a.clientY))).datum(),n=t&&t.data&&t.data.id?e.updateAngle(t):null,r=n?e.convertToArcData(n):null,i=r&&r.id||void 0;e.callOverOutForTouch(r),isUndefined(i)?unselectArc():selectArc(this,r,i)}var a};e.svg.on("touchstart",handler).on("touchmove",handler)}},redrawArcText:function redrawArcText(t){var e=this,n=e.config,r=e.main,i=e.hasType("gauge"),a=r.selectAll(".".concat(p.chartArc)).select("text").style("opacity","0").attr("class",(function(t){return e.isGaugeType(t.data)?p.gaugeValue:null})).call(e.textForArcLabel.bind(e)).attr("transform",e.transformForArcLabel.bind(e)).style("font-size",(function(t){return e.isGaugeType(t.data)&&!e.hasMultiTargets()?"".concat(Math.round(e.radius/5),"px"):""})).transition().duration(t).style("opacity",(function(t){return e.isTargetToShow(t.data.id)&&e.isArcType(t.data)?"1":"0"}));if(r.select(".".concat(p.chartArcsTitle)).style("opacity",e.hasType("donut")||i?"1":"0"),i){var o=n.gauge_fullCircle,c=(o?-4:-1)*n.gauge_startingAngle;o&&a.attr("dy","".concat(Math.round(e.radius/14))),e.arcs.select(".".concat(p.chartArcsBackground)).attr("d",(function(){var t={data:[{value:n.gauge_max}],startAngle:n.gauge_startingAngle,endAngle:c};return e.getArc(t,!0,!0)})),e.arcs.select(".".concat(p.chartArcsGaugeUnit)).attr("dy",".75em").text(n.gauge_label_show?n.gauge_units:""),n.gauge_label_show&&(e.arcs.select(".".concat(p.chartArcsGaugeMin)).attr("dx","".concat(-1*(e.innerRadius+(e.radius-e.innerRadius)/(n.gauge_fullCircle?1:2)),"px")).attr("dy","1.2em").text(e.textForGaugeMinMax(n.gauge_min,!1)),!o&&e.arcs.select(".".concat(p.chartArcsGaugeMax)).attr("dx","".concat(e.innerRadius+(e.radius-e.innerRadius)/2,"px")).attr("dy","1.2em").text(e.textForGaugeMinMax(n.gauge_max,!0)))}},initGauge:function initGauge(){var t=this,e=t.config,n=t.arcs,appendText=function(t){n.append("text").attr("class",t).style("text-anchor","middle").style("pointer-events","none")};t.hasType("gauge")&&(n.append("path").attr("class",p.chartArcsBackgroun
2d),e.gauge_units&&appendText(p.chartArcsGaugeUnit),e.gauge_label_show&&(appendText(p.chartArcsGaugeMin),!e.gauge_fullCircle&&appendText(p.chartArcsGaugeMax)))},getGaugeLabelHeight:function getGaugeLabelHeight(){return this.config.gauge_label_show?20:0}}),extend(R.prototype,{initBar:function initBar(){this.main.select(".".concat(p.chart)).append("g").attr("class",p.chartBars)},updateTargetsForBar:function updateTargetsForBar(t){var e=this,n=e.config,r=e.classChartBar.bind(e),i=e.classBars.bind(e),a=e.classFocus.bind(e);e.main.select(".".concat(p.chartBars)).selectAll(".".concat(p.chartBar)).data(t).attr("class",(function(t){return r(t)+a(t)})).enter().append("g").attr("class",r).style("opacity","0").style("pointer-events","none").append("g").attr("class",i).style("cursor",(function(t){return n.data_selection_isselectable(t)?"pointer":null}))},updateBar:function updateBar(t){var e=this,n=e.barData.bind(e),r=e.classBar.bind(e),i=e.initialOpacity.bind(e);e.mainBar=e.main.selectAll(".".concat(p.bars)).selectAll(".".concat(p.bar)).data(n),e.mainBar.exit().transition().duration(t).style("opacity","0").remove(),e.mainBar=e.mainBar.enter().append("path").attr("class",r).style("fill",e.color).merge(e.mainBar).style("opacity",i)},redrawBar:function redrawBar(t,e){return[(e?this.mainBar.transition(getRandom()):this.mainBar).attr("d",t).style("fill",this.color).style("opacity","1")]},getBarW:function getBarW(t,e){var n,r=this,i=r.config,a=t.tickInterval(r.getMaxDataCount()),o=i.data_groups.length,getWidth=function(t){var n=t?i.bar_width[t]:i.bar_width,r=t?n.ratio:i.bar_width_ratio,o=t?n.max:i.bar_width_max,c=isNumber(n)?n:e?a*r/e:0;return o&&c>o?o:c};return n=getWidth(),!o&&isObjectType(i.bar_width)&&(n={width:n,total:[]},r.filterTargetsToShow(r.data.targets).forEach((function(t){i.bar_width[t.id]&&(n[t.id]=getWidth(t.id),n.total.push(n[t.id]||n.width))}))),n},getBars:function getBars(t,e){var n=this,r=isValue(t)?"-".concat(t):"";return(e?n.main.selectAll(".".concat(p.bars).concat(n.getTargetSelectorSuffix(e))):n.main).selectAll(".".concat(p.bar).concat(r))},expandBars:function expandBars(t,e,n){n&&this.unexpandBars(),this.getBars(t,e).classed(p.EXPANDED,!0)},unexpandBars:function unexpandBars(t){this.getBars(t).classed(p.EXPANDED,!1)},generateDrawBar:function generateDrawBar(t,e){var n=this.config,r=this.generateGetBarPoints(t,e),i=n.axis_rotated,a=n.data_groups.length,o=n.bar_radius,c=n.bar_radius_ratio,s=isNumber(o)&&o>0?function(){return o}:isNumber(c)?function(t){return t*c}:null;return function(t,e){var n=r(t,e),o=+i,c=+!o,u=t.value<0,l=["",""],d=0;if(s&&!a){var h=i?c:o,p=n[2][h]-n[0][h];d=s(p);var g="a".concat(d,",").concat(d," ").concat(u?"1 0 0":"0 0 1"," ");l[+!i]="".concat(g).concat(d,",").concat(d),l[+i]="".concat(g).concat([-d,d][i?"sort":"reverse"]()),u&&l.reverse()}var v=i?"H".concat(n[1][o]-d," ").concat(l[0],"V").concat(n[2][c]-d," ").concat(l[1],"H").concat(n[3][o]):"V".concat(n[1][c]+(u?-d:d)," ").concat(l[0],"H").concat(n[2][o]-d," ").concat(l[1],"V").concat(n[3][c]);return"M".concat(n[0][o],",").concat(n[0][c]).concat(v,"z")}},generateGetBarPoints:function generateGetBarPoints(t,e){var n=this,r=e?n.subXAxis:n.xAxis,i=t.__max__+1,a=n.getBarW(r,i),o=n.getShapeX(a,i,t,!!e),c=n.getShapeY(!!e),s=n.getShapeOffset(n.isBarType,t,!!e),u=e?n.getSubYScale:n.getYScale;return function(t,e){var r=u.call(n,t.id)(0),i=s(t,e)||r,l=isNumber(a)?a:a[t.id]||a.width,d=o(t),h=c(t);return n.config.axis_rotated&&(t.value>0&&h<r||t.value<0&&r<h)&&(h=r),[[d,i],[d,h-=r-i],[d+l,h],[d+l,i]]}},isWithinBar:function isWithinBar(t){var e=Object(l.mouse)(t),n=getRectSegList(t),r=o()(n,2),i=r[0],a=r[1],c=Math.min(i.x,a.x),s=Math.min(i.y,a.y),u=this.config.bar_sensitivity,d=t.getBBox(),h=d.width,p=d.height;return c-u<e[0]&&e[0]<c+h+u&&s-u<e[1]&&e[1]<s+p+u}}),extend(R.prototype,{initBubble:function initBubble(){var t=this.config;this.hasType("bubble")&&(t.point_show=!0,t.point_type="circle",t.point_sensitivity=25)},getBaseLength:function getBaseLength(){var t=this,e="$baseLength",n=t.getCache(e);return n||t.addCache(e,n=getMinMax("min",[t.axes.x.select("path").node().getTotalLength(),t.axes.y.select("path").node().getTotalLength()])),n},getBubbleR:function getBubbleR(t){var e=this,n=e.config.bubble_maxR;isFunction(n)?n=n(t):!isNumber(n)&&(n=e.getBaseLength()/(2*e.getMaxDataCount())+12);var r=getMinMax("max",e.getMinMaxData().max.map((function(t){return isObject(t.value)?t.value.mid:t.value}))),i=n*n*Math.PI,a=t.value*(i/r);return Math.sqrt(a/Math.PI)}}),extend(R.prototype,{initLine:function initLine(){this.main.select(".".concat(p.chart)).append("g").attr("class",p.chartLines)},updateTargetsForLine:function updateTargetsForLine(t){var e=this,n=e.config,r=e.classChartLine.bind(e),i=e.classLines.bind(e),a=e.classAreas.bind(e),o=e.classCircles.bind(e),c=e.classFocus.bind(e),s=e.main.select(".".concat(p.chartLines)).selectAll(".".concat(p.chartLine)).data(t).attr("class",(function(t){return r(t)+c(t)})).enter().append("g").attr("class",r).style("opacity","0").style("pointer-events","none");s.append("g").attr("class",i),s.append("g").attr("class",a),n.point_show&&(n.data_selection_enabled&&s.append("g").attr("class",(function(t){return e.generateClass(p.selectedCircles,t.id)})),s.append("g").attr("class",o).style("cursor",(function(t){return n.data_selection_isselectable(t)?"pointer":null}))),t.forEach((function(t){e.main.selectAll(".".concat(p.selectedCircles).concat(e.getTargetSelectorSuffix(t.id))).selectAll("".concat(p.selectedCircle)).each((function(e){e.value=t.values[e.index].value}))}))},updateLine:function updateLine(t){var e=this;e.mainLine=e.main.selectAll(".".concat(p.lines)).selectAll(".".concat(p.line)).data(e.lineData.bind(e)),e.mainLine.exit().transition().duration(t).style("opacity","0").remove(),e.mainLine=e.mainLine.enter().append("path").attr("class",(function(t){return"".concat(e.classLine.bind(e)(t)," ").concat(e.extraLineClasses(t)||"")})).style("stroke",e.color).merge(e.mainLine).style("opacity",e.initialOpacity.bind(e)).style("shape-rendering",(function(t){return e.isStepType(t)?"crispEdges":""})).attr("transform",null)}
2,redrawLine:function redrawLine(t,e){return[(e?this.mainLine.transition(getRandom()):this.mainLine).attr("d",t).style("stroke",this.color).style("opacity","1")]},getCurve:function getCurve(t){var e=this;return e.config.axis_rotated&&e.isStepType(t)?function(n){var r=e.getInterpolate(t)(n);return r.orgPoint=r.point,r.pointRotated=function(t,e){1===this._point&&(this._point=2);var n=this._y*(1-this._t)+e*this._t;this._context.lineTo(this._x,n),this._context.lineTo(t,n),this._x=t,this._y=e},r.point=function(t,e){0===this._point?this.orgPoint(t,e):this.pointRotated(t,e)},r}:e.getInterpolate(t)},generateDrawLine:function generateDrawLine(t,e){var n=this,r=n.config,i=r.line_connectNull,a=r.axis_rotated,o=n.generateGetLinePoints(t,e),c=e?n.getSubYScale:n.getYScale,xValue=function(t){return(e?n.subxx:n.xx).call(n,t)},yValue=function(t,e){return n.isGrouped(t.id)?o(t,e)[0][1]:c.call(n,t.id)(n.getBaseValue(t))},s=Object(F.line)();s=a?s.x(yValue).y(xValue):s.x(xValue).y(yValue),i||(s=s.defined((function(t){return null!==n.getBaseValue(t)})));var u=e?n.subX:n.x;return function(t){var e,o=c.call(n,t.id),l=i?n.filterRemoveNull(t.values):t.values,d=0,h=0;if(n.isLineType(t)){var p=r.data_regions[t.id];p?e=n.lineWithRegions(l,u,o,p):(n.isStepType(t)&&(l=n.convertValuesToStep(l)),e=s.curve(n.getCurve(t))(l))}else l[0]&&(d=u(l[0].x),h=o(l[0].value)),e=a?"M ".concat(h," ").concat(d):"M ".concat(d," ").concat(h);return e||"M 0 0"}},generateGetLinePoints:function generateGetLinePoints(t,e){var n=this,r=n.config,i=t.__max__+1,a=!!e,o=n.getShapeX(0,i,t,a),c=n.getShapeY(a),s=n.getShapeOffset(n.isLineType,t,a),u=a?n.getSubYScale:n.getYScale;return function(t,e){var i=u.call(n,t.id)(0),a=s(t,e)||i,l=o(t),d=c(t);r.axis_rotated&&(t.value>0&&d<i||t.value<0&&i<d)&&(d=i);var h=[l,d-(i-a)];return[h,h,h,h]}},lineWithRegions:function lineWithRegions(t,e,n,r){var i,a,o,c,s=this,u=s.config.axis_rotated,l=s.isTimeSeries(),d=s.isCategorized()?.5:0,h=[],isWithinRegions=function(t,e){for(var n,r=0;n=e[r];r++)if(n.start<t&&t<=n.end)return n.style;return!1};if(isDefined(r))for(var p,getValue=function(t,e){return isUndefined(t)?e:l?s.parseDate(t):t},g=0;p=r[g];g++){var v=getValue(p.start,t[0].x),m=getValue(p.end,t[t.length-1].x),_=p.style||{dasharray:"2 2"};h[g]={start:v,end:m,style:_}}for(var b,w=u?function(t){return n(t.value)}:function(t){return e(t.x)},T=u?function(t){return e(t.x)}:function(t){return n(t.value)},generateM=function(t){return"M".concat(t[0][0],",").concat(t[0][1],"L").concat(t[1][0],",").concat(t[1][1])},A=l?function(t,r,i,c){var s=t.x.getTime(),l=r.x-t.x,d=new Date(s+l*i),h=new Date(s+l*(i+c)),p=u?[[n(a(i)),e(d)],[n(a(i+o)),e(h)]]:[[e(d),n(a(i))],[e(h),n(a(i+o))]];return generateM(p)}:function(t,r,o,c){var s=u?[[n(a(o),!0),e(i(o))],[n(a(o+c),!0),e(i(o+c))]]:[[e(i(o),!0),n(a(o))],[e(i(o+c),!0),n(a(o+c))]];return generateM(s)},S="M",k=0;b=t[k];k++){var C=t[k-1];_=isWithinRegions(b.x,h);if(isUndefined(h)||!_)S+="".concat(k?"L":"").concat(w(b),",").concat(T(b));else{try{_=_.dasharray.split(" ")}catch(t){_="2 2".split(" ")}i=s.getScale(C.x+d,b.x+d,l),a=s.getScale(C.value,b.value);var M=e(b.x)-e(C.x),R=n(b.value)-n(C.value),L=Math.sqrt(Math.pow(M,2)+Math.pow(R,2));c=(o=_[0]/L)*_[1];for(var E=o;E<=1;E+=c)S+=A(C,b,E,o),E+c>=1&&(S+=A(C,b,1,0))}}return S},updateAreaGradient:function updateAreaGradient(){var t=this;t.data.targets.forEach((function(e){var n="".concat(t.datetimeId,"-areaGradient").concat(t.getTargetSelectorSuffix(e.id));if(t.isAreaType(e)&&t.defs.select("#".concat(n)).empty()){var r=t.color(e),i=t.config.area_linearGradient,a=i.x,o=void 0===a?[0,0]:a,c=i.y,s=void 0===c?[0,1]:c,u=i.stops,l=void 0===u?[[0,r,1],[1,r,0]]:u,d=t.defs.append("linearGradient").attr("id","".concat(n)).attr("x1",o[0]).attr("x2",o[1]).attr("y1",s[0]).attr("y2",s[1]);l.forEach((function(t){var n=isFunction(t[1])?t[1](e.id):t[1];d.append("stop").attr("offset",t[0]).attr("stop-color",n||r).attr("stop-opacity",t[2])}))}}))},updateAreaColor:function updateAreaColor(t){var e=this;return e.config.area_linearGradient?"url(#".concat(e.datetimeId,"-areaGradient").concat(e.getTargetSelectorSuffix(t.id),")"):e.color(t)},updateArea:function updateArea(t){var e=this;e.config.area_linearGradient&&e.updateAreaGradient(),e.mainArea=e.main.selectAll(".".concat(p.areas)).selectAll(".".concat(p.area)).data(e.lineData.bind(e)),e.mainArea.exit().transition().duration(t).style("opacity","0").remove(),e.mainArea=e.mainArea.enter().append("path").attr("class",e.classArea.bind(e)).style("fill",e.updateAreaColor.bind(e)).style("opacity",(function(){return e.orgAreaOpacity=Object(l.select)(this).style("opacity"),"0"})).merge(e.mainArea),e.mainArea.style("opacity",e.orgAreaOpacity)},redrawArea:function redrawArea(t,e){var n=this;return[(e?n.mainArea.transition(getRandom()):n.mainArea).attr("d",t).style("fill",n.updateAreaColor.bind(n)).style("opacity",(function(t){return n.isAreaRangeType(t)?n.orgAreaOpacity/1.75:n.orgAreaOpacity}))]},generateDrawArea:function generateDrawArea(t,e){var n=this,r=n.config,i=r.line_connectNull,a=r.axis_rotated,o=n.generateGetAreaPoints(t,e),c=e?n.getSubYScale:n.getYScale,xValue=function(t){return(e?n.subxx:n.xx).call(n,t)},value0=function(t,e){return n.isGrouped(t.id)?o(t,e)[0][1]:c.call(n,t.id)(n.isAreaRangeType(t)?n.getAreaRangeData(t,"high"):0)},value1=function(t,e){return n.isGrouped(t.id)?o(t,e)[1][1]:c.call(n,t.id)(n.isAreaRangeType(t)?n.getAreaRangeData(t,"low"):t.value)};
2return function(t){var e,o=i?n.filterRemoveNull(t.values):t.values,c=0,s=0;if(n.isAreaType(t)){var u=Object(F.area)();u=a?u.y(xValue).x0(value0).x1(value1):u.x(xValue).y0(r.area_above?0:value0).y1(value1),i||(u=u.defined((function(t){return null!==n.getBaseValue(t)}))),n.isStepType(t)&&(o=n.convertValuesToStep(o)),e=u.curve(n.getCurve(t))(o)}else o[0]&&(c=n.x(o[0].x),s=n.getYScale(t.id)(o[0].value)),e=a?"M ".concat(s," ").concat(c):"M ".concat(c," ").concat(s);return e||"M 0 0"}},generateGetAreaPoints:function generateGetAreaPoints(t,e){var n=this,r=n.config,i=t.__max__+1,a=n.getShapeX(0,i,t,!!e),o=n.getShapeY(!!e),c=n.getShapeOffset(n.isAreaType,t,!!e),s=e?n.getSubYScale:n.getYScale;return function(t,e){var i=s.call(n,t.id)(0),u=c(t,e)||i,l=a(t),d=o(t);return r.axis_rotated&&(t.value>0&&d<i||t.value<0&&i<d)&&(d=i),[[l,u],[l,d-(i-u)],[l,d-(i-u)],[l,u]]}},updateCircle:function updateCircle(){var t=this;t.config.point_show&&(t.mainCircle=t.main.selectAll(".".concat(p.circles)).selectAll(".".concat(p.circle)).data((function(e){return!t.isBarType(e)&&(!t.isLineType(e)||t.shouldDrawPointsForLine(e))&&t.labelishData(e)})),t.mainCircle.exit().remove(),t.mainCircle=t.mainCircle.enter().append(t.point("create",this,t.classCircle.bind(t),t.pointR.bind(t),t.color)).merge(t.mainCircle).style("stroke",t.color).style("opacity",t.initialOpacityForCircle.bind(t)))},redrawCircle:function redrawCircle(t,e,n,r){var i=this,a=i.main.selectAll(".".concat(p.selectedCircle));if(!i.config.point_show)return[];var o=[];i.mainCircle.each((function(c){var s=i.point("update",i,t,e,i.opacityForCircle.bind(i),i.color,n,r,a).bind(this)(c);o.push(s)}));var c=i.isCirclePoint()?"c":"";return[o,a.attr("".concat(c,"x"),t).attr("".concat(c,"y"),e)]},circleX:function circleX(t){var e=this,n=isValue(t.x);return e.config.zoom_enabled&&e.zoomScale?n?e.zoomScale(t.x):null:n?e.x(t.x):null},updateCircleY:function updateCircleY(){var t=this;t.circleY=function(e,n){var r=e.id;return t.isGrouped(r)?t.generateGetLinePoints(t.getShapeIndices(t.isLineType))(e,n)[0][1]:t.getYScale(r)(t.getBaseValue(e))}},getCircles:function getCircles(t,e){var n=this,r=isValue(t)?"-".concat(t):"";return(e?n.main.selectAll(".".concat(p.circles).concat(n.getTargetSelectorSuffix(e))):n.main).selectAll(".".concat(p.circle).concat(r))},expandCircles:function expandCircles(t,e,n){var r=this,i=r.pointExpandedR.bind(r);n&&r.unexpandCircles();var a=r.getCircles(t,e).classed(p.EXPANDED,!0),o=i(a)/r.config.point_r,c=1-o;r.isCirclePoint()?a.attr("r",i):a.each((function(){var t=Object(l.select)(this);if("circle"===this.tagName)t.attr("r",i);else{var e=this.getBBox(),n=e.width,r=e.height,a=c*(+t.attr("x")+n/2),s=c*(+t.attr("y")+r/2);t.attr("transform","translate(".concat(a," ").concat(s,") scale(").concat(o,")"))}}))},unexpandCircles:function unexpandCircles(t){var e=this,n=e.pointR.bind(e),r=e.getCircles(t).filter((function(){return Object(l.select)(this).classed(p.EXPANDED)})).classed(p.EXPANDED,!1);r.attr("r",n),e.isCirclePoint()||r.attr("transform","scale(".concat(n(r)/e.config.point_r,")"))},pointR:function(t){var e=this,n=e.config.point_r,r=n;return e.isStepType(t)?r=0:e.isBubbleType(t)?r=e.getBubbleR(t):isFunction(n)&&(r=n(t)),r},pointExpandedR:function pointExpandedR(t){var e=this,n=e.config,r=e.isBubbleType(t)?1.15:1.75;return n.point_focus_expand_enabled?n.point_focus_expand_r||e.pointR(t)*r:e.pointR(t)},pointSelectR:function pointSelectR(t){var e=this.config.point_select_r;return isFunction(e)?e(t):e||4*this.pointR(t)},isWithinCircle:function isWithinCircle(t,e){var n=Object(l.mouse)(t),r=Object(l.select)(t),i=this.isCirclePoint()?"c":"",a=+r.attr("".concat(i,"x")),o=+r.attr("".concat(i,"y"));if(!a&&!o&&1===t.nodeType){var c=t.getBBox?t.getBBox():t.getBoundingClientRect();a=c.x,o=c.y}return Math.sqrt(Math.pow(a-n[0],2)+Math.pow(o-n[1],2))<(e||this.config.point_sensitivity)},isWithinStep:function isWithinStep(t,e){return Math.abs(e-Object(l.mouse)(t)[1])<30},shouldDrawPointsForLine:function shouldDrawPointsForLine(t){var e=this.config.line_point;return!0===e||isArray(e)&&-1!==e.indexOf(t.id)}}),extend(R.prototype,{hasValidPointType:function hasValidPointType(t){return/^(circle|rect(angle)?|polygon|ellipse|use)$/i.test(t||this.config.point_type)},hasValidPointDrawMethods:function hasValidPointDrawMethods(t){var e=t||this.config.point_type;return isObjectType(e)&&isFunction(e.create)&&isFunction(e.update)},insertPointInfoDefs:function insertPointInfoDefs(t,e){var copyAttr=function(t,e){for(var n,r=t.attributes,i=0;n=r[i];i++)n=n.name,e.setAttribute(n,t.getAttribute(n))},n=(new DOMParser).parseFromString(t,"image/svg+xml").documentElement,r=document.createElementNS(l.namespaces.svg,n.nodeName.toLowerCase());if(r.id=e,r.style.fill="inherit",r.style.stroke="inherit",copyAttr(n,r),n.childNodes&&n.childNodes.length){var i=Object(l.select)(r);"innerHTML"in r?i.html(n.innerHTML):toArray(n.childNodes).forEac
2h((function(t){copyAttr(t,i.append(t.tagName).node())}))}this.defs.node().appendChild(r)},pointFromDefs:function pointFromDefs(t){return this.defs.select("#".concat(t))},generatePoint:function generatePoint(){var t=this,e=t.config,n=[],r=notEmpty(e.point_pattern)?e.point_pattern:[e.point_type];return function(e,i){for(var a=arguments.length,o=Array(a>2?a-2:0),c=2;c<a;c++)o[c-2]=arguments[c];return function(a){var c,s=a.id||a.data&&a.data.id||a,u=Object(l.select)(this);if(n.indexOf(s)<0&&n.push(s),c=r[n.indexOf(s)%r.length],t.hasValidPointType(c))c=t[c];else if(!t.hasValidPointDrawMethods(c)){var d="".concat(t.datetimeId,"-point-").concat(s);if(t.pointFromDefs(d).size()<1&&t.insertPointInfoDefs(c,d),"create"===e)return t.custom.create.bind(i).apply(void 0,[u,d].concat(o));if("update"===e)return t.custom.update.bind(i).apply(void 0,[u].concat(o))}return c[e].bind(i).apply(void 0,[u].concat(o))}}},getTransitionName:function getTransitionName(){return getRandom()},custom:{create:function create(t,e,n,r,i){return t.append("use").attr("xlink:href","#".concat(e)).attr("class",n).style("fill",i).node()},update:function update(t,e,n,r,i,a,o,c){var s=t.node().getBBox(),u=s.width,l=s.height,xPosFn2=function(t){return e(t)-u/2},yPosFn2=function(t){return n(t)-l/2},d=t;if(a){var h=this.getTransitionName();o&&(d=t.attr("x",xPosFn2)),d=t.transition(h).attr("x",xPosFn2).attr("y",yPosFn2).transition(h),c.transition(this.getTransitionName())}else d=t.attr("x",xPosFn2).attr("y",yPosFn2);return d.style("opacity",r).style("fill",i)}},circle:{create:function create(t,e,n,r){return t.append("circle").attr("class",e).attr("r",n).style("fill",r).node()},update:function update(t,e,n,r,i,a,o,c){var s=this,u=t;if(s.hasType("bubble")&&(u=u.attr("r",s.pointR.bind(s))),a){var l=s.getTransitionName();o&&(u=u.attr("cx",e)),u=t.attr("cx")?u.transition(l).attr("cx",e).attr("cy",n).transition(l):u.attr("cx",e).attr("cy",n),c.transition(s.getTransitionName())}else u=u.attr("cx",e).attr("cy",n);return u.style("opacity",r).style("fill",i)}},rectangle:{create:function create(t,e,n,r){var rectSizeFn=function(t){return 2*n(t)};return t.append("rect").attr("class",e).attr("width",rectSizeFn).attr("height",rectSizeFn).style("fill",r).node()},update:function update(t,e,n,r,i,a,o,c){var s=this,u=s.config.point_r,rectXPosFn=function(t){return e(t)-u},rectYPosFn=function(t){return n(t)-u},l=t;if(a){var d=s.getTransitionName();o&&(l=l.attr("x",rectXPosFn)),l=l.transition(d).attr("x",rectXPosFn).attr("y",rectYPosFn).transition(d),c.transition(s.getTransitionName())}else l=l.attr("x",rectXPosFn).attr("y",rectYPosFn);return l.style("opacity",r).style("fill",i)}}});var I="$radarPoints";extend(R.prototype,{initRadar:function initRadar(){var t=this,e=t.config;t.hasType("radar")&&(t.radars=t.main.select(".".concat(p.chart)).append("g").attr("class",p.chartRadars),t.radars.levels=t.radars.append("g").attr("class",p.levels),t.radars.axes=t.radars.append("g").attr("class",p.axis),t.radars.shapes=t.radars.append("g").attr("class",p.shapes),t.maxValue=e.radar_axis_max||t.getMinMaxData().max[0].value)},getRadarSize:function getRadarSize(){var t=this,e=t.config.axis_x_categories.length<4?-20:10,n=(Math.min(t.arcWidth,t.arcHeight)-e)/2;return[n,n]},updateTargetsForRadar:function updateTargetsForRadar(t){var e=this.config;isEmpty(e.axis_x_categories)&&(e.axis_x_categories=getRange(0,getMinMax("max",t.map((function(t){return t.values.length}))))),this.generateRadarPoints()},getRadarPosition:function getRadarPosition(t,e,n,r){var i=this.config,a=this.getRadarSize(),c=o()(a,2),s=c[0],u=c[1],l=i.axis_x_categories.length,d=i.radar_direction_clockwise,h=toArray(t).map((function(a){return function getPosition(t,e,n,r,i,a){var o=t&&r>0?n-r:r,c=2*Math.PI;return i*(1-a*("x"===e?Math.sin:Math.cos)(o*c/n))}(d,a,l,e,isDefined(n)?n:"x"===t?s:u,isNumber(r)?r:i.radar_size_ratio)}));return 1===h.length?h[0]:h},generateRadarPoints:function generateRadarPoints(){var t=this,e=t.data.targets,n=t.getRadarSize(),r=o()(n,2),i=r[0],a=r[1],c=t.getCache(I)||{},s=c._size;s&&(s.width===i||s.height===a)||(e.forEach((function(e){c[e.id]=e.values.map((function(e,n){return t.getRadarPosition(["x","y"],n,void 0,t.getRatio("radar",e))}))})),c._size={width:i,height:a},t.addCache(I,c))},redrawRadar:function redrawRadar(t,e){var n=this,r=n.getTranslate("radar");r&&(n.radars.attr("transform",r),n.main.selectAll(".".concat(p.circles)).attr("transform",r),n.main.select(".".concat(p.chartTexts)).attr("transform",r),n.generateRadarPoints(),n.updateRadarLevel(),n.updateRadarAxes(),n.updateRadarShape(t,e))},generateGetRadarPoints:function generateGetRadarPoints(){var t=this.getCache(I);return function(e,n){var r=t[e.id][n];return[r,r,r,r]}},updateRadarLevel:function updateRadarLevel(){var t=this,e=t.config,n=t.getRadarSize(),r=o()(n,2),i=r[0],a=r[1],c=e.radar_level_depth,s=e.axis_x_categories.length,u=e.radar_level_text_show,l=t.radars.levels,d=getRange(0,c),h=e.radar_size_ratio*Math.min(i,a),g=d.map((function(t){return h*((t+1)/c)})),v=e.radar_level_text_format,m=d.map((function(e){var n=g[e];return getRange(0,s).map((function(e){return t.getRadarPosition(["x","y"],e,n,1).join(",")})).join(" ")})),_=l.selectAll(".".concat(p.level)).data(d);_.exit().remove();var b=_.enter().append("g").attr("class",(function(t,e){return"".concat(p.level," ").concat(p.level,"-").concat(e)}));
2b.append("polygon").style("visibility",e.radar_level_show?null:"hidden"),u&&(l.select("text").empty()&&l.append("text").attr("dx","-.5em").attr("dy","-.7em").style("text-anchor","end").text((function(){return v(0)})),b.append("text").attr("dx","-.5em").style("text-anchor","end").text((function(e){return v(t.maxValue/d.length*(e+1))}))),b.merge(_).attr("transform",(function(t){return"translate(".concat(i-g[t],", ").concat(a-g[t],")")})).selectAll("polygon").attr("points",(function(t){return m[t]})),u&&l.selectAll("text").attr("x",(function(t){return isUndefined(t)?i:m[t].split(",")[0]})).attr("y",(function(t){return isUndefined(t)?a:0}))},updateRadarAxes:function updateRadarAxes(){var t=this,e=t.config,n=t.getRadarSize(),r=o()(n,2),i=r[0],a=r[1],c=e.axis_x_categories,s=t.radars.axes.selectAll("g").data(c);s.exit().remove();var u=s.enter().append("g").attr("class",(function(t,e){return"".concat(p.axis,"-").concat(e)}));e.radar_axis_line_show&&u.append("line"),e.radar_axis_text_show&&u.append("text"),s=u.merge(s),e.radar_axis_line_show&&s.select("line").attr("x1",i).attr("y1",a).attr("x2",(function(e,n){return t.getRadarPosition("x",n)})).attr("y2",(function(e,n){return t.getRadarPosition("y",n)})),e.radar_axis_text_show&&s.select("text").style("text-anchor","middle").attr("dy",".5em").call((function(t){t.each((function(t){setTextValue(Object(l.select)(this),t,[-1.2,1.2])}))})).datum((function(t,e){return{index:e}})).attr("transform",(function(e,n){return"translate(".concat(t.getRadarPosition("x",n,void 0,1)," ").concat(t.getRadarPosition("y",n,void 0,1),")")})),t.bindEvent()},bindEvent:function bindEvent(){var t=this,e=this;if(e.config.interaction_enabled){var n="mouse"===e.inputType,getIndex=function(){var t=l.event.target;/tspan/i.test(t.tagName)&&(t=t.parentNode);var e=Object(l.select)(t).datum();return e&&1===Object.keys(e).length?e.index:void 0},hide=function(){var r=getIndex(),i=isUndefined(r);(n||i)&&(t.hideTooltip(),t.unexpandCircles(),n?e.setOverOut(!1,r):i&&e.callOverOutForTouch())};e.radars.select(".".concat(p.axis)).on(n?"mouseover ":"touchstart",(function(){if(!e.transiting){var t=getIndex();e.selectRectForSingle(e.svg.node(),null,t),n?e.setOverOut(!0,t):e.callOverOutForTouch(t)}})).on("mouseout",n?hide:null),n||e.svg.on("touchstart",hide)}},updateRadarShape:function updateRadarShape(t,e){var n=this,r=n.data.targets,i=n.getCache(I),a=n.radars.shapes.selectAll("polygon").data(r),o=a.enter().append("g").attr("class",n.classChartRadar.bind(n));a.exit().transition().duration(e).remove(),o.append("polygon").merge(a).transition().duration(t).style("fill",(function(t){return n.color(t)})).style("stroke",(function(t){return n.color(t)})).attr("points",(function(t){return i[t.id].join(" ")}))},radarCircleX:function radarCircleX(t){return this.getCache(I)[t.id][t.index][0]},radarCircleY:function radarCircleY(t){return this.getCache(I)[t.id][t.index][1]}}),extend(R.prototype,{initText:function initText(){this.main.select(".".concat(p.chart)).append("g").attr("class",p.chartTexts),this.mainText=Object(l.selectAll)([])},updateTargetsForText:function updateTargetsForText(t){var e=this,n=e.classChartText.bind(e),r=e.classTexts.bind(e),i=e.classFocus.bind(e);e.main.select(".".concat(p.chartTexts)).selectAll(".".concat(p.chartText)).data(t).attr("class",(function(t){return n(t)+i(t)})).enter().append("g").attr("class",n).style("opacity","0").style("pointer-events","none").append("g").attr("class",r)},updateText:function updateText(t){var e=this,n=this,r=n.config,i=n.labelishData.bind(n),a=n.classText.bind(n);n.mainText=n.main.selectAll(".".concat(p.texts)).selectAll(".".concat(p.text)).data((function(t){return e.isRadarType(t)?t.values:i(t)})),n.mainText.exit().transition().duration(t).style("fill-opacity","0").remove(),n.mainText=n.mainText.enter().append("text").merge(n.mainText).attr("class",a).attr("text-anchor",(function(t){return r.axis_rotated?t.value<0?"end":"start":"middle"})).style("fill",n.updateTextColor.bind(n)).style("fill-opacity","0").text((function(t,e,r){return n.dataLabelFormat(t.id)(t.value,t.id,e,r)}))},updateTextColor:function updateTextColor(t){var e,n=this.config.data_labels_colors;return isString(n)?e=n:isObject(n)&&(e=n[t.id]),e||this.color(t)},redrawText:function redrawText(t,e,n,r){var i=this,a=getRandom(),o=n?0:i.opacityForText.bind(i);return[this.mainText.each((function(){var n=Object(l.select)(this);(r&&n.attr("x")?n.transition(a):n).attr("x",t).attr("y",e).style("fill",i.updateTextColor.bind(i)).style("fill-opacity",o)}))]}
2,getTextRect:function getTextRect(t,e){var n=this,r=t.node?t.node():t;/text/i.test(r.tagName)||(r=r.querySelector("text"));var i=r.textContent,a="$".concat(i.replace(/\W/g,"_")),o=n.getCache(a);return o||(n.svg.append("text").style("visibility","hidden").style("font",Object(l.select)(r).style("font")).classed(e,!0).text(i).call((function(t){o=t.node().getBoundingClientRect()})).remove(),n.addCache(a,o)),o},generateXYForText:function generateXYForText(t,e){var n=this,r=Object.keys(t),i={},a=e?n.getXForText:n.getYForText;return n.hasType("radar")&&r.push("radar"),r.forEach((function(e){i[e]=n["generateGet".concat(capitalize(e),"Points")](t[e],!1)})),function(t,e){var r=(n.isAreaType(t)?"area":n.isBarType(t)&&"bar")||n.isRadarType(t)&&"radar"||"line";return a.call(n,i[r](t,e),t,this)}},getCenteredTextPos:function getCenteredTextPos(t,e,n){var r=this.config,i=r.axis_rotated;if(r.data_labels.centered&&this.isBarType(t)){var a=n.getBoundingClientRect(),o=t.value>=0;if(i){var c=(o?e[1][1]-e[0][1]:e[0][1]-e[1][1])/2+a.width/2;return o?-c-3:c+2}var s=(o?e[0][1]-e[1][1]:e[1][1]-e[0][1])/2+a.height/2;return o?s:-s-2}return 0},getXForText:function getXForText(t,e,n){var r,i,a=this,o=a.config,c=o.axis_rotated;return c?(i=a.isBarType(e)?4:6,r=t[2][1]+i*(e.value<0?-1:1)):r=a.hasType("bar")?(t[2][0]+t[0][0])/2:t[0][0],null===e.value&&(r>a.width?r=a.width-n.getBoundingClientRect().width:r<0&&(r=4)),c&&(r+=a.getCenteredTextPos(e,t,n)),r+(o.data_labels_position.x||0)},getYForText:function getYForText(t,e,n){var r,i=this,a=i.config,o=a.axis_rotated,c=a.point_r,s=n.getBoundingClientRect(),u=3;if(o)r=(t[0][0]+t[2][0]+.6*s.height)/2;else if(r=t[2][1],isNumber(c)&&c>5&&(i.isLineType(e)||i.isScatterType(e))&&(u+=a.point_r/2.3),e.value<0||0===e.value&&!i.hasPositiveValue)r+=s.height,i.isBarType(e)?r-=u:!i.isBarType(e)&&(r+=u);else{var l=2*-u;i.isBarType(e)?l=-u:i.isBubbleType(e)&&(l=u),r+=l}if(null===e.value&&!o){var d=s.height;r<d?r=d:r>this.height&&(r=this.height-4)}return o||(r+=i.getCenteredTextPos(e,t,n)),r+(a.data_labels_position.y||0)}});var z={Area:["area","area-spline","area-spline-range","area-line-range","area-step"],AreaRange:["area-spline-range","area-line-range"],Arc:["pie","donut","gauge","radar"],Line:["line","spline","area","area-spline","area-spline-range","area-line-range","step","area-step"],Step:["step","area-step"],Spline:["spline","area-spline","area-spline-range"]};extend(R.prototype,{setTargetType:function setTargetType(t,e){var n=this,r=n.config;n.mapToTargetIds(t).forEach((function(t){n.withoutFadeIn[t]=e===r.data_types[t],r.data_types[t]=e})),t||(r.data_type=e)},hasType:function hasType(t,e){var n=this,r=n.config.data_types,i=e||n.data.targets,a=!1;return i&&i.length?i.forEach((function(e){var n=r[e.id];(n&&n.indexOf(t)>=0||!n&&"line"===t)&&(a=!0)})):Object.keys(r).length?Object.keys(r).forEach((function(e){r[e]===t&&(a=!0)})):a=n.config.data_type===t,a},hasTypeOf:function hasTypeOf(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return!z[t].filter((function(t){return-1===r.indexOf(t)})).every((function(t){return!n.hasType(t,e)}))},isTypeOf:function isTypeOf(t,e){var n=isString(t)?t:t.id,r=this.config.data_types[n];return isArray(e)?e.indexOf(r)>=0:r===e},hasArcType:function hasArcType(t,e){return this.hasTypeOf("Arc",t,e)},isLineType:function isLineType(t){var e=isString(t)?t:t.id;return!this.config.data_types[e]||this.isTypeOf(e,z.Line)},isStepType:function isStepType(t){return this.isTypeOf(t,z.Step)},isSplineType:function isSplineType(t){return this.isTypeOf(t,z.Spline)},isAreaType:function isAreaType(t){return this.isTypeOf(t,z.Area)},isAreaRangeType:function isAreaRangeType(t){return this.isTypeOf(t,z.AreaRange)},isBarType:function isBarType(t){return this.isTypeOf(t,"bar")},isBubbleType:function isBubbleType(t){return this.isTypeOf(t,"bubble")},isScatterType:function isScatterType(t){return this.isTypeOf(t,"scatter")},isPieType:function isPieType(t){return this.isTypeOf(t,"pie")},isGaugeType:function isGaugeType(t){return this.isTypeOf(t,"gauge")},isDonutType:function isDonutType(t){return this.isTypeOf(t,"donut")},isRadarType:function isRadarType(t){return this.isTypeOf(t,"radar")},isArcType:function isArcType(t){return this.isPieType(t)||this.isDonutType(t)||this.isGaugeType(t)||this.isRadarType(t)},isCirclePoint:function isCirclePoint(){var t=this.config,e=t.point_pattern;return"circle"===t.point_type&&(!e||isArray(e)&&0===e.length)},lineData:function lineData(t){return this.isLineType(t)?[t]:[]},arcData:function arcData(t){return this.isArcType(t.data)?[t]:[]},barData:function barData(t){return this.isBarType(t)?t.values:[]},labelishData:function labelishData(t){return this.isBarType(t)||this.isLineType(t)||this.isScatterType(t)||this.isBubbleType(t)||this.isRadarType(t)?t.values:[]},barLineBubbleData:function barLineBubbleData(t){return this.isBarType(t)||this.isLineType(t)||this.isBubbleType(t)?t.values:[]},isInterpolationType:function isInterpolationType(t){return["basis","basis-closed","basis-open","bundle","cardinal","cardinal-closed","cardinal-open","catmull-rom","catmull-rom-closed","catmull-rom-open","linear","linear-closed","monotone-x","monotone-y","natural"].indexOf(t)>=0}});var getGridTextAnchor=function(t){return isValue(t.position)||"end"},getGridTextDx=function(t){return"start"===t.position?4:"middle"===t.position?0:-4},getGridTextX=function(t,e,n){return function(r){var i=t?0:e;return"start"===r.position?i=t?-n:0:"middle"===r.position&&(i=(t?-n:e)/2),i}};extend(R.prototype,{initGrid:function initGrid(){var t=this;t.xgrid=Object(l.selectAll)([]),t.initGridLines(),t.initXYFocusGrid()},initGridLines:function initGridLines(){var t=this,e=t.config;(e.grid_x_lines.length||e.grid_y_lines.length)&&(t.gridLines=t.main.insert("g",".".concat(p.chart).concat(e.grid_lines_front?" + *":"")).attr("clip-path",t.clipPathForGrid).attr("class","".concat(p.grid," ").concat(p.gridLines)),t.gridLines.append("g").attr("class",p.xgridLines),t.gridLines.append("g").attr("class",p.ygridLines),t.xgridLines=Object(l.selectAll)([]))},updateXGrid:function updateXGrid(t){var e=this,n=e.config,r=n.axis_rotated,i=e.generateGridData(n.grid_x_type,e.x),a=e.isCategorized()?e.xAxis.tickOffset():0,pos=function(t){return((e.zoomScale||e.x)(t)+a)*(r?-1:1)};e.xgridAttr=r?{x1:0,x2:e.width,y1:pos,y2:pos}:{x1:pos,x2:pos,y1:0,y2:e.height},e.xgrid=e.main.select(".".concat(p.xgrids)).selectAll(".".concat(p.xgrid)).data(i),e.xgrid.exit(
2).remove(),e.xgrid=e.xgrid.enter().append("line").attr("class",p.xgrid).merge(e.xgrid),t||e.xgrid.each((function(){var t=Object(l.select)(this);Object.keys(e.xgridAttr).forEach((function(n){t.attr(n,e.xgridAttr[n]).style("opacity",(function(){return t.attr(r?"y1":"x1")===(r?e.height:0)?"0":"1"}))}))}))},updateYGrid:function updateYGrid(){var t=this,e=t.config,n=e.axis_rotated,r=t.yAxis.tickValues()||t.y.ticks(e.grid_y_ticks),pos=function(e){return Math.ceil(t.y(e))};t.ygrid=t.main.select(".".concat(p.ygrids)).selectAll(".".concat(p.ygrid)).data(r),t.ygrid.exit().remove(),t.ygrid=t.ygrid.enter().append("line").attr("class",p.ygrid).merge(t.ygrid),t.ygrid.attr("x1",n?pos:0).attr("x2",n?pos:t.width).attr("y1",n?0:pos).attr("y2",n?t.height:pos),t.smoothLines(t.ygrid,"grid")},updateGrid:function updateGrid(t){var e=this;e.gridLines||e.initGridLines(),e.grid.style("visibility",e.hasArcType()?"hidden":"visible"),e.main.select("line.".concat(p.xgridFocus)).style("visibility","hidden"),e.updateXGridLines(t),e.updateYGridLines(t)},updateXGridLines:function updateXGridLines(t){var e=this,n=e.main,r=e.config,i=r.axis_rotated;r.grid_x_show&&e.updateXGrid(),e.xgridLines=n.select(".".concat(p.xgridLines)).selectAll(".".concat(p.xgridLine)).data(r.grid_x_lines),e.xgridLines.exit().transition().duration(t).style("opacity","0").remove();var a=e.xgridLines.enter().append("g");a.append("line").style("opacity","0"),a.append("text").attr("transform",i?"":"rotate(-90)").attr("dy",-5).style("opacity","0"),e.xgridLines=a.merge(e.xgridLines),e.xgridLines.attr("class",(function(t){return"".concat(p.xgridLine," ").concat(t.class||"").trim()})).select("text").attr("text-anchor",getGridTextAnchor).attr("dx",getGridTextDx).transition().duration(t).text((function(t){return t.text})).transition().style("opacity","1")},updateYGridLines:function updateYGridLines(t){var e=this,n=e.main,r=e.config,i=r.axis_rotated;r.grid_y_show&&e.updateYGrid(),e.ygridLines=n.select(".".concat(p.ygridLines)).selectAll(".".concat(p.ygridLine)).data(r.grid_y_lines),e.ygridLines.exit().transition().duration(t).style("opacity","0").remove();var a=e.ygridLines.enter().append("g");a.append("line").style("opacity","0"),a.append("text").attr("transform",i?"rotate(-90)":"").style("opacity","0"),e.ygridLines=a.merge(e.ygridLines);var o=e.yv.bind(e);e.ygridLines.attr("class",(function(t){return"".concat(p.ygridLine," ").concat(t.class||"").trim()})).select("line").transition().duration(t).attr("x1",i?o:0).attr("x2",i?o:e.width).attr("y1",i?0:o).attr("y2",i?e.height:o).transition().style("opacity","1"),e.ygridLines.select("text").attr("text-anchor",getGridTextAnchor).attr("dx",getGridTextDx).transition().duration(t).attr("dy",-5).attr("x",getGridTextX(i,e.width,e.height)).attr("y",o).text((function(t){return t.text})).transition().style("opacity","1")}
2,redrawGrid:function redrawGrid(t){var e=this,n=e.config.axis_rotated,r=e.xv.bind(e),i=e.xgridLines.select("line"),a=e.xgridLines.select("text");return i=(t?i.transition():i).attr("x1",n?0:r).attr("x2",n?e.width:r).attr("y1",n?r:0).attr("y2",n?r:e.height),a=(t?a.transition():a).attr("x",getGridTextX(!n,e.width,e.height)).attr("y",r).text((function(t){return t.text})),[(t?i.transition():i).style("opacity","1"),(t?a.transition():a).style("opacity","1")]},initXYFocusGrid:function initXYFocusGrid(){var t=this,e=t.config,n=e.grid_front,r=".".concat(p[n&&t.gridLines?"gridLines":"chart"]).concat(n?" + *":"");t.grid=t.main.insert("g",r).attr("clip-path",t.clipPathForGrid).attr("class",p.grid),e.grid_x_show&&t.grid.append("g").attr("class",p.xgrids),e.grid_y_show&&t.grid.append("g").attr("class",p.ygrids),e.grid_focus_show&&t.grid.append("g").attr("class",p.xgridFocus).append("line").attr("class",p.xgridFocus)},showXGridFocus:function showXGridFocus(t){var e=this,n=e.config,r=n.axis_rotated,i=t.filter((function(t){return t&&isValue(e.getBaseValue(t))})),a=e.main.selectAll("line.".concat(p.xgridFocus)),o=e.xx.bind(e);!n.tooltip_show||e.hasType("bubble")||e.hasType("scatter")||e.hasArcType()||(a.style("visibility","visible").data([i[0]]).attr(r?"y1":"x1",o).attr(r?"y2":"x2",o),e.smoothLines(a,"grid"))},hideXGridFocus:function hideXGridFocus(){this.main.select("line.".concat(p.xgridFocus)).style("visibility","hidden")},updateXgridFocus:function updateXgridFocus(){var t=this,e=t.config.axis_rotated;t.main.select("line.".concat(p.xgridFocus)).attr("x1",e?0:-10).attr("x2",e?t.width:-10).attr("y1",e?-10:0).attr("y2",e?-10:t.height)},generateGridData:function generateGridData(t,e){var n=this.main.select(".".concat(p.axisX)).selectAll(".tick").size(),r=[];if("year"===t)for(var i=this.getXDomain(),a=i[0].getFullYear(),o=i[1].getFullYear(),c=a;c<=o;c++)r.push(new Date("".concat(c,"-01-01 00:00:00")));else(r=e.ticks(10)).length>n&&(r=r.filter((function(t){return(t+"").indexOf(".")<0})));return r},getGridFilterToRemove:function getGridFilterToRemove(t){return t?function(e){var n=!1;return(isArray(t)?t.concat():[t]).forEach((function(t){("value"in t&&e.value===t.value||"class"in t&&e.class===t.class)&&(n=!0)})),n}:function(){return!0}},removeGridLines:function removeGridLines(t,e){var n=this,r=n.config,i=n.getGridFilterToRemove(t),a=e?p.xgridLines:p.ygridLines,o=e?p.xgridLine:p.ygridLine;n.main.select(".".concat(a)).selectAll(".".concat(o)).filter(i).transition().duration(r.transition_duration).style("opacity","0").remove();var c="grid_".concat(e?"x":"y","_lines");r[c]=r[c].filter((function toShow(t){return!i(t)}))}}),extend(R.prototype,{initTooltip:function initTooltip(){var t=this,e=t.config,n=e.tooltip_contents.bindto;if(t.tooltip=Object(l.select)(n),t.tooltip.empty()&&(t.tooltip=t.selectChart.style("position","relative").append("div").attr("class",p.tooltipContainer).style("position","absolute").style("pointer-events","none").style("display","none")),e.tooltip_init_show){if(t.isTimeSeries()&&isString(e.tooltip_init_x)){var r,i,a=t.data.targets[0];for(e.tooltip_init_x=t.parseDate(e.tooltip_init_x),r=0;(i=a.values[r])&&i.x-e.tooltip_init_x!=0;r++);e.tooltip_init_x=r}t.tooltip.html(t.getTooltipHTML(t.data.targets.map((function(n){return t.addName(n.values[e.tooltip_init_x])})),t.axis.getXAxisTickFormat(),t.getYFormat(t.hasArcType(null,["radar"])),t.color)),n||t.tooltip.style("top",e.tooltip_init_position.top).style("left",e.tooltip_init_position.left).style("display","block")}},getTooltipHTML:function getTooltipHTML(){for(var t,e,n=this,r=n.config,i=arguments.length,a=Array(i),o=0;o<i;o++)a[o]=arguments[o];return isFunction(r.tooltip_contents)?(t=r.tooltip_contents).call.apply(t,[n].concat(a)):(e=n).getTooltipContent.apply(e,a)},getTooltipContent:function getTooltipContent(t,e,n,r){var i=this,a=i.config,c=a.tooltip_format_title||e,s=a.tooltip_format_name||function(t){return t},u=a.tooltip_format_value||(i.isStackNormalized()?function(t,e){return"".concat((100*e).toFixed(2),"%")}:n),l=a.tooltip_order,getRowValue=function(t){return i.getBaseValue(t)},d=i.levelColor?function(t){return i.levelColor(t.value)}:function(t){return r(t)},h=a.tooltip_contents,g=h.template;if(null===l&&a.data_groups.length){var m=i.orderTargets(i.data.targets).map((function(t){return t.id})).reverse();t.sort((function(t,e){var n=t?t.value:null,r=e?e.value:null;return n>0&&r>0&&(n=t.id?m.indexOf(t.id):null,r=e.id?m.indexOf(e.id):null),n-r}))}else/^(asc|desc)$/.test(l)?t.sort((function(t,e){var n=t?getRowValue(t):null,r=e?getRowValue(e):null;return"asc"===l?n-r:r-n})):isFunction(l)&&t.sort(l);var _,b,w,T,A,S=i.getTooltipContentTemplate(g);for(A=0;b=t[A];A++)if(getRowValue(b)||0===getRowValue(b)){if(isUndefined(_)){var k=sanitise(c?c(b.x):b.x);_=tplProcess(S[0],{CLASS_TOOLTIP:p.tooltip,TITLE:isValue(k)?g?k:'<tr><th colspan="2">'.concat(k,"</th></tr>"):""})}if(w=[b.ratio,b.id,b.index,t],T=sanitise(u.apply(void 0,[getRowValue(b)].concat(v()(w)))),i.isAreaRangeType(b)){var C=["high","low"].map((function(t){return sanitise(u.apply(void 0,[i.getAreaRangeData(b,t)].concat(v()(w))))})),M=o()(C,2),R=M[0],L=M[1];T="<b>Mid:</b> ".concat(T," <b>High:</b> ").concat(R," <b>Low:</b> ").concat(L)}if(void 0!==T){var E=function(){if(null===b.name)return"continue";
2var t=sanitise(s.apply(void 0,[b.name].concat(v()(w)))),e=d(b),n={CLASS_TOOLTIP_NAME:p.tooltipName+i.getTargetSelectorSuffix(b.id),COLOR:g||!i.patterns?e:'<svg><rect style="fill:'.concat(e,'" width="10" height="10"></rect></svg>'),NAME:t,VALUE:T};g&&isObject(h.text)&&Object.keys(h.text).forEach((function(t){n[t]=h.text[t][A]})),_+=tplProcess(S[1],n)}();if("continue"===E)continue}}return"".concat(_,"</table>")},getTooltipContentTemplate:function getTooltipContentTemplate(t){return(t||'<table class="{=CLASS_TOOLTIP}"><tbody>\n\t\t\t\t{=TITLE}\n\t\t\t\t{{<tr class="{=CLASS_TOOLTIP_NAME}">\n\t\t\t\t\t<td class="name">'.concat(this.patterns?"{=COLOR}":'<span style="background-color:{=COLOR}"></span>','{=NAME}</td>\n\t\t\t\t\t<td class="value">{=VALUE}</td>\n\t\t\t\t</tr>}}\n\t\t\t</tbody></table>')).replace(/(\r?\n|\t)/g,"").split(/{{(.*)}}/)},tooltipPosition:function tooltipPosition(t,e,n,r){var i=this,a=i.config,c=Object(l.mouse)(r),s=o()(c,2),u=s[0],d=s[1],h=i.getSvgLeft(!0),p=h+i.currentWidth-i.getCurrentPaddingRight();if(d+=20,i.hasArcType()){"touch"===i.inputType||i.hasType("radar")||(d+=i.height/2,u+=(i.width-(i.isLegendRight?i.getLegendWidth():0))/2)}else{var g=i.x(t[0].x);a.axis_rotated?(d=g+20,u+=h+100,p-=h):(d-=5,u=h+i.getCurrentPaddingLeft(!0)+20+(i.zoomScale?u:g))}var v=u+e;return v>p&&(u-=v-p+20),d+n>i.currentHeight&&(d-=n+30),d<0&&(d=0),{top:d,left:u}},showTooltip:function showTooltip(t,e){var n=this,r=n.config,i=r.tooltip_contents.bindto,a=n.hasArcType(null,["radar"]),o=t.filter((function(t){return t&&isValue(n.getBaseValue(t))})),c=r.tooltip_position||n.tooltipPosition;if(0!==o.length&&r.tooltip_show){var s=n.tooltip.datum(),u=JSON.stringify(t),l=s&&s.width||0,d=s&&s.height||0;if(!s||s.current!==u){var h=t.concat().sort()[0].index;callFn(r.tooltip_onshow,n),n.tooltip.html(n.getTooltipHTML(t,n.axis.getXAxisTickFormat(),n.getYFormat(a),n.color)).style("display",null).style("visibility",null).datum({index:h,current:u,width:l=n.tooltip.property("offsetWidth"),height:d=n.tooltip.property("offsetHeight")}),callFn(r.tooltip_onshown,n),n._handleLinkedCharts(!0,h)}if(!i){var p=c.call(this,o,l,d,e);n.tooltip.style("top","".concat(p.top,"px")).style("left","".concat(p.left,"px"))}}},hideTooltip:function hideTooltip(t){var e=this,n=e.config;(!n.tooltip_doNotHide||t)&&(callFn(n.tooltip_onhide,e),this.tooltip.style("display","none").style("visibility","hidden").datum(null),callFn(n.tooltip_onhidden,e))},_handleLinkedCharts:function _handleLinkedCharts(t,e){var n=this;if(n.config.tooltip_linked){var r=n.config.tooltip_linked_name;(n.api.internal.charts||[]).forEach((function(i){if(i!==n.api){var a=i.internal.config,o=a.tooltip_linked,c=a.tooltip_linked_name,s=document.body.contains(i.element);if(o&&r===c&&s){var u=i.internal.tooltip.data()[0],l=e!==(u&&u.index);try{t&&l?i.tooltip.show({index:e}):!t&&i.tooltip.hide()}catch(t){}}}}))}}}),extend(R.prototype,{initLegend:function initLegend(){var t=this,e=t.config;t.legendItemTextBox={},t.legendHasRendered=!1,t.legend=t.svg.append("g"),e.legend_show?(t.legend.attr("transform",t.getTranslate("legend")),t.updateLegend()):(t.legend.style("visibility","hidden"),t.hiddenLegendIds=t.mapToIds(t.data.targets))},updateLegend:function updateLegend(t,e,n){var r=this,i=r.config,a=e||{withTransform:!1,withTransitionForTransform:!1,withTransition:!1};a.withTransition=getOption(a,"withTransition",!0),a.withTransitionForTransform=getOption(a,"withTransitionForTransform",!0),i.legend_contents_bindto&&i.legend_contents_template?r.updateLegendTemplate():r.updateLegendElement(t||r.mapToIds(r.data.targets),a,n),r.legend.selectAll(".".concat(p.legendItem)).classed(p.legendItemHidden,(function(t){return!r.isTargetToShow(t)})),r.updateScales(!1,!r.zoomScale),r.updateSvgSize(),r.transformAll(a.withTransitionForTransform,n),r.legendHasRendered=!0},updateLegendTemplate:function updateLegendTemplate(){var t=this,e=t.config,n=Object(l.select)(e.legend_contents_bindto),r=e.legend_contents_template;if(!n.empty()){var i=t.mapToIds(t.data.targets),a=[],o="";i.forEach((function(e){var n=isFunction(r)?r.call(t,e,t.color(e),t.api.data(e)[0].values):tplProcess(r,{COLOR:t.color(e),TITLE:e});n&&(a.push(e),o+=n)}));var c=n.html(o).selectAll((function(){return this.childNodes})).data(a);t.setLegendItem(c),t.legend=n}},updateSizeForLegend:function updateSizeForLegend(t){var e=this,n=e.config,r=t.width,i=t.height,a={top:e.isLegendTop?e.getCurrentPaddingTop()+n.legend_inset_y+5.5:e.currentHeight-i-e.getCurrentPaddingBottom()-n.legend_inset_y,left:e.isLegendLeft?e.getCurrentPaddingLeft()+n.legend_inset_x+.5:e.currentWidth-r-e.getCurrentPaddingRight()-n.legend_inset_x+.5};e.margin3={top:e.isLegendRight?0:e.isLegendInset?a.top:e.currentHeight-i,right:NaN,bottom:0,left:e.isLegendRight?e.currentWidth-r:e.isLegendInset?a.left:0}},transformLegend:function transformLegend(t){var e=this;(t?e.legend.transition():e.legend).attr("transform",e.getTranslate("legend"))},updateLegendStep:function updateLegendStep(t){this.legendStep=t},updateLegendItemWidth:function updateLegendItemWidth(t){this.legendItemWidth=t},updateLegendItemHeight:function updateLegendItemHeight(t){this.legendItemHeight=t},getLegendWidth:function getLegendWidth(){var t=this;return t.config.legend_show?t.isLegendRight||t.isLegendInset?t.legendItemWidth*(t.legendStep+1):t.currentWidth:0},getLegendHeight:function getLegendHeight(){var t=this;return t.config.legend_show?t.isLegendRight?t.currentHeight:Math.max(20,t.legendItemHeight)*(t.legendStep+1):0},opacityForLegend:function opacityForLegend(t){return t.classed(p.legendItemHidden)?null:"1"},opacityForUnfocusedLegend:function opacityForUnfocusedLegend(t){return t.classed(p.legendItemHidden)?null:"0.3"},toggleFocusLegend:function toggleFocusLegend(t,e){var n=this,r=n.mapToTargetIds(t);n.legend.selectAll(".".concat(p.legendItem)).filter((function(t){return r.indexOf(t)>=0})).classed(p.legendItemFocused,e).transition().duration(100).style("opacity",(function(){return(e?n.opacityForLegend:n.opacityForUnfocusedLegend).call(n,Object(l.select)(this))}))},revertLegend:function revertLegend(){var t=this;t.legend.selectAll(".".concat(p.legendItem)).classed(p.legendItemFocused,!1).transition().duration(100).style("opacity",(function(){return t.opacityForLegend(Object(l.select)(this))}))},showLegend:function showLegend(t){var e=this,n=e.config;n.legend_show||(n.legend_show=!0,e.legend.style("visibility","visible"),!e.legendHasRendered&&e.updateLegend()),e.removeHiddenLegendIds(t),e.legend.selectAll(e.selectorLegends(t)).style("visibility","visible").transition().style("opacity",(function(){return e.opacityForLegend(Object(l.select)(this))}))},hideLegend:function hideLegend(t){var e=this,n=e.config;n.legend_show&&isEmpty(t)&&(n.legend_show=!1,e.legend.style("visibility","hidden")),e.addHiddenLegendIds(t),e.legend.selectAll(e.selectorLegends(t)).style("opacity","0").style("visibility","hidden")},clearLegendItemTextBoxCache:function clearLegendItemTextBoxCache(){this.legendItemTextBox={}},setLegendItem:function setLegendItem(t){var e=this,n=e.config,r="touch"===e.inputType;t.attr("class",(function(t){var n=Object(l.select)(this);return(!n.empty()&&n.attr("class")||"")+e.generateClass(p.legendItem,t)})).style("visibility",(function(t){return e.isLegendToShow(t)?"visible":"hidden"})).style("cursor","pointer").on("click",(function(t){callFn(n.legend_item_onclick,e,t)||(l.event.altKey?(e.api.hide(),e.api.show(t)):(e.api.toggle(t),!r&&e.isTargetToShow(t)?e.api.focus(t):e.api.revert())),r&&e.hideTooltip()})),r||t.on("mouseout",(function(t){callFn(n.legend_item_onout,e,t)||(Object(l.select)(this).classed(p.legendItemFocused,!1),e.api.revert())})).on("mouseover",(function(t){callFn(n.legend_item_onover,e,t)||(Object(l.select)(this).classed(p.legendItemFocused,!0),!e.transiting&&e.isTargetToShow(t)&&e.api.focus(t))}))},updateLegendElement:function updateLegendElement(t,e){var n,r,i,a=this,o=a.config,c=o.legend_item_tile_width+5,s=0,u=0,d=0,h={},g={},v={},m=[0],_={},b=0,w=a.isLegendRight||a.isLegendInset,T=t.filter((function(t){return!isDefined(o.data_names[t])||null!==o.data_names[t]})),A=e.withTransition,updatePositions=function(t,e,n){var r,i=n===T.length-1,l=function(t,e){return a.legendItemTextBox[e]||(a.legendItemTextBox[e]=a.getTextRect
2(t,p.legendItem)),a.legendItemTextBox[e]}(t,e),A=l.width+c+(i&&!w?0:10)+o.legend_padding,S=l.height+4,k=w?S:A,C=w?a.getLegendHeight():a.getLegendWidth(),updateValues=function(t,e){e||(r=(C-d-k)/2)<10&&(r=(C-k)/2,d=0,b++),_[t]=b,m[b]=a.isLegendInset?10:r,h[t]=d,d+=k};if(0===n&&(d=0,b=0,s=0,u=0),o.legend_show&&!a.isLegendToShow(e))return g[e]=0,v[e]=0,_[e]=0,void(h[e]=0);g[e]=A,v[e]=S,(!s||A>=s)&&(s=A),(!u||S>=u)&&(u=S);var M=w?u:s;o.legend_equally?(Object.keys(g).forEach((function(t){return g[t]=s})),Object.keys(v).forEach((function(t){return v[t]=u})),(r=(C-M*T.length)/2)<10?(d=0,b=0,T.forEach((function(t){return updateValues(t)}))):updateValues(e,!0)):updateValues(e)};a.isLegendInset&&(b=o.legend_inset_step?o.legend_inset_step:T.length,a.updateLegendStep(b)),a.isLegendRight?(n=function(t){return s*_[t]},r=function(t){return m[_[t]]+h[t]}):a.isLegendInset?(n=function(t){return s*_[t]+10},r=function(t){return m[_[t]]+h[t]}):(n=function(t){return m[_[t]]+h[t]},r=function(t){return u*_[t]});var xForLegendText=function(t,e){return n(t,e)+4+o.legend_item_tile_width},xForLegendRect=function(t,e){return n(t,e)},x1ForLegendTile=function(t,e){return n(t,e)-2},x2ForLegendTile=function(t,e){return n(t,e)-2+o.legend_item_tile_width},yForLegendText=function(t,e){return r(t,e)+9},yForLegendRect=function(t,e){return r(t,e)-5},yForLegendTile=function(t,e){return r(t,e)+4},S=-200,k=a.legend.selectAll(".".concat(p.legendItem)).data(T).enter().append("g");a.setLegendItem(k),k.append("text").text((function(t){return isDefined(o.data_names[t])?o.data_names[t]:t})).each((function(t,e){updatePositions(this,t,e)})).style("pointer-events","none").attr("x",w?xForLegendText:S).attr("y",w?S:yForLegendText),k.append("rect").attr("class",p.legendItemEvent).style("fill-opacity","0").attr("x",w?xForLegendRect:S).attr("y",w?S:yForLegendRect);var C=a.config.legend_usePoint;if(C){var M=[];k.append((function(t){var e=notEmpty(o.point_pattern)?o.point_pattern:[o.point_type];-1===M.indexOf(t)&&M.push(t);var n=e[M.indexOf(t)%e.length];return"rectangle"===n&&(n="rect"),document.createElementNS(l.namespaces.svg,a.hasValidPointType(n)?n:"use")})).attr("class",p.legendItemPoint).style("fill",(function(t){return a.color(t)})).style("pointer-events","none").attr("href",(function(t,e,n){return"use"===n[e].nodeName.toLowerCase()?"#".concat(a.datetimeId,"-point-").concat(t):void 0}))}else k.append("line").attr("class",p.legendItemTile).style("stroke",a.color).style("pointer-events","none").attr("x1",w?x1ForLegendTile:S).attr("y1",w?S:yForLegendTile).attr("x2",w?x2ForLegendTile:S).attr("y2",w?S:yForLegendTile).attr("stroke-width",o.legend_item_tile_height);i=a.legend.select(".".concat(p.legendBackground," rect")),a.isLegendInset&&s>0&&0===i.size()&&(i=a.legend.insert("g",".".concat(p.legendItem)).attr("class",p.legendBackground).append("rect"));var R=a.legend.selectAll("text").data(T).text((function(t){return isDefined(o.data_names[t])?o.data_names[t]:t})).each((function(t,e){updatePositions(this,t,e)}));(A?R.transition():R).attr("x",xForLegendText).attr("y",yForLegendText);var L=a.legend.selectAll("rect.".concat(p.legendItemEvent)).data(T);if((A?L.transition():L).attr("width",(function(t){return g[t]})).attr("height",(function(t){return v[t]})).attr("x",xForLegendRect).attr("y",yForLegendRect),C){var E=a.legend.selectAll(".".concat(p.legendItemPoint)).data(T);(A?E.transition():E).each((function(){var t,e,n,r=this.nodeName.toLowerCase(),i=a.config.point_r,o="x",c="y",s=2,u=2.5;if("circle"===r){var d=.2*i;o="cx",c="cy",t=i+d,s=2*i,u=-d}else if("rect"===r){var h=2.5*i;e=h,n=h,u=3}Object(l.select)(this).attr(o,(function(t){return x1ForLegendTile(t)+s})).attr(c,(function(t){return yForLegendTile(t)-u})).attr("r",t).attr("width",e).attr("height",n)}))}else{var O=a.legend.selectAll("line.".concat(p.legendItemTile)).data(T);(A?O.transition():O).style("stroke",a.color).attr("x1",x1ForLegendTile).attr("y1",yForLegendTile).attr("x2",x2ForLegendTile).attr("y2",yForLegendTile)}i&&(A?i.transition():i).attr("height",a.getLegendHeight()-12).attr("width",s*(b+1)+10),a.updateLegendItemWidth(s),a.updateLegendItemHeight(u),a.updateLegendStep(b)}});var getTextPos=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"left",e=arguments.length>1?arguments[1]:void 0,n=isNumber(e);return t.indexOf("center")>-1?n?e/2:"middle":t.indexOf("right")>-1?n?e:"end":n?0:"start"};extend(R.prototype,{initTitle:function initTitle(){var t=this;if(t.config.title_text){t.title=t.svg.append("g");var e=t.title.append("text").style("text-anchor",getTextPos(t.config.title_position)).attr("class",p.title);setTextValue(e,t.config.title_text,[.3,1.5])}},redrawTitle:function redrawTitle(){var t=this;if(t.title){var e=t.yForTitle.call(t);/g/i.test(t.title.node().tagName)?t.title.attr("transform","translate(".concat(getTextPos(t.config.title_position,t.currentWidth),", ").concat(e,")")):t.t
2itle.attr("x",t.xForTitle.call(t)).attr("y",e)}},xForTitle:function xForTitle(){var t,e=this,n=e.config,r=n.title_position||"left";return/(right|center)/.test(r)?(t=e.currentWidth-e.getTextRect(e.title,p.title).width,r.indexOf("right")>=0?t-=n.title_padding.right||0:r.indexOf("center")>=0&&(t/=2)):t=n.title_padding.left||0,t},yForTitle:function yForTitle(){var t=this;return(t.config.title_padding.top||0)+t.getTextRect(t.title,p.title).height},getTitlePadding:function getTitlePadding(){return this.yForTitle()+(this.config.title_padding.bottom||0)}}),extend(R.prototype,{initClip:function initClip(){var t=this;t.clipId="".concat(t.datetimeId,"-clip"),t.clipIdForXAxis="".concat(t.clipId,"-xaxis"),t.clipIdForYAxis="".concat(t.clipId,"-yaxis"),t.clipIdForGrid="".concat(t.clipId,"-grid"),t.clipPath=t.getClipPath(t.clipId),t.clipPathForXAxis=t.getClipPath(t.clipIdForXAxis),t.clipPathForYAxis=t.getClipPath(t.clipIdForYAxis),t.clipPathForGrid=t.getClipPath(t.clipIdForGrid)},getClipPath:function getClipPath(t){var e=this.config;if(!e.clipPath&&/-clip$/.test(t)||!e.axis_x_clipPath&&/-clip-xaxis$/.test(t)||!e.axis_y_clipPath&&/-clip-yaxis$/.test(t))return null;var n=window.navigator.appVersion.toLowerCase().indexOf("msie 9.")>=0;return"url(".concat(n?"":document.URL.split("#")[0],"#").concat(t,")")},appendClip:function appendClip(t,e){return t.append("clipPath").attr("id",e).append("rect")},getAxisClipX:function getAxisClipX(t){var e=Math.max(30,this.margin.left);return t?-(1+e):-(e-1)},getAxisClipY:function getAxisClipY(t){return t?-20:-this.margin.top},getXAxisClipX:function getXAxisClipX(){return this.getAxisClipX(!this.config.axis_rotated)},getXAxisClipY:function getXAxisClipY(){return this.getAxisClipY(!this.config.axis_rotated)},getYAxisClipX:function getYAxisClipX(){var t=this;return t.config.axis_y_inner?-1:t.getAxisClipX(t.config.axis_rotated)}
2,getYAxisClipY:function getYAxisClipY(){return this.getAxisClipY(this.config.axis_rotated)},getAxisClipWidth:function getAxisClipWidth(t){var e=this,n=Math.max(30,e.margin.left),r=Math.max(30,e.margin.right);return t?e.width+2+n+r:e.margin.left+20},getAxisClipHeight:function getAxisClipHeight(t){return(t?this.margin.bottom:this.margin.top+this.height)+20},getXAxisClipWidth:function getXAxisClipWidth(){return this.getAxisClipWidth(!this.config.axis_rotated)},getXAxisClipHeight:function getXAxisClipHeight(){return this.getAxisClipHeight(!this.config.axis_rotated)},getYAxisClipWidth:function getYAxisClipWidth(){var t=this;return t.getAxisClipWidth(t.config.axis_rotated)+(t.config.axis_y_inner?20:0)},getYAxisClipHeight:function getYAxisClipHeight(){return this.getAxisClipHeight(this.config.axis_rotated)}}),extend(R.prototype,{initRegion:function initRegion(){var t=this;t.region=t.main.append("g").attr("clip-path",t.clipPath).attr("class",p.regions)},updateRegion:function updateRegion(t){var e=this,n=e.config;e.region.style("visibility",e.hasArcType()?"hidden":"visible"),e.mainRegion=e.main.select(".".concat(p.regions)).selectAll(".".concat(p.region)).data(n.regions),e.mainReg
2ion.exit().transition().duration(t).style("opacity","0").remove(),e.mainRegion=e.mainRegion.enter().append("g").merge(e.mainRegion).attr("class",e.classRegion.bind(e)),e.mainRegion.append("rect").style("fill-opacity","0")},redrawRegion:function redrawRegion(t){var e=this,n=e.mainRegion.select("rect");return n=(t?n.transition():n).attr("x",e.regionX.bind(e)).attr("y",e.regionY.bind(e)).attr("width",e.regionWidth.bind(e)).attr("height",e.regionHeight.bind(e)),[(t?n.transition():n).style("fill-opacity",(function(t){return isValue(t.opacity)?t.opacity:"0.1"})).on("end",(function(){Object(l.select)(this.parentNode).selectAll("rect:not([x])").remove()}))]},getRegionXY:function getRegionXY(t,e){var n=this,r=n.config.axis_rotated,i="x"===t,a="start",o=0;return"y"===e.axis||"y2"===e.axis?(!i&&(a="end"),(i?r:!r)&&a in e&&(o=(0,n[e.axis])(e[a]))):(i?!r:r)&&a in e&&(o=(n.zoomScale||n.x)(n.isTimeSeries()?n.parseDate(e[a]):e[a])),o},regionX:function regionX(t){return this.getRegionXY("x",t)},regionY:function regionY(t){return this.getRegionXY("y",t)},getRegionSize:function getRegionSize(t,e){var n=this,r=n.config.axis_rotated,i="width"===t,a=n[i?"regionX":"regionY"](e),o="end",c=n[t];return"y"===e.axis||"y2"===e.axis?(!i&&(o="start"),(i?r:!r)&&o in e&&(c=(0,n[e.axis])(e[o]))):(i?!r:r)&&o in e&&(c=(n.zoomScale||n.x)(n.isTimeSeries()?n.parseDate(e[o]):e[o])),c<a?0:c-a},regionWidth:function regionWidth(t){return this.getRegionSize("width",t)},regionHeight:function regionHeight(t){return this.getRegionSize("height",t)},isRegionOnX:function isRegionOnX(t){return!t.axis||"x"===t.axis}}),extend(R.prototype,{drag:function drag(t){var e=this,n=e.config,r=e.main;if(!e.hasArcType()&&n.data_selection_enabled&&(!n.zoom_enabled||e.zoom.altDomain)&&n.data_selection_multiple){var i=o()(e.dragStart,2),a=i[0],c=i[1],s=o()(t,2),u=s[0],d=s[1],h=Math.min(a,u),g=Math.max(a,u),v=n.data_selection_grouped?e.margin.top:Math.min(c,d),m=n.data_selection_grouped?e.height:Math.max(c,d);r.select(".".concat(p.dragarea)).attr("x",h).attr("y",v).attr("width",g-h).attr("height",m-v),r.selectAll(".".concat(p.shapes)).selectAll(".".concat(p.shape)).filter((function(t){return n.data_selection_isselectable(t)})).each((function(t,n){var r,i=Object(l.select)(this),a=i.classed(p.SELECTED),o=i.classed(p.INCLUDED),c=!1;if(i.classed(p.circle)){var s=1*i.attr("cx"),u=1*i.attr("cy");r=e.togglePoint,c=h<s&&s<g&&v<u&&u<m}else{if(!i.classed(p.bar))return;var d=function(t){var e=t.getBoundingClientRect(),n=e.width,r=e.height,i=getRectSegList(t);return{x:i[0].x,y:Math.min(i[0].y,i[1].y),width:n,height:r}}(this),_=d.x,b=(u=d.y,d.width),w=d.height;r=e.togglePath,c=!(g<_||_+b<h||m<u||u+w<v)}c^o&&(i.classed(p.INCLUDED,!o),i.classed(p.SELECTED,!a),r.call(e,!a,i,t,n))}))}},dragstart:function dragstart(t){var e=this,n=e.config;e.hasArcType()||!n.data_selection_enabled||(e.dragStart=t,e.main.select(".".concat(p.chart)).append("rect").attr("class",p.dragarea).style("opacity","0.1"),e.setDragStatus(!0))},dragend:function dragend(){var t=this,e=t.config;t.hasArcType()||!e.data_selection_enabled||(t.main.select(".".concat(p.dragarea)).transition().duration(100).style("opacity","0").remove(),t.main.selectAll(".".concat(p.shape)).classed(p.INCLUDED,!1),t.setDragStatus(!1))},setDragStatus:function setDragStatus(t){this.dragging=t}});var N=n(23);extend(R.prototype,{selectPoint:function selectPoint(t,e,n){var r=this,i=r.config,a=i.axis_rotated,o=(a?r.circleY:r.circleX).bind(r),c=(a?r.circleX:r.circleY).bind(r),s=r.pointSelectR.bind(r);callFn(i.data_onselected,r.api,e,t.node()),r.main.select(".".concat(p.selectedCircles).concat(r.getTargetSelectorSuffix(e.id))).selectAll(".".concat(p.selectedCircle,"-").concat(n)).data([e]).enter().append("circle").attr("class",(function(){return r.generateClass(p.selectedCircle,n)})).attr("cx",o).attr("cy",c).attr("stroke",r.color).attr("r",(function(t){return 1.4*r.pointSelectR(t)})).transition().duration(100).attr("r",s)},unselectPoint:function unselectPoint(t,e,n){var r=this;callFn(r.config.data_onunselected,r.api,e,t.node()),r.main.select(".".concat(p.selectedCircles).concat(r.getTargetSelectorSuffix(e.id))).selectAll(".".concat(p.selectedCircle,"-").concat(n)).transition().duration(100).attr("r",0).remove()},togglePoint:function togglePoint(t,e,n,r){this["".concat(t?"":"un","selectPoint")](e,n,r)},selectPath:function selectPath(t,e){var n=this,r=n.config;callFn(r.data_onselected,n,e,t.node()),r.interaction_brighten&&t.transition().duration(100).style("fill",(function(){return Object(N.rgb)(n.color(e)).brighter(.75)}))},unselectPath:function unselectPath(t,e){var n=this,r=n.config;callFn(r.data_onunselected,n,e,t.node()),r.interaction_brighten&&t.transition().duration(100).style("fill",(function(){return n.color(e)}))},togglePath:function togglePath(t,e,n,r){this["".concat(t?"":"un","selectPath")](e,n,r)},getToggle:function getToggle(t,e){var n=this;return"path"===t.nodeName?n.togglePath:n.isStepType(e)?function(){}:n.togglePoint},toggleShape:function toggleShape(t,e,n){var r,i=this,a=i.config,o=Object(l.select)(t),c=o.classed(p.SELECTED),s=i.getToggle(t,e).bind(i);if(a.data_selection_enabled&&a.data_selection_isselectable(e)){if(!a.data_selection_multiple){var u=".".concat(p.shapes);a.data_selection_grouped&&(u+=i.getTargetSelectorSuffix(e.id)),i.main.selectAll(u).selectAll(".".concat(p.shape)).each((function(t,e){var n=Object(l.select)(this);n.classed(p.SELECTED)&&(r=n,s(!1,n.classed(p.SELECTED,!1),t,e))}))}r&&r.node()===o.node()||(o.classed(p.SELECTED,!c),s(!c,o,e,n))}}}),extend(R.prototype,{initBrush:function initBrush(){var t=this,e=t.config,n=e.axis_rotated;t.brush=n?Object(b.brushY)():Object(b.brushX)();var r,i,brushHandler=function(){t.redrawForBrush()};t.brush.on("start",(function(){"touch"===t.inputType&&t.hideTooltip(),brushHandler()})).on("brush",brushHandler).on("end",(function(){r=t.x.orgDomain()})),t.brush.updateResize=function(){var e=this;i&&clearTimeout(i),i=setTimeout((function(){var n=e.getSelection();r&&Object(b.brushSelection)(n.node())&&e.move(n,r.map(t.subX.orgScale()))}),0)},t.brush.update=function(){return 0===this.extent()()[1].filter((function(t){return isNaN(t)})).length&&t.context&&t.context.select(".".concat(p.brush)).call(this),this},t.brush.scale=function(r){var i,a,o=e.subchart_size_height||(i=t.svg.select(".".concat(p.brush," .overlay")),a={width:0,height:0},i.size()&&(a.width=+i.attr("width"),a.height=+i.attr("height")),a[n?"width":"height"]),c=t.getExtent();!c&&r.range?c=[[0,0],[r.range()[1],o]]:isArray(c)&&(c=c.map((function(t,e){return[t,e>0?o:e]}))),n&&c[1].reverse(),this.extent(c),this.update()},t.brush.getSelection=function(){return t.context?t.context.select(".".concat(p.brush)):Object(l.select)([])}},initSubchart:function initSubchart(){var t=this,e=t.config,n=e.subchart_show?"visible":"hidden",r="".concat(t.clipId,"-subchart"),i=t.getClipPath(r);
2t.clipIdForSubchart=r,t.appendClip(t.defs,r),t.initBrush(),t.context=t.svg.append("g").attr("transform",t.getTranslate("context"));var a=t.context;a.style("visibility",n),a.append("g").attr("clip-path",i).attr("class",p.chart),t.hasType("bar")&&a.select(".".concat(p.chart)).append("g").attr("class",p.chartBars),a.select(".".concat(p.chart)).append("g").attr("class",p.chartLines),a.append("g").attr("clip-path",i).attr("class",p.brush).call(t.brush),t.axes.subx=a.append("g").attr("class",p.axisX).attr("transform",t.getTranslate("subx")).attr("clip-path",e.axis_rotated?"":t.clipPathForXAxis).style("visibility",e.subchart_axis_x_show?n:"hidden")},updateTargetsForSubchart:function updateTargetsForSubchart(t){var e=this,n=e.context,r=e.config,i=e.classChartBar.bind(e),a=e.classBars.bind(e),o=e.classChartLine.bind(e),c=e.classLines.bind(e),s=e.classAreas.bind(e);if(r.subchart_show){var u=n.select(".".concat(p.chartBars)).selectAll(".".concat(p.chartBar)).data(t).attr("class",i);u.enter().append("g").style("opacity","0").attr("class",i).merge(u).append("g").attr("class",a);var l=n.select(".".concat(p.chartLines)).selectAll(".".concat(p.chartLine)).data(t).attr("class",o),d=l.enter().append("g").style("opacity","0").attr("class",o).merge(l);d.append("g").attr("class",c),e.hasType("area")&&d.append("g").attr("class",s),n.selectAll(".".concat(p.brush," rect")).attr(r.axis_rotated?"width":"height",r.axis_rotated?e.width2:e.height2)}},updateBarForSubchart:function updateBarForSubchart(t){var e=this;e.contextBar=e.context.selectAll(".".concat(p.bars)).selectAll(".".concat(p.bar)).data(e.barData.bind(e)),e.contextBar.exit().transition().duration(t).style("opacity","0").remove(),e.contextBar=e.contextBar.enter().append("path").attr("class",e.classBar.bind(e)).style("stroke","none").style("fill",e.color).merge(e.contextBar).style("opacity",e.initialOpacity.bind(e))},redrawBarForSubchart:function redrawBarForSubchart(t,e,n){(e?this.contextBar.transition(getRandom()).duration(n):this.contextBar).attr("d",t).style("opacity","1")},updateLineForSubchart:function updateLineForSubchart(t){var e=this;e.contextLine=e.context.selectAll(".".concat(p.lines)).selectAll(".".concat(p.line)).data(e.lineData.bind(e)),e.contextLine.exit().transition().duration(t).style("opacity","0").remove(),e.contextLine=e.contextLine.enter().append("path").attr("class",e.classLine.bind(e)).style("stroke",e.color).merge(e.contextLine).style("opacity",e.initialOpacity.bind(e))},redrawLineForSubchart:function redrawLineForSubchart(t,e,n){(e?this.contextLine.transition(getRandom()).duration(n):this.contextLine).attr("d",t).style("opacity","1")},updateAreaForSubchart:function updateAreaForSubchart(t){var e=this;e.contextArea=e.context.selectAll(".".concat(p.areas)).selectAll(".".concat(p.area)).data(e.lineData.bind(e)),e.contextArea.exit().transition().duration(t).style("opacity","0").remove(),e.contextArea=e.contextArea.enter().append("path").attr("class",e.classArea.bind(e)).style("fill",e.color).style("opacity",(function(){return e.orgAreaOpacity=Object(l.select)(this).style("opacity"),"0"})).merge(e.contextArea).style("opacity","0")},redrawAreaForSubchart:function redrawAreaForSubchart(t,e,n){(e?this.contextArea.transition(getRandom()).duration(n):this.contextArea).attr("d",t).style("fill",this.color).style("opacity",this.orgAreaOpacity)},redrawSubchart:function redrawSubchart(t,e,n){var r=this,i=r.config;r.context.style("visibility",i.subchart_show?"visible":"hidden"),i.subchart_show&&(l.event&&"zoom"===l.event.type&&r.brush.update(),t&&(!brushEmpty(r)&&r.brush.update(),Object.keys(n.type).forEach((function(t){var i=capitalize(t),a=r["generateDraw".concat(i)](n.indices[t],!0);r["update".concat(i,"ForSubchart")](e),r["redraw".concat(i,"ForSubchart")](a,e,e)}))))},redrawForBrush:function redrawForBrush(){var t=this;t.redraw({withTransition:!1,withY:t.config.zoom_rescale,withSubchart:!1,withUpdateXDomain:!0,withDimension:!1}),t.config.subchart_onbrush.call(t.api,t.x.orgDomain())},transformContext:function transformContext(t,e){var n,r=this;e&&e.axisSubX?n=e.axisSubX:(n=r.context.select(".".concat(p.axisX)),t&&(n=n.transition())),r.context.attr("transform",r.getTranslate("context")),n.attr("transform",r.getTranslate("subx"))},getExtent:function getExtent(){var t=this,e=t.config.axis_x_extent;return e&&(isFunction(e)?e=e(t.getXDomain(t.data.targets),t.subX):t.isTimeSeries()&&e.every(isNaN)&&(e=e.map((function(e){return t.subX(t.parseDate(e))})))),e}});var B=n(24);extend(R.prototype,{initZoom:function initZoom(){var t=this;t.zoomScale=null,t.generateZoom(),t.initZoomBehaviour()},bindZoomEvent:function bindZoomEvent(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=this,n=e.config.zoom_enabled;e.redrawEventRect();var r=e.main.select(".".concat(p.eventRects));
2n&&t?e.bindZoomOnEventRect(r,n.type):!1===t&&(e.api.unzoom(),r.on(".zoom",null).on(".drag",null))},generateZoom:function generateZoom(){var t=this,e=t.config,n=Object(B.zoom)().duration(0).on("start",t.onZoomStart.bind(t)).on("zoom",t.onZoom.bind(t)).on("end",t.onZoomEnd.bind(t));n.orgScaleExtent=function(){var n=e.zoom_extent||[1,10];return[n[0],Math.max(t.getMaxDataCount()/n[1],n[1])]},n.updateScaleExtent=function(){var e=diffDomain(t.x.orgDomain())/diffDomain(t.getZoomDomain()),n=this.orgScaleExtent();return this.scaleExtent([n[0]*e,n[1]*e]),this},n.updateTransformScale=function(n){t.orgXScale&&t.orgXScale.range(t.x.range());var r=n[e.axis_rotated?"rescaleY":"rescaleX"](t.orgXScale||t.x),i=t.trimXDomain(r.domain()),a=e.zoom_rescale;r.domain(i,t.orgXDomain),t.zoomScale=t.getCustomizedScale(r),t.xAxis.scale(t.zoomScale),a&&(!t.orgXScale&&(t.orgXScale=t.x.copy()),t.x.domain(i))},t.zoom=n},onZoomStart:function onZoomStart(){var t=this,e=l.event.sourceEvent;e&&(t.zoom.startEvent=e,callFn(t.config.zoom_onzoomstart,t.api,e))},onZoom:function onZoom(){var t=this,e=t.config,n=l.event;if(e.zoom_enabled&&n.sourceEvent&&0!==t.filterTargetsToShow(t.data.targets).length){var r="mousemove"===n.sourceEvent.type,i=n.sourceEvent.wheelDelta<0,a=n.transform;!r&&i&&t.x.domain().every((function(e,n){return e!==t.orgXDomain[n]}))&&t.x.domain(t.orgXDomain),t.zoom.updateTransformScale(a),t.isCategorized()&&t.x.orgDomain()[0]===t.orgXDomain[0]&&t.x.domain([t.orgXDomain[0]-1e-10,t.x.orgDomain()[1]]),t.redraw({withTransition:!1,withY:e.zoom_rescale,withSubchart:!1,withEventRect:!1,withDimension:!1}),t.cancelClick=r,callFn(e.zoom_onzoom,t.api,t.zoomScale.domain())}},onZoomEnd:function onZoomEnd(){var t=this,e=t.zoom.startEvent;!e||event&&e.clientX===event.clientX&&e.clientY===event.clientY||(t.redrawEventRect(),t.updateZoom(),callFn(t.config.zoom_onzoomend,t.api,t[t.zoomScale?"zoomScale":"subX"].domain()))},getZoomDomain:function getZoomDomain(){var t=this.config,e=o()(this.orgXDomain,2),n=e[0],r=e[1];return isDefined(t.zoom_x_min)&&(n=getMinMax("min",[n,t.zoom_x_min])),isDefined(t.zoom_x_max)&&(r=getMinMax("max",[r,t.zoom_x_max])),[n,r]},updateZoom:function updateZoom(t){var e=this;if(e.zoomScale){var n=e.zoomScale.domain(),r=e.subX.domain(),i=(n[0]<=r[0]||n[0]-.015<=r[0])&&(r[1]<=n[1]||r[1]<=n[1]-.015);(t||i)&&(e.xAxis.scale(e.subX),e.x.domain(e.subX.orgDomain()),e.zoomScale=null)}},bindZoomOnEventRect:function bindZoomOnEventRect(t,e){var n="drag"===e?this.zoomBehaviour:this.zoom;t.call(n).on("dblclick.zoom",null)},initZoomBehaviour:function initZoomBehaviour(){var t=this,e=t.config.axis_rotated,n=0,r=0,i=null,a={axis:e?"y":"x",attr:e?"height":"width",index:e?1:0};t.zoomBehaviour=Object(P.drag)().clickDistance(4).on("start",(function(){t.setDragStatus(!0),i||(i=t.main.append("rect").attr("clip-path",t.clipPath).attr("class",p.zoomBrush).attr("width",e?t.width:0).attr("height",e?0:t.height)),n=Object(l.mouse)(this)[a.index],r=n,i.attr(a.axis,n).attr(a.attr,0),t.onZoomStart()})).on("drag",(function(){r=Object(l.mouse)(this)[a.index],i.attr(a.axis,Math.min(n,r)).attr(a.attr,Math.abs(r-n))})).on("end",(function(){var e,c=t.zoomScale||t.x;if(t.setDragStatus(!1),i.attr(a.axis,0).attr(a.attr,0),n>r&&(n=(e=[r,n])[0],r=e[1]),n<0&&(r+=Math.abs(n),n=0),n!==r)t.api.zoom([n,r].map((function(t){return c.invert(t)}))),t.onZoomEnd();else if(t.isMultipleX())t.clickHandlerForMultipleXS.bind(this)(t);else{var s=l.event.sourceEvent||l.event,u="clientX"in s?[s.clientX,s.clientY]:[s.x,s.y],d=o()(u,2),h=d[0],p=d[1],g=document.elementFromPoint(h,p);t.clickHandlerForSingleX.bind(g)(Object(l.select)(g).datum(),t)}}))},setZoomResetButton:function setZoomResetButton(){var t=this,e=t.config,n=e.zoom_resetButton;n&&"drag"===e.zoom_enabled.type&&(t.zoom.resetBtn?t.zoom.resetBtn.style("display",null):t.zoom.resetBtn=t.selectChart.append("div").classed(p.button,!0).append("span").on("click",t.api.unzoom.bind(t)).classed(p.buttonZoomReset,!0).text(n.text||"Reset Zoom"))}});var X=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];extend(R.prototype,{getColorFromCss:function getColorFromCss(){var t=document.body,e=t.__colorPattern__;if(!e){var n=document.createElement("span");n.className=p.colorPattern,n.style.display="none",t.appendChild(n);var r=window.getComputedStyle(n).backgroundImage;n.parentNode.removeChild(n),r.indexOf(";")>-1&&(e=r.replace(/url[^#]*|["'()]|(\s|%20)/g,"").split(";").map((function(t){return t.trim().replace(/[\"'\s]/g,"")}
2)).filter(Boolean),t.__colorPattern__=e)}return e},generateColor:function generateColor(){var t=this,e=t.config,n=e.data_colors,r=e.data_color,i=[],a=notEmpty(e.color_pattern)?e.color_pattern:Object(A.scaleOrdinal)(t.getColorFromCss()||X).range(),o=a;if(isFunction(e.color_tiles)){var c=e.color_tiles(),s=a.map((function(e,n){var r=e.replace(/[#\(\)\s,]/g,""),i="".concat(t.datetimeId,"-pattern-").concat(r,"-").concat(n);return function(t,e,n){var r=Object(l.select)(t.cloneNode(!0));return r.attr("id",n).insert("rect",":first-child").attr("width",r.attr("width")).attr("height",r.attr("height")).style("fill",e),{id:n,node:r.node()}}(c[n%c.length],e,i)}));a=s.map((function(t){return"url(#".concat(t.id,")")})),t.patterns=s}return function(e){var c,s=e.id||e.data&&e.data.id||e,u=t.isTypeOf(s,["line","spline","step"])||!t.config.data_types[s];return isFunction(n[s])?c=n[s](e):n[s]?c=n[s]:(i.indexOf(s)<0&&i.push(s),c=u?o[i.indexOf(s)%o.length]:a[i.indexOf(s)%a.length],n[s]=c),isFunction(r)?r(c,e):c}},generateLevelColor:function generateLevelColor(){var t=this.config,e=t.color_pattern,n=t.color_threshold,r="value"===n.unit,i=n.max||100,a=n.values&&n.values.length?n.values:[];return notEmpty(n)?function(t){for(var n,o=e[e.length-1],c=0;n=a[c];c++)if((r?t:100*t/i)<n){o=e[c];break}return o}:null},setOverColor:function setOverColor(t,e){var n=this,r=n.config.color_onover,i=t?r:n.color;isObject(i)?i=function(t){var e=t.id;return e in r?r[e]:n.color(e)}:isString(i)&&(i=function(){return r}
2),isObject(e)?n.main.selectAll(".".concat(p.arc,"-").concat(e.id)).style("fill",i(e)):n.main.selectAll(".".concat(p.shape,"-").concat(e)).each((function(t){var e=i(t);this.style.stroke=e,this.style.fill=e}))}});var getFormat=function(t,e,n){var r=t.config,i="axis_".concat(e,"_tick_format");return(r[i]?r[i]:t.defaultValueFormat)(n)};extend(R.prototype,{getYFormat:function getYFormat(t){var e=this,n=e.yFormat,r=e.y2Format;return t&&!e.hasType("gauge")&&(n=e.defaultArcValueFormat,r=e.defaultArcValueFormat),function(t,i,a){return("y2"===e.axis.getId(a)?r:n).call(e,t,i)}},yFormat:function yFormat(t){return getFormat(this,"y",t)},y2Format:function y2Format(t){return getFormat(this,"y2",t)},defaultValueFormat:function defaultValueFormat(t){return isValue(t)?+t:""},defaultArcValueFormat:function defaultArcValueFormat(t,e){return"".concat((100*e).toFixed(1),"%")},dataLabelFormat:function dataLabelFormat(t){var e=this.config.data_labels,defaultFormat=function(t){return isValue(t)?+t:""},n=defaultFormat;return isFunction(e.format)?n=e.format:isObjectType(e.format)&&(n=e.format[t]?!0===e.format[t]?defaultFormat:e.format[t]:function(){return""}),n}}),extend(R.prototype,{addCache:function addCache(t,e){var n=!!(arguments.length>2&&void 0!==arguments[2])&&arguments[2];this.cache[t]=n?this.cloneTarget(e):e},removeCache:function removeCache(t){var e=this;toArray(t).forEach((function(t){return delete e.cache[t]}))},getCache:function getCache(t){if(!!(arguments.length>1&&void 0!==arguments[1])&&arguments[1]){for(var e,n=[],r=0;e=t[r];r++)e in this.cache&&n.push(this.cloneTarget(this.cache[e]));return n}return this.cache[t]||null},resetCache:function resetCache(t){for(var e in this.cache)(t||/^\$/.test(e))&&(this.cache[e]=null)}}),extend(R.prototype,{generateClass:function generateClass(t,e){return" ".concat(t," ").concat(t+this.getTargetSelectorSuffix(e))},classText:function classText(t){return this.generateClass(p.text,t.index)},classTexts:function classTexts(t){return this.generateClass(p.texts,t.id)},classShape:function classShape(t){return this.generateClass(p.shape,t.index)},classShapes:function classShapes(t){return this.generateClass(p.shapes,t.id)},generateExtraLineClass:function generateExtraLineClass(){var t=this.config.line_classes||[],e=[];return function(n){var r=n.id||n.data&&n.data.id||n;return e.indexOf(r)<0&&e.push(r),t[e.indexOf(r)%t.length]}},classLine:function classLine(t){return this.classShape(t)+this.generateClass(p.line,t.id)},classLines:function classLines(t){return this.classShapes(t)+this.generateClass(p.lines,t.id)},classCircle:function classCircle(t){return this.classShape(t)+this.generateClass(p.circle,t.index)},classCircles:function classCircles(t){return this.classShapes(t)+this.generateClass(p.circles,t.id)},classBar:function classBar(t){return this.classShape(t)+this.generateClass(p.bar,t.index)},classBars:function classBars(t){return this.classShapes(t)+this.generateClass(p.bars,t.id)},classArc:function classArc(t){return this.classShape(t.data)+this.generateClass(p.arc,t.data.id)},classArcs:function classArcs(t){return this.classShapes(t.data)+this.generateClass(p.arcs,t.data.id)},classArea:function classArea(t){return this.classShape(t)+this.generateClass(p.area,t.id)},classAreas:function classAreas(t){return this.classShapes(t)+this.generateClass(p.areas,t.id)},classRegion:function classRegion(t,e){return"".concat(this.generateClass(p.region,e)," ").concat("class"in t?t.class:"")},classEvent:function classEvent(t){return this.generateClass(p.eventRect,t.index)},classTarget:function classTarget(t){var e=this.config.data_classes[t],n="";return e&&(n=" ".concat(p.target,"-").concat(e)),this.generateClass(p.target,t)+n},classFocus:function classFocus(t){return this.classFocused(t)+this.classDefocused(t)},classFocused:function classFocused(t){return" ".concat(this.focusedTargetIds.indexOf(t.id)>=0?p.focused:"")},classDefocused:function classDefocused(t){return" ".concat(this.defocusedTargetIds.indexOf(t.id)>=0?p.defocused:"")},classChartText:function classChartText(t){return p.chartText+this.classTarget(t.id)},classChartLine:function classChartLine(t){return p.chartLine+this.classTarget(t.id)},classChartBar:function classChartBar(t){return p.chartBar+this.classTarget(t.id)},classChartArc:function classChartArc(t){return p.chartArc+this.classTarget(t.data.id)},classChartRadar:function classChartRadar(t){return p.chartRadar+this.classTarget(t.id)},getTargetSelectorSuffix:function getTargetSelectorSuffix(t){return t||0===t?"-".concat(t).replace(/[\s?!@#$%^&*()_=+,.<>'":;\[\]\/|~`{}\\]/g,"-"):""},selectorTarget:function selectorTarget(t,e){return"".concat(e||"",".").concat(p.target+this.getTargetSelectorSuffix(t))},selectorTargets:function selectorTargets(t,e){var n=this,r=t||[];return r.length?r.map((function(t){return n.selectorTarget(t,e)})):null},selectorLegend:function selectorLegend(t){return".".concat(p.legendItem+this.getTargetSelectorSuffix(t))},selectorLegends:function selectorLegends(t){var e=this;return t&&t.length?t.map((function(t){return e.selectorLegend(t)})):null}}),extend(L.prototype,{focus:function focus(t){var e=this.internal,n=e.mapToTargetIds(t),r=e.svg.selectAll(e.selectorTargets(n.filter(e.isTargetToShow,e)));this.revert(),this.defocus(),r.classed(p.focused,!0).classed(p.defocused,!1),e.hasArcType()&&e.expandArc(n),e.toggleFocusLegend(n,!0),e.focusedTargetIds=n,e.defocusedTargetIds=e.defocusedTargetIds.filter((function(t){return n.indexOf(t)<0}))},defocus:function defocus(t){var e=this.internal,n=e.mapToTargetIds(t);e.svg.selectAll(e.selectorTargets(n.filter(e.isTargetToShow,e))).classed(p.focused,!1).classed(p.defocused,!0),e.hasArcType()&&e.unexpandArc(n),e.toggleFocusLegend(n,!1),e.focusedTargetIds=e.focusedTargetIds.filter((function(t){return n.indexOf(t)<0})),e.defocusedTargetIds=n},revert:function revert(t){var e=this.internal,n=e.mapToTargetIds(t);e.svg.selectAll(e.selectorTargets(n)).classed(p.focused,!1).classed(p.defocused,!1),e.hasArcType()&&e.unexpandArc(n),e.config.legend_show&&(e.showLegend(n.filter(e.isLegendToShow.bind(e))),e.legend.selectAll(e.selectorLegends(n)).filter((function(){return Object(l.select)(this).classed(p.legendItemFocused)})).classed(p.legendItemFocused,!1)),e.focusedTargetIds=[],e.defocusedTargetIds=[]}}),extend(L.prototype,{_showHide:function _showHide(t,e,n){var r=this.internal,i=r.mapToTargetIds(e);r["".concat(t?"remove":"add","HiddenTargetIds")](i);var a=r.svg.selectAll(r.selectorTargets(i)),o=t?"1":"0";a.transition().style("opacity",o,"important").call(r.endall,(function(){a.style("opacity",null).style("opacity",o)})),n.withLegend&&r["".concat(t?"show":"hide","Legend")](i),r.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0})},show:function show(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._showHide(!0,t,e)},hide:function hide(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._showHide(!1,t,e)},toggle:function toggle(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.internal,i={show:[],hide:[]};r.mapToTargetIds(t).forEach((function(t){return i[r.isTargetToShow(t)?"hide":"show"].push(t)})),i.show.length&&this.show(i.show,n),i.hide.length&&setTimeout((function(){return e.hide(i.hide,n)}),0)}});var api_zoom_zoom=function(t){var e,n=this.internal,r=t;if(n.config.zoom_enabled&&r&&function(t,e){var n=o()(e,2),r=n[0],i=n[1];return t.every((function(t,e){return 0===e?t>=r:t<=i}))}(r,n.getZoomDomain())){if(n.isTimeSeries()&&(r=r.map((function(t){return n.parseDate(t)}))),n.config.subchart_show){var i=n.zoomScale||n.x;n.brush.getSelection().call(n.brush.move,[i(r[0]),i(r[1])]),e=r}else n.x.domain(r),n.zoomScale=n.x,n.xAxis.scale(n.zoomScale),e=n.zoomScale.orgDomain();n.redraw({withTransition:!0,withY:n.config.zoom_rescale,withDimension:!1}
2),n.setZoomResetButton(),callFn(n.config.zoom_onzoom,e)}else e=n.zoomScale?n.zoomScale.domain():n.x.orgDomain();return e};extend(api_zoom_zoom,{enable:function enable(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"wheel",e=this.internal,n=e.config,r=t;t&&(r=isString(t)&&/^(drag|wheel)$/.test(t)?{type:t}:t),n.zoom_enabled=r,e.zoom?!1===t&&e.bindZoomEvent(!1):(e.initZoom(),e.bindZoomEvent()),e.updateAndRedraw()},max:function max(t){var e=this.internal,n=e.config;return(0===t||t)&&(n.zoom_x_max=getMinMax("max",[e.orgXDomain[1],t])),n.zoom_x_max},min:function min(t){var e=this.internal,n=e.config;return(0===t||t)&&(n.zoom_x_min=getMinMax("min",[e.orgXDomain[0],t])),n.zoom_x_min},range:function range(t){var e=this.zoom;if(isObject(t)){var n=t.min,r=t.max;isDefined(n)&&e.min(n),isDefined(r)&&e.max(r)}return{min:e.min(),max:e.max()}}}),extend(L.prototype,{zoom:api_zoom_zoom,unzoom:function unzoom(){var t=this.internal,e=t.config;if(t.zoomScale){e.subchart_show?t.brush.getSelection().call(t.brush.move,null):t.zoom.updateTransformScale(B.zoomIdentity),t.updateZoom(!0),t.zoom.resetBtn&&t.zoom.resetBtn.style("display","none");var n=t.main.select(".".concat(p.eventRects));Object(B.zoomTransform)(n.node())!==B.zoomIdentity&&t.zoom.transform(n,B.zoomIdentity),t.redraw({withTransition:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withY:e.zoom_rescale})}}}),extend(L.prototype,{load:function load(t){var e=this.internal,n=e.config;t.xs&&e.addXs(t.xs),"names"in t&&this.data.names(t.names),"classes"in t&&Object.keys(t.classes).forEach((function(e){n.data_classes[e]=t.classes[e]})),"categories"in t&&e.isCategorized()&&(n.axis_x_categories=t.categories),"axes"in t&&Object.keys(t.axes).forEach((function(e){n.data_axes[e]=t.axes[e]})),"colors"in t&&Object.keys(t.colors).forEach((function(e){n.data_colors[e]=t.colors[e]})),"unload"in t&&!1!==t.unload?e.unload(e.mapToTargetIds(!0===t.unload?null:t.unload),(function(){return e.loadFromArgs(t)})):e.loadFromArgs(t)},unload:function unload(t){var e=this.internal,n=t||{};isArray(n)?n={ids:n}:isString(n)&&(n={ids:[n]});var r=e.mapToTargetIds(n.ids);e.unload(r,(function(){e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),e.removeCache(r),n.done&&n.done()}))}});var j=n(25);function transformTo(t,e,n){var r=this,i=n||{withTransitionForAxis:!r.hasArcType()};i.withTransitionForTransform=!1,r.transiting=!1,r.setTargetType(t,e),r.updateTargets(r.data.targets),r.updateAndRedraw(i)}extend(L.prototype,{flow:function flow(t){var e,n,r,i,a=this.internal,o=0,c=0;if((t.json||t.rows||t.columns)&&(e=a.convertData(t)),e&&a.isTabVisible()){var s=[],u=a.getMaxDataCount(),l=a.convertDataToTargets(e,!0);a.data.targets.forEach((function(t){for(var e=!1,n=0;n<l.length;n++)if(t.id===l[n].id){e=!0,t.values[t.values.length-1]&&(c=t.values[t.values.length-1].index+1),o=l[n].values.length;for(var r=0;r<o;r++)l[n].values[r].index=c+r,a.isTimeSeries()||(l[n].values[r].x=c+r);t.values=t.values.concat(l[n].values),l.splice(n,1);break}e||s.push(t.id)})),a.data.targets.forEach((function(t){for(var e=0;e<s.length;e++)if(t.id===s[e]){c=t.values[t.values.length-1].index+1;for(var n=0;n<o;n++)t.values.push({id:t.id,index:c+n,x:a.isTimeSeries()?a.getOtherTargetX(c+n):c+n,value:null})}})),a.data.targets.length&&l.forEach((function(t){for(var e=[],n=a.data.targets[0].values[0].index;n<c;n++)e.push({id:t.id,index:n,x:a.isTimeSeries()?a.getOtherTargetX(n):n,value:null});t.values.forEach((function(t){t.index+=c,a.isTimeSeries()||(t.x+=c)})),t.values=e.concat(t.values)})),a.data.targets=a.data.targets.concat(l);var d=a.data.targets[0],h=d.values[0];isDefined(t.to)?(o=0,i=a.isTimeSeries()?a.parseDate(t.to):t.to,d.values.forEach((function(t){t.x<i&&o++}))):isDefined(t.length)&&(o=t.length),u?1===u&&a.isTimeSeries()&&(r=(d.values[d.values.length-1].x-h.x)/2,n=[new Date(+h.x-r),new Date(+h.x+r)]):(r=a.isTimeSeries()?d.values.length>1?d.values[d.values.length-1].x-h.x:h.x-a.getXDomain(a.data.targets)[0]:1,n=[h.x-r,h.x]),n&&a.updateXDomain(null,!0,!0,!1,n),a.updateTargets(a.data.targets),a.redraw({flow:{index:h.index,length:o,duration:isValue(t.duration)?t.duration:a.config.transition_duration,done:t.done,orgDataCount:u},withLegend:!0,withTransition:u>1,withTrimXDomain:!1,withUpdateXAxis:!0})}}}),extend(R.prototype,{generateFlow:function generateFlow(t){var e=this,n=e.config;return function(){var r,i,a=t.targets,o=t.flow,c=t.shape.type,s=c.bar,u=c.line,h=c.area,g=t.shape.pos,v=g.cx,m=g.cy,_=g.xForText,b=g.yForText,w=t.xv,T=t.duration,A=o.index,S=o.length,k=e.getValueOnIndex(e.data.targets[0].values,A),C=e.getValueOnIndex(e.data.targets[0].values,A+S),M=e.x.domain(),R=o.duration||T,L=o.done||function(){},E=e.generateWait(),O=e.xgrid||Object(l.selectAll)([]),P=e.xgridLines||Object(l.selectAll)([]),F=e.mainReg
2ion||Object(l.selectAll)([]),D=e.mainText||Object(l.selectAll)([]),I=e.mainBar||Object(l.selectAll)([]),z=e.mainLine||Object(l.selectAll)([]),N=e.mainArea||Object(l.selectAll)([]),B=e.mainCircle||Object(l.selectAll)([]);e.flowing=!0,e.data.targets.forEach((function(t){t.values.splice(0,S)}));var X=e.updateXDomain(a,!0,!0);e.updateXGrid&&e.updateXGrid(!0),o.orgDataCount?r=1===o.orgDataCount||(k&&k.x)===(C&&C.x)||e.isTimeSeries()?e.x(M[0])-e.x(X[0]):e.x(k.x)-e.x(C.x):1===e.data.targets[0].values.length?e.isTimeSeries()?(k=e.getValueOnIndex(e.data.targets[0].values,0),C=e.getValueOnIndex(e.data.targets[0].values,e.data.targets[0].values.length-1),r=e.x(k.x)-e.x(C.x)):r=diffDomain(X)/2:r=e.x(M[0])-e.x(X[0]),i=diffDomain(M)/diffDomain(X);var Y="translate(".concat(r,",0) scale(").concat(i,",1)");e.hideXGridFocus();var q=Object(d.transition)().ease(j.easeLinear).duration(R);E.add([e.axes.x.transition(q).call((function(t){return e.xAxis.setTransition(q).create(t)})),I.transition(q).attr("transform",Y),z.transition(q).attr("transform",Y),N.transition(q).attr("transform",Y),B.transition(q).attr("transform",Y),D.transition(q).attr("transform",Y),F.filter(e.isRegionOnX).transition(q).attr("transform",Y),O.transition(q).attr("transform",Y),P.transition(q).attr("transform",Y)]),q.call(E,(function(){var t=[],r=[],i=[];if(S){for(var a,o=0;o<S;o++)a=A+o,t.push(".".concat(p.shape,"-").concat(a)),r.push(".".concat(p.text,"-").concat(a)),i.push(".".concat(p.eventRect,"-").concat(a));e.svg.selectAll(".".concat(p.shapes)).selectAll(t).remove(),e.svg.selectAll(".".concat(p.texts)).selectAll(r).remove(),e.svg.selectAll(".".concat(p.eventRects)).selectAll(i).remove(),e.svg.select(".".concat(p.xgrid)).remove()}if(O.size()&&O.attr("transform",null).attr(e.xgridAttr),P.attr("transform",null),P.select("line").attr("x1",n.axis_rotated?0:w).attr("x2",n.axis_rotated?e.width:w),P.select("text").attr("x",n.axis_rotated?e.width:0).attr("y",w),I.attr("transform",null).attr("d",s),z.attr("transform",null).attr("d",u),N.attr("transform",null).attr("d",h),B.attr("transform",null),e.isCirclePoint())B.attr("cx",v).attr("cy",m);else{B.attr("x",(function(t){return v(t)-n.point_r})).attr("y",(function(t){return m(t)-n.point_r})).attr("cx",v).attr("cy",m)}D.attr("transform",null).attr("x",_).attr("y",b).style("fill-opacity",e.opacityForText.bind(e)),F.attr("transform",null),F.select("rect").filter(e.isRegionOnX).attr("x",e.regionX.bind(e)).attr("width",e.regionWidth.bind(e)),n.interaction_enabled&&e.redrawEventRect(),L(),e.flowing=!1}))}}}),extend(L.prototype,{selected:function selected(t){var e=this.internal,n=[];return e.main.selectAll(".".concat(p.shapes+e.getTargetSelectorSuffix(t))).selectAll(".".concat(p.shape)).filter((function(){return Object(l.select)(this).classed(p.SELECTED)})).each((function(t){return n.push(t)})),n},select:function select(t,e,n){var r=this.internal,i=r.config;i.data_selection_enabled&&r.main.selectAll(".".concat(p.shapes)).selectAll(".".concat(p.shape)).each((function(a,o){var c=Object(l.select)(this),s=a.data?a.data.id:a.id,u=r.getToggle(this,a).bind(r),d=i.data_selection_grouped||!t||t.indexOf(s)>=0,h=!e||e.indexOf(o)>=0,g=c.classed(p.SELECTED);c.classed(p.line)||c.classed(p.area)||(d&&h?i.data_selection_isselectable(a)&&!g&&u(!0,c.classed(p.SELECTED,!0),a,o):isDefined(n)&&n&&g&&u(!1,c.classed(p.SELECTED,!1),a,o))}))},unselect:function unselect(t,e){var n=this.internal,r=n.config;r.data_selection_enabled&&n.main.selectAll(".".concat(p.shapes)).selectAll(".".concat(p.shape)).each((function(i,a){var o=Object(l.select)(this),c=i.data?i.data.id:i.id,s=n.getToggle(this,i).bind(n),u=r.data_selection_grouped||!t||t.indexOf(c)>=0,d=!e||e.indexOf(a)>=0,h=o.classed(p.SELECTED);o.classed(p.line)||o.classed(p.area)||u&&d&&r.data_selection_isselectable(i)&&h&&s(!1,o.classed(p.SELECTED,!1),i,a)}))}}),extend(L.prototype,{transform:function transform(t,e){var n=this.internal,r=["pie","donut"].indexOf(t)>=0?{withTransform:!0}:null;transformTo.bind(n)(e,t,r)}}),extend(L.prototype,{groups:function groups(t){var e=this.internal,n=e.config;return isUndefined(t)||(n.data_groups=t,e.redraw()),n.data_groups}});var xgrids=function(t){var e=this.internal,n=e.config;return t?(n.grid_x_lines=t,e.redrawWithoutRescale(),n.grid_x_lines):n.grid_x_lines};
2extend(xgrids,{add:function add(t){return this.xgrids(this.internal.config.grid_x_lines.concat(t||[]))},remove:function remove(t){this.internal.removeGridLines(t,!0)}});var ygrids=function(t){var e=this.internal,n=e.config;return t?(n.grid_y_lines=t,e.redrawWithoutRescale(),n.grid_y_lines):n.grid_y_lines};extend(ygrids,{add:function add(t){return this.ygrids(this.internal.config.grid_y_lines.concat(t||[]))},remove:function remove(t){this.internal.removeGridLines(t,!1)}}),extend(L.prototype,{xgrids,ygrids});var api_region_regions=function(t){var e=this.internal,n=e.config;return t?(n.regions=t,e.redrawWithoutRescale(),t):n.regions};extend(api_region_regions,{add:function add(t){var e=this.internal,n=e.config;return t?(n.regions=n.regions.concat(t),e.redrawWithoutRescale(),n.regions):n.regions},remove:function remove(t){var e=this.internal,n=e.config,r=t||{},i=getOption(r,"duration",n.transition_duration),a=getOption(r,"classes",[p.region]),o=e.main.select(".".concat(p.regions)).selectAll(a.map((function(t){return".".concat(t)})));return(i?o.transition().duration(i):o).style("opacity","0").remove(),o=n.regions,Object.keys(r).length?(o=o.filter((function(t){var e=!1;return!t.class||(t.class.split(" ").forEach((function(t){a.indexOf(t)>=0&&(e=!0)})),!e)})),n.regions=o):n.regions=[],o}}),extend(L.prototype,{regions:api_region_regions});var api_data_data=function(t){var e=this.internal.data.targets;return isUndefined(t)?e:e.filter((function(e){return t.indexOf(e.id)>=0}))};extend(api_data_data,{shown:function shown(t){return this.internal.filterTargetsToShow(this.data(t))},values:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=null;if(t){var r=this.data(t);r&&isArray(r)&&(n=[],r.forEach((function(t){var r=t.values.map((function(t){return t.value}));e?n=n.concat(r):n.push(r)})))}return n},names:function names(t){return this.internal.clearLegendItemTextBoxCache(),this.internal.updateDataAttributes("names",t)},colors:function colors(t){return this.internal.updateDataAttributes("colors",t)},axes:function axes(t){return this.internal.updateDataAttributes("axes",t)},min:function min(){return this.internal.getMinMaxData().min},max:function max(){return this.internal.getMinMaxData().max}}),extend(L.prototype,{data:api_data_data}),extend(L.prototype,{category:function category(t,e){var n=this.internal,r=n.config;return arguments.length>1&&(r.axis_x_categories[t]=e,n.redraw()),r.axis_x_categories[t]},categories:function categories(t){var e=this.internal,n=e.config;return arguments.length?(n.axis_x_categories=t,e.redraw(),n.axis_x_categories):n.axis_x_categories}}),extend(L.prototype,{color:function color(t){return this.internal.color(t)}}),extend(L.prototype,{x:function x(t){var e=this.internal,n=e.isCustomX()&&e.isCategorized();return isArray(t)&&(n?e.api.categories(t):(e.updateTargetX(e.data.targets,t),e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0}))),n?e.api.categories():e.data.xs},xs:function xs(t){var e=this.internal;return isObject(t)&&(e.updateTargetXs(e.data.targets,t),e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})),e.data.xs}});var setMinMax=function(t,e,n){var r=t.config,i="axis_x_".concat(e),a="axis_y_".concat(e),o="axis_y2_".concat(e);isDefined(n)&&(isObjectType(n)?(isValue(n.x)&&(r[i]=n.x),isValue(n.y)&&(r[a]=n.y),isValue(n.y2)&&(r[o]=n.y2)):(r[a]=n,r[o]=n),t.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0}))},api_axis_getMinMax=function(t,e){var n=t.config;return{x:n["axis_x_".concat(e)],y:n["axis_y_".concat(e)],y2:n["axis_y2_".concat(e)]}},Y=extend((function(){}),{labels:function labels(t){var e=this.internal;arguments.length&&(Object.keys(t).forEach((function(n){e.axis.setLabelText(n,t[n])})),e.axis.updateLabels())},min:function min(t){var e=this.internal;return arguments.length?setMinMax(e,"min",t):api_axis_getMinMax(e,"min")},max:function max(t){var e=this.internal;return arguments.length?setMinMax(e,"max",t):api_axis_getMinMax(e,"max")},range:function range(t){var e=this.axis;if(!arguments.length)return{max:e.max(),min:e.min()};isDefined(t.max)&&e.max(t.max),isDefined(t.min)&&e.min(t.min)}});extend(L.prototype,{axis:Y});var q=extend((function(){}),{show:function show(t){var e=this.internal;e.showLegend(e.mapToTargetIds(t)),e.updateAndRedraw({withLegend:!0})},hide:function hide(t){var e=this.internal;e.hideLegend(e.mapToTargetIds(t)),e.updateAndRedraw({withLegend:!0})}});extend(L.prototype,{legend:q}),extend(L.prototype,{resize:function resize(t){var e=this.internal.config;e.size_width=t?t.width:null,e.size_height=t?t.height:null,this.flush(!1,!0)},flush:function flush(t,e){var n=this.internal;e?n.brush&&n.brush.updateResize():n.axis&&n.axis.setOrient(),n.zoomScale=null,t?n.redraw({withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withLegend:!0}):n.updateAndRedraw({withLegend:!0,withTransition:!1,withTransitionForTransform:!1})},destroy:function destroy(){var t=this,e=this.internal;return notEmpty(e)&&(e.callPluginHook("$willDestroy"),e.charts.splice(e.charts.indexOf(this),1),e.svg.select("*").interrupt(),isDefined(e.resizeTimeout)&&M.b.clearTimeout(e.resizeTimeout),M.b.removeEventListener("resize",e.resizeFunction),e.selectChart.classed("bb",!1).html(""),Object.keys(this).forEac
2h((function(n){"internal"===n&&Object.keys(e).forEach((function(t){e[t]=null})),t[n]=null,delete t[n]}))),null},config:function config(t,e,n){var r,i=this.internal,a=t&&t.replace(/\./g,"_");return a in i.config&&(isDefined(e)?(i.config[a]=e,r=e,n&&this.flush()):r=i.config[a]),r}});var U=extend((function(){}),{show:function show(){var t,e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=this.internal;if(n.mouse&&(e=n.mouse),n.data){var i=r.getYScale(n.data.id)(n.data.value);r.isMultipleX()?e=[r.x(n.data.x),i]:(!r.config.tooltip_grouped&&(e=[0,i]),t=isValue(n.data.index)?n.data.index:r.getIndexByX(n.data.x))}else isDefined(n.x)?t=r.getIndexByX(n.x):isDefined(n.index)&&(t=n.index);("mouse"===r.inputType?["mouseover","mousemove"]:["touchstart"]).forEach((function(n){r.dispatchEvent(n,t,e)}))},hide:function hide(){var t=this.internal;t.hideTooltip(!0),t.hideXGridFocus(),t.unexpandCircles(),t.unexpandBars()}});extend(L.prototype,{tooltip:U});var nodeToSvgDataUrl=function(t,e){var n,r,i=new XMLSerializer,a=t.cloneNode(!0),o=(n=toArray(document.styleSheets),r=[],n.forEach((function(t){try{t.cssRules&&t.cssRules.length&&(r=r.concat(toArray(t.cssRules)))}catch(e){console.error("Error while reading rules from ".concat(t.href,": ").concat(e.toString()))}})),r).filter((function(t){return t.cssText})).map((function(t){return t.cssText}));a.setAttribute("xmlns",l.namespaces.xhtml);var c=i.serializeToString(a),s=document.createElement("style");s.appendChild(document.createTextNode(o.join("\n")));var u=i.serializeToString(s),d='<svg xmlns="'.concat(l.namespaces.svg,'" width="').concat(e.width,'" height="').concat(e.height,'">\n\t\t\t<foreignObject width="100%" height="100%">\n\t\t\t\t').concat(u,"\n\t\t\t\t").concat(c.replace(/(url\()[^#]+/g,"$1"),"\n\t\t\t</foreignObject></svg>").replace("/\n/g","%0A");return"data:image/svg+xml;base64,".concat(btoa(encodeURIComponent(d).replace(/%([0-9A-F]{2})/g,(function(t,e){return String.fromCharCode("0x".concat(e))}))))};extend(L.prototype,{export:function _export(t,e){var n=this.internal,r={width:n.currentWidth,height:n.currentHeight},i=nodeToSvgDataUrl(this.element,r);if(isFunction(e)){var a=new Image;a.crosssOrigin="Anonymous",a.onload=function(){var n=document.createElement("canvas"),i=n.getContext("2d");n.width=r.width,n.height=r.height,i.drawImage(a,0,0),e(n.toDataURL(t))},a.src=i}return i}});n(26);n.d(e,"bb",(function(){return W}));var H={},W={version:"1.9.1",generate:function generate(t){var e=w({},H,t),n=new L(e);return n.internal.charts=this.instance,this.instance.push(n),n},defaults:function defaults(t){return isObject(t)&&(H=t),H},instance:[],plugin:{},chart:{fn:L.prototype,internal:{fn:R.prototype,axis:{fn:C.prototype}}}};e.default=W}])}))},309:(t,e,n)=>{function ascending(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function bisector(t){return 1===t.length&&(t=function ascendingComparator(t){return function(e,n){return ascending(t(e),n)}}(t)),{left:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var a=r+i>>>1;t(e[a],n)<0?r=a+1:i=a}return r},right:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var a=r+i>>>1;t(e[a],n)>0?i=a:r=a+1}return r}}}n.d(e,{j2:()=>ascending,b4:()=>o,Nw:()=>a,ml:()=>i,YF:()=>bisector,kC:()=>cross,$1:()=>descending,P3:()=>deviation,We:()=>extent,KX:()=>histogram,Fp:()=>max,J6:()=>mean,C2:()=>median,TS:()=>merge,VV:()=>min,X:()=>pairs,FO:()=>permute,VR:()=>quantile,w6:()=>range,Rp:()=>scan,TV:()=>shuffle,Sm:()=>sum,o6:()=>freedmanDiaconis,FA:()=>scott,_X:()=>sturges,G9:()=>tickIncrement,ly:()=>tickStep,sd:()=>ticks,p4:()=>transpose,CA:()=>variance,$R:()=>zip});var r=bisector(ascending),i=r.right,a=r.left;const o=i;function pairs(t,e){null==e&&(e=pair);for(var n=0,r=t.length-1,i=t[0],a=new Array(r<0?0:r);n<r;)a[n]=e(i,i=t[++n]);return a}function pair(t,e){return[t,e]}function cross(t,e,n){var r,i,a,o,c=t.length,s=e.length,u=new Array(c*s);for(null==n&&(n=pair),r=a=0;r<c;++r)for(o=t[r],i=0;i<s;++i,++a)u[a]=n(o,e[i]);return u}function descending(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function number(t){return null===t?NaN:+t}function variance(t,e){var n,r,i=t.length,a=0,o=-1,c=0,s=0;if(null==e)for(;++o<i;)isNaN(n=number(t[o]))||(s+=(r=n-c)*(n-(c+=r/++a)));else for(;++o<i;)isNaN(n=number(e(t[o],o,t)))||(s+=(r=n-c)*(n-(c+=r/++a)));if(a>1)return s/(a-1)}function deviation(t,e){var n=variance(t,e);return n?Math.sqrt(n):n}function extent(t,e){var n,r,i,a=t.length,o=-1;if(null==e){for(;++o<a;)if(null!=(n=t[o])&&n>=n)for(r=i=n;++o<a;
2)null!=(n=t[o])&&(r>n&&(r=n),i<n&&(i=n))}else for(;++o<a;)if(null!=(n=e(t[o],o,t))&&n>=n)for(r=i=n;++o<a;)null!=(n=e(t[o],o,t))&&(r>n&&(r=n),i<n&&(i=n));return[r,i]}var c=Array.prototype,s=c.slice,u=c.map;function constant(t){return function(){return t}}function identity(t){return t}function range(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)),a=new Array(i);++r<i;)a[r]=t+r*n;return a}var l=Math.sqrt(50),d=Math.sqrt(10),h=Math.sqrt(2);function ticks(t,e,n){var r,i,a,o,c=-1;if(n=+n,(t=+t)===(e=+e)&&n>0)return[t];if((r=e<t)&&(i=t,t=e,e=i),0===(o=tickIncrement(t,e,n))||!isFinite(o))return[];if(o>0)for(t=Math.ceil(t/o),e=Math.floor(e/o),a=new Array(i=Math.ceil(e-t+1));++c<i;)a[c]=(t+c)*o;else for(t=Math.floor(t*o),e=Math.ceil(e*o),a=new Array(i=Math.ceil(t-e+1));++c<i;)a[c]=(t-c)/o;return r&&a.reverse(),a}function tickIncrement(t,e,n){var r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),a=r/Math.pow(10,i);return i>=0?(a>=l?10:a>=d?5:a>=h?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=l?10:a>=d?5:a>=h?2:1)}function tickStep(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),a=r/i;return a>=l?i*=10:a>=d?i*=5:a>=h&&(i*=2),e<t?-i:i}function sturges(t){return Math.ceil(Math.log(t.length)/Math.LN2)+1}function histogram(){var t=identity,e=extent,n=sturges;function histogram(r){var i,a,c=r.length,s=new Array(c);for(i=0;i<c;++i)s[i]=t(r[i],i,r);var u=e(s),l=u[0],d=u[1],h=n(s,l,d);Array.isArray(h)||(h=tickStep(l,d,h),h=range(Math.ceil(l/h)*h,d,h));for(var p=h.length;h[0]<=l;)h.shift(),--p;for(;h[p-1]>d;)h.pop(),--p;var g,v=new Array(p+1);for(i=0;i<=p;++i)(g=v[i]=[]).x0=i>0?h[i-1]:l,g.x1=i<p?h[i]:d;for(i=0;i<c;++i)l<=(a=s[i])&&a<=d&&v[o(h,a,0,p)].push(r[i]);return v}return histogram.value=function(e){return arguments.length?(t="function"==typeof e?e:constant(e),histogram):t},histogram.domain=function(t){return arguments.length?(e="function"==typeof t?t:constant([t[0],t[1]]),histogram):e},histogram.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?constant(s.call(t)):constant(t),histogram):n},histogram}function quantile(t,e,n){if(null==n&&(n=number),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,a=Math.floor(i),o=+n(t[a],a,t);return o+(+n(t[a+1],a+1,t)-o)*(i-a)}}function freedmanDiaconis(t,e,n){return t=u.call(t,number).sort(ascending),Math.ceil((n-e)/(2*(quantile(t,.75)-quantile(t,.25))*Math.pow(t.length,-1/3)))}function scott(t,e,n){return Math.ceil((n-e)/(3.5*deviation(t)*Math.pow(t.length,-1/3)))}function max(t,e){var n,r,i=t.length,a=-1;if(null==e){for(;++a<i;)if(null!=(n=t[a])&&n>=n)for(r=n;++a<i;)null!=(n=t[a])&&n>r&&(r=n)}else for(;++a<i;)if(null!=(n=e(t[a],a,t))&&n>=n)for(r=n;++a<i;)null!=(n=e(t[a],a,t))&&n>r&&(r=n);return r}function mean(t,e){var n,r=t.length,i=r,a=-1,o=0;if(null==e)for(;++a<r;)isNaN(n=number(t[a]))?--i:o+=n;else for(;++a<r;)isNaN(n=number(e(t[a],a,t)))?--i:o+=n;if(i)return o/i}function median(t,e){var n,r=t.length,i=-1,a=[];if(null==e)for(;++i<r;)isNaN(n=number(t[i]))||a.push(n);else for(;++i<r;)isNaN(n=number(e(t[i],i,t)))||a.push(n);return quantile(a.sort(ascending),.5)}function merge(t){for(var e,n,r,i=t.length,a=-1,o=0;++a<i;)o+=t[a].length;for(n=new Array(o);--i>=0;)for(e=(r=t[i]).length;--e>=0;)n[--o]=r[e];return n}function min(t,e){var n,r,i=t.length,a=-1;if(null==e){for(;++a<i;)if(null!=(n=t[a])&&n>=n)for(r=n;++a<i;)null!=(n=t[a])&&r>n&&(r=n)}else for(;++a<i;)if(null!=(n=e(t[a],a,t))&&n>=n)for(r=n;++a<i;)null!=(n=e(t[a],a,t))&&r>n&&(r=n);return r}function permute(t,e){for(var n=e.length,r=new Array(n);n--;)r[n]=t[e[n]];return r}function scan(t,e){if(n=t.length){var n,r,i=0,a=0,o=t[a];for(null==e&&(e=ascending);++i<n;)(e(r=t[i],o)<0||0!==e(o,o))&&(o=r,a=i);return 0===e(o,o)?a:void 0}}function shuffle(t,e,n){for(var r,i,a=(null==n?t.length:n)-(e=null==e?0:+e);a;)i=Math.random()*a--|0,r=t[a+e],t[a+e]=t[i+e],t[i+e]=r;return t}function sum(t,e){var n,r=t.length,i=-1,a=0;if(null==e)for(;++i<r;)(n=+t[i])&&(a+=n);else for(;++i<r;)(n=+e(t[i],i,t))&&(a+=n);return a}function transpose(t){if(!(i=t.length))return[];for(var e=-1,n=min(t,transpose_length),r=new Array(n);++e<n;)for(var i,a=-1,o=r[e]=new Array(i);++a<i;)o[a]=t[a][e];return r}function transpose_length(t){return t.length}function zip(){return transpose(arguments)}},555:(t,e,n)=>{n.r(e),n.d(e,{axisBottom:()=>axisBottom,axisLeft:()=>axisLeft,axisRight:()=>axisRight,axisTop:()=>axisTop});var r=Array.prototype.slice;function identity(t){return t}var i=1,a=2,o=3,c=4,s=1e-6;function translateX(t){return"translate("+(t+.5)+",0)"}function translateY(t){return"translate(0,"+(t+.5)+")"}function number(t){return function(e){return+t(e)}}function center(t){var e=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(e=Math.round(e)),function(n){return+t(n)+e}}function entering(){return!this.__axis}function axis(t,e){var n=[],u=null,l=null,d=6,h=6,p=3,g=t===i||t===c?-1:1,v=t===c||t===a?"x":"y",m=t===i||t===o?translateX:translateY;function axis(r){var _=null==u?e.ticks?e.ticks.apply(e,n):e.domain():u,b=null==l?e.tickFormat?e.tickFormat.apply(e,n):identity:l,w=Math.max(d,0)+p,T=e.range(),A=+T[0]+.5,S=+T[T.length-1]+.5,k=(e.bandwidth?center:number)(e.copy()),C=r.selection?r.selection():r,M=C.selectAll(".domain").data([null]),R=C.selectAll(".tick").data(_,e).order(),L=R.exit(),E=R.enter().append("g").attr("class","tick"),O=R.select("line"),P=R.select("text");M=M.merge(M.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),R=R.merge(E),O
2=O.merge(E.append("line").attr("stroke","currentColor").attr(v+"2",g*d)),P=P.merge(E.append("text").attr("fill","currentColor").attr(v,g*w).attr("dy",t===i?"0em":t===o?"0.71em":"0.32em")),r!==C&&(M=M.transition(r),R=R.transition(r),O=O.transition(r),P=P.transition(r),L=L.transition(r).attr("opacity",s).attr("transform",(function(t){return isFinite(t=k(t))?m(t):this.getAttribute("transform")})),E.attr("opacity",s).attr("transform",(function(t){var e=this.parentNode.__axis;return m(e&&isFinite(e=e(t))?e:k(t))}))),L.remove(),M.attr("d",t===c||t==a?h?"M"+g*h+","+A+"H0.5V"+S+"H"+g*h:"M0.5,"+A+"V"+S:h?"M"+A+","+g*h+"V0.5H"+S+"V"+g*h:"M"+A+",0.5H"+S),R.attr("opacity",1).attr("transform",(function(t){return m(k(t))})),O.attr(v+"2",g*d),P.attr(v,g*w).text(b),C.filter(entering).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===a?"start":t===c?"end":"middle"),C.each((function(){this.__axis=k}))}return axis.scale=function(t){return arguments.length?(e=t,axis):e},axis.ticks=function(){return n=r.call(arguments),axis},axis.tickArguments=function(t){return arguments.length?(n=null==t?[]:r.call(t),axis):n.slice()},axis.tickValues=function(t){return arguments.length?(u=null==t?null:r.call(t),axis):u&&u.slice()},axis.tickFormat=function(t){return arguments.length?(l=t,axis):l},axis.tickSize=function(t){return arguments.length?(d=h=+t,axis):d},axis.tickSizeInner=function(t){return arguments.length?(d=+t,axis):d},axis.tickSizeOuter=function(t){return arguments.length?(h=+t,axis):h},axis.tickPadding=function(t){return arguments.length?(p=+t,axis):p},axis}function axisTop(t){return axis(i,t)}function axisRight(t){return axis(a,t)}function axisBottom(t){return axis(o,t)}function axisLeft(t){return axis(c,t)}},11:(t,e,n)=>{n.r(e),n.d(e,{brush:()=>brush,brushSelection:()=>brushSelection,brushX:()=>brushX,brushY:()=>brushY});var r=n(88),i=n(749),a=n(978),o=n(942),c=n(605);function constant(t){return function(){return t}}function src_event(t,e,n){this.target=t,this.type=e,this.selection=n}function nopropagation(){o.event.stopImmediatePropagation()}function noevent(){o.event.preventDefault(),o.event.stopImmediatePropagation()}var s={name:"drag"},u={name:"space"},l={name:"handle"},d={name:"center"},h={name:"x",handles:["e","w"].map(type),input:function(t,e){return t&&[[t[0],e[0][1]],[t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},p={name:"y",handles:["n","s"].map(type),input:function(t,e){return t&&[[e[0][0],t[0]],[e[1][0],t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},g={name:"xy",handles:["n","e","s","w","nw","ne","se","sw"].map(type),input:function(t){return t},output:function(t){return t}},v={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"},m={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},_={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},b={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},w={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function type(t){return{type:t}}function defaultFilter(){return!o.event.button}function defaultExtent(){var t=this.ownerSVGElement||this;return[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function local(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function empty(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function brushSelection(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function brushX(){return brush_brush(h)}function brushY(){return brush_brush(p)}function brush(){return brush_brush(g)}function brush_brush(t){var e,n=defaultExtent,g=defaultFilter,T=(0,r.W)(brush,"start","brush","end"),A=6;function brush(e){var n=e.property("__brush",initialize).selectAll(".overlay").data([type("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",v.overlay).merge(n).each((function(){var t=local(this).extent;(0,o.select)(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])})),e.selectAll(".selection").data([type("selection")]).enter().append("rect").attr("class","selection").attr("cursor",v.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=e.selectAll(".handle").data(t.handles,(function(t){return t.type}));r.exit().remove(),r.enter().append("rect").attr("class",(function(t){return"handle handle--"+t.type})).attr("cursor",(function(t){return v[t.type]})),e.each(redraw).attr("fill","none").attr("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush touchstart.brush",started)}function redraw(){var t=(0,o.select)(this),e=local(this).selection;e?(t.selectAll(".selection").style("display",null).attr("x",e[0][0]).attr("y",e[0][1]).attr("width",e[1][0]-e[0][0]).attr("height",e[1][1]-e[0][1]),t.selectAll(".handle").style("display",null).attr("x",(function(t){return"e"===t.type[t.type.length-1]?e[1][0]-A/2:e[0][0]-A/2})).attr("y",(function(t){return"s"===t.type[0]?e[1][1]-A/2:e[0][1]-A/2})).attr("width",(function(t){return"n"===t.type||"s"===t.type?e[1][0]-e[0][0]+A:A})).attr("height",(function(t){return"e"===t.type||"w"===t.type?e[1][1]-e[0][1]+A:A}))):t.selectAll(".selection,.handle").style("display","none").attr("x",
2null).attr("y",null).attr("width",null).attr("height",null)}function emitter(t,e){return t.__brush.emitter||new Emitter(t,e)}function Emitter(t,e){this.that=t,this.args=e,this.state=t.__brush,this.active=0}function started(){if(o.event.touches){if(o.event.changedTouches.length<o.event.touches.length)return noevent()}else if(e)return;if(g.apply(this,arguments)){var n,r,a,T,A,S,k,C,M,R,L,E,O,P=this,F=o.event.target.__data__.type,D="selection"===(o.event.metaKey?F="overlay":F)?s:o.event.altKey?d:l,I=t===p?null:b[F],z=t===h?null:w[F],N=local(P),B=N.extent,X=N.selection,j=B[0][0],Y=B[0][1],q=B[1][0],U=B[1][1],H=I&&z&&o.event.shiftKey,W=(0,o.mouse)(P),V=W,G=emitter(P,arguments).beforestart();"overlay"===F?N.selection=X=[[n=t===p?j:W[0],a=t===h?Y:W[1]],[A=t===p?q:n,k=t===h?U:a]]:(n=X[0][0],a=X[0][1],A=X[1][0],k=X[1][1]),r=n,T=a,S=A,C=k;var Z=(0,o.select)(P).attr("pointer-events","none"),K=Z.selectAll(".overlay").attr("cursor",v[F]);if(o.event.touches)Z.on("touchmove.brush",moved,!0).on("touchend.brush touchcancel.brush",ended,!0);else{var $=(0,o.select)(o.event.view).on("keydown.brush",(function keydowned(){switch(o.event.keyCode){case 16:H=I&&z;break;case 18:D===l&&(I&&(A=S-M*I,n=r+M*I),z&&(k=C-R*z,a=T+R*z),D=d,move());break;case 32:D!==l&&D!==d||(I<0?A=S-M:I>0&&(n=r-M),z<0?k=C-R:z>0&&(a=T-R),D=u,K.attr("cursor",v.selection),move());break;default:return}noevent()}),!0).on("keyup.brush",(function keyupped(){switch(o.event.keyCode){case 16:H&&(E=O=H=!1,move());break;case 18:D===d&&(I<0?A=S:I>0&&(n=r),z<0?k=C:z>0&&(a=T),D=l,move());break;case 32:D===u&&(o.event.altKey?(I&&(A=S-M*I,n=r+M*I),z&&(k=C-R*z,a=T+R*z),D=d):(I<0?A=S:I>0&&(n=r),z<0?k=C:z>0&&(a=T),D=l),K.attr("cursor",v[F]),move());break;default:return}noevent()}),!0).on("mousemove.brush",moved,!0).on("mouseup.brush",ended,!0);(0,i.dragDisable)(o.event.view)}nopropagation(),(0,c.interrupt)(P),redraw.call(P),G.start()}function moved(){var t=(0,o.mouse)(P);!H||E||O||(Math.abs(t[0]-V[0])>Math.abs(t[1]-V[1])?O=!0:E=!0),V=t,L=!0,noevent(),move()}function move(){var t;switch(M=V[0]-W[0],R=V[1]-W[1],D){case u:case s:I&&(M=Math.max(j-n,Math.min(q-A,M)),r=n+M,S=A+M),z&&(R=Math.max(Y-a,Math.min(U-k,R)),T=a+R,C=k+R);break;case l:I<0?(M=Math.max(j-n,Math.min(q-n,M)),r=n+M,S=A):I>0&&(M=Math.max(j-A,Math.min(q-A,M)),r=n,S=A+M),z<0?(R=Math.max(Y-a,Math.min(U-a,R)),T=a+R,C=k):z>0&&(R=Math.max(Y-k,Math.min(U-k,R)),T=a,C=k+R);break;case d:I&&(r=Math.max(j,Math.min(q,n-M*I)),S=Math.max(j,Math.min(q,A+M*I))),z&&(T=Math.max(Y,Math.min(U,a-R*z)),C=Math.max(Y,Math.min(U,k+R*z)))}S<r&&(I*=-1,t=n,n=A,A=t,t=r,r=S,S=t,F in m&&K.attr("cursor",v[F=m[F]])),C<T&&(z*=-1,t=a,a=k,k=t,t=T,T=C,C=t,F in _&&K.attr("cursor",v[F=_[F]])),N.selection&&(X=N.selection),E&&(r=X[0][0],S=X[1][0]),O&&(T=X[0][1],C=X[1][1]),X[0][0]===r&&X[0][1]===T&&X[1][0]===S&&X[1][1]===C||(N.selection=[[r,T],[S,C]],redraw.call(P),G.brush())}function ended(){if(nopropagation(),o.event.touches){if(o.event.touches.length)return;e&&clearTimeout(e),e=setTimeout((function(){e=null}),500),Z.on("touchmove.brush touchend.brush touchcancel.brush",null)}else(0,i.dragEnable)(o.event.view,L),$.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);Z.attr("pointer-events","all"),K.attr("cursor",v.overlay),N.selection&&(X=N.selection),empty(X)&&(N.selection=null,redraw.call(P)),G.end()}}function initialize(){var e=this.__brush||{selection:null};return e.extent=n.apply(this,arguments),e.dim=t,e}return brush.move=function(e,n){e.selection?e.on("start.brush",(function(){emitter(this,arguments).beforestart().start()})).on("interrupt.brush end.brush",(function(){emitter(this,arguments).end()})).tween("brush",(function(){var e=this,r=e.__brush,i=emitter(e,arguments),o=r.selection,c=t.input("function"==typeof n?n.apply(this,arguments):n,r.extent),s=(0,a.Z)(o,c);function tween(t){r.selection=1===t&&empty(c)?null:s(t),redraw.call(e),i.brush()}return o&&c?tween:tween(1)})):e.each((function(){var e=this,r=arguments,i=e.__brush,a=t.input("function"==typeof n?n.apply(e,r):n,i.extent),o=emitter(e,r).beforestart();(0,c.interrupt)(e),i.selection=null==a||empty(a)?null:a,redraw.call(e),o.start().brush().end()}))},Emitter.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
2("start")),this},brush:function(){return this.emit("brush"),this},end:function(){return 0==--this.active&&(delete this.state.emitter,this.emit("end")),this},emit:function(e){(0,o.customEvent)(new src_event(brush,e,t.output(this.state.selection)),T.apply,T,[e,this.that,this.args])}},brush.extent=function(t){return arguments.length?(n="function"==typeof t?t:constant([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),brush):n},brush.filter=function(t){return arguments.length?(g="function"==typeof t?t:constant(!!t),brush):g},brush.handleSize=function(t){return arguments.length?(A=+t,brush):A},brush.on=function(){var t=T.on.apply(T,arguments);return t===T?brush:t},brush}},457:(t,e,n)=>{n.d(e,{qh:()=>entries,XP:()=>keys,UI:()=>i,b1:()=>nest,t8:()=>o,VO:()=>values});var r="$";function Map(){}function map(t,e){var n=new Map;if(t instanceof Map)t.each((function(t,e){n.set(e,t)}));else if(Array.isArray(t)){var r,i=-1,a=t.length;if(null==e)for(;++i<a;)n.set(i,t[i]);else for(;++i<a;)n.set(e(r=t[i],i,t),r)}else if(t)for(var o in t)n.set(o,t[o]);return n}Map.prototype=map.prototype={constructor:Map,has:function(t){return r+t in this},get:function(t){return this[r+t]}
2,set:function(t,e){return this[r+t]=e,this},remove:function(t){var e=r+t;return e in this&&delete this[e]},clear:function(){for(var t in this)t[0]===r&&delete this[t]},keys:function(){var t=[];for(var e in this)e[0]===r&&t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)e[0]===r&&t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)e[0]===r&&t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)e[0]===r&&++t;return t},empty:function(){for(var t in this)if(t[0]===r)return!1;return!0},each:function(t){for(var e in this)e[0]===r&&t(this[e],e.slice(1),this)}};const i=map;function nest(){var t,e,n,r=[],a=[];function apply(n,a,o,c){if(a>=r.length)return null!=t&&n.sort(t),null!=e?e(n):n;for(var s,u,l,d=-1,h=n.length,p=r[a++],g=i(),v=o();++d<h;)(l=g.get(s=p(u=n[d])+""))?l.push(u):g.set(s,[u]);return g.each((function(t,e){c(v,e,apply(t,a,o,c))})),v}function entries(t,n){if(++n>r.length)return t;var i,o=a[n-1];return null!=e&&n>=r.length?i=t.entries():(i=[],t.each((function(t,e){i.push({key:e,values:entries(t,n)})}))),null!=o?i.sort((function(t,e){return o(t.key,e.key)})):i}return n={object:function(t){return apply(t,0,createObject,setObject)},map:function(t){return apply(t,0,createMap,setMap)},entries:function(t){return entries(apply(t,0,createMap,setMap),0)},key:function(t){return r.push(t),n},sortKeys:function(t){return a[r.length-1]=t,n},sortValues:function(e){return t=e,n},rollup:function(t){return e=t,n}}}function createObject(){return{}}function setObject(t,e,n){t[e]=n}function createMap(){return i()}function setMap(t,e,n){t.set(e,n)}function Set(){}var a=i.prototype;function set(t,e){var n=new Set;if(t instanceof Set)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}Set.prototype=set.prototype={constructor:Set,has:a.has,add:function(t){return this[r+(t+="")]=t,this},remove:a.remove,clear:a.clear,values:a.keys,size:a.size,empty:a.empty,each:a.each};const o=set;function keys(t){var e=[];for(var n in t)e.push(n);return e}function values(t){var e=[];for(var n in t)e.push(t[n]);return e}function entries(t){var e=[];for(var n in t)e.push({key:n,value:t[n]});return e}},218:(t,e,n)=>{function src_define(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function extend(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Color(){}n.r(e),n.d(e,{color:()=>color,cubehelix:()=>cubehelix,gray:()=>gray,hcl:()=>hcl,hsl:()=>hsl,lab:()=>lab,lch:()=>lch,rgb:()=>rgb});var r=.7,i=1/r,a="\\s*([+-]?\\d+)\\s*",o="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",c="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",s=/^#([0-9a-f]{3})$/,u=/^#([0-9a-f]{6})$/,l=new RegExp("^rgb\\("+[a,a,a]+"\\)$"),d=new RegExp("^rgb\\("+[c,c,c]+"\\)$"),h=new RegExp("^rgba\\("+[a,a,a,o]+"\\)$"),p=new RegExp("^rgba\\("+[c,c,c,o]+"\\)$"),g=new RegExp("^hsl\\("+[o,c,c]+"\\)$"),v=new RegExp("^hsla\\("+[o,c,c,o]+"\\)$"),m={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 color(t){var e;return t=(t+"").trim().toLowerCase(),(e=s.exec(t))?new Rgb((e=parseInt(e[1],16))>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):(e=u.exec(t))?rgbn(parseInt(e[1],16)):(e=l.exec(t))?new Rgb(e[1],e[2],e[3],1):(e=d.exec(t))?new Rgb(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=h.exec(t))?rgba(e[1],e[2],e[3],e[4]):(e=p.exec(t))?rgba(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=g.exec(t))?hsla(e[1],e[2]/100,e[3]/100,1):(e=v.exec(t))?hsla(e[1],e[2]/100,e[3]/100,e[4]):m.hasOwnProperty(t)?rgbn(m[t]):"transparent"===t?new Rgb(NaN,NaN,NaN,0):null}function rgbn(t){return new Rgb(t>>16&255,t>>8&255,255&t,1)}function rgba(t,e,n,r){return r<=0&&(t=e=n=NaN),new Rgb(t,e,n,r)}function rgbConvert(t){return t instanceof Color||(t=color(t)),t?new Rgb((t=t.rgb()).r,t.g,t.b,t.opacity):new Rgb}function rgb(t,e,n,r){return 1===arguments.length?rgbConvert(t):new Rgb(t,e,n,null==r?1:r)}function Rgb(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function hex(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function hsla(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Hsl(t,e,n,r)}function hsl(t,e,n,r){return 1===arguments.length?function hslConvert(t){if(t instanceof Hsl)return new Hsl(t.h,t.s,t.l,t.opacity);if(t instanceof Color||(t=color(t)),!t)return new Hsl;if(t instanceof Hsl)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,c=a-i,s=(a+i)/2;return c?(o=e===a?(n-r)/c+6*(n<r):n===a?(r-e)/c+2:(e-n)/c+4,c/=s<.5?a+i:2-a-i,o*=60):c=s>0&&s<1?0:o,new Hsl(o,c,s,t.opacity)}(t):new Hsl(t,e,n,null==r?1:r)}function Hsl(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function hsl2rgb(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}src_define(Color,color,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}}),src_define(Rgb,rgb,extend(Color,{brighter:function(t){return t=null==t?i:Math.pow(i,t),new Rgb(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?r:Math.pow(r,t),new Rgb(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},hex:function(){return"#"+hex(this.r)+hex(this.g)+hex(this.b)},toString:function(){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)||
vendor: 1,651 bytes, line 2
20))+", "+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+")")}})),src_define(Hsl,hsl,extend(Color,{brighter:function(t){return t=null==t?i:Math.pow(i,t),new Hsl(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?r:Math.pow(r,t),new Hsl(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 Rgb(hsl2rgb(t>=240?t-240:t+120,i,r),hsl2rgb(t,i,r),hsl2rgb(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}}));var _=Math.PI/180,b=180/Math.PI,w=.96422,T=1,A=.82521,S=4/29,k=6/29,C=3*k*k,M=k*k*k;function labConvert(t){if(t instanceof Lab)return new Lab(t.l,t.a,t.b,t.opacity);if(t instanceof Hcl){if(isNaN(t.h))return new Lab(t.l,0,0,t.opacity);var e=t.h*_;return new Lab(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}t instanceof Rgb||(t=rgbConvert(t));var n,r,i=rgb2lrgb(t.r),a=rgb2lrgb(t.g),o=rgb2lrgb(t.b),c=xyz2lab((.2225045*i+.7168786*a+.0606169*o)/T);return i===a&&a===o?n=r=c:(n=xyz2lab((.4360747*i+.3850649*a+.1430804*o)/w),r=xyz2lab((.0139322*i+.0971045*a+.7141733*o)/A)),new Lab(116*c-16,500*(n-c),200*(c-r),t.opacity)}function gray(t,e){return new Lab(t,0,0,null==e?1:e)}function lab(t,e,n,r){return 1===arguments.length?labConvert(t):new Lab(t,e,n,null==r?1:r)}function Lab(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function xyz2lab(t){return t>M?Math.pow(t,1/3):t/C+S}function lab2xyz(t){return t>k?t*t*t:C*(t-S)}
2function lrgb2rgb(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function rgb2lrgb(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function hclConvert(t){if(t instanceof Hcl)return new Hcl(t.h,t.c,t.l,t.opacity);if(t instanceof Lab||(t=labConvert(t)),0===t.a&&0===t.b)return new Hcl(NaN,0,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*b;return new Hcl(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function lch(t,e,n,r){return 1===arguments.length?hclConvert(t):new Hcl(n,e,t,null==r?1:r)}function hcl(t,e,n,r){return 1===arguments.length?hclConvert(t):new Hcl(t,e,n,null==r?1:r)}function Hcl(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}src_define(Lab,lab,extend(Color,{brighter:function(t){return new Lab(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new Lab(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return new Rgb(lrgb2rgb(3.1338561*(e=w*lab2xyz(e))-1.6168667*(t=T*lab2xyz(t))-.4906146*(n=A*lab2xyz(n))),lrgb2rgb(-.9787684*e+1.9161415*t+.033454*n),lrgb2rgb(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),src_define(Hcl,hcl,extend(Color,{brighter:function(t){return new Hcl(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new Hcl(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return labConvert(this).rgb()}}));var R=-.14861,L=1.78277,E=-.29227,O=-.90649,P=1.97294,F=P*O,D=P*L,I=L*E-O*R;function cubehelix(t,e,n,r){return 1===arguments.length?function cubehelixConvert(t){if(t instanceof Cubehelix)return new Cubehelix(t.h,t.s,t.l,t.opacity);t instanceof Rgb||(t=rgbConvert(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(I*r+F*e-D*n)/(I+F-D),a=r-i,o=(P*(n-i)-E*a)/O,c=Math.sqrt(o*o+a*a)/(P*i*(1-i)),s=c?Math.atan2(o,a)*b-120:NaN;return new Cubehelix(s<0?s+360:s,c,i,t.opacity)}(t):new Cubehelix(t,e,n,null==r?1:r)}function Cubehelix(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}src_define(Cubehelix,cubehelix,extend(Color,{brighter:function(t){return t=null==t?i:Math.pow(i,t),new Cubehelix(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?r:Math.pow(r,t),new Cubehelix(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*_,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new Rgb(255*(e+n*(R*r+L*i)),255*(e+n*(E*r+O*i)),255*(e+n*(P*r)),this.opacity)}}))},88:(t,e,n)=>{n.d(e,{W:()=>i});var r={value:function(){}};function dispatch(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r)throw new Error("illegal type: "+t);r[t]=[]}return new Dispatch(r)}function Dispatch(t){this._=t}function get(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function set(t,e,n){for(var i=0,a=t.length;i<a;++i)if(t[i].name===e){t[i]=r,t=t.slice(0,i).concat(t.slice(i+1));break}return null!=n&&t.push({name:e,value:n}),t}Dispatch.prototype=dispatch.prototype={constructor:Dispatch,on:function(t,e){var n,r=this._,i=function parseTypenames(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}}))}(t+"",r),a=-1,o=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<o;)if(n=(t=i[a]).type)r[n]=set(r[n],t.name,e);else if(null==e)for(n in r)r[n]=set(r[n],t.name,null);return this}for(;++a<o;)if((n=(t=i[a]).type)&&(n=get(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Dispatch(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(r=this._[t]).length;a<n;++a)r[a].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,a=r.length;i<a;++i)r[i].value.apply(e,n)}};const i=dispatch},749:(t,e,n)=>{n.r(e),n.d(e,{drag:()=>drag,dragDisable:()=>nodrag,dragEnable:()=>yesdrag});var r=n(88),i=n(942);function nopropagation(){i.event.stopImmediatePropagation()}function noevent(){i.event.preventDefault(),i.event.stopImmediatePropagation()}function nodrag(t){var e=t.document.documentElement,n=(0,i.select)(t).on("dragstart.drag",noevent,!0);"onselectstart"in e?n.on("selectstart.drag",noevent,!0):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function yesdrag(t,e){var n=t.document.documentElement,r=(0,i.select)(t).on("dragstart.drag",null);e&&(r.on("click.drag",noevent,!0),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function constant(t){return function(){return t}}function DragEvent(t,e,n,r,i,a,o,c,s,u){this.target=t,this.type=e,this.subject=n,this.identifier=r,this.active=i,this.x=a,this.y=o,this.dx=c,this.dy=s,this._=u}function defaultFilter(){return!i.event.button}function defaultContainer(){return this.parentNode}function defaultSubject(t){return null==t?{x:i.event.x,y:i.event.y}:t}function defaultTouchable(){return"ontouchstart"in this}function drag(){var t,e,n,a,o=defaultFilter,c=defaultContainer,s=defaultSubject,u=defaultTouchable,l={},d=(0,r.W)("start","drag","end"),h=0,p=0;function drag(t){t.on("mousedown.drag",mousedowned).filter(u).on("touchstart.drag",touchstarted).on("touchmove.drag",touchmoved).on("touchend.drag touchcancel.drag",touchended).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function mousedowned(){if(!a&&o.apply(this,arguments)){var r=beforestart("mouse",c.apply(this,arguments),i.mouse,this,arguments);r&&((0,i.select)(i.event.view).on("mousemove.drag",mousemoved,!0).on("mouseup.drag",mouseupped,!0),nodrag(i.event.view),nopropagation(),n=!1,t=i.event.clientX,e=i.event.clientY,r("start"))}}function mousemoved(){if(noevent(),!n){var r=i.event.clientX-t,a=i.event.clientY-e;n=r*r+a*a>p}l.mouse("drag")}function mouseupped(){(0,i.select)(i.event.view).on("mousemove.drag mouseup.drag",null),yesdrag(i.event.view,n),noevent(),l.mouse("end")}function touchstarted(){if(o.apply(this,arguments)){var t,e,n=i.event.changedTouches,r=c.apply(this,arguments),a=n.length;for(t=0;t<a;++t)(e=beforestart(n[t].identifier,r,i.touch,this,arguments))&&(nopropagation(),e("start"))}}function touchmoved(){var t,e,n=i.event.changedTouches,r=n.length;for(t=0;t<r;++t)(e=l[n[t].identifier])&&(noevent(),e("drag"))}function touchended(){var t,e,n=i.event.changedTouches,r=n.length;for(a&&clearTimeout(a),a=setTimeout((function(){a=null}),500),t=0;t<r;++t)(e=l[n[t].identifier])&&(nopropagation(),e("end"))}function beforestart(t,e,n,r,a){var o,c,u,p=n(e,t),g=d.copy();if((0,i.customEvent)(new DragEvent(drag,"beforestart",o,t,h,p[0],p[1],0,0,g),(function(){return null!=(i.event.subject=o=s.apply(r,a))&&(c=o.x-
2p[0]||0,u=o.y-p[1]||0,!0)})))return function gesture(s){var d,v=p;switch(s){case"start":l[t]=gesture,d=h++;break;case"end":delete l[t],--h;case"drag":p=n(e,t),d=h}(0,i.customEvent)(new DragEvent(drag,s,o,t,d,p[0]+c,p[1]+u,p[0]-v[0],p[1]-v[1],g),g.apply,g,[s,r,a])}}return drag.filter=function(t){return arguments.length?(o="function"==typeof t?t:constant(!!t),drag):o},drag.container=function(t){return arguments.length?(c="function"==typeof t?t:constant(t),drag):c},drag.subject=function(t){return arguments.length?(s="function"==typeof t?t:constant(t),drag):s},drag.touchable=function(t){return arguments.length?(u="function"==typeof t?t:constant(!!t),drag):u},drag.on=function(){var t=d.on.apply(d,arguments);return t===d?drag:t},drag.clickDistance=function(t){return arguments.length?(p=(t=+t)*t,drag):Math.sqrt(p)},drag}DragEvent.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t}},415:(t,e,n)=>{n.r(e),n.d(e,{csvFormat:()=>d,csvFormatRows:()=>h,csvParse:()=>u,csvParseRows:()=>l,dsvFormat:()=>dsv,tsvFormat:()=>m,tsvFormatRows:()=>_,tsvParse:()=>g,tsvParseRows:()=>v});var r={},i={},a=34,o=10,c=13;function objectConverter(t){return new Function("d","return {"+t.map((function(t,e){return JSON.stringify(t)+": d["+e+"]"})).join(",")+"}")}function dsv(t){var e=new RegExp('["'+t+"\n\r]"),n=t.charCodeAt(0);function parseRows(t,e){var s,u=[],l=t.length,d=0,h=0,p=l<=0,g=!1;function token(){if(p)return i;if(g)return g=!1,r;var e,s,u=d;if(t.charCodeAt(u)===a){for(;d++<l&&t.charCodeAt(d)!==a||t.charCodeAt(++d)===a;);return(e=d)>=l?p=!0:(s=t.charCodeAt(d++))===o?g=!0:s===c&&(g=!0,t.charCodeAt(d)===o&&++d),t.slice(u+1,e-1).replace(/""/g,'"')}for(;d<l;){if((s=t.charCodeAt(e=d++))===o)g=!0;else if(s===c)g=!0,t.charCodeAt(d)===o&&++d;else if(s!==n)continue;return t.slice(u,e)}return p=!0,t.slice(u,l)}for(t.charCodeAt(l-1)===o&&--l,t.charCodeAt(l-1)===c&&--l;(s=token())!==i;){for(var v=[];s!==r&&s!==i;)v.push(s),s=token();e&&null==(v=e(v,h++))||u.push(v)}return u}function formatRow(e){return e.map(formatValue).join(t)}function formatValue(t){return null==t?"":e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function parse(t,e){var n,r,i=parseRows(t,(function(t,i){if(n)return n(t,i-1);r=t,n=e?function customConverter(t,e){var n=objectConverter(t);return function(r,i){return e(n(r),i,t)}}(t,e):objectConverter(t)}));return i.columns=r||[],i},parseRows,format:function format(e,n){return null==n&&(n=function inferColumns(t){var e=Object.create(null),n=[];return t.forEach((function(t){for(var r in t)r in e||n.push(e[r]=r)})),n}(e)),[n.map(formatValue).join(t)].concat(e.map((function(e){return n.map((function(t){return formatValue(e[t])})).join(t)}))).join("\n")},formatRows:function formatRows(t){return t.map(formatRow).join("\n")}}}var s=dsv(","),u=s.parse,l=s.parseRows,d=s.format,h=s.formatRows,p=dsv("\t"),g=p.parse,v=p.parseRows,m=p.format,_=p.formatRows},79:(t,e,n)=>{function linear(t){return+t}function quadIn(t){return t*t}function quadOut(t){return t*(2-t)}function quadInOut(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function cubicIn(t){return t*t*t}function cubicOut(t){return--t*t*t+1}function cubicInOut(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}n.r(e),n.d(e,{easeBack:()=>A,easeBackIn:()=>w,easeBackInOut:()=>A,easeBackOut:()=>T,easeBounce:()=>bounceOut,easeBounceIn:()=>bounceIn,easeBounceInOut:()=>bounceInOut,easeBounceOut:()=>bounceOut,easeCircle:()=>circleInOut,easeCircleIn:()=>circleIn,easeCircleInOut:()=>circleInOut,easeCircleOut:()=>circleOut,easeCubic:()=>cubicInOut,easeCubicIn:()=>cubicIn,easeCubicInOut:()=>cubicInOut,easeCubicOut:()=>cubicOut,easeElastic:()=>C,easeElasticIn:()=>k,easeElasticInOut:()=>M,easeElasticOut:()=>C,easeExp:()=>expInOut,easeExpIn:()=>expIn,easeExpInOut:()=>expInOut,easeExpOut:()=>expOut,easeLinear:()=>linear,easePoly:()=>a,easePolyIn:()=>r,easePolyInOut:()=>a,easePolyOut:()=>i,easeQuad:()=>quadInOut,easeQuadIn:()=>quadIn,easeQuadInOut:()=>quadInOut,easeQuadOut:()=>quadOut,easeSin:()=>sinInOut,easeSinIn:()=>sinIn,easeSinInOut:()=>sinInOut,easeSinOut:()=>sinOut});var r=function custom(t){function polyIn(e){return Math.pow(e,t)}return t=+t,polyIn.exponent=custom,polyIn}(3),i=function custom(t){function polyOut(e){return 1-Math.pow(1-e,t)}return t=+t,polyOut.exponent=custom,polyOut}(3),a=function custom(t){function polyInOut(e){return((e*=2)<=1?Math.pow(e,t):2-Math.pow(2-e,t))/2}return t=+t,polyInOut.exponent=custom,polyInOut}(3),o=Math.PI,c=o/2;function sinIn(t){return 1-Math.cos(t*c)}function sinOut(t){return Math.sin(t*c)}function sinInOut(t){return(1-Math.cos(o*t))/2}function expIn(t){return Math.pow(2,10*t-10)}function expOut(t){return 1-Math.pow(2,-10*t)}function expInOut(t){return((t*=2)<=1?Math.pow(2,10*t-10):2-Math.pow(2,10-10*t))/2}function circleIn(t){return 1-Math.sqrt(1-t*t)}function circleOut(t){return Math.sqrt(1- --t*t)}function circleInOut(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var s=4/11,u=6/11,l=8/11,d=3/4,h=9/11,p=10/11,g=15/16,v=21/22,m=63/64,_=1/s/s;function bounceIn(t){return 1-bounceOut(1-t)}function bounceOut(t){return(t=+t)<s?_*t*t:t<l?_*(t-=u)*t+d:t<p?_*(t-=h)*t+g:_*(t-=v)*t+m}function bounceInOut(t){return((t*=2)<=1?1-bounceOut(1-t):bounceOut(t-1)+1)/2}var b=1.70158,w=function custom(t){function backIn(e){return e*e*((t+1)*e-t)}return t=+t,backIn.overshoot=custom,backIn}(b),T=function custom(t){function backOut(e){return--e*e*((t+1)*e+t)+1}return t=+t,backOut.overshoot=custom,backOut}(b),A=function custom(t){function backInOut(e){return((e*=2)<1?e*e*((t+1)*e-t):(e-=2)*e*((t+1)*e+t)+2)/2}return t=+t,backInOut.overshoot=custom,backInOut}(b),S=2*Math.PI,k=function custom(t,e){var n=Math.asin(1/(t=Math.max(1,t)))*(e/=S);function elasticIn(r){return t*Math.pow(2,10*--r)*Math.sin((n-r)/e)}return elasticIn.amplitude=function(t){return custom(t,e*S)}
2,elasticIn.period=function(e){return custom(t,e)},elasticIn}(1,.3),C=function custom(t,e){var n=Math.asin(1/(t=Math.max(1,t)))*(e/=S);function elasticOut(r){return 1-t*Math.pow(2,-10*(r=+r))*Math.sin((r+n)/e)}return elasticOut.amplitude=function(t){return custom(t,e*S)},elasticOut.period=function(e){return custom(t,e)},elasticOut}(1,.3),M=function custom(t,e){var n=Math.asin(1/(t=Math.max(1,t)))*(e/=S);function elasticInOut(r){return((r=2*r-1)<0?t*Math.pow(2,10*r)*Math.sin((n-r)/e):2-t*Math.pow(2,-10*r)*Math.sin((n+r)/e))/2}return elasticInOut.amplitude=function(t){return custom(t,e*S)},elasticInOut.period=function(e){return custom(t,e)},elasticInOut}(1,.3)},424:(t,e,n)=>{function formatDecimal(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)]}function exponent(t){return(t=formatDecimal(Math.abs(t)))?t[1]:NaN}n.d(e,{WU:()=>c,Zq:()=>defaultLocale,FF:()=>locale,jH:()=>s,YQ:()=>formatSpecifier,zB:()=>precisionFixed,S5:()=>precisionPrefix,F0:()=>precisionRound});var r,i=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function formatSpecifier(t){return new FormatSpecifier(t)}function FormatSpecifier(t){if(!(e=i.exec(t)))throw new Error("invalid format: "+t);var e;this.fill=e[1]||" ",this.align=e[2]||">",this.sign=e[3]||"-",this.symbol=e[4]||"",this.zero=!!e[5],this.width=e[6]&&+e[6],this.comma=!!e[7],this.precision=e[8]&&+e[8].slice(1),this.trim=!!e[9],this.type=e[10]||""}function formatRounded(t,e){var n=formatDecimal(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")}formatSpecifier.prototype=FormatSpecifier.prototype,FormatSpecifier.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const a={"%":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 formatRounded(100*t,e)},r:formatRounded,s:function formatPrefixAuto(t,e){var n=formatDecimal(t,e);if(!n)return t+"";var i=n[0],a=n[1],o=a-(r=3*Math.max(-8,Math.min(8,Math.floor(a/3))))+1,c=i.length;return o===c?i:o>c?i+new Array(o-c+1).join("0"):o>0?i.slice(0,o)+"."+i.slice(o):"0."+new Array(1-o).join("0")+formatDecimal(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)}};function identity(t){return t}var o,c,s,u=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function locale(t){var e=t.grouping&&t.thousands?function formatGroup(t,e){return function(n,r){for(var i=n.length,a=[],o=0,c=t[0],s=0;i>0&&c>0&&(s+c+1>r&&(c=Math.max(1,r-s)),a.push(n.substring(i-=c,i+c)),!((s+=c+1)>r));)c=t[o=(o+1)%t.length];return a.reverse().join(e)}}(t.grouping,t.thousands):identity,n=t.currency,i=t.decimal,o=t.numerals?function formatNumerals(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(t.numerals):identity,c=t.percent||"%";function newFormat(t){var s=(t=formatSpecifier(t)).fill,l=t.align,d=t.sign,h=t.symbol,p=t.zero,g=t.width,v=t.comma,m=t.precision,_=t.trim,b=t.type;"n"===b?(v=!0,b="g"):a[b]||(null==m&&(m=12),_=!0,b="g"),(p||"0"===s&&"="===l)&&(p=!0,s="0",l="=");var w="$"===h?n[0]:"#"===h&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",T="$"===h?n[1]:/[%p]/.test(b)?c:"",A=a[b],S=/[defgprs%]/.test(b);function format(t){var n,a,c,h=w,k=T;if("c"===b)k=A(t)+k,t="";else{var C=(t=+t)<0;if(t=A(Math.abs(t),m),_&&(t=function formatTrim(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(i>0){if(!+t[r])break t;i=0}}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),C&&0==+t&&(C=!1),h=(C?"("===d?d:"-":"-"===d||"("===d?"":d)+h,k=("s"===b?u[8+r/3]:"")+k+(C&&"("===d?")":""),S)for(n=-1,a=t.length;++n<a;)if(48>(c=t.charCodeAt(n))||c>57){k=(46===c?i+t.slice(n+1):t.slice(n))+k,t=t.slice(0,n);break}}v&&!p&&(t=e(t,1/0));var M=h.length+t.length+k.length,R=M<g?new Array(g-M+1).join(s):"";switch(v&&p&&(t=e(R+t,R.length?g-k.length:1/0),R=""),l){case"<":t=h+t+k+R;break;case"=":t=h+R+t+k;break;case"^":t=R.slice(0,M=R.length>>1)+h+t+k+R.slice(M);break;default:t=R+h+t+k}return o(t)}return m=null==m?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),format.toString=function(){return t+""},format}return{format:newFormat,formatPrefix:function formatPrefix(t,e){var n=newFormat(((t=formatSpecifier(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(exponent(e)/3))),i=Math.pow(10,-r),a=u[8+r/3];return function(t){return n(i*t)+a}}}}function defaultLocale(t){return o=locale(t),c=o.format,s=o.formatPrefix,o}function precisionFixed(t){return Math.max(0,-exponent(Math.abs(t)))}function precisionPrefix(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(exponent(e)/3)))-exponent(Math.abs(t)))}function precisionRound(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,exponent(e)-exponent(t))+1}defaultLocale({decimal:".",thousands:",",grouping:[3],currency:["$",""]})},719:(t,e,n)=>{n.d(e,{M:()=>genericArray,Z:()=>__WEBPACK_DEFAULT_EXPORT__});var r=n(978),i=n(707);function __WEBPACK_DEFAULT_EXPORT__(t,e){return((0,i.v)(e)?i.Z:genericArray)(t,e)}function genericArray(t,e){var n,i=e?e.length:0,a=t?Math.min(i,t.length):0,o=new Array(a),c=new Array(i);for(n=0;n<a;++n)o[n]=(0,r.Z)(t[n],e[n]);for(;n<i;++n)c[n]=e[n];return function(t){for(n=0;n<a;++n)c[n]=o[n](t);return c}}},426:(t,e,n)=>{function basis(t,e,n,r,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*r+o*i)/6}function __WEBPACK_DEFAULT_EXPORT__(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],o=r>0?t[r-1]:2*i-a,c=r<e-1?t[r+2]:2*a-i;return basis((n-r/e)*e,o,i,a,c)}}n.d(e,{Z:()=>__WEBPACK_DEFAULT_EXPORT__,t:()=>basis})},369:(t,e,n)=>{n.d(e,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var r=n(426);function __WEBPACK_DEFAULT_EXPORT__(t){var e=t.length;return function(n){var i=Math.floor(((n%=1)<0?++n:n)*e),a=t[(i+e-1)%e],o=t[i%e],c=t[(i+1)%e],s=t[(i+2)%e];return(0,r.t)((n-i/e)*e,a,o,c,s)}}},805:(t,e,n)=>{n.d(e,{ZP:()=>nogamma,wx:()=>hue,yi:()=>gamma});var r=n(973);function linear(t,e){return function(n){return t+n*e}}function hue(t,e){var n=e-t;return n?linear(t,n>180||n<-180?n-360*Math.round(n/360):n):(0,r.Z)(isNaN(t)?e:t)}function gamma(t){return 1==(t=+t)?nogamma:function(e,n){return n-e?function exponential(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):(0,r.Z)(isNaN(e)?n:e)}}function nogamma(t,e){var n=e-t;return n?linear(t,n):(0,r.Z)(isNaN(t)?e:t)}},973:(t,e,n)=>{function __WEBPACK_DEFAULT_EXPORT__(t){return function(){return t}}n.d(e,{Z:()=>__WEBPACK_DEFAULT_EXPORT__})},402:(t,e,n)=>{n.d(e,{B:()=>o,Z:()=>a});var r=n(218),i=n(805);function cubehelix(t){return function cubehelixGamma(e){function cubehelix(n,a){var o=t((n=(0,r.cubehelix)(n)).h,(a=(0,r.cubehelix)(a)).h),c=(0,i.ZP)(n.s,a.s),s=(0,i.ZP)(n.l,a.l),u=(0,i.ZP)(n.opacity,a.opacity);return function(t){return n.h=o(t),n.s=c(t),n.l=s(Math.pow(t,e)),n.opacity=u(t),n+""}}return e=+e,cubehelix.gamma=cubehelixGamma,cubehelix}(1)}const a=cubehelix(i.wx);var o=cubehelix(i.ZP)},330:(t,e,n)=>{function __WEBPACK_DEFAULT_EXPORT__(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}n.d(e,{Z:()=>__WEBPACK_DEFAULT_EXPORT__})},551:(t,e,n)=>{n.r(e),n.d(e,{interpolate:()=>r.Z,interpolateArray:()=>i.Z,interpolateBasis:()=>a.Z,interpolateBasisClosed:()=>o.Z,interpolateCubehelix:()=>S.Z,interpolateCubehelixLong:()=>S.B,interpolateDate:()=>c.Z,interpolateDiscrete:()=>discrete,interpolateHcl:()=>T,interpolateHclLong:()=>A,interpolateHsl:()=>b,interpolateHslLong:()=>w,interpolateHue:()=>hue,interpolateLab:()=>lab,interpolateNumber:()=>u.Z,interpolateNumberArray:()=>l.Z,interpolateObject:()=>d.Z,interpolateRgb:()=>m.ZP,interpolateRgbBasis:()=>m.hD,interpolateRgbBasisClosed:()=>m.YD,interpolateRound:()=>h.Z,interpolateString:()=>p.Z,interpolateTransformCss:()=>g.Y,interpolateTransformSvg:()=>g.w,interpolateZoom:()=>v.Z,piecewise:()=>piecewise,quantize:()=>quantize});var r=n(978),i=n(719),a=n(426),o=n(369),c=n(330);function discrete(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}var s=n(805);function hue(t,e){var n=(0,s.wx)(+t,+e);return function(t){var e=n(t);return e-360*Math.floor(e/360)}}var u=n(807),l=n(707),d=n(474),h=n(696),p=n(411),g=n(443),v=n(238),m=n(638),_=n(218);function hsl(t){return function(e,n){var r=t((e=(0,_.hsl)(e)).h,(n=(0,_.hsl)(n)).h),i=(0,s.ZP)(e.s,n.s),a=(0,s.ZP)(e.l,n.l),o=(0,s.ZP)(e.opacity,n.opacity);
2return function(t){return e.h=r(t),e.s=i(t),e.l=a(t),e.opacity=o(t),e+""}}}const b=hsl(s.wx);var w=hsl(s.ZP);function lab(t,e){var n=(0,s.ZP)((t=(0,_.lab)(t)).l,(e=(0,_.lab)(e)).l),r=(0,s.ZP)(t.a,e.a),i=(0,s.ZP)(t.b,e.b),a=(0,s.ZP)(t.opacity,e.opacity);return function(e){return t.l=n(e),t.a=r(e),t.b=i(e),t.opacity=a(e),t+""}}function hcl(t){return function(e,n){var r=t((e=(0,_.hcl)(e)).h,(n=(0,_.hcl)(n)).h),i=(0,s.ZP)(e.c,n.c),a=(0,s.ZP)(e.l,n.l),o=(0,s.ZP)(e.opacity,n.opacity);return function(t){return e.h=r(t),e.c=i(t),e.l=a(t),e.opacity=o(t),e+""}}}const T=hcl(s.wx);var A=hcl(s.ZP),S=n(402);function piecewise(t,e){for(var n=0,r=e.length-1,i=e[0],a=new Array(r<0?0:r);n<r;)a[n]=t(i,i=e[++n]);return function(t){var e=Math.max(0,Math.min(r-1,Math.floor(t*=r)));return a[e](t-e)}}function quantize(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n}},807:(t,e,n)=>{function __WEBPACK_DEFAULT_EXPORT__(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}n.d(e,{Z:()=>__WEBPACK_DEFAULT_EXPORT__})},707:(t,e,n)=>{function __WEBPACK_DEFAULT_EXPORT__(t,e){e||(e=[]);var n,r=t?Math.min(e.length,t.length):0,i=e.slice();return function(a){for(n=0;n<r;++n)i[n]=t[n]*(1-a)+e[n]*a;return i}}function isNumberArray(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}n.d(e,{Z:()=>__WEBPACK_DEFAULT_EXPORT__,v:()=>isNumberArray})},474:(t,e,n)=>{n.d(e,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var r=n(978);function __WEBPACK_DEFAULT_EXPORT__(t,e){var n,i={},a={};for(n in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)n in t?i[n]=(0,r.Z)(t[n],e[n]):a[n]=e[n];return function(t){for(n in i)a[n]=i[n](t);return a}}},638:(t,e,n)=>{n.d(e,{YD:()=>u,ZP:()=>c,hD:()=>s});var r=n(218),i=n(426),a=n(369),o=n(805);const c=function rgbGamma(t){var e=(0,o.yi)(t);function rgb(t,n){var i=e((t=(0,r.rgb)(t)).r,(n=(0,r.rgb)(n)).r),a=e(t.g,n.g),c=e(t.b,n.b),s=(0,o.ZP)(t.opacity,n.opacity);return function(e){return t.r=i(e),t.g=a(e),t.b=c(e),t.opacity=s(e),t+""}}return rgb.gamma=rgbGamma,rgb}(1);function rgbSpline(t){return function(e){var n,i,a=e.length,o=new Array(a),c=new Array(a),s=new Array(a);for(n=0;n<a;++n)i=(0,r.rgb)(e[n]),o[n]=i.r||0,c[n]=i.g||0,s[n]=i.b||0;return o=t(o),c=t(c),s=t(s),i.opacity=1,function(t){return i.r=o(t),i.g=c(t),i.b=s(t),i+""}}}var s=rgbSpline(i.Z),u=rgbSpline(a.Z)},696:(t,e,n)=>{function __WEBPACK_DEFAULT_EXPORT__(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}n.d(e,{Z:()=>__WEBPACK_DEFAULT_EXPORT__})},411:(t,e,n)=>{n.d(e,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var r=n(807),i=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,a=new RegExp(i.source,"g");function __WEBPACK_DEFAULT_EXPORT__(t,e){var n,o,c,s=i.lastIndex=a.lastIndex=0,u=-1,l=[],d=[];for(t+="",e+="";(n=i.exec(t))&&(o=a.exec(e));)(c=o.index)>s&&(c=e.slice(s,c),l[u]?l[u]+=c:l[++u]=c),(n=n[0])===(o=o[0])?l[u]?l[u]+=o:l[++u]=o:(l[++u]=null,d.push({i:u,x:(0,r.Z)(n,o)})),s=a.lastIndex;return s<e.length&&(c=e.slice(s),l[u]?l[u]+=c:l[++u]=c),l.length<2?d[0]?function one(t){return function(e){return t(e)+""}}(d[0].x):function zero(t){return function(){return t}}(e):(e=d.length,function(t){for(var n,r=0;r<e;++r)l[(n=d[r]).i]=n.x(t);return l.join("")})}},443:(t,e,n)=>{n.d(e,{Y:()=>l,w:()=>d});var r,i,a,o,c=n(807),s=180/Math.PI,u={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function decompose(t,e,n,r,i,a){var o,c,u;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(c=Math.sqrt(n*n+r*r))&&(n/=c,r/=c,u/=c),t*r<e*n&&(t=-t,e=-e,u=-u,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*s,skewX:Math.atan(u)*s,scaleX:o,scaleY:c}}function interpolateTransform(t,e,n,r){function pop(t){return t.length?t.pop()+" ":""}return function(i,a){var o=[],s=[];return i=t(i),a=t(a),function translate(t,r,i,a,o,s){if(t!==i||r!==a){var u=o.push("translate(",null,e,null,n);s.push({i:u-4,x:(0,c.Z)(t,i)},{i:u-2,x:(0,c.Z)(r,a)})}else(i||a)&&o.push("translate("+i+e+a+n)}(i.translateX,i.translateY,a.translateX,a.translateY,o,s),function rotate(t,e,n,i){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),i.push({i:n.push(pop(n)+"rotate(",null,r)-2,x:(0,c.Z)(t,e)})):e&&n.push(pop(n)+"rotate("+e+r)}(i.rotate,a.rotate,o,s),function skewX(t,e,n,i){t!==e?i.push({i:n.push(pop(n)+"skewX(",
2null,r)-2,x:(0,c.Z)(t,e)}):e&&n.push(pop(n)+"skewX("+e+r)}(i.skewX,a.skewX,o,s),function scale(t,e,n,r,i,a){if(t!==n||e!==r){var o=i.push(pop(i)+"scale(",null,",",null,")");a.push({i:o-4,x:(0,c.Z)(t,n)},{i:o-2,x:(0,c.Z)(e,r)})}else 1===n&&1===r||i.push(pop(i)+"scale("+n+","+r+")")}(i.scaleX,i.scaleY,a.scaleX,a.scaleY,o,s),i=a=null,function(t){for(var e,n=-1,r=s.length;++n<r;)o[(e=s[n]).i]=e.x(t);return o.join("")}}}var l=interpolateTransform((function parseCss(t){return"none"===t?u:(r||(r=document.createElement("DIV"),i=document.documentElement,a=document.defaultView),r.style.transform=t,t=a.getComputedStyle(i.appendChild(r),null).getPropertyValue("transform"),i.removeChild(r),decompose(+(t=t.slice(7,-1).split(","))[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),d=interpolateTransform((function parseSvg(t){return null==t?u:(o||(o=document.createElementNS("http://www.w3.org/2000/svg","g")),o.setAttribute("transform",t),(t=o.transform.baseVal.consolidate())?decompose((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):u)}),", ",")",")")},978:(t,e,n)=>{n.d(e,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var r=n(218),i=n(638),a=n(719),o=n(330),c=n(807),s=n(474),u=n(411),l=n(973),d=n(707);function __WEBPACK_DEFAULT_EXPORT__(t,e){var n,h=typeof e;return null==e||"boolean"===h?(0,l.Z)(e):("number"===h?c.Z:"string"===h?(n=(0,r.color)(e))?(e=n,i.ZP):u.Z:e instanceof r.color?i.ZP:e instanceof Date?o.Z:(0,d.v)(e)?d.Z:Array.isArray(e)?a.M:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?s.Z:c.Z)(t,e)}},238:(t,e,n)=>{n.d(e,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var r=Math.SQRT2,i=2,a=4,o=1e-12;function cosh(t){return((t=Math.exp(t))+1/t)/2}function __WEBPACK_DEFAULT_EXPORT__(t,e){var n,c,s=t[0],u=t[1],l=t[2],d=e[0],h=e[1],p=e[2],g=d-s,v=h-u,m=g*g+v*v;if(m<o)c=Math.log(p/l)/r,n=function(t){return[s+t*g,u+t*v,l*Math.exp(r*t*c)]};else{var _=Math.sqrt(m),b=(p*p-l*l+a*m)/(2*l*i*_),w=(p*p-l*l-a*m)/(2*p*i*_),T=Math.log(Math.sqrt(b*b+1)-b),A=Math.log(Math.sqrt(w*w+1)-w);c=(A-T)/r,n=function(t){var e=t*c,n=cosh(T),a=l/(i*_)*(n*function tanh(t){return((t=Math.exp(2*t))-1)/(t+1)}(r*e+T)-function sinh(t){return((t=Math.exp(t))-1/t)/2}(T));return[s+a*g,u+a*v,l*n/cosh(r*e+T)]}}return n.duration=1e3*c,n}},393:(t,e,n)=>{n.d(e,{E:()=>c});var r=Math.PI,i=2*r,a=1e-6,o=i-a;function Path(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function path(){return new Path}Path.prototype=path.prototype={constructor:Path,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,a){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(t,e,n,i,o){t=+t,e=+e,n=+n,i=+i,o=+o;var c=this._x1,s=this._y1,u=n-t,l=i-e,d=c-t,h=s-e,p=d*d+h*h;if(o<0)throw new Error("negative radius: "+o);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(p>a)if(Math.abs(h*u-l*d)>a&&o){var g=n-c,v=i-s,m=u*u+l*l,_=g*g+v*v,b=Math.sqrt(m),w=Math.sqrt(p),T=o*Math.tan((r-Math.acos((m+p-_)/(2*b*w)))/2),A=T/w,S=T/b;Math.abs(A-1)>a&&(this._+="L"+(t+A*d)+","+(e+A*h)),this._+="A"+o+","+o+",0,0,"+ +(h*g>d*v)+","+(this._x1=t+S*u)+","+(this._y1=e+S*l)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,c,s,u){t=+t,e=+e;var l=(n=+n)*Math.cos(c),d=n*Math.sin(c),h=t+l,p=e+d,g=1^u,v=u?c-s:s-c;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+h+","+p:(Math.abs(this._x1-h)>a||Math.abs(this._y1-p)>a)&&(this._+="L"+h+","+p),n&&(v<0&&(v=v%i+i),v>o?this._+="A"+n+","+n+",0,1,"+g+","+(t-l)+","+(e-d)+"A"+n+","+n+",0,1,"+g+","+(this._x1=h)+","+(this._y1=p):v>a&&(this._+="A"+n+","+n+",0,"+ +(v>=r)+","+g+","+(this._x1=t+n*Math.cos(s))+","+(this._y1=e+n*Math.sin(s))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};const c=path},12:(t,e,n)=>{n.r(e),n.d(e,{scaleBand:()=>band,scaleDiverging:()=>diverging,scaleDivergingLog:()=>divergingLog,scaleDivergingPow:()=>divergingPow,scaleDivergingSqrt:()=>divergingSqrt,scaleDivergingSymlog:()=>divergingSymlog,scaleIdentity:()=>identity_identity,scaleImplicit:()=>s,scaleLinear:()=>linear,scaleLog:()=>log,scaleOrdinal:()=>ordinal,scalePoint:()=>point,scalePow:()=>pow,scaleQuantile:()=>quantile,scaleQuantize:()=>quantize,scaleSequential:()=>sequential,scaleSequentialLog:()=>sequentialLog,scaleSequentialPow:()=>sequentialPow,scaleSequentialQuantile:()=>sequentialQuantile,scaleSequentialSqrt:()=>sequentialSqrt,scaleSequentialSymlog:()=>sequentialSymlog,scaleSqrt:()=>sqrt,scaleSymlog:()=>symlog,scaleThreshold:()=>threshold,scaleTime:()=>time,scaleUtc:()=>utcTime,tickFormat:()=>tickFormat});var r=n(309);function initRange(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function initInterpolator(t,e){switch(arguments.length){case 0:break;case 1:this.interpolator(t);break;default:this.interpolator(e).domain(t)}return this}var i=n(457),a=Array.prototype,o=a.map,c=a.slice,s={name:"implicit"};function ordinal(){var t=(0,i.UI)(),e=[],n=[],r=s;function scale(i){var a=i+"",o=t.get(a);if(!o){if(r!==s)return r;t.set(a,o=e.push(i))}return n[(o-1)%n.length]}return scale.domain=function(n){if(!arguments.length)return e.slice();e=[],t=(0,i.UI)();for(var r,a,o=-1,c=n.length;++o<c;
2)t.has(a=(r=n[o])+"")||t.set(a,e.push(r));return scale},scale.range=function(t){return arguments.length?(n=c.call(t),scale):n.slice()},scale.unknown=function(t){return arguments.length?(r=t,scale):r},scale.copy=function(){return ordinal(e,n).unknown(r)},initRange.apply(scale,arguments),scale}function band(){var t,e,n=ordinal().unknown(void 0),i=n.domain,a=n.range,o=[0,1],c=!1,s=0,u=0,l=.5;function rescale(){var n=i().length,d=o[1]<o[0],h=o[d-0],p=o[1-d];t=(p-h)/Math.max(1,n-s+2*u),c&&(t=Math.floor(t)),h+=(p-h-t*(n-s))*l,e=t*(1-s),c&&(h=Math.round(h),e=Math.round(e));var g=(0,r.w6)(n).map((function(e){return h+t*e}));return a(d?g.reverse():g)}return delete n.unknown,n.domain=function(t){return arguments.length?(i(t),rescale()):i()},n.range=function(t){return arguments.length?(o=[+t[0],+t[1]],rescale()):o.slice()},n.rangeRound=function(t){return o=[+t[0],+t[1]],c=!0,rescale()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(c=!!t,rescale()):c},n.padding=function(t){return arguments.length?(s=Math.min(1,u=+t),rescale()):s},n.paddingInner=function(t){return arguments.length?(s=Math.min(1,t),rescale()):s},n.paddingOuter=function(t){return arguments.length?(u=+t,rescale()):u},n.align=function(t){return arguments.length?(l=Math.max(0,Math.min(1,t)),rescale()):l}
2,n.copy=function(){return band(i(),o).round(c).paddingInner(s).paddingOuter(u).align(l)},initRange.apply(rescale(),arguments)}function pointish(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return pointish(e())},t}function point(){return pointish(band.apply(null,arguments).paddingInner(1))}var u=n(978),l=n(807),d=n(696);function src_number(t){return+t}var h=[0,1];function identity(t){return t}function normalize(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:function constant(t){return function(){return t}}(isNaN(e)?NaN:.5)}function clamper(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 bimap(t,e,n){var r=t[0],i=t[1],a=e[0],o=e[1];return i<r?(r=normalize(i,r),a=n(o,a)):(r=normalize(r,i),a=n(a,o)),function(t){return a(r(t))}}function polymap(t,e,n){var i=Math.min(t.length,e.length)-1,a=new Array(i),o=new Array(i),c=-1;for(t[i]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++c<i;)a[c]=normalize(t[c],t[c+1]),o[c]=n(e[c],e[c+1]);return function(e){var n=(0,r.b4)(t,e,1,i)-1;return o[n](a[n](e))}}function copy(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function transformer(){var t,e,n,r,i,a,s=h,p=h,g=u.Z,v=identity;function rescale(){return r=Math.min(s.length,p.length)>2?polymap:bimap,i=a=null,scale}function scale(e){return isNaN(e=+e)?n:(i||(i=r(s.map(t),p,g)))(t(v(e)))}return scale.invert=function(n){return v(e((a||(a=r(p,s.map(t),l.Z)))(n)))},scale.domain=function(t){return arguments.length?(s=o.call(t,src_number),v===identity||(v=clamper(s)),rescale()):s.slice()},scale.range=function(t){return arguments.length?(p=c.call(t),rescale()):p.slice()},scale.rangeRound=function(t){return p=c.call(t),g=d.Z,rescale()},scale.clamp=function(t){return arguments.length?(v=t?clamper(s):identity,scale):v!==identity},scale.interpolate=function(t){return arguments.length?(g=t,rescale()):g},scale.unknown=function(t){return arguments.length?(n=t,scale):n},function(n,r){return t=n,e=r,rescale()}}function continuous(t,e){return transformer()(t,e)}var p=n(424);function tickFormat(t,e,n,i){var a,o=(0,r.ly)(t,e,n);switch((i=(0,p.YQ)(null==i?",f":i)).type){case"s":var c=Math.max(Math.abs(t),Math.abs(e));return null!=i.precision||isNaN(a=(0,p.S5)(o,c))||(i.precision=a),(0,p.jH)(i,c);case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(a=(0,p.F0)(o,Math.max(Math.abs(t),Math.abs(e))))||(i.precision=a-("e"===i.type));break;case"f":case"%":null!=i.precision||isNaN(a=(0,p.zB)(o))||(i.precision=a-2*("%"===i.type))}return(0,p.WU)(i)}function linearish(t){var e=t.domain;return t.ticks=function(t){var n=e();return(0,r.sd)(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return tickFormat(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var i,a=e(),o=0,c=a.length-1,s=a[o],u=a[c];return u<s&&(i=s,s=u,u=i,i=o,o=c,c=i),(i=(0,r.G9)(s,u,n))>0?(s=Math.floor(s/i)*i,u=Math.ceil(u/i)*i,i=(0,r.G9)(s,u,n)):i<0&&(s=Math.ceil(s*i)/i,u=Math.floor(u*i)/i,i=(0,r.G9)(s,u,n)),i>0?(a[o]=Math.floor(s/i)*i,a[c]=Math.ceil(u/i)*i,e(a)):i<0&&(a[o]=Math.ceil(s*i)/i,a[c]=Math.floor(u*i)/i,e(a)),t},t}function linear(){var t=continuous(identity,identity);return t.copy=function(){return copy(t,linear())},initRange.apply(t,arguments),linearish(t)}function identity_identity(t){var e;function scale(t){return isNaN(t=+t)?e:t}return scale.invert=scale,scale.domain=scale.range=function(e){return arguments.length?(t=o.call(e,src_number),scale):t.slice()},scale.unknown=function(t){return arguments.length?(e=t,scale):e},scale.copy=function(){return identity_identity(t).unknown(e)},t=arguments.length?o.call(t,src_number):[0,1],linearish(scale)}function nice(t,e){var n,r=0,i=(t=t.slice()).length-1,a=t[r],o=t[i];return o<a&&(n=r,r=i,i=n,n=a,a=o,o=n),t[r]=e.floor(a),t[i]=e.ceil(o),t}function transformLog(t){return Math.log(t)}function transformExp(t){return Math.exp(t)}function transformLogn(t){return-Math.log(-t)}function transformExpn(t){return-Math.exp(-t)}function pow10(t){return isFinite(t)?+("1e"+t):t<0?0:t}function reflect(t){return function(e){return-t(-e)}}function loggish(t){var e,n,i=t(transformLog,transformExp),a=i.domain,o=10;function rescale(){return e=function logp(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),function(e){return Math.log(e)/t})}(o),n=function powp(t){return 10===t?pow10:t===Math.E?Math.exp:function(e){return Math.pow(t,e)}}(o),a()[0]<0?(e=reflect(e),n=reflect(n),t(transformLogn,transformExpn)):t(transformLog,transformExp),i}return i.base=function(t){return arguments.length?(o=+t,rescale()):o},i.domain=function(t){return arguments.length?(a(t),rescale()):a()},i.ticks=function(t){var i,c=a(),s=c[0],u=c[c.length-1];(i=u<s)&&(p=s,s=u,u=p);var l,d,h,p=e(s),g=e(u),v=null==t?10:+t,m=[];if(!(o%1)&&g-p<v){if(p=Math.round(p)-1,g=Math.round(g)+1,s>0){for(;p<g;
2++p)for(d=1,l=n(p);d<o;++d)if(!((h=l*d)<s)){if(h>u)break;m.push(h)}}else for(;p<g;++p)for(d=o-1,l=n(p);d>=1;--d)if(!((h=l*d)<s)){if(h>u)break;m.push(h)}}else m=(0,r.sd)(p,g,Math.min(g-p,v)).map(n);return i?m.reverse():m},i.tickFormat=function(t,r){if(null==r&&(r=10===o?".0e":","),"function"!=typeof r&&(r=(0,p.WU)(r)),t===1/0)return r;null==t&&(t=10);var a=Math.max(1,o*t/i.ticks().length);return function(t){var i=t/n(Math.round(e(t)));return i*o<o-.5&&(i*=o),i<=a?r(t):""}},i.nice=function(){return a(nice(a(),{floor:function(t){return n(Math.floor(e(t)))},ceil:function(t){return n(Math.ceil(e(t)))}}))},i}function log(){var t=loggish(transformer()).domain([1,10]);return t.copy=function(){return copy(t,log()).base(t.base())},initRange.apply(t,arguments),t}function transformSymlog(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function transformSymexp(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function symlogish(t){var e=1,n=t(transformSymlog(e),transformSymexp(e));return n.constant=function(n){return arguments.length?t(transformSymlog(e=+n),transformSymexp(e)):e},linearish(n)}function symlog(){var t=symlogish(transformer());return t.copy=function(){return copy(t,symlog()).constant(t.constant())},initRange.apply(t,arguments)}function transformPow(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function transformSqrt(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function transformSquare(t){return t<0?-t*t:t*t}function powish(t){var e=t(identity,identity),n=1;return e.exponent=function(e){return arguments.length?(n=+e,function rescale(){return 1===n?t(identity,identity):.5===n?t(transformSqrt,transformSquare):t(transformPow(n),transformPow(1/n))}()):n},linearish(e)}function pow(){var t=powish(transformer());return t.copy=function(){return copy(t,pow()).exponent(t.exponent())},initRange.apply(t,arguments),t}function sqrt(){return pow.apply(null,arguments).exponent(.5)}function quantile(){var t,e=[],n=[],i=[];function rescale(){var t=0,a=Math.max(1,n.length);for(i=new Array(a-1);++t<a;)i[t-1]=(0,r.VR)(e,t/a);return scale}function scale(e){return isNaN(e=+e)?t:n[(0,r.b4)(i,e)]}return scale.invertExtent=function(t){var r=n.indexOf(t);return r<0?[NaN,NaN]:[r>0?i[r-1]:e[0],r<i.length?i[r]:e[e.length-1]]},scale.domain=function(t){if(!arguments.length)return e.slice();e=[];for(var n,i=0,a=t.length;i<a;++i)null==(n=t[i])||isNaN(n=+n)||e.push(n);return e.sort(r.j2),rescale()},scale.range=function(t){return arguments.length?(n=c.call(t),rescale()):n.slice()},scale.unknown=function(e){return arguments.length?(t=e,scale):t},scale.quantiles=function(){return i.slice()},scale.copy=function(){return quantile().domain(e).range(n).unknown(t)},initRange.apply(scale,arguments)}function quantize(){var t,e=0,n=1,i=1,a=[.5],o=[0,1];function scale(e){return e<=e?o[(0,r.b4)(a,e,0,i)]:t}function rescale(){var t=-1;for(a=new Array(i);++t<i;)a[t]=((t+1)*n-(t-i)*e)/(i+1);return scale}return scale.domain=function(t){return arguments.length?(e=+t[0],n=+t[1],rescale()):[e,n]},scale.range=function(t){return arguments.length?(i=(o=c.call(t)).length-1,rescale()):o.slice()},scale.invertExtent=function(t){var r=o.indexOf(t);return r<0?[NaN,NaN]:r<1?[e,a[0]]:r>=i?[a[i-1],n]:[a[r-1],a[r]]},scale.unknown=function(e){return arguments.length?(t=e,scale):scale},scale.thresholds=function(){return a.slice()},scale.copy=function(){return quantize().domain([e,n]).range(o).unknown(t)},initRange.apply(linearish(scale),arguments)}function threshold(){var t,e=[.5],n=[0,1],i=1;function scale(a){return a<=a?n[(0,r.b4)(e,a,0,i)]:t}return scale.domain=function(t){return arguments.length?(e=c.call(t),i=Math.min(e.length,n.length-1),scale):e.slice()},scale.range=function(t){return arguments.length?(n=c.call(t),i=Math.min(e.length,n.length-1),scale):n.slice()},scale.invertExtent=function(t){var r=n.indexOf(t);return[e[r-1],e[r]]},scale.unknown=function(e){return arguments.length?(t=e,scale):t},scale.copy=function(){return threshold().domain(e).range(n).unknown(t)},initRange.apply(scale,arguments)}var g=n(958),v=n(144),m=1e3,_=60*m,b=60*_,w=24*b,T=7*w,A=30*w,S=365*w;function date(t){return new Date(t)}function time_number(t){return t instanceof Date?+t:+new Date(+t)}function calendar(t,e,n,i,a,c,s,u,l){var d=continuous(identity,identity),h=d.invert,p=d.domain,g=l(".%L"),v=l(":%S"),k=l("%I:%M"),C=l("%I %p"),M=l("%a %d"),R=l("%b %d"),L=l("%B"),E=l("%Y"),O=[[s,1,m],[s,5,5*m],[s,15,15*m],[s,30,30*m],[c,1,_],[c,5,5*_],[c,15,15*_],[c,30,30*_],[a,1,b],[a,3,3*b],[a,6,6*b],[a,12,12*b],[i,1,w],[i,2,2*w],[n,1,T],[e,1,A],[e,3,3*A],[t,1,S]];function tickFormat(r){return(s(r)<r?g:c(r)<r?v:a(r)<r?k:i(r)<r?C:e(r)<r?n(r)<r?M:R:t(r)<r?L:E)(r)}function tickInterval(e,n,i,a){if(null==e&&(e=10),"number"==typeof e){var o=Math.abs(i-n)/e,c=(0,r.YF)((function(t){return t[2]})).right(O,o);c===O.length?(a=(0,r.ly)(n/S,i/S,e),e=t):c?(a=(c=O[o/O[c-1][2]<O[c][2]/o?c-1:c])[1],e=c[0]):(a=Math.max((0,r.ly)(n,i,e),1),e=u)}return null==a?e:e.every(a)}return d.invert=function(t){return new Date(h(t))},d.domain=function(t){return arguments.length?p(o.call(t,time_number)):p().map(date)},d.ticks=function(t,e){var n,r=p(),i=r[0],a=r[r.length-1],o=a<i;
2return o&&(n=i,i=a,a=n),n=(n=tickInterval(t,i,a,e))?n.range(i,a+1):[],o?n.reverse():n},d.tickFormat=function(t,e){return null==e?tickFormat:l(e)},d.nice=function(t,e){var n=p();return(t=tickInterval(t,n[0],n[n.length-1],e))?p(nice(n,t)):d},d.copy=function(){return copy(d,calendar(t,e,n,i,a,c,s,u,l))},d}function time(){return initRange.apply(calendar(g.jB,g.F0,g.NG,g.rr,g.WQ,g.Z_,g.S1,g.U8,v.timeFormat).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function utcTime(){return initRange.apply(calendar(g.ol,g.me,g.YF,g.AN,g.lM,g.rz,g.OL,g.GK,v.utcFormat).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function sequential_transformer(){var t,e,n,r,i,a=0,o=1,c=identity,s=!1;function scale(e){return isNaN(e=+e)?i:c(0===n?.5:(e=(r(e)-t)*n,s?Math.max(0,Math.min(1,e)):e))}return scale.domain=function(i){return arguments.length?(t=r(a=+i[0]),e=r(o=+i[1]),n=t===e?0:1/(e-t),scale):[a,o]},scale.clamp=function(t){return arguments.length?(s=!!t,scale):s},scale.interpolator=function(t){return arguments.length?(c=t,scale):c},scale.unknown=function(t){return arguments.length?(i=t,scale):i},function(i){return r=i,t=i(a),e=i(o),n=t===e?0:1/(e-t),scale}}function sequential_copy(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function sequential(){var t=linearish(sequential_transformer()(identity));return t.copy=function(){return sequential_copy(t,sequential())},initInterpolator.apply(t,arguments)}function sequentialLog(){var t=loggish(sequential_transformer()).domain([1,10]);return t.copy=function(){return sequential_copy(t,sequentialLog()).base(t.base())},initInterpolator.apply(t,arguments)}function sequentialSymlog(){var t=symlogish(sequential_transformer());return t.copy=function(){return sequential_copy(t,sequentialSymlog()).constant(t.constant())},initInterpolator.apply(t,arguments)}function sequentialPow(){var t=powish(sequential_transformer());return t.copy=function(){return sequential_copy(t,sequentialPow()).exponent(t.exponent())},initInterpolator.apply(t,arguments)}function sequentialSqrt(){return sequentialPow.apply(null,arguments).exponent(.5)}function sequentialQuantile(){var t=[],e=identity;function scale(n){if(!isNaN(n=+n))return e(((0,r.b4)(t,n)-1)/(t.length-1))}return scale.domain=function(e){if(!arguments.length)return t.slice();t=[];for(var n,i=0,a=e.length;i<a;++i)null==(n=e[i])||isNaN(n=+n)||t.push(n);return t.sort(r.j2),scale},scale.interpolator=function(t){return arguments.length?(e=t,scale):e},scale.copy=function(){return sequentialQuantile(e).domain(t)},initInterpolator.apply(scale,arguments)}function diverging_transformer(){var t,e,n,r,i,a,o,c=0,s=.5,u=1,l=identity,d=!1;function scale(t){return isNaN(t=+t)?o:(t=.5+((t=+a(t))-e)*(t<e?r:i),l(d?Math.max(0,Math.min(1,t)):t))}return scale.domain=function(o){return arguments.length?(t=a(c=+o[0]),e=a(s=+o[1]),n=a(u=+o[2]),r=t===e?0:.5/(e-t),i=e===n?0:.5/(n-e),scale):[c,s,u]},scale.clamp=function(t){return arguments.length?(d=!!t,scale):d},scale.interpolator=function(t){return arguments.length?(l=t,scale):l},scale.unknown=function(t){return arguments.length?(o=t,scale):o},function(o){return a=o,t=o(c),e=o(s),n=o(u),r=t===e?0:.5/(e-t),i=e===n?0:.5/(n-e),scale}}function diverging(){var t=linearish(diverging_transformer()(identity));return t.copy=function(){return sequential_copy(t,diverging())},initInterpolator.apply(t,arguments)}function divergingLog(){var t=loggish(diverging_transformer()).domain([.1,1,10]);return t.copy=function(){return sequential_copy(t,divergingLog()).base(t.base())},initInterpolator.apply(t,arguments)}function divergingSymlog(){var t=symlogish(diverging_transformer());return t.copy=function(){return sequential_copy(t,divergingSymlog()).constant(t.constant())},initInterpolator.apply(t,arguments)}function divergingPow(){var t=powish(diverging_transformer());return t.copy=function(){return sequential_copy(t,divergingPow()).exponent(t.exponent())},initInterpolator.apply(t,arguments)}function divergingSqrt(){return divergingPow.apply(null,arguments).exponent(.5)}},942:(t,e,n)=>{n.r(e),n.d(e,{clientPoint:()=>point,create:()=>create,creator:()=>creator,customEvent:()=>customEvent,event:()=>c,local:()=>local,matcher:()=>matcher,mouse:()=>mouse,namespace:()=>namespace,namespaces:()=>i,select:()=>src_select,selectAll:()=>src_selectAll,selection:()=>u,selector:()=>selector,selectorAll:()=>selectorAll,style:()=>styleValue,touch:()=>touch,touches:()=>touches,window:()=>src_window}
vendor: 4,613 bytes, line 2
2);var r="http://www.w3.org/1999/xhtml";const i={svg:"http://www.w3.org/2000/svg",xhtml:r,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function namespace(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),i.hasOwnProperty(e)?{space:i[e],local:t}:t}function creatorInherit(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===r&&e.documentElement.namespaceURI===r?e.createElement(t):e.createElementNS(n,t)}}function creatorFixed(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function creator(t){var e=namespace(t);return(e.local?creatorFixed:creatorInherit)(e)}function none(){}function selector(t){return null==t?none:function(){return this.querySelector(t)}}function empty(){return[]}function selectorAll(t){return null==t?empty:function(){return this.querySelectorAll(t)}}function matcher(t){return function(){return this.matches(t)}}function sparse(t){return new Array(t.length)}function EnterNode(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}EnterNode.prototype={constructor:EnterNode,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var a="$";function bindIndex(t,e,n,r,i,a){for(var o,c=0,s=e.length,u=a.length;c<u;++c)(o=e[c])?(o.__data__=a[c],r[c]=o):n[c]=new EnterNode(t,a[c]);for(;c<s;++c)(o=e[c])&&(i[c]=o)}function bindKey(t,e,n,r,i,o,c){var s,u,l,d={},h=e.length,p=o.length,g=new Array(h);for(s=0;s<h;++s)(u=e[s])&&(g[s]=l=a+c.call(u,u.__data__,s,e),l in d?i[s]=u:d[l]=u);for(s=0;s<p;++s)(u=d[l=a+c.call(t,o[s],s,o)])?(r[s]=u,u.__data__=o[s],d[l]=null):n[s]=new EnterNode(t,o[s]);for(s=0;s<h;++s)(u=e[s])&&d[g[s]]===u&&(i[s]=u)}function ascending(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function attrRemove(t){return function(){this.removeAttribute(t)}}function attrRemoveNS(t){return function(){this.removeAttributeNS(t.space,t.local)}}function attrConstant(t,e){return function(){this.setAttribute(t,e)}}function attrConstantNS(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function attrFunction(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function attrFunctionNS(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)}}function src_window(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function styleRemove(t){return function(){this.style.removeProperty(t)}}function styleConstant(t,e,n){return function(){this.style.setProperty(t,e,n)}}function styleFunction(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function styleValue(t,e){return t.style.getPropertyValue(e)||src_window(t).getComputedStyle(t,null).getPropertyValue(e)}function propertyRemove(t){return function(){delete this[t]}}function propertyConstant(t,e){return function(){this[t]=e}}function propertyFunction(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function classArray(t){return t.trim().split(/^|\s+/)}function classList(t){return t.classList||new ClassList(t)}function ClassList(t){this._node=t,this._names=classArray(t.getAttribute("class")||"")}function classedAdd(t,e){for(var n=classList(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function classedRemove(t,e){for(var n=classList(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function classedTrue(t){return function(){classedAdd(this,t)}}function classedFalse(t){return function(){classedRemove(this,t)}}function classedFunction(t,e){return function(){(e.apply(this,arguments)?classedAdd:classedRemove)(this,t)}}function textRemove(){this.textContent=""}function textConstant(t){return function(){this.textContent=t}}function textFunction(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function htmlRemove(){this.innerHTML=""}function htmlConstant(t){return function(){this.innerHTML=t}}function htmlFunction(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function raise(){this.nextSibling&&this.parentNode.appendChild(this)}function lower(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}
2function constantNull(){return null}function remove(){var t=this.parentNode;t&&t.removeChild(this)}function selection_cloneShallow(){return this.parentNode.insertBefore(this.cloneNode(!1),this.nextSibling)}function selection_cloneDeep(){return this.parentNode.insertBefore(this.cloneNode(!0),this.nextSibling)}ClassList.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}};var o={},c=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(o={mouseenter:"mouseover",mouseleave:"mouseout"}));function filterContextListener(t,e,n){return t=contextListener(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function contextListener(t,e,n){return function(r){var i=c;c=r;try{t.call(this,this.__data__,e,n)}finally{c=i}}}function onRemove(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r<a;++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 onAdd(t,e,n){var r=o.hasOwnProperty(t.type)?filterContextListener:contextListener;return function(i,a,o){var c,s=this.__on,u=r(e,a,o);if(s)for(var l=0,d=s.length;l<d;++l)if((c=s[l]).type===t.type&&c.name===t.name)return this.removeEventListener(c.type,c.listener,c.capture),this.addEventListener(c.type,c.listener=u,c.capture=n),void(c.value=e);this.addEventListener(t.type,u,n),c={type:t.type,name:t.name,value:e,listener:u,capture:n},s?s.push(c):this.__on=[c]}}function customEvent(t,e,n,r){var i=c;t.sourceEvent=c,c=t;try{return e.apply(n,r)}finally{c=i}}function dispatchEvent(t,e,n){var r=src_window(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 dispatchConstant(t,e){return function(){return dispatchEvent(this,t,e)}}function dispatchFunction(t,e){return function(){return dispatchEvent(this,t,e.apply(this,arguments))}}var s=[null];function Selection(t,e){this._groups=t,this._parents=e}function selection(){return new Selection([[document.documentElement]],s)}Selection.prototype=selection.prototype={constructor:Selection,select:function selection_select(t){"function"!=typeof t&&(t=selector(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o,c=e[i],s=c.length,u=r[i]=new Array(s),l=0;l<s;
2++l)(a=c[l])&&(o=t.call(a,a.__data__,l,c))&&("__data__"in a&&(o.__data__=a.__data__),u[l]=o);return new Selection(r,this._parents)},selectAll:function selectAll(t){"function"!=typeof t&&(t=selectorAll(t));for(var e=this._groups,n=e.length,r=[],i=[],a=0;a<n;++a)for(var o,c=e[a],s=c.length,u=0;u<s;++u)(o=c[u])&&(r.push(t.call(o,o.__data__,u,c)),i.push(o));return new Selection(r,i)},filter:function filter(t){"function"!=typeof t&&(t=matcher(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],c=o.length,s=r[i]=[],u=0;u<c;++u)(a=o[u])&&t.call(a,a.__data__,u,o)&&s.push(a);return new Selection(r,this._parents)},data:function data(t,e){if(!t)return p=new Array(this.size()),u=-1,this.each((function(t){p[++u]=t})),p;var n=e?bindKey:bindIndex,r=this._parents,i=this._groups;"function"!=typeof t&&(t=function constant(t){return function(){return t}}(t));for(var a=i.length,o=new Array(a),c=new Array(a),s=new Array(a),u=0;u<a;++u){var l=r[u],d=i[u],h=d.length,p=t.call(l,l&&l.__data__,u,r),g=p.length,v=c[u]=new Array(g),m=o[u]=new Array(g);n(l,d,v,m,s[u]=new Array(h),p,e);for(var _,b,w=0,T=0;w<g;++w)if(_=v[w]){for(w>=T&&(T=w+1);!(b=m[T])&&++T<g;);_._next=b||null}}return(o=new Selection(o,r))._enter=c,o._exit=s,o},enter:function enter(){return new Selection(this._enter||this._groups.map(sparse),this._parents)},exit:function exit(){return new Selection(this._exit||this._groups.map(sparse),this._parents)},join:function join(t,e,n){var r=this.enter(),i=this,a=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=e&&(i=e(i)),null==n?a.remove():n(a),r&&i?r.merge(i).order():i},merge:function merge(t){for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),c=0;c<a;++c)for(var s,u=e[c],l=n[c],d=u.length,h=o[c]=new Array(d),p=0;p<d;++p)(s=u[p]||l[p])&&(h[p]=s);for(;c<r;++c)o[c]=e[c];return new Selection(o,this._parents)},order:function order(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],a=i.length-1,o=i[a];--a>=0;)(r=i[a])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function sort(t){function compareNode(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=ascending);for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i){for(var a,o=e[i],c=o.length,s=r[i]=new Array(c),u=0;u<c;++u)(a=o[u])&&(s[u]=a);s.sort(compareNode)}return new Selection(r,this._parents).order()},call:function call(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function nodes(){var t=new Array(this.size()),e=-1;return this.each((function(){t[++e]=this})),t},node:function node(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null},size:function size(){var t=0;return this.each((function(){++t})),t},empty:function selection_empty(){return!this.node()},each:function each(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,a=e[n],o=0,c=a.length;o<c;++o)(i=a[o])&&t.call(i,i.__data__,o,a);return this},attr:function attr(t,e){var n=namespace(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?attrRemoveNS:attrRemove:"function"==typeof e?n.local?attrFunctionNS:attrFunction:n.local?attrConstantNS:attrConstant)(n,e))},style:function style(t,e,n){return arguments.length>1?this.each((null==e?styleRemove:"function"==typeof e?styleFunction:styleConstant)(t,e,null==n?"":n)):styleValue(this.node(),t)},property:function property(t,e){return arguments.length>1?this.each((null==e?propertyRemove:"function"==typeof e?propertyFunction:propertyConstant)(t,e)):this.node()[t]},classed:function classed(t,e){var n=classArray(t+"");if(arguments.length<2){for(var r=classList(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?classedFunction:e?classedTrue:classedFalse)(n,e))},text:function selection_text(t){return arguments.length?this.each(null==t?textRemove:("function"==typeof t?textFunction:textConstant)(t)):this.node().textContent},html:function html(t){return arguments.length?this.each(null==t?htmlRemove:("function"==typeof t?htmlFunction:htmlConstant)(t)):this.node().innerHTML},raise:function selection_raise(){return this.each(raise)},lower:function selection_lower(){return this.each(lower)},append:function append(t){var e="function"==typeof t?t:creator(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function insert(t,e){var n="function"==typeof t?t:creator(t),r=null==e?constantNull:"function"==typeof e?e:selector(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function selection_remove(){return this.each(remove)},clone:function clone(t){return this.select(t?selection_cloneDeep:selection_cloneShallow)},datum:function datum(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function on(t,e,n){var r,i,a=function parseTypenames(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}}))}(t+""),o=a.length;if(!(arguments.length<2)){for(c=e?onAdd:onRemove,null==n&&(n=!1),r=0;r<o;++r)this.each(c(a[r],e,n));return this}var c=this.node().__on;if(c)for(var s,u=0,l=c.length;u<l;++u)for(r=0,s=c[u];r<o;++r)if((i=a[r]).type===s.type&&i.name===s.name)return s.value},dispatch:function dispatch(t,e){return this.each(("function"==typeof e?dispatchFunction:dispatchConstant)(t,e))}};const u=selection;function src_select(t){return"string"==typeof t?new Selection([[document.querySelector(t)]],[document.documentElement]):new Selection([[t]],s)}
vendor: 5,181 bytes, line 2
2function create(t){return src_select(creator(t).call(document.documentElement))}var l=0;function local(){return new Local}function Local(){this._="@"+(++l).toString(36)}function sourceEvent(){for(var t,e=c;t=e.sourceEvent;)e=t;return e}function point(t,e){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}function mouse(t){var e=sourceEvent();return e.changedTouches&&(e=e.changedTouches[0]),point(t,e)}function src_selectAll(t){return"string"==typeof t?new Selection([document.querySelectorAll(t)],[document.documentElement]):new Selection([null==t?[]:t],s)}function touch(t,e,n){arguments.length<3&&(n=e,e=sourceEvent().changedTouches);for(var r,i=0,a=e?e.length:0;i<a;++i)if((r=e[i]).identifier===n)return point(t,r);return null}function touches(t,e){null==e&&(e=sourceEvent().touches);for(var n=0,r=e?e.length:0,i=new Array(r);n<r;++n)i[n]=point(t,e[n]);return i}Local.prototype=local.prototype={constructor:Local,get:function(t){for(var e=this._;!(e in t);)if(!(t=t.parentNode))return;return t[e]},set:function(t,e){return t[this._]=e},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}}},742:(t,e,n)=>{n.r(e),n.d(e,{arc:()=>arc,area:()=>src_area,areaRadial:()=>areaRadial,curveBasis:()=>basis,curveBasisClosed:()=>basisClosed,curveBasisOpen:()=>basisOpen,curveBundle:()=>N,curveCardinal:()=>B,curveCardinalClosed:()=>X,curveCardinalOpen:()=>j,curveCatmullRom:()=>Y,curveCatmullRomClosed:()=>q,curveCatmullRomOpen:()=>U,curveLinear:()=>linear,curveLinearClosed:()=>linearClosed,curveMonotoneX:()=>monotoneX,curveMonotoneY:()=>monotoneY,curveNatural:()=>natural,curveStep:()=>step,curveStepAfter:()=>stepAfter,curveStepBefore:()=>stepBefore,line:()=>line,lineRadial:()=>src_lineRadial,linkHorizontal:()=>linkHorizontal,linkRadial:()=>linkRadial,linkVertical:()=>linkVertical,pie:()=>pie,pointRadial:()=>pointRadial,radialArea:()=>areaRadial,radialLine:()=>src_lineRadial,stack:()=>stack,stackOffsetDiverging:()=>diverging,stackOffsetExpand:()=>expand,stackOffsetNone:()=>none,stackOffsetSilhouette:()=>silhouette,stackOffsetWiggle:()=>wiggle,stackOrderAppearance:()=>appearance,stackOrderAscending:()=>ascending,stackOrderDescending:()=>order_descending,stackOrderInsideOut:()=>insideOut,stackOrderNone:()=>order_none,stackOrderReverse:()=>reverse,symbol:()=>symbol,symbolCircle:()=>_,symbolCross:()=>b,symbolDiamond:()=>A,symbolSquare:()=>R,symbolStar:()=>M,symbolTriangle:()=>E,symbolWye:()=>I,symbols:()=>z});var r=n(393);function constant(t){return function constant(){return t}}var i=Math.abs,a=Math.atan2,o=Math.cos,c=Math.max,s=Math.min,u=Math.sin,l=Math.sqrt,d=1e-12,h=Math.PI,p=h/2,g=2*h;function asin(t){return t>=1?p:t<=-1?-p:Math.asin(t)}function arcInnerRadius(t){return t.innerRadius}function arcOuterRadius(t){return t.outerRadius}function arcStartAngle(t){return t.startAngle}function arcEndAngle(t){return t.endAngle}function arcPadAngle(t){return t&&t.padAngle}function cornerTangents(t,e,n,r,i,a,o){var s=t-n,u=e-r,d=(o?a:-a)/l(s*s+u*u),h=d*u,p=-d*s,g=t+h,v=e+p,m=n+h,_=r+p,b=(g+m)/2,w=(v+_)/2,T=m-g,A=_-v,S=T*T+A*A,k=i-a,C=g*_-m*v,M=(A<0?-1:1)*l(c(0,k*k*S-C*C)),R=(C*A-T*M)/S,L=(-C*T-A*M)/S,E=(C*A+T*M)/S,O=(-C*T+A*M)/S,P=R-b,F=L-w,D=E-b,I=O-w;return P*P+F*F>D*D+I*I&&(R=E,L=O),{cx:R,cy:L,x01:-h,y01:-p,x11:R*(i/k-1),y11:L*(i/k-1)}}function arc(){var t=arcInnerRadius,e=arcOuterRadius,n=constant(0),c=null,v=arcStartAngle,m=arcEndAngle,_=arcPadAngle,b=null;function arc(){var w,T,A=+t.apply(this,arguments),S=+e.apply(this,arguments),k=v.apply(this,arguments)-p,C=m.apply(this,arguments)-p,M=i(C-k),R=C>k;if(b||(b=w=(0,r.E)()),S<A&&(T=S,S=A,A=T),S>d)if(M>g-d)b.moveTo(S*o(k),S*u(k)),b.arc(0,0,S,k,C,!R),A>d&&(b.moveTo(A*o(C),A*u(C)),b.arc(0,0,A,C,k,R));else{var L,E,O=k,P=C,F=k,D=C,I=M,z=M,N=_.apply(this,arguments)/2,B=N>d&&(c?+c.apply(this,arguments):l(A*A+S*S)),X=s(i(S-A)/2,+n.apply(this,arguments)),j=X,Y=X;if(B>d){var q=asin(B/A*u(N)),U=asin(B/S*u(N));(I-=2*q)>d?(F+=q*=R?1:-1,D-=q):(I=0,F=D=(k+C)/2),(z-=2*U)>d?(O+=U*=R?1:-1,P-=U):(z=0,O=P=(k+C)/2)}var H=S*o(O),W=S*u(O),V=A*o(D),G=A*u(D);if(X>d){var Z,K=S*o(P),$=S*u(P),Q=A*o(F),J=A*u(F);if(M<h&&(Z=function intersect(t,e,n,r,i,a,o,c){var s=n-t,u=r-e,l=o-i,h=c-a,p=h*s-l*u;if(!(p*p<d))return[t+(p=(l*(e-a)-h*(t-i))/p)*s,e+p*u]}(H,W,Q,J,K,$,V,G))){var tt=H-Z[0],et=W-Z[1],nt=K-Z[0],rt=$-Z[1],it=1/u(function acos(t){return t>1?0:t<-1?h:Math.acos(t)}((tt*nt+et*rt)/(l(tt*tt+et*et)*l(nt*nt+rt*rt)))/2),at=l(Z[0]*Z[0]+Z[1]*Z[1]);j=s(X,(A-at)/(it-1)),Y=s(X,(S-at)/(it+1))}}z>d?Y>d?(L=cornerTangents(Q,J,H,W,S,Y,R),E=cornerTangents(K,$,V,G,S,Y,R),b.moveTo(L.cx+L.x01,L.cy+L.y01),Y<X?b.arc(L.cx,L.cy,Y,a(L.y01,L.x01),a(E.y01,E.x01),!R):(b.arc(L.cx,L.cy,Y,a(L.y01,L.x01),a(L.y11,L.x11),!R),b.arc(0,0,S,a(L.cy+L.y11,L.cx+L.x11),a(E.cy+E.y11,E.cx+E.x11),!R),b.arc(E.cx,E.cy,Y,a(E.y11,E.x11),a(E.y01,E.x01),!R))):(b.moveTo(H,W),b.arc(0,0,S,O,P,!R)):b.moveTo(H,W),A>d&&I>d?j>d?(L=cornerTangents(V,G,K,$,A,-j,R),E=cornerTangents(H,W,Q,J,A,-j,R),b.lineTo(L.
vendor: 4,648 bytes, line 2
2cx+L.x01,L.cy+L.y01),j<X?b.arc(L.cx,L.cy,j,a(L.y01,L.x01),a(E.y01,E.x01),!R):(b.arc(L.cx,L.cy,j,a(L.y01,L.x01),a(L.y11,L.x11),!R),b.arc(0,0,A,a(L.cy+L.y11,L.cx+L.x11),a(E.cy+E.y11,E.cx+E.x11),R),b.arc(E.cx,E.cy,j,a(E.y11,E.x11),a(E.y01,E.x01),!R))):b.arc(0,0,A,D,F,R):b.lineTo(V,G)}else b.moveTo(0,0);if(b.closePath(),w)return b=null,w+""||null}return arc.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+v.apply(this,arguments)+ +m.apply(this,arguments))/2-h/2;return[o(r)*n,u(r)*n]},arc.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:constant(+e),arc):t},arc.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:constant(+t),arc):e},arc.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:constant(+t),arc):n},arc.padRadius=function(t){return arguments.length?(c=null==t?null:"function"==typeof t?t:constant(+t),arc):c},arc.startAngle=function(t){return arguments.length?(v="function"==typeof t?t:constant(+t),arc):v},arc.endAngle=function(t){return arguments.length?(m="function"==typeof t?t:constant(+t),arc):m},arc.padAngle=function(t){return arguments.length?(_="function"==typeof t?t:constant(+t),arc):_},arc.context=function(t){return arguments.length?(b=null==t?null:t,arc):b},arc}function Linear(t){this._context=t}function linear(t){return new Linear(t)}function point_x(t){return t[0]}function point_y(t){return t[1]}function line(){var t=point_x,e=point_y,n=constant(!0),i=null,a=linear,o=null;function line(c){var s,u,l,d=c.length,h=!1;for(null==i&&(o=a(l=(0,r.E)())),s=0;s<=d;++s)!(s<d&&n(u=c[s],s,c))===h&&((h=!h)?o.lineStart():o.lineEnd()),h&&o.point(+t(u,s,c),+e(u,s,c));if(l)return o=null,l+""||null}return line.x=function(e){return arguments.length?(t="function"==typeof e?e:constant(+e),line):t},line.y=function(t){return arguments.length?(e="function"==typeof t?t:constant(+t),line):e},line.defined=function(t){return arguments.length?(n="function"==typeof t?t:constant(!!t),line):n},line.curve=function(t){return arguments.length?(a=t,null!=i&&(o=a(i)),line):a},line.context=function(t){return arguments.length?(null==t?i=o=null:o=a(i=t),line):i},line}function src_area(){var t=point_x,e=null,n=constant(0),i=point_y,a=constant(!0),o=null,c=linear,s=null;function area(u){var l,d,h,p,g,v=u.length,m=!1,_=new Array(v),b=new Array(v);for(null==o&&(s=c(g=(0,r.E)())),l=0;l<=v;++l){if(!(l<v&&a(p=u[l],l,u))===m)if(m=!m)d=l,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),h=l-1;h>=d;--h)s.point(_[h],b[h]);s.lineEnd(),s.areaEnd()}m&&(_[l]=+t(p,l,u),b[l]=+n(p,l,u),s.point(e?+e(p,l,u):_[l],i?+i(p,l,u):b[l]))}if(g)return s=null,g+""||null}function arealine(){return line().defined(a).curve(c).context(o)}return area.x=function(n){return arguments.length?(t="function"==typeof n?n:constant(+n),e=null,area):t},area.x0=function(e){return arguments.length?(t="function"==typeof e?e:constant(+e),area):t},area.x1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:constant(+t),area):e},area.y=function(t){return arguments.length?(n="function"==typeof t?t:constant(+t),i=null,area):n},area.y0=function(t){return arguments.length?(n="function"==typeof t?t:constant(+t),area):n},area.y1=function(t){return arguments.length?(i=null==t?null:"function"==typeof t?t:constant(+t),area):i},area.lineX0=area.lineY0=function(){return arealine().x(t).y(n)},area.lineY1=function(){return arealine().x(t).y(i)},area.lineX1=function(){return arealine().x(e).y(n)},area.defined=function(t){return arguments.length?(a="function"==typeof t?t:constant(!!t),area):a},area.curve=function(t){return arguments.length?(c=t,null!=o&&(s=c(o)),area):c},area.context=function(t){return arguments.length?(null==t?o=s=null:s=c(o=t),area):o},area}function descending(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function identity(t){return t}function pie(){var t=identity,e=descending,n=null,r=constant(0),i=constant(g),a=constant(0);function pie(o){var c,s,u,l,d,h=o.length,p=0,v=new Array(h),m=new Array(h),_=+r.apply(this,arguments),b=Math.min(g,Math.max(-g,i.apply(this,arguments)-_)),w=Math.min(Math.abs(b)/h,a.apply(this,arguments)),T=w*(b<0?-1:1);for(c=0;c<h;++c)(d=m[v[c]=c]=+t(o[c],c,o))>0&&(p+=d);for(null!=e?v.sort((function(t,n){return e(m[t],m[n])})):null!=n&&v.sort((function(t,e){return n(o[t],o[e])})),c=0,u=p?(b-h*T)/p:0;c<h;++c,_=l)s=v[c],l=_+((d=m[s])>0?d*u:0)+T,m[s]={data:o[s],index:c,value:d,startAngle:_,endAngle:l,padAngle:w};return m}return pie.value=function(e){return arguments.length?(t="function"==typeof e?e:constant(+e),pie):t},pie.sortValues=function(t){return arguments.length?(e=t,n=null,pie):e}
2,pie.sort=function(t){return arguments.length?(n=t,e=null,pie):n},pie.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:constant(+t),pie):r},pie.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:constant(+t),pie):i},pie.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:constant(+t),pie):a},pie}Linear.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,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var v=curveRadial(linear);function Radial(t){this._curve=t}function curveRadial(t){function radial(e){return new Radial(t(e))}return radial._curve=t,radial}function lineRadial(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(curveRadial(t)):e()._curve},t}function src_lineRadial(){return lineRadial(line().curve(v))}function areaRadial(){var t=src_area().curve(v),e=t.curve,n=t.lineX0,r=t.lineX1,i=t.lineY0,a=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return lineRadial(n())},delete t.lineX0,t.lineEndAngle=function(){return lineRadial(r())},delete t.lineX1,t.lineInnerRadius=function(){return lineRadial(i())},delete t.lineY0,t.lineOuterRadius=function(){return lineRadial(a())},delete t.lineY1,t.curve=function(t){return arguments.length?e(curveRadial(t)):e()._curve},t}function pointRadial(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}Radial.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};var m=Array.prototype.slice;function linkSource(t){return t.source}function linkTarget(t){return t.target}function link_link(t){var e=linkSource,n=linkTarget,i=point_x,a=point_y,o=null;function link(){var c,s=m.call(arguments),u=e.apply(this,s),l=n.apply(this,s);if(o||(o=c=(0,r.E)()),t(o,+i.apply(this,(s[0]=u,s)),+a.apply(this,s),+i.apply(this,(s[0]=l,s)),+a.apply(this,s)),c)return o=null,c+""||null}return link.source=function(t){return arguments.length?(e=t,link):e},link.target=function(t){return arguments.length?(n=t,link):n},link.x=function(t){return arguments.length?(i="function"==typeof t?t:constant(+t),link):i},link.y=function(t){return arguments.length?(a="function"==typeof t?t:constant(+t),link):a},link.context=function(t){return arguments.length?(o=null==t?null:t,link):o},link}function curveHorizontal(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e=(e+r)/2,n,e,i,r,i)}function curveVertical(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e,n=(n+i)/2,r,n,r,i)}function link_curveRadial(t,e,n,r,i){var a=pointRadial(e,n),o=pointRadial(e,n=(n+i)/2),c=pointRadial(r,n),s=pointRadial(r,i);
vendor: 13,457 bytes, line 2
2t.moveTo(a[0],a[1]),t.bezierCurveTo(o[0],o[1],c[0],c[1],s[0],s[1])}function linkHorizontal(){return link_link(curveHorizontal)}function linkVertical(){return link_link(curveVertical)}function linkRadial(){var t=link_link(link_curveRadial);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}const _={draw:function(t,e){var n=Math.sqrt(e/h);t.moveTo(n,0),t.arc(0,0,n,0,g)}},b={draw:function(t,e){var n=Math.sqrt(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}};var w=Math.sqrt(1/3),T=2*w;const A={draw:function(t,e){var n=Math.sqrt(e/T),r=n*w;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}};var S=Math.sin(h/10)/Math.sin(7*h/10),k=Math.sin(g/10)*S,C=-Math.cos(g/10)*S;const M={draw:function(t,e){var n=Math.sqrt(.8908130915292852*e),r=k*n,i=C*n;t.moveTo(0,-n),t.lineTo(r,i);for(var a=1;a<5;++a){var o=g*a/5,c=Math.cos(o),s=Math.sin(o);t.lineTo(s*n,-c*n),t.lineTo(c*r-s*i,s*r+c*i)}t.closePath()}},R={draw:function(t,e){var n=Math.sqrt(e),r=-n/2;t.rect(r,r,n,n)}};var L=Math.sqrt(3);const E={draw:function(t,e){var n=-Math.sqrt(e/(3*L));t.moveTo(0,2*n),t.lineTo(-L*n,-n),t.lineTo(L*n,-n),t.closePath()}};var O=-.5,P=Math.sqrt(3)/2,F=1/Math.sqrt(12),D=3*(F/2+1);const I={draw:function(t,e){var n=Math.sqrt(e/D),r=n/2,i=n*F,a=r,o=n*F+n,c=-a,s=o;t.moveTo(r,i),t.lineTo(a,o),t.lineTo(c,s),t.lineTo(O*r-P*i,P*r+O*i),t.lineTo(O*a-P*o,P*a+O*o),t.lineTo(O*c-P*s,P*c+O*s),t.lineTo(O*r+P*i,O*i-P*r),t.lineTo(O*a+P*o,O*o-P*a),t.lineTo(O*c+P*s,O*s-P*c),t.closePath()}};var z=[_,b,A,R,M,E,I];function symbol(){var t=constant(_),e=constant(64),n=null;function symbol(){var i;if(n||(n=i=(0,r.E)()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),i)return n=null,i+""||null}return symbol.type=function(e){return arguments.length?(t="function"==typeof e?e:constant(e),symbol):t},symbol.size=function(t){return arguments.length?(e="function"==typeof t?t:constant(+t),symbol):e},symbol.context=function(t){return arguments.length?(n=null==t?null:t,symbol):n},symbol}function noop(){}function point(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function Basis(t){this._context=t}function basis(t){return new Basis(t)}function BasisClosed(t){this._context=t}function basisClosed(t){return new BasisClosed(t)}function BasisOpen(t){this._context=t}function basisOpen(t){return new BasisOpen(t)}function Bundle(t,e){this._basis=new Basis(t),this._beta=e}Basis.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:point(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:point(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},BasisClosed.prototype={areaStart:noop,areaEnd:noop,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:point(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},BasisOpen.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:point(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Bundle.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r,i=t[0],a=e[0],o=t[n]-i,c=e[n]-a,s=-1;++s<=n;)r=s/n,this._basis.point(this._beta*t[s]+(1-this._beta)*(i+r*o),this._beta*e[s]+(1-this._beta)*(a+r*c));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const N=function custom(t){function bundle(e){return 1===t?new Basis(e):new Bundle(e,t)}return bundle.beta=function(t){return custom(+t)},bundle}(.85);function cardinal_point(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function Cardinal(t,e){this._context=t,this._k=(1-e)/6}Cardinal.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:cardinal_point(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:cardinal_point(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const B=function custom(t){function cardinal(e){return new Cardinal(e,t)}return cardinal.tension=function(t){return custom(+t)},cardinal}(0);function CardinalClosed(t,e){this._context=t,this._k=(1-e)/6}CardinalClosed.prototype={areaStart:noop,areaEnd:noop,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:cardinal_point(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const X=function custom(t){function cardinal(e){return new CardinalClosed(e,t)}return cardinal.tension=function(t){return custom(+t)},cardinal}(0);function CardinalOpen(t,e){this._context=t,this._k=(1-e)/6}CardinalOpen.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:cardinal_point(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const j=function custom(t){function cardinal(e){return new CardinalOpen(e,t)}return cardinal.tension=function(t){return custom(+t)},cardinal}(0);function catmullRom_point(t,e,n){var r=t._x1,i=t._y1,a=t._x2,o=t._y2;if(t._l01_a>d){var c=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,s=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*c-t._x0*t._l12_2a+t._x2*t._l01_2a)/s,i=(i*c-t._y0*t._l12_2a+t._y2*t._l01_2a)/s}if(t._l23_a>d){var u=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,l=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*u+t._x1*t._l23_2a-e*t._l12_2a)/l,o=(o*u+t._y1*t._l23_2a-n*t._l12_2a)/l}t._context.bezierCurveTo(r,i,a,o,t._x2,t._y2)}function CatmullRom(t,e){this._context=t,this._alpha=e}CatmullRom.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:catmullRom_point(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Y=function custom(t){function catmullRom(e){return t?new CatmullRom(e,t):new Cardinal(e,0)}return catmullRom.alpha=function(t){return custom(+t)},catmullRom}(.5);function CatmullRomClosed(t,e){this._context=t,this._alpha=e}CatmullRomClosed.prototype={areaStart:noop,areaEnd:noop,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:catmullRom_point(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const q=function custom(t){function catmullRom(e){return t?new CatmullRomClosed(e,t):new CardinalClosed(e,0)}return catmullRom.alpha=function(t){return custom(+t)},catmullRom}(.5);function CatmullRomOpen(t,e){this._context=t,this._alpha=e}CatmullRomOpen.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:catmullRom_point(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const U=function custom(t){function catmullRom(e){return t?new CatmullRomOpen(e,t):new CardinalOpen(e,0)}return catmullRom.alpha=function(t){return custom(+t)},catmullRom}(.5);function LinearClosed(t){this._context=t}function linearClosed(t){return new LinearClosed(t)}function sign(t){return t<0?-1:1}function slope3(t,e,n){var r=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(r||i<0&&-0),o=(n-t._y1)/(i||r<0&&-0),c=(a*i+o*r)/(r+i);return(sign(a)+sign(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(c))||0}function slope2(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function monotone_point(t,e,n){var r=t._x0,i=t._y0,a=t._x1,o=t._y1,c=(a-r)/3;t._context.bezierCurveTo(r+c,i+c*e,a-c,o-c*n,a,o)}function MonotoneX(t){this._context=t}function MonotoneY(t){this._context=new ReflectContext(t)}
vendor: 16,936 bytes, line 2
2function ReflectContext(t){this._context=t}function monotoneX(t){return new MonotoneX(t)}function monotoneY(t){return new MonotoneY(t)}function Natural(t){this._context=t}function controlPoints(t){var e,n,r=t.length-1,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e<r-1;++e)i[e]=1,a[e]=4,o[e]=4*t[e]+2*t[e+1];for(i[r-1]=2,a[r-1]=7,o[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=i[e]/a[e-1],a[e]-=n,o[e]-=n*o[e-1];for(i[r-1]=o[r-1]/a[r-1],e=r-2;e>=0;--e)i[e]=(o[e]-i[e+1])/a[e];for(a[r-1]=(t[r]+i[r-1])/2,e=0;e<r-1;++e)a[e]=2*t[e+1]-i[e+1];return[i,a]}function natural(t){return new Natural(t)}function Step(t,e){this._context=t,this._t=e}function step(t){return new Step(t,.5)}function stepBefore(t){return new Step(t,0)}function stepAfter(t){return new Step(t,1)}function none(t,e){if((i=t.length)>1)for(var n,r,i,a=1,o=t[e[0]],c=o.length;a<i;++a)for(r=o,o=t[e[a]],n=0;n<c;++n)o[n][1]+=o[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function order_none(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function stackValue(t,e){return t[e]}function stack(){var t=constant([]),e=order_none,n=none,r=stackValue;function stack(i){var a,o,c=t.apply(this,arguments),s=i.length,u=c.length,l=new Array(u);for(a=0;a<u;++a){for(var d,h=c[a],p=l[a]=new Array(s),g=0;g<s;++g)p[g]=d=[0,+r(i[g],h,g,i)],d.data=i[g];p.key=h}for(a=0,o=e(l);a<u;++a)l[o[a]].index=a;return n(l,o),l}return stack.keys=function(e){return arguments.length?(t="function"==typeof e?e:constant(m.call(e)),stack):t},stack.value=function(t){return arguments.length?(r="function"==typeof t?t:constant(+t),stack):r},stack.order=function(t){return arguments.length?(e=null==t?order_none:"function"==typeof t?t:constant(m.call(t)),stack):e},stack.offset=function(t){return arguments.length?(n=null==t?none:t,stack):n},stack}function expand(t,e){if((r=t.length)>0){for(var n,r,i,a=0,o=t[0].length;a<o;++a){for(i=n=0;n<r;++n)i+=t[n][a][1]||0;if(i)for(n=0;n<r;++n)t[n][a][1]/=i}none(t,e)}}function diverging(t,e){if((c=t.length)>0)for(var n,r,i,a,o,c,s=0,u=t[e[0]].length;s<u;++s)for(a=o=0,n=0;n<c;++n)(i=(r=t[e[n]][s])[1]-r[0])>0?(r[0]=a,r[1]=a+=i):i<0?(r[1]=o,r[0]=o+=i):(r[0]=0,r[1]=i)}function silhouette(t,e){if((n=t.length)>0){for(var n,r=0,i=t[e[0]],a=i.length;r<a;++r){for(var o=0,c=0;o<n;++o)c+=t[o][r][1]||0;i[r][1]+=i[r][0]=-c/2}none(t,e)}}function wiggle(t,e){if((i=t.length)>0&&(r=(n=t[e[0]]).length)>0){for(var n,r,i,a=0,o=1;o<r;++o){for(var c=0,s=0,u=0;c<i;++c){for(var l=t[e[c]],d=l[o][1]||0,h=(d-(l[o-1][1]||0))/2,p=0;p<c;++p){var g=t[e[p]];h+=(g[o][1]||0)-(g[o-1][1]||0)}s+=d,u+=h*d}n[o-1][1]+=n[o-1][0]=a,s&&(a-=u/s)}n[o-1][1]+=n[o-1][0]=a,none(t,e)}}function appearance(t){var e=t.map(peak);return order_none(t).sort((function(t,n){return e[t]-e[n]}))}function peak(t){for(var e,n=-1,r=0,i=t.length,a=-1/0;++n<i;)(e=+t[n][1])>a&&(a=e,r=n);return r}function ascending(t){var e=t.map(sum);return order_none(t).sort((function(t,n){return e[t]-e[n]}))}function sum(t){for(var e,n=0,r=-1,i=t.length;++r<i;)(e=+t[r][1])&&(n+=e);return n}function order_descending(t){return ascending(t).reverse()}function insideOut(t){var e,n,r=t.length,i=t.map(sum),a=appearance(t),o=0,c=0,s=[],u=[];for(e=0;e<r;++e)n=a[e],o<c?(o+=i[n],s.push(n)):(c+=i[n],u.push(n));return u.reverse().concat(s)}function reverse(t){return order_none(t).reverse()}LinearClosed.prototype={areaStart:noop,areaEnd:noop,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}},MonotoneX.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:monotone_point(this,this._t0,slope2(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,monotone_point(this,slope2(this,n=slope3(this,t,e)),n);break;default:monotone_point(this,this._t0,n=slope3(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(MonotoneY.prototype=Object.create(MonotoneX.prototype)).point=function(t,e){MonotoneX.prototype.point.call(this,e,t)},ReflectContext.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,a){this._context.bezierCurveTo(e,t,r,n,a,i)}},Natural.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===n)this._context.lineTo(t[1],e[1]);else for(var r=controlPoints(t),i=controlPoints(e),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],t[o],e[o]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}},Step.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,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}}},144:(t,e,n)=>{n.r(e),n.d(e,{isoFormat:()=>g,isoParse:()=>v,timeFormat:()=>a,timeFormatDefaultLocale:()=>defaultLocale,timeFormatLocale:()=>formatLocale,timeParse:()=>o,utcFormat:()=>c,utcParse:()=>s});var r=n(958);function localDate(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 utcDate(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 newYear(t){return{y:t,m:0,d:1,H:0,M:0,S:0,L:0}}function formatLocale(t){var e=t.dateTime,n=t.date,i=t.time,a=t.periods,o=t.days,c=t.shortDays,s=t.months,l=t.shortMonths,d=formatRe(a),h=formatLookup(a),p=formatRe(o),g=formatLookup(o),v=formatRe(c),m=formatLookup(c),_=formatRe(s),b=formatLookup(s),w=formatRe(l),T=formatLookup(l),A={a:function formatShortWeekday(t){return c[t.getDay()]},A:function formatWeekday(t){return o[t.getDay()]},b:function formatShortMonth(t){return l[t.getMonth()]},B:function formatMonth(t){return s[t.getMonth()]},c:null,d:formatDayOfMonth,e:formatDayOfMonth,f:formatMicroseconds,H:formatHour24,I:formatHour12,j:formatDayOfYear,L:formatMilliseconds,m:formatMonthNumber,M:formatMinutes,p:function formatPeriod(t){return a[+(t.getHours()>=12)]},Q:formatUnixTimestamp,s:formatUnixTimestampSeconds,S:formatSeconds,u:formatWeekdayNumberMonday,U:formatWeekNumberSunday,V:formatWeekNumberISO,w:formatWeekdayNumberSunday,W:formatWeekNumberMonday,x:null,X:null,y:formatYear,Y:formatFullYear,Z:formatZone,"%":formatLiteralPercent},S={a:function formatUTCShortWeekday(t){return c[t.getUTCDay()]},A:function formatUTCWeekday(t){return o[t.getUTCDay()]},b:function formatUTCShortMonth(t){return l[t.getUTCMonth()]},B:function formatUTCMonth(t){return s[t.getUTCMonth()]},c:null,d:formatUTCDayOfMonth,e:formatUTCDayOfMonth,f:formatUTCMicroseconds,H:formatUTCHour24,I:formatUTCHour12,j:formatUTCDayOfYear,L:formatUTCMilliseconds,m:formatUTCMonthNumber,M:formatUTCMinutes,p:function formatUTCPeriod(t){return a[+(t.getUTCHours()>=12)]},Q:formatUnixTimestamp,s:formatUnixTimestampSeconds,S:formatUTCSeconds,u:formatUTCWeekdayNumberMonday,U:formatUTCWeekNumberSunday,V:formatUTCWeekNumberISO,w:formatUTCWeekdayNumberSunday,W:formatUTCWeekNumberMonday,x:null,X:null,y:formatUTCYear,Y:formatUTCFullYear,Z:formatUTCZone,"%":formatLiteralPercent},k={a:function parseShortWeekday(t,e,n){var r=v.exec(e.slice(n));return r?(t.w=m[r[0].toLowerCase()],n+r[0].length):-1},A:function parseWeekday(t,e,n){var r=p.exec(e.slice(n));return r?(t.w=g[r[0].toLowerCase()],n+r[0].length):-1},b:function parseShortMonth(t,e,n){var r=w.exec(e.slice(n));return r?(t.m=T[r[0].toLowerCase()],n+r[0].length):-1},B:function parseMonth(t,e,n){var r=_.exec(e.slice(n));return r?(t.m=b[r[0].toLowerCase()],n+r[0].length):-1},c:function parseLocaleDateTime(t,n,r){return parseSpecifier(t,e,n,r)},d:parseDayOfMonth,e:parseDayOfMonth,f:parseMicroseconds,H:parseHour24,I:parseHour24,j:parseDayOfYear,L:parseMilliseconds,m:parseMonthNumber,M:parseMinutes,p:function parsePeriod(t,e,n){var r=d.exec(e.slice(n));return r?(t.p=h[r[0].toLowerCase()],n+r[0].length):-1},Q:parseUnixTimestamp,s:parseUnixTimestampSeconds,S:parseSeconds,u:parseWeekdayNumberMonday,U:parseWeekNumberSunday,V:parseWeekNumberISO,w:parseWeekdayNumberSunday,W:parseWeekNumberMonday,x:function parseLocaleDate(t,e,r){return parseSpecifier(t,n,e,r)},X:function parseLocaleTime(t,e,n){return parseSpecifier(t,i,e,n)},y:parseYear,Y:parseFullYear,Z:parseZone,"%":parseLiteralPercent};function newFormat(t,e){return function(n){var r,i,a,o=[],c=-1,s=0,l=t.length;for(n instanceof Date||(n=new Date(+n));++c<l;)37===t.charCodeAt(c)&&(o.push(t.slice(s,c)),null!=(i=u[r=t.charAt(++c)])?r=t.charAt(++c):i="e"===r?" ":"0",(a=e[r])&&(r=a(n,i)),o.push(r),s=c+1);return o.push(t.slice(s,c)),o.join("")}}function newParse(t,e){return function(n){var i,a,o=newYear(1900);if(parseSpecifier(o,t,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("p"in o&&(o.H=o.H%12+12*o.p),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(a=(i=utcDate(newYear(o.y))).getUTCDay(),i=a>4||0===a?r.l6.ceil(i):(0,r.l6)(i),i=r.AN.offset(i,7*(o.V-1)),o.y=i.getUTCFullYear(),o.m=i.getUTCMonth(),o.d=i.getUTCDate()+(o.w+6)%7):(a=(i=e(newYear(o.y))).getDay(),i=a>4||0===a?r.Ox.ceil(i):(0,r.Ox)(i),i=r.rr.offset(i,7*(o.V-1)),o.y=i.getFullYear(),o.m=i.getMonth(),o.d=i.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),a="Z"in o?utcDate(newYear(o.y)).getUTCDay():e(newYear(o.y)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(a+5)%7:o.w+7*o.U-(a+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,utcDate(o)):e(o)}}function parseSpecifier(t,e,n,r){for(var i,a,o=0,c=e.length,s=n.length;o<c;){if(r>=s)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=k[i in u?e.charAt(o++):i])||(r=a(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return A.x=newFormat(n,A),A.X=newFormat(i,A),A.c=newFormat(e,A),S.x=newFormat(n,S),S.X=newFormat(i,S),S.c=newFormat(e,S),{format:function(t){var e=newFormat(t+="",A);return e.toString=function(){return t},e},parse:function(t){var e=newParse(t+="",localDate);return e.toString=function(){return t},e},utcFormat:function(t){var e=newFormat(t+="",S);return e.toString=function(){return t},e},utcParse:function(t){var e=newParse(t,utcDate);return e.toString=function(){return t},e}}}var i,a,o,c,s,u={"-":"",_:" ",0:"0"},l=/^\s*\d+/,d=/^%/,h=/[\\^$*+?|[\]().{}]/g;function pad(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(e)+i:i)}function requote(t){return t.replace(h,"\\$&")}function formatRe(t){return new RegExp("^(?:"+t.map(requote).join("|")+")","i")}function formatLookup(t){for(var e={},n=-1,r=t.length;++n<r;)e[t[n].toLowerCase()]=n;return e}function parseWeekdayNumberSunday(t,e,n){var r=l.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function parseWeekdayNumberMonday(t,e,n){var r=l.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function parseWeekNumberSunday(t,e,n){var r=l.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function parseWeekNumberISO(t,e,n){var r=l.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function parseWeekNumberMonday(t,e,n){var r=l.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function parseFullYear(t,e,n){var r=l.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function parseYear(t,e,n){var r=l.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function parseZone(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 parseMonthNumber(t,e,n){var r=l.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function parseDayOfMonth(t,e,n){var r=l.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function parseDayOfYear(t,e,n){var r=l.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function parseHour24(t,e,n){var r=l.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function parseMinutes(t,e,n){var r=l.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function parseSeconds(t,e,n){var r=l.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function parseMilliseconds(t,e,n){var r=l.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function parseMicroseconds(t,e,n){var r=l.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function parseLiteralPercent(t,e,n){var r=d.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function parseUnixTimestamp(t,e,n){var r=l.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function parseUnixTimestampSeconds(t,e,n){var r=l.exec(e.slice(n));return r?(t.Q=1e3*+r[0],n+r[0].length):-1}function formatDayOfMonth(t,e){return pad(t.getDate(),e,2)}function formatHour24(t,e){return pad(t.getHours(),e,2)}function formatHour12(t,e){return pad(t.getHours()%12||12,e,2)}function formatDayOfYear(t,e){return pad(1+r.rr.count((0,r.jB)(t),t),e,3)}function formatMilliseconds(t,e){return pad(t.getMilliseconds(),e,3)}function formatMicroseconds(t,e){return formatMilliseconds(t,e)+"000"}function formatMonthNumber(t,e){return pad(t.getMonth()+1,e,2)}function formatMinutes(t,e){return pad(t.getMinutes(),e,2)}function formatSeconds(t,e){return pad(t.getSeconds(),e,2)}function formatWeekdayNumberMonday(t){var e=t.getDay();return 0===e?7:e}function formatWeekNumberSunday(t,e){return pad(r.Zy.count((0,r.jB)(t),t),e,2)}function formatWeekNumberISO(t,e){var n=t.getDay();return t=n>=4||0===n?(0,r.Ig)(t):r.Ig.ceil(t),pad(r.Ig.count((0,r.jB)(t),t)+(4===(0,r.jB)(t).getDay()),e,2)}function formatWeekdayNumberSunday(t){return t.getDay()}function formatWeekNumberMonday(t,e){return pad(r.Ox.count((0,r.jB)(t),t),e,2)}function formatYear(t,e){return pad(t.getFullYear()%100,e,2)}function formatFullYear(t,e){return pad(t.getFullYear()%1e4,e,4)}function formatZone(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+pad(e/60|0,"0",2)+pad(e%60,"0",2)}function formatUTCDayOfMonth(t,e){return pad(t.getUTCDate(),e,2)}function formatUTCHour24(t,e){return pad(t.getUTCHours(),e,2)}function formatUTCHour12(t,e){return pad(t.getUTCHours()%12||12,e,2)}function formatUTCDayOfYear(t,e){return pad(1+r.AN.count((0,r.ol)(t),t),e,3)}function formatUTCMilliseconds(t,e){return pad(t.getUTCMilliseconds(),e,3)}function formatUTCMicroseconds(t,e){return formatUTCMilliseconds(t,e)+"000"}function formatUTCMonthNumber(t,e){return pad(t.getUTCMonth()+1,e,2)}function formatUTCMinutes(t,e){return pad(t.getUTCMinutes(),e,2)}function formatUTCSeconds(t,e){return pad(t.getUTCSeconds(),e,2)}function formatUTCWeekdayNumberMonday(t){var e=t.getUTCDay();return 0===e?7:e}function formatUTCWeekNumberSunday(t,e){return pad(r.pI.count((0,r.ol)(t),t),e,2)}function formatUTCWeekNumberISO(t,e){var n=t.getUTCDay();return t=n>=4||0===n?(0,r.hB)(t):r.hB.ceil(t),pad(r.hB.count((0,r.ol)(t),t)+(4===(0,r.ol)(t).getUTCDay()),e,2)}function formatUTCWeekdayNumberSunday(t){return t.getUTCDay()}function formatUTCWeekNumberMonday(t,e){return pad(r.l6.count((0,r.ol)(t),t),e,2)}function formatUTCYear(t,e){return pad(t.getUTCFullYear()%100,e,2)}function formatUTCFullYear(t,e){return pad(t.getUTCFullYear()%1e4,e,4)}function formatUTCZone(){return"+0000"}function formatLiteralPercent(){return"%"}function formatUnixTimestamp(t){return+t}function formatUnixTimestampSeconds(t){return Math.floor(+t/1e3)}function defaultLocale(t){return i=formatLocale(t),a=i.format,o=i.parse,c=i.utcFormat,s=i.utcParse,i}defaultLocale({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
2ay","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 p="%Y-%m-%dT%H:%M:%S.%LZ";const g=Date.prototype.toISOString?function formatIsoNative(t){return t.toISOString()}:c(p);const v=+new Date("2000-01-01T00:00:00.000Z")?function parseIsoNative(t){var e=new Date(t);return isNaN(e)?null:e}:s(p)},958:(t,e,n)=>{n.d(e,{rr:()=>k,Nu:()=>C,y2:()=>P,$N:()=>X,WQ:()=>T,w8:()=>A,JZ:()=>newInterval,U8:()=>o,DG:()=>c,Z_:()=>_,Xo:()=>b,Ox:()=>R,ip:()=>I,F0:()=>q,K_:()=>U,Lq:()=>F,X2:()=>j,S1:()=>g,BW:()=>v,Zy:()=>M,WC:()=>D,Ig:()=>O,Pl:()=>B,YD:()=>L,RA:()=>z,EF:()=>E,S3:()=>N,NG:()=>M,EN:()=>D,jB:()=>W,HK:()=>V,AN:()=>et,yw:()=>nt,QQ:()=>st,fz:()=>gt,lM:()=>Q,Xt:()=>J,GK:()=>o,An:()=>c,rz:()=>Z,NH:()=>K,l6:()=>it,$3:()=>ft,me:()=>_t,Ks:()=>yt,g4:()=>ut,Q_:()=>vt,OL:()=>g,z1:()=>v,pI:()=>rt,SU:()=>lt,hB:()=>ct,xj:()=>pt,J1:()=>at,DK:()=>dt,b3:()=>ot,uy:()=>ht,YF:()=>rt,_T:()=>lt,ol:()=>bt,DX:()=>wt});var r=new Date,i=new Date;function newInterval(t,e,n,a){function interval(e){return t(e=new Date(+e)),e}return interval.floor=interval,interval.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},interval.round=function(t){var e=interval(t),n=interval.ceil(t);return t-e<n-t?e:n},interval.offset=function(t,n){return e(t=new Date(+t),null==n?1:Math.floor(n)),t},interval.range=function(n,r,i){var a,o=[];if(n=interval.ceil(n),i=null==i?1:Math.floor(i),!(n<r&&i>0))return o;do{o.push(a=new Date(+n)),e(n,i),t(n)}while(a<n&&n<r);return o},interval.filter=function(n){return newInterval((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&&(interval.count=function(e,a){return r.setTime(+e),i.setTime(+a),t(r),t(i),Math.floor(n(r,i))},interval.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?interval.filter(a?function(e){return a(e)%t==0}:function(e){return interval.count(0,e)%t==0}):interval:null}),interval}var a=newInterval((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));a.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?newInterval((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):a:null};const o=a;var c=a.range,s=1e3,u=6e4,l=36e5,d=864e5,h=6048e5,p=newInterval((function(t){t.setTime(Math.floor(t/s)*s)}),(function(t,e){t.setTime(+t+e*s)}),(function(t,e){return(e-t)/s}),(function(t){return t.getUTCSeconds()}));const g=p;var v=p.range,m=newInterval((function(t){t.setTime(Math.floor(t/u)*u)}),(function(t,e){t.setTime(+t+e*u)}),(function(t,e){return(e-t)/u}),(function(t){return t.getMinutes()}));const _=m;var b=m.range,w=newInterval((function(t){var e=t.getTimezoneOffset()*u%l;e<0&&(e+=l),t.setTime(Math.floor((+t-e)/l)*l+e)}),(function(t,e){t.setTime(+t+e*l)}),(function(t,e){return(e-t)/l}),(function(t){return t.getHours()}));const T=w;var A=w.range,S=newInterval((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*u)/d}),(function(t){return t.getDate()-1}));const k=S;var C=S.range;function weekday(t){return newInterval((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-(e.getTimezoneOffset()-t.getTimezoneOffset())*u)/h}))}var M=weekday(0),R=weekday(1),L=weekday(2),E=weekday(3),O=weekday(4),P=weekday(5),F=weekday(6),D=M.range,I=R.range,z=L.range,N=E.range,B=O.range,X=P.range,j=F.range,Y=newInterval((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()}));const q=Y;var U=Y.range,H=newInterval((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()}));H.every=function(t){return isFinite(t=Math.floor(t))&&t>0?newInterval((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};const W=H;var V=H.range,G=newInterval((function(t){t.setUTCSeconds(0,0)}),(function(t,e){t.setTime(+t+e*u)}),(function(t,e){return(e-t)/u}),(function(t){return t.getUTCMinutes()}));const Z=G;var K=G.range,$=newInterval((function(t){t.setUTCMinutes(0,0,0)}),(function(t,e){t.setTime(+t+e*l)}),(function(t,e){return(e-t)/l}),(function(t){return t.getUTCHours()}));const Q=$;var J=$.range,tt=newInterval((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/d}),(function(t){return t.getUTCDate()-1}
vendor: 10,033 bytes, line 2
2));const et=tt;var nt=tt.range;function utcWeekday(t){return newInterval((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)/h}))}var rt=utcWeekday(0),it=utcWeekday(1),at=utcWeekday(2),ot=utcWeekday(3),ct=utcWeekday(4),st=utcWeekday(5),ut=utcWeekday(6),lt=rt.range,ft=it.range,dt=at.range,ht=ot.range,pt=ct.range,gt=st.range,vt=ut.range,mt=newInterval((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()}));const _t=mt;var yt=mt.range,xt=newInterval((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()}));xt.every=function(t){return isFinite(t=Math.floor(t))&&t>0?newInterval((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};const bt=xt;var wt=xt.range},902:(t,e,n)=>{n.d(e,{FG:()=>src_interval,zO:()=>now,Vs:()=>src_timeout,HT:()=>timer,R8:()=>timerFlush});var r,i,a=0,o=0,c=0,s=1e3,u=0,l=0,d=0,h="object"==typeof performance&&performance.now?performance:Date,p="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function now(){return l||(p(clearNow),l=h.now()+d)}function clearNow(){l=0}function Timer(){this._call=this._time=this._next=null}function timer(t,e,n){var r=new Timer;return r.restart(t,e,n),r}function timerFlush(){now(),++a;for(var t,e=r;e;)(t=l-e._time)>=0&&e._call.call(null,t),e=e._next;--a}function wake(){l=(u=h.now())+d,a=o=0;try{timerFlush()}finally{a=0,function nap(){var t,e,n=r,a=1/0;for(;n;)n._call?(a>n._time&&(a=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:r=e);i=t,sleep(a)}(),l=0}}function poke(){var t=h.now(),e=t-u;e>s&&(d-=e,u=t)}function sleep(t){a||(o&&(o=clearTimeout(o)),t-l>24?(t<1/0&&(o=setTimeout(wake,t-h.now()-d)),c&&(c=clearInterval(c))):(c||(u=h.now(),c=setInterval(poke,s)),a=1,p(wake)))}function src_timeout(t,e,n){var r=new Timer;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r}function src_interval(t,e,n){var r=new Timer,i=e;return null==e?(r.restart(t,e,n),r):(e=+e,n=null==n?now():+n,r.restart((function tick(a){a+=i,r.restart(tick,i+=e,n),t(a)}),e,n),r)}Timer.prototype=timer.prototype={constructor:Timer,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?now():+n)+(null==e?0:+e),this._next||i===this||(i?i._next=this:r=this,i=this),this._call=t,this._time=n,sleep()},stop:function(){this._call&&(this._call=null,this._time=1/0,sleep())}}},605:(t,e,n)=>{n.r(e),n.d(e,{active:()=>active,interrupt:()=>interrupt,transition:()=>transition_transition});var r=n(942),i=n(88),a=n(902),o=(0,i.W)("start","end","cancel","interrupt"),c=[],s=0,u=1,l=2,d=3,h=4,p=5,g=6;function schedule(t,e,n,r,i,v){var m=t.__transition;if(m){if(n in m)return}else t.__transition={};!function create(t,e,n){var r,i=t.__transition;function schedule(t){n.state=u,n.timer.restart(start,n.delay,n.time),n.delay<=t&&start(t-n.delay)}function start(o){var c,s,p,v;if(n.state!==u)return stop();for(c in i)if((v=i[c]).name===n.name){if(v.state===d)return(0,a.Vs)(start);v.state===h?(v.state=g,v.timer.stop(),v.on.call("interrupt",t,t.__data__,v.index,v.group),delete i[c]):+c<e&&(v.state=g,v.timer.stop(),v.on.call("cancel",t,t.__data__,v.index,v.group),delete i[c])}if((0,a.Vs)((function(){n.state===d&&(n.state=h,n.timer.restart(tick,n.delay,n.time),tick(o))})),n.state=l,n.on.call("start",t,t.__data__,n.index,n.group),n.state===l){for(n.state=d,r=new Array(p=n.tween.length),c=0,s=-1;c<p;++c)(v=n.tween[c].value.call(t,t.__data__,n.index,n.group))&&(r[++s]=v);r.length=s+1}}function tick(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(stop),n.state=p,1),a=-1,o=r.length;++a<o;)r[a].call(t,i);n.state===p&&(n.on.call("end",t,t.__data__,n.index,n.group),stop())}function stop(){for(var r in n.state=g,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=(0,a.HT)(schedule,0,n.time)}(t,n,{name:e,index:r,group:i,on:o,tween:c,time:v.time,delay:v.delay,duration:v.duration,ease:v.ease,timer:null,state:s})}function init(t,e){var n=get(t,e);if(n.state>s)throw new Error("too late; already scheduled");return n}function set(t,e){var n=get(t,e);if(n.state>d)throw new Error("too late; already running");return n}function get(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function interrupt(t,e){var n,r,i,a=t.__transition,o=!0;if(a){for(i in e=null==e?null:e+"",a)(n=a[i]).name===e?(r=n.state>l&&n.state<p,n.state=g,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete a[i]):o=!1;o&&delete t.__transition}}var v=n(443);function tweenRemove(t,e){var n,r;return function(){var i=set(this,t),a=i.tween;if(a!==n)for(var o=0,c=(r=n=a).length;o<c;++o)if(r[o].name===e){(r=r.slice()).splice(o,1);break}i.tween=r}}function tweenFunction(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var a=set(this,t),o=a.tween;if(o!==r){i=(r=o).slice();for(var c={name:e,value:n},s=0,u=i.length;s<u;++s)if(i[s].name===e){i[s]=c;break}s===u&&i.push(c)}a.tween=i}}function tweenValue(t,e,n){var r=t._id;return t.each((function(){var t=set(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return get(t,r).value[e]}}var m=n(218),_=n(807),b=n(638),w=n(411);function interpolate(t,e){var n;return("number"==typeof e?_.Z:e instanceof m.color?b.ZP:(n=(0,m.color)(e))?(e=n,b.ZP):w.Z)(t,e)}function attrRemove(t){return function(){this.removeAttribute(t)}}function attrRemoveNS(t){return function(){this.removeAttributeNS(t.space,t.local)}}function attrConstant(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttribute(t);return o===a?null:o===r?i:i=e(r=o,n)}}function attrConstantNS(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttributeNS(t.space,t.local);return o===a?null:o===r?i:i=e(r=o,n)}}function attrFunction(t,e,n){var r,i,a;return function(){var o,c,s=n(this);if(null!=s)return(o=this.getAttribute(t))===(c=s+"")?null:o===r&&c===i?a:(i=c,a=e(r=o,s));this.removeAttribute(t)}}function attrFunctionNS(t,e,n){var r,i,a;return function(){var o,c,s=n(this);if(null!=s)return(o=this.getAttributeNS(t.space,t.local))===(c=s+"")?null:o===r&&c===i?a:(i=c,a=e(r=o,s));this.removeAttributeNS(t.space,t.local)}}function attrTweenNS(t,e){var n,r;function tween(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&function attrInterpolateNS(t,e){return function(n){this.setAttributeNS(t.space,t.local,e(n))}}(t,i)),n}return tween._value=e,tween}function attrTween(t,e){var n,r;function tween(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&function attrInterpolate(t,e){return function(n){this.setAttribute(t,e(n))}}(t,i)),n}return tween._value=e,tween}function delayFunction(t,e){return function(){init(this,t).delay=+e.apply(this,arguments)}}function delayConstant(t,e){return e=+e,function(){init(this,t).delay=e}}function durationFunction(t,e){return function(){set(this,t).duration=+e.apply(this,arguments)}}function durationConstant(t,e){return e=+e,function(){set(this,t).duration=e}}var T=r.selection.prototype.constructor;function styleRemove(t){return function(){this.style.removeProperty(t)}}var A=0;function Transition(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function transition_transition(t){return(0,r.selection)().transition(t)}function newId(){return++A}var S=r.selection.prototype;Transition.prototype=transition_transition.prototype={constructor:Transition,select:function transition_select(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=(0,r.selector)(t));for(var i=this._groups,a=i.length,o=new Array(a),c=0;c<a;++c)for(var s,u,l=i[c],d=l.length,h=o[c]=new Array(d),p=0;p<d;++p)(s=l[p])&&(u=t.call(s,s.__data__,p,l))&&("__data__"in s&&(u.__data__=s.__data__),h[p]=u,schedule(h[p],e,n,p,h,get(s,n)));return new Transition(o,this._parents,e,n)},selectAll:function selectAll(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=(0,r.selectorAll)(t));for(var i=this._groups,a=i.length,o=[],c=[],s=0;s<a;++s)for(var u,l=i[s],d=l.length,h=0;h<d;++h)if(u=l[h]){for(var p,g=t.call(u,u.__data__,h,l),v=get(u,n),m=0,_=g.length;m<_;++m)(p=g[m])&&schedule(p,e,n,m,g,v);o.push(g),c.push(u)}return new Transition(o,c,e,n)},filter:function filter(t){"function"!=typeof t&&(t=(0,r.matcher)(t));for(var e=this._groups,n=e.length,i=new Array(n),a=0;a<n;++a)for(var o,c=e[a],s=c.length,u=i[a]=[],l=0;l<s;++l)(o=c[l])&&t.call(o,o.__data__,l,c)&&u.push(o);return new Transition(i,this._parents,this._name,this._id)},merge:function merge(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),c=0;c<a;++c)for(var s,u=e[c],l=n[c],d=u.length,h=o[c]=new Array(d),p=0;p<d;++p)(s=u[p]||l[p])&&(h[p]=s);for(;c<r;++c)o[c]=e[c];return new Transition(o,this._parents,this._name,this._id)},selection:function selection(){return new T(this._groups,this._parents)},transition:function transition(){for(var t=this._name,e=this._id,n=newId(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o,c=r[a],s=c.length,u=0;u<s;++u)if(o=c[u]){var l=get(o,e);schedule(o,t,n,u,c,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new Transition(r,this._parents,t,n)},call:S.call,nodes:S.nodes,node:S.node,size:S.size,empty:S.empty,each:S.each,on:function on(t,e){var n=this._id;return arguments.length<2?get(this.node(),n).on.on(t):this.each(function onFunction(t,e,n){var r,i,a=function start(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>
2=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?init:set;return function(){var o=a(this,t),c=o.on;c!==r&&(i=(r=c).copy()).on(e,n),o.on=i}}(n,t,e))},attr:function attr(t,e){var n=(0,r.namespace)(t),i="transform"===n?v.w:interpolate;return this.attrTween(t,"function"==typeof e?(n.local?attrFunctionNS:attrFunction)(n,i,tweenValue(this,"attr."+t,e)):null==e?(n.local?attrRemoveNS:attrRemove)(n):(n.local?attrConstantNS:attrConstant)(n,i,e))},attrTween:function transition_attrTween(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var i=(0,r.namespace)(t);return this.tween(n,(i.local?attrTweenNS:attrTween)(i,e))},style:function style(t,e,n){var i="transform"==(t+="")?v.Y:interpolate;return null==e?this.styleTween(t,function styleNull(t,e){var n,i,a;return function(){var o=(0,r.style)(this,t),c=(this.style.removeProperty(t),(0,r.style)(this,t));return o===c?null:o===n&&c===i?a:a=e(n=o,i=c)}}(t,i)).on("end.style."+t,styleRemove(t)):"function"==typeof e?this.styleTween(t,function styleFunction(t,e,n){var i,a,o;return function(){var c=(0,r.style)(this,t),s=n(this),u=s+"";return null==s&&(this.style.removeProperty(t),u=s=(0,r.style)(this,t)),c===u?null:c===i&&u===a?o:(a=u,o=e(i=c,s))}}(t,i,tweenValue(this,"style."+t,e))).each(function styleMaybeRemove(t,e){var n,r,i,a,o="style."+e,c="end."+o;return function(){var s=set(this,t),u=s.on,l=null==s.value[o]?a||(a=styleRemove(e)):void 0;u===n&&i===l||(r=(n=u).copy()).on(c,i=l),s.on=r}}(this._id,t)):this.styleTween(t,function styleConstant(t,e,n){var i,a,o=n+"";return function(){var c=(0,r.style)(this,t);return c===o?null:c===i?a:a=e(i=c,n)}}(t,i,e),n).on("end.style."+t,null)},styleTween:function transition_styleTween(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,function styleTween(t,e,n){var r,i;function tween(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&function styleInterpolate(t,e,n){return function(r){this.style.setProperty(t,e(r),n)}}(t,a,n)),r}return tween._value=e,tween}(t,e,null==n?"":n))},text:function transition_text(t){return this.tween("text","function"==typeof t?function textFunction(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(tweenValue(this,"text",t)):function textConstant(t){return function(){this.textContent=t}}(null==t?"":t+""))},remove:function remove(){return this.on("end.remove",function removeFunction(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function tween(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=get(this.node(),n).tween,a=0,o=i.length;a<o;++a)if((r=i[a]).name===t)return r.value;return null}return this.each((null==e?tweenRemove:tweenFunction)(n,t,e))},delay:function delay(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?delayFunction:delayConstant)(e,t)):get(this.node(),e).delay},duration:function duration(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?durationFunction:durationConstant)(e,t)):get(this.node(),e).duration},ease:function ease(t){var e=this._id;return arguments.length?this.each(function easeConstant(t,e){if("function"!=typeof e)throw new Error;return function(){set(this,t).ease=e}}(e,t)):get(this.node(),e).ease},end:function end(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(a,o){var c={value:o},s={value:function(){0==--i&&a()}};n.each((function(){var n=set(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(c),e._.interrupt.push(c),e._.end.push(s)),n.on=e}))}))}};var k={time:null,delay:0,duration:250,ease:n(79).easeCubicInOut};function inherit(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return k.time=(0,a.zO)(),k;return n}r.selection.prototype.interrupt=function selection_interrupt(t){return this.each((function(){interrupt(this,t)}))},r.selection.prototype.transition=function selection_transition(t){var e,n;t instanceof Transition?(e=t._id,t=t._name):(e=newId(),(n=k).time=(0,a.zO)(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var c,s=r[o],u=s.length,l=0;l<u;++l)(c=s[l])&&schedule(c,t,e,l,s,n||inherit(c,e));return new Transition(r,this._parents,t,e)};var C=[null];function active(t,e){var n,r,i=t.__transition;if(i)for(r in e=null==e?null:e+"",i)if((n=i[r]).state>u&&n.name===e)return new Transition([[t]],C,e,+r);return null}},996:(t,e,n)=>{n.r(e),n.d(e,{zoom:()=>zoom,zoomIdentity:()=>s,zoomTransform:()=>transform});var r=n(88),i=n(749),a=n(238),o=n(942),c=n(605);function constant(t){return function(){return t}}function ZoomEvent(t,e,n){this.target=t,this.type=e,this.transform=n}function Transform(t,e,n){this.k=t,this.x=e,this.y=n}Transform.prototype={constructor:Transform,scale:function(t){return 1===t?this:new Transform(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new Transform(this.k,this.x+this.k*t,this.y+this.k*e)},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 s=new Transform(1,0,0);function transform(t){return t.__zoom||s}function nopropagation(){o.event.stopImmediatePropagation()}function noevent(){o.event.preventDefault(),o.event.stopImmediatePropagation()}function defaultFilter(){return!o.event.button}function defaultExtent(){var t,e,n=this;return n instanceof SVGElement?(t=(n=n.ownerSVGElement||n).width.baseVal.value,e=n.height.baseVal.value):(t=n.clientWidth,e=n.clientHeight),[[0,0],[t,e]]}function defaultTransform(){return this.__zoom||s}function defaultWheelDelta(){return-o.event.deltaY*(o.event.deltaMode?
2120:1)/500}function defaultTouchable(){return"ontouchstart"in this}function defaultConstrain(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],a=t.invertY(e[0][1])-n[0][1],o=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}function zoom(){var t,e,n=defaultFilter,u=defaultExtent,l=defaultConstrain,d=defaultWheelDelta,h=defaultTouchable,p=[0,1/0],g=[[-1/0,-1/0],[1/0,1/0]],v=250,m=a.Z,_=[],b=(0,r.W)("start","zoom","end"),w=500,T=150,A=0;function zoom(t){t.property("__zoom",defaultTransform).on("wheel.zoom",wheeled).on("mousedown.zoom",mousedowned).on("dblclick.zoom",dblclicked).filter(h).on("touchstart.zoom",touchstarted).on("touchmove.zoom",touchmoved).on("touchend.zoom touchcancel.zoom",touchended).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function scale(t,e){return(e=Math.max(p[0],Math.min(p[1],e)))===t.k?t:new Transform(e,t.x,t.y)}function translate(t,e,n){var r=e[0]-n[0]*t.k,i=e[1]-n[1]*t.k;return r===t.x&&i===t.y?t:new Transform(t.k,r,i)}function centroid(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function schedule(t,e,n){t.on("start.zoom",(function(){gesture(this,arguments).start()})).on("interrupt.zoom end.zoom",(function(){gesture(this,arguments).end()})).tween("zoom",(function(){var t=this,r=arguments,i=gesture(t,r),a=u.apply(t,r),o=n||centroid(a),c=Math.max(a[1][0]-a[0][0],a[1][1]-a[0][1]),s=t.__zoom,l="function"==typeof e?e.apply(t,r):e,d=m(s.invert(o).concat(c/s.k),l.invert(o).concat(c/l.k));return function(t){if(1===t)t=l;else{var e=d(t),n=c/e[2];t=new Transform(n,o[0]-e[0]*n,o[1]-e[1]*n)}i.zoom(null,t)}}))}function gesture(t,e){for(var n,r=0,i=_.length;r<i;++r)if((n=_[r]).that===t)return n;return new Gesture(t,e)}function Gesture(t,e){this.that=t,this.args=e,this.index=-1,this.active=0,this.extent=u.apply(t,e)}function wheeled(){if(n.apply(this,arguments)){var t=gesture(this,arguments),e=this.__zoom,r=Math.max(p[0],Math.min(p[1],e.k*Math.pow(2,d.apply(this,arguments)))),i=(0,o.mouse)(this);if(t.wheel)t.mouse[0][0]===i[0]&&t.mouse[0][1]===i[1]||(t.mouse[1]=e.invert(t.mouse[0]=i)),clearTimeout(t.wheel);else{if(e.k===r)return;t.mouse=[i,e.invert(i)],(0,c.interrupt)(this),t.start()}noevent(),t.wheel=setTimeout((function wheelidled(){t.wheel=null,t.end()}),T),t.zoom("mouse",l(translate(scale(e,r),t.mouse[0],t.mouse[1]),t.extent,g))}}function mousedowned(){if(!e&&n.apply(this,arguments)){var t=gesture(this,arguments),r=(0,o.select)(o.event.view).on("mousemove.zoom",(function mousemoved(){if(noevent(),!t.moved){var e=o.event.clientX-s,n=o.event.clientY-u;t.moved=e*e+n*n>A}t.zoom("mouse",l(translate(t.that.__zoom,t.mouse[0]=(0,o.mouse)(t.that),t.mouse[1]),t.extent,g))}),!0).on("mouseup.zoom",(function mouseupped(){r.on("mousemove.zoom mouseup.zoom",null),(0,i.dragEnable)(o.event.view,t.moved),noevent(),t.end()}),!0),a=(0,o.mouse)(this),s=o.event.clientX,u=o.event.clientY;(0,i.dragDisable)(o.event.view),nopropagation(),t.mouse=[a,this.__zoom.invert(a)],(0,c.interrupt)(this),t.start()}}function dblclicked(){if(n.apply(this,arguments)){var t=this.__zoom,e=(0,o.mouse)(this),r=t.invert(e),i=t.k*(o.event.shiftKey?.5:2),a=l(translate(scale(t,i),e,r),u.apply(this,arguments),g);noevent(),v>0?(0,o.select)(this).transition().duration(v).call(schedule,a,e):(0,o.select)(this).call(zoom.transform,a)}}function touchstarted(){if(n.apply(this,arguments)){var e,r,i,a,s=gesture(this,arguments),u=o.event.changedTouches,l=u.length;for(nopropagation(),r=0;r<l;++r)i=u[r],a=[a=(0,o.touch)(this,u,i.identifier),this.__zoom.invert(a),i.identifier],s.touch0?s.touch1||(s.touch1=a):(s.touch0=a,e=!0);if(t&&(t=clearTimeout(t),!s.touch1))return s.end(),void((a=(0,o.select)(this).on("dblclick.zoom"))&&a.apply(this,arguments));e&&(t=setTimeout((function(){t=null}),w),(0,c.interrupt)(this),s.start())}}function touchmoved(){var e,n,r,i,a=gesture(this,arguments),c=o.event.changedTouches,s=c.length;for(noevent(),t&&(t=clearTimeout(t)),e=0;e<s;++e)n=c[e],r=(0,o.touch)(this,c,n.identifier),a.touch0&&a.touch0[2]===n.identifier?a.touch0[0]=r:a.touch1&&a.touch1[2]===n.identifier&&(a.touch1[0]=r);if(n=a.that.__zoom,a.touch1){var u=a.touch0[0],d=a.touch0[1],h=a.touch1[0],p=a.touch1[1],v=(v=h[0]-u[0])*v+(v=h[1]-u[1])*v,m=(m=p[0]-d[0])*m+(m=p[1]-d[1])*m;n=scale(n,Math.sqrt(v/m)),r=[(u[0]+h[0])/2,(u[1]+h[1])/2],i=[(d[
20]+p[0])/2,(d[1]+p[1])/2]}else{if(!a.touch0)return;r=a.touch0[0],i=a.touch0[1]}a.zoom("touch",l(translate(n,r,i),a.extent,g))}function touchended(){var t,n,r=gesture(this,arguments),i=o.event.changedTouches,a=i.length;for(nopropagation(),e&&clearTimeout(e),e=setTimeout((function(){e=null}),w),t=0;t<a;++t)n=i[t],r.touch0&&r.touch0[2]===n.identifier?delete r.touch0:r.touch1&&r.touch1[2]===n.identifier&&delete r.touch1;r.touch1&&!r.touch0&&(r.touch0=r.touch1,delete r.touch1),r.touch0?r.touch0[1]=this.__zoom.invert(r.touch0[0]):r.end()}return zoom.transform=function(t,e){var n=t.selection?t.selection():t;n.property("__zoom",defaultTransform),t!==n?schedule(t,e):n.interrupt().each((function(){gesture(this,arguments).start().zoom(null,"function"==typeof e?e.apply(this,arguments):e).end()}))},zoom.scaleBy=function(t,e){zoom.scaleTo(t,(function(){return this.__zoom.k*("function"==typeof e?e.apply(this,arguments):e)}))},zoom.scaleTo=function(t,e){zoom.transform(t,(function(){var t=u.apply(this,arguments),n=this.__zoom,r=centroid(t),i=n.invert(r),a="function"==typeof e?e.apply(this,arguments):e;return l(translate(scale(n,a),r,i),t,g)}))},zoom.translateBy=function(t,e,n){zoom.transform(t,(function(){return l(this.__zoom.translate("function"==typeof e?e.apply(this,arguments):e,"function"==typeof n?n.apply(this,arguments):n),u.apply(this,arguments),g)}))},zoom.translateTo=function(t,e,n){zoom.transform(t,(function(){var t=u.apply(this,arguments),r=this.__zoom,i=centroid(t);return l(s.translate(i[0],i[1]).scale(r.k).translate("function"==typeof e?-e.apply(this,arguments):-e,"function"==typeof n?-n.apply(this,arguments):-n),t,g)}))},Gesture.prototype={start:function(){return 1==++this.active&&(this.index=_.push(this)-1,this.emit("start")),this},zoom:function(t,e){return this.mouse&&"mouse"!==t&&(this.mouse[1]=e.invert(this.mouse[0])),this.touch0&&"touch"!==t&&(this.touch0[1]=e.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=e.invert(this.touch1[0])),this.that.__zoom=e,this.emit("zoom"),this},end:function(){return 0==--this.active&&(_.splice(this.index,1),this.index=-1,this.emit("end")),this},emit:function(t){(0,o.customEvent)(new ZoomEvent(zoom,t,this.that.__zoom),b.apply,b,[t,this.that,this.args])}},zoom.wheelDelta=function(t){return arguments.length?(d="function"==typeof t?t:constant(+t),zoom):d},zoom.filter=function(t){return arguments.length?(n="function"==typeof t?t:constant(!!t),zoom):n},zoom.touchable=function(t){return arguments.length?(h="function"==typeof t?t:constant(!!t),zoom):h},zoom.extent=function(t){return arguments.length?(u="function"==typeof t?t:constant([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),zoom):u},zoom.scaleExtent=function(t){return arguments.length?(p[0]=+t[0],p[1]=+t[1],zoom):[p[0],p[1]]},zoom.translateExtent=function(t){return arguments.length?(g[0][0]=+t[0][0],g[1][0]=+t[1][0],g[0][1]=+t[0][1],g[1][1]=+t[1][1],zoom):[[g[0][0],g[0][1]],[g[1][0],g[1][1]]]},zoom.constrain=function(t){return arguments.length?(l=t,zoom):l},zoom.duration=function(t){return arguments.length?(v=+t,zoom):v},zoom.interpolate=function(t){return arguments.length?(m=t,zoom):m},zoom.on=function(){var t=b.on.apply(b,arguments);return t===b?zoom:t},zoom.clickDistance=function(t){return arguments.length?(A=(t=+t)*t,zoom):Math.sqrt(A)},zoom}transform.prototype=Transform.prototype},721:(t,e,n)=>{n.r(e),n.d(e,{active:()=>zr.active,arc:()=>Fr.arc,area:()=>Fr.area,areaRadial:()=>Fr.areaRadial,ascending:()=>i.j2,axisBottom:()=>a.axisBottom,axisLeft:()=>a.axisLeft,axisRight:()=>a.axisRight,axisTop:()=>a.axisTop,bisect:()=>i.b4,bisectLeft:()=>i.Nw,bisectRight:()=>i.ml,bisector:()=>i.YF,blob:()=>blob,brush:()=>o.brush,brushSelection:()=>o.brushSelection,brushX:()=>o.brushX,brushY:()=>o.brushY,buffer:()=>buffer,chord:()=>chord,clientPoint:()=>Pr.clientPoint,cluster:()=>cluster,color:()=>m.color,contourDensity:()=>density,contours:()=>contours,create:()=>Pr.create,creator:()=>Pr.creator,cross:()=>i.kC,csv:()=>k,csvFormat:()=>A.csvFormat,csvFormatRows:()=>A.csvFormatRows,csvParse:()=>A.csvParse,csvParseRows:()=>A.csvParseRows,cubehelix:()=>m.cubehelix,curveBasis:()=>Fr.curveBasis,curveBasisClosed:()=>Fr.curveBasisClosed,curveBasisOpen:()=>Fr.curveBasisOpen,curveBundle:()=>Fr.curveBundle,curveCardinal:()=>Fr.curveCardinal,curveCardinalClosed:()=>Fr.curveCardinalClosed,curveCardinalOpen:()=>Fr.curveCardinalOpen,curveCatmullRom:()=>Fr.curveCatmullRom,curveCatmullRomClosed:()=>Fr.curveCatmullRomClosed,curveCatmullRomOpen:()=>Fr.curveCatmullRomOpen,curveLinear:()=>Fr.curveLinear,curveLinearClosed:()=>Fr.curveLinearClosed,curveMonotoneX:()=>Fr.curveMonotoneX,curveMonotoneY:()=>Fr.curveMonotoneY,curveNatural:()=>Fr.curveNatural,curveStep:()=>Fr.curveStep,curveStepAfter:()=>Fr.curveStepAfter,curveStepBefore:()=>Fr.curveStepBefore,customEvent:()=>Pr.customEvent,descending:()=>i.$1,deviation:()=>i.P3,dispatch:()=>w.W,drag:()=>T.drag,dragDisable:()=>T.dragDisable,dragEnable:()=>T.dragEnable,dsv:()=>dsv,dsvFormat:()=>A.dsvFormat,easeBack:()=>S.easeBack,easeBackIn:()=>S.easeBackIn,easeBackInOut:()=>S.easeBackInOut,easeBackOut:()=>S.easeBackOut,easeBounce:()=>S.easeBounce,easeBounceIn:()=>S.easeBounceIn,easeBounceInOut:()=>S.easeBounceInOut,easeBounceOut:()=>S.easeBounceOut,easeCircle:()=>
2S.easeCircle,easeCircleIn:()=>S.easeCircleIn,easeCircleInOut:()=>S.easeCircleInOut,easeCircleOut:()=>S.easeCircleOut,easeCubic:()=>S.easeCubic,easeCubicIn:()=>S.easeCubicIn,easeCubicInOut:()=>S.easeCubicInOut,easeCubicOut:()=>S.easeCubicOut,easeElastic:()=>S.easeElastic,easeElasticIn:()=>S.easeElasticIn,easeElasticInOut:()=>S.easeElasticInOut,easeElasticOut:()=>S.easeElasticOut,easeExp:()=>S.easeExp,easeExpIn:()=>S.easeExpIn,easeExpInOut:()=>S.easeExpInOut,easeExpOut:()=>S.easeExpOut,easeLinear:()=>S.easeLinear,easePoly:()=>S.easePoly,easePolyIn:()=>S.easePolyIn,easePolyInOut:()=>S.easePolyInOut,easePolyOut:()=>S.easePolyOut,easeQuad:()=>S.easeQuad,easeQuadIn:()=>S.easeQuadIn,easeQuadInOut:()=>S.easeQuadInOut,easeQuadOut:()=>S.easeQuadOut,easeSin:()=>S.easeSin,easeSinIn:()=>S.easeSinIn,easeSinInOut:()=>S.easeSinInOut,easeSinOut:()=>S.easeSinOut,entries:()=>v.qh,event:()=>Pr.event,extent:()=>i.We,forceCenter:()=>center,forceCollide:()=>collide,forceLink:()=>src_link,forceManyBody:()=>manyBody,forceRadial:()=>radial,forceSimulation:()=>simulation,forceX:()=>src_x,forceY:()=>src_y,format:()=>D.WU,formatDefaultLocale:()=>D.Zq,formatLocale:()=>D.FF,formatPrefix:()=>D.jH,formatSpecifier:()=>D.YQ,geoAlbers:()=>albers,geoAlbersUsa:()=>albersUsa,geoArea:()=>d3_geo_src_area,geoAzimuthalEqualArea:()=>azimuthalEqualArea,geoAzimuthalEqualAreaRaw:()=>je,geoAzimuthalEquidistant:()=>azimuthalEquidistant,geoAzimuthalEquidistantRaw:()=>Ye,geoBounds:()=>bounds,geoCentroid:()=>centroid,geoCircle:()=>circle,geoClipAntimeridian:()=>qt,geoClipCircle:()=>clip_circle,geoClipExtent:()=>clip_extent,geoClipRectangle:()=>clipRectangle,geoConicConformal:()=>conicConformal,geoConicConformalRaw:()=>conicConformalRaw,geoConicEqualArea:()=>conicEqualArea,geoConicEqualAreaRaw:()=>conicEqualAreaRaw,geoConicEquidistant:()=>conicEquidistant,geoConicEquidistantRaw:()=>conicEquidistantRaw,geoContains:()=>src_contains,geoDistance:()=>distance,geoEqualEarth:()=>equalEarth,geoEqualEarthRaw:()=>equalEarthRaw,geoEquirectangular:()=>equirectangular,geoEquirectangularRaw:()=>equirectangularRaw,geoGnomonic:()=>gnomonic,geoGnomonicRaw:()=>gnomonicRaw,geoGraticule:()=>graticule,geoGraticule10:()=>graticule10,geoIdentity:()=>projection_identity,geoInterpolate:()=>interpolate,geoLength:()=>src_length,geoMercator:()=>mercator,geoMercatorRaw:()=>mercatorRaw,geoNaturalEarth1:()=>naturalEarth1,geoNaturalEarth1Raw:()=>naturalEarth1Raw,geoOrthographic:()=>orthographic,geoOrthographicRaw:()=>orthographicRaw,geoPath:()=>path,geoProjection:()=>projection,geoProjectionMutator:()=>projectionMutator,geoRotation:()=>rotation,geoStereographic:()=>stereographic,geoStereographicRaw:()=>stereographicRaw,geoStream:()=>stream,geoTransform:()=>transform,geoTransverseMercator:()=>transverseMercator,geoTransverseMercatorRaw:()=>transverseMercatorRaw,gray:()=>m.gray,hcl:()=>m.hcl,hierarchy:()=>hierarchy,histogram:()=>i.KX,hsl:()=>m.hsl,html:()=>R,image:()=>src_image,interpolate:()=>en.interpolate,interpolateArray:()=>en.interpolateArray,interpolateBasis:()=>en.interpolateBasis,interpolateBasisClosed:()=>en.interpolateBasisClosed,interpolateBlues:()=>lr,interpolateBrBG:()=>wn,interpolateBuGn:()=>Xn,interpolateBuPu:()=>Yn,interpolateCool:()=>Ar,interpolateCubehelix:()=>en.interpolateCubehelix,interpolateCubehelixDefault:()=>wr,interpolateCubehelixLong:()=>en.interpolateCubehelixLong,interpolateDate:()=>en.interpolateDate,interpolateDiscrete:()=>en.interpolateDiscrete,interpolateGnBu:()=>Un,interpolateGreens:()=>dr,interpolateGreys:()=>pr,interpolateHcl:()=>en.interpolateHcl,interpolateHclLong:()=>en.interpolateHclLong,interpolateHsl:()=>en.interpolateHsl,interpolateHslLong:()=>en.interpolateHslLong,interpolateHue:()=>en.interpolateHue,interpolateInferno:()=>Er,interpolateLab:()=>en.interpolateLab,interpolateMagma:()=>Lr,interpolateNumber:()=>en.interpolateNumber,interpolateNumberArray:()=>en.interpolateNumberArray,interpolateObject:()=>en.interpolateObject,interpolateOrRd:()=>Wn,interpolateOranges:()=>xr,interpolatePRGn:()=>An,interpolatePiYG:()=>kn,interpolatePlasma:()=>Or,interpolatePuBu:()=>Kn,interpolatePuBuGn:()=>Gn,interpolatePuOr:()=>Mn,interpolatePuRd:()=>Qn,interpolatePurples:()=>vr,interpolateRainbow:()=>rainbow,interpolateRdBu:()=>Ln,interpolateRdGy:()=>On,interpolateRdPu:()=>tr,interpolateRdYlBu:()=>Fn,interpolateRdYlGn:()=>In,interpolateReds:()=>_r,interpolateRgb:()=>en.interpolateRgb,interpolateRgbBasis:()=>en.interpolateRgbBasis,interpolateRgbBasisClosed:()=>en.interpolateRgbBasisClosed,interpolateRound:()=>en.interpolateRound,interpolateSinebow:()=>sinebow,interpolateSpectral:()=>Nn,interpolateString:()=>en.interpolateString,interpolateTransformCss:()=>en.interpolateTransformCss,interpolateTransformSvg:()=>en.interpolateTransformSvg,interpolateViridis:()=>Rr,interpolateWarm:()=>Tr,interpolateYlGn:()=>ir,interpolateYlGnBu:()=>nr,interpolateYlOrBr:()=>or,interpolateYlOrRd:()=>sr,interpolateZoom:()=>en.interpolateZoom,interrupt:()=>zr.interrupt,interval:()=>O.FG,isoFormat:()=>Ir.isoFormat,isoParse:()=>Ir.isoParse,json:()=>json,keys:()=>v.XP,lab:()=>m.lab,lch:()=>m.lch,line:()=>Fr.line,lineRadial:()=>Fr.lineRadial,linkHorizontal:()=>Fr.linkHorizontal,linkRadial:()=>Fr.linkRadial,linkVertical:()=>Fr.linkVertical,local:()=>Pr.local,map:()=>v.UI,matcher:()=>Pr.matcher,max:()=>i.Fp,mean:()=>i.J6,median:()=>i.C2,merge:()=>i.TS,min:()=>i.VV,mouse:()=>Pr.mouse,namespace:()=>Pr.namespace,namespaces:()=>Pr.namespaces,nest:()=>v.b1,now:()=>O.zO,pack:()=>pack,packEnclose:()=>enclose,packSiblings:()=>siblings,pairs:()=>i.X,partition:()=>partition,path:()=>g.E,permute:()=>i.FO,pie:()=>Fr.pie,piecewise:()=>en.piecewise,pointRadial:()=>Fr.pointRadial,polygonArea:()=>d3_polygon_src_area,polygonCentroid:()=>src_centroid,polygonContains:()=>d3_polygon_src_contains,polygonHull:()=>hull,polygonLength:()=>d3_polygon_src_length,precisionFixed:()=>D.zB,precisionPrefix:()=>D.S5,precisionRound:()=>D.F0,quadtree:()=>quadtree,quantile:()=>
2i.VR,quantize:()=>en.quantize,radialArea:()=>Fr.radialArea,radialLine:()=>Fr.radialLine,randomBates:()=>sn,randomExponential:()=>un,randomIrwinHall:()=>cn,randomLogNormal:()=>an,randomNormal:()=>rn,randomUniform:()=>nn,range:()=>i.w6,rgb:()=>m.rgb,ribbon:()=>ribbon,scaleBand:()=>ln.scaleBand,scaleDiverging:()=>ln.scaleDiverging,scaleDivergingLog:()=>ln.scaleDivergingLog,scaleDivergingPow:()=>ln.scaleDivergingPow,scaleDivergingSqrt:()=>ln.scaleDivergingSqrt,scaleDivergingSymlog:()=>ln.scaleDivergingSymlog,scaleIdentity:()=>ln.scaleIdentity,scaleImplicit:()=>ln.scaleImplicit,scaleLinear:()=>ln.scaleLinear,scaleLog:()=>ln.scaleLog,scaleOrdinal:()=>ln.scaleOrdinal,scalePoint:()=>ln.scalePoint,scalePow:()=>ln.scalePow,scaleQuantile:()=>ln.scaleQuantile,scaleQuantize:()=>ln.scaleQuantize,scaleSequential:()=>ln.scaleSequential,scaleSequentialLog:()=>ln.scaleSequentialLog,scaleSequentialPow:()=>ln.scaleSequentialPow,scaleSequentialQuantile:()=>ln.scaleSequentialQuantile,scaleSequentialSqrt:()=>ln.scaleSequentialSqrt,scaleSequentialSymlog:()=>ln.scaleSequentialSymlog,scaleSqrt:()=>ln.scaleSqrt,scaleSymlog:()=>ln.scaleSymlog,scaleThreshold:()=>ln.scaleThreshold,scaleTime:()=>ln.scaleTime,scaleUtc:()=>ln.scaleUtc,scan:()=>i.Rp,schemeAccent:()=>dn,schemeBlues:()=>ur,schemeBrBG:()=>bn,schemeBuGn:()=>Bn,schemeBuPu:()=>jn,schemeCategory10:()=>fn,schemeDark2:()=>hn,schemeGnBu:()=>qn,schemeGreens:()=>fr,schemeGreys:()=>hr,schemeOrRd:()=>Hn,schemeOranges:()=>yr,schemePRGn:()=>Tn,schemePaired:()=>pn,schemePastel1:()=>gn,schemePastel2:()=>vn,schemePiYG:()=>Sn,schemePuBu:()=>Zn,schemePuBuGn:()=>Vn,schemePuOr:()=>Cn,schemePuRd:()=>$n,schemePurples:()=>gr,schemeRdBu:()=>Rn,schemeRdGy:()=>En,schemeRdPu:()=>Jn,schemeRdYlBu:()=>Pn,schemeRdYlGn:()=>Dn,schemeReds:()=>mr,schemeSet1:()=>mn,schemeSet2:()=>_n,schemeSet3:()=>yn,schemeSpectral:()=>zn,schemeYlGn:()=>rr,schemeYlGnBu:()=>er,schemeYlOrBr:()=>ar,schemeYlOrRd:()=>cr,select:()=>Pr.select,selectAll:()=>Pr.selectAll,selection:()=>Pr.selection,selector:()=>Pr.selector,selectorAll:()=>Pr.selectorAll,set:()=>v.t8,shuffle:()=>i.TV,stack:()=>Fr.stack,stackOffsetDiverging:()=>Fr.stackOffsetDiverging,stackOffsetExpand:()=>Fr.stackOffsetExpand,stackOffsetNone:()=>Fr.stackOffsetNone,stackOffsetSilhouette:()=>Fr.stackOffsetSilhouette,stackOffsetWiggle:()=>Fr.stackOffsetWiggle,stackOrderAppearance:()=>Fr.stackOrderAppearance,stackOrderAscending:()=>Fr.stackOrderAscending,stackOrderDescending:()=>Fr.stackOrderDescending,stackOrderInsideOut:()=>Fr.stackOrderInsideOut,stackOrderNone:()=>Fr.stackOrderNone,stackOrderReverse:()=>Fr.stackOrderReverse,stratify:()=>stratify,style:()=>Pr.style,sum:()=>i.Sm,svg:()=>L,symbol:()=>Fr.symbol,symbolCircle:()=>Fr.symbolCircle,symbolCross:()=>Fr.symbolCross,symbolDiamond:()=>Fr.symbolDiamond,symbolSquare:()=>Fr.symbolSquare,symbolStar:()=>Fr.symbolStar,symbolTriangle:()=>Fr.symbolTriangle,symbolWye:()=>Fr.symbolWye,symbols:()=>Fr.symbols,text:()=>src_text,thresholdFreedmanDiaconis:()=>i.o6,thresholdScott:()=>i.FA,thresholdSturges:()=>i._X,tickFormat:()=>ln.tickFormat,tickIncrement:()=>i.G9,tickStep:()=>i.ly,ticks:()=>i.sd,timeDay:()=>Dr.rr,timeDays:()=>Dr.Nu,timeFormat:()=>Ir.timeFormat,timeFormatDefaultLocale:()=>Ir.timeFormatDefaultLocale,timeFormatLocale:()=>Ir.timeFormatLocale,timeFriday:()=>Dr.y2,timeFridays:()=>Dr.$N,timeHour:()=>Dr.WQ,timeHours:()=>Dr.w8,timeInterval:()=>Dr.JZ,timeMillisecond:()=>Dr.U8,timeMilliseconds:()=>Dr.DG,timeMinute:()=>Dr.Z_,timeMinutes:()=>Dr.Xo,timeMonday:()=>Dr.Ox,timeMondays:()=>Dr.ip,timeMonth:()=>Dr.F0,timeMonths:()=>Dr.K_,timeParse:()=>Ir.timeParse,timeSaturday:()=>Dr.Lq,timeSaturdays:()=>Dr.X2,timeSecond:()=>Dr.S1,timeSeconds:()=>Dr.BW,timeSunday:()=>Dr.Zy,timeSundays:()=>Dr.WC,timeThursday:()=>Dr.Ig,timeThursdays:()=>Dr.Pl,timeTuesday:()=>Dr.YD,timeTuesdays:()=>Dr.RA,timeWednesday:()=>Dr.EF,timeWednesdays:()=>Dr.S3,timeWeek:()=>Dr.NG,timeWeeks:()=>Dr.EN,timeYear:()=>Dr.jB,timeYears:()=>Dr.HK,timeout:()=>O.Vs,timer:()=>O.HT,timerFlush:()=>O.R8,touch:()=>Pr.touch,touches:()=>Pr.touches,transition:()=>zr.transition,transpose:()=>i.p4,tree:()=>tree,treemap:()=>treemap,treemapBinary:()=>binary,treemapDice:()=>dice,treemapResquarify:()=>tn,treemapSlice:()=>treemap_slice,treemapSliceDice:()=>sliceDice,treemapSquarify:()=>Je,tsv:()=>C,tsvFormat:()=>A.tsvFormat,tsvFormatRows:()=>A.tsvFormatRows,tsvParse:()=>A.tsvParse,tsvParseRows:()=>A.tsvParseRows,utcDay:()=>
2Dr.AN,utcDays:()=>Dr.yw,utcFormat:()=>Ir.utcFormat,utcFriday:()=>Dr.QQ,utcFridays:()=>Dr.fz,utcHour:()=>Dr.lM,utcHours:()=>Dr.Xt,utcMillisecond:()=>Dr.GK,utcMilliseconds:()=>Dr.An,utcMinute:()=>Dr.rz,utcMinutes:()=>Dr.NH,utcMonday:()=>Dr.l6,utcMondays:()=>Dr.$3,utcMonth:()=>Dr.me,utcMonths:()=>Dr.Ks,utcParse:()=>Ir.utcParse,utcSaturday:()=>Dr.g4,utcSaturdays:()=>Dr.Q_,utcSecond:()=>Dr.OL,utcSeconds:()=>Dr.z1,utcSunday:()=>Dr.pI,utcSundays:()=>Dr.SU,utcThursday:()=>Dr.hB,utcThursdays:()=>Dr.xj,utcTuesday:()=>Dr.J1,utcTuesdays:()=>Dr.DK,utcWednesday:()=>Dr.b3,utcWednesdays:()=>Dr.uy,utcWeek:()=>Dr.YF,utcWeeks:()=>Dr._T,utcYear:()=>Dr.ol,utcYears:()=>Dr.DX,values:()=>v.VO,variance:()=>i.CA,version:()=>r,voronoi:()=>voronoi,window:()=>Pr.window,xml:()=>M,zip:()=>i.$R,zoom:()=>Gr.zoom,zoomIdentity:()=>Gr.zoomIdentity,zoomTransform:()=>Gr.zoomTransform});var r="5.9.3",i=n(309),a=n(555),o=n(11),c=Math.cos,s=Math.sin,u=Math.PI,l=u/2,d=2*u,h=Math.max;function chord(){var t=0,e=null,n=null,r=null;function chord(a){var o,c,s,u,l,p,g=a.length,v=[],m=(0,i.w6)(g),_=[],b=[],w=b.groups=new Array(g),T=new Array(g*g);for(o=0,l=-1;++l<g;){for(c=0,p=-1;++p<g;)c+=a[l][p];v.push(c),_.push((0,i.w6)(g)),o+=c}for(e&&m.sort((function(t,n){return e(v[t],v[n])})),n&&_.forEach((function(t,e){t.sort((function(t,r){return n(a[e][t],a[e][r])}))})),u=(o=h(0,d-t*g)/o)?t:d/g,c=0,l=-1;++l<g;){for(s=c,p=-1;++p<g;){var A=m[l],S=_[A][p],k=a[A][S],C=c,M=c+=k*o;T[S*g+A]={index:A,subindex:S,startAngle:C,endAngle:M,value:k}}w[A]={index:A,startAngle:s,endAngle:c,value:v[A]},c+=u}for(l=-1;++l<g;)for(p=l-1;++p<g;){var R=T[p*g+l],L=T[l*g+p];(R.value||L.value)&&b.push(R.value<L.value?{source:L,target:R}:{source:R,target:L})}return r?b.sort(r):b}return chord.padAngle=function(e){return arguments.length?(t=h(0,e),chord):t},chord.sortGroups=function(t){return arguments.length?(e=t,chord):e},chord.sortSubgroups=function(t){return arguments.length?(n=t,chord):n},chord.sortChords=function(t){return arguments.length?(null==t?r=null:(r=function compareValue(t){return function(e,n){return t(e.source.value+e.target.value,n.source.value+n.target.value)}}(t))._=t,chord):r&&r._},chord}var p=Array.prototype.slice;function constant(t){return function(){return t}}var g=n(393);function defaultSource(t){return t.source}function defaultTarget(t){return t.target}function defaultRadius(t){return t.radius}function defaultStartAngle(t){return t.startAngle}function defaultEndAngle(t){return t.endAngle}function ribbon(){var t=defaultSource,e=defaultTarget,n=defaultRadius,r=defaultStartAngle,i=defaultEndAngle,a=null;function ribbon(){var o,u=p.call(arguments),d=t.apply(this,u),h=e.apply(this,u),v=+n.apply(this,(u[0]=d,u)),m=r.apply(this,u)-l,_=i.apply(this,u)-l,b=v*c(m),w=v*s(m),T=+n.apply(this,(u[0]=h,u)),A=r.apply(this,u)-l,S=i.apply(this,u)-l;if(a||(a=o=(0,g.E)()),a.moveTo(b,w),a.arc(0,0,v,m,_),m===A&&_===S||(a.quadraticCurveTo(0,0,T*c(A),T*s(A)),a.arc(0,0,T,A,S)),a.quadraticCurveTo(0,0,b,w),a.closePath(),o)return a=null,o+""||null}return ribbon.radius=function(t){return arguments.length?(n="function"==typeof t?t:constant(+t),ribbon):n},ribbon.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:constant(+t),ribbon):r},ribbon.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:constant(+t),ribbon):i},ribbon.source=function(e){return arguments.length?(t=e,ribbon):t},ribbon.target=function(t){return arguments.length?(e=t,ribbon):e},ribbon.context=function(t){return arguments.length?(a=null==t?null:t,ribbon):a},ribbon}var v=n(457),m=n(218),_=Array.prototype.slice;function ascending(t,e){return t-e}function src_constant(t){return function(){return t}}function contains(t,e){for(var n,r=-1,i=e.length;++r<i;)if(n=ringContains(t,e[r]))return n;return 0}function ringContains(t,e){for(var n=e[0],r=e[1],i=-1,a=0,o=t.length,c=o-1;a<o;c=a++){var s=t[a],u=s[0],l=s[1],d=t[c],h=d[0],p=d[1];if(segmentContains(s,d,e))return 0;l>r!=p>r&&n<(h-u)*(r-l)/(p-l)+u&&(i=-i)}return i}function segmentContains(t,e,n){var r;return function collinear(t,e,n){return(e[0]-t[0])*(n[1]-t[1])==(n[0]-t[0])*(e[1]-t[1])}(t,e,n)&&function within(t,e,n){return t<=e&&e<=n||n<=e&&e<=t}(t[r=+(t[0]===e[0])],n[r],e[r])}function noop(){}var b=[[],[[[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]]],[]];function contours(){var t=1,e=1,n=i._X,r=smoothLinear;function contours(t){var e=n(t);if(Array.isArray(e))e=e.slice().sort(ascending);else{var r=(0,i.We)(t),a=r[0],o=r[1];e=(0,i.ly)(a,o,e),e=(0,i.w6)(Math.floor(a/e)*e,Math.floor(o/e)*e,e)}return e.map((function(e){return contour(t,e)}))}function contour(n,i){var a=[],o=[];return function isorings(n,r,i){var a,o,c,s,u,l,d=new Array,h=new Array;a=o=-1,s=n[0]>
2=r,b[s<<1].forEach(stitch);for(;++a<t-1;)c=s,s=n[a+1]>=r,b[c|s<<1].forEach(stitch);b[s<<0].forEach(stitch);for(;++o<e-1;){for(a=-1,s=n[o*t+t]>=r,u=n[o*t]>=r,b[s<<1|u<<2].forEach(stitch);++a<t-1;)c=s,s=n[o*t+t+a+1]>=r,l=u,u=n[o*t+a+1]>=r,b[c|s<<1|u<<2|l<<3].forEach(stitch);b[s|u<<3].forEach(stitch)}a=-1,u=n[o*t]>=r,b[u<<2].forEach(stitch);for(;++a<t-1;)l=u,u=n[o*t+a+1]>=r,b[u<<2|l<<3].forEach(stitch);function stitch(t){var e,n,r=[t[0][0]+a,t[0][1]+o],c=[t[1][0]+a,t[1][1]+o],s=index(r),u=index(c);(e=h[s])?(n=d[u])?(delete h[e.end],delete d[n.start],e===n?(e.ring.push(c),i(e.ring)):d[e.start]=h[n.end]={start:e.start,end:n.end,ring:e.ring.concat(n.ring)}):(delete h[e.end],e.ring.push(c),h[e.end=u]=e):(e=d[u])?(n=h[s])?(delete d[e.start],delete h[n.end],e===n?(e.ring.push(c),i(e.ring)):d[n.start]=h[e.end]={start:n.start,end:e.end,ring:n.ring.concat(e.ring)}):(delete d[e.start],e.ring.unshift(r),d[e.start=s]=e):d[s]=h[u]={start:s,end:u,ring:[r,c]}}b[u<<3].forEach(stitch)}(n,i,(function(t){r(t,n,i),function src_area(t){for(var e=0,n=t.length,r=t[n-1][1]*t[0][0]-t[n-1][0]*t[0][1];++e<n;)r+=t[e-1][1]*t[e][0]-t[e-1][0]*t[e][1];return r}(t)>0?a.push([t]):o.push(t)})),o.forEach((function(t){for(var e,n=0,r=a.length;n<r;++n)if(-1!==contains((e=a[n])[0],t))return void e.push(t)})),{type:"MultiPolygon",value:i,coordinates:a}}function index(e){return 2*e[0]+e[1]*(t+1)*4}function smoothLinear(n,r,i){n.forEach((function(n){var a,o=n[0],c=n[1],s=0|o,u=0|c,l=r[u*t+s];o>0&&o<t&&s===o&&(a=r[u*t+s-1],n[0]=o+(i-a)/(l-a)-.5),c>0&&c<e&&u===c&&(a=r[(u-1)*t+s],n[1]=c+(i-a)/(l-a)-.5)}))}return contours.contour=contour,contours.size=function(n){if(!arguments.length)return[t,e];var r=Math.ceil(n[0]),i=Math.ceil(n[1]);if(!(r>0&&i>0))throw new Error("invalid size");return t=r,e=i,contours},contours.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?src_constant(_.call(t)):src_constant(t),contours):n},contours.smooth=function(t){return arguments.length?(r=t?smoothLinear:noop,contours):r===smoothLinear},contours}function blurX(t,e,n){for(var r=t.width,i=t.height,a=1+(n<<1),o=0;o<i;++o)for(var c=0,s=0;c<r+n;++c)c<r&&(s+=t.data[c+o*r]),c>=n&&(c>=a&&(s-=t.data[c-a+o*r]),e.data[c-n+o*r]=s/Math.min(c+1,r-1+a-c,a))}function blurY(t,e,n){for(var r=t.width,i=t.height,a=1+(n<<1),o=0;o<r;++o)for(var c=0,s=0;c<i+n;++c)c<i&&(s+=t.data[o+c*r]),c>=n&&(c>=a&&(s-=t.data[o+(c-a)*r]),e.data[o+(c-n)*r]=s/Math.min(c+1,i-1+a-c,a))}function defaultX(t){return t[0]}function defaultY(t){return t[1]}function defaultWeight(){return 1}function density(){var t=defaultX,e=defaultY,n=defaultWeight,r=960,a=500,o=20,c=2,s=3*o,u=r+2*s>>c,l=a+2*s>>c,d=src_constant(20);function density(r){var a=new Float32Array(u*l),h=new Float32Array(u*l);r.forEach((function(r,i,o){var d=+t(r,i,o)+s>>c,h=+e(r,i,o)+s>>c,p=+n(r,i,o);d>=0&&d<u&&h>=0&&h<l&&(a[d+h*u]+=p)}
2)),blurX({width:u,height:l,data:a},{width:u,height:l,data:h},o>>c),blurY({width:u,height:l,data:h},{width:u,height:l,data:a},o>>c),blurX({width:u,height:l,data:a},{width:u,height:l,data:h},o>>c),blurY({width:u,height:l,data:h},{width:u,height:l,data:a},o>>c),blurX({width:u,height:l,data:a},{width:u,height:l,data:h},o>>c),blurY({width:u,height:l,data:h},{width:u,height:l,data:a},o>>c);var p=d(a);if(!Array.isArray(p)){var g=(0,i.Fp)(a);p=(0,i.ly)(0,g,p),(p=(0,i.w6)(0,Math.floor(g/p)*p,p)).shift()}return contours().thresholds(p).size([u,l])(a).map(transform)}function transform(t){return t.value*=Math.pow(2,-2*c),t.coordinates.forEach(transformPolygon),t}function transformPolygon(t){t.forEach(transformRing)}function transformRing(t){t.forEach(transformPoint)}function transformPoint(t){t[0]=t[0]*Math.pow(2,c)-s,t[1]=t[1]*Math.pow(2,c)-s}function resize(){return u=r+2*(s=3*o)>>c,l=a+2*s>>c,density}return density.x=function(e){return arguments.length?(t="function"==typeof e?e:src_constant(+e),density):t},density.y=function(t){return arguments.length?(e="function"==typeof t?t:src_constant(+t),density):e},density.weight=function(t){return arguments.length?(n="function"==typeof t?t:src_constant(+t),density):n},density.size=function(t){if(!arguments.length)return[r,a];var e=Math.ceil(t[0]),n=Math.ceil(t[1]);if(!(e>=0||e>=0))throw new Error("invalid size");return r=e,a=n,resize()},density.cellSize=function(t){if(!arguments.length)return 1<<c;if(!((t=+t)>=1))throw new Error("invalid cell size");return c=Math.floor(Math.log(t)/Math.LN2),resize()},density.thresholds=function(t){return arguments.length?(d="function"==typeof t?t:Array.isArray(t)?src_constant(_.call(t)):src_constant(t),density):d},density.bandwidth=function(t){if(!arguments.length)return Math.sqrt(o*(o+1));if(!((t=+t)>=0))throw new Error("invalid bandwidth");return o=Math.round((Math.sqrt(4*t*t+1)-1)/2),resize()},density}var w=n(88),T=n(749),A=n(415),S=n(79);function responseBlob(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.blob()}function blob(t,e){return fetch(t,e).then(responseBlob)}function responseArrayBuffer(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.arrayBuffer()}function buffer(t,e){return fetch(t,e).then(responseArrayBuffer)}function responseText(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function src_text(t,e){return fetch(t,e).then(responseText)}function dsvParse(t){return function(e,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=void 0),src_text(e,n).then((function(e){return t(e,r)}))}}function dsv(t,e,n,r){3===arguments.length&&"function"==typeof n&&(r=n,n=void 0);var i=(0,A.dsvFormat)(t);return src_text(e,n).then((function(t){return i.parse(t,r)}))}var k=dsvParse(A.csvParse),C=dsvParse(A.tsvParse);function src_image(t,e){return new Promise((function(n,r){var i=new Image;for(var a in e)i[a]=e[a];i.onerror=r,i.onload=function(){n(i)},i.src=t}))}function responseJson(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.json()}function json(t,e){return fetch(t,e).then(responseJson)}function parser(t){return function(e,n){return src_text(e,n).then((function(e){return(new DOMParser).parseFromString(e,t)}))}}const M=parser("application/xml");var R=parser("text/html"),L=parser("image/svg+xml");function center(t,e){var n;function force(){var r,i,a=n.length,o=0,c=0;for(r=0;r<a;++r)o+=(i=n[r]).x,c+=i.y;for(o=o/a-t,c=c/a-e,r=0;r<a;++r)(i=n[r]).x-=o,i.y-=c}return null==t&&(t=0),null==e&&(e=0),force.initialize=function(t){n=t},force.x=function(e){return arguments.length?(t=+e,force):t},force.y=function(t){return arguments.length?(e=+t,force):e},force}function d3_force_src_constant(t){return function(){return t}}function jiggle(){return 1e-6*(Math.random()-.5)}function add_add(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,a,o,c,s,u,l,d,h,p=t._root,g={data:r},v=t._x0,m=t._y0,_=t._x1,b=t._y1;if(!p)return t._root=g,t;for(;p.length;)if((u=e>=(a=(v+_)/2))?v=a:_=a,(l=n>=(o=(m+b)/2))?m=o:b=o,i=p,!(p=p[d=l<<1|u]))return i[d]=g,t;if(c=+t._x.call(null,p.data),s=+t._y.call(null,p.data),e===c&&n===s)return g.next=p,i?i[d]=g:t._root=g,t;do{i=i?i[d]=new Array(4):t._root=new Array(4),(u=e>=(a=(v+_)/2))?v=a:_=a,(l=n>=(o=(m+b)/2))?m=o:b=o}while((d=l<<1|u)==(h=(s>=o)<<1|c>=a));return i[h]=p,i[d]=g,t}function quad(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function x_defaultX(t){return t[0]}function y_defaultY(t){return t[1]}function quadtree(t,e,n){var r=new Quadtree(null==e?x_defaultX:e,null==n?y_defaultY:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function Quadtree(t,e,n,r,i,a){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function leaf_copy(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var E=quadtree.prototype=Quadtree.prototype;function collide_x(t){return t.x+t.vx}function collide_y(t){return t.y+t.vy}function collide(t){var e,n,r=1,i=1;function force(){for(var t,a,o,c,s,u,l,d=e.length,h=0;h<i;++h)for(a=quadtree(e,collide_x,collide_y).visitAfter(prepare),t=0;t<d;++t)o=e[t],u=n[o.index],l=u*u,c=o.x+o.vx,s=o.y+o.vy,a.visit(appl
2y);function apply(t,e,n,i,a){var d=t.data,h=t.r,p=u+h;if(!d)return e>c+p||i<c-p||n>s+p||a<s-p;if(d.index>o.index){var g=c-d.x-d.vx,v=s-d.y-d.vy,m=g*g+v*v;m<p*p&&(0===g&&(m+=(g=jiggle())*g),0===v&&(m+=(v=jiggle())*v),m=(p-(m=Math.sqrt(m)))/m*r,o.vx+=(g*=m)*(p=(h*=h)/(l+h)),o.vy+=(v*=m)*p,d.vx-=g*(p=1-p),d.vy-=v*p)}}}function prepare(t){if(t.data)return t.r=n[t.data.index];for(var e=t.r=0;e<4;++e)t[e]&&t[e].r>t.r&&(t.r=t[e].r)}function initialize(){if(e){var r,i,a=e.length;for(n=new Array(a),r=0;r<a;++r)i=e[r],n[i.index]=+t(i,r,e)}}return"function"!=typeof t&&(t=d3_force_src_constant(null==t?1:+t)),force.initialize=function(t){e=t,initialize()},force.iterations=function(t){return arguments.length?(i=+t,force):i},force.strength=function(t){return arguments.length?(r=+t,force):r},force.radius=function(e){return arguments.length?(t="function"==typeof e?e:d3_force_src_constant(+e),initialize(),force):t},force}function index(t){return t.index}function link_find(t,e){var n=t.get(e);if(!n)throw new Error("missing: "+e);return n}function src_link(t){var e,n,r,i,a,o=index,c=function defaultStrength(t){return 1/Math.min(i[t.source.index],i[t.target.index])},s=d3_force_src_constant(30),u=1;function force(r){for(var i=0,o=t.length;i<u;++i)for(var c,s,l,d,h,p,g,v=0;v<o;++v)s=(c=t[v]).source,d=(l=c.target).x+l.vx-s.x-s.vx||jiggle(),h=l.y+l.vy-s.y-s.vy||jiggle(),d*=p=((p=Math.sqrt(d*d+h*h))-n[v])/p*r*e[v],h*=p,l.vx-=d*(g=a[v]),l.vy-=h*g,s.vx+=d*(g=1-g),s.vy+=h*g}function initialize(){if(r){var c,s,u=r.length,l=t.length,d=(0,v.UI)(r,o);for(c=0,i=new Array(u);c<l;++c)(s=t[c]).index=c,"object"!=typeof s.source&&(s.source=link_find(d,s.source)),"object"!=typeof s.target&&(s.target=link_find(d,s.target)),i[s.source.index]=(i[s.source.index]||0)+1,i[s.target.index]=(i[s.target.index]||0)+1;for(c=0,a=new Array(l);c<l;++c)s=t[c],a[c]=i[s.source.index]/(i[s.source.index]+i[s.target.index]);e=new Array(l),initializeStrength(),n=new Array(l),initializeDistance()}}function initializeStrength(){if(r)for(var n=0,i=t.length;n<i;++n)e[n]=+c(t[n],n,t)}function initializeDistance(){if(r)for(var e=0,i=t.length;e<i;++e)n[e]=+s(t[e],e,t)}return null==t&&(t=[]),force.initialize=function(t){r=t,initialize()},force.links=function(e){return arguments.length?(t=e,initialize(),force):t},force.id=function(t){return arguments.length?(o=t,force):o},force.iterations=function(t){return arguments.length?(u=+t,force):u},force.strength=function(t){return arguments.length?(c="function"==typeof t?t:d3_force_src_constant(+t),initializeStrength(),force):c},force.distance=function(t){return arguments.length?(s="function"==typeof t?t:d3_force_src_constant(+t),initializeDistance(),force):s},force}E.copy=function(){var t,e,n=new Quadtree(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=leaf_copy(r),n;for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=leaf_copy(e));return n},E.add=function add(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return add_add(this.cover(e,n),e,n,t)},E.addAll=function addAll(t){var e,n,r,i,a=t.length,o=new Array(a),c=new Array(a),s=1/0,u=1/0,l=-1/0,d=-1/0;for(n=0;n<a;++n)isNaN(r=+this._x.call(null,e=t[n]))||isNaN(i=+this._y.call(null,e))||(o[n]=r,c[n]=i,r<s&&(s=r),r>l&&(l=r),i<u&&(u=i),i>d&&(d=i));for(l<s&&(s=this._x0,l=this._x1),d<u&&(u=this._y0,d=this._y1),this.cover(s,u).cover(l,d),n=0;n<a;++n)add_add(this,o[n],c[n],t[n]);return this},E.cover=function cover(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,a=(r=Math.floor(e))+1;else{if(!(n>t||t>i||r>e||e>a))return this;var o,c,s=i-n,u=this._root;switch(c=(e<(r+a)/2)<<1|t<(n+i)/2){case 0:do{(o=new Array(4))[c]=u,u=o}while(a=r+(s*=2),t>(i=n+s)||e>a);break;case 1:do{(o=new Array(4))[c]=u,u=o}while(a=r+(s*=2),(n=i-s)>t||e>a);break;case 2:do{(o=new Array(4))[c]=u,u=o}while(r=a-(s*=2),t>(i=n+s)||r>e);break;case 3:do{(o=new Array(4))[c]=u,u=o}while(r=a-(s*=2),(n=i-s)>t||r>e)}this._root&&this._root.length&&(this._root=u)}return this._x0=n,this._y0=r,this._x1=i,this._y1=a,this},E.data=function data(){var t=[];return this.visit((function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)})),t},E.extent=function extent(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]]},E.find=function find(t,e,n){var r,i,a,o,c,s,u,l=this._x0,d=this._y0,h=this._x1,p=this._y1,g=[],v=this._root;for(v&&g.push(new quad(v,l,d,h,p)),null==n?n=1/0:(l=t-n,d=e-n,h=t+n,p=e+n,n*=n);s=g.pop();)if(!(!(v=s.node)||(i=s.x0)>h||(a=s.y0)>p||(o=s.x1)<l||(c=s.y1)<d))if(v.length){var m=(i+o)/2,_=(a+c)/2;g.push(new quad(v[3],m,_,o,c),new quad(v[2],i,_,m,c),new quad(v[1],m,a,o,_),new quad(v[0],i,a,m,_)),(u=(e>=_)<<1|t>=m)&&(s=g[g.length-1],g[g.length-1]=g[g.length-1-u],g[g.length-1-u]=s)}else{var b=t-+this._x.call(null,v.data),w=e-+this._y.call(null,v.data),T=b*b+w*w;
vendor: 4,351 bytes, line 2
2if(T<n){var A=Math.sqrt(n=T);l=t-A,d=e-A,h=t+A,p=e+A,r=v.data}}return r},E.remove=function remove(t){if(isNaN(a=+this._x.call(null,t))||isNaN(o=+this._y.call(null,t)))return this;var e,n,r,i,a,o,c,s,u,l,d,h,p=this._root,g=this._x0,v=this._y0,m=this._x1,_=this._y1;if(!p)return this;if(p.length)for(;;){if((u=a>=(c=(g+m)/2))?g=c:m=c,(l=o>=(s=(v+_)/2))?v=s:_=s,e=p,!(p=p[d=l<<1|u]))return this;if(!p.length)break;(e[d+1&3]||e[d+2&3]||e[d+3&3])&&(n=e,h=d)}for(;p.data!==t;)if(r=p,!(p=p.next))return this;return(i=p.next)&&delete p.next,r?(i?r.next=i:delete r.next,this):e?(i?e[d]=i:delete e[d],(p=e[0]||e[1]||e[2]||e[3])&&p===(e[3]||e[2]||e[1]||e[0])&&!p.length&&(n?n[h]=p:this._root=p),this):(this._root=i,this)},E.removeAll=function removeAll(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},E.root=function root(){return this._root},E.size=function size(){var t=0;return this.visit((function(e){if(!e.length)do{++t}while(e=e.next)})),t},E.visit=function visit(t){var e,n,r,i,a,o,c=[],s=this._root;for(s&&c.push(new quad(s,this._x0,this._y0,this._x1,this._y1));e=c.pop();)if(!t(s=e.node,r=e.x0,i=e.y0,a=e.x1,o=e.y1)&&s.length){var u=(r+a)/2,l=(i+o)/2;(n=s[3])&&c.push(new quad(n,u,l,a,o)),(n=s[2])&&c.push(new quad(n,r,l,u,o)),(n=s[1])&&c.push(new quad(n,u,i,a,l)),(n=s[0])&&c.push(new quad(n,r,i,u,l))}return this},E.visitAfter=function visitAfter(t){var e,n=[],r=[];for(this._root&&n.push(new quad(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var i=e.node;if(i.length){var a,o=e.x0,c=e.y0,s=e.x1,u=e.y1,l=(o+s)/2,d=(c+u)/2;(a=i[0])&&n.push(new quad(a,o,c,l,d)),(a=i[1])&&n.push(new quad(a,l,c,s,d)),(a=i[2])&&n.push(new quad(a,o,d,l,u)),(a=i[3])&&n.push(new quad(a,l,d,s,u))}r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},E.x=function x(t){return arguments.length?(this._x=t,this):this._x},E.y=function y(t){return arguments.length?(this._y=t,this):this._y};var O=n(902);function simulation_x(t){return t.x}function simulation_y(t){return t.y}var P=10,F=Math.PI*(3-Math.sqrt(5));function simulation(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),a=0,o=.6,c=(0,v.UI)(),s=(0,O.HT)(step),u=(0,w.W)("tick","end");function step(){tick(),u.call("tick",e),n<r&&(s.stop(),u.call("end",e))}function tick(r){var s,u,l=t.length;void 0===r&&(r=1);for(var d=0;d<r;++d)for(n+=(a-n)*i,c.each((function(t){t(n)})),s=0;s<l;++s)null==(u=t[s]).fx?u.x+=u.vx*=o:(u.x=u.fx,u.vx=0),null==u.fy?u.y+=u.vy*=o:(u.y=u.fy,u.vy=0);return e}function initializeNodes(){for(var e,n=0,r=t.length;n<r;++n){if((e=t[n]).index=n,isNaN(e.fx)||(e.x=e.fx),isNaN(e.fy)||(e.y=e.fy),isNaN(e.x)||isNaN(e.y)){var i=P*Math.sqrt(n),a=n*F;e.x=i*Math.cos(a),e.y=i*Math.sin(a)}(isNaN(e.vx)||isNaN(e.vy))&&(e.vx=e.vy=0)}}function initializeForce(e){return e.initialize&&e.initialize(t),e}return null==t&&(t=[]),initializeNodes(),e={tick,restart:function(){return s.restart(step),e},stop:function(){return s.stop(),e},nodes:function(n){return arguments.length?(t=n,initializeNodes(),c.each(initializeForce),e):t},alpha:function(t){return arguments.length?(n=+t,e):n},alphaMin:function(t){return arguments.length?(r=+t,e):r},alphaDecay:function(t){return arguments.length?(i=+t,e):+i},alphaTarget:function(t){return arguments.length?(a=+t,e):a},velocityDecay:function(t){return arguments.length?(o=1-t,e):1-o},force:function(t,n){return arguments.length>1?(null==n?c.remove(t):c.set(t,initializeForce(n)),e):c.get(t)},find:function(e,n,r){var i,a,o,c,s,u=0,l=t.length;for(null==r?r=1/0:r*=r,u=0;u<l;++u)(o=(i=e-(c=t[u]).x)*i+(a=n-c.y)*a)<r&&(s=c,r=o);return s},on:function(t,n){return arguments.length>1?(u.on(t,n),e):u.on(t)}}}function manyBody(){var t,e,n,r,i=d3_force_src_constant(-30),a=1,o=1/0,c=.81;function force(r){var i,a=t.length,o=quadtree(t,simulation_x,simulation_y).visitAfter(accumulate);for(n=r,i=0;i<a;++i)e=t[i],o.visit(apply)}function initialize(){if(t){var e,n,a=t.length;for(r=new Array(a),e=0;e<a;++e)n=t[e],r[n.index]=+i(n,e,t)}}function accumulate(t){var e,n,i,a,o,c=0,s=0;if(t.length){for(i=a=o=0;o<4;++o)(e=t[o])&&(n=Math.abs(e.value))&&(c+=e.value,s+=n,i+=n*e.x,a+=n*e.y);t.x=i/s,t.y=a/s}else{(e=t).x=e.data.x,e.y=e.data.y;do{c+=r[e.data.index]}while(e=e.next)}t.value=c}function apply(t,i,s,u){if(!t.value)return!0;var l=t.x-e.x,d=t.y-e.y,h=u-i,p=l*l+d*d;if(h*h/c<p)return p<o&&(0===l&&(p+=(l=jiggle())*l),0===d&&(p+=(d=jiggle(
vendor: 4,898 bytes, line 2
2))*d),p<a&&(p=Math.sqrt(a*p)),e.vx+=l*t.value*n/p,e.vy+=d*t.value*n/p),!0;if(!(t.length||p>=o)){(t.data!==e||t.next)&&(0===l&&(p+=(l=jiggle())*l),0===d&&(p+=(d=jiggle())*d),p<a&&(p=Math.sqrt(a*p)));do{t.data!==e&&(h=r[t.data.index]*n/p,e.vx+=l*h,e.vy+=d*h)}while(t=t.next)}}return force.initialize=function(e){t=e,initialize()},force.strength=function(t){return arguments.length?(i="function"==typeof t?t:d3_force_src_constant(+t),initialize(),force):i},force.distanceMin=function(t){return arguments.length?(a=t*t,force):Math.sqrt(a)},force.distanceMax=function(t){return arguments.length?(o=t*t,force):Math.sqrt(o)},force.theta=function(t){return arguments.length?(c=t*t,force):Math.sqrt(c)},force}function radial(t,e,n){var r,i,a,o=d3_force_src_constant(.1);function force(t){for(var o=0,c=r.length;o<c;++o){var s=r[o],u=s.x-e||1e-6,l=s.y-n||1e-6,d=Math.sqrt(u*u+l*l),h=(a[o]-d)*i[o]*t/d;s.vx+=u*h,s.vy+=l*h}}function initialize(){if(r){var e,n=r.length;for(i=new Array(n),a=new Array(n),e=0;e<n;++e)a[e]=+t(r[e],e,r),i[e]=isNaN(a[e])?0:+o(r[e],e,r)}}return"function"!=typeof t&&(t=d3_force_src_constant(+t)),null==e&&(e=0),null==n&&(n=0),force.initialize=function(t){r=t,initialize()},force.strength=function(t){return arguments.length?(o="function"==typeof t?t:d3_force_src_constant(+t),initialize(),force):o},force.radius=function(e){return arguments.length?(t="function"==typeof e?e:d3_force_src_constant(+e),initialize(),force):t},force.x=function(t){return arguments.length?(e=+t,force):e},force.y=function(t){return arguments.length?(n=+t,force):n},force}function src_x(t){var e,n,r,i=d3_force_src_constant(.1);function force(t){for(var i,a=0,o=e.length;a<o;++a)(i=e[a]).vx+=(r[a]-i.x)*n[a]*t}function initialize(){if(e){var a,o=e.length;for(n=new Array(o),r=new Array(o),a=0;a<o;++a)n[a]=isNaN(r[a]=+t(e[a],a,e))?0:+i(e[a],a,e)}}return"function"!=typeof t&&(t=d3_force_src_constant(null==t?0:+t)),force.initialize=function(t){e=t,initialize()},force.strength=function(t){return arguments.length?(i="function"==typeof t?t:d3_force_src_constant(+t),initialize(),force):i},force.x=function(e){return arguments.length?(t="function"==typeof e?e:d3_force_src_constant(+e),initialize(),force):t},force}function src_y(t){var e,n,r,i=d3_force_src_constant(.1);function force(t){for(var i,a=0,o=e.length;a<o;++a)(i=e[a]).vy+=(r[a]-i.y)*n[a]*t}function initialize(){if(e){var a,o=e.length;for(n=new Array(o),r=new Array(o),a=0;a<o;++a)n[a]=isNaN(r[a]=+t(e[a],a,e))?0:+i(e[a],a,e)}}return"function"!=typeof t&&(t=d3_force_src_constant(null==t?0:+t)),force.initialize=function(t){e=t,initialize()},force.strength=function(t){return arguments.length?(i="function"==typeof t?t:d3_force_src_constant(+t),initialize(),force):i},force.y=function(e){return arguments.length?(t="function"==typeof e?e:d3_force_src_constant(+e),initialize(),force):t},force}var D=n(424);function adder(){return new Adder}function Adder(){this.reset()}Adder.prototype={constructor:Adder,reset:function(){this.s=this.t=0},add:function(t){adder_add(I,t,this.t),adder_add(this,I.s,this.s),this.s?this.t+=I.t:this.s=I.t},valueOf:function(){return this.s}};var I=new Adder;function adder_add(t,e,n){var r=t.s=e+n,i=r-e,a=r-i;t.t=e-a+(n-i)}var z=1e-6,N=1e-12,B=Math.PI,X=B/2,j=B/4,Y=2*B,q=180/B,U=B/180,H=Math.abs,W=Math.atan,V=Math.atan2,G=Math.cos,Z=Math.ceil,K=Math.exp,$=(Math.floor,Math.log),Q=Math.pow,J=Math.sin,tt=Math.sign||function(t){return t>0?1:t<0?-1:0},et=Math.sqrt,nt=Math.tan;function acos(t){return t>1?0:t<-1?B:Math.acos(t)}function asin(t){return t>1?X:t<-1?-X:Math.asin(t)}function haversin(t){return(t=J(t/2))*t}function noop_noop(){}function streamGeometry(t,e){t&&it.hasOwnProperty(t.type)&&it[t.type](t,e)}var rt={Feature:function(t,e){streamGeometry(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)streamGeometry(n[r].geometry,e)}},it={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){streamLine(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)streamLine(n[r],e,0)},Polygon:function(t,e){streamPolygon(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)streamPolygon(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)streamGeometry(n[r],e)}};function streamLine(t,e,n){var r,i=-1,a=t.length-n;for(e.lineStart();++i<a;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function streamPolygon(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)streamLine(t[n],e,1);e.polygonEnd()}function stream(t,e){t&&rt.hasOwnProperty(t.type)?rt[t.type](t,e):streamGeometry(t,e)}var at,ot,ct,st,ut,lt=adder(),ft=adder(),dt={point:noop_noop,lineStart:noop_noop,lineEnd:noop_noop,pol
vendor: 6,852 bytes, line 2
2ygonStart:function(){lt.reset(),dt.lineStart=areaRingStart,dt.lineEnd=areaRingEnd},polygonEnd:function(){var t=+lt;ft.add(t<0?Y+t:t),this.lineStart=this.lineEnd=this.point=noop_noop},sphere:function(){ft.add(Y)}};function areaRingStart(){dt.point=areaPointFirst}function areaRingEnd(){areaPoint(at,ot)}function areaPointFirst(t,e){dt.point=areaPoint,at=t,ot=e,ct=t*=U,st=G(e=(e*=U)/2+j),ut=J(e)}function areaPoint(t,e){var n=(t*=U)-ct,r=n>=0?1:-1,i=r*n,a=G(e=(e*=U)/2+j),o=J(e),c=ut*o,s=st*a+c*G(i),u=c*r*J(i);lt.add(V(u,s)),ct=t,st=a,ut=o}function d3_geo_src_area(t){return ft.reset(),stream(t,dt),2*ft}function spherical(t){return[V(t[1],t[0]),asin(t[2])]}function cartesian(t){var e=t[0],n=t[1],r=G(n);return[r*G(e),r*J(e),J(n)]}function cartesianDot(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function cartesianCross(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function cartesianAddInPlace(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function cartesianScale(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function cartesianNormalizeInPlace(t){var e=et(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var ht,pt,gt,vt,mt,_t,yt,xt,bt,wt,Tt,At,St,kt,Ct,Mt,Rt,Lt,Et,Ot,Pt,Ft,Dt,It,zt,Nt,Bt=adder(),Xt={point:boundsPoint,lineStart:boundsLineStart,lineEnd:boundsLineEnd,polygonStart:function(){Xt.point=boundsRingPoint,Xt.lineStart=boundsRingStart,Xt.lineEnd=boundsRingEnd,Bt.reset(),dt.polygonStart()},polygonEnd:function(){dt.polygonEnd(),Xt.point=boundsPoint,Xt.lineStart=boundsLineStart,Xt.lineEnd=boundsLineEnd,lt<0?(ht=-(gt=180),pt=-(vt=90)):Bt>z?vt=90:Bt<-z&&(pt=-90),wt[0]=ht,wt[1]=gt}};function boundsPoint(t,e){bt.push(wt=[ht=t,gt=t]),e<pt&&(pt=e),e>vt&&(vt=e)}function linePoint(t,e){var n=cartesian([t*U,e*U]);if(xt){var r=cartesianCross(xt,n),i=cartesianCross([r[1],-r[0],0],r);cartesianNormalizeInPlace(i),i=spherical(i);var a,o=t-mt,c=o>0?1:-1,s=i[0]*q*c,u=H(o)>180;u^(c*mt<s&&s<c*t)?(a=i[1]*q)>vt&&(vt=a):u^(c*mt<(s=(s+360)%360-180)&&s<c*t)?(a=-i[1]*q)<pt&&(pt=a):(e<pt&&(pt=e),e>vt&&(vt=e)),u?t<mt?angle(ht,t)>angle(ht,gt)&&(gt=t):angle(t,gt)>angle(ht,gt)&&(ht=t):gt>=ht?(t<ht&&(ht=t),t>gt&&(gt=t)):t>mt?angle(ht,t)>angle(ht,gt)&&(gt=t):angle(t,gt)>angle(ht,gt)&&(ht=t)}else bt.push(wt=[ht=t,gt=t]);e<pt&&(pt=e),e>vt&&(vt=e),xt=n,mt=t}function boundsLineStart(){Xt.point=linePoint}function boundsLineEnd(){wt[0]=ht,wt[1]=gt,Xt.point=boundsPoint,xt=null}function boundsRingPoint(t,e){if(xt){var n=t-mt;Bt.add(H(n)>180?n+(n>0?360:-360):n)}else _t=t,yt=e;dt.point(t,e),linePoint(t,e)}function boundsRingStart(){dt.lineStart()}function boundsRingEnd(){boundsRingPoint(_t,yt),dt.lineEnd(),H(Bt)>z&&(ht=-(gt=180)),wt[0]=ht,wt[1]=gt,xt=null}function angle(t,e){return(e-=t)<0?e+360:e}function rangeCompare(t,e){return t[0]-e[0]}function rangeContains(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}function bounds(t){var e,n,r,i,a,o,c;if(vt=gt=-(ht=pt=1/0),bt=[],stream(t,Xt),n=bt.length){for(bt.sort(rangeCompare),e=1,a=[r=bt[0]];e<n;++e)rangeContains(r,(i=bt[e])[0])||rangeContains(r,i[1])?(angle(r[0],i[1])>angle(r[0],r[1])&&(r[1]=i[1]),angle(i[0],r[1])>angle(r[0],r[1])&&(r[0]=i[0])):a.push(r=i);for(o=-1/0,e=0,r=a[n=a.length-1];e<=n;r=i,++e)i=a[e],(c=angle(r[1],i[0]))>o&&(o=c,ht=i[0],gt=r[1])}return bt=wt=null,ht===1/0||pt===1/0?[[NaN,NaN],[NaN,NaN]]:[[ht,pt],[gt,vt]]}var jt={sphere:noop_noop,point:centroidPoint,lineStart:centroidLineStart,lineEnd:centroidLineEnd,polygonStart:function(){jt.lineStart=centroidRingStart,jt.lineEnd=centroidRingEnd},polygonEnd:function(){jt.lineStart=centroidLineStart,jt.lineEnd=centroidLineEnd}};function centroidPoint(t,e){t*=U;var n=G(e*=U);centroidPointCartesian(n*G(t),n*J(t),J(e))}function centroidPointCartesian(t,e,n){++Tt,St+=(t-St)/Tt,kt+=(e-kt)/Tt,Ct+=(n-Ct)/Tt}function centroidLineStart(){jt.point=centroidLinePointFirst}function centroidLinePointFirst(t,e){t*=U;var n=G(e*=U);It=n*G(t),zt=n*J(t),Nt=J(e),jt.point=centroidLinePoint,centroidPointCartesian(It,zt,Nt)}function centroidLinePoint(t,e){t*=U;var n=G(e*=U),r=n*G(t),i=n*J(t),a=J(e),o=V(et((o=zt*a-Nt*i)*o+(o=Nt*r-It*a)*o+(o=It*i-zt*r)*o),It*r+zt*i+Nt*a);At+=o,Mt+=o*(It+(It=r)),Rt+=o*(zt+(zt=i)),Lt+=o*(Nt+(Nt=a)),centroidPointCartesian(It,zt,Nt)}function centroidLineEnd(){jt.point=centroidPoint}function centroidRingStart(){jt.point=centroidRingPointFirst}function centroidRingEnd(){centroidRingPoint(Ft,Dt),jt.point=centroidPoint}function centroidRingPointFirst(t,e){Ft=t,Dt=e,t*=U,e*=U,jt.point=centroidRingPoint;var n=G(e);It=n*G(t),zt=n*J(t),Nt=J(e),centroidPointCartesian(It,zt,Nt)}function centroidRingPoint(t,e){t*=U;var n=G(e*=U),r=n*G(t),i=n*J(t),a=J(e),o=zt*a-Nt*i,c=Nt*r-It*a,s=It*i-zt*r,u=et(o*o+c*c+s*s),l=asin(u),d=u&&-l/u;Et+=d*o,Ot+=d*c,Pt+=d*s,At+=l,Mt+=l*(It+(It=r)),Rt+=l*(zt+(zt=i)),Lt+=l*(Nt+(Nt=a)),centroidPointCartesian(It,zt,Nt)}function centroid(t){Tt=At=St=kt=Ct=Mt=Rt=Lt=Et=Ot=Pt=0,stream(t,jt);var e=Et,n=Ot,r=Pt,i=e*e+n*n+r*r;return i<N&&(e=Mt,n=Rt,r=Lt,At<z&&(e=St,n=kt,r=Ct),(i=e*e+n*n+r*r)<N)?[NaN,NaN]:[V(n,e)*q,asin(r/et(i))*q]}function d3_geo_src_constant(t){return function(){return t}}function compose(t,e){function compose(n,r){return n=t(n,r),e(n[0],n[1])}return t.invert&&e.invert&&(compose.invert=function(n,r){return(n=e.invert(n,r))&&t.invert(n[0],n[1])}),compose}function rotationIdentity(t,e){return[H(t)>B?t+Math.round(-t/Y)*Y:t,e]}function rotateRadians(t,e,n){return(t%=Y)?e||n?compose(rotationLambda(t),rotationPhiGamma(e,n)):rotationLambda(t):e||n?rotationPhiGamma(e,n):rotationIdentity}function forwardRotationLambda(t){return function(e,n){return[(e+=t)>B?e-Y:e<-B?e+Y:e,n]}}function rotationLambda(t){var e=forwardRotationLambda(t);return e.invert=forwardRotationLambda(-t),e}function rotationPhiGamma(t,e){var n=G(t),r=J(t),i=G(e),a=J(e);function rotation(t,e){var o=G(e),c=G(t)*o,s=J(t)*o,u=J(e),l=u*n+c*r;return[V(s*i-l*a,c*n-u*r),asin(l*i+s*a)]}return rotation.invert=function(t,e){var o=G(e),c=G(t)*o,s=J(t)*o,u=J(e),l=u*i-s*a;return[V(s*i+u*a,c*n+l*r),asin(l*n-c*r)]},rotation}function rotation(t){function forward(e){return(e=t(e[0]*U,e[1]*U))[0]*=q,e[1]*=q,e}return t=rotateRadians(t[0]*U,t[1]*U,t.length>2?t[2]*U:0),forward.invert=function(e){return(e=t.invert(e[0]*U,e[1]*U))[0]*=q,e[1]*=q,e},forward}function circleStream(t,e,n,r,i,a){if(n){var o=G(e),c=J(e),s=r*n;null==i?(i=e+r*Y,a=e-s/2):(i=circleRadius(o,i),a=circleRadius(o,a),(r>0?i<a:i>a)&&(i+=r*Y));for(var u,l=i;r>0?l>a:l<a;l-=s)u=spherical([o,-c*G(l),-c*J(l)]),t.point(u[0],u[1])}}function circleRadius(t,e){(e=cartesian(e))[0]-=t,cartesianNormalizeInPlace(e);var n=acos(-e[1]);return((-e[2]<0?-n:n)+Y-z)%Y}function circle(){var t,e,n=d3_geo_src_constant([0,0]),r=d3_geo_src_constant(90),i=d3_geo_src_constant(6),a={point:function point(n,r){t.push(n=e(n,r)),n[0]*=q,n[1]*=q}};function circle(){var o=n.apply(this,arguments),c=r.apply(this,arguments)*U,s=i.apply(this,arguments)*U;
vendor: 13,754 bytes, line 2
2return t=[],e=rotateRadians(-o[0]*U,-o[1]*U,0).invert,circleStream(a,c,s,1),o={type:"Polygon",coordinates:[t]},t=e=null,o}return circle.center=function(t){return arguments.length?(n="function"==typeof t?t:d3_geo_src_constant([+t[0],+t[1]]),circle):n},circle.radius=function(t){return arguments.length?(r="function"==typeof t?t:d3_geo_src_constant(+t),circle):r},circle.precision=function(t){return arguments.length?(i="function"==typeof t?t:d3_geo_src_constant(+t),circle):i},circle}function clip_buffer(){var t,e=[];return{point:function(e,n){t.push([e,n])},lineStart:function(){e.push(t=[])},lineEnd:noop_noop,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function pointEqual(t,e){return H(t[0]-e[0])<z&&H(t[1]-e[1])<z}function Intersection(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function rejoin(t,e,n,r,i){var a,o,c=[],s=[];if(t.forEach((function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],o=t[e];if(pointEqual(r,o)){for(i.lineStart(),a=0;a<e;++a)i.point((r=t[a])[0],r[1]);i.lineEnd()}else c.push(n=new Intersection(r,t,null,!0)),s.push(n.o=new Intersection(r,null,n,!1)),c.push(n=new Intersection(o,t,null,!1)),s.push(n.o=new Intersection(o,null,n,!0))}})),c.length){for(s.sort(e),rejoin_link(c),rejoin_link(s),a=0,o=s.length;a<o;++a)s[a].e=n=!n;for(var u,l,d=c[0];;){for(var h=d,p=!0;h.v;)if((h=h.n)===d)return;u=h.z,i.lineStart();do{if(h.v=h.o.v=!0,h.e){if(p)for(a=0,o=u.length;a<o;++a)i.point((l=u[a])[0],l[1]);else r(h.x,h.n.x,1,i);h=h.n}else{if(p)for(u=h.p.z,a=u.length-1;a>=0;--a)i.point((l=u[a])[0],l[1]);else r(h.x,h.p.x,-1,i);h=h.p}u=(h=h.o).z,p=!p}while(!h.v);i.lineEnd()}}}function rejoin_link(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}rotationIdentity.invert=rotationIdentity;var Yt=adder();function polygonContains(t,e){var n=e[0],r=e[1],i=J(r),a=[J(n),-G(n),0],o=0,c=0;Yt.reset(),1===i?r=X+z:-1===i&&(r=-X-z);for(var s=0,u=t.length;s<u;++s)if(d=(l=t[s]).length)for(var l,d,h=l[d-1],p=h[0],g=h[1]/2+j,v=J(g),m=G(g),_=0;_<d;++_,p=w,v=A,m=S,h=b){var b=l[_],w=b[0],T=b[1]/2+j,A=J(T),S=G(T),k=w-p,C=k>=0?1:-1,M=C*k,R=M>B,L=v*A;if(Yt.add(V(L*C*J(M),m*S+L*G(M))),o+=R?k+C*Y:k,R^p>=n^w>=n){var E=cartesianCross(cartesian(h),cartesian(b));cartesianNormalizeInPlace(E);var O=cartesianCross(a,E);cartesianNormalizeInPlace(O);var P=(R^k>=0?-1:1)*asin(O[2]);(r>P||r===P&&(E[0]||E[1]))&&(c+=R^k>=0?1:-1)}}return(o<-z||o<z&&Yt<-z)^1&c}function clip(t,e,n,r){return function(a){var o,c,s,u=e(a),l=clip_buffer(),d=e(l),h=!1,p={point,lineStart,lineEnd,polygonStart:function(){p.point=pointRing,p.lineStart=ringStart,p.lineEnd=ringEnd,c=[],o=[]},polygonEnd:function(){p.point=point,p.lineStart=lineStart,p.lineEnd=lineEnd,c=(0,i.TS)(c);var t=polygonContains(o,r);c.length?(h||(a.polygonStart(),h=!0),rejoin(c,compareIntersection,t,n,a)):t&&(h||(a.polygonStart(),h=!0),a.lineStart(),n(null,null,1,a),a.lineEnd()),h&&(a.polygonEnd(),h=!1),c=o=null},sphere:function(){a.polygonStart(),a.lineStart(),n(null,null,1,a),a.lineEnd(),a.polygonEnd()}};function point(e,n){t(e,n)&&a.point(e,n)}function pointLine(t,e){u.point(t,e)}function lineStart(){p.point=pointLine,u.lineStart()}function lineEnd(){p.point=point,u.lineEnd()}function pointRing(t,e){s.push([t,e]),d.point(t,e)}function ringStart(){d.lineStart(),s=[]}function ringEnd(){pointRing(s[0][0],s[0][1]),d.lineEnd();var t,e,n,r,i=d.clean(),u=l.result(),p=u.length;if(s.pop(),o.push(s),s=null,p)if(1&i){if((e=(n=u[0]).length-1)>0){for(h||(a.polygonStart(),h=!0),a.lineStart(),t=0;t<e;++t)a.point((r=n[t])[0],r[1]);a.lineEnd()}}else p>1&&2&i&&u.push(u.pop().concat(u.shift())),c.push(u.filter(validSegment))}return p}}function validSegment(t){return t.length>1}function compareIntersection(t,e){return((t=t.x)[0]<0?t[1]-X-z:X-t[1])-((e=e.x)[0]<0?e[1]-X-z:X-e[1])}const qt=clip((function(){return!0}),(function clipAntimeridianLine(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(a,o){var c=a>0?B:-B,s=H(a-n);H(s-B)<z?(t.point(n,r=(r+o)/2>0?X:-X),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(c,r),t.point(a,r),e=0):i!==c&&s>=B&&(H(n-i)<z&&(n-=i*z),H(a-c)<z&&(a-=c*z),r=function clipAntimeridianIntersect(t,e,n,r){var i,a,o=J(t-n);return H(o)>z?W((J(e)*(a=G(r))*J(n)-J(r)*(i=G(e))*J(t))/(i*a*o)):(e+r)/2}(n,r,a,o),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(c,r),e=0),t.point(n=a,r=o),i=c},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}}),(function clipAntimeridianInterpolate(t,e,n,r){var i;if(null==t)i=n*X,r.point(-B,i),r.point(0,i),r.point(B,i),r.point(B,0),r.point(B,-i),r.point(0,-i),r.point(-B,-i),r.point(-B,0),r.point(-B,i);else if(H(t[0]-e[0])>z){var a=t[0]<e[0]?B:-B;i=n*a/2,r.point(-a,i),r.point(0,i),r.point(a,i)}else r.point(e[0],e[1])}),[-B,-X]);function clip_circle(t){var e=G(t),n=6*U,r=e>0,i=H(e)>z;function visible(t,n){return G(t)*G(n)>e}function intersect(t,n,r){var i=[1,0,0],a=cartesianCross(cartesian(t),cartesian(n)),o=cartesianDot(a,a),c=a[0],s=o-c*c;if(!s)return!r&&t;var u=e*o/s,l=-e*c/s,d=cartesianCross(i,a),h=cartesianScale(i,u);cartesianAddInPlace(h,cartesianScale(a,l));var p=d,g=cartesianDot(h,p),v=cartesianDot(p,p),m=g*g-v*(cartesianDot(h,h)-1);if(!(m<0)){var _=et(m),b=cartesianScale(p,(-g-_)/v);if(cartesianAddInPlace(b,h),b=spherical(b),!r)return b;var w,T=t[0],A=n[0],S=t[1],k=n[1];A<T&&(w=T,T=A,A=w);var C=A-T,M=H(C-B)<z;if(!M&&k<S&&(w=S,S=k,k=w),M||C<z?M?S+k>0^b[1]<(H(b[0]-T)<z?S:k):S<=b[1]&&b[1]<=k:C>B^(T<=b[0]&&b[0]<=A)){var R=cartesianScale(p,(-g+_)/v);return cartesianAddInPlace(R,h),[b,spherical(R)]}}}function code(e,n){var i=r?t:B-t,a=0;return e<-i?a|=1:e>i&&(a|=2),n<-i?a|=4:n>i&&(a|=8),a}return clip(visible,(function clipLine(t){var e,n,a,o,c;return{lineStart:function(){o=a=!1,c=1},point:function(s,u){var l,d=[s,u],h=visible(s,u),p=r?h?0:code(s,u):h?code(s+(s<0?B:-B),u):0;if(!e&&(o=a=h)&&t.lineStart(),h!==a&&(!(l=intersect(e,d))||pointEqual(e,l)||pointEqual(d,l))&&(d[0]+=z,d[1]+=z,h=visible(d[0],d[1])),h!==a)c=0,h?(t.lineStart(),l=intersect(d,e),t.point(l[0],l[1])):(l=intersect(e,d),t.point(l[0],l[1]),t.lineEnd()),e=l;else if(i&&e&&r^h){var g;p&n||!(g=intersect(d,e,!0))||(c=0,r?(t.lineStart(),t.point(g[0][0],g[0][1]),t.point(g[1][0],g[1][1]),t.lineEnd()):(t.point(g[1][0],g[1][1]),t.lineEnd(),t.lineStart(),t.point(g[0][0],g[0][1])))}!h||e&&pointEqual(e,d)||t.point(d[0],d[1]),e=d,a=h,n=p},lineEnd:function(){a&&t.lineEnd(),e=null},clean:function(){return c|(o&&a)<<1}}}),(function interpolate(e,r,i,a){circleStream(a,t,n,i,e,r)}),r?[0,-t]:[-B,t-B])}var Ut=1e9,Ht=-Ut;function clipRectangle(t,e,n,r){function visible(i,a){return t<=i&&i<=n&&e<=a&&a<=r}function interpolate(i,a,o,c){var s=0,u=0;if(null==i||(s=corner(i,o))!==(u=corner(a,o))||comparePoint(i,a)<0^o>0)do{c.point(0===s||3===s?t:n,s>1?r:e)}while((s=(s+o+4)%4)!==u);else c.point(a[0],a[1])}function corner(r,i){return H(r[0]-t)<z?i>0?0:3:H(r[0]-n)<z?i>0?2:1:H(r[1]-e)<z?i>0?1:0:i>0?3:2}function compareIntersection(t,e){return comparePoint(t.x,e.x)}function comparePoint(t,e){var n=corner(t,1),r=corner(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(a){var o,c,s,u,l,d,h,p,g,v,m,_=a,b=clip_buffer(),w={point,lineStart:function lineStart(){w.point=linePoint,c&&c.push(s=[]);v=!0,g=!1,h=p=NaN},lineEnd:function lineEnd(){o&&(linePoint(u,l),d&&g&&b.rejoin(),o.push(b.result()));w.point=point,g&&_.lineEnd()},polygonStart:function polygonStart(){_=b,o=[],c=[],m=!0},polygonEnd:function polygonEnd(){var e=function polygonInside(){for(var e=0,n=0,i=c.length;n<i;++n)for(var a,o,s=c[n],u=1,l=s.length,d=s[0],h=d[0],p=d[1];u<l;++u)a=h,o=p,h=(d=s[u])[0],p=d[1],o<=r?p>r&&(h-a)*(r-o)>(p-o)*(t-a)&&++e:p<=r&&(h-a)*(r-o)<(p-o)*(t-a)&&--e;return e}(),n=m&&e,u=(o=(0,i.TS)(o)).length;(n||u)&&(a.polygonStart(),n&&(a.lineStart(),interpolate(null,null,1,a),a.lineEnd()),u&&rejoin(o,compareIntersection,e,interpolate,a),a.polygonEnd());_=a,o=c=s=null}};function point(t,e){visible(t,e)&&_.point(t,e)}function linePoint(i,a){var o=visible(i,a);if(c&&s.push([i,a]),v)u=i,l=a,d=o,v=!1,o&&(_.lineStart(),_.point(i,a));else if(o&&g)_.point(i,a);else{var b=[h=Math.max(Ht,Math.min(Ut,h)),p=Math.max(Ht,Math.min(Ut,p))],w=[i=Math.max(Ht,Math.min(Ut,i)),a=Math.max(Ht,Math.min(Ut,a))];!function line(t,e,n,r,i,a){var o,c=t[0],s=t[1],u=0,l=1,d=e[0]-c,h=e[1]-s;if(o=n-c,d||!(o>0)){if(o/=d,d<0){if(o<u)return;o<l&&(l=o)}else if(d>0){if(o>l)return;o>u&&(u=o)}if(o=i-c,d||!(o<0)){if(o/=d,d<0){if(o>l)return;o>u&&(u=o)}else if(d>0){if(o<u)return;o<l&&(l=o)}if(o=r-s,h||!(o>0)){if(o/=h,h<0){if(o<u)return;o<l&&(l=o)}else if(h>0){if(o>l)return;o>u&&(u=o)}if(o=a-s,h||!(o<0)){if(o/=h,h<0){if(o>l)return;o>u&&(u=o)}else if(h>0){if(o<u)return;o<l&&(l=o)}return u>0&&(t[0]=c+u*d,t[1]=s+u*h),l<1&&(e[0]=c+l*d,e[1]=s+l*h),!0}}}}}(b,w,t,e,n,r)?o&&(_.lineStart(),_.point(i,a),m=!1):(g||(_.lineStart(),_.point(b[0],b[1])),_.point(w[0],w[1]),o||_.lineEnd(),m=!1)}h=i,p=a,g=o}return w}}function clip_extent(){var t,e,n,r=0,i=0,a=960,o=500;return n={stream:function(n){return t&&e===n?t:t=clipRectangle(r,i,a,o)(e=n)},extent:function(c){return arguments.length?(r=+c[0][0],i=+c[0][1],a=+c[1][0],o=+c[1][1],t=e=null,n):[[r,i],[a,o]]}}}var Wt,Vt,Gt,Zt=adder(),Kt={sphere:noop_noop,point:noop_noop,lineStart:function lengthLineStart(){Kt.point=lengthPointFirst,Kt.lineEnd=lengthLineEnd},lineEnd:noop_noop,polygonStart:noop_noop,polygonEnd:noop_noop};function lengthLineEnd(){Kt.point=Kt.lineEnd=noop_noop}function lengthPointFirst(t,e){Wt=t*=U,Vt=J(e*=U),Gt=G(e),Kt.point=lengthPoint}function lengthPoint(t,e){t*=U;var n=J(e*=U),r=G(e),i=H(t-Wt),a=G(i),o=r*J(i),c=Gt*n-Vt*r*a,s=Vt*n+Gt*r*a;Zt.add(V(et(o*o+c*c),s)),Wt=t,Vt=n,Gt=r}function src_length(t){return Zt.reset(),stream(t,Kt),+Zt}var $t=[null,null],Qt={type:"LineString",coordinates:$t};function distance(t,e){return $t[0]=t,$t[1]=e,src_length(Qt)}var Jt={Feature:function(t,e){return containsGeometry(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)if(containsGeometry(n[r].geometry,e))return!0;return!1}},te={Sphere:function(){return!0},Point:function(t,e){return containsPoint(t.coordinates,e)},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(containsPoint(n[r],e))return!0;return!1},LineString:function(t,e){return containsLine(t.coordinates,e)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(containsLine(n[r],e))return!0;return!1},Polygon:function(t,e){return containsPolygon(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(containsPolygon(n[r],e))return!0;return!1},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)if(containsGeometry(n[r],e))return!0;return!1}};function containsGeometry(t,e){return!(!t||!te.hasOwnProperty(t.type))&&te[t.type](t,e)}function containsPoint(t,e){return 0===distance(t,e)}function containsLine(t,e){var n=distance(t[0],t[1]);return distance(t[0],e)+distance(e,t[1])<=n+z}function containsPolygon(t,e){return!!polygonContains(t.map(ringRadians),pointRadians(e))}function ringRadians(t){return(t=t.map(pointRadians)).pop(),t}function pointRadians(t){return[t[0]*U,t[1]*U]}function src_contains(t,e){return(t&&Jt.hasOwnProperty(t.type)?Jt[t.type]:containsGeometry)(t,e)}function graticuleX(t,e,n){var r=(0,i.w6)(t,e-z,n).concat(e);return function(t){return r.map((function(e){return[t,e]}))}}function graticuleY(t,e,n){var r=(0,i.w6)(t,e-z,n).concat(e);return function(t){return r.map((function(e){return[e,t]}))}}function graticule(){var t,e,n,r,a,o,c,s,u,l,d,h,p=10,g=p,v=90,m=360,_=2.5;function graticule(){return{type:"MultiLineString",coordinates:lines()}}function lines(){return(0,i.w6)(Z(r/v)*v,n,v).map(d).concat((0,i.w6)(Z(s/m)*m,c,m).map(h)).concat((0,i.w6)(Z(e/p)*p,t,p).filter((function(t){return H(t%v)>z})).map(u)).concat((0,i.w6)(Z(o/g)*g,a,g).filter((function(t){return H(t%m)>z})).map(l))}return graticule.lines=function(){return lines().map((function(t){return{type:"LineString",coordinates:t}}))},graticule.outline=function(){return{type:"Polygon",coordinates:[d(r).concat(h(c).slice(1),d(n).reverse().slice(1),h(s).reverse().slice(1))]}},graticule.extent=function(t){return arguments.length?graticule.extentMajor(t).extentMinor(t):graticule.extentMinor()},graticule.extentMajor=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],s=+t[0][1],c=+t[1][1],r>n&&(t=r,r=n,n=t),s>c&&(t=s,s=c,c=t),graticule.precision(_)):[[r,s],[n,c]]},graticule.extentMinor=function(n){return arguments.length?(e=+n[0][0],t=+n[1][0],o=+n[0][1],a=+n[1][1],e>t&&(n=e,e=t,t=n),o>a&&(n=o,o=a,a=n),graticule.precision(_)):[[e,o],[t,a]]},graticule.step=function(t){return arguments.length?graticule.stepMajor(t).stepMinor(t):graticule.stepMinor()},graticule.stepMajor=function(t){return arguments.length?(v=+t[0],m=+t[1],graticule):[v,m]},graticule.stepMinor=function(t){return arguments.length?(p=+t[0],g=+t[1],graticule):[p,g]},graticule.precision=function(i){return arguments.length?(_=+i,u=graticuleX(o,a,90),l=graticuleY(e,t,_),d=graticuleX(s,c,90),h=graticuleY(r,n,_),graticule):_},graticule.extentMajor([[-180,-90+z],[180,90-z]]).extentMinor([[-180,-80-z],[180,80+z]])}function graticule10(){return graticule()()}function interpolate(t,e){var n=t[0]*U,r=t[1]*U,i=e[0]*U,a=e[1]*U,o=G(r),c=J(r),s=G(a),u=J(a),l=o*G(n),d=o*J(n),h=s*G(i),p=s*J(i),g=2*asin(et(haversin(a-r)+o*s*haversin(i-n))),v=J(g),m=g?function(t){var e=J(t*=g)/v,n=J(g-t)/v,r=n*l+e*h,i=n*d+e*p,a=n*c+e*u;return[V(i,r)*q,V(a,et(r*r+i*i))*q]}:function(){return[n*q,r*q]};return m.distance=g,m}function identity(t){return t}var ee,ne,re,ie,ae=adder(),oe=adder(),ce={point:noop_noop,lineStart:noop_noop,lineEnd:noop_noop,pol
vendor: 4,094 bytes, line 2
2ygonStart:function(){ce.lineStart=area_areaRingStart,ce.lineEnd=area_areaRingEnd},polygonEnd:function(){ce.lineStart=ce.lineEnd=ce.point=noop_noop,ae.add(H(oe)),oe.reset()},result:function(){var t=ae/2;return ae.reset(),t}};function area_areaRingStart(){ce.point=area_areaPointFirst}function area_areaPointFirst(t,e){ce.point=area_areaPoint,ee=re=t,ne=ie=e}function area_areaPoint(t,e){oe.add(ie*t-re*e),re=t,ie=e}function area_areaRingEnd(){area_areaPoint(ee,ne)}const se=ce;var ue=1/0,le=ue,fe=-ue,de=fe,he={point:function bounds_boundsPoint(t,e){t<ue&&(ue=t);t>fe&&(fe=t);e<le&&(le=e);e>de&&(de=e)},lineStart:noop_noop,lineEnd:noop_noop,polygonStart:noop_noop,polygonEnd:noop_noop,result:function(){var t=[[ue,le],[fe,de]];return fe=de=-(le=ue=1/0),t}};const pe=he;var ge,ve,me,_e,ye=0,xe=0,be=0,we=0,Te=0,Ae=0,Se=0,ke=0,Ce=0,Me={point:centroid_centroidPoint,lineStart:centroid_centroidLineStart,lineEnd:centroid_centroidLineEnd,polygonStart:function(){Me.lineStart=centroid_centroidRingStart,Me.lineEnd=centroid_centroidRingEnd},polygonEnd:function(){Me.point=centroid_centroidPoint,Me.lineStart=centroid_centroidLineStart,Me.lineEnd=centroid_centroidLineEnd},result:function(){var t=Ce?[Se/Ce,ke/Ce]:Ae?[we/Ae,Te/Ae]:be?[ye/be,xe/be]:[NaN,NaN];return ye=xe=be=we=Te=Ae=Se=ke=Ce=0,t}};function centroid_centroidPoint(t,e){ye+=t,xe+=e,++be}function centroid_centroidLineStart(){Me.point=centroidPointFirstLine}function centroidPointFirstLine(t,e){Me.point=centroidPointLine,centroid_centroidPoint(me=t,_e=e)}function centroidPointLine(t,e){var n=t-me,r=e-_e,i=et(n*n+r*r);we+=i*(me+t)/2,Te+=i*(_e+e)/2,Ae+=i,centroid_centroidPoint(me=t,_e=e)}function centroid_centroidLineEnd(){Me.point=centroid_centroidPoint}function centroid_centroidRingStart(){Me.point=centroidPointFirstRing}function centroid_centroidRingEnd(){centroidPointRing(ge,ve)}function centroidPointFirstRing(t,e){Me.point=centroidPointRing,centroid_centroidPoint(ge=me=t,ve=_e=e)}function centroidPointRing(t,e){var n=t-me,r=e-_e,i=et(n*n+r*r);we+=i*(me+t)/2,Te+=i*(_e+e)/2,Ae+=i,Se+=(i=_e*t-me*e)*(me+t),ke+=i*(_e+e),Ce+=3*i,centroid_centroidPoint(me=t,_e=e)}const Re=Me;function PathContext(t){this._context=t}PathContext.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,Y)}},result:noop_noop};var Le,Ee,Oe,Pe,Fe,De=adder(),Ie={point:noop_noop,lineStart:function(){Ie.point=measure_lengthPointFirst},lineEnd:function(){Le&&measure_lengthPoint(Ee,Oe),Ie.point=noop_noop},polygonStart:function(){Le=!0},polygonEnd:function(){Le=null},result:function(){var t=+De;return De.reset(),t}};function measure_lengthPointFirst(t,e){Ie.point=measure_lengthPoint,Ee=Pe=t,Oe=Fe=e}function measure_lengthPoint(t,e){Pe-=t,Fe-=e,De.add(et(Pe*Pe+Fe*Fe)),Pe=t,Fe=e}const ze=Ie;function PathString(){this._string=[]}function string_circle(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function path(t,e){var n,r,i=4.5;function path(t){return t&&("function"==typeof i&&r.pointRadius(+i.apply(this,arguments)),stream(t,n(r))),r.result()}return path.area=function(t){return stream(t,n(se)),se.result()},path.measure=function(t){return stream(t,n(ze)),ze.result()},path.bounds=function(t){return stream(t,n(pe)),pe.result()},path.centroid=function(t){return stream(t,n(Re)),Re.result()},path.projection=function(e){return arguments.length?(n=null==e?(t=null,identity):(t=e).stream,path):t},path.context=function(t){return arguments.length?(r=null==t?(e=null,new PathString):new PathContext(e=t),"function"!=typeof i&&r.pointRadius(i),path):e},path.pointRadius=function(t){return arguments.length?(i="function"==typeof t?t:(r.pointRadius(+t),+t),path):i},path.projection(t).context(e)}
2function transform(t){return{stream:transformer(t)}}function transformer(t){return function(e){var n=new TransformStream;for(var r in t)n[r]=t[r];return n.stream=e,n}}function TransformStream(){}function fit(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),stream(n,t.stream(pe)),e(pe.result()),null!=r&&t.clipExtent(r),t}function fitExtent(t,e,n){return fit(t,(function(n){var r=e[1][0]-e[0][0],i=e[1][1]-e[0][1],a=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),o=+e[0][0]+(r-a*(n[1][0]+n[0][0]))/2,c=+e[0][1]+(i-a*(n[1][1]+n[0][1]))/2;t.scale(150*a).translate([o,c])}),n)}function fitSize(t,e,n){return fitExtent(t,[[0,0],e],n)}function fitWidth(t,e,n){return fit(t,(function(n){var r=+e,i=r/(n[1][0]-n[0][0]),a=(r-i*(n[1][0]+n[0][0]))/2,o=-i*n[0][1];t.scale(150*i).translate([a,o])}),n)}function fitHeight(t,e,n){return fit(t,(function(n){var r=+e,i=r/(n[1][1]-n[0][1]),a=-i*n[0][0],o=(r-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([a,o])}),n)}PathString.prototype={_radius:4.5,_circle:string_circle(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=string_circle(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}},TransformStream.prototype={constructor:TransformStream,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var Ne=16,Be=G(30*U);function resample(t,e){return+e?function resample_resample(t,e){function resampleLineTo(n,r,i,a,o,c,s,u,l,d,h,p,g,v){var m=s-n,_=u-r,b=m*m+_*_;if(b>4*e&&g--){var w=a+d,T=o+h,A=c+p,S=et(w*w+T*T+A*A),k=asin(A/=S),C=H(H(A)-1)<z||H(i-l)<z?(i+l)/2:V(T,w),M=t(C,k),R=M[0],L=M[1],E=R-n,O=L-r,P=_*E-m*O;(P*P/b>e||H((m*E+_*O)/b-.5)>.3||a*d+o*h+c*p<Be)&&(resampleLineTo(n,r,i,a,o,c,R,L,C,w/=S,T/=S,A,g,v),v.point(R,L),resampleLineTo(R,L,C,w,T,A,s,u,l,d,h,p,g,v))}}return function(e){var n,r,i,a,o,c,s,u,l,d,h,p,g={point,lineStart,lineEnd,polygonStart:function(){e.polygonStart(),g.lineStart=ringStart},polygonEnd:function(){e.polygonEnd(),g.lineStart=lineStart}};function point(n,r){n=t(n,r),e.point(n[0],n[1])}function lineStart(){u=NaN,g.point=linePoint,e.lineStart()}function linePoint(n,r){var i=cartesian([n,r]),a=t(n,r);resampleLineTo(u,l,s,d,h,p,u=a[0],l=a[1],s=n,d=i[0],h=i[1],p=i[2],Ne,e),e.point(u,l)}function lineEnd(){g.point=point,e.lineEnd()}function ringStart(){lineStart(),g.point=ringPoint,g.lineEnd=ringEnd}function ringPoint(t,e){linePoint(n=t,e),r=u,i=l,a=d,o=h,c=p,g.point=linePoint}function ringEnd(){resampleLineTo(u,l,s,d,h,p,r,i,n,a,o,c,Ne,e),g.lineEnd=lineEnd,lineEnd()}return g}}(t,e):function resampleNone(t){return transformer({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}(t)}var Xe=transformer({point:function(t,e){this.stream.point(t*U,e*U)}});function scaleTranslate(t,e,n){function transform(r,i){return[e+t*r,n-t*i]}return transform.invert=function(r,i){return[(r-e)/t,(n-i)/t]},transform}function scaleTranslateRotate(t,e,n,r){var i=G(r),a=J(r),o=i*t,c=a*t,s=i/t,u=a/t,l=(a*n-i*e)/t,d=(a*e+i*n)/t;function transform(t,r){return[o*t-c*r+e,n-c*t-o*r]}return transform.invert=function(t,e){return[s*t-u*e+l,d-u*t-s*e]},transform}function projection(t){return projectionMutator((function(){return t}))()}function projectionMutator(t){var e,n,r,i,a,o,c,s,u,l,d=150,h=480,p=250,g=0,v=0,m=0,_=0,b=0,w=0,T=null,A=qt,S=null,k=identity,C=.5;function projection(t){return s(t[0]*U,t[1]*U)}function invert(t){return(t=s.invert(t[0],t[1]))&&[t[0]*q,t[1]*q]}function recenter(){var t=scaleTranslateRotate(d,0,0,w).apply(null,e(g,v)),r=(w?scaleTranslateRotate:scaleTranslate)(d,h-t[0],p-t[1],w);
vendor: 4,105 bytes, line 2
2return n=rotateRadians(m,_,b),c=compose(e,r),s=compose(n,c),o=resample(c,C),reset()}function reset(){return u=l=null,projection}return projection.stream=function(t){return u&&l===t?u:u=Xe(function transformRotate(t){return transformer({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}(n)(A(o(k(l=t)))))},projection.preclip=function(t){return arguments.length?(A=t,T=void 0,reset()):A},projection.postclip=function(t){return arguments.length?(k=t,S=r=i=a=null,reset()):k},projection.clipAngle=function(t){return arguments.length?(A=+t?clip_circle(T=t*U):(T=null,qt),reset()):T*q},projection.clipExtent=function(t){return arguments.length?(k=null==t?(S=r=i=a=null,identity):clipRectangle(S=+t[0][0],r=+t[0][1],i=+t[1][0],a=+t[1][1]),reset()):null==S?null:[[S,r],[i,a]]},projection.scale=function(t){return arguments.length?(d=+t,recenter()):d},projection.translate=function(t){return arguments.length?(h=+t[0],p=+t[1],recenter()):[h,p]},projection.center=function(t){return arguments.length?(g=t[0]%360*U,v=t[1]%360*U,recenter()):[g*q,v*q]},projection.rotate=function(t){return arguments.length?(m=t[0]%360*U,_=t[1]%360*U,b=t.length>2?t[2]%360*U:0,recenter()):[m*q,_*q,b*q]},projection.angle=function(t){return arguments.length?(w=t%360*U,recenter()):w*q},projection.precision=function(t){return arguments.length?(o=resample(c,C=t*t),reset()):et(C)},projection.fitExtent=function(t,e){return fitExtent(projection,t,e)},projection.fitSize=function(t,e){return fitSize(projection,t,e)},projection.fitWidth=function(t,e){return fitWidth(projection,t,e)},projection.fitHeight=function(t,e){return fitHeight(projection,t,e)},function(){return e=t.apply(this,arguments),projection.invert=e.invert&&invert,recenter()}}function conicProjection(t){var e=0,n=B/3,r=projectionMutator(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*U,n=t[1]*U):[e*q,n*q]},i}function conicEqualAreaRaw(t,e){var n=J(t),r=(n+J(e))/2;if(H(r)<z)return function cylindricalEqualAreaRaw(t){var e=G(t);function forward(t,n){return[t*e,J(n)/e]}return forward.invert=function(t,n){return[t/e,asin(n*e)]},forward}(t);var i=1+n*(2*r-n),a=et(i)/r;function project(t,e){var n=et(i-2*r*J(e))/r;return[n*J(t*=r),a-n*G(t)]}return project.invert=function(t,e){var n=a-e;return[V(t,H(n))/r*tt(n),asin((i-(t*t+n*n)*r*r)/(2*r))]},project}function conicEqualArea(){return conicProjection(conicEqualAreaRaw).scale(155.424).center([0,33.6442])}function albers(){return conicEqualArea().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function albersUsa(){var t,e,n,r,i,a,o=albers(),c=conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),s=conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u={point:function(t,e){a=[t,e]}};function albersUsa(t){var e=t[0],o=t[1];return a=null,n.point(e,o),a||(r.point(e,o),a)||(i.point(e,o),a)}function reset(){return t=e=null,albersUsa}return albersUsa.invert=function(t){var e=o.scale(),n=o.translate(),r=(t[0]-n[0])/e,i=(t[1]-n[1])/e;return(i>=.12&&i<.234&&r>=-.425&&r<-.214?c:i>=.166&&i<.234&&r>=-.214&&r<-.115?s:o).invert(t)},albersUsa.stream=function(n){return t&&e===n?t:t=function multiplex(t){var e=t.length;return{point:function(n,r){for(var i=-1;++i<e;)t[i].point(n,r)},sphere:function(){for(var n=-1;++n<e;)t[n].sphere()},lineStart:function(){for(var n=-1;++n<e;)t[n].lineStart()},lineEnd:function(){for(var n=-1;++n<e;)t[n].lineEnd()},polygonStart:function(){for(var n=-1;++n<e;)t[n].polygonStart()},polygonEnd:function(){for(var n=-1;++n<e;)t[n].polygonEnd()}}}([o.stream(e=n),c.stream(n),s.stream(n)])},albersUsa.precision=function(t){return arguments.length?(o.precision(t),c.precision(t),s.precision(t),reset()):o.precision()},albersUsa.scale=function(t){return arguments.length?(o.scale(t),c.scale(.35*t),s.scale(t),albersUsa.translate(o.translate())):o.scale()},albersUsa.translate=function(t){if(!arguments.length)return o.translate();var e=o.scale(),a=+t[0],l=+t[1];return n=o.translate(t).clipExtent([[a-.455*e,l-.238*e],[a+.455*e,l+.238*e]]).stream(u),r=c.translate([a-.307
2*e,l+.201*e]).clipExtent([[a-.425*e+z,l+.12*e+z],[a-.214*e-z,l+.234*e-z]]).stream(u),i=s.translate([a-.205*e,l+.212*e]).clipExtent([[a-.214*e+z,l+.166*e+z],[a-.115*e-z,l+.234*e-z]]).stream(u),reset()},albersUsa.fitExtent=function(t,e){return fitExtent(albersUsa,t,e)},albersUsa.fitSize=function(t,e){return fitSize(albersUsa,t,e)},albersUsa.fitWidth=function(t,e){return fitWidth(albersUsa,t,e)},albersUsa.fitHeight=function(t,e){return fitHeight(albersUsa,t,e)},albersUsa.scale(1070)}function azimuthalRaw(t){return function(e,n){var r=G(e),i=G(n),a=t(r*i);return[a*i*J(e),a*J(n)]}}function azimuthalInvert(t){return function(e,n){var r=et(e*e+n*n),i=t(r),a=J(i),o=G(i);return[V(e*a,r*o),asin(r&&n*a/r)]}}var je=azimuthalRaw((function(t){return et(2/(1+t))}));function azimuthalEqualArea(){return projection(je).scale(124.75).clipAngle(179.999)}je.invert=azimuthalInvert((function(t){return 2*asin(t/2)}));var Ye=azimuthalRaw((function(t){return(t=acos(t))&&t/J(t)}));function azimuthalEquidistant(){return projection(Ye).scale(79.4188).clipAngle(179.999)}function mercatorRaw(t,e){return[t,$(nt((X+e)/2))]}function mercator(){return mercatorProjection(mercatorRaw).scale(961/Y)}function mercatorProjection(t){var e,n,r,i=projection(t),a=i.center,o=i.scale,c=i.translate,s=i.clipExtent,u=null;function reclip(){var a=B*o(),c=i(rotation(i.rotate()).invert([0,0]));return s(null==u?[[c[0]-a,c[1]-a],[c[0]+a,c[1]+a]]:t===mercatorRaw?[[Math.max(c[0]-a,u),e],[Math.min(c[0]+a,n),r]]:[[u,Math.max(c[1]-a,e)],[n,Math.min(c[1]+a,r)]])}return i.scale=function(t){return arguments.length?(o(t),reclip()):o()},i.translate=function(t){return arguments.length?(c(t),reclip()):c()},i.center=function(t){return arguments.length?(a(t),reclip()):a()},i.clipExtent=function(t){return arguments.length?(null==t?u=e=n=r=null:(u=+t[0][0],e=+t[0][1],n=+t[1][0],r=+t[1][1]),reclip()):null==u?null:[[u,e],[n,r]]},reclip()}function tany(t){return nt((X+t)/2)}function conicConformalRaw(t,e){var n=G(t),r=t===e?J(t):$(n/G(e))/$(tany(e)/tany(t)),i=n*Q(tany(t),r)/r;if(!r)return mercatorRaw;function project(t,e){i>0?e<-X+z&&(e=-X+z):e>X-z&&(e=X-z);var n=i/Q(tany(e),r);return[n*J(r*t),i-n*G(r*t)]}return project.invert=function(t,e){var n=i-e,a=tt(r)*et(t*t+n*n);return[V(t,H(n))/r*tt(n),2*W(Q(i/a,1/r))-X]},project}function conicConformal(){return conicProjection(conicConformalRaw).scale(109.5).parallels([30,30])}function equirectangularRaw(t,e){return[t,e]}function equirectangular(){return projection(equirectangularRaw).scale(152.63)}function conicEquidistantRaw(t,e){var n=G(t),r=t===e?J(t):(n-G(e))/(e-t),i=n/r+t;if(H(r)<z)return equirectangularRaw;function project(t,e){var n=i-e,a=r*t;return[n*J(a),i-n*G(a)]}return project.invert=function(t,e){var n=i-e;return[V(t,H(n))/r*tt(n),i-tt(r)*et(t*t+n*n)]},project}function conicEquidistant(){return conicProjection(conicEquidistantRaw).scale(131.154).center([0,13.9389])}Ye.invert=azimuthalInvert((function(t){return t})),mercatorRaw.invert=function(t,e){return[t,2*W(K(e))-X]},equirectangularRaw.invert=equirectangularRaw;var qe=1.340264,Ue=-.081106,He=893e-6,We=.003796,Ve=et(3)/2;function equalEarthRaw(t,e){var n=asin(Ve*J(e)),r=n*n,i=r*r*r;return[t*G(n)/(Ve*(qe+3*Ue*r+i*(7*He+9*We*r))),n*(qe+Ue*r+i*(He+We*r))]}function equalEarth(){return projection(equalEarthRaw).scale(177.158)}function gnomonicRaw(t,e){var n=G(e),r=G(t)*n;return[n*J(t)/r,J(e)/r]}function gnomonic(){return projection(gnomonicRaw).scale(144.049).clipAngle(60)}function identity_scaleTranslate(t,e,n,r){return 1===t&&1===e&&0===n&&0===r?identity:transformer({point:function(i,a){this.stream.point(i*t+n,a*e+r)}})}function projection_identity(){var t,e,n,r,i,a,o=1,c=0,s=0,u=1,l=1,d=identity,h=null,p=identity;function reset(){return r=i=null,a}return a={stream:function(t){return r&&i===t?r:r=d(p(i=t))},postclip:function(r){return arguments.length?(p=r,h=t=e=n=null,reset()):p},clipExtent:function(r){return arguments.length?(p=null==r?(h=t=e=n=null,identity):clipRectangle(h=+r[0][0],t=+r[0][1],e=+r[1][0],n=+r[1][1]),reset()):null==h?null:[[h,t],[e,n]]},scale:function(t){return arguments.length?(d=identity_scaleTranslate((o=+t)*u,o*l,c,s),reset()):o},translate:function(t){return arguments.length?(d=identity_scaleTranslate(o*u,o*l,c=+t[0],s=+t[1]),reset()):[c,s]},reflectX:function(t){return arguments.length?(d=identity_scaleTranslate(o*(u=t?-1:1),o*l,c,s),reset()):u<0},reflectY:function(t){return arguments.length?(d=identity_scaleTranslate(o*u,o*(l=t?-1:1),c,s),reset()):l<0},fitExtent:function(t,e){return fitExtent(a,t,e)},fitSize:function(t,e){return fitSize(a,t,e)},fitWidth:function(t,e){return fitWidth(a,t,e)},fitHeight:function(t,e){return fitHeight(a,t,e)}}}function naturalEarth1Raw(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),e*(1.007226+n*(.015085+r*(.028874*n-.04447
vendor: 7,186 bytes, line 2
25-.005916*r)))]}function naturalEarth1(){return projection(naturalEarth1Raw).scale(175.295)}function orthographicRaw(t,e){return[G(e)*J(t),J(e)]}function orthographic(){return projection(orthographicRaw).scale(249.5).clipAngle(90+z)}function stereographicRaw(t,e){var n=G(e),r=1+G(t)*n;return[n*J(t)/r,J(e)/r]}function stereographic(){return projection(stereographicRaw).scale(250).clipAngle(142)}function transverseMercatorRaw(t,e){return[$(nt((X+e)/2)),-t]}function transverseMercator(){var t=mercatorProjection(transverseMercatorRaw),e=t.center,n=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?n([t[0],t[1],t.length>2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)}function defaultSeparation(t,e){return t.parent===e.parent?1:2}function meanXReduce(t,e){return t+e.x}function maxYReduce(t,e){return Math.max(t,e.y)}function cluster(){var t=defaultSeparation,e=1,n=1,r=!1;function cluster(i){var a,o=0;i.eachAfter((function(e){var n=e.children;n?(e.x=function meanX(t){return t.reduce(meanXReduce,0)/t.length}(n),e.y=function maxY(t){return 1+t.reduce(maxYReduce,0)}(n)):(e.x=a?o+=t(e,a):0,e.y=0,a=e)}));var c=function leafLeft(t){for(var e;e=t.children;)t=e[0];return t}(i),s=function leafRight(t){for(var e;e=t.children;)t=e[e.length-1];return t}(i),u=c.x-t(c,s)/2,l=s.x+t(s,c)/2;return i.eachAfter(r?function(t){t.x=(t.x-i.x)*e,t.y=(i.y-t.y)*n}:function(t){t.x=(t.x-u)/(l-u)*e,t.y=(1-(i.y?t.y/i.y:1))*n})}return cluster.separation=function(e){return arguments.length?(t=e,cluster):t},cluster.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],cluster):r?null:[e,n]},cluster.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],cluster):r?[e,n]:null},cluster}function count(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e}function hierarchy(t,e){var n,r,i,a,o,c=new Node(t),s=+t.value&&(c.value=t.value),u=[c];for(null==e&&(e=defaultChildren);n=u.pop();)if(s&&(n.value=+n.data.value),(i=e(n.data))&&(o=i.length))for(n.children=new Array(o),a=o-1;a>=0;--a)u.push(r=n.children[a]=new Node(i[a])),r.parent=n,r.depth=n.depth+1;return c.eachBefore(computeHeight)}function defaultChildren(t){return t.children}function copyData(t){t.data=t.data.data}function computeHeight(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function Node(t){this.data=t,this.depth=this.height=0,this.parent=null}equalEarthRaw.invert=function(t,e){for(var n,r=e,i=r*r,a=i*i*i,o=0;o<12&&(a=(i=(r-=n=(r*(qe+Ue*i+a*(He+We*i))-e)/(qe+3*Ue*i+a*(7*He+9*We*i)))*r)*i*i,!(H(n)<N));++o);return[Ve*t*(qe+3*Ue*i+a*(7*He+9*We*i))/G(r),asin(J(r)/Ve)]},gnomonicRaw.invert=azimuthalInvert(W),naturalEarth1Raw.invert=function(t,e){var n,r=e,i=25;do{var a=r*r,o=a*a;r-=n=(r*(1.007226+a*(.015085+o*(.028874*a-.044475-.005916*o)))-e)/(1.007226+a*(.045255+o*(.259866*a-.311325-.005916*11*o)))}while(H(n)>z&&--i>0);return[t/(.8707+(a=r*r)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),r]},orthographicRaw.invert=azimuthalInvert(asin),stereographicRaw.invert=azimuthalInvert((function(t){return 2*W(t)})),transverseMercatorRaw.invert=function(t,e){return[-e,2*W(K(t))-X]},Node.prototype=hierarchy.prototype={constructor:Node,count:function hierarchy_count(){return this.eachAfter(count)},each:function each(t){var e,n,r,i,a=this,o=[a];do{for(e=o.reverse(),o=[];a=e.pop();)if(t(a),n=a.children)for(r=0,i=n.length;r<i;++r)o.push(n[r])}while(o.length);return this},eachAfter:function eachAfter(t){for(var e,n,r,i=this,a=[i],o=[];i=a.pop();)if(o.push(i),e=i.children)for(n=0,r=e.length;n<r;++n)a.push(e[n]);for(;i=o.pop();)t(i);return this},eachBefore:function eachBefore(t){for(var e,n,r=this,i=[r];r=i.pop();)if(t(r),e=r.children)for(n=e.length-1;n>=0;--n)i.push(e[n]);return this},sum:function hierarchy_sum(t){return this.eachAfter((function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n}))},sort:function sort(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function hierarchy_path(t){for(var e=this,n=function leastCommonAncestor(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;t=n.pop(),e=r.pop();for(;t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function ancestors(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function descendants(){var t=[];return this.each((function(e){t.push(e)})),t},leaves:function leaves(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function links(){var t=this,e=[];return t.each((function(n){n!==t&&e.push({source:n.parent,target:n})})),e},copy:function node_copy(){return hierarchy(this).eachBefore(copyData)}};var Ge=Array.prototype.slice;function enclose(t){for(var e,n,r=0,i=(t=function shuffle(t){for(var e,n,r=t.length;r;)n=Math.random()*r--|0,e=t[r],t[r]=t[n],t[n]=e;return t}(Ge.call(t))).length,a=[];r<i;)e=t[r],n&&enclosesWeak(n,e)?++r:(n=encloseBasis(a=extendBasis(a,e)),r=0);return n}function extendBasis(t,e){var n,r;if(enclosesWeakAll(e,t))return[e];for(n=0;n<t.length;++n)if(enclosesNot(e,t[n])&&enclosesWeakAll(encloseBasis2(t[n],e),t))return[t[n],e];for(n=0;n<t.length-1;++n)for(r=n+1;r<t.length;++r)if(enclosesNot(encloseBasis2(t[n],t[r]),e)&&enclosesNot(encloseBasis2(t[n],e),t[r])&&enclosesNot(encloseBasis2(t[r],e),t[n])&&enclosesWeakAll(encloseBasis3(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function enclosesNot(t,e){var n=t.r-e.r,r=e.x-t.x,i=e.y-t.y;return n<0||n*n<r*r+i*i}function enclosesWeak(t,e){var n=t.r-e.r+1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function enclosesWeakAll(t,e){for(var n=0;n<e.length;++n)if(!enclosesWeak(t,e[n]))return!1;return!0}function encloseBasis(t){switch(t.length){case 1:return function encloseBasis1(t){return{x:t.x,y:t.y,r:t.r}}(t[0]);case 2:return encloseBasis2(t[0],t[1]);case 3:return encloseBasis3(t[0],t[1],t[2])}}function encloseBasis2(t,e){var n=t.x,r=t.y,i=t.r,a=e.x,o=e.y,c=e.r,s=a-n,u=o-r,l=c-i,d=Math.sqrt(s*s+u*u);return{x:(n+a+s/d*l)/2,y:(r+o+u/d*l)/2,r:(d+i+c)/2}}function encloseBasis3(t,e,n){var r=t.x,i=t.y,a=t.r,o=e.x,c=e.y,s=e.r,u=n.x,l=n.y,d=n.r,h=r-o,p=r-u,g=i-c,v=i-l,m=s-a,_=d-a,b=r*r+i*i-a*a,w=b-o*o-c*c+s*s,T=b-u*u-l*l+d*d,A=p*g-h*v,S=(g*T-v*w)/(2*A)-r,k=(v*m-g*_)/A,C=(p*w-h*T)/(2*A)-i,M=(h*_-p*m)/A,R=k*k+M*M-1,L=2*(a+S*k+C*M),E=S*S+C*C-a*a,O=-(R?(L+Math.sqrt(L*L-4*R*E))/(2*R):E/L);return{x:r+S+k*O,y:i+C+M*O,r:O}}function place(t,e,n){var r,i,a,o,c=t.x-e.x,s=t.y-e.y,u=c*c+s*s;u?(i=e.r+n.r,i*=i,o=t.r+n.r,i>(o*=o)?(r=(u+o-i)/(2*u),a=Math.sqrt(Math.max(0,o/u-r*r)),n.x=t.x-r*c-a*s,n.y=t.y-r*s+a*c):(r=(u+i-o)/(2*u),a=Math.sqrt(Math.max(0,i/u-r*r)),n.x=e.x+r*c-a*s,n.y=e.y+r*s+a*c)):(n.x=e.x+n.r,n.y=e.y)}function intersects(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function score(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,a=(e.y*n.r+n.y*e.r)/r;return i*i+a*a}function siblings_Node(t){this._=t,this.next=null,this.previous=null}function packEnclose(t){if(!(i=t.length))return 0;var e,n,r,i,a,o,c,s,u,l,d;
vendor: 5,830 bytes, line 2
2if((e=t[0]).x=0,e.y=0,!(i>1))return e.r;if(n=t[1],e.x=-n.r,n.x=e.r,n.y=0,!(i>2))return e.r+n.r;place(n,e,r=t[2]),e=new siblings_Node(e),n=new siblings_Node(n),r=new siblings_Node(r),e.next=r.previous=n,n.next=e.previous=r,r.next=n.previous=e;t:for(c=3;c<i;++c){place(e._,n._,r=t[c]),r=new siblings_Node(r),s=n.next,u=e.previous,l=n._.r,d=e._.r;do{if(l<=d){if(intersects(s._,r._)){n=s,e.next=n,n.previous=e,--c;continue t}l+=s._.r,s=s.next}else{if(intersects(u._,r._)){(e=u).next=n,n.previous=e,--c;continue t}d+=u._.r,u=u.previous}}while(s!==u.next);for(r.previous=e,r.next=n,e.next=n.previous=n=r,a=score(e);(r=r.next)!==n;)(o=score(r))<a&&(e=r,a=o);n=e.next}for(e=[n._],r=n;(r=r.next)!==n;)e.push(r._);for(r=enclose(e),c=0;c<i;++c)(e=t[c]).x-=r.x,e.y-=r.y;return r.r}function siblings(t){return packEnclose(t),t}function required(t){if("function"!=typeof t)throw new Error;return t}function constantZero(){return 0}function d3_hierarchy_src_constant(t){return function(){return t}}function pack_defaultRadius(t){return Math.sqrt(t.value)}function pack(){var t=null,e=1,n=1,r=constantZero;function pack(i){return i.x=e/2,i.y=n/2,t?i.eachBefore(radiusLeaf(t)).eachAfter(packChildren(r,.5)).eachBefore(translateChild(1)):i.eachBefore(radiusLeaf(pack_defaultRadius)).eachAfter(packChildren(constantZero,1)).eachAfter(packChildren(r,i.r/Math.min(e,n))).eachBefore(translateChild(Math.min(e,n)/(2*i.r))),i}return pack.radius=function(e){return arguments.length?(t=function optional(t){return null==t?null:required(t)}(e),pack):t},pack.size=function(t){return arguments.length?(e=+t[0],n=+t[1],pack):[e,n]},pack.padding=function(t){return arguments.length?(r="function"==typeof t?t:d3_hierarchy_src_constant(+t),pack):r},pack}function radiusLeaf(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function packChildren(t,e){return function(n){if(r=n.children){var r,i,a,o=r.length,c=t(n)*e||0;if(c)for(i=0;i<o;++i)r[i].r+=c;if(a=packEnclose(r),c)for(i=0;i<o;++i)r[i].r-=c;n.r=a+c}}}function translateChild(t){return function(e){var n=e.parent;e.r*=t,n&&(e.x=n.x+t*e.x,e.y=n.y+t*e.y)}}function treemap_round(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)}function dice(t,e,n,r,i){for(var a,o=t.children,c=-1,s=o.length,u=t.value&&(r-e)/t.value;++c<s;)(a=o[c]).y0=n,a.y1=i,a.x0=e,a.x1=e+=a.value*u}function partition(){var t=1,e=1,n=0,r=!1;function partition(i){var a=i.height+1;return i.x0=i.y0=n,i.x1=t,i.y1=e/a,i.eachBefore(function positionNode(t,e){return function(r){r.children&&dice(r,r.x0,t*(r.depth+1)/e,r.x1,t*(r.depth+2)/e);var i=r.x0,a=r.y0,o=r.x1-n,c=r.y1-n;o<i&&(i=o=(i+o)/2),c<a&&(a=c=(a+c)/2),r.x0=i,r.y0=a,r.x1=o,r.y1=c}}(e,a)),r&&i.eachBefore(treemap_round),i}return partition.round=function(t){return arguments.length?(r=!!t,partition):r},partition.size=function(n){return arguments.length?(t=+n[0],e=+n[1],partition):[t,e]},partition.padding=function(t){return arguments.length?(n=+t,partition):n},partition}var Ze="$",Ke={depth:-1},$e={};function defaultId(t){return t.id}function defaultParentId(t){return t.parentId}function stratify(){var t=defaultId,e=defaultParentId;function stratify(n){var r,i,a,o,c,s,u,l=n.length,d=new Array(l),h={};for(i=0;i<l;++i)r=n[i],c=d[i]=new Node(r),null!=(s=t(r,i,n))&&(s+="")&&(h[u=Ze+(c.id=s)]=u in h?$e:c);for(i=0;i<l;++i)if(c=d[i],null!=(s=e(n[i],i,n))&&(s+="")){if(!(o=h[Ze+s]))throw new Error("missing: "+s);if(o===$e)throw new Error("ambiguous: "+s);o.children?o.children.push(c):o.children=[c],c.parent=o}else{if(a)throw new Error("multiple roots");a=c}if(!a)throw new Error("no root");if(a.parent=Ke,a.eachBefore((function(t){t.depth=t.parent.depth+1,--l})).eachBefore(computeHeight),a.parent=null,l>0)throw new Error("cycle");return a}return stratify.id=function(e){return arguments.length?(t=required(e),stratify):t},stratify.parentId=function(t){return arguments.length?(e=required(t),stratify):e},stratify}function tree_defaultSeparation(t,e){return t.parent===e.parent?1:2}function nextLeft(t){var e=t.children;return e?e[0]:t.t}function nextRight(t){var e=t.children;return e?e[e.length-1]:t.t}function moveSubtree(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function nextAncestor(t,e,n){return t.a.parent===e.parent?t.a:n}function TreeNode(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}function tree(){var t=tree_defaultSeparation,e=1,n=1,r=null;function tree(i){var a=function treeRoot(t){for(var e,n,r,i,a,o=new TreeNode(t,0),c=[o];e=c.pop();)if(r=e._.children)for(e.children=new Array(a=r.length),i=a-1;i>=0;--i)c.push(n=e.children[i]=new TreeNode(r[i],i)),n.parent=e;return(o.parent=new TreeNode(null,0)).children=[o],o}(i);if(a.eachAfter(firstWalk),a.parent.m=-a.z,a.eachBefore(secondWalk),r)i.eachBefore(sizeNode);else{var o=i,c=i,s=i;i.eachBefore((function(t){t.x<o.x&&(o=t),t.x>c.x&&(c=t),t.depth>s.depth&&(s=t)}));var u=o===c?1:t(o,c)/2,l=u-o.x,d=e/(c.x+u+l),h=n/(s.depth||1);i.eachBefore((function(t){t.x=(t.x+l)*d,t.y=t.depth*h}))}return i}function firstWalk(e){var n=e.children,r=e.parent.children,i=e.i?r[e.i-1]:null;if(n){!function executeShifts(t){for(var e,n=0,r=0,i=t.children,a=i.length;--a>=0;)(e=i[a]).z+=n,e.m+=n,n+=e.s+(r+=e.c)}(e);var a=(n[0].z+n[n.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-a):e.z=a}else i&&(e.z=i.z+t(e._,i._));e.parent.A=function apportion(e,n,r){if(n){for(var i,a=e,o=e,c=n,s=a.parent.children[0],u=a.m,l=o.m,d=c.m,h=s.m;c=nextRight(c),a=nextLeft(a),c&&a;)s=nextLeft(s),(o=nextRight(o)).a=e,(i=c.z+d-a.z-u+t(c._,a._))>0&&(moveSubtree(nextAncestor(c,e,r),e,i),u+=i,l+=i),d+=c.m,u+=a.m,h+=s.m,l+=o.m;c&&!nextRight(o)&&(o.t=c,o.m+=d-l),a&&!nextLeft(s)&&(s.t=a,s.m+=u-h,r=e)}return r}(e,i,e.parent.A||r[0])}function secondWalk(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}
vendor: 4,763 bytes, line 2
2function sizeNode(t){t.x*=e,t.y=t.depth*n}return tree.separation=function(e){return arguments.length?(t=e,tree):t},tree.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],tree):r?null:[e,n]},tree.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],tree):r?[e,n]:null},tree}function treemap_slice(t,e,n,r,i){for(var a,o=t.children,c=-1,s=o.length,u=t.value&&(i-n)/t.value;++c<s;)(a=o[c]).x0=e,a.x1=r,a.y0=n,a.y1=n+=a.value*u}TreeNode.prototype=Object.create(Node.prototype);var Qe=(1+Math.sqrt(5))/2;function squarifyRatio(t,e,n,r,i,a){for(var o,c,s,u,l,d,h,p,g,v,m,_=[],b=e.children,w=0,T=0,A=b.length,S=e.value;w<A;){s=i-n,u=a-r;do{l=b[T++].value}while(!l&&T<A);for(d=h=l,m=l*l*(v=Math.max(u/s,s/u)/(S*t)),g=Math.max(h/m,m/d);T<A;++T){if(l+=c=b[T].value,c<d&&(d=c),c>h&&(h=c),m=l*l*v,(p=Math.max(h/m,m/d))>g){l-=c;break}g=p}_.push(o={value:l,dice:s<u,children:b.slice(w,T)}),o.dice?dice(o,n,r,i,S?r+=u*l/S:a):treemap_slice(o,n,r,S?n+=s*l/S:i,a),S-=l,w=T}return _}const Je=function custom(t){function squarify(e,n,r,i,a){squarifyRatio(t,e,n,r,i,a)}return squarify.ratio=function(t){return custom((t=+t)>1?t:1)},squarify}(Qe);function treemap(){var t=Je,e=!1,n=1,r=1,i=[0],a=constantZero,o=constantZero,c=constantZero,s=constantZero,u=constantZero;function treemap(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(positionNode),i=[0],e&&t.eachBefore(treemap_round),t}function positionNode(e){var n=i[e.depth],r=e.x0+n,l=e.y0+n,d=e.x1-n,h=e.y1-n;d<r&&(r=d=(r+d)/2),h<l&&(l=h=(l+h)/2),e.x0=r,e.y0=l,e.x1=d,e.y1=h,e.children&&(n=i[e.depth+1]=a(e)/2,r+=u(e)-n,l+=o(e)-n,(d-=c(e)-n)<r&&(r=d=(r+d)/2),(h-=s(e)-n)<l&&(l=h=(l+h)/2),t(e,r,l,d,h))}return treemap.round=function(t){return arguments.length?(e=!!t,treemap):e},treemap.size=function(t){return arguments.length?(n=+t[0],r=+t[1],treemap):[n,r]},treemap.tile=function(e){return arguments.length?(t=required(e),treemap):t},treemap.padding=function(t){return arguments.length?treemap.paddingInner(t).paddingOuter(t):treemap.paddingInner()},treemap.paddingInner=function(t){return arguments.length?(a="function"==typeof t?t:d3_hierarchy_src_constant(+t),treemap):a},treemap.paddingOuter=function(t){return arguments.length?treemap.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):treemap.paddingTop()},treemap.paddingTop=function(t){return arguments.length?(o="function"==typeof t?t:d3_hierarchy_src_constant(+t),treemap):o},treemap.paddingRight=function(t){return arguments.length?(c="function"==typeof t?t:d3_hierarchy_src_constant(+t),treemap):c},treemap.paddingBottom=function(t){return arguments.length?(s="function"==typeof t?t:d3_hierarchy_src_constant(+t),treemap):s},treemap.paddingLeft=function(t){return arguments.length?(u="function"==typeof t?t:d3_hierarchy_src_constant(+t),treemap):u},treemap}function binary(t,e,n,r,i){var a,o,c=t.children,s=c.length,u=new Array(s+1);for(u[0]=o=a=0;a<s;++a)u[a+1]=o+=c[a].value;!function partition(t,e,n,r,i,a,o){if(t>=e-1){var s=c[t];return s.x0=r,s.y0=i,s.x1=a,void(s.y1=o)}var l=u[t],d=n/2+l,h=t+1,p=e-1;for(;h<p;){var g=h+p>>>1;u[g]<d?h=g+1:p=g}d-u[h-1]<u[h]-d&&t+1<h&&--h;var v=u[h]-l,m=n-v;if(a-r>o-i){var _=(r*m+a*v)/n;partition(t,h,v,r,i,_,o),partition(h,e,m,_,i,a,o)}else{var b=(i*m+o*v)/n;partition(t,h,v,r,i,a,b),partition(h,e,m,r,b,a,o)}}(0,s,t.value,e,n,r,i)}function sliceDice(t,e,n,r,i){(1&t.depth?treemap_slice:dice)(t,e,n,r,i)}const tn=function custom(t){function resquarify(e,n,r,i,a){if((o=e._squarify)&&o.ratio===t)for(var o,c,s,u,l,d=-1,h=o.length,p=e.value;++d<h;){for(s=(c=o[d]).children,u=c.value=0,l=s.length;u<l;++u)c.value+=s[u].value;c.dice?dice(c,n,r,i,r+=(a-r)*c.value/p):treemap_slice(c,n,r,n+=(i-n)*c.value/p,a),p-=c.value}else e._squarify=o=squarifyRatio(t,e,n,r,i,a),o.ratio=t}return resquarify.ratio=function(t){return custom((t=+t)>1?t:1)},resquarify}(Qe);var en=n(551);function d3_polygon_src_area(t){for(var e,n=-1,r=t.length,i=t[r-1],a=0;++n<r;)e=i,i=t[n],a+=e[1]*i[0]-e[0]*i[1];return a/2}function src_centroid(t){for(var e,n,r=-1,i=t.length,a=0,o=0,c=t[i-1],s=0;++r<i;)e=c,c=t[r],s+=n=e[0]*c[1]-c[0]*e[1],a+=(e[0]+c[0])*n,o+=(e[1]+c[1])*n;return[a/(s*=3),o/s]}function cross(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(e[1]-t[1])*(n[0]-t[0])}function lexicographicOrder(t,e){return t[0]-e[0]||t[1]-e[1]}function computeUpperHullIndexes(t){for(var e=t.length,n=[0,1],r=2,i=2;i<e;++i){for(;r>1&&cross(t[n[r-2]],t[n[r-1]],t[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function hull(t){if((n=t.length)<3)return null;var e,n,r=new Array(n),i=new Array(n);for(e=0;e<n;++e)r[e]=[+t[e][0],+t[e][1],e];for(r.sort(lexicographicOrder),e=0;e<n;++e)i[e]=[r[e][0],-r[e][1]];var a=computeUpperHullIndexes(r),o=computeUpperHullIndexes(i),c=o[0]===a[0],s=o[o.length-1]===a[a.length-1],u=[];for(e=a.length-1;e>=0;
2--e)u.push(t[r[a[e]][2]]);for(e=+c;e<o.length-s;++e)u.push(t[r[o[e]][2]]);return u}function d3_polygon_src_contains(t,e){for(var n,r,i=t.length,a=t[i-1],o=e[0],c=e[1],s=a[0],u=a[1],l=!1,d=0;d<i;++d)n=(a=t[d])[0],(r=a[1])>c!=u>c&&o<(s-n)*(c-r)/(u-r)+n&&(l=!l),s=n,u=r;return l}function d3_polygon_src_length(t){for(var e,n,r=-1,i=t.length,a=t[i-1],o=a[0],c=a[1],s=0;++r<i;)e=o,n=c,e-=o=(a=t[r])[0],n-=c=a[1],s+=Math.sqrt(e*e+n*n);return s}function src_defaultSource(){return Math.random()}const nn=function sourceRandomUniform(t){function randomUniform(e,n){return e=null==e?0:+e,n=null==n?1:+n,1===arguments.length?(n=e,e=0):n-=e,function(){return t()*n+e}}return randomUniform.source=sourceRandomUniform,randomUniform}(src_defaultSource),rn=function sourceRandomNormal(t){function randomNormal(e,n){var r,i;return e=null==e?0:+e,n=null==n?1:+n,function(){var a;if(null!=r)a=r,r=null;else do{r=2*t()-1,a=2*t()-1,i=r*r+a*a}while(!i||i>1);return e+n*a*Math.sqrt(-2*Math.log(i)/i)}}return randomNormal.source=sourceRandomNormal,randomNormal}(src_defaultSource),an=function sourceRandomLogNormal(t){function randomLogNormal(){var e=rn.source(t).apply(this,arguments);return function(){return Math.exp(e())}}return randomLogNormal.source=sourceRandomLogNormal,randomLogNormal}(src_defaultSource),cn=function sourceRandomIrwinHall(t){function randomIrwinHall(e){return function(){for(var n=0,r=0;r<e;++r)n+=t();return n}}return randomIrwinHall.source=sourceRandomIrwinHall,randomIrwinHall}(src_defaultSource),sn=function sourceRandomBates(t){function randomBates(e){var n=cn.source(t)(e);return function(){return n()/e}}return randomBates.source=sourceRandomBates,randomBates}(src_defaultSource),un=function sourceRandomExponential(t){function randomExponential(e){return function(){return-Math.log(1-t())/e}}return randomExponential.source=sourceRandomExponential,randomExponential}(src_defaultSource);var ln=n(12);function colors(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(6*r,6*++r);return n}const fn=colors("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),dn=colors("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),hn=colors("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),pn=colors("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),gn=colors("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),vn=colors("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),mn=colors("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),_n=colors("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),yn=colors("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f");var xn=n(638);function ramp(t){return(0,xn.hD)(t[t.length-1])}var bn=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(colors);const wn=ramp(bn);var Tn=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(colors);const An=ramp(Tn);var Sn=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(colors);const kn=ramp(Sn);
2var Cn=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(colors);const Mn=ramp(Cn);var Rn=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(colors);const Ln=ramp(Rn);var En=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(colors);const On=ramp(En);var Pn=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(colors);const Fn=ramp(Pn);var Dn=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(colors);const In=ramp(Dn);var zn=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(colors);const Nn=ramp(zn);var Bn=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(colors);const Xn=ramp(Bn);var jn=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(colors);const Yn=ramp(jn);var qn=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(colors);const Un=ramp(qn);var Hn=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(colors);const Wn=ramp(Hn);var Vn=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(colors);const Gn=ramp(Vn);var Zn=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(colors);const Kn=ramp(Zn);var $n=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(colors);const Qn=ramp($n);var Jn=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(colors);const tr=ramp(Jn);var er=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(colors);const nr=ramp(er);var rr=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(colors);const ir=ramp(rr);var ar=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(colors);const or=ramp(ar);var cr=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(colors);const sr=ramp(cr);var ur=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ec
2ae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(colors);const lr=ramp(ur);var fr=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(colors);const dr=ramp(fr);var hr=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(colors);const pr=ramp(hr);var gr=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(colors);const vr=ramp(gr);var mr=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(colors);const _r=ramp(mr);var yr=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(colors);const xr=ramp(yr);var br=n(402);const wr=(0,br.B)((0,m.cubehelix)(300,.5,0),(0,m.cubehelix)(-240,.5,1));var Tr=(0,br.B)((0,m.cubehelix)(-100,.75,.35),(0,m.cubehelix)(80,1.5,.8)),Ar=(0,br.B)((0,m.cubehelix)(260,.75,.35),(0,m.cubehelix)(80,1.5,.8)),Sr=(0,m.cubehelix)();function rainbow(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return Sr.h=360*t-100,Sr.s=1.5-1.5*e,Sr.l=.8-.9*e,Sr+""}var kr=(0,m.rgb)(),Cr=Math.PI/3,Mr=2*Math.PI/3;function sinebow(t){var e;return t=(.5-t)*Math.PI,kr.r=255*(e=Math.sin(t))*e,kr.g=255*(e=Math.sin(t+Cr))*e,kr.b=255*(e=Math.sin(t+Mr))*e,kr+""}function viridis_ramp(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}const Rr=viridis_ramp(colors("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var Lr=viridis_ramp(colors("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb8
21febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),Er=viridis_ramp(colors("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),Or=viridis_ramp(colors("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),Pr=n(942),Fr=n(742),Dr=n(958),Ir=n(144),zr=n(605);function d3_voronoi_src_constant(t){return function(){return t}}function point_x(t){return t[0]}function point_y(t){return t[1]}function RedBlackTree(){this._=null}function RedBlackNode(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function RedBlackRotateLeft(t,e){var n=e,r=e.R,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.R=r.L,n.R&&(n.R.U=n),r.L=n}function RedBlackRotateRight(t,e){var n=e,r=e.L,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.L=r.R,n.L&&(n.L.U=n),r.R=n}function RedBlackFirst(t){for(;t.L;)t=t.L;return t}RedBlackTree.prototype={constructor:RedBlackTree,insert:function(t,e){var n,r,i;if(t){if(e.P=t,e.N=t.N,t.N&&(t.N.P=e),t.N=e,t.R){for(t=t.R;t.L;)t=t.L;t.L=e}else t.R=e;n=t}else this._?(t=RedBlackFirst(this._),e.P=null,e.N=t,t.P=t.L=e,n=t):(e.P=e.N=null,this._=e,n=null);for(e.L=e.R=null,e.U=n,e.C=!0,t=e;n&&n.C;
vendor: 9,286 bytes, line 2
2)n===(r=n.U).L?(i=r.R)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.R&&(RedBlackRotateLeft(this,n),n=(t=n).U),n.C=!1,r.C=!0,RedBlackRotateRight(this,r)):(i=r.L)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.L&&(RedBlackRotateRight(this,n),n=(t=n).U),n.C=!1,r.C=!0,RedBlackRotateLeft(this,r)),n=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 e,n,r,i=t.U,a=t.L,o=t.R;if(n=a?o?RedBlackFirst(o):a:o,i?i.L===t?i.L=n:i.R=n:this._=n,a&&o?(r=n.C,n.C=t.C,n.L=a,a.U=n,n!==o?(i=n.U,n.U=t.U,t=n.R,i.L=t,n.R=o,o.U=n):(n.U=i,i=n,t=n.R)):(r=t.C,t=n),t&&(t.U=i),!r)if(t&&t.C)t.C=!1;else{do{if(t===this._)break;if(t===i.L){if((e=i.R).C&&(e.C=!1,i.C=!0,RedBlackRotateLeft(this,i),e=i.R),e.L&&e.L.C||e.R&&e.R.C){e.R&&e.R.C||(e.L.C=!1,e.C=!0,RedBlackRotateRight(this,e),e=i.R),e.C=i.C,i.C=e.R.C=!1,RedBlackRotateLeft(this,i),t=this._;break}}else if((e=i.L).C&&(e.C=!1,i.C=!0,RedBlackRotateRight(this,i),e=i.L),e.L&&e.L.C||e.R&&e.R.C){e.L&&e.L.C||(e.R.C=!1,e.C=!0,RedBlackRotateLeft(this,e),e=i.L),e.C=i.C,i.C=e.L.C=!1,RedBlackRotateRight(this,i),t=this._;break}e.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}};const Nr=RedBlackTree;function createEdge(t,e,n,r){var i=[null,null],a=Hr.push(i)-1;return i.left=t,i.right=e,n&&setEdgeEnd(i,t,e,n),r&&setEdgeEnd(i,e,t,r),qr[t.index].halfedges.push(a),qr[e.index].halfedges.push(a),i}function createBorderEdge(t,e,n){var r=[e,n];return r.left=t,r}function setEdgeEnd(t,e,n,r){t[0]||t[1]?t.left===n?t[1]=r:t[0]=r:(t[0]=r,t.left=e,t.right=n)}function clipEdge(t,e,n,r,i){var a,o=t[0],c=t[1],s=o[0],u=o[1],l=0,d=1,h=c[0]-s,p=c[1]-u;if(a=e-s,h||!(a>0)){if(a/=h,h<0){if(a<l)return;a<d&&(d=a)}else if(h>0){if(a>d)return;a>l&&(l=a)}if(a=r-s,h||!(a<0)){if(a/=h,h<0){if(a>d)return;a>l&&(l=a)}else if(h>0){if(a<l)return;a<d&&(d=a)}if(a=n-u,p||!(a>0)){if(a/=p,p<0){if(a<l)return;a<d&&(d=a)}else if(p>0){if(a>d)return;a>l&&(l=a)}if(a=i-u,p||!(a<0)){if(a/=p,p<0){if(a>d)return;a>l&&(l=a)}else if(p>0){if(a<l)return;a<d&&(d=a)}return!(l>0||d<1)||(l>0&&(t[0]=[s+l*h,u+l*p]),d<1&&(t[1]=[s+d*h,u+d*p]),!0)}}}}}function connectEdge(t,e,n,r,i){var a=t[1];if(a)return!0;var o,c,s=t[0],u=t.left,l=t.right,d=u[0],h=u[1],p=l[0],g=l[1],v=(d+p)/2,m=(h+g)/2;if(g===h){if(v<e||v>=r)return;if(d>p){if(s){if(s[1]>=i)return}else s=[v,n];a=[v,i]}else{if(s){if(s[1]<n)return}else s=[v,i];a=[v,n]}}else if(c=m-(o=(d-p)/(g-h))*v,o<-1||o>1)if(d>p){if(s){if(s[1]>=i)return}else s=[(n-c)/o,n];a=[(i-c)/o,i]}else{if(s){if(s[1]<n)return}else s=[(i-c)/o,i];a=[(n-c)/o,n]}else if(h<g){if(s){if(s[0]>=r)return}else s=[e,o*e+c];a=[r,o*r+c]}else{if(s){if(s[0]<e)return}else s=[r,o*r+c];a=[e,o*e+c]}return t[0]=s,t[1]=a,!0}function cellHalfedgeAngle(t,e){var n=t.site,r=e.left,i=e.right;return n===i&&(i=r,r=n),i?Math.atan2(i[1]-r[1],i[0]-r[0]):(n===r?(r=e[1],i=e[0]):(r=e[0],i=e[1]),Math.atan2(r[0]-i[0],i[1]-r[1]))}function cellHalfedgeStart(t,e){return e[+(e.left!==t.site)]}function cellHalfedgeEnd(t,e){return e[+(e.left===t.site)]}var Br,Xr=[];function Circle(){RedBlackNode(this),this.x=this.y=this.arc=this.site=this.cy=null}function attachCircle(t){var e=t.P,n=t.N;if(e&&n){var r=e.site,i=t.site,a=n.site;if(r!==a){var o=i[0],c=i[1],s=r[0]-o,u=r[1]-c,l=a[0]-o,d=a[1]-c,h=2*(s*d-u*l);if(!(h>=-Vr)){var p=s*s+u*u,g=l*l+d*d,v=(d*p-u*g)/h,m=(s*g-l*p)/h,_=Xr.pop()||new Circle;_.arc=t,_.site=i,_.x=v+o,_.y=(_.cy=m+c)+Math.sqrt(v*v+m*m),t.circle=_;for(var b=null,w=Ur._;w;)if(_.y<w.y||_.y===w.y&&_.x<=w.x){if(!w.L){b=w.P;break}w=w.L}else{if(!w.R){b=w;break}w=w.R}Ur.insert(b,_),b||(Br=_)}}}}function detachCircle(t){var e=t.circle;e&&(e.P||(Br=e.N),Ur.remove(e),Xr.push(e),RedBlackNode(e),t.circle=null)}var jr=[];function Beach(){RedBlackNode(this),this.edge=this.site=this.circle=null}function createBeach(t){var e=jr.pop()||new Beach;return e.site=t,e}function detachBeach(t){detachCircle(t),Yr.remove(t),jr.push(t),RedBlackNode(t)}function removeBeach(t){var e=t.circle,n=e.x,r=e.cy,i=[n,r],a=t.P,o=t.N,c=[t];detachBeach(t);for(var s=a;s.circle&&Math.abs(n-s.circle.x)<Wr&&Math.abs(r-s.circle.cy)<Wr;)a=s.P,c.unshift(s),detachBeach(s),s=a;c.unshift(s),detachCircle(s);for(var u=o;u.circle&&Math.abs(n-u.circle.x)<Wr&&Math.abs(r-u.circle.cy)<Wr;)o=u.N,c.push(u),detachBeach(u),u=o;c.push(u),detachCircle(u);var l,d=c.length;for(l=1;l<d;++l)u=c[l],s=c[l-1],setEdgeEnd(u.edge,s.site,u.site,i);s=c[0],(u=c[d-1]).edge=createEdge(s.site,u.site,null,i),attachCircle(s),attachCircle(u)}function addBeach(t){for(var e,n,r,i,a=t[0],o=t[1],c=Yr._;c;)if((r=leftBreakPoint(c,o)-a)>Wr)c=c.L;else{if(!((i=a-rightBreakPoint(c,o))>Wr)){r>-Wr?(e=c.P,n=c):i>-Wr?(e=c,n=c.N):e=n=c;break}if(!c.R){e=c;break}c=c.R}!function createCell(t){return qr[t.index]={site:t,halfedges:[]}}(t);var s=createBeach(t);if(Yr.insert(e,s),e||n){if(e===n)return detachCircle(e),n=createBeach(e.site),Yr.insert(s,n),s.edge=n.edge=createEdge(e.site,s.site),attachCircle(e),void attachCircle(n);if(n){detachCircle(e),detachCircle(n);var u=e.site,l=u[0],d=u[1],h=t[0]-l,p=t[1]-d,g=n.site,v=g[0]-l,m=g[1]-d,_=2*(h*m-p*v),b=h*h+p*p,w=v*v+m*m,T=[(m*b-p*w)/_+l,(h*w-v*b)/_+d];setEdgeEnd(n.edge,u,g,T),s.edge=createEdge(u,t,null,T),n.edge=createEdge(t,g,null,T),attachCircle(e),attachCircle(n)}else s.edge=createEdge(e.site,s.site)}}function leftBreakPoint(t,e){var n=t.site,r=n[0],i=n[1],a=i-e;if(!a)return r;var o=t.P;if(!o)return-1/0;var c=(n=o.site)[0],s=n[1],u=s-e;if(!u)return c;var l=c-r,d=1/a-1/u,h=l/u;return d?(-h+Math.sqrt(h*h-2*d*(l*l/(-2*u)-s+u/2+i-a/2)))/d+r:(r+c)/2}function rightBreakPoint(t,e){var n=t.N;if(n)return leftBreakPoint(n,e);var r=t.site;return r[1]===e?r[0]:1/0}var Yr,qr,Ur,Hr,Wr=1e-6,Vr=1e-12;function triangleArea(t,e,n){return(t[0]-n[0])*(e[1]-t[1])-(t[0]-e[0])*(n[1]-t[1])}function lexicographic(t,e){return e[1]-t[1]||e[0]-t[0]}function Diagram(t,e){var n,r,i,a=t.sort(lexicographic).pop();for(Hr=[],qr=new Array(t.length),Yr=new Nr,Ur=new Nr;;)if(i=Br,a&&(!i||a[1]<i.y||a[1]===i.y&&a[0]<i.x))a[0]===n&&a[1]===r||(addBeach(a),n=a[0],r=a[1]),a=t.pop();else{if(!i)break;removeBeach(i.arc)}if(function sortCellHalfedges(){for(var t,e,n,r,i=0,a=qr.length;i<a;++i)if((t=qr[i])&&(r=(e=t.halfedges).length)){var o=new Array(r),c=new Array(r);for(n=0;n<r;++n)o[n]=n,c[n]=cellHalfedgeAngle(t,Hr[e[n]]);for(o.sort((function(t,e){return c[e]-c[t]})),n=0;n<r;++n)c[n]=e[o[n]];for(n=0;n<r;++n)e[n]=c[n]}}(),e){var o=+e[0][0],c=+e[0][1],s=+e[1][0],u=+e[1][1];!function clipEdges(t,e,n,r){for(var i,a=Hr.length;a--;)connectEdge(i=Hr[a],t,e,n,r)&&clipEdge(i,t,e,n,r)&&(Math.abs(i[0][0]-i[1][0])>Wr||Math.abs(i[0][1]-i[1][1])>Wr)||delete Hr[a]}(o,c,s,u),function clipCells(t,e,n,r){var i,a,o,c,s,u,l,d,h,p,g,v,m=qr.length,_=!0;for(i=0;i<m;++i)if(a=qr[i]){for(o=a.site,c=(s=a.halfedges).length;c--;)Hr[s[c]]||s.splice(c,1);for(c=0,u=s.length;c<u;)g=(p=cellHalfedgeEnd(a,Hr[s[c]]))[0],v=p[1],d=(l=cellHalfedgeStart(a,Hr[s[++c%u]]))[0],h=l[1],(Math.abs(g-d)>Wr||Math.abs(v-h)>Wr)&&(s.splice(c,0,Hr.push(createBorderEdge(o,p,Math.abs(g-t)<Wr&&r-v>Wr?[t,Math.abs(d-t)<Wr?h:r]:Math.abs(v-r)<Wr&&n-g>Wr?[Math.abs(h-r)<Wr?d:n,r]:Math.abs(g-n)<Wr&&v-e>Wr?[n,Math.abs(d-n)<Wr?h:e]:Math.abs(v-e)<Wr&&g-t>Wr?[Math.abs(h-e)<Wr?d:t,e]:null))-1),++u);u&&(_=!1)}if(_){var b,w,T,A=1/0;for(i=0,_=null;i<m;++i)(a=qr[i])&&(T=(b=(o=a.site)[0]-t)*b+(w=o[1]-e)*w)<A&&(A=T,_=a);if(_){var S=[t,e],k=[t,r],C=[n,r],M=[n,e];_.halfedges.push(Hr.push(createBorderEdge(o=_.site,S,k))-1,Hr.push(createBorderEdge(o,k,C))-1,Hr.push(createBorderEdge(o,C,M))-1,Hr.push(createBorderEdge(o,M,S))-1)}}for(i=0;i<m;++i)(a=qr[i])&&(a.halfedges.length||delete qr[i])}(o,c,s,u)}this.edges=Hr,this.cells=qr,Yr=Ur=Hr=qr=null}function voronoi(){var t=point_x,e=point_y,n=null;function voronoi(r){return new Diagram(r.map((function(n,i){var a=[Math.round(t(n,i,r)/Wr)*Wr,Math.round(e(n,i,r)/Wr)*Wr];return a.index=i,a.data=n,a})),n)}return voronoi.polygons=function(t){return voronoi(t).polygons()},voronoi.links=function(t){return voronoi(t).links()},voronoi.triangles=function(t){return voronoi(t).triangles()},voronoi.x=function(e){return arguments.length?(t="function"==typeof e?e:d3_voronoi_src_constant(+e),voronoi):t},voronoi.y=function(t){return arguments.length?(e="function"==typeof t?t:d3_voronoi_src_constant(+t),voronoi):e},voronoi.extent=function(t){return arguments.length?(n=null==t?null:[[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]],voronoi):n&&[[n[0][0],n[0][1]],[n[1][0],n[1][1]]]},voronoi.size=function(t){return arguments.length?(n=null==t?null:[[0,0],[+t[0],+t[1]]],voronoi):n&&[n[1][0]-n[0][0],n[1][1]-n[0][1]]},voronoi}Diagram.prototype={constructor:Diagram,polygons:function(){var t=this.edges;return this.cells.map((function(e){var n=e.halfedges.map((function(n){return cellHalfedgeStart(e,t[n])}));return n.data=e.site.data,n}))},triangles:function(){var t=[],e=this.edges;return this.cells.forEach((function(n,r){if(a=(i=n.halfedges).length)for(var i,a,o,c=n.site,s=-1,u=e[i[a-1]],l=u.left===c?u.right:u.left;++s<a;)o=l,l=(u=e[i[s]]).left===c?u.right:u.left,o&&l&&r<o.index&&r<l.index&&triangleArea(c,o,l)<0&&t.push([c.data,o.data,l.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,e,n){for(var r,i,a=this,o=a._found||0,c=a.cells.length;!(i=a.cells[o]);)if(++o>=c)return null;var s=t-i.site[0],u=e-i.site[1],l=s*s+u*u;
2do{i=a.cells[r=o],o=null,i.halfedges.forEach((function(n){var r=a.edges[n],c=r.left;if(c!==i.site&&c||(c=r.right)){var s=t-c[0],u=e-c[1],d=s*s+u*u;d<l&&(l=d,o=c.index)}}))}while(null!==o);return a._found=r,null==n||l<=n*n?i.site:null}};var Gr=n(996)},421:e=>{e.exports=t}},n={};function __webpack_require__(t){var r=n[t];if(void 0!==r)return r.exports;var i=n[t]={exports:{}};return e[t](i,i.exports,__webpack_require__),i.exports}__webpack_require__.d=(t,e)=>{for(var n in e)__webpack_require__.o(e,n)&&!__webpack_require__.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},__webpack_require__.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),__webpack_require__.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};(()=>{var t=r;Object.defineProperty(t,"X",{value:!0}),Object.defineProperty(t,"bb",{enumerable:!0,get:function get(){return e.bb}}),t.Z=void 0;var e=__webpack_require__(876),n=_interopRequireDefault(__webpack_require__(421)),i=_interopRequireDefault(__webpack_require__(153)),a=_interopRequireDefault(__webpack_require__(655)),o=_interopRequireDefault(__webpack_require__(352)),c=__webpack_require__(499),s=["color","data","elementProps","grid","line","point"];function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function _extends(){return _extends=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},_extends.apply(this,arguments)}function ownKeys(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(n),!0).forEach((function(e){_defineProperty(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function _defineProperty(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _objectWithoutProperties(t,e){if(null==t)return{};var n,r,i=function _objectWithoutPropertiesLoose(t,e){if(null==t)return{};var n,r,i={},a=Object.keys(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}var u=n.default.forwardRef((function(t,e){var r,u=t.color,l=t.data,d=t.elementProps,h=t.grid,p=t.line,g=t.point,v=_objectWithoutProperties(t,s),m=n.default.useRef();switch(l.type){case"geo-map":delete l.type,r=a.default;break;case"predictive":delete l.type,r=o.default;break;default:r=i.default}return n.default.createElement(r,_extends({},v,{color:_objectSpread({pattern:c.DEFAULT_COLORS},u),data:l,elementProps:d,grid:Object.assign(c.DEFAULT_GRID_OBJECT,h),line:_objectSpread({classes:c.DEFAULT_LINE_CLASSES},p),point:_objectSpread({pattern:c.DEFAULT_POINT_PATTERNS},g),ref:e||m}))}));u.displayName="ClayChart";var l=u;t.Z=l})();var i=r.X,a=r.bb,o=r.Z;export{i as __esModule,a as bb,o as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.